### Test API Call using cURL Source: https://developer.frame.io/api/reference This snippet demonstrates how to make a test GET request to the Frame.io API's /me endpoint using cURL. It requires a developer token for authorization. This is a basic verification step to ensure your token is functional. ```bash curl --request GET \ --url https://api.frame.io/v2/me \ --header 'authorization: Bearer ' ``` -------------------------------- ### Common Error Codes Source: https://developer.frame.io/api/reference A reference guide to the common HTTP status codes returned by the Frame.io API and their meanings. ```APIDOC ## Error Codes The Frame.io API may return the following common errors: | HTTP Status | Details | Reason(s) | |-------------|----------------|----------------------------------------------------------------------------------------------------------------------------------------------| | `401` | **Unauthorized** | Invalid API token. Check to make sure you're using Bearer Token authentication, and passing your token via the Authorization header. | | `402` | **Usage exceeded** | You have gone over your Frame.io plan limits. | | `403` | **Forbidden** | You do not have access to that resource. Returned for both user access and token scope. | | `404` | **Not Found** | Resource has been moved or deleted. | | `409` | **Conflict** | That resource already exists. | | `422` | **Invalid arguments** | One or more parameters supplied were invalid. | | `429` | **Rate Limited** | You have hit the rate limit for the API. | | `500` | **Server Error** | Our server doesn't know how to interpret your request, or was unable to complete your request within the available timeframe (30 seconds). | ``` -------------------------------- ### Test API Call using Python Requests Source: https://developer.frame.io/api/reference This snippet shows how to perform a test GET request to the Frame.io API's /me endpoint using the Python 'requests' library. It includes the necessary authorization header with a developer token. This is useful for verifying API connectivity in Python applications. ```python import requests url = "https://api.frame.io/v2/me" headers = { "Authorization": "Bearer " } requests.GET(url,headers=headers) ``` -------------------------------- ### User Information Endpoint Source: https://developer.frame.io/api/reference This endpoint allows you to retrieve information about the authenticated user. It's a good test to confirm your API token is working correctly. ```APIDOC ## GET /v2/me ### Description Retrieves the current user's information. ### Method GET ### Endpoint /v2/me ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```bash curl --request GET \ --url https://api.frame.io/v2/me \ --header 'authorization: Bearer ' ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier for the user. - **email** (string) - The email address of the user. - **name** (string) - The full name of the user. #### Response Example ```json { "id": "usr_abcdef1234567890", "email": "user@example.com", "name": "John Doe" } ``` ``` -------------------------------- ### Rate Limits Source: https://developer.frame.io/api/reference Information regarding the rate limiting policies applied to all Frame.io API requests. ```APIDOC ## Rate Limits Whether you're using a Developer Token, accessing via an OAuth App, or you're interacting with our API using any of our internal apps, **all API calls to Frame.io are rate limited.** Rate limits apply are applied across any and all API requests from an individual user (irrespective of which token or auth method is used), are depleted and refilled progressively, and are reflected in the response headers of every request made to the Frame.io API. Each endpoint is configured with its own limits, which range from as low as `10` requests/minute, to as high as `100` requests/second. Requests that have exceeded the rate limit for a particular endpoint will receive a `429` HTTP error in response. ``` -------------------------------- ### Rate Limit Details by Resource and Action Source: https://developer.frame.io/api/reference Specific rate limits vary across different resource paths and actions within the Frame.io API. Limits are generally lower for creating new data and higher for fetching lists. ```APIDOC ## Rate Limit Details ### Description Rate limits differ significantly based on the resource path and the action being performed. The following table provides specific details for select resources and actions, with limits expressed as requests per time window. As a general guideline: * Resource paths that create new data are typically limited to 100 calls per minute or fewer. * Resource paths that fetch lists of assets are typically limited to 200 calls per minute. ### Resource Limits | Resource | Action | Limit (requests) | Limit window (ms) | | :------------------- | :------- | :--------------- | :---------------- | | **Assets** | `create` | `5` | `1,000` | | **Assets** | `update` | `10` | `1,000` | | **Assets** | `read` | `5` | `1,000` | | **Comments** | | **Presentations** | | **Projects** | | **Review Links** | | **Teams** | | **Team Members** | `create` | `100` | `60,000` | | **Search** | `read` | `200` | `60,000` | ``` -------------------------------- ### Rate Limiting Overview Source: https://developer.frame.io/api/reference The Frame.io API uses a leaky bucket rate limiting strategy where limits refresh gradually over their time window, rather than having a hard cutoff. Exponential backoff is the recommended method for handling rate limit errors (429 responses). ```APIDOC ## Rate Limiting Strategy ### Description Frame.io employs a leaky bucket strategy for progressive rate limiting. Limits refresh gradually over their allotted time window, avoiding hard cutoffs. This means remaining limits are constantly replenishing at a pace relative to the resource's limit and time window. ### Recommended Handling **Exponential Backoff** is the recommended strategy for managing rate limits. 1. When receiving a `429` (Too Many Requests) status code, pause for a short period (e.g., one second). 2. If another `429` is received, exponentially increase the wait period before retrying. 3. Continue increasing the wait time until normal function resumes. ### Response Headers API responses include the following headers to help manage outbound requests: | Header | Description | | :---------------------- | :-------------------------------------------------------------------------- | | `x-ratelimit-limit` | The maximum number of requests allowed for the resource path in the current window. | | `x-ratelimit-remaining` | The number of requests remaining in the current time window. | | `x-ratelimit-window` | The duration of the time window for the resource path's limits, in milliseconds (ms). | ### Example Usage Consider the `GET v2/assets/:id/children` endpoint. If the limit is 40 requests per 60,000 ms (1 minute), and you've made one request, the headers might appear as: ``` x-ratelimit-limit → 40 x-ratelimit-remaining → 39 x-ratelimit-window → 60000 ``` ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.