SAP Business Technology Platform Secret API

Access to generic secrets

GitHub OpenAPI

Operations 5

POST /admin/secrets Create a new generic secret #
GET /admin/secrets Lists all secrets corresponding to tenant #
GET /admin/secrets/{secretName} Get a specific secret #
PATCH /admin/secrets/{secretName} Update secret credentials #
DELETE /admin/secrets/{secretName} Deletes the secret #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/sap-btp:sap-btp-secret-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

sap-btp-secret-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Sap Btp Secret API
  version: 2.42.0
  description: 'Operations tagged Secret across 2 of this provider''s published API definitions: ai-core.yaml, sap-btp-ai-core-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.ai.{region}.ml.hana.ondemand.com/v2
  description: Production endpoint for SAP AI Core
  variables:
    region:
      enum:
      - prod.eu-central-1.aws
      - prodeuonly.eu-central-1.aws
      - prod.us-east-1.aws
      - prod.ap-northeast-1.aws
      - prod-ap11.ap-southeast-1.aws
      - prod-ap20.australiaeast.azure
      - prod.ap-southeast-2.aws
      - prod-eu20.westeurope.azure
      - prod-ap30.australia-southeast1.gcp
      - prod-in30.asia-south1.gcp
      - prod-sa30.me-central2.gcp
      - prod-us21.eastus.azure
      - prod-eu30.europe-west3.gcp
      - prod-us30.us-central1.gcp
      - prod-br10.sa-east-1.aws
      default: prod.eu-central-1.aws
security:
- Oauth2: []
tags:
- name: Secret
  description: Access to generic secrets
paths:
  /admin/secrets:
    post:
      tags:
      - Secret
      summary: Create a new generic secret
      description: Create a new generic secret in the corresponding resource group or at main tenant level.
      operationId: kubesubmit.v4.generic_secrets.create
      parameters:
      - $ref: '#/components/parameters/BckndtokenHeader'
      - $ref: '#/components/parameters/Bckndai-resource-group'
      - $ref: '#/components/parameters/Bckndai-tenant-scope'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BckndGenericSecretPostBody'
      responses:
        '200':
          description: Secret has been created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BckndGenericSecretDataResponse'
              example:
                message: secret has been created
                name: my-generic-secret
        '400':
          $ref: '#/components/responses/BckndBadRequest'
        default:
          $ref: '#/components/responses/BckndCommonError'
    get:
      tags:
      - Secret
      summary: Lists all secrets corresponding to tenant
      description: Lists all secrets corresponding to tenant. This retrieves metadata only, not the secret data itself.
      operationId: kubesubmit.v4.generic_secrets.get_all
      parameters:
      - $ref: '#/components/parameters/BckndtokenHeader'
      - $ref: '#/components/parameters/Bckndtop'
      - $ref: '#/components/parameters/Bckndskip'
      - $ref: '#/components/parameters/Bckndcount'
      - $ref: '#/components/parameters/Bckndai-resource-group'
      - $ref: '#/components/parameters/Bckndai-tenant-scope'
      responses:
        '200':
          description: The secrets were fetched
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BckndListGenericSecretsResponse'
        '400':
          $ref: '#/components/responses/BckndBadRequest'
        '404':
          $ref: '#/components/responses/BckndNotFound'
        default:
          $ref: '#/components/responses/BckndCommonError'
    servers:
    - url: https://api.ai.{region}.ml.hana.ondemand.com/v2
      description: Production endpoint for SAP AI Core
      variables:
        region:
          enum:
          - prod.eu-central-1.aws
          - prodeuonly.eu-central-1.aws
          - prod.us-east-1.aws
          - prod.ap-northeast-1.aws
          - prod-ap11.ap-southeast-1.aws
          - prod-ap20.australiaeast.azure
          - prod.ap-southeast-2.aws
          - prod-eu20.westeurope.azure
          - prod-ap30.australia-southeast1.gcp
          - prod-in30.asia-south1.gcp
          - prod-sa30.me-central2.gcp
          - prod-us21.eastus.azure
          - prod-eu30.europe-west3.gcp
          - prod-us30.us-central1.gcp
          - prod-br10.sa-east-1.aws
          default: prod.eu-central-1.aws
  /admin/secrets/{secretName}:
    parameters:
    - $ref: '#/components/parameters/BckndtokenHeader'
    - $ref: '#/components/parameters/BckndsecretName'
    - $ref: '#/components/parameters/Bckndai-resource-group'
    - $ref: '#/components/parameters/Bckndai-tenant-scope'
    get:
      tags:
      - Secret
      summary: Get a specific secret
      description: Retrieve a single generic secret. This retrieves metadata only, not the secret data itself.
      operationId: kubesubmit.v4.generic_secrets.get
      responses:
        '200':
          description: The secret was fetched
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BckndGenericSecretDetails'
              examples:
                generic-secret:
                  summary: Fetching a tenant-scoped or resource-group level generic secret
                  value:
                    name: string
                    createdAt: string
                tenant-wide-secret:
                  summary: Fetching a tenant-wide generic secret
                  value:
                    name: string
                    createdAt: string
                    resourceGroupSecretsSyncStatus:
                      rg-id-a: true
                      rg-id-b: false
        '404':
          $ref: '#/components/responses/BckndNotFound'
        '400':
          $ref: '#/components/responses/BckndBadRequest'
        default:
          $ref: '#/components/responses/BckndCommonError'
    patch:
      tags:
      - Secret
      summary: Update secret credentials
      description: Update secret credentials. Replace secret data with the provided data.
      operationId: kubesubmit.v4.generic_secrets.update
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BckndGenericSecretPatchBody'
      responses:
        '200':
          description: The secret has been updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BckndGenericSecretDataResponse'
              example:
                message: The secret has been modified
                name: my-generic-secret
        '404':
          $ref: '#/components/responses/BckndNotFound'
        '400':
          $ref: '#/components/responses/BckndBadRequest'
        default:
          $ref: '#/components/responses/BckndCommonError'
    delete:
      tags:
      - Secret
      summary: Deletes the secret
      description: Deletes the secret from provided resource group namespace
      operationId: kubesubmit.v4.generic_secrets.delete
      responses:
        '200':
          description: The secret has been removed
        '404':
          $ref: '#/components/responses/BckndNotFound'
        '400':
          description: The request was malformed and could thus not be processed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BckndErrorResponse'
        default:
          $ref: '#/components/responses/BckndCommonError'
    servers:
    - url: https://api.ai.{region}.ml.hana.ondemand.com/v2
      description: Production endpoint for SAP AI Core
      variables:
        region:
          enum:
          - prod.eu-central-1.aws
          - prodeuonly.eu-central-1.aws
          - prod.us-east-1.aws
          - prod.ap-northeast-1.aws
          - prod-ap11.ap-southeast-1.aws
          - prod-ap20.australiaeast.azure
          - prod.ap-southeast-2.aws
          - prod-eu20.westeurope.azure
          - prod-ap30.australia-southeast1.gcp
          - prod-in30.asia-south1.gcp
          - prod-sa30.me-central2.gcp
          - prod-us21.eastus.azure
          - prod-eu30.europe-west3.gcp
          - prod-us30.us-central1.gcp
          - prod-br10.sa-east-1.aws
          default: prod.eu-central-1.aws
components:
  responses:
    BckndNotFound:
      description: The specified resource was not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/BckndErrorResponse'
    BckndCommonError:
      description: HTTP status codes 401, 403 or 500. Response body contains further details.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/BckndErrorResponse'
    BckndBadRequest:
      description: The request was malformed and could thus not be processed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/BckndErrorResponse'
  parameters:
    BckndtokenHeader:
      name: Authorization
      in: header
      description: Authorization bearer token containing a JWT token.
      required: false
      schema:
        type: string
    BckndsecretName:
      name: secretName
      in: path
      required: true
      schema:
        type: string
        minLength: 1
        maxLength: 252
        pattern: ^[a-z0-9\-\.]+$
    Bckndcount:
      name: $count
      description: When the $count field is set to false, the response contains a count of the items present in the response. When the $count field is set to true, the response contains a count of all the items present on the server, and not just the ones in the response. When the $count field is not passed, it is false by default.
      in: query
      required: false
      schema:
        type: boolean
      example: true
    Bckndtop:
      name: $top
      description: Number of results to display
      in: query
      required: false
      schema:
        type: integer
        minimum: 0
      example: 10
    Bckndai-tenant-scope:
      name: AI-Tenant-Scope
      in: header
      description: Specify whether the main tenant scope is to be used
      required: false
      schema:
        type: boolean
      example: true
    Bckndai-resource-group:
      name: AI-Resource-Group
      in: header
      description: Specify an existing resource group id to use
      required: false
      schema:
        type: string
    Bckndskip:
      name: $skip
      description: Number of results to be skipped from the ordered list of results
      in: query
      required: false
      schema:
        type: integer
        minimum: 0
      example: 10
  schemas:
    BckndErrorResponse:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/BckndError'
    BckndGenericSecretPostBody:
      type: object
      required:
      - name
      - data
      properties:
        name:
          description: The name of the secret
          type: string
          minLength: 1
          maxLength: 252
          pattern: ^[a-z0-9\-\.]+$
        data:
          $ref: '#/components/schemas/BckndGenericSecretData'
        labels:
          $ref: '#/components/schemas/BckndGenericSecretLabels'
    BckndGenericSecretLabels:
      type: array
      description: Arbitrary labels as meta information
      items:
        $ref: '#/components/schemas/BckndGenericSecretLabel'
    BckndName:
      type: string
      description: Name
    BckndGenericSecretLabel:
      type: object
      required:
      - key
      - value
      properties:
        key:
          type: string
          pattern: ^ext.ai.sap.com/(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]){1,48}$
          maxLength: 63
          example: ext.ai.sap.com/my-label
        value:
          type: string
          maxLength: 5000
    BckndError:
      type: object
      required:
      - code
      - message
      properties:
        code:
          type: string
          description: Descriptive error code (not http status code)
        message:
          type: string
          description: Plaintext error description
          example: something went wrong
        requestId:
          type: string
          description: ID of the individual request
        target:
          type: string
          description: Invoked URL
        details:
          description: Optional details of the error message
          type: object
    BckndGenericSecretData:
      description: Base64 encoded secret data
      type: object
      additionalProperties:
        type: string
    BckndGenericSecretPatchBody:
      type: object
      required:
      - data
      properties:
        data:
          $ref: '#/components/schemas/BckndGenericSecretData'
        labels:
          $ref: '#/components/schemas/BckndGenericSecretLabels'
    BckndListGenericSecretsResponse:
      description: This represents a list of meta-data of the secret. The 'data' field of the secret is never retrieved.
      type: object
      properties:
        count:
          type: integer
          description: Number of the resource instances in the list
        resources:
          type: array
          items:
            $ref: '#/components/schemas/BckndGenericSecretDetails'
      required:
      - count
      - resources
    BckndGenericSecretDataResponse:
      type: object
      properties:
        message:
          $ref: '#/components/schemas/BckndMessage'
        name:
          $ref: '#/components/schemas/BckndName'
    BckndMessage:
      type: string
      description: Message
    BckndGenericSecretDetails:
      type: object
      required:
      - name
      - createdAt
      properties:
        name:
          description: Name of the secret
          type: string
        createdAt:
          description: Timestamp at which secret was created
          type: string
        labels:
          $ref: '#/components/schemas/BckndGenericSecretLabels'
        resourceGroupSecretsSyncStatus:
          description: Sync status of the replicated secrets in all resource groups of the tenant
          type: object
          additionalProperties:
            type: boolean
            description: Resource group ID and sync status
  securitySchemes:
    Oauth2:
      type: oauth2
      description: OAuth client credentials (client ID and secret) are required. These can be requested from SAP BTP cloud cockpit.
      flows:
        clientCredentials:
          tokenUrl: https://{subdomain_identity_zone}.authentication.{host}/oauth/token
          scopes: {}
externalDocs:
  description: Documentation for SAP AI Core
  url: https://help.sap.com/docs/AI_CORE?version=CLOUD
x-refined-from:
- ai-core.yaml
- sap-btp-ai-core-openapi.yml
x-sap-shortText: Create and manage AI scenarios, trainings, deployments, and artifacts in SAP AI Core.