Skip to end of banner
Go to start of banner

Demo API Template Project

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Version History

« Previous Version 4 Next »

Demo project on ftp. ftp://adonis-ftp:@ftp.adonis.no:21/files/customers/API-DEMO/DemoAdonisAPI.zip

This demo show how possible consume AdonisIntegrationWebService.

In the TestController → Index example to generate Adonis Token. (Contain authentication details).

Swagger: https://astacoapp.azurewebsites.net/AIWS_ASTACO/api-docs/index.html?url=/AIWS_ASTACO/api-docs/swagger.json

If you need consume from js:

Then use the method GNL_APMCrewListViews to call the view and add any parameters 

For example Return all Requirements for General Manager on the vessel with IMO nr  123456789 

 function ConsumeSQLViewViaAPI() { 

    var request = new Object(); 

    request.Authentication_Token = "…"; 

    request.View = " pw001srv1"; 

    request.Filter = ""; 

    request.Pagination = false; 

    request.RowsByPage = ""; 

    request.Page = ""; 

     

    $.ajax({ 

        url: "http://localhost/AIWS/AdonisIntegrationWebService.svc/GNL_APMCrewListViews", 

        data: '{"request":' + JSON.stringify(request) + '}', 

        type: 'POST', 

        dataType: 'json', 

        contentType: "application/json; charset=utf-8", 

        async: true, 

        success: function (data) { 

        }, 

        error: function (xhr, textStatus, error) { 

            console.log(error.toString()); 

        } 

    });    

  • No labels