Skip to content

API reference / RivetMSP

Assets

GET /assets Bearer token or API key

List assets (paged, filterable)

Parameters

NameInTypeDescription
searchquerystring
pagequeryinteger
limitqueryinteger
typequerystring
client_idqueryinteger

Example request

curl "https://YOUR-HOST/api/v1/assets" \
  -H "Authorization: Bearer $TOKEN"
import requests

response = requests.get(
    "https://YOUR-HOST/api/v1/assets",
    headers={"Authorization": f"Bearer {TOKEN}"},
)
print(response.json())
const response = await fetch("https://YOUR-HOST/api/v1/assets", {
  method: "GET",
  headers: { "Authorization": `Bearer ${TOKEN}` },
});
const data = await response.json();
$ch = curl_init("https://YOUR-HOST/api/v1/assets");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => ["Authorization: Bearer $token"],
]);
$data = json_decode(curl_exec($ch), true);

Responses

200Paged asset list

FieldTypeDescription
data array of object
data[].id integer
data[].name string
data[].type string
data[].make string
data[].model string
data[].serial string
data[].os string
data[].status string
data[].client string
total integer
Example response
json
{
    "data": [
        {
            "id": 1,
            "name": "string",
            "type": "string",
            "make": "string",
            "model": "string",
            "serial": "string",
            "os": "string",
            "status": "string",
            "client": "string"
        }
    ],
    "total": 1
}
GET /assets/types Bearer token or API key

Distinct asset types in use (bare string array)

Example request

curl "https://YOUR-HOST/api/v1/assets/types" \
  -H "Authorization: Bearer $TOKEN"
import requests

response = requests.get(
    "https://YOUR-HOST/api/v1/assets/types",
    headers={"Authorization": f"Bearer {TOKEN}"},
)
print(response.json())
const response = await fetch("https://YOUR-HOST/api/v1/assets/types", {
  method: "GET",
  headers: { "Authorization": `Bearer ${TOKEN}` },
});
const data = await response.json();
$ch = curl_init("https://YOUR-HOST/api/v1/assets/types");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => ["Authorization: Bearer $token"],
]);
$data = json_decode(curl_exec($ch), true);

Responses

200Asset type names

Example response
json
[
    "string"
]
GET /assets/{id} Bearer token or API key

Asset detail

Parameters

NameInTypeDescription
idrequiredpathinteger

Example request

curl "https://YOUR-HOST/api/v1/assets/1" \
  -H "Authorization: Bearer $TOKEN"
import requests

response = requests.get(
    "https://YOUR-HOST/api/v1/assets/1",
    headers={"Authorization": f"Bearer {TOKEN}"},
)
print(response.json())
const response = await fetch("https://YOUR-HOST/api/v1/assets/1", {
  method: "GET",
  headers: { "Authorization": `Bearer ${TOKEN}` },
});
const data = await response.json();
$ch = curl_init("https://YOUR-HOST/api/v1/assets/1");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => ["Authorization: Bearer $token"],
]);
$data = json_decode(curl_exec($ch), true);

Responses

200Asset detail

FieldTypeDescription
id integer
name string
type string
make string
model string
serial string
os string
status string
description string
physical_location string
location_name string
location_city string
location_state string
contact_name string
contact_phone string
client string
created_at string
purchase_date string
warranty_expire string
notes string
Example response
json
{
    "id": 1,
    "name": "string",
    "type": "string",
    "make": "string",
    "model": "string",
    "serial": "string",
    "os": "string",
    "status": "string",
    "description": "string",
    "physical_location": "string",
    "location_name": "string",
    "location_city": "string",
    "location_state": "string",
    "contact_name": "string",
    "contact_phone": "string",
    "client": "string",
    "created_at": "string",
    "purchase_date": "string",
    "warranty_expire": "string",
    "notes": "string"
}

404Resource not found

FieldTypeDescription
error string