UNPKG

openapi-directory

Version:

Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS

1 lines 45.2 kB
{"openapi":"3.0.1","servers":[{"description":"V1 API server","url":"https://api.contentgroove.com/api/v1"}],"info":{"description":"# Overview\n\nThe ContentGroove Developer API enables you to add the power of ContentGroove's video AI to your own applications and workflows.\n\nWebhooks are a way for ContentGroove to send video information\nto your application, to update your system and/or trigger other business processes.\n\nYou can use Webhooks and the Developer API separately or together.\n\n# Getting Started with Webhooks\n\n- Sign up for an account at [app.contentgroove.com](https://app.contentgroove.com)\n- Read \"Using Webhooks\" on the [API Reference page](https://developers.contentgroove.com/api_reference)\n- Visit the [Webhooks page](https://app.contentgroove.com/webhook_subscriptions) and create a new webhook\n\n# Using Webhooks\n\nWebhooks, also known as callbacks, are a way for ContentGroove to notify your application as soon as possible after an event has occurred in ContentGroove.\nFor example after a media completes processing, ContentGroove can use a webhook to notify your application with information about the video: Suggested clips, transcription, and so on.\nYou can use the information sent to update your system and/or use the\nwebhook to trigger other business processes.\n\nThe webhook request is sent as an HTTP POST containing a payload of JSON-formatted data.\nFor the details of the payload format see the \"CALLBACKS\" sections below.\n\nWhen your application receives the webhook request, it must respond with\na 200 HTTP status code (success).\nIf a 200 HTTP status code is not returned,\nContentGroove will assume that the webhook was not delivered and\nwill retry a limited number of times, using an exponential backoff algorithm.\n\nContentGroove makes a best effort to attempt to send the webhook at\nleast once.\nApplications receiving webhooks must tolerate the\npossibility of a single webhook payload being sent more than once\n(idempotent behavior).\nApplications receiving webhooks should tolerate the possibility that\na webhook could not be delivered\n(for example your application was down when delivery was attempted).\n\n# Getting Started with the Developer API\n\n- Sign up for an account at [app.contentgroove.com](https://app.contentgroove.com)\n- Visit the [API Keys page](https://app.contentgroove.com/api_keys)\n - Create a new API Key then copy and save the value.\n > ⚠️ **IMPORTANT**: This API Key is intended only for use on the server side. Be sure never to use a server-side API Key in client-side (web, mobile, or otherwise) code. ⚠️\n- View all available endpoints, and try the API, on our [API Reference page](https://developers.contentgroove.com/api_reference)\n\n# Using the Developer API\n\n- Create a new media (video or audio) in ContentGroove\n - If the video or audio is available from a URL, you can create a media by providing the `source_url` parameter. ContentGroove will fetch the video or audio from the URL if possible.\n - Or, you can create a media from a video or audio file which you upload directly to ContentGroove (see File Uploading section below).\n- After the new media is created, at first it will be in a \"processing\" state.\n Depending on the size and duration of the video or audio file, it will take some time for processing to complete.\n - You can use ContentGroove Webhooks to be notified immediately when processing has completed. (Details coming soon.)\n - You can also use the API to read the state of the media, to determine if the media has completed processing yet.\n- After the media has completed processing, you can access all of these details about the media:\n - The media name and description\n - The transcription of spoken words\n - Topics and keywords which were discussed in the transcription\n - Suggested video clips are automatically created\n- In addition to the automatically created video clips, you can create more video clips from the media\n\n# Response Codes\n\nThe following is a comprehensive list of the status codes you may receive while using the ContentGroove API:\n\n- 200 \"Ok\"\n - The request was valid\n- 400 \"Bad Request\n - This is returned when there was a problem parsing the JSON body of your request if you supplied the 'Content-Type': 'application/json' header, or if your request is missing the 'Content-Type' header altogether\n- 401 \"Unauthorized\"\n - This is returned when you are attempting to perform an action on a resource that you are not authorized to do\n- 402 \"Payment Required\"\n - This is returned when you are attempting to perform an action that would push your account above a usage limit. You can view your usage at: https://app.contentgroove.com/quota_usage\n- 404 \"Not Found\"\n - This is returned when the resource you are trying to view does not exist\n- 429 \"Too Many Requests\"\n - This is returned when you have performed too many requests within a given period of time\n- 500 \"Internal Server Error\"\n - This is returned when your request was valid but there was a problem on our end\n\n# File Uploading\n\n- Step 1: Make a GET request to the direct uploads URL endpoint (/api/v1/direct_uploads) to receive an upload URL to upload the file to and an upload id.\n- Step 2: Make a PUT request with the file as the body to the upload URL received in step 1. The response will have a 200 status with no body if the upload is successful.\n ```\n curl -T /path/to/file upload_url\n ```\n- Step 3: After uploading the file to the upload URL, make a POST request to the create medias endpoint (/api/v1/medias), with the upload id and optionally a name and description for the new media.\n > At this time, file uploads are limited to 5gb per file.\n\n# Allowed media types\n\nVideo:\n\n- Supported: Most common video formats and codecs are supported.\n- Recommended: mp4\n\nAudio:\n\n- Supported: aac, mp3, flac, ogg, wav, and wma\n- Recommended: aac\n\n# Authentication\n\nYou can use the API Key to authenticate your API requests using any of these methods. (Replace abc123 with your actual API Key.)\n\n- Request header `Authorization: Bearer abc123`\n- Request header `X-API-KEY: abc123`\n- Query parameter `api_key=abc123`\n > ⚠️ **IMPORTANT**: This API Key is intended only for use on the server side. Be sure never to use a server-side API Key in client-side (web, mobile, or otherwise) code. ⚠️\n\n# Link to openapi.json spec\n\n- https://api.contentgroove.com/api-docs/v1/openapi.json\n","title":"ContentGroove API","version":"1.0.0","x-logo":{"url":"https://contentgroove.com/wp-content/uploads/2022/04/CG-Square-300x300.png"},"x-origin":[{"format":"openapi","url":"https://api.contentgroove.com/api-docs/v1/openapi.json","version":"3.0"}],"x-providerName":"contentgroove.com"},"paths":{"/clips":{"get":{"operationId":"getClips","parameters":[{"description":"Filters to be applied to the query.\n\nQuery params in the url must look like this: \"filter[attributeName_*matcher*]\"\n\n(i.e. filter[name_eq]=chimp%20into%20space)\n\nAvailable matchers can be found here: https://activerecord-hackery.github.io/ransack/getting-started/search-matches/\n\n","example":"{\n \"filter[name_eq]\": \"john h. glenn, kindly air force base hospital\",\n \"filter[text_start]\": \"He landed in the sea\"\n}","explode":true,"in":"query","name":"filter","required":false,"schema":{"type":"object"},"style":"deepObject"},{"description":"Specify page number and page size for the query","example":"{\n \"page[number]\": 1,\n \"page[size]\": 5\n}","explode":true,"in":"query","name":"page","required":false,"schema":{"type":"object"},"style":"deepObject"},{"description":"Sorting to be applied to the query. For more info: https://jsonapi.org/format/#fetching-sorting","in":"query","name":"sort","required":false,"schema":{"enum":["created_at","-created_at","original_created_at","-original_created_at","name","-name"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":[{"attributes":{"created_at":"2025-06-15T13:47:52.290Z","end_char":0,"end_time":2,"external_id":"150","is_processing":true,"media_file_content_type":null,"media_file_duration":null,"media_file_height":null,"media_file_preview_image_url":null,"media_file_url":null,"media_file_width":null,"name":"Example Clip","processing_started_at":"2025-06-15T13:47:52.290Z","rank":null,"start_char":0,"start_time":1,"text":null},"id":"32caa472-6a12-4a77-974a-52d1175502ab","relationships":{"media":{"data":{"id":"dde75ca2-77ad-4dfa-b4f0-61ccff99a296","type":"medias"}}},"type":"clips"}],"links":{"current":"http://api.contentgroove.com/api/v1/clips?page[number]=1","self":"http://api.contentgroove.com/api/v1/clips"}},"schema":{"$ref":"#/components/schemas/clips_response_object"}}},"description":"successful"},"401":{"content":{"application/json":{"example":{"errors":[{"message":"You need to sign in or sign up before continuing."}]},"schema":{"$ref":"#/components/schemas/unauthorized_error_response_object"}}},"description":"unauthorized"},"429":{"content":{"application/json":{"example":{"errors":[{"detail":"You have exceeded the maximum number of requests in the current window. Please try again later.","status":"429","title":"Too Many Requests"}]},"schema":{"$ref":"#/components/schemas/too_many_requests_error_response_object"}}},"description":"too many requests"}},"security":[{"BearerHeader":[]}],"summary":"list clips"},"post":{"operationId":"createClip","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"attributes":{"properties":{"end_time":{"example":12.3,"type":"number"},"media_id":{"example":"9b9a2e82-5b47-4f59-831d-4c239824b983","type":"string"},"name":{"example":"Example New Clip","type":"string"},"start_time":{"example":10.1,"type":"number"}},"required":["name","media_id","start_time","end_time"],"type":"object"}},"required":["attributes"],"type":"object"}},"required":["data"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{"attributes":{"created_at":"2025-06-15T13:47:52.290Z","end_char":0,"end_time":2,"external_id":null,"is_processing":null,"media_file_content_type":null,"media_file_duration":null,"media_file_height":null,"media_file_preview_image_url":null,"media_file_url":null,"media_file_width":null,"name":"Example New Clip","processing_started_at":"2025-06-15T13:47:52.290Z","rank":null,"start_char":0,"start_time":1,"text":null},"id":"a5d24ac9-86bc-46a9-b188-6dfff81c838c","relationships":{"media":{"data":{"id":"dde75ca2-77ad-4dfa-b4f0-61ccff99a296","type":"medias"}}},"type":"clips"},"links":{"self":"http://api.contentgroove.com/api/v1/clips"}},"schema":{"$ref":"#/components/schemas/clip_response_object"}}},"description":"successful"},"401":{"content":{"application/json":{"example":{"errors":[{"message":"You need to sign in or sign up before continuing."}]},"schema":{"$ref":"#/components/schemas/unauthorized_error_response_object"}}},"description":"unauthorized"},"402":{"content":{"application/json":{"example":{"errors":[{"code":"exceeded_quota_count","detail":"You have exceeded the monthly quota for number of clips. Please visit the Settings / Quota Usage page to see your usage and manage your account.","source":{"pointer":""},"status":"422","title":"Unprocessable Entity"}]},"schema":{"$ref":"#/components/schemas/payment_required_error_response_object"}}},"description":"payment required"},"429":{"content":{"application/json":{"example":{"errors":[{"detail":"You have exceeded the maximum number of requests in the current window. Please try again later.","status":"429","title":"Too Many Requests"}]},"schema":{"$ref":"#/components/schemas/too_many_requests_error_response_object"}}},"description":"too many requests"}},"security":[{"BearerHeader":[]}],"summary":"create clip"}},"/clips/{id}":{"delete":{"operationId":"deleteClipById","responses":{"204":{"description":"no content"},"401":{"content":{"application/json":{"example":{"errors":[{"message":"You need to sign in or sign up before continuing."}]}}},"description":"not authorized"},"404":{"content":{"application/json":{"example":{"errors":[{"detail":null,"source":null,"status":"404","title":"Not Found"}]}}},"description":"not found"},"429":{"content":{"application/json":{"example":{"errors":[{"detail":"You have exceeded the maximum number of requests in the current window. Please try again later.","status":"429","title":"Too Many Requests"}]}}},"description":"too many requests"}},"security":[{"BearerHeader":[]}],"summary":"delete clip"},"get":{"operationId":"getClipById","responses":{"200":{"content":{"application/json":{"example":{"data":{"attributes":{"created_at":"2025-06-15T13:47:52.290Z","end_char":0,"end_time":2,"external_id":"155","is_processing":true,"media_file_content_type":null,"media_file_duration":null,"media_file_height":null,"media_file_preview_image_url":null,"media_file_url":null,"media_file_width":null,"name":"Example Clip","processing_started_at":"2025-06-15T13:47:52.290Z","rank":null,"start_char":0,"start_time":1,"text":null},"id":"32caa472-6a12-4a77-974a-52d1175502ab","relationships":{"media":{"data":{"id":"dde75ca2-77ad-4dfa-b4f0-61ccff99a296","type":"medias"}}},"type":"clips"},"links":{"self":"http://api.contentgroove.com/api/v1/clips/32caa472-6a12-4a77-974a-52d1175502ab"}},"schema":{"$ref":"#/components/schemas/clip_response_object"}}},"description":"successful"},"401":{"content":{"application/json":{"example":{"errors":[{"message":"You need to sign in or sign up before continuing."}]}}},"description":"not authorized"},"404":{"content":{"application/json":{"example":{"errors":[{"detail":null,"source":null,"status":"404","title":"Not Found"}]}}},"description":"not found"},"429":{"content":{"application/json":{"example":{"errors":[{"detail":"You have exceeded the maximum number of requests in the current window. Please try again later.","status":"429","title":"Too Many Requests"}]},"schema":{"$ref":"#/components/schemas/too_many_requests_error_response_object"}}},"description":"too many requests"}},"security":[{"BearerHeader":[]}],"summary":"show clip"},"parameters":[{"description":"The id of the clip to be retrieved","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"put":{"operationId":"updateClipById","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"attributes":{"properties":{"end_time":{"example":12.3,"type":"number"},"name":{"example":"Example Clip","type":"string"},"start_time":{"example":10.1,"type":"number"}},"type":"object"}},"required":["attributes"],"type":"object"}},"required":["data"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{"attributes":{"created_at":"2025-06-15T13:47:52.291Z","end_char":0,"end_time":2,"external_id":"158","is_processing":true,"media_file_content_type":null,"media_file_duration":null,"media_file_height":null,"media_file_preview_image_url":null,"media_file_url":null,"media_file_width":null,"name":"Example Clip","processing_started_at":"2025-06-15T13:47:52.291Z","rank":null,"start_char":0,"start_time":1,"text":null},"id":"32caa472-6a12-4a77-974a-52d1175502ab","relationships":{"media":{"data":{"id":"dde75ca2-77ad-4dfa-b4f0-61ccff99a296","type":"medias"}}},"type":"clips"},"links":{"self":"http://api.contentgroove.com/api/v1/clips/32caa472-6a12-4a77-974a-52d1175502ab"}},"schema":{"$ref":"#/components/schemas/clip_response_object"}}},"description":"successful"},"401":{"content":{"application/json":{"example":{"errors":[{"message":"You need to sign in or sign up before continuing."}]}}},"description":"not authorized"},"429":{"content":{"application/json":{"example":{"errors":[{"detail":"You have exceeded the maximum number of requests in the current window. Please try again later.","status":"429","title":"Too Many Requests"}]},"schema":{"$ref":"#/components/schemas/too_many_requests_error_response_object"}}},"description":"too many requests"}},"security":[{"BearerHeader":[]}],"summary":"update clip"}},"/direct_uploads":{"get":{"operationId":"getUploadUrl","responses":{"200":{"content":{"application/json":{"example":{"data":{"attributes":{"upload_id":"eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaEpJaWszTVdWbFlXSTBNaTFqTWpsaUxUUm1NVFF0WVRBMVl5MWpOelprWkRnd1l6TTVZamNHT2daRlZBPT0iLCJleHAiOm51bGwsInB1ciI6ImJsb2JfaWQifX0=--0bc2a83b08eb0217bc7f0497302496329cf69ede","upload_url":"(example URL for documentation only) https://file-uploads.contentgroove.com/vmf93z4328ioirtd6f5yb2nwbnq4d0ps?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAZ44FA4RJICA5SPPQ%2F20220919%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220919T165555Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host-content-type&X-Amz-Signature=df840423555070b29264382599459f1497ba2bd5e10e6a6dd41a29ebe239a8e0ecf"},"id":"71eeab42-c29b-4f14-a05c-c76dd80c39b7","type":"direct_upload_blobs"}},"schema":{"$ref":"#/components/schemas/direct_upload_response_object"}}},"description":"successful"},"401":{"content":{"application/json":{"example":{"errors":[{"message":"You need to sign in or sign up before continuing."}]}}},"description":"unauthorized"},"429":{"content":{"application/json":{"example":{"errors":[{"detail":"You have exceeded the maximum number of requests in the current window. Please try again later.","status":"429","title":"Too Many Requests"}]},"schema":{"$ref":"#/components/schemas/too_many_requests_error_response_object"}}},"description":"too many requests"}},"security":[{"BearerHeader":[]}],"summary":"prepare presigned upload url"}},"/medias":{"get":{"operationId":"getMedias","parameters":[{"description":"Filters to be applied to the query.\n\nQuery params in the url must look like this: \"filter[attributeName_*matcher*]\"\n\n(i.e. filter[name_eq]=chimp%20into%20space)\n\nAvailable matchers can be found here: https://activerecord-hackery.github.io/ransack/getting-started/search-matches/\n\n","example":"{\n \"filter[name_eq]\": \"chimp into space\",\n \"filter[sourceUrl_start]\": \"https://archive.org\"\n}","explode":true,"in":"query","name":"filter","required":false,"schema":{"type":"object"},"style":"deepObject"},{"description":"Specify page number and page size for the query","example":"{\n \"page[number]\": 1,\n \"page[size]\": 5\n}","explode":true,"in":"query","name":"page","required":false,"schema":{"type":"object"},"style":"deepObject"},{"description":"Sorting to be applied to the query. For more info: https://jsonapi.org/format/#fetching-sorting","in":"query","name":"sort","required":false,"schema":{"enum":["created_at","-created_at","original_created_at","-original_created_at","name","-name"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":[{"attributes":{"created_at":"2025-06-15T13:47:52.291Z","description":"Enos was the second chimpanzee launched into space by NASA. He was the first and only chimpanzee, and third hominid after cosmonauts Yuri Gagarin and Gherman Titov, to achieve Earth orbit. Enos's flight occurred on November 29, 1961. https://en.wikipedia.org/wiki/Enos_(chimpanzee)","external_id":"468","has_fetch_error":false,"is_processing":true,"name":"Chimp Into Space","original_created_at":"2025-06-15T13:47:52.291Z","processing_started_at":"2025-06-15T13:47:52.291Z","source_created_at":null,"source_file_content_type":null,"source_file_duration":null,"source_file_height":null,"source_file_preview_image_url":null,"source_file_width":null,"source_url":"https://archive.org/download/SF143/SF143_512kb.mp4"},"id":"f98fae60-8086-41d5-8966-36698bf13de0","relationships":{"clips":{"data":[]}},"type":"medias"}],"links":{"current":"http://api.contentgroove.com/api/v1/medias?page[number]=1","self":"http://api.contentgroove.com/api/v1/medias"}},"schema":{"$ref":"#/components/schemas/medias_response_object"}}},"description":"successful"},"401":{"content":{"application/json":{"example":{"errors":[{"message":"You need to sign in or sign up before continuing."}]}}},"description":"unauthorized"},"429":{"content":{"application/json":{"example":{"errors":[{"detail":"You have exceeded the maximum number of requests in the current window. Please try again later.","status":"429","title":"Too Many Requests"}]},"schema":{"$ref":"#/components/schemas/too_many_requests_error_response_object"}}},"description":"too many requests"}},"security":[{"BearerHeader":[]}],"summary":"list medias"},"post":{"callbacks":{"media.processing_finished":{"Provided URL in /webhook_subscriptions":{"post":{"requestBody":{"content":{"application/json":{"schema":{"properties":{"event":{"example":"media.processing_finished","type":"string"},"payload":{"properties":{"data":{"properties":{"attributes":{"properties":{"created_at":{"example":"2025-06-15T13:47:52.291Z","type":"string"},"description":{"example":"Enos was the second chimpanzee launched into space by NASA. He was the first and only chimpanzee, and third hominid after cosmonauts Yuri Gagarin and Gherman Titov, to achieve Earth orbit. Enos's flight occurred on November 29, 1961. More details: https://en.wikipedia.org/wiki/Enos_(chimpanzee)","type":"string"},"external_id":{"example":"1","type":"string"},"has_fetch_error":{"example":false,"type":"boolean"},"is_processing":{"example":false,"type":"boolean"},"name":{"example":"Chimp Into Space","type":"string"},"original_created_at":{"example":"2025-06-15T13:47:52.291Z","type":"string"},"processing_started_at":{"example":"2025-06-15T13:47:52.291Z","type":"string"},"source_created_at":{"example":"2025-06-15T13:47:52.291Z","type":"string"},"source_file_content_type":{"example":"video/mp4","type":"string"},"source_file_duration":{"example":"98.865532","type":"number"},"source_file_height":{"example":280,"type":"number"},"source_file_preview_image_url":{"example":"https://www.example.com/path-to-image","type":"string"},"source_file_width":{"example":320,"type":"number"},"source_url":{"example":"https://archive.org/download/SF143/SF143_512kb.mp4","type":"string"}},"type":"object"},"id":{"example":"9b9a2e82-5b47-4f59-831d-4c239824b983","type":"string"},"relationships":{"properties":{"clips":{"properties":{"data":{"items":{"properties":{"id":{"example":"9b9a2e82-5b47-4f59-831d-4c239824b983","type":"string"},"type":{"example":"clips","type":"string"}}},"type":"array"}},"type":"object"}},"type":"object"},"transcription":{"properties":{"data":{"properties":{"id":{"example":"9b9a2e82-5b47-4f59-831d-4c239824b983","type":"string"},"type":{"example":"transcriptions","type":"string"}},"type":"object"}},"type":"object"},"type":{"example":"medias","type":"string"}},"type":"object"},"included":{"items":{"oneOf":[{"properties":{"attributes":{"properties":{"created_at":{"example":"2025-06-15T13:47:52.291Z","type":"string"},"end_char":{"example":1303,"type":"string"},"end_time":{"example":"96.63","type":"number"},"external_id":{"example":"1","type":"string"},"media_file_content_type":{"example":"video/mp4","type":"string"},"media_file_duration":{"example":38.938939,"type":"number"},"media_file_height":{"example":240,"type":"number"},"media_file_preview_image_url":{"example":"https://www.example.com/path-to-image","type":"string"},"media_file_url":{"example":"https://www.example.com/path-to-video","type":"string"},"media_file_width":{"example":320,"type":"number"},"name":{"example":"john h. glenn, kindly air force base hospital","type":"string"},"rank":{"example":0,"type":"integer"},"start_char":{"example":737,"type":"integer"},"start_time":{"example":"57.71","type":"number"},"text":{"example":"He landed in the sea south of Bermuda and has brought to the islands for quick medical checks before he is taken back to Cape Canaveral for a thorough examination. Scientists are related at the condition of both chimp and capsule. They came through the test in a manner that brings a man flight closer to reality for the U. S. Space team at Kindly Air Force Base Hospital, Enos appears sound, if not happy to examining doctors. He performed his task well, not missing a trick in the complex series of work assignments next in orbit, Lieutenant Colonel John H. Glenn.","type":"string"}},"type":"object"},"id":{"example":"9b9a2e82-5b47-4f59-831d-4c239824b983","type":"string"},"relationships":{"properties":{"media":{"properties":{"data":{"properties":{"id":{"example":"9b9a2e82-5b47-4f59-831d-4c239824b983","type":"string"},"type":{"example":"medias","type":"string"}},"type":"object"}},"type":"object"}},"type":"object"},"type":{"example":"clips","type":"string"}}},{"properties":{"attributes":{"properties":{"text":{"example":"He landed in the sea south of Bermuda and has brought to the islands for quick medical checks before he is taken back to Cape Canaveral for a thorough examination. Scientists are related at the condition of both chimp and capsule. They came through the test in a manner that brings a man flight closer to reality for the U. S. Space team at Kindly Air Force Base Hospital, Enos appears sound, if not happy to examining doctors. He performed his task well, not missing a trick in the complex series of work assignments next in orbit, Lieutenant Colonel John H. Glenn.","type":"string"}},"type":"object"},"id":{"example":"9b9a2e82-5b47-4f59-831d-4c239824b983","type":"string"},"relationships":{"properties":{},"type":"object"},"type":{"example":"transcriptions","type":"string"}}}]},"type":"array"}},"type":"object"}},"type":"object"}}}},"responses":{"200":{"description":"successful"}},"security":[],"summary":"The webhook that is sent after the media is finished processing"}}}},"operationId":"createMedia","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"attributes":{"properties":{"description":{"example":"Video description","type":"string"},"name":{"example":"Video name","type":"string"},"source_url":{"example":"(required if importing a video from a source url) https://archive.org/download/SF143/SF143_512kb.mp4","type":"string"},"upload_id":{"example":"(required if uploading a local file) ey399vjdkdjf0jslcjd0wjc0ujffj3432lo23kk2o22","type":"string"}},"type":"object"}},"required":["attributes"],"type":"object"}},"required":["data"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{"attributes":{"created_at":"2025-06-15T13:47:52.291Z","description":null,"external_id":null,"has_fetch_error":false,"is_processing":null,"name":"","original_created_at":null,"processing_started_at":"2025-06-15T13:47:52.291Z","source_created_at":null,"source_file_content_type":null,"source_file_duration":null,"source_file_height":null,"source_file_preview_image_url":null,"source_file_width":null,"source_url":"https://archive.org/download/SF143/SF143_512kb.mp4"},"id":"654599f2-d989-492b-ba66-19dc722e983c","relationships":{"clips":{"data":[]},"transcription":{"data":null}},"type":"medias"},"links":{"self":"http://api.contentgroove.com/api/v1/medias"}},"schema":{"$ref":"#/components/schemas/media_response_object"}}},"description":"successful"},"401":{"content":{"application/json":{"example":{"errors":[{"message":"You need to sign in or sign up before continuing."}]}}},"description":"unauthorized"},"402":{"content":{"application/json":{"example":{"errors":[{"code":"exceeded_quota_count","detail":"You have exceeded the monthly quota for number of medias. Please visit the Settings / Quota Usage page to see your usage and manage your account.","source":{"pointer":""},"status":"422","title":"Unprocessable Entity"}]}}},"description":"payment required"},"429":{"content":{"application/json":{"example":{"errors":[{"detail":"You have exceeded the maximum number of requests in the current window. Please try again later.","status":"429","title":"Too Many Requests"}]},"schema":{"$ref":"#/components/schemas/too_many_requests_error_response_object"}}},"description":"too many requests"}},"security":[{"BearerHeader":[]}],"summary":"create media"}},"/medias/{id}":{"delete":{"operationId":"deleteMediaById","responses":{"204":{"description":"no content"},"401":{"content":{"application/json":{"example":{"errors":[{"message":"You need to sign in or sign up before continuing."}]}}},"description":"not authorized"},"404":{"content":{"application/json":{"example":{"errors":[{"detail":null,"source":null,"status":"404","title":"Not Found"}]}}},"description":"not found"},"429":{"content":{"application/json":{"example":{"errors":[{"detail":"You have exceeded the maximum number of requests in the current window. Please try again later.","status":"429","title":"Too Many Requests"}]}}},"description":"too many requests"}},"security":[{"BearerHeader":[]}],"summary":"delete media"},"get":{"operationId":"getMediaById","responses":{"200":{"content":{"application/json":{"example":{"data":{"attributes":{"created_at":"2025-06-15T13:47:52.291Z","description":"Enos was the second chimpanzee launched into space by NASA. He was the first and only chimpanzee, and third hominid after cosmonauts Yuri Gagarin and Gherman Titov, to achieve Earth orbit. Enos's flight occurred on November 29, 1961. https://en.wikipedia.org/wiki/Enos_(chimpanzee)","external_id":"474","has_fetch_error":false,"is_processing":true,"name":"Chimp Into Space","original_created_at":"2025-06-15T13:47:52.291Z","processing_started_at":"2025-06-15T13:47:52.291Z","source_created_at":null,"source_file_content_type":null,"source_file_duration":null,"source_file_height":null,"source_file_preview_image_url":null,"source_file_width":null,"source_url":"https://archive.org/download/SF143/SF143_512kb.mp4"},"id":"f98fae60-8086-41d5-8966-36698bf13de0","relationships":{"clips":{"data":[]},"transcription":{"data":null}},"type":"medias"},"links":{"self":"http://api.contentgroove.com/api/v1/medias/f98fae60-8086-41d5-8966-36698bf13de0"}},"schema":{"$ref":"#/components/schemas/media_response_object"}}},"description":"successful"},"401":{"content":{"application/json":{"example":{"errors":[{"message":"You need to sign in or sign up before continuing."}]}}},"description":"not authorized"},"404":{"content":{"application/json":{"example":{"errors":[{"detail":null,"source":null,"status":"404","title":"Not Found"}]}}},"description":"not found"},"429":{"content":{"application/json":{"example":{"errors":[{"detail":"You have exceeded the maximum number of requests in the current window. Please try again later.","status":"429","title":"Too Many Requests"}]},"schema":{"$ref":"#/components/schemas/too_many_requests_error_response_object"}}},"description":"too many requests"}},"security":[{"BearerHeader":[]}],"summary":"show media"},"parameters":[{"description":"id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"put":{"operationId":"updateMediaById","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"attributes":{"properties":{"description":{"example":"Writing by Sam Denby; Research by Sam Denby and Tristan Purdy","type":"string"},"name":{"example":"Why Electric Planes are Inevitably Coming","type":"string"}},"type":"object"}},"required":["attributes"],"type":"object"}},"required":["data"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{"attributes":{"created_at":"2025-06-15T13:47:52.291Z","description":"testdescription","external_id":"477","has_fetch_error":false,"is_processing":true,"name":"Chimp Into Space","original_created_at":"2025-06-15T13:47:52.291Z","processing_started_at":"2025-06-15T13:47:52.291Z","source_created_at":null,"source_file_content_type":null,"source_file_duration":null,"source_file_height":null,"source_file_preview_image_url":null,"source_file_width":null,"source_url":"https://archive.org/download/SF143/SF143_512kb.mp4"},"id":"f98fae60-8086-41d5-8966-36698bf13de0","relationships":{"clips":{"data":[]},"transcription":{"data":null}},"type":"medias"},"links":{"self":"http://api.contentgroove.com/api/v1/medias/f98fae60-8086-41d5-8966-36698bf13de0"}},"schema":{"$ref":"#/components/schemas/media_response_object"}}},"description":"successful"},"401":{"content":{"application/json":{"example":{"errors":[{"message":"You need to sign in or sign up before continuing."}]}}},"description":"not authorized"},"429":{"content":{"application/json":{"example":{"errors":[{"detail":"You have exceeded the maximum number of requests in the current window. Please try again later.","status":"429","title":"Too Many Requests"}]},"schema":{"$ref":"#/components/schemas/too_many_requests_error_response_object"}}},"description":"too many requests"}},"security":[{"BearerHeader":[]}],"summary":"update media"}},"/webhook_subscriptions":{"get":{"operationId":"getWebhookSubscriptions","parameters":[{"description":"Filters to be applied to the query.\n\nQuery params in the url must look like this: \"filter[attributeName_*matcher*]\"\n\n(i.e. filter[name_eq]=chimp%20into%20space)\n\nAvailable matchers can be found here: https://activerecord-hackery.github.io/ransack/getting-started/search-matches/\n\n","example":"{\n \"filter[name_eq]\": \"chimp into space\"\n}","explode":true,"in":"query","name":"filter","required":false,"schema":{"type":"object"},"style":"deepObject"},{"description":"Sorting to be applied to the query. For more info: https://jsonapi.org/format/#fetching-sorting","in":"query","name":"sort","required":false,"schema":{"enum":["created_at","-created_at","original_created_at","-original_created_at","name","-name"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":[{"attributes":{"active":true,"created_at":"2025-06-15T13:47:52.291Z","subscribed_events":["*"],"updated_at":"2025-06-15T13:47:52.291Z","url":"https://webhook.site/cd4ca31b-6d7d-414a-a3e5-a3a3ca42b25e"},"id":"d07aedb6-53fc-4141-b10c-083896e54ce2","relationships":{"user":{"data":{"id":"aea66137-8ee1-4bab-bf5a-5d8a5bb4a7f9","type":"users"}},"webhook_events":{"data":[]}},"type":"webhook_subscriptions"}],"links":{"current":"http://api.contentgroove.com/api/v1/webhook_subscriptions?page[number]=1","self":"http://api.contentgroove.com/api/v1/webhook_subscriptions"}},"schema":{"$ref":"#/components/schemas/webhook_subscriptions_response_object"}}},"description":"successful"},"401":{"content":{"application/json":{"example":{"errors":[{"message":"You need to sign in or sign up before continuing."}]}}},"description":"unauthorized"},"429":{"content":{"application/json":{"example":{"errors":[{"detail":"You have exceeded the maximum number of requests in the current window. Please try again later.","status":"429","title":"Too Many Requests"}]},"schema":{"$ref":"#/components/schemas/too_many_requests_error_response_object"}}},"description":"too many requests"}},"security":[{"BearerHeader":[]}],"summary":"list webhook subscriptions"},"post":{"operationId":"createWebhookSubscription","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"attributes":{"properties":{"subscribed_events":{"items":{"example":"media.processing_finished","type":"string"},"type":"array"},"url":{"example":"https://example.com/contentgroove_webhooks/12345","type":"string"}},"required":["url"],"type":"object"}},"required":["attributes"],"type":"object"}},"required":["data"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{"attributes":{"active":true,"created_at":"2025-06-15T13:47:52.291Z","subscribed_events":["*"],"updated_at":"2025-06-15T13:47:52.291Z","url":"https://example.com/contentgroove_webhooks/12345"},"id":"d812aaec-55e8-47b8-a9b6-3905082a53fb","relationships":{"user":{"data":{"id":"e9adb7a5-6169-4041-8d23-d1fdb6294198","type":"users"}},"webhook_events":{"data":[]}},"type":"webhook_subscriptions"},"links":{"self":"http://api.contentgroove.com/api/v1/webhook_subscriptions"}},"schema":{"$ref":"#/components/schemas/webhook_subscription_response_object"}}},"description":"successful"},"401":{"content":{"application/json":{"example":{"errors":[{"message":"You need to sign in or sign up before continuing."}]}}},"description":"unauthorized"},"429":{"content":{"application/json":{"example":{"errors":[{"detail":"You have exceeded the maximum number of requests in the current window. Please try again later.","status":"429","title":"Too Many Requests"}]},"schema":{"$ref":"#/components/schemas/too_many_requests_error_response_object"}}},"description":"too many requests"}},"security":[{"BearerHeader":[]}],"summary":"create webhook subscription"}},"/webhook_subscriptions/{id}":{"delete":{"operationId":"deleteWebhookSubscriptionById","responses":{"204":{"description":"no content"},"401":{"content":{"application/json":{"example":{"errors":[{"message":"You need to sign in or sign up before continuing."}]}}},"description":"not authorized"},"404":{"content":{"application/json":{"example":{"errors":[{"detail":null,"source":null,"status":"404","title":"Not Found"}]}}},"description":"not found"},"429":{"content":{"application/json":{"example":{"errors":[{"detail":"You have exceeded the maximum number of requests in the current window. Please try again later.","status":"429","title":"Too Many Requests"}]}}},"description":"too many requests"}},"security":[{"BearerHeader":[]}],"summary":"delete webhook subscription"},"get":{"operationId":"getWebhookSubscriptionById","responses":{"200":{"content":{"application/json":{"example":{"data":{"attributes":{"active":true,"created_at":"2025-06-15T13:47:52.291Z","subscribed_events":["*"],"updated_at":"2025-06-15T13:47:52.291Z","url":"https://webhook.site/cd4ca31b-6d7d-414a-a3e5-a3a3ca42b25e"},"id":"481f57a0-ecdf-42ec-9837-bc551eb6909b","relationships":{"user":{"data":{"id":"639597af-9230-4205-a539-b5c7177b514c","type":"users"}},"webhook_events":{"data":[]}},"type":"webhook_subscriptions"},"links":{"self":"http://api.contentgroove.com/api/v1/webhook_subscriptions/481f57a0-ecdf-42ec-9837-bc551eb6909b"}},"schema":{"$ref":"#/components/schemas/webhook_subscription_response_object"}}},"description":"successful"},"401":{"content":{"application/json":{"example":{"errors":[{"message":"You need to sign in or sign up before continuing."}]}}},"description":"not authorized"},"404":{"content":{"application/json":{"example":{"errors":[{"detail":null,"source":null,"status":"404","title":"Not Found"}]}}},"description":"not found"},"429":{"content":{"application/json":{"example":{"errors":[{"detail":"You have exceeded the maximum number of requests in the current window. Please try again later.","status":"429","title":"Too Many Requests"}]},"schema":{"$ref":"#/components/schemas/too_many_requests_error_response_object"}}},"description":"too many requests"}},"security":[{"BearerHeader":[]}],"summary":"show webhook subscription"},"parameters":[{"description":"The id of the webhook subscription to be retrieved","in":"path","name":"id","required":true,"schema":{"type":"string"}}]}},"components":{"schemas":{"clip_response_object":{"properties":{"data":{"$ref":"#/components/schemas/clip_response_object_data"},"links":{"$ref":"#/components/schemas/links_object_data"}},"type":"object"},"clip_response_object_data":{"properties":{"attributes":{"properties":{"created_at":{"type":"string"},"end_char":{"type":"integer"},"end_time":{"type":"number"},"external_id":{"nullable":true,"type":"string"},"is_processing":{"nullable":true,"type":"boolean"},"media_file_content_duration":{"nullable":true,"type":"string"},"media_file_content_type":{"nullable":true,"type":"string"},"media_file_height":{"nullable":true,"type":"string"},"media_file_preview_image_url":{"nullable":true,"type":"string"},"media_file_url":{"nullable":true,"type":"string"},"media_file_width":{"nullable":true,"type":"string"},"name":{"type":"string"},"processing_started_at":{"nullable":true,"type":"string"},"rank":{"nullable":true,"type":"integer"},"start_char":{"type":"integer"},"start_time":{"type":"number"},"text":{"nullable":true,"type":"string"}},"type":"object"},"id":{"type":"string"},"relationships":{"properties":{"media":{"properties":{"data":{"properties":{"id":{"type":"string"},"type":{"type":"string"}},"type":"object"}},"type":"object"}},"type":"object"},"type":{"type":"string"}},"type":"object"},"clips_response_object":{"properties":{"data":{"items":{"$ref":"#/components/schemas/clip_response_object_data"},"type":"array"},"links":{"$ref":"#/components/schemas/links_object_data"}},"type":"object"},"direct_upload_response_object":{"properties":{"data":{"properties":{"attributes":{"properties":{"upload_id":{"example":"eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaEpJaWs1T0dNNU16Um1ZUzAzT1dZMUxUUXhORFF0T0RobVpTMDNNV1prT1RKaE9XWTVNVGtHT2daRlZBPT0iLCJleHAiOm51bGwsInB1ciI6ImJsb2JfaWQifX0=--f52b7cf73db1f05b8e74dcf057b7f8348128c600","type":"string"},"upload_url":{"example":"(example URL for documentation only) https://file-uploads.contentgroove.com/vmf93z4328ioirtd6f5yb2nwbnq4d0ps?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAZ44FA4RJICA5SPPQ%2F20220919%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220919T165555Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host-content-type&X-Amz-Signature=df840423555070b29264382599459f1497ba2bd5e10e6a6dd41a29ebe239a8e0ecf","type":"string"}},"type":"object"},"id":{"example":"98c934fa-79f5-4144-88fe-71fd92a9f919","type":"string"},"type":{"example":"direct_upload_blobs","type":"string"}},"type":"object"}},"type":"object"},"links_object_data":{"properties":{"current":{"nullable":true,"type":"string"},"first":{"nullable":true,"type":"string"},"last":{"nullable":true,"type":"string"},"next":{"nullable":true,"type":"string"},"prev":{"nullable":true,"type":"string"},"self":{"type":"string"}},"type":"object"},"media_response_object":{"properties":{"data":{"$ref":"#/components/schemas/media_response_object_data"},"links":{"$ref":"#/components/schemas/links_object_data"}},"type":"object"},"media_response_object_data":{"properties":{"attributes":{"properties":{"created_at":{"type":"string"},"description":{"nullable":true,"type":"string"},"external_id":{"nullable":true,"type":"string"},"has_fetch_error":{"type":"boolean"},"is_processing":{"nullable":true,"type":"boolean"},"name":{"type":"string"},"original_created_at":{"nullable":true,"type":"string"},"processing_started_at":{"nullable":true,"type":"string"},"source_created_at":{"nullable":true,"type":"string"},"source_file_content_type":{"nullable":true,"type":"string"},"source_file_duration":{"nullable":true,"type":"number"},"source_file_height":{"nullable":true,"type":"number"},"source_file_preview_image_url":{"nullable":true,"type":"string"},"source_file_width":{"nullable":true,"type":"number"},"source_url":{"nullable":true,"type":"string"}},"type":"object"},"id":{"type":"string"},"relationships":{"properties":{"clips":{"properties":{"data":{"items":{"properties":{"id":{"type":"string"},"type":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"}},"type":"object"},"type":{"type":"string"}},"type":"object"},"medias_response_object":{"properties":{"data":{"items":{"$ref":"#/components/schemas/media_response_object_data"},"type":"array"},"links":{"$ref":"#/components/schemas/links_object_data"}},"type":"object"},"payment_required_error_response_object":{"properties":{"errors":{"items":{"properties":{"code":{"type":"string"},"detail":{"type":"string"},"source":{"properties":{"pointer":{"type":"string"}},"type":"object"},"status":{"type":"string"},"title":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"too_many_requests_error_response_object":{"properties":{"errors":{"items":{"properties":{"detail":{"type":"string"},"status":{"type":"string"},"title":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"unauthorized_error_response_object":{"properties":{"errors":{"items":{"properties":{"message":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"webhook_subscription_response_object":{"properties":{"data":{"$ref":"#/components/schemas/webhook_subscription_response_object_data"},"links":{"$ref":"#/components/schemas/links_object_data"}},"type":"object"},"webhook_subscription_response_object_data":{"properties":{"attributes":{"properties":{"active":{"type":"boolean"},"created_at":{"type":"string"},"subscribed_events":{"items":{"type":"string"},"type":"array"},"updated_at":{"type":"string"},"url":{"type":"string"}},"type":"object"},"id":{"type":"string"},"relationships":{"properties":{"user":{"properties":{"data":{"properties":{"id":{"type":"string"},"type":{"type":"string"}},"type":"object"}},"type":"object"},"webhook_events":{"properties":{"data":{"items":{"properties":{"id":{"type":"string"},"type":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"}},"type":"object"},"type":{"type":"string"}},"type":"object"},"webhook_subscriptions_response_object":{"properties":{"data":{"items":{"$ref":"#/components/schemas/webhook_subscription_response_object_data"},"type":"array"},"links":{"$ref":"#/components/schemas/links_object_data"}},"type":"object"}},"securitySchemes":{"BearerHeader":{"description":"Generate an API key in settings -> api keys","in":"header","name":"Authorization","type":"apiKey"}}}}