Delete entities

This page describes how to delete a custom entity using the Management API.

For more information about the Entity Detection feature, see Entity Detection.


Entity Detection - Management API

This section provides a basic example of how to delete a custom entity using the Management API.

Authentication

These requests require an access token, as described in Authenticate.

Delete an entity

To delete a custom entity, use the DELETE <https://api.symbl.ai/v1/manage/entity/{entityId}> operation.

import fetch from 'node-fetch';

const accessToken = '<ACCESS_TOKEN>';
const entityId = '<ENTITY_ID>';

const fetchResponse = await fetch(`https://api.symbl.ai/v1/manage/entity/${entityId}`, {
  method: delete,
  headers: {
    'Authorization': `Bearer ${accessToken}`,
    'Content-Type': 'application/json'
  }
});

const responseBody = await fetchResponse.json();

console.log(responseBody);

Where:

  • <ACCESS_TOKEN> is a valid API access token.
  • <ENTITY_ID> is the ID of a custom entity that you previously created.

Response

If the request is successful, the operation returns a 204 success response.

Delete an entity by subtype

To delete a custom entity by its subtype, use the DELETE <https://api.symbl.ai/v1/manage/entity> operation and include the subType query parameter.

import fetch from 'node-fetch';

const accessToken = '<ACCESS_TOKEN>';
const subType = '<SUBTYPE>';

const fetchResponse = await fetch(`https://api.symbl.ai/v1/manage/entity?subType=${subType}`, {
  method: delete,
  headers: {
    'Authorization': `Bearer ${accessToken}`,
    'Content-Type': 'application/json'
  }
});

const responseBody = await fetchResponse.json();

console.log(responseBody);

Where:

  • <ACCESS_TOKEN> is a valid API access token.
  • <SUBTYPE> is the subtype of a custom entity that you previously created.

Response

If the request is successful, the operation returns a 204 success response.


Did this page help you?