Advanced Configuration : Using Integration Manager APIs : Tutorial
 
Share this page                  
Tutorial
This section will walk you through the process of authenticating with the /login API to receive a signed JSON web tokens (JWT) access token in the response to get authorization to use the Integration Manager RESTful API services.
The Integration Manager API fully supports JWT for authentication and authorization of API access. The Integration Manager API documentation explains the available resources with the methods, endpoints, parameters, respective model example values for request body and response body, and response status.
To use the available services as documented at https://api.im.actiandatacloud.com/v2/apidocs/, perform the following example steps.
1. Send your credentials in the request body to the /login API with the content-type as application/json in the header:
request body model value
{
    "username": "string",
    "password": "string"
}
When you log in successfully, a JWT access token is returned in the response.
2. Provide the returned access token in each API call to other Integration Manager API services like Account Manager service, Job Configuration service, Job Execution service, and so on. Send the access token in the Authorization header using the Bearer schema. It looks like this:
Authorization: Bearer <token>
3. Use the REST API Invoker component, which is available in the DataConnect v11 process designer, to make calls to the Integration Manager API. Even third-party RESTful clients such as Postman, SOAPUI, Insomnia, cURL, and Cygwin may be used to make calls to the Integration Manager API.
Notes:
For security reasons, we recommend to not keep the access token longer than required.
The following example uses the API URL http://localhost:8080/api/ followed by the respective endpoint. This is because of the default host and port defined for Integration Manager. If you have a custom host and port defined in the application.properties file, then use them.
You also may get the access token by browsing to http://localhost:8080/ui/login and using the Web Browser Developer Tools, Network tab. Look for the response tab for the POST method of the Request URL:http://localhost:8080/api/login.
If you notice “There was an error connecting to http://localhost:8080/api/login” in any of the calls, ensure that the Integration Manager service is running and then try again.
Not all users have full access to the Actian Integration Manager API. To gain full access, you must own the Actian Integration Manager Development Package that includes Integration Manager, access to the Designer, and access to the API. Contact your Actian account executive to verify that your account has access to the API.
The following example walks through the process of creating a new job using the Integration Manager API. It covers:
Authorization
Creating a job template
Creating a job configuration
Uploading a package to the job configuration
Updating the job configuration with the package name and its entry point
Running the configuration