Work management
Get a work request
GET
/
workrequests
/
{id}
Get a work request
curl --request GET \
--url https://api.oncanary.com/v1/workrequests/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.oncanary.com/v1/workrequests/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.oncanary.com/v1/workrequests/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"workRequest": {
"id": "<string>",
"title": "<string>",
"attachments": [
{
"id": "<string>",
"mimeType": "<string>",
"fileName": "<string>",
"url": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"width": 123,
"height": 123
}
],
"priority": "NONE",
"requestStatus": "PENDING",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"thumbnail": {
"id": "<string>",
"mimeType": "<string>",
"fileName": "<string>",
"url": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"width": 123,
"height": 123
},
"description": "<string>",
"assetId": "<string>",
"locationId": "<string>",
"workOrderId": "<string>",
"sendEmailNotification": true,
"extraFields": {},
"approverTeamId": "<string>",
"creatorContactInfo": {
"type": "PHONE",
"value": "<string>"
},
"asset": {},
"location": {},
"workOrder": {}
}
}{
"type": "https://api.oncanary.com/errors/validation_error",
"title": "Validation Error",
"status": 400,
"detail": "Request validation failed",
"request_id": "req_01JAY8FVDM6CH4R3X9Q2T7K5NP",
"code": "validation_error"
}{
"type": "https://api.oncanary.com/errors/validation_error",
"title": "Validation Error",
"status": 400,
"detail": "Request validation failed",
"request_id": "req_01JAY8FVDM6CH4R3X9Q2T7K5NP",
"code": "validation_error"
}{
"type": "https://api.oncanary.com/errors/validation_error",
"title": "Validation Error",
"status": 400,
"detail": "Request validation failed",
"request_id": "req_01JAY8FVDM6CH4R3X9Q2T7K5NP",
"code": "validation_error"
}{
"type": "https://api.oncanary.com/errors/validation_error",
"title": "Validation Error",
"status": 400,
"detail": "Request validation failed",
"request_id": "req_01JAY8FVDM6CH4R3X9Q2T7K5NP",
"code": "validation_error"
}{
"type": "https://api.oncanary.com/errors/validation_error",
"title": "Validation Error",
"status": 400,
"detail": "Request validation failed",
"request_id": "req_01JAY8FVDM6CH4R3X9Q2T7K5NP",
"code": "validation_error"
}Authorizations
Organization API key with an sk_live_ or sk_test_ prefix
Path Parameters
Resource ID
Query Parameters
Available options:
asset, location, work_order, extra_fields Response
Work request
Show child attributes
Show child attributes
⌘I
Get a work request
curl --request GET \
--url https://api.oncanary.com/v1/workrequests/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.oncanary.com/v1/workrequests/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.oncanary.com/v1/workrequests/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"workRequest": {
"id": "<string>",
"title": "<string>",
"attachments": [
{
"id": "<string>",
"mimeType": "<string>",
"fileName": "<string>",
"url": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"width": 123,
"height": 123
}
],
"priority": "NONE",
"requestStatus": "PENDING",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"thumbnail": {
"id": "<string>",
"mimeType": "<string>",
"fileName": "<string>",
"url": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"width": 123,
"height": 123
},
"description": "<string>",
"assetId": "<string>",
"locationId": "<string>",
"workOrderId": "<string>",
"sendEmailNotification": true,
"extraFields": {},
"approverTeamId": "<string>",
"creatorContactInfo": {
"type": "PHONE",
"value": "<string>"
},
"asset": {},
"location": {},
"workOrder": {}
}
}{
"type": "https://api.oncanary.com/errors/validation_error",
"title": "Validation Error",
"status": 400,
"detail": "Request validation failed",
"request_id": "req_01JAY8FVDM6CH4R3X9Q2T7K5NP",
"code": "validation_error"
}{
"type": "https://api.oncanary.com/errors/validation_error",
"title": "Validation Error",
"status": 400,
"detail": "Request validation failed",
"request_id": "req_01JAY8FVDM6CH4R3X9Q2T7K5NP",
"code": "validation_error"
}{
"type": "https://api.oncanary.com/errors/validation_error",
"title": "Validation Error",
"status": 400,
"detail": "Request validation failed",
"request_id": "req_01JAY8FVDM6CH4R3X9Q2T7K5NP",
"code": "validation_error"
}{
"type": "https://api.oncanary.com/errors/validation_error",
"title": "Validation Error",
"status": 400,
"detail": "Request validation failed",
"request_id": "req_01JAY8FVDM6CH4R3X9Q2T7K5NP",
"code": "validation_error"
}{
"type": "https://api.oncanary.com/errors/validation_error",
"title": "Validation Error",
"status": 400,
"detail": "Request validation failed",
"request_id": "req_01JAY8FVDM6CH4R3X9Q2T7K5NP",
"code": "validation_error"
}