XPipe LogoXPipe Documentation

Decrypts a secret

For connections, the secrets are encrypted in json form. When creating connections in an automated fashion, secrets have to be first converted into the proper representation. This endpoint can be used to obtain the representation of a secret of an existing connection.

POST
/secret/decrypt

Authorization

AuthorizationRequiredBearer <token>

The bearer token used is the session token that you receive from the handshake exchange.

In: header

Request Body

application/jsonRequired
encryptedRequiredobject

The internal encrypted representation of the secret

curl -X POST "http://localhost:21721/secret/decrypt" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "encrypted": {
      "encryptedToken": {
        "token": "lX6JOtL-mKbuUBR4nYdhJsv3RzrXm+f+JLLKpkSAfg=="
      },
      "secret": {
        "encryptedValue": "VR1brTq1-i3p5fLcz5O58tmbnmDjRKL5IOmSkFaQag==",
        "type": "locked"
      }
    }
  }'

The request was successful. The secret was decrypted.

{
  "summary": "Decrypted secret",
  "value": {
    "decrypted": "123"
  }
}