Validate an adapter
const url = 'https://api.ebitex.io/content/management/v1/adapters/validate';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"inputContractId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","outputContractId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","rules":["example"],"inputContractVersion":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.ebitex.io/content/management/v1/adapters/validate \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "inputContractId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "outputContractId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "rules": [ "example" ], "inputContractVersion": 1 }'Checks rules against inputContractId and outputContractId without saving anything. Set inputContractVersion to check against a specific version of the input contract rather than its latest.
Problems in the rules come back in a 200 response rather than as an error, so you can show them while editing: errors would block a save, warnings would not. coverage reports whether each output field is mapped, compatibility which input fields can feed which output fields, and suggestions mappings worth considering.
Key: a management key with content.management.authoring.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
Examplegenerated
{ "inputContractId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "outputContractId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "rules": [ "example" ], "inputContractVersion": 1}Responses
Section titled “ Responses ”{ errors, warnings, coverage, compatibility, suggestions }, each finding in errors and warnings shaped { path, code, message }.
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.
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.
adapter_invalid: the request could not be checked at all. invalid_rules: the rules are not well-formed. contract_not_found: the input or output contract (or that input contract version) does not exist.
Rate limit or quota exceeded; Retry-After says how long to wait. too_many_failed_authentications: too many bad keys from this address.