Kantata Kantata OX Knowledge Base
Release Notes
Status Page

Custom Fields

The Custom Fields object allows you to view, create, update, and delete extra fields for additional Estimate, Project, Group, Resource, Task, and User information. If Custom Fields represent the fields themselves, Custom Field Values represent the values in/of those fields.

Fetching a list of Custom Fields

Returns all Custom Fields, unless filter parameters have been applied.

This endpoint returns structured Custom Field objects. As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array and will be indexed by ID in the custom_fields top-level JSON key. Please see our Response Format section for more information.

Request
query Parameters
created_after
string <date-time>

Filter for records created after a specified datetime. The datetime must be in ISO 8601 format.

created_before
string <date-time>

Filter for records created before a specified datetime. The datetime must be in ISO 8601 format.

external_reference_external_message
string

Filter the objects based on the external message of their associated external references. This is an exact match.

external_reference_external_status
string

Filter by the status of the external object in the external system.

external_reference_service_model
string

Filter by the type of the external object this external reference belongs to.

external_reference_service_model_ref
integer <int32>

Filter by the id of the external object this external reference belongs to.

external_reference_service_model_refs
string

Filter for objects that correlate to the specified external object IDs. Provide a comma-separated list of up to 200 external IDs.

external_reference_service_name
string

Filter by the name of the provider for integration.

external_reference_status
string

Filter by the status of the integration, this can be successful or fail.

has_external_references
boolean

Filter by whether or not the object has external references.

include
string

Any of the below associations can be included in your request by providing the include param, e.g. include=association1,association2.

  • choices (CustomFieldChoice) - Includes the ID of a Custom Field's choices.
  • creator (User) - Includes the ID of a Custom Field's creator.
  • custom_field_set (CustomFieldSet) - Includes the ID of the Custom Field Set that a field belongs to.
  • external_references (ExternalReference) - Includes references to external integrations for this object.
matching
string

Filter by custom fields with a name similar to the specified string.

only
string

Allows you to request one or more resources directly by ID. Multiple IDs can be supplied in a comma separated list, like GET /api/v1/workspaces.json?only=5,6,7.

order
string
Default: "name:asc"

Supply order with the name of a valid sort field for the endpoint and a direction.

Valid values: name:asc, name:desc, updated_at:asc, and updated_at:desc.

page
integer <int32>
Default: 1
per_page
integer <int32> <= 200
Default: 20
subject_type
string

Filters for the specified set of Custom Fields:

  • Estimate
  • Story (Task)
  • User
  • Workspace (Project)
  • WorkspaceGroup (Group)
  • Resource.
updated_after
string <date-time>

Filter for records updated after a specified datetime. The datetime must be in ISO 8601 format.

updated_before
string <date-time>

Filter for records updated before a specified datetime. The datetime must be in ISO 8601 format.

without_external_reference_service_name
string

Exclude by the existence of an external reference with the specified service name.

Responses
200

A list of Custom Fields have been retrieved.

Response Schema: application/json
count
integer <int32>
object
Array of objects
object
object
object
object
object
400

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

get/custom_fields
Request samples
Response samples
application/json
{
  • "count": 0,
  • "meta": {
    },
  • "results": [
    ],
  • "custom_fields": {
    },
  • "external_references": {
    },
  • "users": {
    },
  • "custom_field_choices": {
    },
  • "custom_field_sets": {
    }
}

Creating a new Custom Field

This endpoint returns structured Custom Field objects. As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array and will be indexed by ID in the custom_fields top-level JSON key. Please see our Response Format section for more information.

Request
query Parameters
include
string

Any of the below associations can be included in your request by providing the include param, e.g. include=association1,association2.

  • choices (CustomFieldChoice) - Includes the ID of a Custom Field's choices.
  • creator (User) - Includes the ID of a Custom Field's creator.
  • custom_field_set (CustomFieldSet) - Includes the ID of the Custom Field Set that a field belongs to.
  • external_references (ExternalReference) - Includes references to external integrations for this object.
Request Body schema: application/json
required
object
name
required
string

The name of the new field.

value_type
required
string

The format of the custom field's value:

Value Type Format Sample
string <text_string> "foo"
date <ISO_8601 Date Format> "2014-02-25"
number <integer_value> 13
currency [<int_value_in_cents>, <currency_code>] [998, "USD"]
single and multi [<choice_ids>] [1, 2, 4]

This is set to string by default.

default_text
string

The message in an empty custom field, before a string, date, number, or currency value is entered in. This only appears in the UI.

unique_constraint
boolean

A boolean setting that requires a custom field value to be unique across Estimates, Projects, Groups, Resources, Tasks, or Users.

This is set to false by default.

Array of objects

The list of choices a user can select from for a custom field's value(s). A choice has two attributes, a label and an ID. Different choices can have the same label, but every choice will have a unique ID.

For example, a request:

custom_field_choices: {
  ....
  choices: [
    { "label": "Choice A" },
    { "label": "Choice B" },
    { "label": "Choice B" },
    { "label": "Choice B" }
  ]
  ....
}

Will have a response like:

custom_field_choices: { .... choices: [ { "label": "Choice A", "id": "180291" }, { "label": "Choice B", "id": "180301" }, { "label": "Choice B", "id": "180311" }, { "label": "Choice B", "id": "180321" } ] .... }

```

Choices in the UI appear in the same order as listed in the array.

Note that the 2nd, 3rd, and 4th choices all have the same label, but different IDs.

custom_field_set_id
required
integer <int32>

The ID of the Custom Field Set that the field belongs to. When a set ID is not specified, the field is added to a Project set titled 'Default Project Set'. This means it becomes a Project field.

write_access
string

The permission level required for a user to create, update, or delete a custom field's value.

read_access
string

The read_access permission setting on each custom field determines the minimum permission needed to view a custom field and its value.

  • Workspace (Project), Resource, and Story (Task) custom fields are project-specific objects, so their minimum permissions are set at the project level:
    • project_collaboration (default)
    • time_logging
    • financial
    • project_admin

Most account-level permissions supercede project-level permissions. Therefore, Account Administrators are able to view all Project, Resource, and Task custom fields and values across the account, regardless of project participation or read_access settings.

  • Estimate, WorkspaceGroup (Group), and User custom fields are account-wide objects, so their minimum permissions are set at the account level:
    • account_collaboration
    • project_creator
    • project_lead
    • reports_viewer
    • reports_viewer_with_cost
    • account_admin (default).
Responses
200

Custom Field has been created.

Response Schema: application/json
count
integer <int32>
object
Array of objects
object
object
object
object
object
400

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

post/custom_fields
Request samples
application/json
{
  • "custom_field": {
    }
}
Response samples
application/json
{
  • "count": 0,
  • "meta": {
    },
  • "results": [
    ],
  • "custom_fields": {
    },
  • "external_references": {
    },
  • "users": {
    },
  • "custom_field_choices": {
    },
  • "custom_field_sets": {
    }
}

Updating an existing Custom Field

Updates an existing custom field.

Parameters that cannot be updated

Note that the unique_constraint and value_type parameters cannot be updated. They are set during the process of creating a custom field.

Updating choices

This endpoint also allows you to update the list of choices for a custom field with single or multiple choices. For important details regarding how this endpoint affects the list of available choices and how to avoid creating duplicate choices, see the description of the choice body parameter.

This endpoint returns structured Custom Field objects. As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array and will be indexed by ID in the custom_fields top-level JSON key. Please see our Response Format section for more information.

Request
path Parameters
id
required
integer

The ID of the Model.

query Parameters
include
string

Any of the below associations can be included in your request by providing the include param, e.g. include=association1,association2.

  • choices (CustomFieldChoice) - Includes the ID of a Custom Field's choices.
  • creator (User) - Includes the ID of a Custom Field's creator.
  • custom_field_set (CustomFieldSet) - Includes the ID of the Custom Field Set that a field belongs to.
  • external_references (ExternalReference) - Includes references to external integrations for this object.
Request Body schema: application/json
required
object
name
string

The name of the field.

default_text
string

The message in an empty custom field, before a string, date, number, or currency value is entered in. This only appears in the UI.

Array of objects

The list of choices a user can select from, for a custom field's value(s). Setting this field updates a custom field's complete list of choices; it behaves as an overwrite. Include all existing choices in your request, whether you are updating their label or not. Any choices not included in your request will be deleted from the custom field.

How to avoid creating duplicate choices

Choices have two attributes, a label and an ID. Different choices can have the same label, but every choice has a unique ID. To properly update an existing choice within a list, you must specify the ID of the choice you want to change. If you do not, a new choice with a unique, new ID is created instead.

For example:

custom_field_choices: {
  ....
  choices: [
    { "label": "Choice A", "id": "180291" },
    { "label": "Choice B", "id": "180301" },
    { "label": "Choice C" }
  ]
  ....
}

Choices in the UI appear in the same order as listed in the array.

The 1st choice is an existing choice with an ID of 180291, and is either staying or being updated to Choice A. The 2nd choice is an existing choice with an ID of 180301, and is either staying or being updated to Choice B. The 3rd choice is a new choice to create, Choice C, and its unique ID will be returned in the response.

custom_field_set_id
integer <int32>

The ID of the Custom Field Set that the field belongs to. When a set ID is not specified, the field is added to a Project set titled 'Default Project Set'. This means it becomes a Project field.

write_access
string

The permission level required for a user to create, update, or delete a custom field value for a subject.

read_access
string

The read_access permission setting on each custom field determines the minimum permission needed to view a custom field and its value.

  • Workspace (Project), Resource, and Story (Task) custom fields are project-specific objects, so their minimum permissions are set at the project level:
    • project_collaboration (default)
    • time_logging
    • financial
    • project_admin

Most account-level permissions supercede project-level permissions. Therefore, Account Administrators are able to view all Project, Resource, and Task custom fields and values across the account, regardless of project participation or read_access settings.

  • Estimate, WorkspaceGroup (Group), and User custom fields are account-wide objects, so their minimum permissions are set at the account level:
    • account_collaboration
    • project_creator
    • project_lead
    • reports_viewer
    • reports_viewer_with_cost
    • account_admin (default).
Responses
200

Custom Field has been updated.

Response Schema: application/json
count
integer <int32>
object
Array of objects
object
object
object
object
object
400

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

put/custom_fields/{id}
Request samples
application/json
{
  • "custom_field": {
    }
}
Response samples
application/json
{
  • "count": 0,
  • "meta": {
    },
  • "results": [
    ],
  • "custom_fields": {
    },
  • "external_references": {
    },
  • "users": {
    },
  • "custom_field_choices": {
    },
  • "custom_field_sets": {
    }
}

Deleting an existing Custom Field

Deletes a custom field. Custom field values are deleted with their custom fields.

The response will contain no content and an HTTP 204 status code if the request was successful, or a standard Kantata OX error message explaining why the object could not be deleted.

Request
path Parameters
id
required
integer

The ID of the Model.

Responses
204

Custom Field has been deleted.

400

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

delete/custom_fields/{id}
Request samples
Response samples
application/json
{
  • "errors": [
    ]
}