# 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 (Databases, 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.
# Account
Method | Path | Operation |
---|---|---|
GET | /account | get_account |
PATCH | /account | update_account |
# 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 |
# Cache
Method | Path | Operation |
---|---|---|
POST | /cache | create_upload_url |
DELETE | /cache/{handler} | invalidate_upload_url |
# Databases*
Method | Path | Operation* |
---|---|---|
GET | /account/services/databases | get_databases |
GET | /account/services/databases/{database} | get_database |
PATCH | /account/services/databases/{database} | update_database |
GET | /account/services/databases/{database}/access | get_database_access |
PATCH | /account/services/databases/{database}/access/ips | update_database_ip_access |
PATCH | /account/services/databases/{database}/access/users/{user} | update_database_user_access |
*
The Databases service needs to be enabled for your Account. Please contact hello@trustedtwin.com for more details.
# Docs
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 |
# History
Method | Path | Operation |
---|---|---|
GET | /twins/{twin}/ledgers/{ledger}/history | get_twin_ledger_entry_history |
# Identities
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 |
# Indexes*
Method | Path | Operation |
---|---|---|
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.
# Ledgers
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 |
# Log
Method | Path | Operation |
---|---|---|
GET | /log | get_log |
# 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 |
PATCH | /notifications/webhooks/access/account/{account} | update_notifications_account_access |
GET | /notifications/webhooks/access | get_notifications_access |
# Roles
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 |
# 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 |
# Timeseries*
Method | Path | Operation* |
---|---|---|
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.
# Trace
Method | Path | Operation |
---|---|---|
POST | /trace | trace |
# Twins
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 |
# Usage
Method | Path | Operation* |
---|---|---|
GET | /usage | get_account_usage |
GET | /usage/{usage} | get_user_usage |
# Users
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 Secrets (API keys)
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 |
Was this article helpful?