From f1cb7325bc0c138fd2e2b9cbc3a287c81f05db2e Mon Sep 17 00:00:00 2001 From: Alexander Mattoni <5110855+mattoni@users.noreply.github.com> Date: Mon, 17 Feb 2025 14:59:45 -0800 Subject: [PATCH] Add billing status endpoint to platform API --- platform/api.yml | 10 ++++++---- platform/paths/billing/status.yml | 27 +++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 platform/paths/billing/status.yml diff --git a/platform/api.yml b/platform/api.yml index 540b5374..e8cdea16 100644 --- a/platform/api.yml +++ b/platform/api.yml @@ -306,6 +306,8 @@ paths: $ref: "./paths/announcements/announcements.yml" # --Billing + "/v1/billing/status": + $ref: "./paths/billing/status.yml" ## Credits "/v1/billing/credits": $ref: "./paths/billing/credits/credits.yml" @@ -377,10 +379,10 @@ paths: $ref: "./paths/containers/instances/tasks.yml" "/v1/containers/{containerId}/instances/{instanceId}/volumes": $ref: "./paths/containers/instances/volumes.yml" - "/v1/containers/{containerId}/instances/{instanceId}/telemetry/resources/report": - $ref: paths/containers/instances/telemetry/report.yml - "/v1/containers/{containerId}/instances/{instanceId}/telemetry/resources/stream": - $ref: paths/containers/instances/telemetry/stream.yml + ? "/v1/containers/{containerId}/instances/{instanceId}/telemetry/resources/report" + : $ref: paths/containers/instances/telemetry/report.yml + ? "/v1/containers/{containerId}/instances/{instanceId}/telemetry/resources/stream" + : $ref: paths/containers/instances/telemetry/stream.yml "/v1/containers/{containerId}/instances/{instanceId}/console": $ref: "paths/containers/instances/console.yml" "/v1/containers/{containerId}/functions/tasks": diff --git a/platform/paths/billing/status.yml b/platform/paths/billing/status.yml new file mode 100644 index 00000000..998b4524 --- /dev/null +++ b/platform/paths/billing/status.yml @@ -0,0 +1,27 @@ +get: + operationId: "getBillingStatus" + summary: Get Billing Status + description: | + Retrieve meta details about the billing status of this Cycle core. It is unlikely that someone would need this endpoint outside + of Cycle's internal teams. + tags: + - Billing + parameters: [] + responses: + 200: + description: Returns details about the billing status of this Cycle core. + content: + application/json: + schema: + type: object + required: + - data + properties: + data: + type: object + properties: + enabled: + type: boolean + description: Whether billing is enabled for this core. Generally, this will only be false for dedicated cores. + default: + $ref: ../../../components/responses/errors/DefaultError.yml