Search Documentation
Search across all documentation pages
Origins

The Origin object

Origins are storage locations for video inputs and transcoded outputs. Transcodely supports Google Cloud Storage, Amazon S3, and HTTP/HTTPS endpoints. Credentials are validated at creation and stored encrypted.

Base path: transcodely.v1.OriginService Requires: X-Organization-ID header on all endpoints.


Attributes

AttributeTypeDescription
idstringUnique identifier with ori_ prefix (e.g., "ori_x9y8z7w6v5").
namestringHuman-readable name.
descriptionstringOptional description.
providerstringStorage provider. One of "gcs", "s3", "http".
permissionsstring[]Declared permissions: "read" and/or "write".
statusstringCurrent status. One of "active", "failed", "archived".
base_pathstringBase path prefix within the bucket (e.g., "videos/uploads/").
path_templatestringOutput path template with variables (e.g., "{date}/{job_id}/{codec}_{resolution}"). Supports {date}, {job_id}, {output_id}, {codec}, {resolution}.
last_validated_atstringISO 8601 timestamp of last successful validation. Omitted if never validated.
validation_errorstringError from last failed validation. Omitted if status is not "failed".
created_atstringISO 8601 timestamp.
updated_atstringISO 8601 timestamp.
archived_atstringISO 8601 timestamp. Omitted if not archived.
{
  "id": "ori_x9y8z7w6v5",
  "name": "Production GCS Bucket",
  "description": "Main storage for video assets",
  "provider": "gcs",
  "permissions": ["read", "write"],
  "status": "active",
  "base_path": "videos/",
  "path_template": "{date}/{job_id}/{codec}_{resolution}",
  "last_validated_at": "2025-01-15T10:30:00Z",
  "created_at": "2025-01-15T10:30:00Z",
  "updated_at": "2025-01-15T10:30:00Z"
}

Providers

ProviderReadWriteAuthentication
gcsYesYesService account JSON key.
s3YesYesAccess key ID and secret.
httpYesNoOptional custom headers.

The ValidationResult object

Returned when credentials are validated, either at creation, after credential rotation, or via the Validate endpoint.

AttributeTypeDescription
successbooleanWhether all declared permissions were validated.
can_readbooleanWhether read permission was validated.
can_writebooleanWhether write permission was validated.
read_errorstringError message if read validation failed.
write_errorstringError message if write validation failed.
validated_atstringISO 8601 timestamp.

Create an origin

Create a new storage origin. Credentials are validated at creation time and must pass before the origin is stored.

POST /transcodely.v1.OriginService/Create

Parameters

ParameterTypeRequiredDescription
namestringYesHuman-readable name (1-255 chars).
descriptionstringNoDescription (max 1000 chars).
permissionsstring[]YesDeclared permissions: "read" and/or "write". At least one required. HTTP origins only support "read".
base_pathstringNoBase path prefix within the bucket (max 1024 chars).
path_templatestringNoOutput path template with variables like {date}, {job_id}, {output_id}, {codec}, {resolution} (max 1024 chars).
gcsobjectOne ofGCS provider configuration. Exactly one of gcs, s3, or http must be provided.
gcs.bucketstringYesGCS bucket name (e.g., "my-video-bucket").
gcs.credentialsobjectYesGCS credentials.
gcs.credentials.service_account_jsonstringYesFull JSON content of the service account key file.
s3objectOne ofS3 provider configuration.
s3.bucketstringYesS3 bucket name.
s3.regionstringYesAWS region (e.g., "us-east-1").
s3.credentialsobjectYesS3 credentials.
s3.credentials.access_key_idstringYesAWS access key ID.
s3.credentials.secret_access_keystringYesAWS secret access key.
httpobjectOne ofHTTP provider configuration (read-only).
http.base_urlstringYesBase URL (e.g., "https://cdn.example.com/videos/").
http.credentialsobjectNoOptional authentication headers.
http.credentials.headersobjectNoKey-value map of custom headers (max 20 pairs).

Returns

The Origin object and a ValidationResult confirming the credential check.

Example: GCS origin

curl -X POST https://api.transcodely.com/transcodely.v1.OriginService/Create 
  -H "Authorization: Bearer {{API_KEY}}" 
  -H "X-Organization-ID: {{ORG_ID}}" 
  -H "Content-Type: application/json" 
  -d '{
    "name": "Production GCS Bucket",
    "description": "Main storage for video assets",
    "permissions": ["read", "write"],
    "base_path": "videos/",
    "path_template": "{date}/{job_id}/{codec}_{resolution}",
    "gcs": {
      "bucket": "acme-video-assets",
      "credentials": {
        "service_account_json": "{...}"
      }
    }
  }'
{
  "origin": {
    "id": "ori_x9y8z7w6v5",
    "name": "Production GCS Bucket",
    "description": "Main storage for video assets",
    "provider": "gcs",
    "permissions": ["read", "write"],
    "status": "active",
    "base_path": "videos/",
    "path_template": "{date}/{job_id}/{codec}_{resolution}",
    "last_validated_at": "2025-01-15T10:30:00Z",
    "created_at": "2025-01-15T10:30:00Z",
    "updated_at": "2025-01-15T10:30:00Z"
  },
  "validation": {
    "success": true,
    "can_read": true,
    "can_write": true,
    "read_error": "",
    "write_error": "",
    "validated_at": "2025-01-15T10:30:00Z"
  }
}

Example: S3 origin

curl -X POST https://api.transcodely.com/transcodely.v1.OriginService/Create 
  -H "Authorization: Bearer {{API_KEY}}" 
  -H "X-Organization-ID: {{ORG_ID}}" 
  -H "Content-Type: application/json" 
  -d '{
    "name": "AWS S3 Output Bucket",
    "permissions": ["write"],
    "s3": {
      "bucket": "acme-transcoded-output",
      "region": "us-east-1",
      "credentials": {
        "access_key_id": "AKIAIOSFODNN7EXAMPLE",
        "secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
      }
    }
  }'

Retrieve an origin

Retrieve an origin by ID. Credentials are never included in responses.

POST /transcodely.v1.OriginService/Get

Parameters

ParameterTypeRequiredDescription
idstringYesOrigin ID (e.g., "ori_x9y8z7w6v5").

Returns

The Origin object.

Example

curl -X POST https://api.transcodely.com/transcodely.v1.OriginService/Get 
  -H "Authorization: Bearer {{API_KEY}}" 
  -H "X-Organization-ID: {{ORG_ID}}" 
  -H "Content-Type: application/json" 
  -d '{"id": "ori_x9y8z7w6v5"}'
{
  "origin": {
    "id": "ori_x9y8z7w6v5",
    "name": "Production GCS Bucket",
    "description": "Main storage for video assets",
    "provider": "gcs",
    "permissions": ["read", "write"],
    "status": "active",
    "base_path": "videos/",
    "path_template": "{date}/{job_id}/{codec}_{resolution}",
    "last_validated_at": "2025-01-15T10:30:00Z",
    "created_at": "2025-01-15T10:30:00Z",
    "updated_at": "2025-01-15T10:30:00Z"
  }
}

List origins

List origins with optional filtering by provider, status, and permission.

POST /transcodely.v1.OriginService/List

Parameters

ParameterTypeRequiredDescription
providerstringNoFilter by provider: "gcs", "s3", or "http".
statusstringNoFilter by status: "active", "failed", or "archived".
permissionstringNoFilter by permission: "read" or "write".
include_archivedbooleanNoInclude archived origins. Default: false.
paginationobjectNoPagination parameters. See Pagination.

Returns

A list of Origin objects and pagination metadata.

Example

curl -X POST https://api.transcodely.com/transcodely.v1.OriginService/List 
  -H "Authorization: Bearer {{API_KEY}}" 
  -H "X-Organization-ID: {{ORG_ID}}" 
  -H "Content-Type: application/json" 
  -d '{
    "provider": "gcs",
    "permission": "write",
    "pagination": {"limit": 20}
  }'
{
  "origins": [
    {
      "id": "ori_x9y8z7w6v5",
      "name": "Production GCS Bucket",
      "provider": "gcs",
      "permissions": ["read", "write"],
      "status": "active",
      "base_path": "videos/",
      "created_at": "2025-01-15T10:30:00Z",
      "updated_at": "2025-01-15T10:30:00Z"
    }
  ],
  "pagination": {
    "next_cursor": "",
    "total_count": 1
  }
}

Update an origin

Update an origin’s metadata and optionally rotate credentials. If credentials are provided, validation runs automatically.

POST /transcodely.v1.OriginService/Update

Parameters

ParameterTypeRequiredDescription
idstringYesOrigin ID.
namestringNoNew name (1-255 chars).
descriptionstringNoNew description (max 1000 chars).
base_pathstringNoNew base path (max 1024 chars).
path_templatestringNoNew path template (max 1024 chars).
gcs_credentialsobjectNoUpdated GCS credentials. Triggers validation.
s3_credentialsobjectNoUpdated S3 credentials. Triggers validation.
http_credentialsobjectNoUpdated HTTP credentials. Triggers validation.

Returns

The updated Origin object. Includes a ValidationResult if credentials were rotated.

Example

curl -X POST https://api.transcodely.com/transcodely.v1.OriginService/Update 
  -H "Authorization: Bearer {{API_KEY}}" 
  -H "X-Organization-ID: {{ORG_ID}}" 
  -H "Content-Type: application/json" 
  -d '{
    "id": "ori_x9y8z7w6v5",
    "name": "Production GCS (Updated)",
    "path_template": "{job_id}/{output_id}"
  }'
{
  "origin": {
    "id": "ori_x9y8z7w6v5",
    "name": "Production GCS (Updated)",
    "description": "Main storage for video assets",
    "provider": "gcs",
    "permissions": ["read", "write"],
    "status": "active",
    "base_path": "videos/",
    "path_template": "{job_id}/{output_id}",
    "last_validated_at": "2025-01-15T10:30:00Z",
    "created_at": "2025-01-15T10:30:00Z",
    "updated_at": "2025-02-28T15:00:00Z"
  }
}

Validate an origin

Re-validate an origin’s credentials and permissions. Use this to check for permission drift after IAM policy changes.

POST /transcodely.v1.OriginService/Validate

Parameters

ParameterTypeRequiredDescription
idstringYesOrigin ID.

Returns

The Origin object (status may change to "active" or "failed") and a ValidationResult.

Example

curl -X POST https://api.transcodely.com/transcodely.v1.OriginService/Validate 
  -H "Authorization: Bearer {{API_KEY}}" 
  -H "X-Organization-ID: {{ORG_ID}}" 
  -H "Content-Type: application/json" 
  -d '{"id": "ori_x9y8z7w6v5"}'
{
  "origin": {
    "id": "ori_x9y8z7w6v5",
    "name": "Production GCS Bucket",
    "provider": "gcs",
    "permissions": ["read", "write"],
    "status": "active",
    "last_validated_at": "2025-02-28T15:00:00Z",
    "created_at": "2025-01-15T10:30:00Z",
    "updated_at": "2025-02-28T15:00:00Z"
  },
  "validation": {
    "success": true,
    "can_read": true,
    "can_write": true,
    "read_error": "",
    "write_error": "",
    "validated_at": "2025-02-28T15:00:00Z"
  }
}

Archive an origin

Soft-delete an origin. Archived origins cannot be used for new jobs, but existing job data is preserved.

POST /transcodely.v1.OriginService/Archive

Parameters

ParameterTypeRequiredDescription
idstringYesOrigin ID.

Returns

The archived Origin object with status: "archived".

Example

curl -X POST https://api.transcodely.com/transcodely.v1.OriginService/Archive 
  -H "Authorization: Bearer {{API_KEY}}" 
  -H "X-Organization-ID: {{ORG_ID}}" 
  -H "Content-Type: application/json" 
  -d '{"id": "ori_x9y8z7w6v5"}'
{
  "origin": {
    "id": "ori_x9y8z7w6v5",
    "name": "Production GCS Bucket",
    "provider": "gcs",
    "permissions": ["read", "write"],
    "status": "archived",
    "created_at": "2025-01-15T10:30:00Z",
    "updated_at": "2025-02-28T15:00:00Z",
    "archived_at": "2025-02-28T15:00:00Z"
  }
}