Metrics API v1
Introduction
This reference is your key to a comprehensive understanding of the Batu Metrics API.❗ You need an integration token to interact with the Batu Metrics API. Contact us to request your integration key.
Conventions
The base URL to send all API requests ishttps://production.batuenergy.com and https://sandbox.batuenergy.com. HTTPS is required for all API requests.
The Batu API follows RESTful conventions when possible, with most operations performed via GET, POST, PUT, and DELETE requests on page and database resources. Request and response bodies are encoded as JSON.
JSON CONVENTIONS
- JSend convention is used for responses.
- Top-level resources have an
"object"property. This property can be used to determine the type of the resource (e.g."asset","metrics", etc.) - Top-level resources are addressable by a UUIDv4
"id"property. You may omit dashes from the ID when making requests to the API. - Uri paths and methods are in
kebab-case(notcamelCaseorsnake_case). - Resource properties are in
camelCase(notkebab-caseorsnake_case). - Temporal values (dates and datetimes) are encoded in ISO 8601 strings. Datetimes will include the time value (
2020-08-12T02:12:33.231Z) while dates will include only the date (2020-08-12) - The Batu API does not support empty strings. To unset a string value for properties use an explicit
nullinstead of"".
Code samples & SDKs
Samples requests and responses are shown for each endpoint. Requests are shown using cURL. These samples make it easy to copy, paste, and modify as you build your integration.Pagination
Endpoints that return lists of objects support cursor-based pagination requests. By default, Batu returns up to 100 items per API call. If the number of items in a response from a support endpoint exceeds the default, then an integration can use pagination to request a specific set of the results and/or to limit the number of returned items.**** RESPONSESRequest Limits
To ensure a consistent developer experience for all API users, the Batu API is rate limited and basic size limits apply to request parameters.Rate Limits
Rate-limited requests will return a"rate_limited" error code (HTTP response status 429). The rate limit for incoming requests per integration is an average of three requests per second. Some bursts beyond the average rate are allowed.
❗ Rate limits may changeIn the future, we plan to adjust rate limits to balance for demand and reliability. We may also introduce distinct rate limits for workspaces in different pricing plans.