AI Agent Engineering > Deploy the agent > REST API request and response
  

REST API request and response

When you deploy an agent flow to a REST endpoint, you can interact with the endpoint using a tool like Postman or cURL.
The following table describes the endpoint attributes:
Property
Value
URL format
https://localhost:<port number>/a2e/<agent flow ID>/<URL suffix>
where:
  • - The port number is the AI Agent Runtime service port number.
  • - The agent flow ID is the agent flow's FRS ID.
  • - The URL suffix is the suffix you enter when you deploy the agent.
Header
Use one of the following headers based on the authentication method:
  • - Authorization . Use this header when the agent is deployed using basic authentication.
  • - IDS-SESSION-ID. Use this header when the agent is deployed using session ID authentication.
Omit the header when the agent is deployed using anonymous authentication.
HTTP method
POST

Example: Request that uses anonymous authentication

The following example shows a request that uses anonymous authentication:
curl --location 'https://localhost:19445/a2e/27qhbJ7dhGAk3YrExample/test' \
--header 'Content-Type: application/json' \
--data '{
"prompt":"hello",
"conversationId":"6da8e838-b817-42ef-8251-19567Example"
}'

Example: Request that uses basic authentication

The following example shows a request that uses basic authentication:
curl --location 'https://localhost:19445/a2e/7935unqrmUUj9WzExample/test' \
--header 'Content-Type: application/json' \
--header 'Authorization: ••••••' \
--data '{
"prompt": "Hi",
"conversationId":"6da8e838-b817-42ef-8251-19567Example"
}'

Example: Request that uses session ID authentication

The following example shows a request that uses session ID authentication:
curl --location 'https://localhost:19445/a2e/7935unqrmUUj9WzExample/test' \
--header 'IDS-SESSION-ID: kz7VrPgEg6OkiiWExample' \
--header 'Content-Type: application/json' \
--data '{
"prompt": "Hi",
"conversationId":"6da8e838-b817-42ef-8251-19567Example"
}'

Example: Request body and response

The following example shows a request body:
{
"prompt": "Hi, Help me find details about current market trends in the US stock market",
"conversationId": ""
}
The following example shows the response:
{
"result": "directly retrieving the historical trends of the U.S. stock market through the research analyst function.\n\nHowever, I can provide you with an overview of historical trends based on past knowledge if that works for you. Please confirm, and do let me know if there's any particular time period or market aspect you'd like me to highlight!",
"conversationId": "6ef15a1c-f50f-4bc5-bf69-7af46Example"
}
To continue the conversation, use the conversationID that appears in the response.

Session IDs

If you deploy your AI agent using session ID authentication, you need to get a session ID, and then add the session ID to the header of every request. The Informatica Intelligent Cloud Services (IICS) Identity Service issues the session ID.
Note: If your session ID expires, log in again to get a new session ID.
To get a session ID, submit the following POST request with your credentials:
POST https://dm-us.informaticacloud.com/identity-service/api/v1/Login

{
"username": "myUser",
"password": "myPassword",
}
The response returns a sessionId. For example, you might receive the following response:
{
...
"sessionId": "kz7VrPgEg6OkiiWExample",
"sessionExpireTime": "2025-01-01T00:00:00.000Z",
...
}
To authenticate your requests, add IDS-SESSION-ID: <session ID> in the request header.