Work management
List work requests
GET
/
workrequests
List work requests
curl --request GET \
--url https://api.oncanary.com/v1/workrequests \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.oncanary.com/v1/workrequests', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.oncanary.com/v1/workrequests"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"workRequests": [
{
"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": {}
}
],
"nextCursor": "<string>",
"nextPageUrl": "<string>"
}{
"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
Query Parameters
Maximum number of items to return from a MaintainX-compatible list (1-200)
Required range:
1 <= x <= 200Pagination cursor from previous response
Available options:
NONE, LOW, MEDIUM, HIGH Available options:
PENDING, REJECTED, APPROVED, DONE Available options:
asset, location, work_order, extra_fields ⌘I
List work requests
curl --request GET \
--url https://api.oncanary.com/v1/workrequests \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.oncanary.com/v1/workrequests', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.oncanary.com/v1/workrequests"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"workRequests": [
{
"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": {}
}
],
"nextCursor": "<string>",
"nextPageUrl": "<string>"
}{
"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"
}