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 America | us |
Europe | em |
Asia | ap |
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](https://thinketl.com/wp-content/uploads/2021/08/45-Postman-1-1024x610.png)
Once your new tab is open, you can specify the details you need for your request.
![Postman Request Page](https://thinketl.com/wp-content/uploads/2021/08/45-Postman-2.1-1024x646.png)
The following details needs to be filled in to complete the request.
- Request method
- Request URL
- Headers
- 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](https://thinketl.com/wp-content/uploads/2021/08/45-Postman-3-1024x305.png)
Under Body, select the type as raw and enter the login details in JSON format.
![Login IICS org using Postman - Body](https://thinketl.com/wp-content/uploads/2021/08/45-Postman-4-1024x304.png)
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](https://thinketl.com/wp-content/uploads/2021/08/45-Postman-5-1024x216.png)
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](https://thinketl.com/wp-content/uploads/2021/08/45-Postman-6-1-1024x309.png)
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.
![](https://thinketl.com/wp-content/uploads/2021/08/45-Postman-8.1-1024x544.png)
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:
Learn step-by-step procedure on how to create a mapping task in Informatica Cloud using mttask REST API resource.
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.
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.
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”,
Thank you. It is expected as the V3 login do not require “@type”: “login” in the request.
Please find more details here
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?
There is no direct api available at the moment for the scenario you are asking. But you can use task api to list all mcts and then filter the mcts of required pattern from the JSON response.
How can we automate these API
You can use REST V2 connector in IICS or build scripts in Python or use cURL.