Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This resource supports the following methods: GET, POST

Methods

GET

...

Retrieves all custom fields.

...

Example - Get custom fields using OData filter

An Example of fetching subset of custom fields using OData filter and expansion for options.

Request Headers

KeyValueDescription
Acceptapplication/json

Request Parameters

KeyValueDescription
$filterCustomFieldTypeName eq 'ComboBox'Fetch all custom fields of type combo box.
$expandOptionsExpands the options for any matching field.

Response Headers

KeyValueDescription
Content-Typeapplication/json; charset=utf-8

Response Body

Code Block
languagenone
{
  "Items": [
    {
      "Id": "8b385cac-fcbf-4d27-83d0-132e121e8ea1",
      "Name": "Severity",
      "CustomFieldTypeName": "ComboBox",
      "Label": "Severity",
      "Description": null,
      "Required": true,
      "Entities": [
        "Incident"
      ],
      "Scopes": [
        {
          "Type": "Organisation",
          "Id": "3d0d2ebf-d9c4-40bb-ab8e-85d63dab1f8a",
          "Name": "Testing Intl"
        }
      ],
      "Expands": [
        "Configuration",
        "Type"
      ],
      "Options": [
        {
          "Identifier": "05ec42ae-2713-4d51-9306-3226a2446712",
          "Text": "Low"
        },
        {
          "Identifier": "05ec42ae-2713-4d51-9306-3226a2446712",
          "Text": "Medium"
        },
        {
          "Identifier": "05ec42ae-2713-4d51-9306-3226a2446712",
          "Text": "High"
        }
      ],
      "Self": "http://localhost/api/customfield/Severity",
      "Links": [
        {
          "Href": "http://localhost/api/customfieldtype/combobox",
          "Rel": "CustomFieldType"
        }
      ]
    }
  ]
}

Status Code

200 - OK

POST

...

Add a new custom field.

Status Codes

These are the expected status codes returned by the service. In addition, some other status codes may be returned if either an internal error occurs or there is an authentication issue (such as an expired OAuth token).

StatusDescription
201 - CreatedReturned if the custom field is created successfully.
409 - ConflictReturned if the custom field already exists.