Skip to content

Externally managed custom field

Corridor provides the ability to:

  • Ability to be able to create fields which are “Controlled by External System”
  • Allow users to update these field programmatically.

We support externally managed custom fields to be of the following types:

  • SHORT_TEXT
  • LONG_TEXT
  • SINGLE_SELECT
  • MULTI_SELECT
  • DATE_TIME
  • NUMBER

Updating the values of externally managed custom field

In order to update the custom field, the external app need to do a POST call with objectFields and comment as part of payload. The endpoint would look like below (assuming corridor-api is running on port 5000): http://localhost:5000/api/v1/models/<id>/external/fields

Sample payload

{
  "objectFields": {
    "department": "tech",
    "tenure": 5,
    "expiry_date": "2010-11-12 00:00:00",
    "region": null,
    "model_tags": ["fraud", "uat"]
  },
  "comment": "Automated update of custom-fields"
}

Note

Giving null as value in the payload removes an assigned value for the custom-field

body

objectFields: objectFields accepts a json where the key is the alias of the custom field and the value is the value that needs to be assigned to the custom field for the particular object. This is a mandatory field

comment: comment to be shown in the change history for corresponding change. This is optional.

headers

x-api-key: The secret key has to be part of the API call for authentication

x-workspace-name: Workspace name should be part of the headers, if multiple workspaces are present in the system.

Note

If an external custom field is not provided in the payload the existing value of the custom field will be fetched from the DB and populated.