This article describes how an Operator fetches a single certificate via a REST API in the Workplace package in Smart ID Identity Manager.
Prerequisites
Usage of an external tool (for example Postman) to make the request towards Identity Manager
Known credentials to authorize towards the REST API endpoint
Step-by-step instruction
To initiate the process, you must send a POST request to search for a certificate using the provided serial number.
In the table below you will find the details about how to configure the POST request:
URL | |
---|---|
| |
Headers | |
Content-Type | application/xml |
Body | |
| |
Authorization | |
username password | XXX XXX |
As shown in the example in the table, the process is triggered to search for a certificate with the serial number 12345ABCDE<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<process instanceId="230963404"/>
As a next step, you need a GET request to retrieve the actual certificate data, using the instanceId obtained from the previous request.
In the table below, you will find the details about how to configure the GET request:
URL | |
---|---|
| |
Headers | |
Content-Type | application/xml |
Authorization | |
username password | XXX XXX |
By putting the process instanceId into the URL, you get following structure:<host>/ws/tasks/230963404/WorkplaceTaskDisplayCertificateData/data?tenantId=1
Result (shortened version):<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<data>
<field name="PcmDpCertificate_KeyArchival" type="STRING">0</field>
<field name="PcmDpCertificate_ValidFrom" type="DATE">2020-07-27T15:13:05Z</field>
<field name="PcmDpCertificate_Issuer" type="STRING">Test issuer </field>
</data>
Use case details
Overview and technical details
Use case description | As an operator, I want to fetch a single certificate via REST API |
---|---|
Outcome |
|
Symbolic name | WorkplacelAPIProcGetCertificateData |
Process name | Fetch certificate |
Component | Identity Manager Operator |
Process start | External tool |