### Python SDK Example Source: https://next.developer.frame.io/platform/v2/api-reference/assets/get-audio Use the Python requests library to get audio track information. Ensure you have the library installed and replace '' with your actual API token. ```python import requests url = "https://api.frame.io/v2/assets/asset_id/audio" headers = {"Authorization": "Bearer "} response = requests.get(url, headers=headers) print(response.json()) ``` -------------------------------- ### Get Project Presentations (PHP) Source: https://next.developer.frame.io/platform/v2/api-reference/presentations/get-project-presentations This PHP example uses GuzzleHttp to make a GET request. It requires the GuzzleHttp library to be installed via Composer. ```php request('GET', 'https://api.frame.io/v2/projects/project_id/presentations', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ``` -------------------------------- ### Go - Get Actions Source: https://next.developer.frame.io/platform/v2/api-reference/custom-actions/get-actions-by-account This Go example demonstrates making an HTTP GET request and printing the response body. Remember to replace '' with your API key. ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.frame.io/v2/accounts/account_id/actions" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` -------------------------------- ### Swift: Get Assets Source: https://next.developer.frame.io/platform/v2/api-reference/assets/get-assets This Swift example demonstrates making a GET request using URLSession. It covers setting up headers, request body, and handling the response. ```swift import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = [] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.frame.io/v2/assets/asset_id/children")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` -------------------------------- ### Quick Start: Upload a File Source: https://next.developer.frame.io/platform/docs/guides/uploading-to-frame-io/python-sdk-upload-guide A quick start example demonstrating how to upload a file using the Frame.io Python SDK. It involves creating a file resource and then uploading the file content. ```python import os from frameio import Frameio from frameio.files import FileCreateLocalUploadParamsData from frameio.upload import FrameioUploader client = Frameio(token="YOUR_TOKEN") file_path = "/path/to/video.mp4" file_size = os.path.getsize(file_path) # 1. Create the file resource and get pre-signed upload URLs response = client.files.create_local_upload( account_id="YOUR_ACCOUNT_ID", folder_id="YOUR_FOLDER_ID", data=FileCreateLocalUploadParamsData( name="video.mp4", file_size=file_size, ), ) # 2. Upload the file to S3 with open(file_path, "rb") as f: FrameioUploader(response.data, f).upload() ``` -------------------------------- ### Get Teams (PHP) Source: https://next.developer.frame.io/platform/v2/api-reference/teams/get-teams-by-account Example using Guzzle HTTP client in PHP to get teams. Make sure to install Guzzle via Composer and replace `account_id` and ``. ```php request('GET', 'https://api.frame.io/v2/accounts/account_id/teams', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ``` -------------------------------- ### Show Version Stack (Swift) Source: https://next.developer.frame.io/platform/v4-experimental/api-reference/version-stacks/show This Swift example shows how to construct and execute a GET request to retrieve version stack details, including setting headers and handling the response. ```swift import Foundation let headers = [ "api-version": "experimental", "Authorization": "Bearer " ] let request = NSMutableURLRequest(url: NSURL(string: "https://api.frame.io/v4/accounts/7a2e85c2-d851-4852-a179-cf5b09608f82/version_stacks/0581b059-c284-4174-bc04-fd7a069c8ea3?include=media_links.original")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` -------------------------------- ### Full Python SDK Upload Example Source: https://next.developer.frame.io/platform/docs/guides/uploading-to-frame-io/python-sdk-upload-guide A comprehensive example demonstrating authentication, file preparation, creation of a local upload resource, and the actual file upload with progress tracking. Ensure you replace placeholder values with your actual credentials and file paths. ```python import os from frameio import Frameio from frameio.auth import ServerToServerAuth from frameio.files import FileCreateLocalUploadParamsData from frameio.upload import FrameioUploader # Authenticate auth = ServerToServerAuth( client_id="YOUR_CLIENT_ID", client_secret="YOUR_CLIENT_SECRET", ) client = Frameio(token=auth.get_token) # Prepare the file file_path = "/path/to/video.mp4" file_name = os.path.basename(file_path) file_size = os.path.getsize(file_path) # Create the file resource response = client.files.create_local_upload( account_id="YOUR_ACCOUNT_ID", folder_id="YOUR_FOLDER_ID", data=FileCreateLocalUploadParamsData( name=file_name, file_size=file_size, ), ) print(f"Uploading {file_name} ({file_size:,} bytes) in {len(response.data.upload_urls)} chunks...") # Upload with progress def on_progress(uploaded: int, total: int) -> None: print(f"\r{uploaded / total:.0%}", end="", flush=True) with open(file_path, "rb") as f: FrameioUploader(response.data, f, on_progress=on_progress).upload() print(f"\nDone! View at: {response.data.view_url}") ``` -------------------------------- ### PHP - Get Actions Source: https://next.developer.frame.io/platform/v2/api-reference/custom-actions/get-actions-by-account Example using GuzzleHttp in PHP to call the API. Ensure you have installed Guzzle via Composer. ```php request('GET', 'https://api.frame.io/v2/accounts/account_id/actions', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ?> ``` -------------------------------- ### Get Team Information (PHP) Source: https://next.developer.frame.io/platform/v2/api-reference/teams/get-team This PHP example uses GuzzleHttp to fetch team details. Make sure to install Guzzle via Composer. ```php request('GET', 'https://api.frame.io/v2/teams/team_id', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ?> ``` -------------------------------- ### Example Project Device Connection Response Source: https://next.developer.frame.io/platform/v2/implementing-c2c-authentication-and-authorization-c2c-application This is an example of the JSON response after successfully connecting a device to a project. It contains details about the authorization, creator, and project. ```json { "_type": "project_device", "asset_type": "video", "authorization": { "_type": "project_device_authorization", "creator": { "_type": "user", "account_id": "93f872fb-9924-4e31-a430-2574e0742260", "deleted_at": null, "email": "hpotter@hoggyhoggyhogwarts.edu", "id": "d473b5e1-08d2-4842-82ac-a6b01233dc2c", ... "name": "Harry Potter", ... }, "creator_id": "d473b5e1-08d2-4842-82ac-a6b01233dc2c", "expires_at": null, "id": "ee9f5949-b7fa-4c71-8480-6d4c60877c51", "inserted_at": "2022-03-09T18:14:21.893283Z", "project_device_id": "6a55d7f6-dfb7-46a1-bff8-a3acb2d3d1aa", "scopes": { ... "asset_create": true, ... "id": "1e174fe9-5b53-48db-b556-c310c0848898", "offline": true, ... } }, "channels": [ { "_type": "project_device_channel", "asset_type": "video", ... } ], "creator_id": "d473b5e1-08d2-4842-82ac-a6b01233dc2c", "deleted_at": null, "device_id": "a8a4f3bf-196c-4748-832b-28f1d0801515", "id": "93af90e7-ee89-4b47-86e6-c2750f3790b6", ... "name": "MyApp-62f88d2a-1ae1-45e7-a6a0-81954e0cf2ff", "project": { "_type": "project", "id": "921480ec-1225-424a-9447-19c61a3a1ef2", "name": "Testbed" }, "project_id": "921480ec-1225-424a-9447-19c61a3a1ef2", "status": "online", ... } ``` -------------------------------- ### Get Comment Impressions (PHP) Source: https://next.developer.frame.io/platform/v2/api-reference/comments/get-comment-impressions A PHP example using GuzzleHttp to fetch comment impressions. This requires the GuzzleHttp library to be installed via Composer. ```php request('GET', 'https://api.frame.io/v2/comments/comment_id/impressions', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ?> ``` -------------------------------- ### Get Comment Replies (PHP) Source: https://next.developer.frame.io/platform/v2/api-reference/comments/get-replies This PHP example uses the Guzzle HTTP client to fetch comment replies. Ensure you have Guzzle installed via Composer. ```php request('GET', 'https://api.frame.io/v2/comments/comment_id/replies', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ?> ``` -------------------------------- ### Create File with HTTP POST (Swift) Source: https://next.developer.frame.io/platform/api-reference/files/create This Swift example shows how to prepare an HTTP POST request to create a file. It includes setting up headers and the JSON body using Foundation. ```swift import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = ["data": [ "file_size": 1137444, "media_type": "image/png", "name": "asset.png" ]] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) ``` -------------------------------- ### Get Team Members with PHP Guzzle Source: https://next.developer.frame.io/platform/v2/api-reference/teams/get-team-members This PHP example uses the Guzzle HTTP client to fetch team members. Ensure you have installed Guzzle via Composer. ```php request('GET', 'https://api.frame.io/v2/teams/team_id/members', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ?> ``` -------------------------------- ### Create Project Response Example Source: https://next.developer.frame.io/platform/docs/guides/postman-collection This is an example response after successfully creating a new project within a workspace. It includes project details and a root folder ID. ```json { "data": { "id": "fd26defb-8bdf-5c39-9746-24d38f109cc3", "name": "test", "status": "active", "restricted": true, "updated_at": "2026-05-01T03:39:58.910884Z", "storage": 0, "workspace_id": "77777777-999-4444-8888-000000000000", "created_at": "2026-05-01T03:39:58.853797Z", "root_folder_id": "d4fca8b4-5fd8-4a94-90aa-de13de4b2021", "view_url": "https://next.frame.io/project/fd26defb-8bdg-5c39-9746-24d38f109cc3" } } ``` -------------------------------- ### Go HTTP Client Example Source: https://next.developer.frame.io/platform/v2/api-reference/assets/get-audio This Go code snippet shows how to make a GET request to retrieve audio track information. It includes reading the response body and printing it. ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.frame.io/v2/assets/asset_id/audio" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` -------------------------------- ### Get User Presentations (PHP) Source: https://next.developer.frame.io/platform/v2/api-reference/presentations/get-user-presentations This PHP example uses Guzzle HTTP client to make the API call. Ensure you have the Guzzle package installed via Composer. ```php request('GET', 'https://api.frame.io/v2/presentations', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ``` -------------------------------- ### Show Project using HTTP GET Request (Swift) Source: https://next.developer.frame.io/platform/api-reference/projects/show Retrieve project details using Swift's URLSession to make an HTTP GET request. This example shows how to set up the request with headers and execute it. ```swift import Foundation let headers = ["Authorization": "Bearer "] let request = NSMutableURLRequest(url: NSURL(string: "https://api.frame.io/v4/accounts/7bf7b84b-6625-4347-a694-0a501b41cd83/projects/ff0e7762-4989-4178-8bb6-4080bdbd4145")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` -------------------------------- ### List Review Links with Swift Source: https://next.developer.frame.io/platform/v2/api-reference/review-links/list Employ Foundation's URLSession for making the API request. This example sets up the request with the necessary headers and method. ```swift import Foundation let headers = ["Authorization": "Bearer "] let request = NSMutableURLRequest(url: NSURL(string: "https://api.frame.io/v2/projects/project_id/review_links")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` -------------------------------- ### Get Team Membership (PHP) Source: https://next.developer.frame.io/platform/v2/api-reference/teams/get-membership-by-team This PHP example utilizes the Guzzle HTTP client to fetch team membership data. Make sure to install Guzzle via Composer. ```php request('GET', 'https://api.frame.io/v2/teams/team_id/membership', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ``` -------------------------------- ### Get Action using PHP (Guzzle) Source: https://next.developer.frame.io/platform/v2/api-reference/custom-actions/get-action This PHP example utilizes the Guzzle HTTP client to fetch action details. It requires the Guzzle library to be installed via Composer. ```php request('GET', 'https://api.frame.io/v2/actions/action_id', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ``` -------------------------------- ### Show Custom Action (PHP) Source: https://next.developer.frame.io/platform/api-reference/custom-actions/actions-show This PHP example uses Guzzle HTTP client to make a GET request for a custom action. Ensure you have Guzzle installed via Composer. ```php request('GET', 'https://api.frame.io/v4/accounts/71f8fd11-f43b-4823-8d42-f9f4245ada90/actions/3d74e827-d7aa-4e6a-8355-be22465e3f75', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ``` -------------------------------- ### Go HTTP Client Example Source: https://next.developer.frame.io/platform/v4-experimental/api-reference/project-permissions/project-group-roles-index This Go code demonstrates how to fetch project group roles using the standard `net/http` package. Ensure you replace `` with your valid API token. ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.frame.io/v4/accounts/787fb4d0-c568-4ed3-9688-ed8407b2295e/projects/71a0d63c-dac0-4b0d-ab79-b952ee2eb58c/groups" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("api-version", "experimental") req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` -------------------------------- ### Get Review Link using PHP (Guzzle) Source: https://next.developer.frame.io/platform/v2/api-reference/review-links/review-link-get A PHP example using Guzzle HTTP client to fetch review link data. Ensure you have Guzzle installed via Composer. ```php request('GET', 'https://api.frame.io/v2/review_links/review_link_id', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ?> ``` -------------------------------- ### Create Folder Response Example Source: https://next.developer.frame.io/platform/api-reference/folders/create This is an example of the JSON response received after successfully creating a folder. ```json { "data": { "created_at": "2023-09-25T19:18:29.614189Z", "id": "53667e81-9eb5-4d3e-99bb-f8a80d48c070", "name": "My Folder", "parent_id": "9dd64276-6e26-4351-97b6-ec3e4981ce1a", "project_id": "d3760855-c325-4bcb-ac0b-53a217d654dd", "type": "folder", "updated_at": "2024-02-07T16:44:41.986478Z", "view_url": "https://next.frame.io/project/d5e6011c-2bc9-4596-be05-77d562627112/view/5a89a9fb-0900-4b23-826b-127b90e4db4c", "cover_file_id": "cabb3ad0-cda9-4942-bb94-d1978d43edac", "adobe_id": "urn:aaid:sc:US:a1b2c3d4-e5f6-7890-abcd-ef1234567890" } } ``` -------------------------------- ### Get Project Collaborators using PHP Guzzle Source: https://next.developer.frame.io/platform/v2/api-reference/projects/get-project-collaborators This PHP example uses the Guzzle HTTP client to fetch project collaborators. Make sure you have Guzzle installed via Composer. ```php request('GET', 'https://api.frame.io/v2/projects/project_id/collaborators', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ``` -------------------------------- ### Go HTTP Client Example Source: https://next.developer.frame.io/platform/v2/api-reference/projects/get-projects-by-team Utilize Go's standard HTTP client to fetch project data. Remember to close the response body. ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.frame.io/v2/teams/team_id/projects" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` -------------------------------- ### Create Project using Go HTTP Client Source: https://next.developer.frame.io/platform/v2/api-reference/projects/create-project This Go code snippet shows how to make a POST request to create a project using the standard net/http package. It includes setting headers and the request body. ```go package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.frame.io/v2/teams/team_id/projects" payload := strings.NewReader("{}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` -------------------------------- ### PHP: Get File Details with Guzzle Source: https://next.developer.frame.io/platform/api-reference/files/show This PHP example utilizes the Guzzle HTTP client to retrieve file details. Ensure you have Guzzle installed via Composer and included in your project. ```PHP request('GET', 'https://api.frame.io/v4/accounts/a669562e-1fee-4fb2-b64d-29d27162bb55/files/dab6e90b-a2f8-4b01-8bf6-0791832df47b?include=media_links.original', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ``` -------------------------------- ### Full Search Query Example Source: https://next.developer.frame.io/platform/v2/search-for-assets This example demonstrates a comprehensive search query including account ID, a search term, sorting preference, and multiple filters for project ID, upload date range, and asset label. ```json { "account_id": "", "q": "moon", "sort": "name", "filter": { "inserted_at": [ { "op": "gte", "value": "2020-04-01T04:00:00.000Z" }, { "op": "lte", "value": "2020-04-30T03:59:59.999Z" } ], "project_id": { "op": "eq", "value": "" }, "label": { "op": "eq", "value": "approved" } }, "page_size": 10, "page": 1 } ``` -------------------------------- ### Get Shared Projects (PHP) Source: https://next.developer.frame.io/platform/v2/api-reference/users/get-shared-projects This PHP example uses the Guzzle HTTP client to retrieve shared projects. Make sure you have Guzzle installed via Composer and replace '' with your API token. ```php request('GET', 'https://api.frame.io/v2/projects/shared', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ?> ``` -------------------------------- ### Search Assets with Go SDK Source: https://next.developer.frame.io/platform/v2/api-reference/assets/asset-search-post This Go code example illustrates how to perform an asset search using the `net/http` package. It constructs the request, sets headers, and prints the response body. ```go package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.frame.io/v2/search/assets" payload := strings.NewReader("{}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` -------------------------------- ### Get Account Audit Logs (PHP) Source: https://next.developer.frame.io/platform/v2/api-reference/audit-logs/get-account-audit-logs This PHP example utilizes Guzzle HTTP client to fetch audit logs. Ensure you have Guzzle installed via Composer and replace '' with your API key. ```php request('GET', 'https://api.frame.io/v2/accounts/account_id/events', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ``` -------------------------------- ### Get Account Membership (PHP) Source: https://next.developer.frame.io/platform/v2/api-reference/accounts/get-account-membership This PHP example uses the Guzzle HTTP client to fetch account membership details. Make sure you have Guzzle installed via Composer. Replace '' with your API token. ```php request('GET', 'https://api.frame.io/v2/accounts/account_id/membership', [ 'body' => '{}', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ?> ``` -------------------------------- ### Show Folder using Python SDK Source: https://next.developer.frame.io/platform/v4/api-reference/folders/show Initialize the Frameio client with your token and call the folders.show method with the account and folder IDs. ```python from frameio import Frameio client = Frameio( token="YOUR_TOKEN_HERE", ) client.folders.show( account_id="94f4012b-5205-41e6-8d33-254077b64d1a", folder_id="3f7021a6-5a54-4893-a348-6c53b6764bd4", ) ``` -------------------------------- ### Get Assets API Response Example Source: https://next.developer.frame.io/platform/v2/api-reference/assets/get-assets This is an example of a successful response from the Get Assets API, detailing a single asset. ```json [ { "account_id": "a3f1c2d4-5678-4e9b-9f12-3456789abcde", "archive_from": "2024-01-15T09:30:00Z", "archive_scheduled_at": "2024-01-20T09:30:00Z", "archive_status": "scheduled", "archived_at": "2024-01-25T09:30:00Z", "asset_type": "document", "bundle": false, "bundle_view": "grid", "cover_asset_id": "b7e9f8d2-1234-4a56-8cde-9876543210ab", "creator": { "digest_frequency": "weekly", "image_32": "https://cdn.frame.io/images/users/32/user123.png", "image_128": "https://cdn.frame.io/images/users/128/user123.png", "from_google": false, "mfa_enforced_at": "2023-11-01T12:00:00Z", "email": "jane.doe@example.com", "name": "Jane Doe", "image_64": "https://cdn.frame.io/images/users/64/user123.png", "timezone_value": "America/Los_Angeles", "account_id": "a3f1c2d4-5678-4e9b-9f12-3456789abcde", "updated_at": "2024-04-10T15:45:00Z", "image_256": "https://cdn.frame.io/images/users/256/user123.png", "_type": "user", "user_hash": "hash_abc123xyz", "upload_url": "https://upload.frame.io/user123", "profile_image": "https://cdn.frame.io/images/users/profile/user123.png", "first_login_at": "2022-05-20T08:00:00Z", "joined_via": "email_invite", "id": "user-1234-5678-9012-3456", "next_digest_date": "2024-04-17T08:00:00Z", "last_seen": "2024-04-15T18:30:00Z", "inserted_at": "2022-05-20T08:00:00Z", "from_adobe": false, "avatar_color": "#4A90E2", "highest_account_role": "admin", "integrations": [ "slack", "dropbox" ], "roles": { "admin": true, "id": "role-001", "sales": false, "support": true, "service_desk": false }, "user_default_color": "#FF5733" }, "frames": 2400, "hard_deleted_at": null, "id": "c9d8e7f6-1234-4b56-8cde-1234567890ab", "index": 2.5, "is_bundle_child": false, "is_hls_required": true, "is_session_watermarked": false, "item_count": 12, "label": "in_progress", "metadata": { "camera": "RED Komodo", "location": "Los Angeles Studio" }, "metadata_flags": { "id": "meta-1234-5678-9012-3456", "is_360": false, "is_hdr": true, "is_original_player_compatible": true }, "name": "Project_Script_v2.pdf", "original": "https://cdn.frame.io/originals/c9d8e7f6-1234-4b56-8cde-1234567890ab.pdf", "parent_asset_id": "eefb57e0-79f2-4bc7-9b70-99fbc175175c", "project_id": "proj-9876-5432-10ab-cdef", "properties": { "scene": "5", "take": "3" }, "required_transcodes": { "cover": false, "finalized": [ "thumb", "h264_720", "image_high" ], "h264_1080_best": false, "h264_2160": false, "h264_360": true, "h264_540": false, "h264_720": true, "image_full": true, "image_high": true, "page_proxy": false, "thumb": true, "thumb_540": false, "thumb_orig_ar_540": false, "thumb_scrub": true }, "team_id": "team-4567-8901-2345-6789", "user_permissions": { "can_download": true, "can_modify_template": false, "can_public_share_presentation": true, "can_public_share_review_link": true, "can_share_downloadable_presentation": false, "can_share_downloadable_review_link": true, "can_share_unwatermarked_presentation": false, "can_share_unwatermarked_review_link": true }, "type": "file", "view_count": 152 } ] ``` -------------------------------- ### List Invited Projects with Swift Source: https://next.developer.frame.io/platform/v4-experimental/api-reference/projects/invited-projects-index An example using Swift's Foundation framework to make an asynchronous GET request for invited projects. It sets up the URL, headers, and handles the response. ```swift import Foundation let headers = [ "api-version": "experimental", "Authorization": "Bearer " ] let request = NSMutableURLRequest(url: NSURL(string: "https://api.frame.io/v4/accounts/b611dab7-a6cc-4333-85b6-b81efb6eef4e/invited_projects")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` -------------------------------- ### Show Version Stack (Go) Source: https://next.developer.frame.io/platform/api-reference/version-stacks/show This Go example demonstrates making a direct HTTP GET request to the Frame.io API to retrieve a version stack. Ensure to replace `` with your actual API token. ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.frame.io/v4/accounts/92ad3b28-ec54-41f4-813b-3d5fc7f47cf6/version_stacks/1f911630-5db3-48d4-8ec6-226e8d4a7a1d?include=media_links.original" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` -------------------------------- ### Show Webhook Details (PHP) Source: https://next.developer.frame.io/platform/api-reference/webhooks/show Fetch webhook details via a GET request using Guzzle HTTP client. Set the Authorization header with your Bearer token. This example assumes you have Guzzle installed via Composer. ```php request('GET', 'https://api.frame.io/v4/accounts/11427f5d-3e6c-4bfb-ac31-27c3539e58c5/webhooks/17bdc071-4add-4b81-ab3e-e7724c612b95', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ``` -------------------------------- ### PHP Guzzle HTTP Client: Get Team Actions Source: https://next.developer.frame.io/platform/v2/api-reference/custom-actions/get-actions-by-team This PHP example uses the Guzzle HTTP client to fetch team actions. It requires the Guzzle library to be installed via Composer. Substitute '' with your API key. ```php request('GET', 'https://api.frame.io/v2/teams/team_id/actions', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ?> ``` -------------------------------- ### Create File with HTTP POST (Go) Source: https://next.developer.frame.io/platform/api-reference/files/create Directly create a file using an HTTP POST request in Go. This example shows how to set up the request with the correct URL, headers, and JSON payload. ```go package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.frame.io/v4/accounts/2e3edf28-8baf-420d-8e9e-e4202af3e31d/folders/8447d082-efc1-4faf-8ac1-8e94906b5446/files" payload := strings.NewReader("{\n \"data\": {\n \"file_size\": 1137444,\n \"media_type\": \"image/png\",\n \"name\": \"asset.png\"\n }\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` -------------------------------- ### Get Comments for an Asset Source: https://next.developer.frame.io/platform/v2/api-reference/comments/get-comments This example demonstrates how to retrieve comments for a specific asset using the Frame.io API. It shows the HTTP GET request and provides examples in various SDKs. ```APIDOC ## GET /v2/assets/{asset_id}/comments ### Description Retrieves a list of comments for a specific asset. ### Method GET ### Endpoint /v2/assets/{asset_id}/comments ### Parameters #### Path Parameters - **asset_id** (string) - Required - The ID of the asset to retrieve comments for. ### Response #### Success Response (200) - **annotation** (string) - Description of the annotation. - **completed** (boolean) - Indicates if the comment is completed. - **completed_at** (string) - The timestamp when the comment was completed. - **completer_id** (string) - The ID of the user who completed the comment. - **has_replies** (boolean) - Indicates if the comment has replies. - **id** (string) - The unique identifier for the comment. - **like_count** (integer) - The number of likes the comment has received. - **owner** (object) - Information about the comment owner. - **email** (string) - The email address of the owner. - **name** (string) - The name of the owner. - **account_id** (string) - The ID of the owner's account. - **id** (string) - The unique identifier for the owner. - **owner_id** (string) - The ID of the comment owner. - **text** (string) - The content of the comment. - **timestamp** (integer) - The timestamp associated with the comment. #### Response Example ```json [ { "annotation": "[...]", "completed": false, "completed_at": "2020-07-15T17:30:00.906305Z", "completer_id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", "has_replies": true, "id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", "like_count": 10, "owner": { "email": "jane@frame.io", "name": "Jane Doe", "account_id": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb", "id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa" }, "owner_id": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb", "text": "This is a comment.", "timestamp": 60 } ] ``` ``` -------------------------------- ### Get Projects List (Go) Source: https://next.developer.frame.io/platform/v4-experimental/api-reference/projects/index Retrieve a list of projects using Go's standard HTTP client. This example shows how to construct the request, set headers, and read the response body. ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.frame.io/v4/accounts/40c9a0b9-d557-4577-8f41-4d422d179460/workspaces/e78e9d90-e010-4cc3-a2c0-632f2425a9ca/projects" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("api-version", "experimental") req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` -------------------------------- ### Get Assets API - Ruby SDK Setup Source: https://next.developer.frame.io/platform/v2/api-reference/assets/get-assets This Ruby snippet initializes the Net::HTTP client for making requests to the Get Assets API. You will need to complete the request setup and execution. ```ruby require 'uri' require 'net/http' url = URI("https://api.frame.io/v2/assets/asset_id/children") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true ``` -------------------------------- ### Go HTTP Client Search Example Source: https://next.developer.frame.io/platform/v4-experimental/api-reference/search/search Execute a search query using Go's standard HTTP client. ```go package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.frame.io/v4/accounts/d1d19513-8cc4-4b00-8f1f-1fcd19da293d/search" payload := strings.NewReader("{\n \"engine\": \"nlp\",\n \"query\": \"red car driving on highway\",\n \"filters\": {\n \"files_and_version_stacks\": true,\n \"folders\": false,\n \"projects\": false\n }\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("api-version", "experimental") req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` -------------------------------- ### Get Subtitles API Response Example Source: https://next.developer.frame.io/platform/v2/api-reference/assets/get-subtitles This is an example of the JSON response structure when successfully retrieving subtitle tracks. ```json { "_type": "asset_subtitle", "id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", "subtitle_tracks": [ "https://frameio-app.com/subtitle_track/3gsa-3456aa", "https://frameio-app.com/subtitle_track/fms2-amfng4" ] } ``` -------------------------------- ### Create a Project Source: https://next.developer.frame.io/platform/docs/sdk-reference/python-sdk-reference Create a new project within a specific workspace using the `projects.create` method. Ensure you have your authentication token and the correct account and workspace IDs. ```python from frameio import Frameio from frameio.projects import ProjectParamsData client = Frameio( token="YOUR_TOKEN", ) client.projects.create( account_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", workspace_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", data=ProjectParamsData( name="Project Name", restricted=True, ), ) ``` -------------------------------- ### Get Projects List (Ruby) Source: https://next.developer.frame.io/platform/v4-experimental/api-reference/projects/index Fetch projects using Ruby's Net::HTTP library. This example demonstrates setting up the URI, HTTP client, request headers, and handling the response. ```ruby require 'uri' require 'net/http' url = URI("https://api.frame.io/v4/accounts/40c9a0b9-d557-4577-8f41-4d422d179460/workspaces/e78e9d90-e010-4cc3-a2c0-632f2425a9ca/projects") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["api-version"] = 'experimental' request["Authorization"] = 'Bearer ' response = http.request(request) puts response.read_body ```