# API reference index
# Reference index
Below you can find a reference index of endpoints available on the Trusted Twin environment. Click on a category for a list of endpoints by category.
*
The "ledger"
parameter in the path of the request should point to the Ledger resource for requests based on the account UUID. Request based on the account UUID can be performed if the Twin rule allows you to perform operations on the given Twin. For requests on personal Ledger, you can use personal
instead of the Ledger UUID in the path of the request (/twins/{twin}/ledgers/personal
).
**
The "ledger"
parameter in the path of the request should point to the Ledger resource for requests based on the account UUID. Request based on the account UUID can be performed if the Twin rule allows you to perform operations on the given Twin. For requests on personal Ledger, you can use personal
instead of the Ledger UUID in the path of the request (/twins/{twin}/ledgers/personal
). For requests on Ledgers where you are the owner of the Twin, you can use owner
instead of the Ledger UUID in the path of the request (/twins/{twin}/ledgers/owner
).
***
The "ledger"
parameter in the path of the request should point to the Ledger resource for requests based on the account UUID. Request based on the account UUID can be performed if the Twin rule allows you to perform operations on the given Twin. For requests on personal Ledger, you can use personal
instead of the Ledger UUID in the path of the request (/twins/{twin}/ledgers/personal
). For requests on Ledgers where you are the owner of the Twin, you can use owner
instead of the Ledger UUID in the path of the request (/twins/{twin}/ledgers/owner
). For requests on Ledgers where you are the creator of the Twin, you can use creator
instead of the Ledger UUID in the path of the request (/twins/{twin}/ledgers/creator
).
****
The advanced database services (Timeseries and Indexes) need to be enabled for your account. Please contact hello@trustedtwin.com for more details.
# Endpoints
Below you can find a breakdown of endpoints by category. Click on the operation name for comprehensive information about the endpoint.
# Twin
Method | Path | Operation |
---|---|---|
POST | /twins | create_twin |
GET | /twins/{twin} | get_twin |
GET | /twins | scan_twins |
PATCH | /twins/{twin} | update_twin |
DELETE | /twins/{twin} | terminate_twin |
# Identity
Method | Path | Operation |
---|---|---|
POST | /twins/{twin}/identities | create_twin_identity |
GET | /twins/{twin}/identities/{identity} | get_twin_identity |
GET | /twins/{twin}/identities | get_twin_identities |
PATCH | /twins/{twin}/identities/{identity} | update_twin_identity |
DELETE | /twins/{twin}/identities/{identity} | delete_twin_identity |
GET | /resolve/{identity} | resolve_twin_identity |
# Ledger
Method | Path | Operation |
---|---|---|
POST | /twins/{twin}/ledgers/{ledger} | add_twin_ledger_entry |
GET | /twins/{twin}/ledgers/{ledger}/value | get_twin_ledger_entry_value |
GET | /twins/{twin}/ledgers/{ledger} | get_twin_ledger_entry |
PATCH | /twins/{twin}/ledgers/{ledger}/value | update_twin_ledger_entry_value |
PATCH | /twins/{twin}/ledgers/{ledger} | update_twin_ledger_entry |
DELETE | /twins/{twin}/ledgers/{ledger} | delete_twin_ledger_entry |
# History
Method | Path | Operation |
---|---|---|
GET | /twins/{twin}/ledgers/{ledger}/history | get_twin_ledger_entry_history |
# Cache
Method | Path | Operation |
---|---|---|
POST | /cache | create_upload_url |
DELETE | /cache/{handler} | invalidate_upload_url |
# Doc
Method | Path | Operation |
---|---|---|
POST | /twins/{twin}/docs | attach_twin_doc |
GET | /twins/{twin}/docs/{doc_name} | get_twin_doc |
GET | /twins/{twin}/docs | get_twin_docs |
PATCH | /twins/{twin}/docs/{doc_name} | update_twin_doc |
DELETE | /twins/{twin}/docs/{doc_name} | delete_twin_doc |
DELETE | /twins/{twin}/docs | delete_twin_docs |
# Batches
Method | Path | Operation |
---|---|---|
POST | /batches | create_batch |
GET | /batches | get_batches |
GET | /batches/{batch} | get_batch |
PATCH | /batches/{batch} | update_batch |
DELETE | /batches/{batch} | delete_batch |
# Timeseries*
Method | Path | Operation* |
---|---|---|
PATCH | /account/services/timeseries | update_timeseries_access |
POST | /account/services/timeseries | create_timeseries_table |
GET | /account/services/timeseries/{timeseries} | get_timeseries_table |
GET | /account/services/timeseries | get_timeseries_tables |
PATCH | /account/services/timeseries/{timeseries} | update_timeseries_table |
DELETE | /account/services/timeseries/{timeseries}/data | truncate_timeseries_table |
DELETE | /account/services/timeseries/{timeseries} | delete_timeseries_table |
*
The Timeseries service needs to be enabled for your Account. Please contact hello@trustedtwin.com for more details.
# Indexes*
Method | Path | Operation |
---|---|---|
PATCH | /account/services/indexes | update_indexes_access |
POST | /account/services/indexes | create_indexes_table |
GET | /account/services/indexes/{index} | get_indexes_table |
GET | /account/services/indexes | get_indexes_tables |
PATCH | /account/services/indexes/{index} | update_indexes_table |
DELETE | /account/services/indexes/{index}/data | truncate_indexes_table |
DELETE | /account/services/indexes/{index} | delete_indexes_table |
*
The Indexes service needs to be enabled for your Account. Please contact hello@trustedtwin.com for more details.
# Notifications
Method | Path | Operation* |
---|---|---|
POST | /notifications/webhooks | webhook_subscribe |
GET | /notifications/webhooks/{account}?token={token} | webhook_confirm_subscription |
PATCH | /notifications/webhooks/{account}?token={token} | webhook_refresh_subscription |
DELETE | /notifications/webhooks/{account}?token={token} | webhook_unsubscribe |
# Stickers
Method | Path | Operation* |
---|---|---|
POST | /twins/{twin}/stickers | put_sticker |
GET | /twins/{twin}/stickers/{color} | get_sticker |
GET | /twins/{twin}/stickers/ | get_stickers |
GET | /stickers | list_stickers |
DELETE | /twins/{twin}/stickers/{color} | remove_sticker |
# Role
Method | Path | Operation |
---|---|---|
POST | /roles | create_user_role |
GET | /roles/{role} | get_user_role |
GET | /roles/ | get_user_roles |
PATCH | /roles/{role} | update_user_role |
DELETE | /roles/{role} | delete_user_role |
# User
Method | Path | Operation |
---|---|---|
POST | /users | create_user |
GET | /users/{user} | get_user |
GET | /users | get_users |
PATCH | /users/{user} | update_user |
DELETE | /users/{user} | delete_user |
# User Secret (API key)
Method | Path | Operation |
---|---|---|
POST | /users/{user}/secrets | create_user_secret_pin |
POST | /secrets/{account}/{pin} | create_user_secret |
GET | /users/{user}/secrets | get_user_secret |
PATCH | /users/{user}/secrets | update_user_secret |
DELETE | /users/{user}/secrets | delete_user_secret |
# User Token
Method | Path | Operation |
---|---|---|
POST | /token | create_user_token |
POST | /token/refresh | refresh_user_token |
# Who am I
Method | Path | Operation* |
---|---|---|
GET | /whoami | who_am_i |
# Log
Method | Path | Operation |
---|---|---|
GET | /log | get_log |
# Trace
Method | Path | Operation |
---|---|---|
POST | /trace | trace |
# Usage
Method | Path | Operation* |
---|---|---|
GET | /usage | get_account_usage |
GET | /usage/{usage} | get_user_usage |
Was this article helpful?