Calling the Label API
  • 03 May 2024
  • 1 Minute to read
  • Contributors
  • Dark
    Light

Calling the Label API

  • Dark
    Light

Article Summary

See Labels article for context, advice on the use cases and other ways to interact with labels.

See Label Reference article for all supported Label names/IDs.

Requirements

  • Darwinium account and node created. This should give you your node host consisting of two random words:

    • <first>-<second>.node.darwinidentity.com

  • API Certificate uploaded to the Darwinium Portal for API authentication. See Setting up certificates & Accesses

Label API Specifications

Host: first-second.node.darwinidentity.com

(Where first and second are the words corresponding to your Darwinium node.)

Port: 9443

Add

Example URL:

https://first-second.node.darwinidentity.com:9443/api/label/add

Example Request Body:

{
  "id": "promo_abuse",
  "attributes": [
    {
      "name": "identity['ACCOUNT'].email['PERSONAL'].email",
      "value": "test@darwinium.com"
    }
  ],
  "contexts": [
    "probably",
    "signup_bonus"
  ]
}

Example Request Response:

{
  "label_uuid": "512fa07d033341ac838c907ba1065a74"
}

Remove

Example URL:

https://first-second.node.darwinidentity.com:9443/api/label/remove

Example Request Body (if removing by UUID):

{
  "uuid": "512fa07d033341ac838c907ba1065a74",
}

Example Request Body (if removing by attributes and id):

{
  "id": "promo_abuse",
  "attributes": [
    {
      "name": "identity['ACCOUNT'].email['PERSONAL'].email",
      "value": "test@darwinium.com"
    }
  ]
}

Example Request Response:

{
  "removed_uuids": [
    "512fa07d033341ac838c907ba1065a74"
  ]
}

Label Parameters

  • id (string): Label name, from fixed list of strings. See Label Reference for all supported Label names/IDs.

  • uuid (string): Unique identifier assigned to each label

  • attributes (array): List of dictionaries for the collection of identifiers and identifier values to assign a label to.

    • name (string): Name of Darwinium identifier eg. journey_id. See Attribute Reference

    • value (string): The value of the identifier to assign the label to.

  • contexts (array): Array of strings, which add additional detail to a label. See Labels article for lists of potential contexts

  • metadata (string): Free text field for notes on why label is being added eg. analyst investigation notes



Was this article helpful?

What's Next
Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.