Endpoint

You can query the Inspections via the following endpoint:

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

Methods

GET
/inspections
Retreive all Inspections

Example Url

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

Response

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

GET
/inspections/[id]
Retreive single Inspection

Example Url

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

Response

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

Schema

Inspection Schema Definition:

Field Data Type Nullable
Id int NO
JobId int YES
PriorityAssessmentScore string NO
LocationDescription string NO
Quantity double YES
FloorId int NO
RoomId int NO
ElementId int NO
Material string NO
MaterialScore double YES
MaterialType string NO
MaterialTypeScore double YES
Measurement string NO
Position string NO
PositionScore double YES
Friability string NO
FriabilityScore double YES
Access string NO
AccessScore double YES
PhotoId int YES
DrawingId int YES
Condition string NO
ConditionScore double YES
InspectionNumber int YES
InspectionType string NO
InspectionTypeScore string NO
Protection string NO
ProtectionScore double YES
InspectionResult string NO
InspectionResultScore string NO
InspectionScore string NO
MaterialAssessmentScore string NO
InspectionScoreCategory string NO
QuantityLeft double YES
DateOfInspection DateTime YES
InspectedBy string NO
PropertyId int NO
Field1 string NO
Field1Score double YES
Field2 string NO
Field2Score double YES
Field3 string NO
Field3Score double YES
Field4 string NO
Field4Score double YES
Field5 string NO
Field5Score double YES
Field6 string NO
Field6Score double YES
Field7 string NO
Field7Score double YES
Field8 string NO
Field8Score double YES
Field9 string NO
Field9Score double YES
Text1 string NO
DtmDate1 DateTime YES
Comment string NO
InspectionId string NO
PreviousInspectionId int YES
IsLatestInspection boolean NO
Text2 string NO
ExposedGroup1 string NO
ExposedGroup1Score double YES
ExposedGroup2 string NO
ExposedGroup2Score double YES
ExposedGroup3 string NO
ExposedGroup3Score double YES
Uprn string NO
OverAllAnalysisResult string NO
OverAllAnalysisResultScore double YES
RecommendationAction1 string NO
RecommendationPriority1 string NO
RecommendedBy1 string NO
RecommendationAction2 string NO
RecommendationPriority2 string NO
RecommendedBy2 string NO
CreatedBy string NO
ModifiedBy string NO
DateOfModification DateTime YES
DateOfCreation DateTime NO
IsApproved boolean NO

JSON Example

{
    "Id": 11,
    "JobId": 11,
    "PriorityAssessmentScore": null,
    "LocationDescription": "123",
    "Quantity": 0,
    "FloorId": 10,
    "RoomId": 10,
    "ElementId": 10,
    "Material": null,
    "MaterialScore": null,
    "MaterialType": "",
    "MaterialTypeScore": null,
    "Measurement": "",
    "Position": null,
    "PositionScore": null,
    "Friability": "",
    "FriabilityScore": null,
    "Access": "",
    "AccessScore": null,
    "PhotoId": null,
    "DrawingId": null,
    "Condition": "",
    "ConditionScore": null,
    "InspectionNumber": 1,
    "InspectionType": "Visual Inspection",
    "InspectionTypeScore": null,
    "Protection": null,
    "ProtectionScore": null,
    "InspectionResult": "No Asbestos Detected",
    "InspectionResultScore": null,
    "InspectionScore": null,
    "MaterialAssessmentScore": null,
    "InspectionScoreCategory": null,
    "QuantityLeft": null,
    "DateOfInspection": "/Date(1473030000000+0100)/",
    "InspectedBy": null,
    "PropertyId": 1,
    "Field1": "",
    "Field1Score": null,
    "Field2": "",
    "Field2Score": null,
    "Field3": null,
    "Field3Score": null,
    "Field4": "",
    "Field4Score": null,
    "Field5": "",
    "Field5Score": null,
    "Field6": "",
    "Field6Score": null,
    "Field7": "",
    "Field7Score": null,
    "Field8": "",
    "Field8Score": null,
    "Field9": "",
    "Field9Score": null,
    "Text1": null,
    "DtmDate1": null,
    "Comment": "",
    "InspectionId": "1abcINS-1",
    "PreviousInspectionId": null,
    "IsLatestInspection": true,
    "Text2": null,
    "ExposedGroup1": null,
    "ExposedGroup1Score": null,
    "ExposedGroup2": null,
    "ExposedGroup2Score": null,
    "ExposedGroup3": null,
    "ExposedGroup3Score": null,
    "Uprn": "1abc",
    "OverAllAnalysisResult": null,
    "OverAllAnalysisResultScore": 0,
    "RecommendationAction1": "",
    "RecommendationPriority1": "",
    "RecommendedBy1": null,
    "RecommendationAction2": null,
    "RecommendationPriority2": null,
    "RecommendedBy2": null,
    "CreatedBy": "DIEU66",
    "ModifiedBy": null,
    "DateOfModification": null,
    "DateOfCreation": "/Date(1473068824953+0100)/",
    "IsApproved": true
}

Request Example

function getInspections(){
   var success = function(loginResponse) {
      if(loginResponse.Success){
         $.ajax({
            type: "GET",
            url: 'https://[subdomain].manageworkonline.com/awt/api/inspections',
            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