Expire an enrollment (admin or SOC)
const url = 'https://example.com/api/admin/enrollments/example/expire';const options = { method: 'PATCH', headers: { 'X-Ssoossh-Key-Secret': '<X-Ssoossh-Key-Secret>', 'Content-Type': 'application/json' }, body: '{"reason":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://example.com/api/admin/enrollments/example/expire \ --header 'Content-Type: application/json' \ --header 'X-Ssoossh-Key-Secret: <X-Ssoossh-Key-Secret>' \ --data '{ "reason": "example" }'Immediately marks an enrollment as expired, preventing future service certificate retrievals. The operation is idempotent.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Enrollment ID
Request Bodyrequired
Section titled “Request Bodyrequired”Expiry reason (required)
Expiry reason (required)
object
Reason explains why the enrollment is being expired. Required and server-validated, like the user containment reasons.
Example generated
{ "reason": "example"}Responses
Section titled “Responses”Enrollment expired
object
Example generated
{ "additionalProperty": "example"}Not authenticated
object
Data is always null on an error response.
Error is a human-readable message. Branch on the HTTP status rather than this string; it is for humans and logs.
ErrorCode is a machine-readable error classifier. One of the error_code constants from internal/apitypes; use this to decide whether to retry or branch on the failure mode.
Example
{ "error": "certificate request \"9f1c…\" not found", "error_code": "not_found"}Not authorized as admin or SOC
object
Data is always null on an error response.
Error is a human-readable message. Branch on the HTTP status rather than this string; it is for humans and logs.
ErrorCode is a machine-readable error classifier. One of the error_code constants from internal/apitypes; use this to decide whether to retry or branch on the failure mode.
Example
{ "error": "certificate request \"9f1c…\" not found", "error_code": "not_found"}Enrollment not found
object
Data is always null on an error response.
Error is a human-readable message. Branch on the HTTP status rather than this string; it is for humans and logs.
ErrorCode is a machine-readable error classifier. One of the error_code constants from internal/apitypes; use this to decide whether to retry or branch on the failure mode.
Example
{ "error": "certificate request \"9f1c…\" not found", "error_code": "not_found"}