Object get

Returns the current definition for an object by name.

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

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.

    *provide api key here*
  • Content-TypeRequired

    MIME type of the request body.

    application/json
  • AcceptRequired

    MIME types the client can understand in the response.

    application/json

See authentication headers here.

  • 200Response body · object

    Current definition for the requested object.

    • typenumber

      How values for this object are encoded on the wire.

      Values

      • 2 — JSON object
      • 3 — number
      • 4 — string
      • 5 — Base64 binary data
      default:
      2
    • ttlnumber

      Time to live in seconds: lifetime of the object itself and all related data such as state.

      minValue:
      0
    • validitynumber

      Duration of validity of state in seconds. The state can still be recovered afterward but is no longer considered useful or valid.

      example: Truck position valid for 10 minutes — use 600
      default:
      Not applied (no limit)
    • versionDeepnumber

      Number of past version states kept in history.

      default:
      0 (no history stored)
    • infoobject

      Metadata that helps readers understand what the object is used for.

      • info.namestring

        Human-readable name of the object.

      • info.descstring

        Description of the object.

      • info.exampleany

        Example of a typical value stored for this object.

  • 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. See the error codes reference for the full list.

    • descstring

      Human-readable description of the error.

Get object

Fetch the current definition for an object by its fully qualified name.

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

© 2024 BigState