1 | Description

Let's start by first establishing a call to the AppBase solution you are wishing to integrate with.  Once you have established your first all, you can then reference all the various JSON and XML based functions that can be executed.  This tutorial covers how to make your first call which involves getting a security token.  For every web service call to an AppBase solution, you must first generate a security token and use in any subsequent web service calls to ensure the operation is authorized.

This tutorial also assumes you have a third party API development tool - such as Postman - installed and ready for use.  Though the screenshots below use Postman, you can use any API development tool of choice.

2 | Prerequisite Steps

Before undertaking any web service development, we need to ensure and have at hand crucial information that we need to establish a valid web service communication with our solution.  This includes the address of the server we are going to communicate with, the user credentials and the name of the solution.  The steps below will explain how to get each of these:

  1. Identify the server URL or IP address that contains the solution you wish to integrate with.  In this example, we may have a small solution a server called 'https://acme.com/' called 'AppBase Training' that we would like to interface with:


    Our server URL would therefore be https://acme.com/

    Server URL

    The above URL is an example only.  Please use the URL of your actual server for these exercises.

  2. Confirm there is a valid account to be used for any web service calls available on the target tenant/server.  In this example, on the https://acme.com server we have created a user account for web service calls (to manage security around which solutions can be accessed).  The user login and password for this account is 'webapi':


    Therefore the username and password for this user account - and what we will use to generate our security token for this example - is username: webapi and password: webapi

We need to get the domain name (or environment domain code) of the solution that we wish to integrate with.  To do this:

  1. Log into the tenant containing the solution (i.e. https://acme.com/) with your usual credentials or with credentials that gives you administrator access to the System Setup area of the tenancy:


  2. Click on System Setup Home > Solutions.  Click on the blue hyperlinked name of your solution:


  3. The domain code name can be found in the Domain field of Environment Details tab as below:



    Therefore our domain name is APPBASE_TRAINING_DEVELOPMENT.TENANT41

3 | Steps

  1. Our first call to the AppBase web service will be to retrieve a security token so that we can retrieve a token for subsequent web service calls.  This involves sending a POST request to the AppBase Security Authentiation REST API that includes the credentials of the user.  The full URL of the call will be:

    https://acme.com/Security.WebService/AuthenticationServiceRest.svc/login
    or
    https://acme.com/Security.WebService/AuthenticationServiceRest.svc/loginJson

    with json body: 


        "Username""webapi"
        "Password""webapi"
    }



    Or



  2. The response you receive should be a long GUID that represents the security token that needs to be included in any subsequent call to the REST API:



    Or


      
  • No labels

1 Comment

  1. GET Requests are no longer supported.  Please update this page to POST method KB2018052500 Security service "Login" and "Auth" methods