API Reference
Available inCloudEnterprise
Connection and Authentication
Section titled “Connection and Authentication”- Base URL:
https://<your-tier0-host>/openapi/v2 - Authentication: Send your Tier0 API key in the
x-api-keyrequest header. - Keep API keys on a trusted server; do not put them in a URL, browser bundle, or log.
Cloud OpenAPI endpoints lists paths, parameters, limits, and response schemas.
Checking Results
Section titled “Checking Results”- For
/uns/requests, check both the HTTP status and the response body. A successful response has a2xxstatus andcode: 0. Read the result fromdata. - On failure, inspect
error.codefor the reason and keeprequestIdfor troubleshooting. - For batch requests, check each item even when the HTTP status is
200. Some items may have failed.
Retrying Writes
Section titled “Retrying Writes”- Check
error.executionto see whether the write was started, rolled back, committed, or has an unknown outcome. - If
error.retry.safeistrue, retry the same request with the same idempotency key. If one was supplied, wait at least as long as indicated byerror.retry.afterMsor theRetry-Afterheader. - If part of a batch was committed, check which items succeeded before submitting any remaining work. If the outcome is unknown and the response does not confirm a safe retry, verify whether the write took effect before sending it again.
This contract is from dev3.0. Check the contract version and available capabilities on your instance before calling an endpoint.
Checking Results
Section titled “Checking Results”- Use
POSTwith JSON for ordinary requests. File URL and download operations and Record subscriptions useGET; subscriptions return Server-Sent Events. Follow the method and request schema of each endpoint. - Most JSON responses contain
code,msg,requestId, anddata. Stream requests, subscriptions, and file downloads have their own response shapes. Check the endpoint schema before handling a response. - A personal API key is limited by its scope and the owner’s current permissions. An App key also needs the App’s grants. An API key does not grant access to every endpoint listed in the contract.
Retrying Writes
Section titled “Retrying Writes”- For writes, use
dryRun,expectedRevision, andidempotencyKeywhen the endpoint supports them. A successful preflight is not a committed write; an accepted asynchronous request must be checked through itsjobId. - After a timeout or an uncertain outcome, check the resource or job before repeating a write. For partial batches, inspect each item and retry only work that was not committed.
See the Enterprise OpenAPI endpoints for paths, parameters, limits, and response schemas.