Highlighted
Absent Member.
Absent Member.
1194 views

Pass in PRD Data Items via REST API

Hello all,

I am attempting to call a PRD via REST that has a single data item (string) defined in its form. I can successfully call the PRD just fine, however the difficulty I am having is passing in data.

I am using the "access/requests/permissions" API with this body:


{
"reason": "...",
"reqPermissions": [
{
"id": "cn=testForm,cn=RequestDefs,cn=AppConfig,cn=User Application Driver,cn=driverset1,o=system",
"entityType": "prd"
}
],
"recipients": [
{
"name": "Allison Blake",
"dn": "cn=ablake,ou=users,o=data",
"type": "user",
"targetSetList": [
{
"permissionList": [
{
"id": "cn=testForm,cn=RequestDefs,cn=AppConfig,cn=User Application Driver,cn=driverset1,o=system",
"entityType":"prd",
"requestForm": "request",
"dataItems":[
{
"name": "request",
"dataType": "string",
"value": "testing REST API Call"
}
]
}
]
}
]
}
]
}


The "targetSetList" node is completely ignored. I am able to call the PRD with ablake as the recipient but that is about it. In order to actually use this I would need to pass in data into my form.

Is there anything on the workflow side that I am missing? Perhaps my body is formatted incorrectly? Please let me know! Any help would be greatly appreciated.

-Shaddy
Labels (1)
7 Replies
Highlighted
Absent Member.
Absent Member.

Re: Pass in PRD Data Items via REST API

The admin guide "Administrator’s Guide to the Identity Applications" has
a section "REST Services"/"Workflow Process and Definition
Service"/"Complete URI Syntax".
There you find an outline how to generate the appropriate JSON structure
required for POST operations on PRDs:

When the client uses the HTTP POST method with the
/v1/wf/definitions/{definition id} URI, the following minimum
information from a definition JSON structure is required to start a workflow
process.

{
"DataItems": [{
"Name": "reason",
"Type": "string",
"Values": [{"Value": ""}],
"MultiValued": false
}],
"Recipient": "cn=ablake,ou=users,ou=medical-idmsample,o=netiq"
}

All elements of the JSON object received from a GET call can be returned
to the server. However, only the two items shown above are necessary.
All other elements will be ignored by the server.


Wolfgang

On 09/08/2018 05:44, szayour wrote:
>
> Hello all,
>
> I am attempting to call a PRD via REST that has a single data item
> (string) defined in its form. I can successfully call the PRD just fine,
> however the difficulty I am having is passing in data.
>
> I am using the "access/requests/permissions" API with this body:
>
>
> Code:
> --------------------
>
> {
> "reason": "...",
> "reqPermissions": [
> {
> "id": "cn=testForm,cn=RequestDefs,cn=AppConfig,cn=User Application Driver,cn=driverset1,o=system",
> "entityType": "prd"
> }
> ],
> "recipients": [
> {
> "name": "Allison Blake",
> "dn": "cn=ablake,ou=users,o=data",
> "type": "user",
> "targetSetList": [
> {
> "permissionList": [
> {
> "id": "cn=testForm,cn=RequestDefs,cn=AppConfig,cn=User Application Driver,cn=driverset1,o=system",
> "entityType":"prd",
> "requestForm": "request",
> "dataItems":[
> {
> "name": "request",
> "dataType": "string",
> "value": "testing REST API Call"
> }
> ]
> }
> ]
> }
> ]
> }
> ]
> }
>
> --------------------
>
>
> The "targetSetList" node is completely ignored. I am able to call the
> PRD with ablake as the recipient but that is about it. In order to
> actually use this I would need to pass in data into my form.
>
> Is there anything on the workflow side that I am missing? Perhaps my
> body is formatted incorrectly? Please let me know! Any help would be
> greatly appreciated.
>
> -Shaddy
>
>

Highlighted
Micro Focus Expert
Micro Focus Expert

Re: Pass in PRD Data Items via REST API

On 2018-08-09 10:09, Wolfgang Schreiber wrote:
> The admin guide "Administrator’s Guide to the Identity Applications" has
> a section "REST Services"/"Workflow Process and Definition
> Service"/"Complete URI Syntax".


That applies to the old RIS APIs. I think Shaddy is trying to use the
new endpoints in IDMProv/rest.

--
Norbert
--
Norbert
Highlighted
Absent Member.
Absent Member.

Re: Pass in PRD Data Items via REST API

You're probably right - my doc excerpt comes from the 4.7 manuals and
works with older 4.x releases, too.

Several things have changed between 4.7 and 4.7.1

Wolfgang

On 09/08/2018 10:23, Norbert Klasen wrote:
> On 2018-08-09 10:09, Wolfgang Schreiber wrote:
>> The admin guide "Administrator’s Guide to the Identity Applications"
>> has a section "REST Services"/"Workflow Process and Definition
>> Service"/"Complete URI Syntax".

>
> That applies to the old RIS APIs. I think Shaddy is trying to use the
> new endpoints in IDMProv/rest.
>

Highlighted
Micro Focus Expert
Micro Focus Expert

Re: Pass in PRD Data Items via REST API

On 8/9/18 4:23 AM, Norbert Klasen wrote:
> On 2018-08-09 10:09, Wolfgang Schreiber wrote:
>> The admin guide "Administrator’s Guide to the Identity Applications"
>> has a section "REST Services"/"Workflow Process and Definition
>> Service"/"Complete URI Syntax".

>
> That applies to the old RIS APIs. I think Shaddy is trying to use the
> new endpoints in IDMProv/rest.
>

Greetings,
Did you utilize the example in the REST API doc for the Identity
Applications:

/idmappsdoc/#/Access/resource_Access_processPermissionRequests_POST

--
Sincerely,
Steven Williams
Principal Enterprise Architect
Micro Focus
Highlighted
Absent Member.
Absent Member.

Re: Pass in PRD Data Items via REST API

klasen;2485452 wrote:
On 2018-08-09 10:09, Wolfgang Schreiber wrote:
> The admin guide "Administrator’s Guide to the Identity Applications" has
> a section "REST Services"/"Workflow Process and Definition
> Service"/"Complete URI Syntax".


That applies to the old RIS APIs. I think Shaddy is trying to use the
new endpoints in IDMProv/rest.

--
Norbert


Yes I am using the new endpoints! This is in IDM 4.7.

stevewdj;2485470 wrote:

Did you utilize the example in the REST API doc for the Identity
Applications:

/idmappsdoc/#/Access/resource_Access_processPermissionRequests_POST


Yes, I used the example value and modified it by following the model data to include the dataItems node.

-Shaddy
Highlighted
Absent Member.
Absent Member.

Re: Pass in PRD Data Items via REST API

Did you ever figure this out? I'm also trying to figure out the proper call in 4.7 for either requests/permissions or requests/permissions/item for starting a PRD.
Highlighted
Respected Contributor.
Respected Contributor.

Re: Pass in PRD Data Items via REST API

Did anyone used this new Rest services to call the workflow ?
If yes can you post the payload data here?
I tried as per the document but it's throwing the server error in postman..
Any suggestions / help will be more helpful...
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.