API Operations for MenuItems

Note: Menu Items are called "Custom Links" within the product UI.


Summary

Operation Name: Retrieve a MenuItem by MenuItem ID
Relative API Request Path: ~/api/v1/menuitems/{menuItemID}
HTTP Verb: GET
Description: Retrieve a single MenuItem by MenuItem ID.

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


 

Retrieve a MenuItem by MenuItem ID

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

When retrieving a MenuItem using the API, no special character decoding (e.g., HTML decoding &lt; as < or &gt; as >) is performed. Therefore, please note that the MenuItem Name returned via the API method represents the MenuItem Name as stored within the Issuetrak database. Thus, when retrieving a MenuItem created through the Issuetrak web interface where HTML encoding of the MenuItemName 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 ReadMenuItemDTO instance.

Response DTO Schema:
ReadMenuItemDTO
{
 ExtensionData (Array[CustomKeyValuePairDataElement]),
 Metadata (Array[CustomKeyValuePairDataElement]),
 MenuItemID (integer),
 MenuID (integer),
 MenuName (string),
 MenuPage (string)
}
CustomKeyValuePairDataElement
{
 Key (string),
 Value (string)
}

Request HTTP Verb: GET

Response Status Codes:

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

Response Properties:

  • 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/menuitems/1

Sample Response:
{
 “ExtensionData”: [],
 “Metadata”: [
  {
   “Key”: “APIVersion”,
   “Value”: “12.5”
  },
  {
   “Key”: “QueryDate”,
   “Value”: “2015-03-24T16:07:36.500667Z”
  }
 ],
 “MenuItemID”: 2,
 “MenuID”: 2,
 “MenuName”: “Submit Issue”,
 “MenuPage”: “CSIssue_Submit.asp”
}

 

Retrieve all MenuItems

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

When retrieving a MenuItem using the API, no special character decoding (e.g., HTML decoding &lt; as < or &gt; as >) is performed. Therefore, please note that the MenuItemName returned via the API method represents the MenuItemName as stored within the Issuetrak database. Thus, when retrieving a Cause created through the Issuetrak web interface where HTML encoding of the MenuItemName 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 ReadMenuItemDTO instance.

Response DTO Schema:
QueryResultsContainer[ReadMenuItemDTO]
{
 IsPageIndexZeroBased (boolean),
 PageIndex (integer),
 CountForPage (integer),
 PageSize (integer),
 TotalCount (integer),
 Collection (Array[ReadMenuItemDTO])
}
ReadMenuItemDTO
{
 ExtensionData (Array[CustomKeyValuePairDataElement]),
 Metadata (Array[CustomKeyValuePairDataElement]),
 MenuItemID (integer),
 MenuID (integer),
 MenuName (string),
 MenuPage (string)
}
CustomKeyValuePairDataElement
{
 Key (string),
 Value (string)
}

Request HTTP Verb: GET

Response Status Codes:

  • Success: 200
  • Non-existent MenuItem: 404
Response Properties:
  • 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 ReadMenuItemDTO objects returned.
  • The ExtensionData property is not implemented in v1 of the API.

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

Sample Response:
{
 “IsPageIndexZeroBased”: true,
 “PageIndex”: 0,
 “CountForPage”: 1,
 “PageSize”: 2147483647,
 “TotalCount”: 1,
 “Collection”: [
  {
   “ExtensionData”: [],
   “Metadata”: [
    {
     “Key”: “APIVersion”,
     “Value”: “12.5”
    },
    {
     “Key”: “QueryDate”,
     “Value”: “2015-03-24T16:08:21.0863244Z”
    }
   ],
   “MenuItemID”: 2,
   “MenuID”: 2,
   “MenuName”: “Submit Issue”,
   “MenuPage”: “CSIssue_Submit.asp”
  }
 ]
}