Saltar al contenido principal
POST
/
api
/
v1
/
siloc
/
certificates
/
{certificateId}
/
revoke
Revocar un certificado
curl --request POST \
  --url https://siloc.sandbox.lerian.net/api/v1/siloc/certificates/{certificateId}/revoke \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://siloc.sandbox.lerian.net/api/v1/siloc/certificates/{certificateId}/revoke"

headers = {"Authorization": "Bearer <token>"}

response = requests.post(url, headers=headers)

print(response.text)
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

fetch('https://siloc.sandbox.lerian.net/api/v1/siloc/certificates/{certificateId}/revoke', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://siloc.sandbox.lerian.net/api/v1/siloc/certificates/{certificateId}/revoke",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://siloc.sandbox.lerian.net/api/v1/siloc/certificates/{certificateId}/revoke"

req, _ := http.NewRequest("POST", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://siloc.sandbox.lerian.net/api/v1/siloc/certificates/{certificateId}/revoke")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://siloc.sandbox.lerian.net/api/v1/siloc/certificates/{certificateId}/revoke")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "daysToExpiry": 123,
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "notAfter": "2023-11-07T05:31:56Z",
  "subject": "<string>",
  "custodyReference": "<string>",
  "notBefore": "2023-11-07T05:31:56Z",
  "revokedAt": "2023-11-07T05:31:56Z",
  "serialNumber": "<string>"
}
{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "about:blank"
}

Autorizaciones

Authorization
string
header
requerido

JWT bearer token issued by the identity provider.

Encabezados

Authorization
string

Authorized bearer token used to derive the audit actor.

X-Request-ID
string

Request correlation identifier. Generated when omitted.

Parámetros de ruta

certificateId
string<uuid>
requerido

Certificate id.

Respuesta

OK

daysToExpiry
integer<int64>
requerido

Whole days until expiry (0 the day it lapses, negative once expired). Always present — a real 0 is the most urgent operator signal.

id
string<uuid>
requerido

Certificate id.

notAfter
string<date-time>
requerido

Validity end (expiry).

subject
string
requerido

Certificate subject DN.

Ejemplo:

"CN=46026562, OU=SILOC"

custodyReference
string

Opaque reference to the private key in the FI's custody; the key itself is never stored here.

notBefore
string<date-time>

Validity start.

revokedAt
string<date-time>

Revocation time. Omitted while the certificate is active.

serialNumber
string

Certificate serial number.