swagger: "2.0" info: title: "MLP API" description: "API Guide for accessing MLP API" version: "0.4.0" host: "localhost:8080" basePath: "/" tags: - name: "project" description: "Project Management API. Project is used to namespace model, secret, and user access" - name: "secret" description: "Secret Management API. Secret is stored securely inside merlin and can be used to run prediction job" schemes: - "http" paths: "/v2/applications": get: tags: ["application"] summary: "List CaraML applications" responses: 200: description: "OK" schema: type: "array" items: $ref: "#/definitions/Application" "/v1/projects": get: tags: ["project"] summary: "List existing projects" description: "Projects can be filtered by optional `name` parameter" parameters: - in: "query" name: "name" required: false type: "string" responses: 200: description: "OK" schema: type: "array" items: $ref: "#/definitions/Project" post: tags: ["project"] summary: "Create new project" parameters: - in: "body" name: "body" description: "Project object that has to be added" required: true schema: $ref: "#/definitions/Project" responses: 201: description: "Created" schema: $ref: "#/definitions/Project" 400: description: "Invalid request format" 409: description: "Project with the same name already exists" "/v1/projects/{project_id}": get: tags: ["project"] summary: "Get project" parameters: - in: "path" name: "project_id" description: "project id of the project to be retrieved" type: "integer" required: true responses: 200: description: "Ok" schema: $ref: "#/definitions/Project" 404: description: "Project Not Found" put: tags: ["project"] summary: "Update project" parameters: - in: "path" name: "project_id" description: "project id of the project to be updated" type: "integer" required: true - in: "body" name: "body" description: "Project object that has to be updated" required: true schema: $ref: "#/definitions/Project" responses: 200: description: "Ok" schema: $ref: "#/definitions/Project" 400: description: "Invalid request format" "/v1/projects/{project_id}/secrets": post: tags: ["secret"] summary: "Create secret" parameters: - in: "path" name: "project_id" type: "integer" required: true - in: "body" name: "body" required: true schema: $ref: "#/definitions/Secret" responses: 201: description: "Created" schema: $ref: "#/definitions/Secret" get: tags: ["secret"] summary: "List secret" parameters: - in: "path" name: "project_id" type: "integer" required: true responses: 200: description: "Ok" schema: type: "array" items: $ref: "#/definitions/Secret" "/v1/projects/{project_id}/secrets/{secret_id}": get: tags: [ "secret" ] summary: "Get secret" parameters: - in: "path" name: "project_id" type: "integer" required: true - in: "path" name: "secret_id" type: "integer" required: true responses: 200: description: "Ok" schema: $ref: "#/definitions/Secret" patch: tags: ["secret"] summary: "Update secret" parameters: - in: "path" name: "project_id" type: "integer" required: true - in: "path" name: "secret_id" type: "integer" required: true - in: "body" name: "body" schema: $ref: "#/definitions/Secret" responses: 200: description: "Updated" schema: $ref: "#/definitions/Secret" delete: tags: ["secret"] summary: "Delete secret" parameters: - in: "path" name: "project_id" type: "integer" required: true - in: "path" name: "secret_id" type: "integer" required: true responses: 204: description: "No content" "/v1/projects/{project_id}/secret_storages": post: tags: ["secret_storage"] summary: "Create secret storage" parameters: - in: "path" name: "project_id" type: "integer" required: true - in: "body" name: "body" required: true schema: $ref: "#/definitions/SecretStorage" responses: 201: description: "Created" schema: $ref: "#/definitions/SecretStorage" get: tags: ["secret_storage"] summary: "List secret storage" parameters: - in: "path" name: "project_id" type: "integer" required: true responses: 200: description: "Ok" schema: type: "array" items: $ref: "#/definitions/SecretStorage" "/v1/projects/{project_id}/secret_storages/{secret_storage_id}": get: tags: ["secret_storage"] summary: "Get secret storage" parameters: - in: "path" name: "project_id" type: "integer" required: true - in: "path" name: "secret_storage_id" type: "integer" required: true responses: 200: description: "Ok" schema: $ref: "#/definitions/SecretStorage" patch: tags: ["secret_storage"] summary: "Update secret storage" parameters: - in: "path" name: "project_id" type: "integer" required: true - in: "path" name: "secret_storage_id" type: "integer" required: true - in: "body" name: "body" schema: $ref: "#/definitions/SecretStorage" responses: 200: description: "Updated" schema: $ref: "#/definitions/SecretStorage" delete: tags: ["secret_storage"] summary: "Delete secret storage" parameters: - in: "path" name: "project_id" type: "integer" required: true - in: "path" name: "secret_storage_id" type: "integer" required: true responses: 204: description: "No content" definitions: Application: type: "object" required: - name - homepage properties: name: type: "string" description: type: "string" homepage: type: "string" config: type: "object" properties: api: type: "string" icon: type: "string" navigation: type: "array" items: type: "object" properties: label: type: "string" destination: type: "string" Project: type: "object" required: - name properties: id: type: "integer" format: "int32" name: type: "string" mlflow_tracking_url: type: "string" administrators: type: "array" items: type: "string" readers: type: "array" items: type: "string" team: type: "string" stream: type: "string" labels: type: "array" items: $ref: "#/definitions/Label" created_at: type: "string" format: "date-time" updated_at: type: "string" format: "date-time" Label: type: "object" properties: key: type: "string" value: type: "string" Secret: type: "object" required: - name - data properties: id: type: "integer" format: "int32" name: type: "string" data: type: "string" secret_storage_id: type: "integer" format: "int32" created_at: type: "string" format: "date-time" updated_at: type: "string" format: "date-time" SecretStorage: type: "object" required: - name - type - scope - config properties: id: type: "integer" format: "int32" name: type: "string" type: type: "string" enum: ["vault", "internal"] scope: type: "string" enum: ["project", "global"] project_id: type: "integer" format: "int32" config: $ref: "#/definitions/SecretStorageConfig" created_at: type: "string" format: "date-time" updated_at: type: "string" format: "date-time" SecretStorageConfig: type: "object" properties: vault: $ref: "#/definitions/VaultSecretStorageConfig" VaultSecretStorageConfig: type: "object" required: - url - mount_path - path_prefix - auth_method properties: url: type: "string" role: type: "string" mount_path: type: "string" path_prefix: type: "string" auth_method: type: "string" gcp_auth_type: type: "string" service_account_email: type: "string" securityDefinitions: Bearer: type: apiKey name: Authorization in: header security: - Bearer: []