diff --git a/openapi/yaml/combined_api.yaml b/openapi/yaml/combined_api.yaml index b75f543a..40489225 100644 --- a/openapi/yaml/combined_api.yaml +++ b/openapi/yaml/combined_api.yaml @@ -3200,6 +3200,108 @@ paths: example: API requests too frequent endpoint threshold=3.0 tags: - Serverless + put: + summary: update endpoint + description: 'Updates the specified endpoint group with the provided parameters. + + + CLI Usage: `vastai update endpoint [options]`' + security: + - BearerAuth: [] + parameters: + - name: id + in: path + required: true + description: ID of the endpoint group to update + schema: + type: integer + example: 4242 + requestBody: + required: false + content: + application/json: + schema: + type: object + properties: + min_load: + type: number + description: Minimum floor load in perf units/s (token/s for LLMs) + example: 0.0 + target_util: + type: number + description: Target capacity utilization (fraction, max 1.0) + example: 0.9 + cold_mult: + type: number + description: Cold/stopped instance capacity target as multiple of + hot capacity target + example: 2.5 + cold_workers: + type: integer + description: Min number of workers to keep 'cold' when you have + no load + example: 5 + max_workers: + type: integer + description: Max number of workers your endpoint group can have + example: 20 + endpoint_name: + type: string + description: Deployment endpoint name + example: my_endpoint + responses: + '200': + description: Success response + content: + application/json: + schema: + type: object + properties: + success: + type: boolean + example: true + '400': + description: Bad Request + content: + application/json: + schema: + type: object + properties: + success: + type: boolean + example: false + error: + type: string + example: invalid_args + msg: + type: string + example: Endpointgroup not found for user + '401': + description: Unauthorized + content: + application/json: + schema: + type: object + properties: + success: + type: boolean + example: false + error: + type: string + msg: + type: string + '429': + description: Too Many Requests + content: + application/json: + schema: + type: object + properties: + detail: + type: string + example: API requests too frequent endpoint threshold=2.0 + tags: + - Serverless /api/v0/ssh/{id}/: delete: summary: delete ssh key @@ -4370,11 +4472,10 @@ paths: summary: show logs description: 'Request logs from a specific instance. The logs will be uploaded to S3 and can be retrieved from a generated URL. Supports both container logs - and daemon system logs. + and extra debug system logs. - CLI Usage: `vastai show logs [--tail ] [--filter ] - [--daemon-logs]`' + CLI Usage: `vastai logs [instance_id]`' parameters: - name: id in: path @@ -4398,12 +4499,13 @@ paths: filter: type: string description: Grep filter to apply to log entries - daemon_logs: + extra_debug_logs: type: string enum: - 'true' - description: If "true", fetch daemon system logs instead of container - logs + - 'false' + description: If "true", fetch extra debug system logs instead of + container logs responses: '200': description: Success response with S3 URL for log retrieval @@ -4836,7 +4938,7 @@ paths: - BearerAuth: [] tags: - Team - /api/v0/team/roles/{id}: + /api/v0/team/roles/{id}/: delete: summary: remove team role description: 'Removes a role from the team. Cannot remove the team owner role. @@ -4853,7 +4955,7 @@ paths: required: true schema: type: string - description: Name of the role to remove + description: Id of the role to remove example: developer responses: '200': @@ -4929,6 +5031,95 @@ paths: msg: type: string example: Specified role not found + get: + summary: show team role + description: 'Retrieve details of a specific team role by its name. + + + CLI Usage: `vastai show team-role `' + security: + - BearerAuth: [] + tags: + - Team + parameters: + - name: id + in: path + required: true + description: ID of the team role + schema: + type: string + example: admin + responses: + '200': + description: Success response + content: + application/json: + schema: + type: object + properties: + id: + type: integer + description: Role ID + example: 1 + name: + type: string + description: Name of the role + example: admin + permissions: + type: array + description: Permissions associated with the role + items: + type: string + example: + - read + - write + '404': + description: Role not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + put: + summary: update team role + description: 'Update an existing team role with new name and permissions. + + + CLI Usage: `vastai update team-role --name --permissions `' + parameters: + - name: id + in: path + required: true + description: ID of the role to update. + schema: + type: integer + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + name: + type: string + description: New name for the role. + permissions: + type: object + description: JSON encoded permissions for the role. + required: + - name + - permissions + responses: + '200': + description: Successfully updated team role. + content: + application/json: + schema: + type: string + example: Successfully Updated Team Role For + security: + - BearerAuth: [] + tags: + - Team /api/v0/machines/{machine_id}/reports/: get: summary: show reports @@ -6871,96 +7062,6 @@ paths: $ref: '#/components/schemas/Error' tags: - Team - /api/v0/team/roles/{id}/: - get: - summary: show team role - description: 'Retrieve details of a specific team role by its name. - - - CLI Usage: `vastai show team-role `' - security: - - BearerAuth: [] - parameters: - - name: id - in: path - required: true - description: Name of the team role - schema: - type: string - example: admin - responses: - '200': - description: Success response - content: - application/json: - schema: - type: object - properties: - id: - type: integer - description: Role ID - example: 1 - name: - type: string - description: Name of the role - example: admin - permissions: - type: array - description: Permissions associated with the role - items: - type: string - example: - - read - - write - '404': - description: Role not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - tags: - - Accounts - put: - summary: update team role - description: 'Update an existing team role with new name and permissions. - - - CLI Usage: `vastai update team-role --name --permissions `' - parameters: - - name: id - in: path - required: true - description: ID of the role to update. - schema: - type: integer - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - name: - type: string - description: New name for the role. - permissions: - type: object - description: JSON encoded permissions for the role. - required: - - name - - permissions - responses: - '200': - description: Successfully updated team role. - content: - application/json: - schema: - type: string - example: Successfully Updated Team Role For - security: - - BearerAuth: [] - tags: - - Team /api/v0/team/roles-full/: get: summary: show team roles diff --git a/openapi/yaml/destroy_team.yaml b/openapi/yaml/destroy_team.yaml index 07f882e1..bb2bc6da 100644 --- a/openapi/yaml/destroy_team.yaml +++ b/openapi/yaml/destroy_team.yaml @@ -80,7 +80,7 @@ components: BearerAuth: type: http scheme: bearer - description: API key must be provided in the Authorization header + description: The team API key for the team to be destroyed schemas: Error: type: object diff --git a/openapi/yaml/logs.yaml b/openapi/yaml/logs.yaml index a03369df..c5732552 100644 --- a/openapi/yaml/logs.yaml +++ b/openapi/yaml/logs.yaml @@ -11,9 +11,9 @@ paths: put: summary: show logs description: | - Request logs from a specific instance. The logs will be uploaded to S3 and can be retrieved from a generated URL. Supports both container logs and daemon system logs. + Request logs from a specific instance. The logs will be uploaded to S3 and can be retrieved from a generated URL. Supports both container logs and extra debug system logs. - CLI Usage: `vastai show logs [--tail ] [--filter ] [--daemon-logs]` + CLI Usage: `vastai logs [instance_id]` parameters: - name: id in: path @@ -37,11 +37,12 @@ paths: filter: type: string description: Grep filter to apply to log entries - daemon_logs: + extra_debug_logs: type: string enum: - 'true' - description: If "true", fetch daemon system logs instead of container + - 'false' + description: If "true", fetch extra debug system logs instead of container logs responses: '200': diff --git a/openapi/yaml/remove_team_role.yaml b/openapi/yaml/remove_team_role.yaml index 7c4f07d8..e524d9ab 100644 --- a/openapi/yaml/remove_team_role.yaml +++ b/openapi/yaml/remove_team_role.yaml @@ -7,7 +7,7 @@ servers: - url: https://console.vast.ai description: Production server paths: - /api/v0/team/roles/{id}: + /api/v0/team/roles/{id}/: delete: summary: remove team role description: | @@ -24,7 +24,7 @@ paths: required: true schema: type: string - description: Name of the role to remove + description: Id of the role to remove example: developer responses: '200': @@ -100,10 +100,6 @@ paths: msg: type: string example: Specified role not found - security: - - BearerAuth: [] - tags: - - Team components: securitySchemes: BearerAuth: diff --git a/openapi/yaml/show_team_role.yaml b/openapi/yaml/show_team_role.yaml index 7303790a..7f4c6259 100644 --- a/openapi/yaml/show_team_role.yaml +++ b/openapi/yaml/show_team_role.yaml @@ -16,11 +16,13 @@ paths: CLI Usage: `vastai show team-role ` security: - BearerAuth: [] + tags: + - Team parameters: - name: id in: path required: true - description: Name of the team role + description: ID of the team role schema: type: string example: admin @@ -54,8 +56,6 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' - tags: - - Accounts components: securitySchemes: BearerAuth: diff --git a/openapi/yaml/update_endpoint.yaml b/openapi/yaml/update_endpoint.yaml index ae865f27..1d292ef2 100644 --- a/openapi/yaml/update_endpoint.yaml +++ b/openapi/yaml/update_endpoint.yaml @@ -10,11 +10,6 @@ paths: /api/v0/endptjobs/{id}/: put: summary: update endpoint - - - CLI Usage: vastai update endpoint ID [OPTIONS] - - ' description: | Updates the specified endpoint group with the provided parameters. diff --git a/vast.py b/vast.py index ad5d1a58..8837708c 100755 --- a/vast.py +++ b/vast.py @@ -3442,8 +3442,8 @@ def logs(args): json_blob = {'filter': args.filter} if args.filter else {} if args.tail: json_blob.update({'tail': args.tail}) - if args.daemon_logs: - json_blob.update({'daemon_logs': 'true'}) + if args.extra_debug_logs: + json_blob.update({'extra_debug_logs': 'true'}) if args.explain: print("request json: ") print(json_blob)