PATCH
/
v3
/
collections
/
{identifier}
/
fields
/
{datapoint_identifier}
Update data field for a collection assosciated with a data point.
curl --request PATCH \
  --url https://{region}.affinda.com/v3/collections/{identifier}/fields/{datapoint_identifier} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "label": "<string>",
  "fieldType": "text",
  "mandatory": true,
  "showDropdown": true,
  "displayEnumValue": true,
  "autoValidationThreshold": 0.5,
  "enableAutoValidationThreshold": true,
  "dataSource": "<string>",
  "mapping": "<string>",
  "displayRawText": "<string>"
}'
{
  "label": "<string>",
  "fieldType": "text",
  "mandatory": true,
  "showDropdown": true,
  "displayEnumValue": true,
  "autoValidationThreshold": 0.5,
  "enableAutoValidationThreshold": true,
  "dataSource": "<string>",
  "mapping": "<string>",
  "displayRawText": "<string>"
}

Authorizations

Authorization
string
header
required

Basic authentication using an API key, e.g. {Authorization: Bearer aff_0bb4fbdf97b7e4111ff6c0015471094155f91}. You can find your API key within the Settings page of the Affinda web app. You can obtain an API key by signing up for a free trial.

Path Parameters

identifier
string
required

Collection's identifier

Example:

"mEFayXdO"

datapoint_identifier
string
required

Datapoint's identifier

Example:

"XprEvgai"

Body

application/json

Data field properties to update

label
string
fieldType
enum<string>

The different data types of annotations

Available options:
text,
integer,
float,
decimal,
date,
datetime,
daterange,
boolean,
enum,
location,
phonenumber,
json,
table,
expectedremuneration,
jobtitle,
language,
skill,
yearsexperience,
group,
table_deprecated,
url,
image,
docclf
mandatory
boolean
showDropdown
boolean
deprecated
displayEnumValue
boolean

If true, both the value and the label for the enums will appear in the dropdown in the validation tool.

autoValidationThreshold
number | null

Threshold for auto validation. If null, uses the collection's autoValidationThreshold.

Required range: 0 <= x <= 1
enableAutoValidationThreshold
boolean | null

If true, the autoValidationThreshold enable auto validation from the threshold from this field if specified, else from the collection

dataSource
string | null

Data source mapping identifier

mapping
string | null

Defines how the data point is mapped to the data source

displayRawText
string | null

Defines how the data point is mapped to the data source

Response

Successfully updated data field.

label
string
fieldType
enum<string>

The different data types of annotations

Available options:
text,
integer,
float,
decimal,
date,
datetime,
daterange,
boolean,
enum,
location,
phonenumber,
json,
table,
expectedremuneration,
jobtitle,
language,
skill,
yearsexperience,
group,
table_deprecated,
url,
image,
docclf
mandatory
boolean
showDropdown
boolean
deprecated
displayEnumValue
boolean

If true, both the value and the label for the enums will appear in the dropdown in the validation tool.

autoValidationThreshold
number | null

Threshold for auto validation. If null, uses the collection's autoValidationThreshold.

Required range: 0 <= x <= 1
enableAutoValidationThreshold
boolean | null

If true, the autoValidationThreshold enable auto validation from the threshold from this field if specified, else from the collection

dataSource
string | null

Data source mapping identifier

mapping
string | null

Defines how the data point is mapped to the data source

displayRawText
string | null

Defines how the data point is mapped to the data source