API Operations for User-Defined Field Types

Summary

Operation Name: Retrieve a UserDefined FieldType by ID
Relative API Request Path: ~/api/v1/userdefinedfieldtypes/{userDefinedFieldTypeID}
HTTP Verb: GET
Description: Retrieve a single UserDefinedFieldType by UserDefinedFieldType ID.

Operation Name: Retrieve all UserDefinedFieldTypes
Relative API Request Path: ~/api/v1/userdefinedfieldtypes
HTTP Verb: GET
Description: Retrieve a collection of currently defined UserDefinedFieldTypes.

Retrieve a UserDefined FieldType by ID

Description: This API method retrieves a UserDefinedFieldType from the Issuetrak data store for a specified UserDefinedFieldType ID. The “UserDefinedFieldTypeID” parameter must correspond to an existing UserDefinedFieldType. If there is no such UserDefinedFieldType ID, an error message will be returned with an HTTP response status code of 404.

When retrieving a UserDefinedFieldType using the API, no special character decoding (e.g., HTML decoding &lt; as < or &gt; as >) is performed. Therefore, please note that the DisplayName returned via the API method represents the DisplayName as stored within the Issuetrak database. Thus, when retrieving a UserDefinedFieldType created through the Issuetrak web interface where HTML encoding of the DisplayName is performed, the API consumer may desire to perform additional client-side decoding.

A successful response will include an HTTP status code of 200 (OK) and a response body containing a serialized ReadUserDefinedFieldTypeDTO instance.

Response DTO Schema:

ReadUserDefinedFieldTypeDTO
{
 “ExtensionData”: [
  {
   “Key”: “string”,
   “Value”: {}
  }
 ],
 “Metadata”: [
  {
   “Key”: “string”,
   “Value”: {}
  }
 ],
 “UserDefinedFieldID”: 0,
 “UserDefinedKeyID”: 0,
 “DisplayName”: “string”,
 “IsPrivate”: true,
 “TextDisplayWidth”: 0,
 “ReferenceNumber”: 0
}

Request HTTP Verb: GET

Response Status Codes:

  • Success: 200
  • Invalid UserDefinedFieldType ID: 400 (Bad Request, e.g., a negative integer is supplied)
  • Non-existent UserDefinedFieldType: 404
  • Invalid UserDefinedFieldType ID: 422 (Unprocessable Entity, e.g., a non-numeric value is supplied)

Response DTO Property Notes:

  • The ExtensionData property is not used in version 1 of the API.
  • The Metadata property provides a key/value collection of additional data about the API operation and/or the response body.

Sample Request URL: ~/api/v1/userdefinedfieldtypes/4

Sample Response:

{
 “ExtensionData”: [],
 “Metadata”: [
  {
   “Key”: “APIVersion”,
   “Value”: “v1”
  },
  {
   “Key”: “QueryDate”,
   “Value”: “2014-12-24T16:15:35.5023536Z”
  }
 ],
 “UserDefinedFieldID”: 4,
 “UserDefinedKeyID”: 2,
 “DisplayName”: “Large Text 1”,
 “IsPrivate”: false,
 “TextDisplayWidth”: 0,
 “ReferenceNumber”: 1
}

Retrieve all UserDefinedFieldTypes

Description: This API method retrieves a collection of all currently-defined UserDefinedFieldType entities from the Issuetrak data store.

When retrieving a UserDefinedFieldType using the API, no special character decoding (e.g., HTML decoding &lt; as < or &gt; as >) is performed. Therefore, please note that the DisplayName returned via the API method represents the DisplayName as stored within the Issuetrak database. Thus, when retrieving a UserDefinedFieldType created through the Issuetrak web interface where HTML encoding of the DisplayName is performed, the API consumer may desire to perform additional client-side decoding.

A successful response will include an HTTP status code of 200 (OK) and a response body containing a serialized collection of ReadUserDefinedFieldTypeDTO instance.

Response DTO Schema:

{
 “IsPageIndexZeroBased”: true,
 “PageIndex”: 0,
 “CountForPage”: 0,
 “PageSize”: 0,
 “TotalCount”: 0,
 “Collection”: [
  {
   “ExtensionData”: [
    {
     “Key”: “string”,
     “Value”: {}
    }
   ],
   “Metadata”: [
    {
     “Key”: “string”,
     “Value”: {}
    }
   ],
   “UserDefinedFieldID”: 0,
   “UserDefinedKeyID”: 0,
   “DisplayName”: “string”,
   “IsPrivate”: true,
   “TextDisplayWidth”: 0,
   “ReferenceNumber”: 0
  }
 ]
}

Request HTTP Verb: GET

Response Status Codes:

  • Success: 200
  • Non-existent UserDefinedFieldType: 404

Response DTO Property Notes:

  • The IsPageIndexZeroBased property value is always true. This property is included for use in future API versions.
  • The PageIndex property value is always 0. This property is included for use in future API versions.
  • The CountForPage property value is always the same as TotalCount. This property is included for use in future API versions.
  • The PageSize property value is always the maximum value for a signed, 32-bit integer. This property is included for use in future API versions.
  • The TotalCount property value is the number of records returned in the collection.
  • The Collection property is an array containing the ReadUserDefinedFieldTypeDTO objects returned.
  • The ExtensionData property is not implemented in v1 of the API.

Sample Request URL: ~/api/v1/userdefinedfieldtypes/

Sample Response:

{
 “IsPageIndexZeroBased”: true,
 “PageIndex”: 0,
 “CountForPage”: 10,
 “PageSize”: 2147483647,
 “TotalCount”: 10,
 “Collection”: [
  {
   “ExtensionData”: [],
   “Metadata”: [
    {
     “Key”: “APIVersion”,
     “Value”: “v1”
    },
    {
     “Key”: “QueryDate”,
     “Value”: “2014-12-24T16:16:12.6629828Z”
    }
   ],
   “UserDefinedFieldID”: 1,
   “UserDefinedKeyID”: 1,
   “DisplayName”: “Primary Sec ID”,
   “IsPrivate”: false,
   “TextDisplayWidth”: 5,
   “ReferenceNumber”: 1
  }
 ]
}