Delete an object

An object is a named resource whose definition describes the state it accepts. An object can represent a device, user location, counter, or any other stateful entity, including type, retention, and version-history settings.

Delete an object definition by its fully qualified name. A successful response contains action code 3; a 404 means that no object exists under that name.

Confirm the target with Get an object before deleting it. If the name is uncertain, use List objects to find objects visible to the current API key.

Confirm the object name

Deletion removes the selected object definition.

This endpoint does not provide a confirmation step. Verify the fully qualified name before sending the request.

DELETE
{{host}}/v1/object?object={{object}}
VERB:DELETE
BASE URL:{{host}}/v1/object
QUERY STRING:?object={{object}}

Query parameters#

  • objectstring
    Required

    Unique name of the object in the URL.

    format:
    abc:0-9@owner

Headers#

Send these headers with the request. Names are case-insensitive per HTTP rules.
  • x-api-keyRequired

    Your BigState API key.

    {{apiKey}}
  • Content-TypeRequired

    MIME type of the request body.

    application/json
  • AcceptRequired

    MIME types the client can understand in the response.

    application/json

Need a session token? See Token sign in.

  • 200Response body · object

    The object was deleted.

    {
    "action": 3
    }
    • actionnumber

      Always 3 when the delete succeeds.

      Values

      • 3 — deleted
  • 401

    Unauthorized.

  • 403

    Access denied. The caller does not have sufficient rights to perform this operation.

  • 404

    No object exists for the given name.

  • 400Response body · object

    Bad request.

    {
    "error": 6,
    "desc": "Object must be formatted as object"
    }
    • errornumber

      Numeric error code. Use the response `desc` field for the human-readable explanation.

    • descstring

      Human-readable description of the error.

Delete an object

Remove an object definition by name.

curl 'https://api.bigstate.dev/v1/object?object=Z5H1QxoGRz5vc6VeNIwwpVC6biVkYTqXe9SGQJJ6%3Aposition%40Z5H1QxoGRz5vc6VeNIwwpVC6biVkYTqXe9SGQJJ6' \
--request DELETE \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json'

© 2024 BigState