Skip to main content

Base URL

The Metal API is available at the following URL:

Authentication

Metal uses API keys to authenticate requests. You can view and manage your API keys in the Metal Application. There are two headers that you’ll retrieve from each Key.

API Key Headers

Example Authenticated Request

Response Codes

Metal uses conventional HTTP response codes to indicate the success or failure of an API request. In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, a charge failed, etc.), and codes in the 5xx range indicate an error with Metal’s servers.

Normal pagination

For certain endpoints, such as /v1/indexes/:id/documents, pagination can be achieved using the page and limit query parameters. Both page and limit should be positive integers with a maximum value of 100. This constraint means that using this method, callers can retrieve a maximum of 10,000 (i.e., 100 * 100) records.

Deep pagination

To fetch documents beyond the limitations of normal pagination, you should utilize the lastObjectIdSeen value returned. This ID enables the API to access data from a deeper point in the dataset. Below is an illustrative script to demonstrate this approach: