# Trusted Twin API
# API Reference
The Trusted Twin API follows REST(opens new window) principles. It is designed to have predictable, resource-oriented URLs.
# Trusted Twin REST URI
All Trusted Twin REST API calls should be made to the https://rest.trustedtwin.com(opens new window) base domain. Please note that the Trusted Twin API is not accessible via plain HTTP requests.
# Requests
Trusted Twin resources are accessed via standard HTTPS requests in UTF-8 format sent to the endpoints. The API uses appropriate HTTP verbs to define the method for each operation.
Method | Operation |
---|---|
POST | Create a resource |
GET | Retrieve a resource |
PATCH | Update a resource |
DELETE | Delete a resource |
# Request body
If request parameters are provided via request body, the request body follows the JSON format.
# Responses
Trusted Twin REST API responses are JSON-encoded(opens new window) objects.
# Trusted Twin IDs
The IDs on the Trusted Twin platform are standardised and follow the below formats.
ID name | Type | Description | Example |
---|---|---|---|
UUID | string | Unique ID of Trusted Twin objects (account UUID, Twin UUID etc.). Follows the UUID Version 4(opens new window) format. | e834214a-e13d-412b-ffd6-911ab58c8733 |
Identity | string | User-defined ID for an Identity. It must match the regular expression(opens new window) [A-Za-z_][0-9A-Za-z_]{0,7}#[0-9A-Za-z_=+-]{1,128} . | RFID#be744bdc-0f6d-4a00-8199-9f6a893c1bde |
# Description field
The description field is part of the user, Twin, and Doc objects. It allows for adding metadata to objects. It can be used to create rules or for indexing purposes.
Attribute | Type | Description |
---|---|---|
description | dictionary | User-defined key-value pairs: - key: It must match the regular expression(opens new window) ^[a-z_][0-9a-z_]{0,63}$ .- value: Valid JSON data type. |
# Timestamps
The timestamps on the Trusted Twin platform are standard Unix timestamps(opens new window). They display the number of seconds (to three decimal places) that have elapsed since the Unix epoch(opens new window).
# Swagger
You can find the most recent version of the Trusted Twin API in SwaggerHub(opens new window).
Was this article helpful?