HOW TO: Access Informatica Cloud (IICS) REST API using Postman?

Spread the love

Introduction

Informatica Cloud offers several APIs which lets you access the information from your Informatica Intelligent Cloud Services organization. We have discussed about what is Informatica Cloud REST API and REST API in general in our previous article – Overview of Informatica Cloud (IICS) REST API.

There are several ways to access the Informatica Cloud REST API. In this article let us discuss how to access the Informatica Cloud REST API using Postman.

What is Postman?

Postman is an API Client which helps developers to build, test and modify APIs. This allows the users to create simple and complex HTTP/s requests (GET, PUT, POST, DELETE etc.), as well as read their responses. It also lets users to save the environments for later use, converting the API to code for various languages like Python etc.

You can either download and install desktop application of Postman or use its web version from any device by creating an account.

Steps to access IICS REST API

To access any Informatica Cloud REST API resources, you need to first login into your Org for which you need a valid Informatica Intelligent Cloud Services login credentials.

Once after successful login, collect the Base URL and Session ID from the response which needs to be used along with the URI of the resource you wanted to access.

Login URL:

Informatica Cloud platform provides two different versions of login resources, REST API version 2 and version 3 resources. You can use any version of the resources to log in to Informatica Cloud.

Use one of the following login URLs:

For version 2, use

https://dm-<POD region>.informaticacloud.com/ma/api/v2/user/login

For version 3, use

https://dm-<POD region>.informaticacloud.com/saas/public/core/v3/login

Your POD (Point of Deployment) region is based on the location of your Informatica Intelligent Cloud Services data center. Use one of the following POD regions:

North Americaus
Europeem
Asiaap

The POD region is included in the URL you receive when you register with Informatica Intelligent Cloud Services.

Session ID:

Once you successfully login, you need to use the Session ID from your login response to access any other Informatica Cloud resources.  In the login response, the name of the attribute for Session ID depends on the API version that you use to log in.

  • In a version 2 response, the attribute name is icSessionId.
  • In a version 3 response, the attribute name is INFA-SESSION-ID.

Base URL:

The login response also includes the base URL that you must include in subsequent calls. The base URL includes the following components:

The following example is a base URL for an organization on the US POD:

https://usw3.dm-us.informaticacloud.com/saas

In the login response, the attribute that provides the base URL depends on the API version that you use to log in. For example:

  • In a version 2 response, the attribute name is serverUrl.
  • In a version 3 response, the attribute name is baseApiUrl.

IICS REST API Login using Postman

Create an account and login to Postman. Click on Create New and select HTTP Request to create a new request from Postman.

Create new request in Postman
Create new request in Postman

Once your new tab is open, you can specify the details you need for your request.

Postman Request Page
Postman Request Page

The following details needs to be filled in to complete the request.

  1. Request method
  2. Request URL
  3. Headers
  4. Body

To login in to your Informatica Intelligent Cloud Services organization using REST API Version2 resource with North America as POD region, use the following request:

Request Method: POST

Request URL: https://dm-us.informaticacloud.com/ma/api/v2/user/login

Headers:
Content-Type: application/json
Accept: application/json

Body:
{
"@type": "login",
"username": "your-username@infa.com",
"password": "your-password"
}
Login IICS org using Postman
Login IICS org using Postman

Under Body, select the type as raw and enter the login details in JSON format.

 Login IICS org using Postman - Body
Login IICS org using Postman – Body

Once all the required details for the request are filled in, click Send and the request response will be available under Response tab.

If the request is successful you will receive a return code as 200 OK else returns the error object if errors occur. From the response tab, collect the serverUrl and icSessionId details to use in subsequent calls.

IICS Login Response in Postman
IICS Login Response in Postman

How to access IICS Task details using Postman?

To request the details of a mapping task, Use one of the following URIs:

/api/v2/mttask/<task-id>

/api/v2/mttask/name/<task-name>

You need to use the above URI along with the serverUrl fetched from the login response and add Sesssion ID in your request.

Request Method: GET

Request URL: <serverURL>/api/v2/mttask/name/<task_name>

Headers:
Content-Type: application/json
Accept: application/json
icSessionId: <icSessionId>

Once all the required details for the request are filled in, click Send and the request response will be available under Response tab. The response contains the complete details of the mapping task.

Get IICS Task details using Postman
Get IICS Task details using Postman

IICS REST API Logout using Postman

Use this resource to log out of an organization and end the version 2 REST API session specified in the request.

To log out of your Informatica Intelligent Cloud Services organization, use the following request:

Request Method: POST 

Request URL: <serverURL>/api/v2/user/logout 

Headers:
Content-Type: application/json
Accept: application/json
icSessionId: <icSessionId>

Returns the 200 response code if the request is successful. Returns the error object if errors occur.

Logout IICS org using Postman

Conclusion

In order to use any Informatica Cloud REST API resource, you need to first login using the Informatica Cloud REST API Login resource and use the Base URL and Session ID from the login response in your subsequent calls.

Postman is a very popular API testing tool which is a best way to test the Informatica Cloud APIs. But it cannot be used to automate something using the Informatica Cloud REST API resources. There are several other ways to achieve the automation part using the scripting languages.

If you are starting to learn and play around Informatica Cloud REST API or REST API in general, Postman provides the easiest and simplest required environment to start. It also lets you save all your requests by creating a collection and they can be accessed online anytime.

Related Posts:

  • HOW TO: Create Mapping Task in IICS using REST API?

    Learn step-by-step procedure on how to create a mapping task in Informatica Cloud using mttask REST API resource.

    READ MORE

  • HOW TO: Update Mapping Task in IICS using REST API?

    Learn how to update mapping task using mttask REST API resource in Informatica Cloud and various use cases of updating mapping tasks using REST API.

    READ MORE

  • HOW TO: Access Informatica Cloud (IICS) Rest API from command line using cURL?

    IICS offers several APIs which lets you access the information from your Org. Let us discuss how to access the Informatica Cloud REST API using cURL in this article.

    READ MORE

6 thoughts on “HOW TO: Access Informatica Cloud (IICS) REST API using Postman?”

  1. Muy buen tutorial, nota: si usar el v3 Body:
    {
    “username”: “your-username@infa.com”,
    “password”: “your-password”
    }

    no me funcionaba con este parametro “@type”: “login”,

    Reply
  2. How can we select a set of mcts at once. for example, i need to know the list Mttask which starts with mct_upd. How can we achieve it?

    Reply

Leave a Comment

Related Posts