Resource: Project Category ( /api/projectcategory/{id} )

Project Category resource

Methods

DELETE


Delete a project category (removing a project category does not remove the projects beneath it, these will instead be moved directly beneath the organisation).

Required Permissions

  • Administration/Organisation/ManageOrganisation

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 occurs or there is an authentication issue (such as an expired OAuth token).

StatusDescription
200 - OKProject category deleted successfully.
403 - ForbiddenReturned if project category could not be deleted (normally due to lack of permissions).
404 - NotFoundReturned if project category does not exist.

Example - Delete a project category.

Delete a project category.

Request Headers

KeyValueDescription
Acceptapplication/json

Request Parameters

KeyValueDescription
{id}dc8b3352-05cf-4b54-868b-a1f6c3cc73baUnique identifier of the project category.

Response Headers

KeyValueDescription
Content-Typeapplication/json; charset=utf-8

Status Code

200 - OK

GET


Retrieves a project category by its unique identifier.

Supported Expansions

For more details on expansions, please see the Expand help topic.

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 occurs or there is an authentication issue (such as an expired OAuth token).

StatusDescription
200 - OKReturned if the request was completed successfully.
404 - NotFoundReturned if project category does not exist.

Example - Get a project category by the unique identifier.

Retrieve a project category by its unique identifier

Request Headers

KeyValueDescription
Acceptapplication/json

Request Parameters

KeyValueDescription
{id}DC8B3352-05CF-4B54-868B-A1F6C3CC73BAThe unique identifier of the project category.

Response Headers

KeyValueDescription
Content-Typeapplication/json; charset=utf-8

Response Body

{
  "Id": "dc8b3352-05cf-4b54-868b-a1f6c3cc73ba",
  "Name": "Active",
  "OrderNumber": 0,
  "OrganisationId": "d7b68899-6cdc-4ec3-8f83-b19a4d9d27d3",
  "OrganisationName": "Acme Inc",
  "ParentId": null,
  "ParentName": null,
  "HasChildren": true,
  "HasProjects": false,
  "HasParent": false,
  "Self": "http://localhost/api/projectcategory/dc8b3352-05cf-4b54-868b-a1f6c3cc73ba"
}

Status Code

200 - OK

PUT


Update a project category.

Required Permissions

  • Administration/Organisation/ManageOrganisation

Supported Expansions

For more details on expansions, please see the Expand help topic.

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 occurs or there is an authentication issue (such as an expired OAuth token).

StatusDescription
200 - OKUpdate a project category.
403 - ForbiddenReturned if project category could not be updated (due to lack of permissions or an invalid json request).
404 - NotFoundReturned if project category does not exist.
409 - ConflictReturned if project category name is already in use.

Example - Update an existing project category (rename).

Updates the name of a project category.

Request Headers

KeyValueDescription
Acceptapplication/json

Request Parameters

KeyValueDescription
{id}dc8b3352-05cf-4b54-868b-a1f6c3cc73baUnique identifier of the project category.

Request Body

{
  "Name": "In Flight"
}

Response Headers

KeyValueDescription
Content-Typeapplication/json; charset=utf-8

Response Body

{
  "Id": "dc8b3352-05cf-4b54-868b-a1f6c3cc73ba",
  "Name": "In Flight",
  "OrderNumber": 0,
  "OrganisationId": "d7b68899-6cdc-4ec3-8f83-b19a4d9d27d3",
  "OrganisationName": "Acme Inc",
  "ParentId": null,
  "ParentName": null,
  "HasChildren": true,
  "HasProjects": false,
  "HasParent": false,
  "Self": "http://localhost/api/projectcategory/dc8b3352-05cf-4b54-868b-a1f6c3cc73ba"
}

Status Code

200 - OK

Example - Update an existing project category (move to a new parent).

Moves a project category to a new parent.

Request Headers

KeyValueDescription
Acceptapplication/json

Request Parameters

KeyValueDescription
{id}092c1c83-cfe7-4075-aea8-4dc445f8d87dUnique identifier of the project category.

Request Body

{
  "ParentId": "4b538f8f-994b-4a82-8874-22a16586eebf"
}

Response Headers

KeyValueDescription
Content-Typeapplication/json; charset=utf-8

Response Body

{
  "Id": "092c1c83-cfe7-4075-aea8-4dc445f8d87d",
  "Name": "Mobile",
  "OrderNumber": 0,
  "OrganisationId": null,
  "OrganisationName": null,
  "ParentId": "4b538f8f-994b-4a82-8874-22a16586eebf",
  "ParentName": "Archived",
  "HasChildren": false,
  "HasProjects": false,
  "HasParent": true,
  "Self": "http://localhost/api/projectcategory/092c1c83-cfe7-4075-aea8-4dc445f8d87d"
}

Status Code

200 - OK

  • No labels