From dc6cbb0a6a61bd4f2209340c118a4276b1b4679a Mon Sep 17 00:00:00 2001 From: ilterkavlak Date: Thu, 5 Mar 2026 11:36:03 +0300 Subject: [PATCH] CLOUD-4194 update-qstash-related-management-api-docs --- devops/developer-api/openapi.yml | 211 +++++++++++++++++++++++++++---- docs.json | 13 +- 2 files changed, 197 insertions(+), 27 deletions(-) diff --git a/devops/developer-api/openapi.yml b/devops/developer-api/openapi.yml index 4e42d91b..34b10539 100644 --- a/devops/developer-api/openapi.yml +++ b/devops/developer-api/openapi.yml @@ -1434,13 +1434,20 @@ paths: example: "OK" security: - basicAuth: [] - /qstash/user: + /qstash/user/{id}: get: summary: Get QStash - description: Retrieves detailed information about the authenticated user's QStash, including plan details, limits, and configuration + description: Retrieves detailed information about the specified QStash user, including plan details, limits, and configuration operationId: getQStashUser tags: - qstash + parameters: + - name: id + in: path + required: true + schema: + type: string + description: QStash user ID responses: '200': description: Successful response @@ -1450,18 +1457,23 @@ paths: $ref: '#/components/schemas/QStashUser' security: - basicAuth: [] - /qstash/user/rotatetoken: - servers: - - url: https://api.upstash.com + /qstash/rotate-token/{id}: post: summary: Reset QStash Token description: | - Resets the authentication credentials for the QStash user account. + Resets the authentication credentials for the QStash user account. This invalidates the old password and token, and generates new ones. Returns the updated user information with new credentials. operationId: resetQStashToken tags: - qstash + parameters: + - name: id + in: path + required: true + schema: + type: string + description: QStash user ID responses: '200': description: Token reset successfully, returns updated user information with new credentials @@ -1471,9 +1483,7 @@ paths: $ref: '#/components/schemas/QStashUser' security: - basicAuth: [] - /qstash-upgrade: - servers: - - url: https://api.upstash.com + /qstash/set-plan/{id}: post: summary: Set QStash Plan description: | @@ -1482,6 +1492,13 @@ paths: operationId: setQStashPlan tags: - qstash + parameters: + - name: id + in: path + required: true + schema: + type: string + description: QStash user ID requestBody: required: true content: @@ -1489,20 +1506,16 @@ paths: schema: type: object required: - - customer_id - plan_name properties: - customer_id: - type: string - description: Customer identifier or team ID - example: example@upstash.com plan_name: type: string description: Target plan to upgrade to enum: - paid - - qstash_enterprise_1m - - qstash_enterprise_10m + - qstash_fixed_1m + - qstash_fixed_10m + - qstash_fixed_100m example: paid responses: "200": @@ -1514,16 +1527,22 @@ paths: example: "OK" security: - basicAuth: [] - /qstash/stats: + /qstash/stats/{id}: get: summary: Get QStash Stats description: | - Retrieves detailed usage statistics for the QStash account including + Retrieves detailed usage statistics for the QStash account including daily requests, billing, bandwidth, and workflow metrics over time. operationId: getQStashStats tags: - qstash parameters: + - name: id + in: path + required: true + schema: + type: string + description: QStash user ID - name: period in: query required: false @@ -1539,9 +1558,9 @@ paths: - 30d default: 1h description: | - Time period for statistics aggregation. Each period returns 60 datapoints - with intervals adjusted to the period length. - + Time period for statistics aggregation. Each period returns 60 datapoints + with intervals adjusted to the period length. + Exceptionally for 30 days, it returns 240 datapoints with 3-hour intervals for increased granularity. example: 3h responses: @@ -1553,6 +1572,143 @@ paths: $ref: '#/components/schemas/QStashStats' security: - basicAuth: [] + /qstash/ipv4: + get: + summary: Get QStash IPv4 Addresses + description: Returns the list of IPv4 addresses used by QStash for sending requests. + operationId: getQStashIPv4 + tags: + - qstash + responses: + '200': + description: List of IPv4 CIDR blocks + content: + application/json: + schema: + type: array + items: + type: string + example: ["3.125.136.186/32", "18.198.95.233/32"] + /qstash/move-to-team: + post: + summary: Move QStash to Team + description: Moves a QStash instance to a different team. + operationId: moveQStashToTeam + tags: + - qstash + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - qstash_id + - target_team_id + properties: + qstash_id: + type: string + description: ID of the QStash instance to move + target_team_id: + type: string + description: ID of the target team + responses: + '200': + description: QStash moved successfully + content: + application/json: + schema: + type: string + example: "OK" + security: + - basicAuth: [] + /qstash/update-budget/{id}: + patch: + summary: Update QStash Budget + description: Updates the monthly spending budget limit for a QStash instance. + operationId: updateQStashBudget + tags: + - qstash + parameters: + - name: id + in: path + required: true + schema: + type: string + description: QStash user ID + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - budget + properties: + budget: + type: integer + description: Monthly spending budget limit in dollars. Minimum 20, maximum 10000, or 0 for no limit. + minimum: 0 + maximum: 10000 + example: 100 + responses: + '200': + description: Budget updated successfully + content: + application/json: + schema: + type: string + example: "OK" + security: + - basicAuth: [] + /qstash/enable-prodpack/{id}: + post: + summary: Enable Production Pack + description: Enables the production pack for a QStash instance. + operationId: enableQStashProdPack + tags: + - qstash + parameters: + - name: id + in: path + required: true + schema: + type: string + description: QStash user ID + responses: + '200': + description: Production pack enabled successfully + content: + application/json: + schema: + type: string + example: "OK" + security: + - basicAuth: [] + /qstash/disable-prodpack/{id}: + post: + summary: Disable Production Pack + description: Disables the production pack for a QStash instance. + operationId: disableQStashProdPack + tags: + - qstash + parameters: + - name: id + in: path + required: true + schema: + type: string + description: QStash user ID + responses: + '200': + description: Production pack disabled successfully + content: + application/json: + schema: + type: string + example: "OK" + security: + - basicAuth: [] components: schemas: Database: @@ -2878,13 +3034,22 @@ components: Indicates the reserved plan type for QStash. If a credit card is attached, this field reflects the associated reserved plan. If no credit card is added and the account is not on a pay-as-you-go plan, this field will be an empty string. - enum: [paid, qstash_enterprise_1m, qstash_enterprise_10m] - example: qstash_enterprise_1m + enum: ["", paid, qstash_fixed_1m, qstash_fixed_10m, qstash_fixed_100m] + example: qstash_fixed_1m reserved_price: type: number format: float description: Reserved plan price example: 180 + region: + type: string + description: Region where the QStash instance is deployed + enum: [eu-central-1, us-east-1] + example: us-east-1 + budget: + type: integer + description: Monthly spending budget limit in dollars. 0 means no limit. + example: 0 created_by: type: string description: Email of the user who created this account diff --git a/docs.json b/docs.json index 680d96ef..4d2345ed 100644 --- a/docs.json +++ b/docs.json @@ -1599,10 +1599,15 @@ { "group": "QStash", "pages": [ - "GET /qstash/user", - "GET /qstash/stats", - "POST /qstash/user/rotatetoken", - "POST /qstash-upgrade" + "GET /qstash/user/{id}", + "GET /qstash/stats/{id}", + "GET /qstash/ipv4", + "POST /qstash/rotate-token/{id}", + "POST /qstash/set-plan/{id}", + "POST /qstash/move-to-team", + "PATCH /qstash/update-budget/{id}", + "POST /qstash/enable-prodpack/{id}", + "POST /qstash/disable-prodpack/{id}" ] }, {