Date: Fri, 29 Mar 2024 14:39:11 +0000 (UTC) Message-ID: <891591986.12471.1711723151928@catch-kbase-p> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_12470_1546366217.1711723151926" ------=_Part_12470_1546366217.1711723151926 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Custom fields (collection) resource
Root Relation: CustomFields
This resource supports the following methods: GET POST
Retrieves all custom fields.
This method supports the OData parameters $filter, $top, $take, $orderby= and $inlinecount. See = OData Topic for more details.
These are the expected status codes returned by the service - in additio= n, some other status codes may be returned if either an internal error occu= rs or there is an authentication issue (such as an expired OAuth token).
Status | Description |
---|---|
200 - OK | Returned if the request was completed successful= ly. |
404 - NotFound | Returned if the custom field type does not exist= . |
An Example of fetching all custom fields.
Request Headers
Key | Value | Description |
---|---|---|
Accept | application/json |
Response Headers
Key | Value | Description |
---|---|---|
Content-Type | application/json; charset=3Dutf-8 |
Response Body
{ "Items": [ { "Id": "4b4329a0-44a3-4e3c-a527-6973bb2b063b", "Name": "IsRegression", "CustomFieldTypeName": "Checkbox", "Label": "Is Regression?", "Description": null, "Required": false, "Entities": [ "TestScript", "Requirement", "Incident" ], "Scopes": [ { "Type": "Project", "Id": "d17289f6-8f43-4074-88d0-3841f9830b19", "Name": "Test Project" } ], "Expands": [ "Configuration", "Options", "Type" ], "Self": "http://localhost/api/customfield/IsRegression", "Links": [ { "Href": "http://localhost/api/customfieldtype/checkbox", "Rel": "CustomFieldType" } ] }, { "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", "Options", "Type" ], "Self": "http://localhost/api/customfield/Severity", "Links": [ { "Href": "http://localhost/api/customfieldtype/combobox", "Rel": "CustomFieldType" } ] } ] }
Status Code
200 - OK
An Example of fetching subset of custom fields using OData filter and ex= pansion for options.
Request Headers
Key | Value | Description |
---|---|---|
Accept | application/json |
Request Parameters
Key | Value | Description |
---|---|---|
$filter | CustomFieldTypeName eq 'ComboBox' | Fetch all custom fields of type combo box. |
$expand | Options | Expands the options for any matching field. |
Response Headers
Key | Value | Description |
---|---|---|
Content-Type | application/json; charset=3Dutf-8 |
Response Body
{ "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
Create 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 occur= s or there is an authentication issue (such as an expired OAuth token).
Status | Description |
---|---|
201 - Created | Returned if the custom field is created successf= ully. |
409 - Conflict | Returned if the custom field already exists. |
Example - POST (create a Combo Box field)
Request Headers
Key | Value | Description |
---|---|---|
Content-Type | application/json |
Request Body
{ "Name": "CSTest", "HandlerType": "ComboBox", "Label": "CS Test Label", "Description": "This is a custom field test.", "Required": false, "Entities": ["Requirement", "TestScript"], "Scopes": [{ "Type": "Project", "Id": "d31d4c3e-dfea-4204-a9dd-a54f00b8af79", }, { "Type": "Project", "Id": "c5b7e6d0-4f8b-482b-bd71-a47600e37658", }] }
Status Code
201 - Created