CA Identity Portal Service Account APIs
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

Information and REST API documentation are required for interacting with CA Identity Portal service account endpoints, specifically for updating request information programmatically.

 

Environment

CA Identity Portal: v14.4 / v15

 

Resolution

The CA Identity Portal exposes REST APIs intended specifically for service account integrations configured within the General Configuration tab.
API Endpoint Specification: updateRequestInfo

REST Call NameupdateRequestInfo
DescriptionUpdates an existing request with additional information. Updates can be applied to various elements within the request.
URL<Identity_Portal_url>/sigma/rest/protected/request/updateRequestInfo
HTTP MethodPOST
Request body content typeaplication/json
Request body content Sample[
  {
    "backendRequestId": "####-######-#####-######",
    "requestId": 41,
    "requestTargetPermissionId": 33,
    "requestPermissionId": 27,
    "infoToAppend": "add this text to all of the above elements",
    "protectedValue": false
  },
  {
    "backendRequestId": "####-######-#####-######",
    "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)

backendRequestIdSpecifies the backend task session id. If this parameter is sent, the information is linked to the element linked to the task session.
requestIdWhen used, information is linked to the top level of the request.
requestTargetPermissionIdSpecifies 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.
requestPermissionIdSpecifies 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.
infoToAppendSpecifies the information to add to the request.
protectedValueBoolean to encrypt data in the database.
Success return statusHttp OK(200)
 

Authentication Requirements

To call this API:

    • The API is restricted to service accounts configured in the General Configuration tab of Identity Portal.
    • The calling client must perform form-based authentication against Identity Portal prior to invoking the protected endpoints.

Java Authentication Sample (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");
}
Once authenticated, reuse the HTTP client session to issue POST requests to the protected REST endpoints.