Publish the certificate in one or more devices.
- Endpoint:
/api/certificate/publish/
- Method:
POST
- Request:
POST /api/certificate/publish
Request parameters
| Parameter |
Type |
Required |
Description |
certificate_code |
int |
Yes |
Certificate's ID to be published. |
code_profile_publication |
int |
Yes |
Publication profile code. A publication profile previously registered in Segura® will be used. |
justification |
string |
No |
Publication justification (max. 1024 characters). |
reason |
int |
Yes |
Publication reason code. There must be a valid reason code registered in Segura®. |
itsm_code |
string |
Conditional |
ITSM code. Required if the Governance code required when justifying field 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/certificate/publish/{{certificate_id}} \
-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]
}
Error responses
| HTTP Status Code |
Description |
| 400 Bad Request |
Invalid parameters provided. |
| 401 Unauthorized |
Unauthorized access. |
| 403 Forbidden |
Forbidden access. |
| 404 Not Found |
Resource not found. |
| 500 Internal Server Error |
Internal server error. |