# IdentityIQ REST API Response

**URL:** <https://developer.sailpoint.com/discuss/t/identityiq-rest-api-response/146380>\
**Category:** IIQ Discussion and Questions\
**Tags:** identityiq\
**Created:** [June 20, 2025, 5:22am UTC](https://developer.sailpoint.com/discuss/t/identityiq-rest-api-response/146380 "2025-06-20T05:22:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kanwantm](https://avatars.discourse-cdn.com/v4/letter/k/8c91f0/32.png) [@kanwantm](https://developer.sailpoint.com/discuss/u/kanwantm)\
**Post date:** [June 20, 2025, 5:22am UTC](https://developer.sailpoint.com/discuss/t/identityiq-rest-api-response/146380/1 "2025-06-20T05:22:03Z")

</div>

## Which IIQ version are you inquiring about?

8.4p1

Hi Team, We are calling a identityIQ workflow from REST API call below and in response we are getting a default response as below. my question is how to add error message or identity request ID to API response. thanks in advance any guidance in this regards would be greatly appreciated.

API Call:  
[http://localhost:8080/identityiq/rest/workflows/workflowName/launch](http://localhost:8080/identityiq/rest/workflows/workflowName/launch)  
Response :

{  
“status”: null,  
“requestID”: “0a9c3f2097871ddb819787538232005f”,  
“warnings”: null,  
“errors”: null,  
“retryWait”: 0,  
“metaData”: null,  
“attributes”: null,  
“complete”: false,  
“success”: false,  
“retry”: false,  
“failure”: false  
}

Thanks,  
Mahendra

---

<div class="post-metadata">

**Author:** ![SaidurgaMallela](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/saidurgamallela/32/27266_2.png) [@SaidurgaMallela](https://developer.sailpoint.com/discuss/u/SaidurgaMallela)\
**Post date:** [June 20, 2025, 6:23am UTC](https://developer.sailpoint.com/discuss/t/identityiq-rest-api-response/146380/2 "2025-06-20T06:23:55Z")

</div>

Hi @kanwantm,

You can include additional details like the Identity Request ID or custom error messages in the REST API response by setting them in the workflow’s context attributes.

Just add a script step in your workflow that looks like this:

```auto
<Step name="SetResponseData">
    <Script>
        <![CDATA[
        Map attrs = context.getAttributes();
        attrs.put("identityRequestId", request.getId());
        attrs.put("errorMessage", "Provisioning failed due to XYZ reason");
        context.setAttributes(attrs);
        ]]>
    </Script>
</Step>

```

Once this is in place, the values will be returned in the `attributes` section of the API response.

---

<div class="post-metadata">

**Author:** ![pravin\_ranjan](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/pravin_ranjan/32/6771_2.png) [@pravin\_ranjan](https://developer.sailpoint.com/discuss/u/pravin_ranjan)\
**Post date:** [June 20, 2025, 7:01pm UTC](https://developer.sailpoint.com/discuss/t/identityiq-rest-api-response/146380/3 "2025-06-20T19:01:29Z")

</div>

@kanwantm did you declared the variable as output=“true” ? that will solve ur problem. also  
in case of error or validation just set like below.

```auto
wfcontext.getWorkflowCase().addMessage(new Message(Message.Type.Error, "Error message", null));

this will directly return as output. you don't need to do any calculation in steps. 

```

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/sailpoint/original/2X/f/f2136700ed5e3703e0b85e02f6be799dacca7735.png) [@system](https://developer.sailpoint.com/discuss/u/system)\
**Post date:** [August 19, 2025, 7:01pm UTC](https://developer.sailpoint.com/discuss/t/identityiq-rest-api-response/146380/4 "2025-08-19T19:01:35Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
