Label API

Prev Next

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:

  • your-host.node.darwinidentity.com
  • API Certificate uploaded to the Darwinium Portal for API authentication. See Setting up certificates & Accesses

Label API Specifications

Host:

your-host.node.darwinidentity.com

(Where your-host is replaced with the random-words corresponding to your Darwinium node.)

Port: 9443

Full OpenAPI schema

Full schema is returned from GET  /api/schema

Add

Example URL:

https://your-host.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"
  ],
  "metadata": "{\"analyst\":\"example@example.com\",\"notes\":\"Test notes\"}"
}

Example Request Response:

{
  "label_uuid": "512fa07d033341ac838c907ba1065a74"
}

Remove

Example URL:

https://your-host.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