Skip to content

Update an adapter

PATCH
/content/management/v1/adapters/{id}
curl --request PATCH \
--url https://api.ebitex.io/content/management/v1/adapters/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "inputContractId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "outputContractId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "rules": [ "example" ], "rowVersion": 1, "layout": {} }'

Changes any of name, inputContractId, outputContractId and rules; omitted members keep their current value. externalId cannot be changed. The resulting adapter is revalidated as a whole on every update, so changing a contract can fail against rules you did not send. Include rowVersion from getAdapter to detect a concurrent edit.

A change takes effect at once for every stream that projects through the adapter and every mapping that nests it by name. A page that binds the adapter directly keeps the rules it was published with until it is republished.

Key: a management key with content.management.authoring.

id
required
string format: uuid
Media typeapplication/json
object
name
required
null | string
inputContractId
required
null | string format: uuid
outputContractId
required
null | string format: uuid
rules
required
One of:
null
rowVersion
required
null | integer | string format: uint32
/^-?(?:0|[1-9]\d*)$/
layout
One of:
null
Examplegenerated
{
"name": "example",
"inputContractId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"outputContractId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"rules": [
"example"
],
"rowVersion": 1,
"layout": {}
}

The updated adapter, shaped as getAdapter returns it.

validation_failed: name was sent empty.

missing_api_key or invalid_api_key: no key was sent, or it is unknown, revoked or expired.

payment_required: the organization’s subscription needs attention.

permission_denied: the key’s role lacks content.adapters.manage.

scope_denied: the key lacks this route’s scope. tier_required: the Content Management API needs the Pro plan or above. ip_denied: the caller’s address is outside the key’s allowed ranges. app_not_available: Content is not enabled for the organization.

No adapter has this id in the key’s environment.

concurrency_conflict: the adapter changed since rowVersion was read; currentRowVersion is the current value. Re-read and retry. inherited_read_only: the item is inherited from another environment (sourceEnvironmentId) and can only be changed there.

adapter_invalid: the adapter cannot be saved. errors lists each problem as { path, code, message }: invalid_rules (the rules are not well-formed), contract_not_found (the input or output contract does not exist), nested_adapter_not_found (a nested rule names an adapter that does not exist in this environment), and the type-compatibility and coverage problems /adapters/validate reports.

Rate limit or quota exceeded; Retry-After says how long to wait. too_many_failed_authentications: too many bad keys from this address.