Resource: Project Category ( /api/projectcategory/{id} )
Project Category resource
This resource supports the following methods: DELETE, GET, PUT
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).
Status | Description |
---|---|
200 - OK | Project category deleted successfully. |
403 - Forbidden | Returned if project category could not be deleted (normally due to lack of permissions). |
404 - NotFound | Returned if project category does not exist. |
Delete a project category.
Request Headers
Key | Value | Description |
---|---|---|
Accept | application/json |
Request Parameters
Key | Value | Description |
---|---|---|
{id} | dc8b3352-05cf-4b54-868b-a1f6c3cc73ba | Unique identifier of the project category. |
Response Headers
Key | Value | Description |
---|---|---|
Content-Type | application/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).
Status | Description |
---|---|
200 - OK | Returned if the request was completed successfully. |
404 - NotFound | Returned if project category does not exist. |
Retrieve a project category by its unique identifier
Request Headers
Key | Value | Description |
---|---|---|
Accept | application/json |
Request Parameters
Key | Value | Description |
---|---|---|
{id} | DC8B3352-05CF-4B54-868B-A1F6C3CC73BA | The unique identifier of the project category. |
Response Headers
Key | Value | Description |
---|---|---|
Content-Type | application/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).
Status | Description |
---|---|
200 - OK | Update a project category. |
403 - Forbidden | Returned if project category could not be updated (due to lack of permissions or an invalid json request). |
404 - NotFound | Returned if project category does not exist. |
409 - Conflict | Returned if project category name is already in use. |
Updates the name of a project category.
Request Headers
Key | Value | Description |
---|---|---|
Accept | application/json |
Request Parameters
Key | Value | Description |
---|---|---|
{id} | dc8b3352-05cf-4b54-868b-a1f6c3cc73ba | Unique identifier of the project category. |
Request Body
{ "Name": "In Flight" }
Response Headers
Key | Value | Description |
---|---|---|
Content-Type | application/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
Moves a project category to a new parent.
Request Headers
Key | Value | Description |
---|---|---|
Accept | application/json |
Request Parameters
Key | Value | Description |
---|---|---|
{id} | 092c1c83-cfe7-4075-aea8-4dc445f8d87d | Unique identifier of the project category. |
Request Body
{ "ParentId": "4b538f8f-994b-4a82-8874-22a16586eebf" }
Response Headers
Key | Value | Description |
---|---|---|
Content-Type | application/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