From 43330a15d3242b0ee77dc1c7dac180afa6fc59c3 Mon Sep 17 00:00:00 2001 From: Zuby Javed Date: Tue, 21 Oct 2025 15:47:13 -0700 Subject: [PATCH 1/4] update param name: daemon logs -> extra debug logs --- openapi/yaml/logs.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/openapi/yaml/logs.yaml b/openapi/yaml/logs.yaml index a03369df..d9739da2 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,10 +37,11 @@ paths: filter: type: string description: Grep filter to apply to log entries - daemon_logs: + extra_debug_logs: type: string enum: - 'true' + - 'false' description: If "true", fetch daemon system logs instead of container logs responses: From 7a564529b4624e4eb83a48d4955e585ecb7ad44c Mon Sep 17 00:00:00 2001 From: Zuby Javed Date: Tue, 21 Oct 2025 15:47:48 -0700 Subject: [PATCH 2/4] update param name: name -> id --- openapi/yaml/destroy_team.yaml | 2 +- openapi/yaml/remove_team_role.yaml | 10 +++------- openapi/yaml/show_team_role.yaml | 8 ++++---- openapi/yaml/update_endpoint.yaml | 5 ----- openapi/yaml/update_team_role.yaml | 2 +- 5 files changed, 9 insertions(+), 18 deletions(-) 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/remove_team_role.yaml b/openapi/yaml/remove_team_role.yaml index 7c4f07d8..18aaea91 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: | @@ -20,11 +20,11 @@ paths: - Team parameters: - in: path - name: id + id: id 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..ae4581b0 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 + - id: 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/openapi/yaml/update_team_role.yaml b/openapi/yaml/update_team_role.yaml index 68e5e195..f27303c7 100644 --- a/openapi/yaml/update_team_role.yaml +++ b/openapi/yaml/update_team_role.yaml @@ -11,7 +11,7 @@ paths: CLI Usage: `vastai update team-role --name --permissions ` parameters: - - name: id + - id: id in: path required: true description: ID of the role to update. From a6d8388c780a77be834d97f0ab9fcb926743e8fc Mon Sep 17 00:00:00 2001 From: Zuby Javed Date: Tue, 21 Oct 2025 15:53:18 -0700 Subject: [PATCH 3/4] fix: wrong name field under params --- openapi/yaml/combined_api.yaml | 293 +++++++++++++++++++---------- openapi/yaml/remove_team_role.yaml | 2 +- openapi/yaml/show_team_role.yaml | 2 +- openapi/yaml/update_team_role.yaml | 2 +- 4 files changed, 200 insertions(+), 99 deletions(-) diff --git a/openapi/yaml/combined_api.yaml b/openapi/yaml/combined_api.yaml index b75f543a..0e2b0b03 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,10 +4499,11 @@ paths: filter: type: string description: Grep filter to apply to log entries - daemon_logs: + extra_debug_logs: type: string enum: - 'true' + - 'false' description: If "true", fetch daemon system logs instead of container logs responses: @@ -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/remove_team_role.yaml b/openapi/yaml/remove_team_role.yaml index 18aaea91..e524d9ab 100644 --- a/openapi/yaml/remove_team_role.yaml +++ b/openapi/yaml/remove_team_role.yaml @@ -20,7 +20,7 @@ paths: - Team parameters: - in: path - id: id + name: id required: true schema: type: string diff --git a/openapi/yaml/show_team_role.yaml b/openapi/yaml/show_team_role.yaml index ae4581b0..7f4c6259 100644 --- a/openapi/yaml/show_team_role.yaml +++ b/openapi/yaml/show_team_role.yaml @@ -19,7 +19,7 @@ paths: tags: - Team parameters: - - id: id + - name: id in: path required: true description: ID of the team role diff --git a/openapi/yaml/update_team_role.yaml b/openapi/yaml/update_team_role.yaml index f27303c7..68e5e195 100644 --- a/openapi/yaml/update_team_role.yaml +++ b/openapi/yaml/update_team_role.yaml @@ -11,7 +11,7 @@ paths: CLI Usage: `vastai update team-role --name --permissions ` parameters: - - id: id + - name: id in: path required: true description: ID of the role to update. From d37ba2cf0445f28fc8fac5be9918de55247d8895 Mon Sep 17 00:00:00 2001 From: Zuby Javed Date: Tue, 21 Oct 2025 17:25:18 -0700 Subject: [PATCH 4/4] rename param: daemon logs -> extra debug logs --- openapi/yaml/combined_api.yaml | 4 ++-- openapi/yaml/logs.yaml | 2 +- vast.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/openapi/yaml/combined_api.yaml b/openapi/yaml/combined_api.yaml index 0e2b0b03..40489225 100644 --- a/openapi/yaml/combined_api.yaml +++ b/openapi/yaml/combined_api.yaml @@ -4504,8 +4504,8 @@ paths: enum: - 'true' - 'false' - description: If "true", fetch daemon system logs instead of container - logs + description: If "true", fetch extra debug system logs instead of + container logs responses: '200': description: Success response with S3 URL for log retrieval diff --git a/openapi/yaml/logs.yaml b/openapi/yaml/logs.yaml index d9739da2..c5732552 100644 --- a/openapi/yaml/logs.yaml +++ b/openapi/yaml/logs.yaml @@ -42,7 +42,7 @@ paths: enum: - 'true' - 'false' - description: If "true", fetch daemon system logs instead of container + description: If "true", fetch extra debug system logs instead of container logs responses: '200': 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)