Skip to main content

ToolWatch API: Descriptions

ToolWatch API requests to create, retrieve, list, and update descriptions, with URIs, headers, fields, and example responses.

This article lists the ToolWatch API requests for descriptions: Create, Retrieve, Retrieve List, and Update. Every request needs an authorization token. To get one, see ToolWatch API: Authorization.

Create

Request

URI

https://api.{cluster}.toolwatch.net/descriptions

Http Method

POST

Headers

Authorization: {token}

Request Body

Field

Type

Required

Description

Description

string

Yes

Description text. Max 100 characters.

Type

string

Yes

Description type. Must be "T" or "M".

Response

201 Created

The response header contains the URI for the newly created description.

Location: https://api.{cluster}.toolwatch.net/descriptions/{id}

400 Bad Request

Triggered when field level validation fails.

Response body will contain validation message

[
{
"PropertyName": "Description",
"Message": "Please provide a description.",
"AttemptedValue": ""
}
]

Retrieve

Request

URI

https://api.{cluster}.toolwatch.net/descriptions/{id}

Allowable querystring parameters

Parameter

Description

columns

Comma-separated list of properties to return.

Http Method

GET

Headers

Authorization: {token}

Request Body

Not allowed for GET

Response

200 Ok

By default every property is returned. Use the columns querystring parameter to limit the response to specific properties.

Field

Type

Description

Id

guid

Unique identifier.

Description

string

Description text.

Type

string

Description type.

Example response body:

{
"Id": "{id}",
"Description": "Description Text",
"Type": "T"
}

404 Not Found

Triggered when id parameter is not a valid guid or no matching record was found.

Response body will contain error message

{id} is not a valid description id.

Retrieve List

Request

URI

https://api.{cluster}.toolwatch.net/descriptions

Allowable querystring parameters

Parameter

Description

columns

Comma-separated list of properties to return.

description

Filter by description text.

type

Filter by description type.

Http Method

GET

Headers

Authorization: {token}

Request Body

Not allowed for GET

Response

200 Ok

By default every property is returned. Use the columns querystring parameter to limit the response to specific properties.

Field

Type

Description

Id

guid

Unique identifier.

Description

string

Description text.

Type

string

Description type.

Example response body:

[
{
"Id": "849197e3-6cc4-4150-ae71-3f2fc1fbc53d",
"Description": "Description Text 1",
"Type": "T"
},
{
"Id": "cc09dbb0-6cc4-4150-ae71-3f2fc1fbc53d",
"Description": "Description Text 2",
"Type": "M"
}
]

404 Not Found

Triggered when field parameters in querystring are not allowed.

Response body will contain error message

{"Message":"Criteria is invalid","Type":"Exception"}

Update

Request

URI

https://api.{cluster}.toolwatch.net/descriptions/{id}

Http Method

PUT

Headers

Authorization: {token}

Request Body

Supply the model completely. Any property that is omitted is overwritten with its default value.

Field

Type

Required

Description

Description

string

Yes

Description text. Max 100 characters.

Type

string

Yes

Description type. Must be "T" or "M".

Response

200 Ok

400 Bad Request

Triggered when field level validation fails.

Response body will contain validation message

404 Not Found

Triggered when id parameter is not a valid guid or no matching record was found.

Response body will contain error message

{id} is not a valid description id.
Did this answer your question?