Service Account APIs

 exposes several API methods, which enable external processes to update requests. These APIs are mostly helpful when external processes return information to the user who requested for it; the information is appended to the request.
test
Identity Portal
 exposes several API methods, which enable external processes to update requests. These APIs are mostly helpful when external processes return information to the user who requested for it; the information is appended to the request.
Use cases:
  1. Access Request that create accounts return the list of accounts that are created in a provisioned system.
  2. Information that opened ticket to a ticketing system. The ticketing system would like to update the information in the request.
To update the request, use the following REST service information:
REST Call Name
updateRequestInfo
Description
Update an existing request with more information, the update can be performed to various elements in the request.
URL
<Identity_Portal_url>/sigma/rest/protected/request/updateRequestInfo
HTTP Method
POST
Request body content type
Application/json
Request body content Sample
{
[{
"backendRequestId": "144233-54657f4a3-abc4566-4552a",
"requestId": 41,
"requestTargetPermissionId": 33,
"requestPermissionId": 27,
"infoToAppend": "add this text to all of the above elements",
"protectedValue": false
},
{
"backendRequestId": "144233-54657add-f4a3-abc4566",
"requestId": 43,
"requestTargetPermissionId": 35,
"requestPermissionId": 27,
"infoToAppend": "add another text to all of the above elements",
"protectedValue": false
}]
}
Request body content
Sample explanation
(
Important: At least one of the first 4 parameter is necessary
)
backendRequestId
Specifies the backend task session id. If this parameter is sent, the information is linked to the element linked to the task session.
requestId
When used, information is linked to the top level of the request.
requestTargetPermissionId
Specifies the target permission instance in the request. The id of it can be viewed in the basket. When using this parameter, the information is linked to all the associated permissions.
requestPermissionId
Specifies the permission instance in the request, the id of it can be viewed in the basket. When using this parameter, the information is linked to permissions.
infoToAppend
Specifies the information to add to the request.
protectedValue
Boolean to encrypt data in the database.
Success return status
Http OK(200)
The API is only exposed to a service account which is configured in the
General Configuration
Tab. 
To log in, you must perform form authentication to
Identity Portal
. The following code is an example to use java to perform login to
Identity Portal
 using org.apache.commons.httpclient.HttpClient.
private void login
(
String username
,
 String password
)
 
throws
 HttpException
,
 IOException
,
 LoginException 
{
log
.
debug
(
"Logging into Sigma"
);
String loginUrl 
=
 
this
.
sigmaUrl 
+
 
this
.
loginSuffix
;
log
.
debug
(
"Login URL is: " 
+
 loginUrl
);
PostMethod postMethod 
=
 
new
 PostMethod
(
loginUrl
);
NameValuePair
[]
 postData 
=
 
new
 NameValuePair
[
2
];
postData
[
0
]
 
=
 
new
 NameValuePair
(
"j_username"
,
 username
);
postData
[
1
]
 
=
 
new
 NameValuePair
(
"j_password"
,
 password
);
postMethod
.
addParameters
(
postData
);
int loginResult 
=
 
this
.
httpclient
.
executeMethod
(
postMethod
);
log
.
debug
(
"Login post returned Http Status: [" 
+
 loginResult 
+
 "]"
);
if
 
(
loginResult 
!=
 302
)
 
{
log
.
error
(
"Error logging into Sigma with username: [" 
+
 username 
+
 "]"
);
throw
 
new
 LoginException
(
"Error Logging into Sigma: " 
+
 postMethod
.
getResponseBodyAsString
());
  }
Header locationHeader 
=
 postMethod
.
getResponseHeader
(
"Location"
);
if
 
(!
locationHeader
.
getValue
().
substring
(
locationHeader
.
getValue
().
lastIndexOf
(
"/"
)).
startsWith
(
"/app"
))
 
{
log
.
error
(
"Error logging into Sigma with username: [" 
+
 username 
+
 "]"
);
throw
 
new
 LoginException
(
"Error Logging into Sigma"
);
 }
postMethod
.
releaseConnection
();
log
.
debug
(
"Login successful"
);
}
After the HTTP client is logged in, you can use it to POST method to the APIs exposed.