Summary
Requirements
All API calls require a dedicated JSON Web Token (JWT). These are created when a user with a dedicated mobile resource logs in to the application. If you are using the API for programmatic queries, it is best to create a dedicated user for the JWT as this gets reset each time the user logs in.
Endpoint
/rest/activities/
GET
Returns details for a single activity or an array of activities depending on the format of the URL. Up to 20 activity IDs can be passed in a single call.
Single Activity
Example URL
/rest/activities/137121
Multiple Activities
Example URL
/rest/activities?ids=137121,137120
Response Format Spec
Response Fields
Field Name
Data Type
Description
assetId
Integer
The ID of the asset against which the activity is loaded
completedQuantity
Decimal
The completed quantity of the activity
duration
Integer
The duration of the activity
description
Text (1000)
The description of the activity
id
Integer
The ID of the activity
isDeleted
True/False
Whether the activity is deleted or not
jobId
Integer
The ID of the job in Oneserve
lastModified
DateTime
The date/time at which the activity was last modified
libraryActivityId
Integer
The ID of the associated library activity
quantity
Decimal
The quantity of the activity on the job
serviceId
Integer
The ID of the service
siteLocationId
Integer
The ID of the site location against which the activity is loaded
status
Integer (1-4)
1 - PENDING
2 - APPROVED
3 - REJECTED
4 - DELETED
supplierId
Integer
The ID of the team assigned to the activity
resourceId
Integer
The ID of the resource assigned to the activity
ref
Text (200)
The reference of the activity
activityCategoryId
Integer
The ID of the activity category
Available Response Representations
HTTP Code | Description | Schema |
---|---|---|
200 | Document Information | Document information |
400 | Bad Request | Error |
401 | Unauthorized | Error |
403 | Forbidden | Error |
404 | Address Not Found | Error |
405 | Method Not Allowed | Error |
500 | Internal Server Error | Error |
Example Success Response
{
"activities": [
{
"completedQuantity": "0.00000",
"description": "",
"duration": 30,
"id": 137120,
"isDeleted": false,
"jobId": 63135,
"lastModified": "2020-07-11T20:00:08.157Z",
"libraryActivityId": 16429,
"quantity": "1.00000",
"serviceId": 297,
"status": 2,
"supplierId": 1193
},
{
"assetId": 1026,
"completedQuantity": "0.00000",
"duration": 30,
"id": 137121,
"isDeleted": false,
"jobId": 63136,
"lastModified": "2020-07-12T18:03:47.913Z",
"libraryActivityId": 2205,
"quantity": "1.00000",
"serviceId": 62,
"siteLocationId": 933,
"status": 2,
"supplierId": 147
}
]
}
Troubleshooting
This error occurs if the Verify your This error indicates that something is blocking your connection to the server Open a ticket with the support team with details of your connection so that your access can be verfied This error could occur if the endpoint is not entered correctly or a non-existent client ID is passed in the request Verify the endpoint matches the value specified in this article. Check that the client ID exists in your Oneserve system. This error will occur if an unacceptable method has been used in the call such as Ensure that you are using a 401 Unauthorized
Response
401 Unauthorized
Reason
OS_REST_AUTH_TOKEN
has not been provided, has expired, or does not exist in the systemResolution
OS_REST_AUTH_TOKEN
with support403 Forbidden
Response
403 Forbidden
Reason
Resolution
404 Not Found
Response
404 Not Found
Reason
Resolution
405 Method Not Allowed
Response
405 Method Not Allowed
Reason
POST
or DELETE
Resolution
GET
call to this endpoint