openapi: 3.2.0 info: title: Spreedly API V1 Access Secrets API version: v1 description: An OpenAPI specification file for V1 of the Spreedly Core Transactional API servers: - url: https://core.spreedly.com/v1 tags: - name: access_secrets paths: /environments/{environment_key}/access_secrets: parameters: - name: environment_key in: path description: The key of the environment to execute against required: true schema: type: string post: summary: Create environment access secret tags: - access_secrets security: - basic_auth: [] operationId: create-access-secret description: Create an access secret in an environment. Authentication should be done using the environment where you want to create the secret and an Organization Access Secret. parameters: [] responses: '201': description: Created content: application/json: schema: $ref: '#/components/schemas/access_secret_response' application/xml: schema: $ref: '#/components/schemas/access_secret_response' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/errors' application/xml: schema: $ref: '#/components/schemas/errors' '422': description: Unprocessable entity content: application/json: schema: $ref: '#/components/schemas/errors' application/xml: schema: $ref: '#/components/schemas/errors' requestBody: content: application/json: schema: $ref: '#/components/schemas/access_secret' application/xml: schema: $ref: '#/components/schemas/access_secret' get: summary: List environment access secrets tags: - access_secrets security: - basic_auth: [] operationId: list-access-secrets description: Retrieve a list of all access secrets in an environment. This call should be authenticated with the key of the environment that you are accessing and an Organization Access Secret. responses: '200': description: Successful content: application/json: schema: $ref: '#/components/schemas/list_access_secrets_response' application/xml: schema: $ref: '#/components/schemas/list_access_secrets_response' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/errors' application/xml: schema: $ref: '#/components/schemas/errors' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/errors' application/xml: schema: $ref: '#/components/schemas/errors' /environments/{environment_key}/access_secrets/{access_secret_key}: parameters: - name: environment_key in: path description: The key of the environment to execute against required: true schema: type: string - name: access_secret_key in: path description: The key of the access secret to execute against required: true schema: type: string get: summary: Show environment access secret tags: - access_secrets security: - basic_auth: [] operationId: show-access-secrets description: Get an access secret with the given key. This call should be authenticated with the key of the environment that you are accessing and an Organization Access Secret. responses: '200': description: Successful content: application/json: schema: $ref: '#/components/schemas/access_secret_response' application/xml: schema: $ref: '#/components/schemas/access_secret_response' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/errors' application/xml: schema: $ref: '#/components/schemas/errors' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/errors' application/xml: schema: $ref: '#/components/schemas/errors' delete: summary: Delete environment access secret tags: - access_secrets security: - basic_auth: [] operationId: delete-access-secrets description: Delete an access secret in an environment. Authentication should be done using the environment where you want to delete the secret and an Organization Access Secret. responses: '204': description: No content '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/errors' application/xml: schema: $ref: '#/components/schemas/errors' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/errors' application/xml: schema: $ref: '#/components/schemas/errors' components: schemas: access_secret: type: object properties: access_secret: type: object properties: name: type: string description: 'The human readable name of the access secret. There is a 100 character limit and it cannot contain the following characters: ``\ | ` # $ % { } ; " < >``' required: - name list_access_secrets_response: type: object properties: access_secrets: type: array items: allOf: - $ref: '#/components/schemas/access_secret_properties' access_secret_properties: type: object properties: key: type: string description: The key identifying the environment at Spreedly. environment: type: string description: The name of the environment that the access_secret belongs to. name: type: string description: The human readable name of the access secret. access_secret: type: string description: The access secret value. created_at: type: string description: The access secret's created_at date. errors: type: array items: type: object properties: attribute: type: string description: Which attribute(s) have an error key: type: string description: Error Key message: type: string description: Error Message required: - key - message access_secret_response: type: object properties: access_secret: allOf: - $ref: '#/components/schemas/access_secret_properties' securitySchemes: basic_auth: type: http scheme: basic description: "Unless otherwise noted, all calls to the Spreedly API use [HTTP basic authentication](https://en.wikipedia.org/wiki/Basic_access_authentication) over HTTPS.\n Use the [environment key](https://developer.spreedly.com/docs/the-spreedly-app#environment-key) of the Spreedly environment you wish to execute against as the HTTP basic user, and one of your organization's [access secrets](https://developer.spreedly.com/docs/the-spreedly-app#access-secrets) as the HTTP basic password." x-explorer-enabled: false