fwitt Frequent Contributor.
Frequent Contributor.
1158 views

Start PRD via REST

Hi guys,

i am trying to trigger a PRD using the REST Interface of IDMProv.
If i am reading the documentation correctly doing a POST on /requests/permissions/item should be the way to go.
The Documentation says:
The objective of this API is to make requests for any one Role or Resource or PRD.
This API receives one type of permission along with the list of recipient.
The request could be both type self and ROBO.
If it is self then it uses the logged-in user-dn as recipient.
Else it uses the recipient list and find the dn of each recipient.

Currently I am sending this:

{
"id":"cn=setdisplayname,cn=requestdefs,cn=appconfig,cn=user application driver,cn=driverset1,o=system",
"entityType":"PRD",
"effDate": 12345,
"expDate": 12345,
"reason":"Because!",
"permReqParams":[
{
"key":"parameter",
"value":"TEXT"
}
],
"recipients":[{"dn":"cn=Testuser1,ou=users,o=data"}]
}

This returns:
{"Fault": {
"Code": {
"Value": "Sender",
"Subcode": {"Value": "InvalidInput"}
},
"Reason": {"Text": "Permission type [PRD] is not supported for this operation."}
}}


I am doing something wrong or does the documentation not match the actual function?

Best Regards
Labels (1)
0 Likes
13 Replies
Knowledge Partner
Knowledge Partner

Re: Start PRD via REST

On 9/25/2018 10:06 AM, fwitt wrote:
>
> Hi guys,
>
> i am trying to trigger a PRD using the REST Interface of IDMProv.
> If i am reading the documentation correctly doing a POST on
> /requests/permissions/item should be the way to go.
> The Documentation says:
>> The objective of this API is to make requests for any one Role or
>> Resource or PRD.
>> This API receives one type of permission along with the list of
>> recipient.
>> The request could be both type self and ROBO.
>> If it is self then it uses the logged-in user-dn as recipient.
>> Else it uses the recipient list and find the dn of each recipient.

> Currently I am sending this:
>
>
> Code:
> --------------------
> {
> "id":"cn=setdisplayname,cn=requestdefs,cn=appconfig,cn=user application driver,cn=driverset1,o=system",
> "entityType":"PRD",
> "effDate": 12345,
> "expDate": 12345,
> "reason":"Because!",
> "permReqParams":[
> {
> "key":"parameter",
> "value":"TEXT"
> }
> ],
> "recipients":[{"dn":"cn=Testuser1,ou=users,o=data"}]
> }
> --------------------
>
> This returns:
>
> Code:
> --------------------
> {"Fault": {
> "Code": {
> "Value": "Sender",
> "Subcode": {"Value": "InvalidInput"}
> },
> "Reason": {"Text": "Permission type [PRD] is not supported for this operation."}
> }}
> --------------------
>


Are your dates (effDate/expDate) cleaned up for posting or the actual
values? I would try real LDAP formatted dates.

Are all the fields in teh PRD provided in the permReqParams array? All
are required, usually, even if the form does not per se require them


0 Likes
fwitt Frequent Contributor.
Frequent Contributor.

Re: Start PRD via REST

I have tried playing with the values for some time. As long as I set entityType to PRD it will fail with this message.
Setting it to "resource " will give a target not found error (Which was to be expecte since the ID would be wrong).
And if I enter any made up value the service will respond with a generic HTML error Page...
<html lang="en" >
<head>
<title>Error Page</title>
<link rel='stylesheet' type='text/css' href='/IDMProv/resource/themes/Neptune/jquery-ui-1.8.18.custom.css' /> <link rel='stylesheet' type='text/css' href='/IDMProv/resource/themes/Neptune/print.css' media='print'/> <link rel='stylesheet' type='text/css' href='/IDMProv/resource/themes/Neptune/theme.css' media='screen'/> <link rel='stylesheet' type='text/css' href='/IDMProv/resource/themes/Neptune/dojo.css' /> <link rel='shortcut icon' type='image/x-icon' href='/IDMProv/resource/themes/Neptune/images/favicon.ico' />
<style type="text/css">
body {
background-color: #FFF;
}
</style>

</head>
<body>
<div style="margin-left: 3%; margin-right: 3%; width: 100%; max-width: 94%;">
<table border="0" width="100%">
<tr>
<td><A href="/IDMProv;jsessionid=4BC292BDAF2F0082C8D527A22D9B9C94"><img src="/IDMProv;jsessionid=4BC292BDAF2F0082C8D527A22D9B9C94/images/netiq.gif" border="0" alt="NetIQ Corporation."/></A></td>
<td align="right"><A href="/IDMProv;jsessionid=4BC292BDAF2F0082C8D527A22D9B9C94">Home</A></td>
</table>
<!--hr-->
<br/>
<span class="portlet-error-msg">An Error has occurred:</span>

<TABLE CELLPADDING="2" CELLSPACING="2" BORDER="1" WIDTH="100%" id="errorMessage">
<TR >
<TD WIDTH="20%" valign="top" class="nv-fontMedium nv-color1 nv-fontBold">Message</TD>
<TD WIDTH="80%" class="nv-fontSmall">An error has occurred while processing your request. Please contact the administrator, or click the back button and try again.</TD>
</TR>


</TABLE>
<br/>
<br/>

<br/>
<br/>
</div>
</body>
</html>


I guess there is some uncaught exception...

Does any one have example of a successful PRD call?
0 Likes
avikram Absent Member.
Absent Member.

Re: Start PRD via REST

You can use something like this to raise a successfull PRD call, but this would work only for simple workflow requests, not for complex ones,


{
"reason": "test123",
"effDate": "",
"expDate": "",
"reqPermissions": [{
"id": "cn=testworkflow,cn=requestdefs,cn=appconfig,cn=userapplication,cn=driverset1,o=system",
"entityType": "prd"
}],
"recipients": [{
"dn": "cn=Cjordan,ou=users,o=data",
"isGroupAssignment": false,
"type": "user"
}]
}


Regards,
Aditya
0 Likes
Micro Focus Expert
Micro Focus Expert

Re: Start PRD via REST

Hi Aditya,

On 2018-09-27 07:26, avikram wrote:
> You can use something like this to raise a successfull PRD call, but
> this would work only for simple workflow requests, not for complex ones,


What's the difference between a simple and a complex workflow? How does
one start "complex" PRDs via REST?

--
Norbert
0 Likes
avikram Absent Member.
Absent Member.

Re: Start PRD via REST

klasen;2488105 wrote:

What's the difference between a simple and a complex workflow?

Workflow that requires additional inputs other than reason field

klasen;2488105 wrote:

How does one start "complex" PRDs via REST?


Currently it's not possible, but we're adding that in the next release.


Regards,
Aditya
0 Likes
Micro Focus Expert
Micro Focus Expert

Re: Start PRD via REST

On 2018-09-28 10:46, avikram wrote:
>> How does one start "complex" PRDs via REST?
>>

> Currently it's not possible, but we're adding that in the next release.


Then how does idmdash start complex PRDs?

--
Norbert
0 Likes
avikram Absent Member.
Absent Member.

Re: Start PRD via REST

idmdash currently let's IDMProv does the form rendering and IDMProv itself takes action on form submission which is not REST. As I mentioned, we're adding REST API for form submission in the next release.

Regards,
Aditya
0 Likes
fwitt Frequent Contributor.
Frequent Contributor.

Re: Start PRD via REST

avikram;2488102 wrote:
You can use something like this to raise a successfull PRD call, but this would work only for simple workflow requests, not for complex ones,


{
"reason": "test123",
"effDate": "",
"expDate": "",
"reqPermissions": [{
"id": "cn=testworkflow,cn=requestdefs,cn=appconfig,cn=userapplication,cn=driverset1,o=system",
"entityType": "prd"
}],
"recipients": [{
"dn": "cn=Cjordan,ou=users,o=data",
"isGroupAssignment": false,
"type": "user"
}]
}


Regards,
Aditya


But in this case there is no possibility to pass any form_data, correct?
0 Likes
avikram Absent Member.
Absent Member.

Re: Start PRD via REST

fwitt;2488109 wrote:
But in this case there is no possibility to pass any form_data, correct?


Yes, currently that's not possible. We're planning to add that in the next release.
0 Likes
Knowledge Partner
Knowledge Partner

Re: Start PRD via REST

On 9/28/2018 4:44 AM, avikram wrote:
>
> fwitt;2488109 Wrote:
>> But in this case there is no possibility to pass any form_data, correct?

>
> Yes, currently that's not possible. We're planning to add that in the
> next release.


Oh. That is surprisingly not-useful in the current state.

0 Likes
Highlighted
schwoerb Absent Member.
Absent Member.

Re: Start PRD via REST

avikram;2488161 wrote:
Yes, currently that's not possible. We're planning to add that in the next release.


What is considered the next release?
0 Likes
Not applicable

Re: Start PRD via REST

Dear schwoerb,

This is released in IDM Version 4.7.2

Thanks & Regards,
SivaSaran.K.R
0 Likes
Micro Focus Expert
Micro Focus Expert

Re: Start PRD via REST

On 2019-02-21 14:16, sivasaran wrote:
>
> Dear schwoerb,
>
> This is released in IDM Version 4.7.2


Can you provide a sample REST payload showing how this works in 4.7.2?

--
Norbert
0 Likes
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.