API Operations for Organizations

Summary

Operation Name: Retrieve an Organization by Organization ID
Relative API Request Path: ~/api/v1/organizations/{organizationID}
HTTP Verb: GET
Description: Retrieve a single Organization by Organization ID.

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

Operation Name: Create an Organization (Issuetrak 10.3.0)
Relative API Request Path: ~/api/v1/organizations
HTTP Verb: POST
Description: Creates a new Organization associated with a specific OrganizationID

Operation Name: Update an Organization (Issuetrak 10.3.0)
Relative API Request Path: ~/api/v1/organizations
HTTP Verb: PUT
Description: Updates an existing Organization associated with a specific OrganizationID

Retrieve an Organization by Organization ID

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

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

Response DTO Schema:

ReadOrganizationDTO
{
 ExtensionData (array[KeyValuePair[String,Object]]),
 Metadata (array[KeyValuePair[String,Object]]),
 OrganizationID": 0,
 OrganizationName“: ”",
 DisplayOrder": 0
}

Request HTTP Verb: GET

Response Status Codes:

  • Success: 200
  • Invalid Organization ID: 400 (Bad Request, e.g., a negative integer is supplied)
  • Non-existent Organization: 404
  • Invalid Organization 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.

Sample Request URL: ~/api/v1/organizations/11

Sample Response:

{
 “ExtensionData”: [],
 “Metadata”: [
  {
   “Key”: “APIVersion”,
   “Value”: “v1”
  },
  {
   “Key”: “QueryDate”,
   “Value”: “2014-12-09T20:19:23.9695584Z” 
  }
 ],
 “OrganizationID”: 11,
 “OrganizationName”: “Duplicate Ticket”,
 “DisplayOrder”: 0
}

Retrieve all Organizations

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

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

Response DTO Schema:

{
 “IsPageIndexZeroBased”: false,
 “PageIndex”: 0,
 “CountForPage”: 0,
 “PageSize”: 0,
 “TotalCount”: 0,
 “Collection”: [
  {
   “ExtensionData”: [
    “KeyValuePair[String,Object]”
   ],
   “Metadata”: [
    “KeyValuePair[String,Object]”
   ],
   “OrganizationID”: 0,
   “OrganizationName”: "",
   “DisplayOrder”: 0
  }
 ]
}

Request HTTP Verb: GET

Response Status Codes:

  • Success: 200
  • Non-existent Organization: 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 ReadOrganizationDTO 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/organizations/

Sample Response:

{
 “IsPageIndexZeroBased”: true,
 “PageIndex”: 0,
 “CountForPage”: 1,
 “PageSize”: 2147483647,
 “TotalCount”: 1,
 “Collection”: [
  {
   “ExtensionData”: [“KeyValuePair[String,Object]”],
   “Metadata”: [“KeyValuePair[String,Object]”],
   “OrganizationID”: 0,
   “OrganizationName”: "",
   “DisplayOrder”: 0
  }
 ]
}

Create an Organization

Description: This API method creates a new Organization associated with a specific OrganizationID within the Issuetrak data store. The CreateOrganizationModel object conveys the properties of the new Organization.

The response code on success will be 201 (Created), and the response body will represent the text value representing the ID of the newly-created Organization.

When creating a Organization using the API, no special character decoding (e.g., HTML decoding &lt; as < or &gt; as >) is performed.

All string properties have a maximum length of 50 unless specified otherwise.

Response DTO Schema:

CreateOrganizationModel {
 OrganizationName (string),
 Address1 (string),
 Address2 (string),
 City (string),
 State (string),
 Zip (string),
 Phone (string),
 WebAddress (string),
 IsInternalOnly (boolean),
 UserDefined1 (string),
 UserDefined2 (string),
 UserDefined3 (string),
 UserDefined4 (string),
 UserDefined5 (string),
 UserDefinedID1 (integer),
 UserDefinedID2 (integer),
 UserDefinedID3 (integer),
 UserDefinedID4 (integer),
 UserDefinedID5 (integer),
 UserDefinedDate1 (string): ISO 8601 string ,
 UserDefinedDate2 (string): ISO 8601 string ,
 Note (string),
 ContactPerson (string),
 Email (string),
 BillingReference (string),
 TitleLogoLeftLink (string),
 TitleLogoRightLink (string),
 SiteTitle (string),
 EmailFromName (string),
 EmailFromAddress (string)
}

Request HTTP Verb: POST

Response Status Codes:

  • Success: 201
  • Invalid Data: 400 (Bad Request, e.g., a negative integer is supplied)
  • Invalid Organization DTO: 422 (Unprocessable Entity, e.g., a non-numeric value is supplied)

Response DTO Property Notes:

  • The OrganizationName property value is required.
  • The Address1 property value is not required.
  • The Address2 property value is not required.
  • The City property value is not required.
  • The State property value is not required. Maximum length of 20.
  • The Zip property value is not required. Maximum length of 20.
  • The Phone property value is not required.
  • The WebAddress property value is not required. Maximum length of 1000.
  • The IsInternalOnly property value is not required.
  • The UserDefined1 property value is not required. Maximum length of 200.
  • The UserDefined2 property value is not required. Maximum length of 200.
  • The UserDefined3 property value is not required. Maximum length of 200.
  • The UserDefined4 property value is not required. Maximum length of 200.
  • The UserDefined5 property value is not required. Maximum length of 200.
  • The UserDefinedID1 property value is specified, the value must reference an existing UserDefinedList1 within the Issuetrak application.
  • The UserDefinedID2 property value is specified, the value must reference an existing UserDefinedList2 within the Issuetrak application.
  • The UserDefinedID3 property value is specified, the value must reference an existing UserDefinedList3 within the Issuetrak application.
  • The UserDefinedID4 property value is specified, the value must reference an existing UserDefinedList4 within the Issuetrak application.
  • The UserDefinedID5 property value is specified, the value must reference an existing UserDefinedList5 within the Issuetrak application.
  • The UserDefinedDate1 property value is Not required.
  • The UserDefinedDate2 property value is Not required.
  • The Note property value is Not required. Maximum length of 1000.
  • The ContactPerson property value is Not required.
  • The Email property must be a valid email if set.
  • The BillingReference property value is Not required.
  • The TitleLogoLeftLink property must be a valid url if set. Maximum length of 500.
  • The TitleLogoRightLink property must be a valid url if set. Maximum length of 500.
  • The SiteTitle property value is Not required. Maximum length of 500.
  • The EmailFromName property value is Not required.
  • The EmailFromAddress property value is required only if EmailFromName is specified.

Sample Request URL: ~/api/v1/organizations

Update an Organization

Description: This API method updates an existing Organization associated with a specific OrganizationID within the Issuetrak data store. The UpdateOrganizationModel object conveys the properties of the Organization. If invalid data are supplied, an error message will be returned with a 400 HTTP status code.

The response code on success will be 200 (OK), and the response body will represent the text value representing the ID of the Organization.

When updating a Organization using the API, no special character decoding (e.g., HTML decoding &lt; as < or &gt; as >) is performed.

All string properties have a max length of 50 unless specified otherwise

Response DTO Schema:

UpdateOrganizationModel {
 OrganizationID (integer),
 IssueTrakUser (string),
 OrganizationName (string),
 Address1 (string),
 Address2 (string),
 City (string),
 State (string),
 Zip (string),
 Phone (string),
 WebAddress (string),
 IsInternalOnly (boolean),
 UserDefined1 (string),
 UserDefined2 (string),
 UserDefined3 (string),
 UserDefined4 (string),
 UserDefined5 (string),
 UserDefinedID1 (integer),
 UserDefinedID2 (integer),
 UserDefinedID3 (integer),
 UserDefinedID4 (integer),
 UserDefinedID5 (integer),
 UserDefinedDate1 (string): ISO 8601 string ,
 UserDefinedDate2 (string): ISO 8601 string ,
 Note (string),
 ContactPerson (string),
 Email (string),
 BillingReference (string),
 TitleLogoLeftLink (string),
 TitleLogoRightLink (string),
 SiteTitle (string),
 EmailFromName (string),
 EmailFromAddress (string)
}

Request HTTP Verb: PUT

Response Status Codes:

  • Success: 200
  • Invalid Data: 400 (Bad Request, e.g., a negative integer is supplied)
  • Invalid Organization DTO: 422 (Unprocessable Entity, e.g., a non-numeric value is supplied)

Response DTO Property Notes:

  • The OrganizationID property value is required.
  • If the IssueTrakUser property value is specified, the value must rfrence an existing active User that belongs to this organization.
  • The OrganizationName property value is required.
  • The Address1 property value is not required.
  • The Address2 property value is not required.
  • The City property value is not required.
  • The State property value is not required. Maximum length of 20.
  • The Zip property value is not required. Maximum length of 20.
  • The Phone property value is not required.
  • The WebAddress property value is not required. Maximum length of 1000.
  • The IsInternalOnly property value is not required.
  • The UserDefined1 property value is not required. Maximum length of 200.
  • The UserDefined2 property value is not required. Maximum length of 200.
  • The UserDefined3 property value is not required. Maximum length of 200.
  • The UserDefined4 property value is not required. Maximum length of 200.
  • The UserDefined5 property value is not required. Maximum length of 200.
  • If the UserDefinedID1 property value is specified, the value must reference an existing UserDefinedList1 within the Issuetrak application.
  • If the UserDefinedID2 property value is specified, the value must reference an existing UserDefinedList2 within the Issuetrak application.
  • If the UserDefinedID3 property value is specified, the value must reference an existing UserDefinedList3 within the Issuetrak application.
  • If the UserDefinedID4 property value is specified, the value must reference an existing UserDefinedList4 within the Issuetrak application.
  • If the UserDefinedID5 property value is specified, the value must reference an existing UserDefinedList5 within the Issuetrak application.
  • The UserDefinedDate1 property value is Not required.
  • The UserDefinedDate2 property value is Not required.
  • The Note property value is Not required. Maximum length of 1000.
  • The ContactPerson property value is Not required.
  • The Email property must be a valid email if set.
  • The BillingReference property value is Not required.
  • The TitleLogoLeftLink property must be a valid url if set. Maximum length of 500.
  • The TitleLogoRightLink property must be a valid url if set. Maximum length of 500.
  • The SiteTitle property value is Not required. Maximum length of 500.
  • The EmailFromName property value is Not required.
  • The EmailFromAddress property value is required only if EmailFromName is specified.

Sample Request URL: ~/api/v1/organizations