Familiarize with resources, response codes, and authentication.
Title | Header | Example Key |
---|---|---|
API Key | x-metal-api-key | pk_1234567890 |
Client ID | x-metal-client-id | ci_1234567890 |
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.
Code | Description |
---|---|
200 | OK - Everything worked as expected. |
400 | Bad Request - Often missing a required parameter. |
401 | Unauthorized - No valid API key provided. |
402 | Request Failed - Parameters were valid but request failed. |
404 | Not Found - The requested item doesnβt exist. |
422 | Usage Limit Exceeded - Hit a feature or usage limit based on your plan. |
429 | Rate Limit Exceeded - Too many requests hit the API too quickly. |
5xx | Server Errors - something went wrong on Metalβs end. |
/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.
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: