Endpoint
You can query the Floors via the following endpoint:
https://[subdomain].manageworkonline.com/awt/api/floors
Methods
GET
/floors
Retreive all Floors
Example Url
https://[subdomain].manageworkonline.com/awt/api/floors
Response
{
Success: bool,
ErrorMessage: string,
Data: Array<object>
}
GET
/floors/[id]
Retreive single Floor
Example Url
https://[subdomain].manageworkonline.com/awt/api/floors/[id]
Response
{
Success: bool,
ErrorMessage: string,
Data: object
}
Schema
Floor Schema Definition:
Field | Data Type | Nullable |
---|---|---|
Id | int | NO |
Description | string | NO |
PropertyId | int | NO |
OrderId | int | YES |
Uprn | string | NO |
IsInspected | boolean | YES |
IsDoesContainAsbestos | boolean | YES |
IsDidContainAsbestos | boolean | YES |
IsAnyToDos | boolean | YES |
CreatedBy | string | NO |
ModifiedBy | string | NO |
DateOfModification | DateTime | YES |
DateOfCreation | DateTime | YES |
IsActive | boolean | YES |
IsLiableToAsbestos | boolean | YES |
JSON Example
{
"Id": 10,
"Description": "Floor 1",
"PropertyId": 1,
"OrderId": null,
"Uprn": "1abc",
"IsInspected": true,
"IsDoesContainAsbestos": false,
"IsDidContainAsbestos": false,
"IsAnyToDos": false,
"CreatedBy": "DIEU66",
"ModifiedBy": null,
"DateOfModification": null,
"DateOfCreation": "/Date(1473068824840+0100)/",
"IsActive": true,
"IsLiableToAsbestos": false
}
Request Example
function getFloors(){
var success = function(loginResponse) {
if(loginResponse.Success){
$.ajax({
type: "GET",
url: 'https://[subdomain].manageworkonline.com/awt/api/floors',
crossDomain: true,
xhrFields: { withCredentials: true },
success: function(response){
if(response.Success){
alert(response.Data.length);
}
},
dataType: "json"
});
}
};
window.login(success);
}
Post your comment on this topic.