Custom Provider Environments

Environments represent deployment targets for custom provider versions (e.g., staging, production).

Custom Provider Environments object

Attributes

object

String

String representing the object's type

id

String

Unique custom provider environment identifier

custom_provider_id

String

ID of the parent custom provider

provider_id

StringNullable

ID of the associated provider

current_provider_version_id

StringNullable

ID of the current provider version in this environment

instance_id

StringNullable

ID of the instance this environment is associated with

created_at

Date

Timestamp when created

updated_at

Date

Timestamp when last updated

{
"object": "custom_provider.environment",
"id": "cpenv_1aBcDeFgHjKlMnPq",
"custom_provider_id": "cpr_1aBcDeFgHjKlMnPq",
"provider_id": "pro_5gHjKlMnPqRsTuVw",
"current_provider_version_id": "prv_4dEfGhJkLmNpQrSt",
"instance_id": "ins_2cDeFgHjKlMnPqRs",
"created_at": "2025-09-15T10:30:00.000Z",
"updated_at": "2026-01-10T14:45:00.000Z"
}

List custom provider environments

Returns a paginated list of environments for a custom provider.

URL Parameters

custom_provider_id

String

The unique identifier for the custom_provider

Query Parameters

limit

NumberOptional

Maximum number of items to return (1-100)

after

StringOptional

Return items after this ID

before

StringOptional

Return items before this ID

cursor

StringOptional

Pagination cursor from a previous response

order

EnumOptional

Sort order for results

ids

UnionOptional

Filter by environment IDs

custom_provider_version_ids

UnionOptional

Filter by version IDs

GEThttp://api.metorial.com/custom-providers/:custom_provider_id/environments
curl -X GET "https://api.metorial.com/custom-providers/cus_Rm4Mnheq2bfEPhBhP7SY/environments" \
-H "Authorization: Bearer metorial_sk_..."

Get custom provider environment

Retrieves a specific environment.

URL Parameters

custom_provider_id

String

The unique identifier for the custom_provider

custom_provider_environment_id

String

The unique identifier for the custom_provider_environment

GEThttp://api.metorial.com/custom-providers/:custom_provider_id/environments/:custom_provider_environment_id
curl -X GET "https://api.metorial.com/custom-providers/cus_Rm4Mnheq2bfEPhBhP7SY/environments/cus_Rm4Mnheq2bfEPhBhP7SY" \
-H "Authorization: Bearer metorial_sk_..."