classifications

Start a classification

Initiates a background classification task based on the provided parameters. Use the GET /classifications/{id} endpoint to monitor the status and retrieve results.

post/classifications/

Request

  • Base URL: https://localhost:8080/v1
  • URL: https://localhost:8080/v1/classifications/
  • Auth: one of:
    • none
    • OAuth 2 (implicit, authorization URL http://to-be-configured-in-the-application-config)

Request body

idstring uuid

ID to uniquely identify this classification run.

classstring

The name of the collection (class) which is used in this classification.

classifyPropertiesstring[]

Which ref-property to set as part of the classification.

basedOnPropertiesstring[]

Base the text-based classification on these fields (of type text).

status'running' | 'completed' | 'failed'

Status of this classification.

typestring

Which algorithm to use for classifications.

settingsobject

Classification-type specific settings.

errorstring

Error message if status == failed.

Example request

{
  "id": "ee722219-b8ec-4db1-8f8d-5150bb1a9e0c",
  "class": "City",
  "classifyProperties": [
    "inCountry"
  ],
  "basedOnProperties": [
    "description"
  ],
  "status": "running",
  "meta": {
    "started": "2017-07-21T17:32:28Z",
    "completed": "2017-07-21T17:32:28Z",
    "count": 147,
    "countSucceeded": 140,
    "countFailed": 7
  },
  "error": "classify xzy: something went wrong",
  "filters": {
    "sourceWhere": {
      "operator": "GreaterThanEqual",
      "path": [
        "inCity",
        "city",
        "name"
      ],
      "valueInt": 2000,
      "valueNumber": 3.14,
      "valueString": "my search term",
      "valueText": "my search term",
      "valueDate": "TODO",
      "valueNumberArray": [
        3.14
      ],
      "valueBooleanArray": [
        true,
        false
      ],
      "valueStringArray": [
        "my search term"
      ],
      "valueTextArray": [
        "my search term"
      ]
    },
    "trainingSetWhere": {
      "operator": "GreaterThanEqual",
      "path": [
        "inCity",
        "city",
        "name"
      ],
      "valueInt": 2000,
      "valueNumber": 3.14,
      "valueString": "my search term",
      "valueText": "my search term",
      "valueDate": "TODO",
      "valueNumberArray": [
        3.14
      ],
      "valueBooleanArray": [
        true,
        false
      ],
      "valueStringArray": [
        "my search term"
      ],
      "valueTextArray": [
        "my search term"
      ]
    },
    "targetWhere": {
      "operator": "GreaterThanEqual",
      "path": [
        "inCity",
        "city",
        "name"
      ],
      "valueInt": 2000,
      "valueNumber": 3.14,
      "valueString": "my search term",
      "valueText": "my search term",
      "valueDate": "TODO",
      "valueNumberArray": [
        3.14
      ],
      "valueBooleanArray": [
        true,
        false
      ],
      "valueStringArray": [
        "my search term"
      ],
      "valueTextArray": [
        "my search term"
      ]
    }
  }
}

Response

Classification task successfully initiated. The response body contains the classification details including its ID.

idstring uuid

ID to uniquely identify this classification run.

classstring

The name of the collection (class) which is used in this classification.

classifyPropertiesstring[]

Which ref-property to set as part of the classification.

basedOnPropertiesstring[]

Base the text-based classification on these fields (of type text).

status'running' | 'completed' | 'failed'

Status of this classification.

typestring

Which algorithm to use for classifications.

settingsobject

Classification-type specific settings.

errorstring

Error message if status == failed.

Example response

{
  "id": "ee722219-b8ec-4db1-8f8d-5150bb1a9e0c",
  "class": "City",
  "classifyProperties": [
    "inCountry"
  ],
  "basedOnProperties": [
    "description"
  ],
  "status": "running",
  "meta": {
    "started": "2017-07-21T17:32:28Z",
    "completed": "2017-07-21T17:32:28Z",
    "count": 147,
    "countSucceeded": 140,
    "countFailed": 7
  },
  "error": "classify xzy: something went wrong",
  "filters": {
    "sourceWhere": {
      "operator": "GreaterThanEqual",
      "path": [
        "inCity",
        "city",
        "name"
      ],
      "valueInt": 2000,
      "valueNumber": 3.14,
      "valueString": "my search term",
      "valueText": "my search term",
      "valueDate": "TODO",
      "valueNumberArray": [
        3.14
      ],
      "valueBooleanArray": [
        true,
        false
      ],
      "valueStringArray": [
        "my search term"
      ],
      "valueTextArray": [
        "my search term"
      ]
    },
    "trainingSetWhere": {
      "operator": "GreaterThanEqual",
      "path": [
        "inCity",
        "city",
        "name"
      ],
      "valueInt": 2000,
      "valueNumber": 3.14,
      "valueString": "my search term",
      "valueText": "my search term",
      "valueDate": "TODO",
      "valueNumberArray": [
        3.14
      ],
      "valueBooleanArray": [
        true,
        false
      ],
      "valueStringArray": [
        "my search term"
      ],
      "valueTextArray": [
        "my search term"
      ]
    },
    "targetWhere": {
      "operator": "GreaterThanEqual",
      "path": [
        "inCity",
        "city",
        "name"
      ],
      "valueInt": 2000,
      "valueNumber": 3.14,
      "valueString": "my search term",
      "valueText": "my search term",
      "valueDate": "TODO",
      "valueNumberArray": [
        3.14
      ],
      "valueBooleanArray": [
        true,
        false
      ],
      "valueStringArray": [
        "my search term"
      ],
      "valueTextArray": [
        "my search term"
      ]
    }
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.