Ana içeriğe geç

Get Consumer Secret References

Endpoint​

GET /apiops/projects/{projectName}/consumers/{consumerKey}/secrets

Authentication​

Requires a Personal API Access Token.

Authorization: Bearer YOUR_TOKEN

Request​

Path Parameters​

ParameterTypeRequiredDescription
projectNamestringYesProject name
consumerKeystringYesConsumer key, assigned by the installation. Returned as consumerKey by every consumer response

Response​

200 OK with one reference per kind of secret material:

{
"secretKey": { "name": "partner-secret", "scope": "PROJECT" },
"certificate": { "name": "partner-cert", "scope": "ADMIN" },
"jwkValidation": { "name": "partner-jwk", "scope": "PROJECT" }
}
FieldTypeDescription
secretKeyobjectReference to the secret key
certificateobjectReference to the certificate
publicKeyobjectReference to the public key
privateKeyobjectReference to the private key
keystoreobjectReference to the keystore
truststoreobjectReference to the truststore
jwkValidationobjectReference to the JWK for validation and signing
jwkEncryptionobjectReference to the JWK for decryption and encryption

Each reference has these fields:

FieldTypeDescription
namestringName of the referenced object. The set operations take the same name
scopestringPROJECT when the object belongs to the project of the consumer, ADMIN when it belongs to the admin project

A reference that is not set is absent. The response never contains the material. To set or remove a reference, use the operations in Secret material, JWK and token settings.

An unknown consumerKey answers 404 resourceNotFound.

cURL Example​

curl -X GET \
"https://demo.apinizer.com/apiops/projects/MyProject/consumers/CONSUMER_KEY/secrets" \
-H "Authorization: Bearer YOUR_TOKEN"

Permissions​

  • User must have IDENTITY + VIEW permission in the project
  • A project outside the scope of the caller answers 404 resourceNotFound, never 403
  • The admin project has no consumers: a call on it answers 400 malformedRequest (params.reason = platformScopeNotSupported)