Skip to main content

Disable an object definition

Jetmir Abdija avatar
Written by Jetmir Abdija
Updated over a month ago

This section provides the steps for changing the status of an object definition from enabled to disabled. In case an object definition is already disabled, no error will be thrown.

HTTP responses

HTTP response status code

Interpretation

200 OK

Object definition disabled successfully

400 Bad Request

One or more validation errors occurred:

  • Object definition is secured

  • Object definition is built-in or non-existing

401 Unauthorized

Invalid or missing API key secret and/or tenant

403 Forbidden

The user is not allowed to disable this object definition

To enable an existing disabled object definition, make a POST request to the /object-definitions/{id}/disable endpoint specifying:

  • Resource/endpoint destination URL. Replace the path parameter {id} with the ID of the object definition that you want to have disabled in the repository.

  • The header for your API request

To enable the object definition with the id 640b3d7d4a28b925fcf8b8b2, we will pass a POST request to the URI https://public-api.eu.bluedolphin.app/v1/object-definitions/640b3d7d4a28b925fcf8b8b2/disable.

curl -L -X POST 'https://public-api.eu.bluedolphin.app/v1/object-definitions/640b3d7d4a28b925fcf8b8b2/disable' \
-H 'x-api-key: YOURAPIKEYSECRET' \
-H 'tenant: yourtenantname' \
-H 'Content-Type: application/json'

A successful call returns a response with a 200 OK HTTP status code and the following body:

{
    "result": "OK"
}
Did this answer your question?