diff --git a/eslint.config.js b/eslint.config.js index b023fd6f..ccd444fd 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -3,12 +3,18 @@ import flatConfig from '@sap-cloud-sdk/eslint-config/flat-config.js'; export default [ ...flatConfig, { - ignores: ['**/dist/**/*', '**/coverage/**/*', 'packages/ai-core/src/'], + ignores: ['**/dist/**/*', '**/coverage/**/*', 'packages/ai-core/src/client/**/*'], }, { - files: ['**/test-util/**/*.ts'], + files: ['**/test-util/**/*.ts', '**/packages/gen-ai-hub/src/orchestration/client/**/*'], rules: { 'jsdoc/require-jsdoc': 'off' } + }, + { + files: ['**/packages/gen-ai-hub/src/orchestration/client/api/default-api.ts'], + rules: { + '@typescript-eslint/explicit-module-boundary-types': 'off' + } } ]; diff --git a/package.json b/package.json index f9f633f5..67d663f8 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,8 @@ "test": "NODE_OPTIONS=--experimental-vm-modules pnpm -r run test", "test:type": "tsd", "lint": "pnpm -r run lint", - "lint:fix": "pnpm -r run lint:fix" + "lint:fix": "pnpm -r run lint:fix", + "generate": "pnpm -r run generate" }, "devDependencies": { "@changesets/cli": "^2.27.7", diff --git a/packages/ai-core/package.json b/packages/ai-core/package.json index c0d88c36..f2aa0021 100644 --- a/packages/ai-core/package.json +++ b/packages/ai-core/package.json @@ -20,12 +20,14 @@ "compile": "tsc", "test": "NODE_OPTIONS=--experimental-vm-modules jest", "lint": "eslint . && prettier . --config ../../.prettierrc --ignore-path ../../.prettierignore -c", - "lint:fix": "eslint . --fix && prettier . --config ../../.prettierrc --ignore-path ../../.prettierignore -w --log-level error" + "lint:fix": "eslint . --fix && prettier . --config ../../.prettierrc --ignore-path ../../.prettierignore -w --log-level error", + "generate": "openapi-generator --generateESM --overwrite --input ./src/spec/AI_CORE_API.yaml --outputDir ./src/client && pnpm lint:fix" }, "dependencies": { "@sap-cloud-sdk/openapi": "^3.18.0" }, "devDependencies": { - "typescript": "^5.5.4" + "typescript": "^5.5.4", + "@sap-cloud-sdk/openapi-generator": "^3.18.0" } } diff --git a/packages/ai-core/spec/AI_CORE_API.yaml b/packages/ai-core/spec/AI_CORE_API.yaml deleted file mode 100644 index 59f9acf6..00000000 --- a/packages/ai-core/spec/AI_CORE_API.yaml +++ /dev/null @@ -1,7055 +0,0 @@ -openapi: 3.0.0 -info: - title: AI Core - description: | - Provides tools to manage your scenarios and workflows in SAP AI Core. Execute pipelines as a batch job, for example to pre-process or train your models, or perform batch inference. Serve inference requests of trained models. Deploy а trained machine learning model as a web service to serve inference requests with high performance. Register your own Docker registry, synchronize your AI content from your own git repository, and register your own object store for training data and trained models. - version: 2.29.0 -externalDocs: - description: Documentation for SAP AI Core - url: https://help.sap.com/docs/AI_CORE?version=CLOUD -servers: - - url: https://api.ai.{region}.aws.ml.hana.ondemand.com/v2 - description: Production endpoint for SAP AI Core - variables: - region: - default: prod.eu-central-1 - enum: - - prod.eu-central-1 - - prodeuonly.eu-central-1 - - prod.us-east-1 - - prod.ap-northeast-1 - - prod.ap-southeast-2 -security: - - Oauth2: [] -tags: - - name: Scenario - description: Access to scenarios - - name: Executable - description: Access to executables - - name: Configuration - description: Access to configurations for executions and deployments - - name: Deployment - description: Access to deployments - - name: Execution - description: Access to executions - - name: Artifact - description: Access to artifacts, e.g. datasets and models - - name: Docker Registry Secret - description: Access to dockerRegistrySecrets - - name: Metrics - description: Access metrics of training runs - - name: KPI - description: Access to usage information for a tenant - - name: Object Store Secret - description: Access to objectStoreSecrets - - name: Secret - description: Access to generic secrets - - name: Meta - description: Metadata about API provider and capabilities - - name: Execution Schedule - description: Access to executionSchedules -paths: - /lm/artifacts: - get: - tags: - - Artifact - summary: Get list of artifacts - description: | - Retrieve a list of artifacts that matches the specified filter criteria. - Filter criteria include scenario ID, execution ID, an artifact name, artifact kind, or artifact labels. - Use top/skip parameters to paginate the result list. - Search by substring of artifact name or description, if required. - operationId: artifact.query - parameters: - - name: scenarioId - in: query - description: Scenario identifier - required: false - schema: - pattern: ^[\w.-]{4,64}$ - type: string - example: aa97b177-9383-4934-8543-0f91a7a0283a - - name: executionId - in: query - description: Execution identifier - required: false - schema: - pattern: ^[\w.-]{4,64}$ - type: string - example: aa97b177-9383-4934-8543-0f91a7a0283a - - name: name - in: query - description: Artifact name - required: false - schema: - $ref: '#/components/schemas/name' - example: inception - - name: kind - in: query - description: Kind of the artifact - required: false - schema: - type: string - enum: - - model - - dataset - - resultset - - other - example: model - - name: artifactLabelSelector - in: query - description: | - Filter artifact by labels. Pass in expressions in the form of "key=value" or "key!=value" separated by commas and the result will be filtered to only those resources that have labels that match all provided expressions (i.e. logical AND). The maximum number of labels permitted for filtering is 10 - required: false - style: form - explode: false - schema: - maxItems: 10 - minItems: 1 - type: array - items: - maxLength: 5000 - pattern: ^ext\.ai\.sap\.com\/[\w\.-]+!?=[^ =,]+$ - type: string - example: ext.ai.sap.com/key1=value1,ext.ai.sap.com/key2!=value2 - - name: $top - in: query - description: Number of results to display - required: false - schema: - maximum: 100000 - type: integer - default: 10000 - example: 10 - x-visible: false - - name: $skip - in: query - description: Number of results to be skipped from the ordered list of results - required: false - schema: - type: integer - example: 10 - x-visible: false - - name: $search - in: query - description: Generic search term to be looked for in various attributes - required: false - schema: - pattern: ^[^~]{1,80}$ - type: string - example: onfigur - - name: searchCaseInsensitive - in: query - description: indicates whether the search should be case insensitive - required: false - schema: - type: boolean - default: false - example: true - - name: $expand - in: query - description: expand detailed information on scenario - required: false - schema: - type: string - enum: - - scenario - example: scenario - x-visible: false - responses: - '200': - description: A list of artifacts - content: - application/json: - schema: - $ref: '#/components/schemas/ArtifactList' - '400': - description: The specification of the resource was incorrect - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400' - post: - tags: - - Artifact - summary: Register artifact - description: Register an artifact for use in a configuration, for example a model or a dataset. - operationId: artifact.create - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ArtifactPostData' - required: true - responses: - '201': - description: The artifact has been registered successfully - headers: - Location: - description: URL of the registered artifact - schema: - $ref: '#/components/schemas/Url' - Content-Location: - description: URL of the registered artifact. This header is deprecated. Location header shall be used instead. - deprecated: true - schema: - $ref: '#/components/schemas/Url' - content: - application/json: - schema: - $ref: '#/components/schemas/ArtifactCreationResponse' - '400': - description: The specification of the resource was incorrect - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400' - parameters: - - name: AI-Resource-Group - in: header - description: Specify a resource group id - required: true - schema: - type: string - /lm/artifacts/{artifactId}: - get: - tags: - - Artifact - summary: Get artifact by ID - description: Retrieve details for artifact with artifactId. - operationId: artifact.get - responses: - '200': - description: An artifact - content: - application/json: - schema: - $ref: '#/components/schemas/Artifact' - '400': - description: The specification of the resource was incorrect - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400' - '404': - description: The specified resource was not found - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400' - parameters: - - name: AI-Resource-Group - in: header - description: Specify a resource group id - required: true - schema: - type: string - - name: artifactId - in: path - description: Artifact identifier - required: true - schema: - pattern: ^[\w.-]{4,64}$ - type: string - example: aa97b177-9383-4934-8543-0f91a7a0283a - - name: $expand - in: query - description: expand detailed information on scenario - required: false - schema: - type: string - enum: - - scenario - example: scenario - x-visible: false - /lm/configurations: - get: - tags: - - Configuration - summary: Get list of configurations - description: | - Retrieve a list of configurations. Filter results by scenario ID or a list of executable IDs. - Search for configurations containing the search string as substring in the configuration name. - operationId: configuration.query - parameters: - - name: scenarioId - in: query - description: Scenario identifier - required: false - schema: - pattern: ^[\w.-]{4,64}$ - type: string - example: aa97b177-9383-4934-8543-0f91a7a0283a - - name: $top - in: query - description: Number of results to display - required: false - schema: - maximum: 100000 - type: integer - default: 10000 - example: 10 - x-visible: false - - name: $skip - in: query - description: Number of results to be skipped from the ordered list of results - required: false - schema: - type: integer - example: 10 - x-visible: false - - name: executableIds - in: query - description: Limit query to only these executable IDs - style: form - explode: false - schema: - maxItems: 1000 - type: array - items: - pattern: ^[\w.-]{4,64}$ - type: string - - name: $search - in: query - description: Generic search term to be looked for in various attributes - required: false - schema: - pattern: ^[^~]{1,80}$ - type: string - example: onfigur - - name: searchCaseInsensitive - in: query - description: indicates whether the search should be case insensitive - required: false - schema: - type: boolean - default: false - example: true - - name: $expand - in: query - description: expand detailed information on scenario - required: false - schema: - type: string - enum: - - scenario - example: scenario - x-visible: false - responses: - '200': - description: A list of configurations - content: - application/json: - schema: - $ref: '#/components/schemas/ConfigurationList' - '400': - description: The specification of the resource was incorrect - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400' - post: - tags: - - Configuration - summary: Create configuration - description: | - Create a new configuration linked to a specific scenario and executable for use in an execution - or deployment. - operationId: configuration.create - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ConfigurationBaseData' - required: true - responses: - '201': - description: The created configuration - headers: - Location: - description: URL of the created configuration - schema: - $ref: '#/components/schemas/Url' - content: - application/json: - schema: - $ref: '#/components/schemas/ConfigurationCreationResponse' - '400': - description: The specification of the resource was incorrect - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400' - parameters: - - name: AI-Resource-Group - in: header - description: Specify a resource group id - required: true - schema: - type: string - /lm/configurations/{configurationId}: - get: - tags: - - Configuration - summary: Get configuration by ID - description: Retrieve details for configuration with configurationId. - operationId: configuration.get - responses: - '200': - description: A configuration - content: - application/json: - schema: - $ref: '#/components/schemas/Configuration' - '400': - description: The specification of the resource was incorrect - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400' - '404': - description: The specified resource was not found - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400' - parameters: - - name: AI-Resource-Group - in: header - description: Specify a resource group id - required: true - schema: - type: string - - name: configurationId - in: path - description: Configuration identifier - required: true - schema: - pattern: ^[\w.-]{4,64}$ - type: string - example: aa97b177-9383-4934-8543-0f91a7a0283a - - name: $expand - in: query - description: expand detailed information on scenario - required: false - schema: - type: string - enum: - - scenario - example: scenario - x-visible: false - /lm/configurations/{configurationId}/deployments: - post: - tags: - - Deployment - summary: Create deployment - description: Create deployment. Deprecated, use POST /deployments instead - operationId: deployment.create_deprecated - responses: - '202': - description: The deployment has been scheduled successfully - headers: - Location: - description: URL of the scheduled deployment - schema: - $ref: '#/components/schemas/Url' - Content-Location: - description: URL of the scheduled deployment. This header is deprecated. Location header shall be used instead. - deprecated: true - schema: - $ref: '#/components/schemas/Url' - content: - application/json: - schema: - $ref: '#/components/schemas/DeploymentCreationResponse' - '400': - description: The specification of the resource was incorrect - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400' - deprecated: true - parameters: - - name: AI-Resource-Group - in: header - description: Specify a resource group id - required: true - schema: - type: string - - name: configurationId - in: path - description: Configuration identifier - required: true - schema: - pattern: ^[\w.-]{4,64}$ - type: string - example: aa97b177-9383-4934-8543-0f91a7a0283a - /lm/configurations/{configurationId}/executions: - post: - tags: - - Execution - summary: Trigger execution - description: Trigger execution. Deprecated. Use POST /executions instead - operationId: execution.create_deprecated - responses: - '202': - description: The execution has been scheduled successfully - headers: - Location: - description: URL of the scheduled execution - schema: - $ref: '#/components/schemas/Url' - content: - application/json: - schema: - $ref: '#/components/schemas/ExecutionCreationResponse' - '400': - description: The specification of the resource was incorrect - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400' - deprecated: true - parameters: - - name: AI-Resource-Group - in: header - description: Specify a resource group id - required: true - schema: - type: string - - name: configurationId - in: path - description: Configuration identifier - required: true - schema: - pattern: ^[\w.-]{4,64}$ - type: string - example: aa97b177-9383-4934-8543-0f91a7a0283a - /lm/deployments: - get: - tags: - - Deployment - summary: Get list of deployments - description: | - Retrieve a list of deployments that match the specified filter criteria. - Filter criteria include a list of executableIds, a scenarioId, a configurationId, or a deployment status. - With top/skip parameters it is possible to paginate the result list. - With select parameter it is possible to select only status. - operationId: deployment.query - parameters: - - name: executableIds - in: query - description: Limit query to only these executable IDs - style: form - explode: false - schema: - maxItems: 1000 - type: array - items: - pattern: ^[\w.-]{4,64}$ - type: string - - name: configurationId - in: query - description: Configuration identifier - required: false - schema: - pattern: ^[\w.-]{4,64}$ - type: string - example: aa97b177-9383-4934-8543-0f91a7a0283a - - name: scenarioId - in: query - description: Scenario identifier - required: false - schema: - pattern: ^[\w.-]{4,64}$ - type: string - example: aa97b177-9383-4934-8543-0f91a7a0283a - - name: status - in: query - description: Filter by status - required: false - schema: - type: string - enum: - - PENDING - - RUNNING - - COMPLETED - - DEAD - - STOPPING - - STOPPED - - UNKNOWN - example: RUNNING - - name: $top - in: query - description: Number of results to display - required: false - schema: - maximum: 100000 - type: integer - default: 10000 - example: 10 - x-visible: false - - name: $skip - in: query - description: Number of results to be skipped from the ordered list of results - required: false - schema: - type: integer - example: 10 - x-visible: false - - name: $select - in: query - description: Allows to request a specified set of properties for each entity - required: false - schema: - type: string - enum: - - status - example: status - x-visible: false - responses: - '200': - description: A list of deployments - content: - application/json: - schema: - $ref: '#/components/schemas/DeploymentList' - '400': - description: The specification of the resource was incorrect - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400' - post: - tags: - - Deployment - summary: Create deployment - description: Create a deployment using the configuration specified by configurationId. - operationId: deployment.create - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/DeploymentCreationRequest' - required: true - responses: - '202': - description: The deployment has been scheduled successfully - headers: - Location: - description: URL of the scheduled deployment - schema: - $ref: '#/components/schemas/Url' - content: - application/json: - schema: - $ref: '#/components/schemas/DeploymentCreationResponse' - '400': - description: The specification of the resource was incorrect - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400' - patch: - tags: - - Deployment - summary: Patch multiple deployments - description: Update status of multiple deployments. stop or delete multiple deployments. - operationId: deployment.batch_modify - requestBody: - content: - application/merge-patch+json: - schema: - $ref: '#/components/schemas/DeploymentBulkModificationRequest' - required: true - responses: - '202': - description: The modification of the deployments have been scheduled successfully - content: - application/json: - schema: - $ref: '#/components/schemas/DeploymentBulkModificationResponse' - '400': - description: The specification of the resource was incorrect - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400' - parameters: - - name: AI-Resource-Group - in: header - description: Specify a resource group id - required: true - schema: - type: string - /lm/deployments/{deploymentId}: - get: - tags: - - Deployment - summary: Get information about specific deployment - description: Retrieve details for execution with deploymentId. - operationId: deployment.get - parameters: - - name: $select - in: query - description: Allows to request a specified set of properties for each entity - required: false - schema: - type: string - enum: - - status - example: status - x-visible: false - responses: - '200': - description: Information about the deployment - content: - application/json: - schema: - $ref: '#/components/schemas/DeploymentResponseWithDetails' - '400': - description: The specification of the resource was incorrect - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400' - '404': - description: The specified resource was not found - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400' - delete: - tags: - - Deployment - summary: Mark deployment as deleted - description: Mark deployment with deploymentId as deleted. - operationId: deployment.delete - responses: - '202': - description: The deletion of the deployment has been scheduled successfully - content: - application/json: - schema: - $ref: '#/components/schemas/DeploymentDeletionResponse' - '400': - description: The specification of the resource was incorrect - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400' - '404': - description: The specified resource was not found - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400' - '412': - description: The service didn't meet the precondition needed to execute this operation - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400' - patch: - tags: - - Deployment - summary: Update target status or configuration of a deployment - description: Update target status of a deployment to stop a deployment or change the configuration to be used by the deployment. A change of configuration is only allowed for RUNNING and PENDING deployments. - operationId: deployment.modify - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/DeploymentModificationRequest' - required: true - responses: - '202': - description: The modification of the deployment has been scheduled successfully - content: - application/json: - schema: - $ref: '#/components/schemas/DeploymentModificationResponse' - '400': - description: The specification of the resource was incorrect - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400' - '404': - description: The specified resource was not found - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400' - '412': - description: The service didn't meet the precondition needed to execute this operation - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400' - parameters: - - name: AI-Resource-Group - in: header - description: Specify a resource group id - required: true - schema: - type: string - - name: deploymentId - in: path - description: Deployment identifier - required: true - schema: - pattern: ^[\w.-]{4,64}$ - type: string - example: aa97b177-9383-4934-8543-0f91a7a0283a - /lm/executions: - get: - tags: - - Execution - summary: Get list of executions - description: | - Retrieve a list of executions that match the specified filter criteria. - Filter criteria include a list of executableIds, a scenarioId, a configurationId, or a execution status. - With top/skip parameters it is possible to paginate the result list. - With select parameter it is possible to select only status. - operationId: execution.query - parameters: - - name: executableIds - in: query - description: Limit query to only these executable IDs - style: form - explode: false - schema: - maxItems: 1000 - type: array - items: - pattern: ^[\w.-]{4,64}$ - type: string - - name: configurationId - in: query - description: Configuration identifier - required: false - schema: - pattern: ^[\w.-]{4,64}$ - type: string - example: aa97b177-9383-4934-8543-0f91a7a0283a - - name: scenarioId - in: query - description: Scenario identifier - required: false - schema: - pattern: ^[\w.-]{4,64}$ - type: string - example: aa97b177-9383-4934-8543-0f91a7a0283a - - name: executionScheduleId - in: query - description: Execution Schedule identifier - required: false - schema: - pattern: ^[\w.-]{4,64}$ - type: string - example: aa97b177-9383-4934-8543-0f91a7a0283a - - name: status - in: query - description: Filter by status - required: false - schema: - type: string - enum: - - PENDING - - RUNNING - - COMPLETED - - DEAD - - STOPPING - - STOPPED - - UNKNOWN - example: RUNNING - - name: $top - in: query - description: Number of results to display - required: false - schema: - maximum: 100000 - type: integer - default: 10000 - example: 10 - x-visible: false - - name: $skip - in: query - description: Number of results to be skipped from the ordered list of results - required: false - schema: - type: integer - example: 10 - x-visible: false - - name: $select - in: query - description: Allows to request a specified set of properties for each entity - required: false - schema: - type: string - enum: - - status - example: status - x-visible: false - responses: - '200': - description: A list of executions - content: - application/json: - schema: - $ref: '#/components/schemas/ExecutionList' - '400': - description: The specification of the resource was incorrect - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400' - post: - tags: - - Execution - summary: Create execution - description: Create an execution using the configuration specified by configurationId. - operationId: execution.create - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/EnactmentCreationRequest' - required: true - responses: - '202': - description: The execution has been scheduled successfully - headers: - Location: - description: URL of the scheduled execution - schema: - $ref: '#/components/schemas/Url' - content: - application/json: - schema: - $ref: '#/components/schemas/ExecutionCreationResponse' - '400': - description: The specification of the resource was incorrect - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400' - patch: - tags: - - Execution - summary: Patch multiple executions - description: Patch multiple executions' status to stopped or deleted. - operationId: execution.batch_modify - requestBody: - content: - application/merge-patch+json: - schema: - $ref: '#/components/schemas/ExecutionBulkModificationRequest' - required: true - responses: - '202': - description: The modification of the executions have been scheduled successfully - content: - application/json: - schema: - $ref: '#/components/schemas/ExecutionBulkModificationResponse' - '400': - description: The specification of the resource was incorrect - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400' - parameters: - - name: AI-Resource-Group - in: header - description: Specify a resource group id - required: true - schema: - type: string - /lm/executions/{executionId}: - get: - tags: - - Execution - summary: Get information about a specific execution - description: Retrieve details for execution with executionId. - operationId: execution.get - parameters: - - name: $select - in: query - description: Allows to request a specified set of properties for each entity - required: false - schema: - type: string - enum: - - status - example: status - x-visible: false - responses: - '200': - description: Information about the execution - content: - application/json: - schema: - $ref: '#/components/schemas/ExecutionResponseWithDetails' - '400': - description: The specification of the resource was incorrect - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400' - '404': - description: The specified resource was not found - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400' - delete: - tags: - - Execution - summary: Mark execution as deleted - description: Mark the execution with executionId as deleted. - operationId: execution.delete - responses: - '202': - description: The deletion of the execution has been scheduled successfully - content: - application/json: - schema: - $ref: '#/components/schemas/ExecutionDeletionResponse' - '400': - description: The specification of the resource was incorrect - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400' - '404': - description: The specified resource was not found - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400' - '412': - description: The service didn't meet the precondition needed to execute this operation - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400' - patch: - tags: - - Execution - summary: Update target status of an execution - description: Update target status of the execution to stop an execution. - operationId: execution.modify - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ExecutionModificationRequest' - required: true - responses: - '202': - description: The modification of the execution has been scheduled successfully - content: - application/json: - schema: - $ref: '#/components/schemas/ExecutionModificationResponse' - '400': - description: The specification of the resource was incorrect - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400' - '404': - description: The specified resource was not found - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400' - '412': - description: The service didn't meet the precondition needed to execute this operation - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400' - parameters: - - name: AI-Resource-Group - in: header - description: Specify a resource group id - required: true - schema: - type: string - - name: executionId - in: path - description: Execution identifier - required: true - schema: - pattern: ^[\w.-]{4,64}$ - type: string - example: aa97b177-9383-4934-8543-0f91a7a0283a - /lm/executionSchedules: - get: - tags: - - Execution Schedule - summary: Get list of execution schedules - description: | - Retrieve a list of execution schedules that match the specified filter criteria. - Filter criteria include executionScheduleStatus or a configurationId. - With top/skip parameters it is possible to paginate the result list. - operationId: execution_schedule.query - parameters: - - name: configurationId - in: query - description: Configuration identifier - required: false - schema: - pattern: ^[\w.-]{4,64}$ - type: string - example: aa97b177-9383-4934-8543-0f91a7a0283a - - name: status - in: query - description: Execution Schedule status - required: false - schema: - type: string - enum: - - ACTIVE - - INACTIVE - example: ACTIVE - - name: $top - in: query - description: Number of results to display - required: false - schema: - maximum: 100000 - type: integer - default: 10000 - example: 10 - x-visible: false - - name: $skip - in: query - description: Number of results to be skipped from the ordered list of results - required: false - schema: - type: integer - example: 10 - x-visible: false - responses: - '200': - description: A list of execution schedules - content: - application/json: - schema: - $ref: '#/components/schemas/ExecutionScheduleList' - '400': - description: The specification of the resource was incorrect - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400' - post: - tags: - - Execution Schedule - summary: Create execution schedule - description: Create an execution schedule using the configuration specified by configurationId, and schedule. - operationId: execution_schedule.create - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ExecutionScheduleCreationData' - required: true - responses: - '202': - description: The execution schedule has been created successfully - headers: - Location: - description: URL of the execution schedule - schema: - $ref: '#/components/schemas/Url' - content: - application/json: - schema: - $ref: '#/components/schemas/ExecutionScheduleCreationResponse' - '400': - description: The specification of the resource was incorrect - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400' - parameters: - - name: AI-Resource-Group - in: header - description: Specify a resource group id - required: true - schema: - type: string - /lm/executionSchedules/{executionScheduleId}: - get: - tags: - - Execution Schedule - summary: Get information about an execution schedule - description: Retrieve details for execution schedule with executionScheduleId. - operationId: execution_schedule.get - responses: - '200': - description: Information about the execution schedule - content: - application/json: - schema: - $ref: '#/components/schemas/ExecutionSchedule' - '400': - description: The specification of the resource was incorrect - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400' - '404': - description: The specified resource was not found - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400' - delete: - tags: - - Execution Schedule - summary: Delete execution schedule - description: Delete the execution schedule with executionScheduleId. - operationId: execution_schedule.delete - responses: - '202': - description: The execution schedule has been deleted successfully - content: - application/json: - schema: - $ref: '#/components/schemas/ExecutionScheduleDeletionResponse' - '400': - description: The specification of the resource was incorrect - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400' - '404': - description: The specified resource was not found - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400' - patch: - tags: - - Execution Schedule - summary: Update an execution schedule - description: Update details of an execution schedule - operationId: execution_schedule.modify - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ExecutionScheduleModificationRequest' - required: true - responses: - '202': - description: The execution schedule has been modified successfully - content: - application/json: - schema: - $ref: '#/components/schemas/ExecutionScheduleModificationResponse' - '400': - description: The specification of the resource was incorrect - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400' - '404': - description: The specified resource was not found - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400' - parameters: - - name: AI-Resource-Group - in: header - description: Specify a resource group id - required: true - schema: - type: string - - name: executionScheduleId - in: path - description: Execution Schedule identifier - required: true - schema: - pattern: ^[\w.-]{4,64}$ - type: string - example: aa97b177-9383-4934-8543-0f91a7a0283a - /lm/scenarios: - get: - tags: - - Scenario - summary: Get list of scenarios - description: Retrieve a list of all available scenarios. - operationId: scenario.query - responses: - '200': - description: A list of scenarios - content: - application/json: - schema: - $ref: '#/components/schemas/ScenarioList' - parameters: - - name: AI-Resource-Group - in: header - description: Specify a resource group id - required: true - schema: - type: string - /lm/scenarios/{scenarioId}: - get: - tags: - - Scenario - summary: Get scenario by id - description: Retrieve details for a scenario specified by scenarioId. - operationId: scenario.get - responses: - '200': - description: A scenario - content: - application/json: - schema: - $ref: '#/components/schemas/Scenario' - '400': - description: The specification of the resource was incorrect - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400' - '404': - description: The specified resource was not found - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400' - parameters: - - name: AI-Resource-Group - in: header - description: Specify a resource group id - required: true - schema: - type: string - - name: scenarioId - in: path - description: Scenario identifier - required: true - schema: - pattern: ^[\w.-]{4,64}$ - type: string - example: aa97b177-9383-4934-8543-0f91a7a0283a - /lm/scenarios/{scenarioId}/executables: - get: - tags: - - Executable - summary: Get list of executables - description: | - Retrieve a list of executables for a scenario. Filter by version ID, if required. - operationId: executable.query - parameters: - - name: versionId - in: query - description: Version ID, if defined - returns the specified version - required: false - schema: - type: string - responses: - '200': - description: A list of executables - content: - application/json: - schema: - $ref: '#/components/schemas/ExecutableList' - '400': - description: The specification of the resource was incorrect - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400' - parameters: - - name: scenarioId - in: path - description: Scenario identifier - required: true - schema: - pattern: ^[\w.-]{4,64}$ - type: string - example: aa97b177-9383-4934-8543-0f91a7a0283a - - name: AI-Resource-Group - in: header - description: Specify a resource group id - required: true - schema: - type: string - /lm/scenarios/{scenarioId}/executables/{executableId}: - get: - tags: - - Executable - summary: Get details about specific executable - description: | - Retrieve details about an executable identified by executableId belonging - to a scenario identified by scenarioId. - operationId: executable.get - responses: - '200': - description: An Executable - content: - application/json: - schema: - $ref: '#/components/schemas/Executable' - '400': - description: The specification of the resource was incorrect - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400' - '404': - description: The specified resource was not found - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400' - parameters: - - name: scenarioId - in: path - description: Scenario identifier - required: true - schema: - pattern: ^[\w.-]{4,64}$ - type: string - example: aa97b177-9383-4934-8543-0f91a7a0283a - - name: executableId - in: path - description: Executable identifier - required: true - schema: - pattern: ^[\w.-]{4,64}$ - type: string - example: aa97b177-9383-4934-8543-0f91a7a0283a - - name: AI-Resource-Group - in: header - description: Specify a resource group id - required: true - schema: - type: string - /lm/scenarios/{scenarioId}/versions: - get: - tags: - - Scenario - summary: Get list of versions for scenario - description: | - Retrieve a list of scenario versions based on the versions of executables - available within that scenario. - operationId: scenario.query_versions - responses: - '200': - description: A list of versions for the scenario - content: - application/json: - schema: - $ref: '#/components/schemas/VersionList' - '400': - description: The specification of the resource was incorrect - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400' - parameters: - - name: AI-Resource-Group - in: header - description: Specify a resource group id - required: true - schema: - type: string - - name: scenarioId - in: path - description: Scenario identifier - required: true - schema: - pattern: ^[\w.-]{4,64}$ - type: string - example: aa97b177-9383-4934-8543-0f91a7a0283a - - name: labelSelector - in: query - description: | - filter by labels. Pass in expressions in the form of "key=value" or "key!=value" separated by commas and the result will be filtered to only those resources that have labels that match all provided expressions (i.e. logical AND) - required: false - style: form - explode: false - schema: - minItems: 1 - type: array - items: - maxLength: 5000 - pattern: ^ext\.ai\.sap\.com\/[\w\.-]+!?=[^ =,]+$ - type: string - example: ext.ai.sap.com/key1=value1,ext.ai.sap.com/key2!=value2 - /lm/artifacts/$count: - get: - tags: - - Artifact - summary: Get number of artifacts - description: | - Retrieve the number of available artifacts that match the specified filter criteria. - Filter criteria include a scenarioId, executionId, an artifact name, artifact kind, or artifact labels. - Search by substring of artifact name or description is also possible. - operationId: artifact.count - parameters: - - name: AI-Resource-Group - in: header - description: Specify a resource group id - required: true - schema: - type: string - - name: scenarioId - in: query - description: Scenario identifier - required: false - schema: - pattern: ^[\w.-]{4,64}$ - type: string - example: aa97b177-9383-4934-8543-0f91a7a0283a - - name: executionId - in: query - description: Execution identifier - required: false - schema: - pattern: ^[\w.-]{4,64}$ - type: string - example: aa97b177-9383-4934-8543-0f91a7a0283a - - name: name - in: query - description: Artifact name - required: false - schema: - $ref: '#/components/schemas/name' - example: inception - - name: kind - in: query - description: Kind of the artifact - required: false - schema: - type: string - enum: - - model - - dataset - - resultset - - other - example: model - - name: $search - in: query - description: Generic search term to be looked for in various attributes - required: false - schema: - pattern: ^[^~]{1,80}$ - type: string - example: onfigur - - name: searchCaseInsensitive - in: query - description: indicates whether the search should be case insensitive - required: false - schema: - type: boolean - default: false - example: true - - name: artifactLabelSelector - in: query - description: | - Filter artifact by labels. Pass in expressions in the form of "key=value" or "key!=value" separated by commas and the result will be filtered to only those resources that have labels that match all provided expressions (i.e. logical AND). The maximum number of labels permitted for filtering is 10 - required: false - style: form - explode: false - schema: - maxItems: 10 - minItems: 1 - type: array - items: - maxLength: 5000 - pattern: ^ext\.ai\.sap\.com\/[\w\.-]+!?=[^ =,]+$ - type: string - example: ext.ai.sap.com/key1=value1,ext.ai.sap.com/key2!=value2 - responses: - '200': - description: Number of artifacts - content: - text/plain: - schema: - type: integer - '400': - description: The specification of the resource was incorrect - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400' - /lm/configurations/$count: - get: - tags: - - Configuration - summary: Get number of configurations - description: | - Retrieve the number of available configurations that match the specified filter criteria. - Filter criteria include a scenarioId or executableIdsList. Search by substring of configuration name is also possible. - operationId: configuration.count - parameters: - - name: AI-Resource-Group - in: header - description: Specify a resource group id - required: true - schema: - type: string - - name: scenarioId - in: query - description: Scenario identifier - required: false - schema: - pattern: ^[\w.-]{4,64}$ - type: string - example: aa97b177-9383-4934-8543-0f91a7a0283a - - name: $search - in: query - description: Generic search term to be looked for in various attributes - required: false - schema: - pattern: ^[^~]{1,80}$ - type: string - example: onfigur - - name: searchCaseInsensitive - in: query - description: indicates whether the search should be case insensitive - required: false - schema: - type: boolean - default: false - example: true - - name: executableIds - in: query - description: Limit query to only these executable IDs - style: form - explode: false - schema: - maxItems: 1000 - type: array - items: - pattern: ^[\w.-]{4,64}$ - type: string - responses: - '200': - description: Number of configurations - content: - text/plain: - schema: - type: integer - '400': - description: The specification of the resource was incorrect - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400' - /lm/executions/$count: - get: - tags: - - Execution - summary: Get number of executions - description: | - Retrieve the number of available executions. The number can be filtered by - scenarioId, configurationId, executableIdsList or by execution status. - operationId: execution.count - parameters: - - name: AI-Resource-Group - in: header - description: Specify a resource group id - required: true - schema: - type: string - - name: executableIds - in: query - description: Limit query to only these executable IDs - style: form - explode: false - schema: - maxItems: 1000 - type: array - items: - pattern: ^[\w.-]{4,64}$ - type: string - - name: configurationId - in: query - description: Configuration identifier - required: false - schema: - pattern: ^[\w.-]{4,64}$ - type: string - example: aa97b177-9383-4934-8543-0f91a7a0283a - - name: scenarioId - in: query - description: Scenario identifier - required: false - schema: - pattern: ^[\w.-]{4,64}$ - type: string - example: aa97b177-9383-4934-8543-0f91a7a0283a - - name: executionScheduleId - in: query - description: Execution Schedule identifier - required: false - schema: - pattern: ^[\w.-]{4,64}$ - type: string - example: aa97b177-9383-4934-8543-0f91a7a0283a - - name: status - in: query - description: Filter by status - required: false - schema: - type: string - enum: - - PENDING - - RUNNING - - COMPLETED - - DEAD - - STOPPING - - STOPPED - - UNKNOWN - example: RUNNING - responses: - '200': - description: Number of executions - content: - text/plain: - schema: - type: integer - '400': - description: The specification of the resource was incorrect - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400' - /lm/deployments/$count: - get: - tags: - - Deployment - summary: Get number of deployments - description: | - Retrieve the number of available deployments. The number can be filtered by - scenarioId, configurationId, executableIdsList or by deployment status. - operationId: deployment.count - parameters: - - name: AI-Resource-Group - in: header - description: Specify a resource group id - required: true - schema: - type: string - - name: executableIds - in: query - description: Limit query to only these executable IDs - style: form - explode: false - schema: - maxItems: 1000 - type: array - items: - pattern: ^[\w.-]{4,64}$ - type: string - - name: configurationId - in: query - description: Configuration identifier - required: false - schema: - pattern: ^[\w.-]{4,64}$ - type: string - example: aa97b177-9383-4934-8543-0f91a7a0283a - - name: scenarioId - in: query - description: Scenario identifier - required: false - schema: - pattern: ^[\w.-]{4,64}$ - type: string - example: aa97b177-9383-4934-8543-0f91a7a0283a - - name: status - in: query - description: Filter by status - required: false - schema: - type: string - enum: - - PENDING - - RUNNING - - COMPLETED - - DEAD - - STOPPING - - STOPPED - - UNKNOWN - example: RUNNING - responses: - '200': - description: Number of deployments - content: - text/plain: - schema: - type: integer - '400': - description: The specification of the resource was incorrect - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400' - /lm/executionSchedules/$count: - get: - tags: - - Execution Schedule - summary: Get number of execution schedules - description: | - Retrieve the number of scheduled executions. The number can be filtered by - configurationId or executionScheduleStatus. - operationId: execution_schedule.count - parameters: - - name: AI-Resource-Group - in: header - description: Specify a resource group id - required: true - schema: - type: string - - name: configurationId - in: query - description: Configuration identifier - required: false - schema: - pattern: ^[\w.-]{4,64}$ - type: string - example: aa97b177-9383-4934-8543-0f91a7a0283a - - name: status - in: query - description: Execution Schedule status - required: false - schema: - type: string - enum: - - ACTIVE - - INACTIVE - example: ACTIVE - responses: - '200': - description: Number of execution schedules - content: - text/plain: - schema: - type: integer - '400': - description: The specification of the resource was incorrect - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400' - /lm/meta: - get: - tags: - - Meta - summary: Meta information about API - description: Meta information about an implementation of AI API, describing its capabilities, limits and extensions - operationId: meta.get - responses: - '200': - description: Description of the implementation - content: - application/json: - schema: - $ref: '#/components/schemas/Capabilities' - '404': - description: The specified resource was not found - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400' - /lm/metrics: - get: - tags: - - Metrics - summary: | - Get metrics according to specified filter conditions. - description: "Retrieve metrics, labels, or tags according to filter conditions. \nOne query parameter is mandatory, either execution ID or filter. \nUse up to 10 execution IDs in a query parameter.\n" - operationId: metrics.find - parameters: - - name: AI-Resource-Group - in: header - description: Specify a resource group id - required: true - schema: - type: string - - name: $filter - in: query - description: Filter parameter allows filtering of metric resource using ExecutionId(s). User can only use in, eq operators in filter expression. - required: false - deprecated: true - schema: - type: string - example: executionId eq 'aa97b177-9383-4934-8543-0f91b7a0283a' - - name: executionIds - in: query - description: executionIds parameter allows filtering of metric resource using single or multiple ExecutionId(s). - required: false - style: form - explode: false - schema: - $ref: '#/components/schemas/StringArray' - example: executionIds=aa97b177-9383-4934-8543-0f91b7a0283a,aa97b177-9383-4934-8543-0f91b7a0283b - - name: $select - in: query - description: returns only the resources that the client explicitly requests. User can also pass * as a value for $select, which will behave same as that of not passing $select query param. - required: false - style: form - explode: false - schema: - $ref: '#/components/schemas/metricSelectorPermissibleValues' - examples: - selectAll: - value: $select=* - selectSpecific: - value: $select=metrics,customInfo - responses: - '200': - description: List of tracking metadata, where each item includes metrics, labels, tags and customInfo. If $select query parameter is specified, each item will include only the resources specified in $select. - content: - application/json: - schema: - $ref: '#/components/schemas/GetMetricResourceList' - '400': - description: The specification of the resource was incorrect - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400_1' - '501': - description: Operation is not Supported. - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400_1' - delete: - tags: - - Metrics - summary: Delete metrics, tags, or labels - description: Delete metrics, tags, or labels associated with an execution. - operationId: metrics.delete - parameters: - - name: AI-Resource-Group - in: header - description: Specify a resource group id - required: true - schema: - type: string - - name: executionId - in: query - description: The Id of an execution - required: true - schema: - $ref: '#/components/schemas/ExecutionId_2' - responses: - '200': - description: Metric Resource was successfully deleted - content: - application/json: - schema: - $ref: '#/components/schemas/DeleteMetricsResponse' - '404': - description: The specified resource was not found - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400_1' - patch: - tags: - - Metrics - summary: Create or update metrics, tags, or labels - description: | - Update or create metrics, tags, or labels associated with an execution. - operationId: metrics.patch - parameters: - - name: AI-Resource-Group - in: header - description: Specify a resource group id - required: true - schema: - type: string - requestBody: - content: - application/merge-patch+json: - schema: - $ref: '#/components/schemas/MetricResource' - required: true - responses: - '204': - description: Metrics was successfully updated/created - '400': - description: The specification of the resource was incorrect - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400_1' - '413': - description: request entity is larger than limits defined by server. - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400_1' - /analytics/kpis: - get: - tags: - - KPI - summary: Get KPIs - description: "Retrieve the number of executions, artifacts, and deployments \nfor each resource group, scenario, and executable. The columns to be returned can be specified in a query parameter.\n" - operationId: kpi.get - parameters: - - name: $select - in: query - description: Columns to select - required: false - style: form - explode: false - schema: - $ref: '#/components/schemas/ArrayOfColumnNames' - responses: - '200': - description: KPIs - content: - application/json: - schema: - $ref: '#/components/schemas/ResultSet' - examples: - example-1: - value: - header: - - ResourceGroup - - Executions - - Artifacts - - Deployments - rows: - - - 00112233-4455-6677-8899-aabbccddeeff - - 30 - - 30 - - 3 - '400': - description: Invalid request - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400' - '404': - description: The specified resource was not found - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400' - '429': - description: Too many requests - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400' - /lm/dataset/files/{path}: - get: - tags: - - File - summary: Download file - description: Endpoint for downloading file. The path must point to an individual file. - operationId: file.download - responses: - '200': - description: OK - headers: - X-Content-Type-Options: - description: as per SEC-228 value should always be "nosniff" - required: true - schema: - type: string - Content-Security-Policy: - description: as per SEC-228 value should always be "default-src 'none'; sandbox" - required: true - schema: - type: string - Content-Disposition: - description: as per SEC-228 value should always be "attachment" - required: true - schema: - type: string - content: - application/octet-stream: - schema: - type: string - format: binary - '400': - description: The specification of the resource was incorrect - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400_2' - example: - error: - code: '03021655' - message: Bad request encountered. Please try again with possible-solution-here. - target: /url/path - requestId: 9832bf934f3743v3948v3 - details: - - code: '01041211' - message: Optional nested error message. - '404': - description: The specified resource was not found - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400_2' - example: - error: - code: '03021655' - message: The resource you requested was not found. Please try again with possible-solution-here. - target: /url/path - requestId: 9832bf934f3743v3948v3 - details: - - code: '01041211' - message: Optional nested error message. - put: - tags: - - File - summary: Upload file (size <= 100Mb) - description: "Endpoint for uploading file. The maximum file size depends on the actual implementation \nbut must not exceed 100MB. The actual file size limit can be obtained by querying \nthe AI API Runtime Capabilities Endpoint and checking the limits in the section of the `fileUpload` extension.\n\nPath cannot be a prefix, it must be a path to an object.\nClients may group the objects in any manner they choose by specifying path prefixes.\n\nAllowed mime-types will be decided by the implementation.\nContent-Type header can be set to \"application/octet-stream\" but the implementation is responsible \nfor detecting the actual mime type and checking against the allowed list of mime types. \nFor security reasons, implementations cannot trust the mime type sent by the client.\n\nExample URLs: \n/files/dar/schemas/schema.json \n/files/icr/datasets/training/20201001/20201001-01.csv \n/files/icr/datasets/training/20201001/20201001-02.csv \n/files/mask-detection/training/mask-detection-20210301.tar.gz" - operationId: file.upload - parameters: - - name: overwrite - in: query - description: If true, then file is overwritten. Default is false. - required: false - schema: - type: boolean - requestBody: - description: Body of the file upload request - content: - '*/*': - schema: - type: string - responses: - '201': - description: Created - headers: - Location: - description: URL of the newly created file. This URL can be passed on to the artifact API to register this file. - schema: - $ref: '#/components/schemas/Url' - content: - application/json: - schema: - $ref: '#/components/schemas/FileCreationResponse' - '400': - description: The specification of the resource was incorrect - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400_2' - example: - error: - code: '03021655' - message: Bad request encountered. Please try again with possible-solution-here. - target: /url/path - requestId: 9832bf934f3743v3948v3 - details: - - code: '01041211' - message: Optional nested error message. - '409': - description: The specified file already exists and cannot be overwritten. - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400_2' - example: - error: - code: '03021655' - message: The specified file already exists and cannot be overwritten. Please try again with possible-solution-here. - target: /url/path - requestId: 9832bf934f3743v3948v3 - details: - - code: '01041211' - message: Optional nested error message. - '413': - description: The file size exceeds the supported limit. - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400_2' - example: - error: - code: '03021655' - message: The file size exceeds the supported limit. - target: /url/path - requestId: 9832bf934f3743v3948v3 - details: - - code: '01041211' - message: Optional nested error message. - delete: - tags: - - File - summary: Delete file - description: Delete the file specified by the path parameter. - operationId: file.delete - responses: - '204': - description: The request was processed successfully. - '400': - description: The specification of the resource was incorrect - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400_2' - example: - error: - code: '03021655' - message: Bad request encountered. Please try again with possible-solution-here. - target: /url/path - requestId: 9832bf934f3743v3948v3 - details: - - code: '01041211' - message: Optional nested error message. - '404': - description: The specified resource was not found - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_400_2' - example: - error: - code: '03021655' - message: The resource you requested was not found. Please try again with possible-solution-here. - target: /url/path - requestId: 9832bf934f3743v3948v3 - details: - - code: '01041211' - message: Optional nested error message. - parameters: - - name: path - in: path - description: path relative to the object store root URL in the secret - required: true - schema: - maxLength: 1024 - pattern: ^(([\w.-]+):([\w.-]+)|([\w.-]+))(/([\w./-]+[\w.-]+)?)?$ - type: string - format: path - - name: AI-Resource-Group - in: header - description: Specify a resource group id - required: false - schema: - type: string - /admin/objectStoreSecrets: - get: - tags: - - Object Store Secret - summary: Get a list of metadata of available secrets. - description: | - Retrieve a list of metadata of the stored secrets. - operationId: kubesubmit.v4.object_store_secrets.query - parameters: - - name: $top - in: query - description: Number of results to display - required: false - schema: - minimum: 0 - type: integer - example: 10 - - name: $skip - in: query - description: Number of results to be skipped from the ordered list of results - required: false - schema: - minimum: 0 - type: integer - example: 10 - - name: $count - in: query - 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. - required: false - schema: - type: boolean - example: true - - name: Authorization - in: header - description: Authorization bearer token containing a JWT token. - required: false - schema: - type: string - - name: AI-Resource-Group - in: header - description: Specify an existing resource group id to use. Uses "default" if value not provided. - required: false - schema: - type: string - default: default - responses: - '200': - description: The request was successful and the requested metadata for the secret will be returned. This includes a list of attributes of the stored secret like - creationTimestamp, namespace etc. The secret's data field is not returned. - content: - application/json: - schema: - $ref: '#/components/schemas/objectStoreSecretStatusResponse' - '400': - description: The request was malformed and could thus not be processed. - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - default: - description: HTTP status codes 401, 403 or 500. Response body contains further details. - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - post: - tags: - - Object Store Secret - summary: Create a secret - description: | - Create a secret based on the configuration in the request body - operationId: kubesubmit.v4.object_store_secrets.create - parameters: - - name: Authorization - in: header - description: Authorization bearer token containing a JWT token. - required: false - schema: - type: string - - name: AI-Resource-Group - in: header - description: Specify an existing resource group id to use. Uses "default" if value not provided. - required: false - schema: - type: string - default: default - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/objectStoreSecretWithSensitiveDataRequestForPostCall' - required: true - responses: - '202': - description: | - The request to create a k8s secret based on the given configuration has been accepted. - content: - application/json: - schema: - $ref: '#/components/schemas/objectStoreSecretCreationResponse' - '400': - description: | - One of the following failure cases has occurred: