Skip to main content

Entities: HTTP CRUD Methods

To interact with the API endpoints listed below, you will need to include an API key in the request headers. The API key can be obtained from the project settings under API keys.

Entity List

  • Method: GET
  • Description: Retrieves a list of entities.
  • Request Headers: "Authorization: [api_key]"
  • URL: https://api.scena.ai/backend/api/entity
  • cURL Command:
    curl -H "Authorization: ABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCD" \
    "https://api.scena.ai/backend/api/entity"

Entity Detail

  • Method: GET
  • Description: Retrieves details of a specific entity.
  • Request Headers: "Authorization: [api_key]"
  • URL: https://api.scena.ai/backend/api/entity/[entity_id]
  • cURL Command:
    curl -H "Authorization: ABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCD" \
    "https://api.scena.ai/backend/api/entity/23"

Entity Items

  • Method: GET
  • Description: Retrieves a list of items for a specific entity.
  • Request Headers: "Authorization: [api_key]"
  • URL: https://api.scena.ai/backend/api/entity/[entity_id]/items
  • cURL Command:
    curl -H "Authorization: ABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCD" \
    "https://api.scena.ai/backend/api/entity/23/items"

Entity Item Create

  • Method: POST
  • Description: Creates a new item for a specific entity.
  • Request Headers: "Authorization: [api_key]"
  • URL: https://api.scena.ai/backend/api/entity/[entity_id]/items
  • Post Body Data: {"document": [json map of columns]}
  • cURL Command:
    curl -X "POST" -H "Authorization: ABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCD" \
    "https://api.scena.ai/backend/api/entity/23/items" \
    -d '{"document": {"aaaaa": "123", "bbbb": "second column value"}}'

Entity Item Update

  • Method: POST
  • Description: Updates an existing item for a specific entity.
  • Request Headers: "Authorization: [api_key]"
  • URL: https://api.scena.ai/backend/api/entity/[entity_id]/items/[entity_item_id]
  • Post Body Data: {"document": [json map of columns]}
  • cURL Command:
    curl -X "POST" -H "Authorization: ABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCD" \
    "https://api.scena.ai/backend/api/entity/23/items/64" \
    -d '{"document": {"aaaaa": "123", "bbbb": "second column value"}}'

Entity Item Delete

  • Method: DELETE
  • Description: Deletes an existing item for a specific entity.
  • Request Headers: "Authorization: [api_key]"
  • URL: https://api.scena.ai/backend/api/entity/[entity_id]/items/[entity_item_id]
  • cURL Command:
    curl -X "DELETE" -H "Authorization: ABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCD" \
    "https://api.scena.ai/backend/api/entity/23/items/64"

Remember to replace [api_key], [entity_id], and [entity_item_id] with the appropriate values specific to your usage.