The user requests the publication of a certificate to one or more devices.
- Endpoint:
/api/v1/certificates/{certificate_id}/publish
- Method:
POST
- Request:
POST /api/v1/certificates/{certificate_id}/publish
Path parameters
Parameter |
Type |
Required |
Description |
certificate_id |
Integer |
Yes |
Certificate ID to publish. |
Request parameters
Parameter |
Type |
Required |
Description |
code_profile_publication |
Integer |
Yes |
Publication profile code. A publication profile previously registered in Segura® will be used. |
justification |
String |
No |
Publication justification (max. 1024 characters). |
reason |
Integer |
Yes |
Publication reason code. There must be a valid reason code registered in Segura®. |
itsm_code |
String |
Conditional |
ITSM code. Required if "Governance code required when justifying" is enabled in the certificate access group. |
devices |
Array |
Yes |
Array with device codes where the certificate should be published. |
Example using cURL
curl -X POST https://[segura_vault_url]/api/v1/certificates/456/publish \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"code_profile_publication": 22,
"justification": "Certificate renewal for production servers",
"reason": 3,
"itsm_code": "CHG0012345",
"devices": [101, 102, 103]
}'
Response
{
"status": 200,
"message": "Publication scheduled successfully",
"error": false,
"code_publishing": 567,
"reason": "3 - Scheduled Renewal",
"itsm_code": "CHG0012345",
"devices": [101, 102, 103]
}