API Operations for Projects

Summary

Operation Name: Retrieve a Project by Project ID
Relative API Request Path: ~/api/v1/projects/{projectID}
HTTP Verb: GET
Description: Retrieve a single Project by Project ID.

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

Retrieve a Project by Project ID

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

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

Response DTO Schema:

ReadProjectDTO
{
 ExtensionData (array[KeyValuePair[String,Object]]),
 Metadata (array[KeyValuePair[String,Object]]),
 ProjectID (integer),
 ProjectNumber (string),
 Title (string),
 Description (string),
 ProjectManager (string),
 OrganizationID (integer),
 LocationID (string),
 Status (string),
 CloseDate (ISO 8601 string),
 OpenDate (ISO 8601 string),
 TargetDate (ISO 8601 string),
 IsExclusive (boolean),
 CategoryID (integer),
 RequiredByDate (ISO 8601 string),
 EstimatedHours (number),
 ActualHours (number),
 EstimatedBudget (number),
 ActualBudget (number),
 PercentCompleted (number),
 SubStatusID (integer)
}

Request HTTP Verb: GET

Response Status Codes:

  • Success: 200
  • Invalid Project ID: 400 (Bad Request, e.g., a negative integer is supplied)
  • Non-existent Project: 404
  • Invalid Project 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.
  • BREAKING CHANGES from Previous API Versions:
    • The “AutoAssignTo” (string) property has been removed as of Issuetrak API 10.0.ID: 422 (Unprocessable Entity, e.g., a non-numeric value is supplied)

Sample Request URL: ~/api/v1/projects/1

Sample Response:

{
 “ExtensionData”: [],
 “Metadata”: [
  {
   “Key”: “APIVersion”,
   “Value”: “v1”
  },
  {
   “Key”: “QueryDate”,
   “Value”: “2014-12-24T16:13:38.6850608Z”
  }
 ],
 “ProjectID”: 1,
 “ProjectNumber”: “100”,
 “Title”: “Test-Project”,
 “Description”: “This is a test project.”,
 “ProjectManager”: null,
 “OrganizationID”: 2,
 “LocationID”: “HQ”,
 “Status”: “Open”,
 “CloseDate”: null,
 “OpenDate”: “2014-12-23T13:30:00”,
 “TargetDate”: null,
 “IsExclusive”: false,
 “CategoryID”: null,
 “RequiredByDate”: null,
 “EstimatedHours”: 10,
 “ActualHours”: null,
 “EstimatedBudget”: 2500,
 “ActualBudget”: null,
 “PercentCompleted”: null,
 “SubStatusID”: null
}

Retrieve all Projects

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

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

Response DTO Schema:

{
 “IsPageIndexZeroBased”: false,
 “PageIndex”: 0,
 “CountForPage”: 0,
 “PageSize”: 0,
 “TotalCount”: 0,
 “Collection”: [
  {
   “ExtensionData”: [
    “KeyValuePair[String,Object]”
   ],
   “Metadata”: [
    “KeyValuePair[String,Object]”
   ],
   “ProjectID”: 0,
   “ProjectNumber”: "",
   “Title”: "",
   “Description”: "",
   “ProjectManager”: "",
   “OrganizationID”: 0,
   “LocationID”: "",
   “Status”: "",
   “CloseDate”: “ISO 8601 string”,
   “OpenDate”: “ISO 8601 string”,
   “TargetDate”: “ISO 8601 string”,
   “IsExclusive”: false,
   “CategoryID”: 0,
   “RequiredByDate”: “ISO 8601 string”,
   “EstimatedHours”: 0,
   “ActualHours”: 0,
   “EstimatedBudget”: 0,
   “ActualBudget”: 0,
   “PercentCompleted”: 0,
   “SubStatusID”: 0
  }
 ]
}

Request HTTP Verb: GET

Response Status Codes:

  • Success: 200
  • Non-existent Project: 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 ReadProjectDTO objects returned.
  • The ExtensionData property is not implemented in v1 of the API.
  • BREAKING CHANGES from Previous API Versions:
    • The “AutoAssignTo” (string) property has been removed as of Issuetrak API 10.0.

Sample Request URL: ~/api/v1/projects/1

Sample Response:

{
 “IsPageIndexZeroBased”: true,
 “PageIndex”: 0,
 “CountForPage”: 1,
 “PageSize”: 2147483647,
 “TotalCount”: 1,
 “Collection”: [
  {
   “ExtensionData”: [],
   “Metadata”: [
    {
     “Key”: “APIVersion”,
     “Value”: “v1”
    },
    {
     “Key”: “QueryDate”,
     “Value”: “2014-12-24T16:14:09.4182428Z”
    }
   ],
   “ProjectID”: 1,
   “ProjectNumber”: “100”,
   “Title”: “Test-Project”,
   “Description”: “This is a test project.”,
   “ProjectManager”: null,
   “OrganizationID”: 2,
   “LocationID”: “HQ”,
   “Status”: “Open”,
   “CloseDate”: null,
   “OpenDate”: “2014-12-23T13:30:00”,
   “TargetDate”: null,
   “IsExclusive”: false,
   “CategoryID”: null,
   “RequiredByDate”: null,
   “EstimatedHours”: 10,
   “ActualHours”: null,
   “EstimatedBudget”: 2500,
   “ActualBudget”: null,
   “PercentCompleted”: null,
   “SubStatusID”: null
  }
 ]
}