Secrets API

About 1 min

Secrets API

Welcome to the Nosana Secrets API documentation.

Nosana Secret Manager on Solana Mainnet

https://secrets.nosana.ci

Nosana Secret Manager on Solana Devnet

https://secrets.k8s.dev.nos.ci

Authentication

You can use the authentication endpoint to get a JWT token to access secrets as a node or to store secrets as a project by adding the following header to your request:

Authorization: Bearer your-jwt-token-here

Endpoint

POST /login

Parameters

NameTypeDescriptionRequired
addressstringYour Solana public keyRequired
signaturestringYour signature for the message nosana_secret_${timestamp}Required
timestampintegerThe unix timestamp that you signedRequired
jobstringThe public key of the job you want to retrieve secrets for. Make sure the node (address) has this job claimedOptional

Response

Status: 200

{
  "token": "your-jwt-token-that-you-can-to-authenticate"
}

Retrieve secrets

Use this endpoint to retrieve your own secrets or the secrets for a specific job. Your JWT token will decide what secrets you can access. Either the address parameter (your own secrets) from the authentication workflow or the job parameter (secrets for a specific job that you claimed) decide the scope of your secrets

Endpoint

GET /secrets

Response

Status: 200

{
  "secret-key": "secret value",
  "secret-key-2": "secret value 2"
}

Add/Update secrets

Add or update your own secrets. Make sure you requested a JWT token at the authorization endpoint without specifing a job parameter. That way you get a token with access to your own secrets (mainly useful for projects posting jobs)

Endpoint

POST /secrets

Parameters

NameTypeDescriptionRequired
secretsJSON objectJSON object where the keys are the secret names and the values the secret values. If a secret key already exists, it will overwrite the currently stored valueRequired

Response

Status: 200

OK

Delete secrets

Delete your own secrets. Make sure you requested a JWT token at the authorization endpoint without specifing a job parameter. That way you get a token with access to your own secrets (mainly useful for projects posting jobs)

Endpoint

DELETE /secrets

Parameters

NameTypeDescriptionRequired
keystringname of the secret key that you want to deleteRequired

Response

Status: 200

OK
Last update: