Custom Fields

Although Limecraft Flow already has a lot of built-in fields, it is often useful to be able to define your own fields, relevant to your use case.

Custom Fields can be used to attach custom metadata properties to Annotations. For example, production A might need 'location', 'camera type' and 'journalist' fields. Production B might need 'vessel' and 'machine number' custom fields.

CustomFieldsDescription: Setting up custom fields

The structure and presence of custom fields can be defined and limited by using CustomFieldsDescriptions.

CustomFields also exist on the EditorialObject level. That is documented here.

Each time a custom field is updated or created on an annotation, that field is validated against the CustomFieldsDescription of the production.

Get CustomFieldsDescription

GET /production/{prId}/cfd

This API call retrieves the custom fields description for annotations.

Details
Description
Parameters
Path Parameters
Name Description Required Type

prId

Long

Return Type

CustomFieldsDescription

Field Name Required Type Description Format

allowUndefinedFields

Boolean

clientSettings

Object

fields

Map of CustomFieldDescription

name

String

Content Type
  • application/json

Responses
Table 1. http response codes
Code Description Datatype

200

The request was successful.

CustomFieldsDescription

403

The user needs PRODUCTION_VIEW rights.

ForbiddenError

404

The production was not found.

NotFoundError

Update CustomFieldsDescription

To make changes, save the CustomFieldsDescription.

PUT /production/{prId}/cfd

This API call sets the custom fields description for annotations.

Details
Description
Parameters
Path Parameters
Name Description Required Type

prId

Long

Body Parameters
Name Description Required Type

CustomFieldsDescription

CustomFieldsDescription

CustomFieldsDescription

Field Name Required Type Description Format

allowUndefinedFields

Boolean

clientSettings

Object

fields

Map of CustomFieldDescription

name

String

Return Type

CustomFieldsDescription

Field Name Required Type Description Format

allowUndefinedFields

Boolean

clientSettings

Object

fields

Map of CustomFieldDescription

name

String

Content Type
  • application/json

Responses
Table 2. http response codes
Code Description Datatype

200

The request was successful.

CustomFieldsDescription

403

The user needs PRODUCTION_MANAGE rights.

ForbiddenError

404

The production or custom field description was not found.

NotFoundError

409

The version in the update object does not match with the version stored causing an optimistic lock.

ConflictError

It is possible to update only a single field of the CustomFieldsDescription too:

PUT /production/{prId}/cfd/{property}

__

Details
Description
Parameters
Path Parameters
Name Description Required Type

prId

Long

property

String

Body Parameters
Name Description Required Type

CustomFieldDescription

CustomFieldDescription

CustomFieldDescription

Field Name Required Type Description Format

autocompleteExtractor

String

autocompleteUrl

String

blackList

List of string

clientConfig

Object

clipAllowed

Boolean

defaultValue

Object

description

String

hidden

Boolean

label

String

multiValued

Boolean

order

Double

double

readOnly

Boolean

requiresId

Boolean

restrictedTo

List of string

skipWhiteListValidation

Boolean

subClipAllowed

Boolean

thesaurus

String

type

String

Enum: STRING, BOOLEAN, INTEGER, DATE, DOUBLE, LONG, JSON, TEXT, FRAME, COMPOUND, FLOW_ID, FLOW_OBJECT,

userProperties

Map of string

validation

String

whiteList

List of string

Return Type

CustomFieldsDescription

Field Name Required Type Description Format

allowUndefinedFields

Boolean

clientSettings

Object

fields

Map of CustomFieldDescription

name

String

Content Type
  • application/json

Responses
Table 3. http response codes
Code Description Datatype

0

default response

CustomFieldsDescription

Example
{
  "fields": {
    "workflowStatus": {
      "order": 0,
      "validation": "",
      "type": "STRING",
      "defaultValue": "",
      "label": "Workflow Status",
      "multiValued": false,
      "requiresId": false,
      "whiteList": [],
      "blackList": [],
      "skipWhiteListValidation": true,
      "readOnly": true,
      "hidden": false,
      "clipAllowed": true,
      "subClipAllowed": true,
      "restrictedTo": []
    },
    "origin": {
      "order": 1,
      "validation": "",
      "type": "STRING",
      "defaultValue": "",
      "label": "Origin",
      "multiValued": false,
      "requiresId": false,
      "whiteList": [
        "Customer material",
        "Archived digital material",
        "Archived physical material",
        "Internal manufacturing"
      ],
      "blackList": [],
      "skipWhiteListValidation": false,
      "readOnly": false,
      "hidden": false,
      "clipAllowed": true,
      "subClipAllowed": true,
      "restrictedTo": []
    },
    "workflowHistory": {
      "order": 2,
      "validation": "",
      "type": "TEXT",
      "defaultValue": "",
      "label": "Workflow History",
      "multiValued": false,
      "requiresId": false,
      "whiteList": [],
      "blackList": [],
      "skipWhiteListValidation": true,
      "readOnly": true,
      "hidden": false,
      "clipAllowed": true,
      "subClipAllowed": true,
      "restrictedTo": []
    },
    "mezzanineformat": {
      "order": 3,
      "validation": "",
      "type": "BOOLEAN",
      "defaultValue": false,
      "label": "Mezzanine format",
      "multiValued": false,
      "requiresId": false,
      "whiteList": [],
      "blackList": [],
      "skipWhiteListValidation": false,
      "readOnly": false,
      "hidden": false,
      "clipAllowed": true,
      "subClipAllowed": true,
      "restrictedTo": []
    }
  },
  "allowUndefinedFields": true
}

Setting the value of a custom field

Once the CustomFieldsDescription is set up, you can start saving values to them.

Adding custom fields is done by updating the Annotation object. To update the custom field of a moa, use the /moa url as shown below.

PATCH /api/production/7238/an/3085614

[
    {
        "op": "add",
        "path": "/customFields/author",
        "value": {
            "type": "STRING",
            "label": "author",
            "multiValued": false,
            "values": [
                "John Irving"
            ]
        }
    }
]