Skip to main content

ToolWatch API: Certifications

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

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

Create

Request

URI

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

Http Method

POST

Headers

Authorization: {token}

Request Body

Field

Type

Required

Description

Code

string

Yes

Certification code. Max 25 characters.

Description

string

Yes

Certification description. Max 50 characters.

Notes

string

No

Free-form notes. Max 100 characters.

RenewValue

integer

No

Renewal interval value.

RenewInterval

string

No

Renewal interval unit. Allowable values: d, w, m or y.

Response

201 Created

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

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

400 Bad Request

Triggered when field level validation fails.

Response body will contain validation message

[
{
"PropertyName": "Code",
"Message": "Please provide a certification code.",
"AttemptedValue": ""
}
]

Retrieve

Request

URI

https://api.{cluster}.toolwatch.net/certifications/{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.

Code

string

Certification code.

Description

string

Certification description.

Notes

string

Free-form notes.

RenewValue

integer

Renewal interval value.

RenewInterval

string

Renewal interval unit (d, w, m or y).

Example response body:

{
"Id": "{id}",
"Code": "Certification Code",
"Description": "Certification",
"Notes": "Notes",
"RenewValue": 1,
"RenewInterval": "y"
}

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 certification id.

Retrieve List

Request

URI

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

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.

Code

string

Certification code.

Description

string

Certification description.

Notes

string

Free-form notes.

RenewValue

integer

Renewal interval value.

RenewInterval

string

Renewal interval unit (d, w, m or y).

Example response body:

[
{
"Id": "849197e3-6cc4-4150-ae71-3f2fc1fbc53d",
"Code": "Certification Code 1",
"Description": "Certification 1",
"Notes": "Notes 1",
"RenewValue": 1,
"RenewInterval": "y"
},
{
"Id": "cc09dbb0-6cc4-4150-ae71-3f2fc1fbc53d",
"Code": "Certification Code 2",
"Description": "Certification 2",
"Notes": "Notes 2",
"RenewValue": 6,
"RenewInterval": "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"}
Did this answer your question?