Endpoint

You can query the Sample Analysis via the following endpoint:

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

Methods

GET
/sampleanalysis
Retreive all Sample Analysis

Example Url

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

Response

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

GET
/sampleanalysis/[id]
Retreive single Sample Analysis

Example Url

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

Response

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

Schema

Sample Analysis Schema Definition:

Field Data Type Nullable
Id int NO
SampleId int YES
AnalysisResult string NO
AnalysisAmount string NO
AnalysisScore int YES

JSON Example

{
    "Id": 7,
    "SampleId": 3,
    "AnalysisResult": "Anthophyllite",
    "AnalysisAmount": null,
    "AnalysisScore": 2
}

Request Example

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