search cancel

CA Identity portal Service Account APIs

book

Article ID: 189505

calendar_today

Updated On:

Products

CA Identity Manager CA Identity Governance CA Identity Portal CA Identity Suite

Issue/Introduction

Do we have a list of API methods for Identity Portal?

 

Environment

Release : 14.3

Component : CA IDENTITY SUITE (VIRTUAL APPLIANCE)

Resolution

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.