Endpoint

You can query the Elements via the following endpoint:

https://[subdomain].manageworkonline.com/awt/api/elements

Methods

GET
/elements
Retreive all Elements

Example Url

https://[subdomain].manageworkonline.com/awt/api/elements

Response

{
   Success: bool,
   ErrorMessage: string,
   Data: Array<object>
}

GET
/elements/[id]
Retreive single Element

Example Url

https://[subdomain].manageworkonline.com/awt/api/elements/[id]

Response

{
   Success: bool,
   ErrorMessage: string,
   Data: object
}

Schema

Element Schema Definition:

Field Data Type Nullable
Id int NO
RoomId 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

JSON Example

{
    "Id": 10,
    "RoomId": 10,
    "Description": "Element 1/Beading",
    "PropertyId": 1,
    "OrderId": null,
    "Uprn": "1abc",
    "IsInspected": true,
    "IsDoesContainAsbestos": false,
    "IsDidContainAsbestos": false,
    "IsAnyToDos": false,
    "CreatedBy": "DIEU66",
    "ModifiedBy": null,
    "DateOfModification": null,
    "DateOfCreation": "/Date(1473068824893+0100)/",
    "IsActive": true,
    "IsLiableToAsbestos": false
}

Request Example

function getElements(){
   var success = function(loginResponse) {
      if(loginResponse.Success){
         $.ajax({
            type: "GET",
            url: 'https://[subdomain].manageworkonline.com/awt/api/elements',
            crossDomain: true,
            xhrFields: { withCredentials: true },
            success: function(response){
               if(response.Success){
                  alert(response.Data.length);
               }
            },
            dataType: "json"
         });
      }
   };
   window.login(success);
}

Feedback

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Please do not use this for support questions.
For customer support, please contact us here.

Post Comment