Replace a stream
const url = 'https://api.ebitex.io/content/management/v1/streams/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","sourceContractIds":["2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"],"adapterId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","orderByFieldPath":"example","orderDescending":true,"resolveDepth":1,"excludedComponentIds":["2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"],"declaredFilters":[{"key":"example","type":"example","fieldPath":"example","labelFieldPath":"example","groupExternalId":"example"}],"rowVersion":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.ebitex.io/content/management/v1/streams/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "sourceContractIds": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "adapterId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "orderByFieldPath": "example", "orderDescending": true, "resolveDepth": 1, "excludedComponentIds": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "declaredFilters": [ { "key": "example", "type": "example", "fieldPath": "example", "labelFieldPath": "example", "groupExternalId": "example" } ], "rowVersion": 1 }'Replaces a stream’s whole definition: send every member createStream takes except externalId, which cannot be changed. Omitting excludedComponentIds or declaredFilters clears them. Include rowVersion from getStream to detect a concurrent edit.
Delivery reads the new definition on its next request, so the change is live at once. Removing or renaming a declared filter breaks callers still sending it.
Key: a management key with content.management.authoring.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
object
Examplegenerated
{ "name": "example", "sourceContractIds": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "adapterId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "orderByFieldPath": "example", "orderDescending": true, "resolveDepth": 1, "excludedComponentIds": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "declaredFilters": [ { "key": "example", "type": "example", "fieldPath": "example", "labelFieldPath": "example", "groupExternalId": "example" } ], "rowVersion": 1}Responses
Section titled “ Responses ”The updated stream, shaped as getStream returns it.
validation_failed: name is 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.streams.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 stream has this id in the key’s environment.
concurrency_conflict: the stream 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.
stream_invalid: the definition cannot be saved. errors lists each problem as { target, code, message }, for example source_contracts_required, too_many_source_contracts, contract_not_found, adapter_not_found, stream_adapter_input_unsatisfied (a source contract does not satisfy the adapter’s input contract), invalid_field_path, invalid_resolve_depth, too_many_exclusions, too_many_filters, duplicate_filter_key, unknown_filter_type, multiple_fulltext_filters and unknown_category_group.
Rate limit or quota exceeded; Retry-After says how long to wait. too_many_failed_authentications: too many bad keys from this address.