Update trackers

This guide describes how to use the Management API Update Tracker operation to change tracker properties by providing the tracker ID, operation, path, and value. You can replace, update, or remove values for individual properties, without updating the rest of the tracker.

Authentication

Before using this API, you must generate your authentication token (AUTH_TOKEN) as described in Authenticate.

Properties

Use this operation to change the following properties. This list includes sample values where you need to supply your own content.

  • To rename a tracker as Online Website Support, use the parameters op: replace, path: /name and value: Online Website Support.

  • To add a vocabulary phrase "Website is not loading" to a tracker, use the parameters op: add, path: /vocabulary, and value: Website is not loading.

  • To remove English language from a tracker, use the parameters op: remove, path: /languages, and value: en-US.

  • To remove the assigned category General from a tracker, use the parameters op: remove, path: /categories, and value: General.

Request body parameters

ParameterRequiredDescription
trackerIdYesThe ID of the tracker to update.
opYesThe operation that you want to perform on a property, one of add, replace, and remove.
pathYesThe property to update. One of /name, /description, /categories, /languages, /vocabulary, /excludeVocabulary.
valueYesThe new value for the property. If the operation is add, the value is appended to the existing value. If the operation is replace, the existing value is replaced with this value.

Update trackers

Submit a request to update a tracker.

PATCH https://api.symbl.ai/v1/manage/trackers/{trackerId}

To make a sample request directly from the API Reference, see Update Tracker.

Update trackers request

To update a tracker, use the PATCH <https://api.symbl.ai/v1/manage/trackers/{trackerId}> operation.

import fetch from 'node-fetch';

const accessToken = '<ACCESS_TOKEN>';
const trackerParams = {
  'op': '<TRACKER_OPERATION>',
  'path': '<TRACKER_PATH>',
  'value': '<TRACKER_VALUE>'
}

const fetchResponse = await fetch('https://api.symbl.ai/v1/manage/trackers/{trackerId}', {
  method: 'patch',
  body: JSON.stringify(trackerParams),
  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.
  • <TRACKER_OPERATION> is the operation to perform on a property. One of the following: add, replace, or remove.
  • <TRACKER_PATH> is the path to the property being updated.
  • <TRACKER_VALUE> a string value based on the operation and path.

For more detailed descriptions, see the Request Body Parameters table.

Update trackers response

{
    "tracker": {
        "id": "5639193993674752",
        "name": "Online Website Support",
        "vocabulary": [
            "Website",
            "Website is down",
            "Website shows incorrect information",
            "Website crashed",
            "Website is not loading"
        ],
        "description": "Used to identify website support in the conversation",
        "categories": [
            "Call Center"
        ],
        "languages": [
            "en-IN"
        ],
        "createdOn": "2022-08-29T03:52:32.817Z",
        "updatedOn": "2022-08-29T03:57:45.737Z"
    }
}

Added response fields

The following fields are added to the response body. Other response fields are identical to the parameters you specified in the request.

FieldDescription
createdOnTimestamp when the Tracker was created.
updatedOnTimestamp when the Tracker was updated. Identical timestamps indicate no update.

Did this page help you?