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 13 Current »

Demo project: Download Here

This demo shows how to consume AdonisIntegrationWebService.

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

URL: https://astacoapp.azurewebsites.net/AIWS_ASTACO/AdonisIntegrationWebService.svc

Login: Adonis_API

If you need consume from js:

function ConsumeSQLViewViaAPI() {
  var request = new Object();
  request.Login = "Adonis_API";
  request.Password = "YourPass";
  request.LifeTime = 360;
  
  $.ajax({
      url: "https://astacoapp.azurewebsites.net/AIWS_ASTACO/AdonisIntegrationWebService.svc/GNL_API_AUTHENTICATION",
      data: '{"credentials":' + JSON.stringify(request) + '}',
      type: 'POST',
      dataType: 'json',
      contentType: "application/json; charset=utf-8",
      async: true,
      success: function (data) {
  
          var request2 = new Object();
          request2.Authentication_Token = data.GNL_API_AUTHENTICATIONResult.Authentication_Token;
          request2.View = "pw001srv1";
          request2.Filter = "";
          request2.Pagination = false;
          request2.RowsByPage = "";
          request2.Page = "";
  
          $.ajax({
              url: "https://astacoapp.azurewebsites.net/AIWS_ASTACO/AdonisIntegrationWebService.svc/GNL_APMCrewListViews",
              data: '{"request":' + JSON.stringify(request2) + '}',
              type: 'POST',
              dataType: 'json',
              contentType: "application/json; charset=utf-8",
              async: true,
              success: function (retValue) {
                  console.log(retValue);
              },
              error: function (xhr, textStatus, error) {
                  console.log(error.toString());
              }
          });
      },
      error: function (xhr, textStatus, error) {
          console.log(error.toString());
      }
  });
}

  • No labels