MENU navbar-image

Introduction

API endpoints for the nrt and associated data.

API endpoints for authentication, commands, data.

Authenticating requests

To authenticate requests, include an Authorization header with the value "Bearer {YOUR_AUTH_KEY}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

You can retrieve your token by authenticating.

Endpoints

Creates a new token for supplied User.

Example request:
curl --request POST \
    "https://nrt.test/api/requestToken" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"kaia65@example.com\",
    \"password\": \"pariatur\"
}"
const url = new URL(
    "https://nrt.test/api/requestToken"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "kaia65@example.com",
    "password": "pariatur"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://nrt.test/api/requestToken',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'email' => 'kaia65@example.com',
            'password' => 'pariatur',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://nrt.test/api/requestToken'
payload = {
    "email": "kaia65@example.com",
    "password": "pariatur"
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

require 'rest-client'

body = {
    "email": "kaia65@example.com",
    "password": "pariatur"
}
headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
}

response = RestClient.post(
  'https://nrt.test/api/requestToken',
  body ,
  headers
)

p response.body

Example response (200):


{
 "access_token": 123abc,
 "expires_at": "2023-07-03 17:37:50",
 "token_type": ["Bearer"]
}
 

Request      

POST api/requestToken

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

email   string   

Must be a valid email address. Must not be greater than 255 characters. Example: kaia65@example.com

password   string   

Example: pariatur

POST api/{token}/auth

Example request:
curl --request POST \
    "https://nrt.test/api/sed/auth" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://nrt.test/api/sed/auth"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://nrt.test/api/sed/auth',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://nrt.test/api/sed/auth'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers)
response.json()

require 'rest-client'

headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
}

response = RestClient.post(
  'https://nrt.test/api/sed/auth',
  headers
)

p response.body

Request      

POST api/{token}/auth

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

token   string   

Example: sed

GET api/heartbeat

Example request:
curl --request GET \
    --get "https://nrt.test/api/heartbeat" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://nrt.test/api/heartbeat"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://nrt.test/api/heartbeat',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://nrt.test/api/heartbeat'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

require 'rest-client'

headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
}

response = RestClient.get(
  'https://nrt.test/api/heartbeat',
  headers
)

p response.body

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 59
access-control-allow-origin: *
 

OK
 

Request      

GET api/heartbeat

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Creates a new token for supplied User.

Example request:
curl --request POST \
    "https://nrt.test/api/testToken" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"xsimonis@example.org\",
    \"password\": \"est\"
}"
const url = new URL(
    "https://nrt.test/api/testToken"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "xsimonis@example.org",
    "password": "est"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://nrt.test/api/testToken',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'email' => 'xsimonis@example.org',
            'password' => 'est',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://nrt.test/api/testToken'
payload = {
    "email": "xsimonis@example.org",
    "password": "est"
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

require 'rest-client'

body = {
    "email": "xsimonis@example.org",
    "password": "est"
}
headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
}

response = RestClient.post(
  'https://nrt.test/api/testToken',
  body ,
  headers
)

p response.body

Example response (200):


{
 "access_token": 123abc,
 "expires_at": "2023-07-03 17:37:50",
 "token_type": ["Bearer"]
}
 

Request      

POST api/testToken

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

email   string   

Must be a valid email address. Must not be greater than 255 characters. Example: xsimonis@example.org

password   string   

Example: est