@gpuai/sdk 0.5.3 → 0.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +56 -0
- package/README.md +50 -2
- package/dist/apis/BillingApi.d.ts +2 -2
- package/dist/apis/BillingApi.js +2 -2
- package/dist/apis/EndpointsApi.d.ts +150 -0
- package/dist/apis/EndpointsApi.js +379 -0
- package/dist/apis/InstancesApi.d.ts +15 -0
- package/dist/apis/InstancesApi.js +45 -0
- package/dist/apis/JobsApi.d.ts +172 -0
- package/dist/apis/JobsApi.js +444 -0
- package/dist/apis/OperationsApi.d.ts +17 -0
- package/dist/apis/OperationsApi.js +48 -0
- package/dist/apis/SecretsApi.d.ts +123 -0
- package/dist/apis/SecretsApi.js +328 -0
- package/dist/apis/index.d.ts +3 -0
- package/dist/apis/index.js +3 -0
- package/dist/esm/apis/BillingApi.d.ts +2 -2
- package/dist/esm/apis/BillingApi.js +2 -2
- package/dist/esm/apis/EndpointsApi.d.ts +150 -0
- package/dist/esm/apis/EndpointsApi.js +375 -0
- package/dist/esm/apis/InstancesApi.d.ts +15 -0
- package/dist/esm/apis/InstancesApi.js +45 -0
- package/dist/esm/apis/JobsApi.d.ts +172 -0
- package/dist/esm/apis/JobsApi.js +440 -0
- package/dist/esm/apis/OperationsApi.d.ts +17 -0
- package/dist/esm/apis/OperationsApi.js +48 -0
- package/dist/esm/apis/SecretsApi.d.ts +123 -0
- package/dist/esm/apis/SecretsApi.js +324 -0
- package/dist/esm/apis/index.d.ts +3 -0
- package/dist/esm/apis/index.js +3 -0
- package/dist/esm/models/Balance.d.ts +6 -0
- package/dist/esm/models/Balance.js +2 -0
- package/dist/esm/models/CreateWebhookEndpointRequest.d.ts +3 -0
- package/dist/esm/models/CreateWebhookEndpointRequest.js +4 -1
- package/dist/esm/models/DedicatedIPOffer.d.ts +98 -0
- package/dist/esm/models/DedicatedIPOffer.js +87 -0
- package/dist/esm/models/Endpoint.d.ts +147 -0
- package/dist/esm/models/Endpoint.js +121 -0
- package/dist/esm/models/EndpointCreate.d.ts +80 -0
- package/dist/esm/models/EndpointCreate.js +63 -0
- package/dist/esm/models/EndpointList.d.ts +33 -0
- package/dist/esm/models/EndpointList.js +44 -0
- package/dist/esm/models/EndpointMachine.d.ts +90 -0
- package/dist/esm/models/EndpointMachine.js +84 -0
- package/dist/esm/models/EndpointReplicaCounts.d.ts +38 -0
- package/dist/esm/models/EndpointReplicaCounts.js +47 -0
- package/dist/esm/models/Job.d.ts +352 -0
- package/dist/esm/models/Job.js +254 -0
- package/dist/esm/models/JobAttempt.d.ts +176 -0
- package/dist/esm/models/JobAttempt.js +147 -0
- package/dist/esm/models/JobCreate.d.ts +153 -0
- package/dist/esm/models/JobCreate.js +84 -0
- package/dist/esm/models/JobGpuTypes.d.ts +39 -0
- package/dist/esm/models/JobGpuTypes.js +48 -0
- package/dist/esm/models/JobGpuTypesDataInner.d.ts +58 -0
- package/dist/esm/models/JobGpuTypesDataInner.js +59 -0
- package/dist/esm/models/JobLogChunk.d.ts +50 -0
- package/dist/esm/models/JobLogChunk.js +55 -0
- package/dist/esm/models/JobLogs.d.ts +39 -0
- package/dist/esm/models/JobLogs.js +48 -0
- package/dist/esm/models/JobPage.d.ts +39 -0
- package/dist/esm/models/JobPage.js +48 -0
- package/dist/esm/models/JobSharingHint.d.ts +46 -0
- package/dist/esm/models/JobSharingHint.js +51 -0
- package/dist/esm/models/JobTelemetry.d.ts +51 -0
- package/dist/esm/models/JobTelemetry.js +56 -0
- package/dist/esm/models/JobTelemetryPoint.d.ts +56 -0
- package/dist/esm/models/JobTelemetryPoint.js +59 -0
- package/dist/esm/models/JobTrial.d.ts +79 -0
- package/dist/esm/models/JobTrial.js +73 -0
- package/dist/esm/models/Secret.d.ts +62 -0
- package/dist/esm/models/Secret.js +63 -0
- package/dist/esm/models/SecretCreate.d.ts +44 -0
- package/dist/esm/models/SecretCreate.js +49 -0
- package/dist/esm/models/SecretImportItem.d.ts +38 -0
- package/dist/esm/models/SecretImportItem.js +47 -0
- package/dist/esm/models/SecretImportRequest.d.ts +39 -0
- package/dist/esm/models/SecretImportRequest.js +46 -0
- package/dist/esm/models/SecretImportResult.d.ts +44 -0
- package/dist/esm/models/SecretImportResult.js +51 -0
- package/dist/esm/models/SecretList.d.ts +33 -0
- package/dist/esm/models/SecretList.js +44 -0
- package/dist/esm/models/SecretPut.d.ts +38 -0
- package/dist/esm/models/SecretPut.js +45 -0
- package/dist/esm/models/WebhookEndpoint.d.ts +3 -0
- package/dist/esm/models/WebhookEndpoint.js +4 -1
- package/dist/esm/models/index.d.ts +25 -0
- package/dist/esm/models/index.js +25 -0
- package/dist/esm/runtime.js +1 -1
- package/dist/models/Balance.d.ts +6 -0
- package/dist/models/Balance.js +2 -0
- package/dist/models/CreateWebhookEndpointRequest.d.ts +3 -0
- package/dist/models/CreateWebhookEndpointRequest.js +4 -1
- package/dist/models/DedicatedIPOffer.d.ts +98 -0
- package/dist/models/DedicatedIPOffer.js +94 -0
- package/dist/models/Endpoint.d.ts +147 -0
- package/dist/models/Endpoint.js +129 -0
- package/dist/models/EndpointCreate.d.ts +80 -0
- package/dist/models/EndpointCreate.js +70 -0
- package/dist/models/EndpointList.d.ts +33 -0
- package/dist/models/EndpointList.js +51 -0
- package/dist/models/EndpointMachine.d.ts +90 -0
- package/dist/models/EndpointMachine.js +92 -0
- package/dist/models/EndpointReplicaCounts.d.ts +38 -0
- package/dist/models/EndpointReplicaCounts.js +54 -0
- package/dist/models/Job.d.ts +352 -0
- package/dist/models/Job.js +262 -0
- package/dist/models/JobAttempt.d.ts +176 -0
- package/dist/models/JobAttempt.js +155 -0
- package/dist/models/JobCreate.d.ts +153 -0
- package/dist/models/JobCreate.js +92 -0
- package/dist/models/JobGpuTypes.d.ts +39 -0
- package/dist/models/JobGpuTypes.js +55 -0
- package/dist/models/JobGpuTypesDataInner.d.ts +58 -0
- package/dist/models/JobGpuTypesDataInner.js +66 -0
- package/dist/models/JobLogChunk.d.ts +50 -0
- package/dist/models/JobLogChunk.js +62 -0
- package/dist/models/JobLogs.d.ts +39 -0
- package/dist/models/JobLogs.js +55 -0
- package/dist/models/JobPage.d.ts +39 -0
- package/dist/models/JobPage.js +55 -0
- package/dist/models/JobSharingHint.d.ts +46 -0
- package/dist/models/JobSharingHint.js +58 -0
- package/dist/models/JobTelemetry.d.ts +51 -0
- package/dist/models/JobTelemetry.js +63 -0
- package/dist/models/JobTelemetryPoint.d.ts +56 -0
- package/dist/models/JobTelemetryPoint.js +66 -0
- package/dist/models/JobTrial.d.ts +79 -0
- package/dist/models/JobTrial.js +81 -0
- package/dist/models/Secret.d.ts +62 -0
- package/dist/models/Secret.js +70 -0
- package/dist/models/SecretCreate.d.ts +44 -0
- package/dist/models/SecretCreate.js +56 -0
- package/dist/models/SecretImportItem.d.ts +38 -0
- package/dist/models/SecretImportItem.js +54 -0
- package/dist/models/SecretImportRequest.d.ts +39 -0
- package/dist/models/SecretImportRequest.js +53 -0
- package/dist/models/SecretImportResult.d.ts +44 -0
- package/dist/models/SecretImportResult.js +58 -0
- package/dist/models/SecretList.d.ts +33 -0
- package/dist/models/SecretList.js +51 -0
- package/dist/models/SecretPut.d.ts +38 -0
- package/dist/models/SecretPut.js +52 -0
- package/dist/models/WebhookEndpoint.d.ts +3 -0
- package/dist/models/WebhookEndpoint.js +4 -1
- package/dist/models/index.d.ts +25 -0
- package/dist/models/index.js +25 -0
- package/dist/runtime.js +1 -1
- package/docs/Balance.md +2 -0
- package/docs/BillingApi.md +2 -2
- package/docs/DedicatedIPOffer.md +56 -0
- package/docs/Endpoint.md +68 -0
- package/docs/EndpointCreate.md +50 -0
- package/docs/EndpointList.md +34 -0
- package/docs/EndpointMachine.md +50 -0
- package/docs/EndpointReplicaCounts.md +36 -0
- package/docs/EndpointsApi.md +544 -0
- package/docs/InstancesApi.md +68 -1
- package/docs/Job.md +125 -0
- package/docs/JobAttempt.md +69 -0
- package/docs/JobCreate.md +66 -0
- package/docs/JobGpuTypes.md +36 -0
- package/docs/JobGpuTypesDataInner.md +42 -0
- package/docs/JobLogChunk.md +40 -0
- package/docs/JobLogs.md +36 -0
- package/docs/JobPage.md +36 -0
- package/docs/JobSharingHint.md +39 -0
- package/docs/JobTelemetry.md +40 -0
- package/docs/JobTelemetryPoint.md +42 -0
- package/docs/JobTrial.md +46 -0
- package/docs/JobsApi.md +609 -0
- package/docs/OperationsApi.md +76 -0
- package/docs/Secret.md +45 -0
- package/docs/SecretCreate.md +38 -0
- package/docs/SecretImportItem.md +36 -0
- package/docs/SecretImportRequest.md +36 -0
- package/docs/SecretImportResult.md +38 -0
- package/docs/SecretList.md +34 -0
- package/docs/SecretPut.md +36 -0
- package/docs/SecretsApi.md +450 -0
- package/package.json +1 -1
- package/src/apis/BillingApi.ts +2 -2
- package/src/apis/EndpointsApi.ts +481 -0
- package/src/apis/InstancesApi.ts +52 -0
- package/src/apis/JobsApi.ts +551 -0
- package/src/apis/OperationsApi.ts +59 -0
- package/src/apis/SecretsApi.ts +413 -0
- package/src/apis/index.ts +3 -0
- package/src/models/Balance.ts +8 -0
- package/src/models/CreateWebhookEndpointRequest.ts +4 -1
- package/src/models/DedicatedIPOffer.ts +165 -0
- package/src/models/Endpoint.ts +247 -0
- package/src/models/EndpointCreate.ts +132 -0
- package/src/models/EndpointList.ts +74 -0
- package/src/models/EndpointMachine.ts +151 -0
- package/src/models/EndpointReplicaCounts.ts +75 -0
- package/src/models/Job.ts +538 -0
- package/src/models/JobAttempt.ts +267 -0
- package/src/models/JobCreate.ts +221 -0
- package/src/models/JobGpuTypes.ts +83 -0
- package/src/models/JobGpuTypesDataInner.ts +104 -0
- package/src/models/JobLogChunk.ts +93 -0
- package/src/models/JobLogs.ts +83 -0
- package/src/models/JobPage.ts +83 -0
- package/src/models/JobSharingHint.ts +86 -0
- package/src/models/JobTelemetry.ts +101 -0
- package/src/models/JobTelemetryPoint.ts +102 -0
- package/src/models/JobTrial.ts +132 -0
- package/src/models/Secret.ts +111 -0
- package/src/models/SecretCreate.ts +83 -0
- package/src/models/SecretImportItem.ts +75 -0
- package/src/models/SecretImportRequest.ts +82 -0
- package/src/models/SecretImportResult.ts +84 -0
- package/src/models/SecretList.ts +74 -0
- package/src/models/SecretPut.ts +74 -0
- package/src/models/WebhookEndpoint.ts +4 -1
- package/src/models/index.ts +25 -0
- package/src/runtime.ts +1 -1
package/docs/JobsApi.md
ADDED
|
@@ -0,0 +1,609 @@
|
|
|
1
|
+
# JobsApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://api.gpu.ai/v1*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
| [**cancelJob**](JobsApi.md#canceljob) | **POST** /jobs/{id}/cancel | Cancel a job |
|
|
8
|
+
| [**createJob**](JobsApi.md#createjob) | **POST** /jobs | Submit a job |
|
|
9
|
+
| [**getJob**](JobsApi.md#getjob) | **GET** /jobs/{id} | Get a job |
|
|
10
|
+
| [**getJobLogs**](JobsApi.md#getjoblogs) | **GET** /jobs/{id}/logs | Read a job\'s output |
|
|
11
|
+
| [**getJobTelemetry**](JobsApi.md#getjobtelemetry) | **GET** /jobs/{id}/telemetry | Read a job\'s GPU memory telemetry |
|
|
12
|
+
| [**getJobTrial**](JobsApi.md#getjobtrial) | **GET** /jobs/trial | Whether this organization\'s first jobs are free |
|
|
13
|
+
| [**listJobGpuTypes**](JobsApi.md#listjobgputypes) | **GET** /jobs/gpu-types | List the GPU types a job can run on |
|
|
14
|
+
| [**listJobs**](JobsApi.md#listjobs) | **GET** /jobs | List jobs |
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## cancelJob
|
|
19
|
+
|
|
20
|
+
> Job cancelJob(id, idempotencyKey)
|
|
21
|
+
|
|
22
|
+
Cancel a job
|
|
23
|
+
|
|
24
|
+
Cancels a job. A queued job is cancelled at once. A running job is stopped the next time its machine reports, within a few seconds, and shows `cancel_requested` until then. Cancelling a job that has already finished returns it unchanged. Requires the `instances:write` scope.
|
|
25
|
+
|
|
26
|
+
### Example
|
|
27
|
+
|
|
28
|
+
```ts
|
|
29
|
+
import {
|
|
30
|
+
Configuration,
|
|
31
|
+
JobsApi,
|
|
32
|
+
} from '@gpuai/sdk';
|
|
33
|
+
import type { CancelJobRequest } from '@gpuai/sdk';
|
|
34
|
+
|
|
35
|
+
async function example() {
|
|
36
|
+
console.log("🚀 Testing @gpuai/sdk SDK...");
|
|
37
|
+
const config = new Configuration({
|
|
38
|
+
// Configure HTTP bearer authorization: bearerAuth
|
|
39
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
40
|
+
});
|
|
41
|
+
const api = new JobsApi(config);
|
|
42
|
+
|
|
43
|
+
const body = {
|
|
44
|
+
// string | The job id.
|
|
45
|
+
id: id_example,
|
|
46
|
+
// string (optional)
|
|
47
|
+
idempotencyKey: idempotencyKey_example,
|
|
48
|
+
} satisfies CancelJobRequest;
|
|
49
|
+
|
|
50
|
+
try {
|
|
51
|
+
const data = await api.cancelJob(body);
|
|
52
|
+
console.log(data);
|
|
53
|
+
} catch (error) {
|
|
54
|
+
console.error(error);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// Run the test
|
|
59
|
+
example().catch(console.error);
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Parameters
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
| Name | Type | Description | Notes |
|
|
66
|
+
|------------- | ------------- | ------------- | -------------|
|
|
67
|
+
| **id** | `string` | The job id. | [Defaults to `undefined`] |
|
|
68
|
+
| **idempotencyKey** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
69
|
+
|
|
70
|
+
### Return type
|
|
71
|
+
|
|
72
|
+
[**Job**](Job.md)
|
|
73
|
+
|
|
74
|
+
### Authorization
|
|
75
|
+
|
|
76
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
77
|
+
|
|
78
|
+
### HTTP request headers
|
|
79
|
+
|
|
80
|
+
- **Content-Type**: Not defined
|
|
81
|
+
- **Accept**: `application/json`, `application/problem+json`
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
### HTTP response details
|
|
85
|
+
| Status code | Description | Response headers |
|
|
86
|
+
|-------------|-------------|------------------|
|
|
87
|
+
| **200** | The job after the cancel request. | - |
|
|
88
|
+
| **404** | The job does not exist or is not owned by the caller\'s organization. | - |
|
|
89
|
+
| **429** | Rate limit exceeded (RFC 7807). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
|
|
90
|
+
| **0** | Error response (RFC 7807) | - |
|
|
91
|
+
|
|
92
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
## createJob
|
|
96
|
+
|
|
97
|
+
> Job createJob(jobCreate, idempotencyKey)
|
|
98
|
+
|
|
99
|
+
Submit a job
|
|
100
|
+
|
|
101
|
+
Queues a batch job: a container image, a command, and the GPU it needs. The platform places it on a machine in your organization\'s job pool, starting a machine when none has room, and terminates machines that have been empty for a few minutes. Requires the `instances:write` scope, because a job can start a machine. Three opt-ins decide how the job is placed. `max_wait_seconds` lets the job wait for space on a machine you are already paying for before a new one is started. `allow_sharing` lets the job run on the same GPU as other jobs from your own organization. A GPU is never shared with another customer. `allow_restart` lets the platform stop and rerun the job, which sharing needs. A job shares a GPU only when `allow_sharing` and `allow_restart` are both true and its memory is known, from `memory_hint_mb` or from the peaks of earlier finished jobs with the same name or image. Any other job gets a whole GPU. Sharing is also limited by compute. Jobs share a GPU only while the sum of their expected compute duties (the share of time each keeps the GPU busy) stays at or under 100%, so two jobs that saturate the GPU never share one. A job\'s duty comes from `compute_hint_pct` or from the measured utilization of earlier finished jobs with the same name or image. A job with neither counts as 100% and gets a GPU to itself until it has been measured. The memory reservation is not a hard cap. A job that exits out of GPU memory, or that is stopped for outgrowing its reservation on a full GPU, is run again with a larger reservation, then with a whole GPU, up to `max_retries`. Every job gets a checkpoint directory that survives those reruns on the same machine. Billing: the machines a job runs on are instances of your organization and are billed like any instance. `attributed_cost_usd` on the job is its share of that, for display. Free trial: when this deployment runs one, an organization\'s first jobs are free up to a cap (GET /jobs/trial). Their attributed cost is credited back to the balance as they run.
|
|
102
|
+
|
|
103
|
+
### Example
|
|
104
|
+
|
|
105
|
+
```ts
|
|
106
|
+
import {
|
|
107
|
+
Configuration,
|
|
108
|
+
JobsApi,
|
|
109
|
+
} from '@gpuai/sdk';
|
|
110
|
+
import type { CreateJobRequest } from '@gpuai/sdk';
|
|
111
|
+
|
|
112
|
+
async function example() {
|
|
113
|
+
console.log("🚀 Testing @gpuai/sdk SDK...");
|
|
114
|
+
const config = new Configuration({
|
|
115
|
+
// Configure HTTP bearer authorization: bearerAuth
|
|
116
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
117
|
+
});
|
|
118
|
+
const api = new JobsApi(config);
|
|
119
|
+
|
|
120
|
+
const body = {
|
|
121
|
+
// JobCreate
|
|
122
|
+
jobCreate: ...,
|
|
123
|
+
// string (optional)
|
|
124
|
+
idempotencyKey: idempotencyKey_example,
|
|
125
|
+
} satisfies CreateJobRequest;
|
|
126
|
+
|
|
127
|
+
try {
|
|
128
|
+
const data = await api.createJob(body);
|
|
129
|
+
console.log(data);
|
|
130
|
+
} catch (error) {
|
|
131
|
+
console.error(error);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
// Run the test
|
|
136
|
+
example().catch(console.error);
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### Parameters
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
| Name | Type | Description | Notes |
|
|
143
|
+
|------------- | ------------- | ------------- | -------------|
|
|
144
|
+
| **jobCreate** | [JobCreate](JobCreate.md) | | |
|
|
145
|
+
| **idempotencyKey** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
146
|
+
|
|
147
|
+
### Return type
|
|
148
|
+
|
|
149
|
+
[**Job**](Job.md)
|
|
150
|
+
|
|
151
|
+
### Authorization
|
|
152
|
+
|
|
153
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
154
|
+
|
|
155
|
+
### HTTP request headers
|
|
156
|
+
|
|
157
|
+
- **Content-Type**: `application/json`
|
|
158
|
+
- **Accept**: `application/json`, `application/problem+json`
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
### HTTP response details
|
|
162
|
+
| Status code | Description | Response headers |
|
|
163
|
+
|-------------|-------------|------------------|
|
|
164
|
+
| **201** | Created | * GPUAI-Hint - Advisory only. Sent while the organization\'s first jobs are free (GET /jobs/trial), e.g. \"Your first jobs are free, up to $10. We credit back what they cost as they run.\" <br> |
|
|
165
|
+
| **402** | The organization has no balance. Add credits, then submit again. | - |
|
|
166
|
+
| **422** | Validation failed. The detail names the field: a missing image or command, an unknown field, an unknown `gpu_type`, neither `gpu_type` nor `min_vram_gb`, a memory hint larger than the GPU, an environment variable name starting with `GPUAI_`, or a value out of range. | - |
|
|
167
|
+
| **429** | Rate limited, or the organization already has the maximum number of queued and running jobs. | - |
|
|
168
|
+
| **0** | Error response (RFC 7807) | - |
|
|
169
|
+
|
|
170
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
## getJob
|
|
174
|
+
|
|
175
|
+
> Job getJob(id)
|
|
176
|
+
|
|
177
|
+
Get a job
|
|
178
|
+
|
|
179
|
+
Returns one job with its attempts. Requires the `instances:read` scope.
|
|
180
|
+
|
|
181
|
+
### Example
|
|
182
|
+
|
|
183
|
+
```ts
|
|
184
|
+
import {
|
|
185
|
+
Configuration,
|
|
186
|
+
JobsApi,
|
|
187
|
+
} from '@gpuai/sdk';
|
|
188
|
+
import type { GetJobRequest } from '@gpuai/sdk';
|
|
189
|
+
|
|
190
|
+
async function example() {
|
|
191
|
+
console.log("🚀 Testing @gpuai/sdk SDK...");
|
|
192
|
+
const config = new Configuration({
|
|
193
|
+
// Configure HTTP bearer authorization: bearerAuth
|
|
194
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
195
|
+
});
|
|
196
|
+
const api = new JobsApi(config);
|
|
197
|
+
|
|
198
|
+
const body = {
|
|
199
|
+
// string | The job id.
|
|
200
|
+
id: id_example,
|
|
201
|
+
} satisfies GetJobRequest;
|
|
202
|
+
|
|
203
|
+
try {
|
|
204
|
+
const data = await api.getJob(body);
|
|
205
|
+
console.log(data);
|
|
206
|
+
} catch (error) {
|
|
207
|
+
console.error(error);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
// Run the test
|
|
212
|
+
example().catch(console.error);
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### Parameters
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
| Name | Type | Description | Notes |
|
|
219
|
+
|------------- | ------------- | ------------- | -------------|
|
|
220
|
+
| **id** | `string` | The job id. | [Defaults to `undefined`] |
|
|
221
|
+
|
|
222
|
+
### Return type
|
|
223
|
+
|
|
224
|
+
[**Job**](Job.md)
|
|
225
|
+
|
|
226
|
+
### Authorization
|
|
227
|
+
|
|
228
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
229
|
+
|
|
230
|
+
### HTTP request headers
|
|
231
|
+
|
|
232
|
+
- **Content-Type**: Not defined
|
|
233
|
+
- **Accept**: `application/json`, `application/problem+json`
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
### HTTP response details
|
|
237
|
+
| Status code | Description | Response headers |
|
|
238
|
+
|-------------|-------------|------------------|
|
|
239
|
+
| **200** | OK | - |
|
|
240
|
+
| **404** | The job does not exist or is not owned by the caller\'s organization. | - |
|
|
241
|
+
| **429** | Rate limit exceeded (RFC 7807). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
|
|
242
|
+
| **0** | Error response (RFC 7807) | - |
|
|
243
|
+
|
|
244
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
## getJobLogs
|
|
248
|
+
|
|
249
|
+
> JobLogs getJobLogs(id, after, limit)
|
|
250
|
+
|
|
251
|
+
Read a job\'s output
|
|
252
|
+
|
|
253
|
+
Returns the job\'s combined standard output and standard error, in chunks, across all attempts. Pass the `next_after` of one response as `after` on the next to read on from there. Output is uploaded every few seconds while the job runs, and stored output is capped at about 8 MB per attempt. Requires the `instances:read` scope.
|
|
254
|
+
|
|
255
|
+
### Example
|
|
256
|
+
|
|
257
|
+
```ts
|
|
258
|
+
import {
|
|
259
|
+
Configuration,
|
|
260
|
+
JobsApi,
|
|
261
|
+
} from '@gpuai/sdk';
|
|
262
|
+
import type { GetJobLogsRequest } from '@gpuai/sdk';
|
|
263
|
+
|
|
264
|
+
async function example() {
|
|
265
|
+
console.log("🚀 Testing @gpuai/sdk SDK...");
|
|
266
|
+
const config = new Configuration({
|
|
267
|
+
// Configure HTTP bearer authorization: bearerAuth
|
|
268
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
269
|
+
});
|
|
270
|
+
const api = new JobsApi(config);
|
|
271
|
+
|
|
272
|
+
const body = {
|
|
273
|
+
// string | The job id.
|
|
274
|
+
id: id_example,
|
|
275
|
+
// number | Return chunks after this chunk id. (optional)
|
|
276
|
+
after: 789,
|
|
277
|
+
// number | Maximum number of chunks to return. (optional)
|
|
278
|
+
limit: 56,
|
|
279
|
+
} satisfies GetJobLogsRequest;
|
|
280
|
+
|
|
281
|
+
try {
|
|
282
|
+
const data = await api.getJobLogs(body);
|
|
283
|
+
console.log(data);
|
|
284
|
+
} catch (error) {
|
|
285
|
+
console.error(error);
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
// Run the test
|
|
290
|
+
example().catch(console.error);
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
### Parameters
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
| Name | Type | Description | Notes |
|
|
297
|
+
|------------- | ------------- | ------------- | -------------|
|
|
298
|
+
| **id** | `string` | The job id. | [Defaults to `undefined`] |
|
|
299
|
+
| **after** | `number` | Return chunks after this chunk id. | [Optional] [Defaults to `0`] |
|
|
300
|
+
| **limit** | `number` | Maximum number of chunks to return. | [Optional] [Defaults to `100`] |
|
|
301
|
+
|
|
302
|
+
### Return type
|
|
303
|
+
|
|
304
|
+
[**JobLogs**](JobLogs.md)
|
|
305
|
+
|
|
306
|
+
### Authorization
|
|
307
|
+
|
|
308
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
309
|
+
|
|
310
|
+
### HTTP request headers
|
|
311
|
+
|
|
312
|
+
- **Content-Type**: Not defined
|
|
313
|
+
- **Accept**: `application/json`, `application/problem+json`
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
### HTTP response details
|
|
317
|
+
| Status code | Description | Response headers |
|
|
318
|
+
|-------------|-------------|------------------|
|
|
319
|
+
| **200** | OK | - |
|
|
320
|
+
| **404** | The job does not exist or is not owned by the caller\'s organization. | - |
|
|
321
|
+
| **429** | Rate limit exceeded (RFC 7807). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
|
|
322
|
+
| **0** | Error response (RFC 7807) | - |
|
|
323
|
+
|
|
324
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
## getJobTelemetry
|
|
328
|
+
|
|
329
|
+
> JobTelemetry getJobTelemetry(id)
|
|
330
|
+
|
|
331
|
+
Read a job\'s GPU memory telemetry
|
|
332
|
+
|
|
333
|
+
Returns the job\'s peak GPU memory, its reservation, and up to the 720 most recent memory points. The machine samples every 2 seconds and stores one point per report, the highest sample in that window. Points are kept for 30 days. Requires the `instances:read` scope.
|
|
334
|
+
|
|
335
|
+
### Example
|
|
336
|
+
|
|
337
|
+
```ts
|
|
338
|
+
import {
|
|
339
|
+
Configuration,
|
|
340
|
+
JobsApi,
|
|
341
|
+
} from '@gpuai/sdk';
|
|
342
|
+
import type { GetJobTelemetryRequest } from '@gpuai/sdk';
|
|
343
|
+
|
|
344
|
+
async function example() {
|
|
345
|
+
console.log("🚀 Testing @gpuai/sdk SDK...");
|
|
346
|
+
const config = new Configuration({
|
|
347
|
+
// Configure HTTP bearer authorization: bearerAuth
|
|
348
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
349
|
+
});
|
|
350
|
+
const api = new JobsApi(config);
|
|
351
|
+
|
|
352
|
+
const body = {
|
|
353
|
+
// string | The job id.
|
|
354
|
+
id: id_example,
|
|
355
|
+
} satisfies GetJobTelemetryRequest;
|
|
356
|
+
|
|
357
|
+
try {
|
|
358
|
+
const data = await api.getJobTelemetry(body);
|
|
359
|
+
console.log(data);
|
|
360
|
+
} catch (error) {
|
|
361
|
+
console.error(error);
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
// Run the test
|
|
366
|
+
example().catch(console.error);
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
### Parameters
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
| Name | Type | Description | Notes |
|
|
373
|
+
|------------- | ------------- | ------------- | -------------|
|
|
374
|
+
| **id** | `string` | The job id. | [Defaults to `undefined`] |
|
|
375
|
+
|
|
376
|
+
### Return type
|
|
377
|
+
|
|
378
|
+
[**JobTelemetry**](JobTelemetry.md)
|
|
379
|
+
|
|
380
|
+
### Authorization
|
|
381
|
+
|
|
382
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
383
|
+
|
|
384
|
+
### HTTP request headers
|
|
385
|
+
|
|
386
|
+
- **Content-Type**: Not defined
|
|
387
|
+
- **Accept**: `application/json`, `application/problem+json`
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
### HTTP response details
|
|
391
|
+
| Status code | Description | Response headers |
|
|
392
|
+
|-------------|-------------|------------------|
|
|
393
|
+
| **200** | OK | - |
|
|
394
|
+
| **404** | The job does not exist or is not owned by the caller\'s organization. | - |
|
|
395
|
+
| **429** | Rate limit exceeded (RFC 7807). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
|
|
396
|
+
| **0** | Error response (RFC 7807) | - |
|
|
397
|
+
|
|
398
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+
## getJobTrial
|
|
402
|
+
|
|
403
|
+
> JobTrial getJobTrial()
|
|
404
|
+
|
|
405
|
+
Whether this organization\'s first jobs are free
|
|
406
|
+
|
|
407
|
+
Reports the Jobs free trial for this organization. When the deployment runs one, an organization\'s first jobs are free up to `cap_cents`: the cost attributed to its jobs is credited back to its balance as they run, until the credits reach the cap. One trial per organization, for organizations that had not used Jobs before the trial started. `enabled` is false when there is no trial. Requires the `instances:read` scope.
|
|
408
|
+
|
|
409
|
+
### Example
|
|
410
|
+
|
|
411
|
+
```ts
|
|
412
|
+
import {
|
|
413
|
+
Configuration,
|
|
414
|
+
JobsApi,
|
|
415
|
+
} from '@gpuai/sdk';
|
|
416
|
+
import type { GetJobTrialRequest } from '@gpuai/sdk';
|
|
417
|
+
|
|
418
|
+
async function example() {
|
|
419
|
+
console.log("🚀 Testing @gpuai/sdk SDK...");
|
|
420
|
+
const config = new Configuration({
|
|
421
|
+
// Configure HTTP bearer authorization: bearerAuth
|
|
422
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
423
|
+
});
|
|
424
|
+
const api = new JobsApi(config);
|
|
425
|
+
|
|
426
|
+
try {
|
|
427
|
+
const data = await api.getJobTrial();
|
|
428
|
+
console.log(data);
|
|
429
|
+
} catch (error) {
|
|
430
|
+
console.error(error);
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
// Run the test
|
|
435
|
+
example().catch(console.error);
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
### Parameters
|
|
439
|
+
|
|
440
|
+
This endpoint does not need any parameter.
|
|
441
|
+
|
|
442
|
+
### Return type
|
|
443
|
+
|
|
444
|
+
[**JobTrial**](JobTrial.md)
|
|
445
|
+
|
|
446
|
+
### Authorization
|
|
447
|
+
|
|
448
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
449
|
+
|
|
450
|
+
### HTTP request headers
|
|
451
|
+
|
|
452
|
+
- **Content-Type**: Not defined
|
|
453
|
+
- **Accept**: `application/json`, `application/problem+json`
|
|
454
|
+
|
|
455
|
+
|
|
456
|
+
### HTTP response details
|
|
457
|
+
| Status code | Description | Response headers |
|
|
458
|
+
|-------------|-------------|------------------|
|
|
459
|
+
| **200** | OK | - |
|
|
460
|
+
| **429** | Rate limit exceeded (RFC 7807). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
|
|
461
|
+
| **0** | Error response (RFC 7807) | - |
|
|
462
|
+
|
|
463
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
464
|
+
|
|
465
|
+
|
|
466
|
+
## listJobGpuTypes
|
|
467
|
+
|
|
468
|
+
> JobGpuTypes listJobGpuTypes()
|
|
469
|
+
|
|
470
|
+
List the GPU types a job can run on
|
|
471
|
+
|
|
472
|
+
Returns the GPU types the suppliers that run jobs rent as a one-GPU machine, smallest memory first. A type is listed when one of them offered it in the last 7 days, in stock or not. `available_now` says whether one has such a machine to rent now, and `price_per_gpu_hour` is the cheapest retail price of it at that read (a guide, not a quote: the launch prices it again). When `complete` is true, `POST /jobs` refuses any other `gpu_type` with a 422 (and a `min_vram_gb` larger than every listed type), instead of queueing a job that could never start. When `complete` is false the list may be partial or empty, and a job for any known GPU model is accepted and waits for a machine. Requires the `instances:read` scope.
|
|
473
|
+
|
|
474
|
+
### Example
|
|
475
|
+
|
|
476
|
+
```ts
|
|
477
|
+
import {
|
|
478
|
+
Configuration,
|
|
479
|
+
JobsApi,
|
|
480
|
+
} from '@gpuai/sdk';
|
|
481
|
+
import type { ListJobGpuTypesRequest } from '@gpuai/sdk';
|
|
482
|
+
|
|
483
|
+
async function example() {
|
|
484
|
+
console.log("🚀 Testing @gpuai/sdk SDK...");
|
|
485
|
+
const config = new Configuration({
|
|
486
|
+
// Configure HTTP bearer authorization: bearerAuth
|
|
487
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
488
|
+
});
|
|
489
|
+
const api = new JobsApi(config);
|
|
490
|
+
|
|
491
|
+
try {
|
|
492
|
+
const data = await api.listJobGpuTypes();
|
|
493
|
+
console.log(data);
|
|
494
|
+
} catch (error) {
|
|
495
|
+
console.error(error);
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
// Run the test
|
|
500
|
+
example().catch(console.error);
|
|
501
|
+
```
|
|
502
|
+
|
|
503
|
+
### Parameters
|
|
504
|
+
|
|
505
|
+
This endpoint does not need any parameter.
|
|
506
|
+
|
|
507
|
+
### Return type
|
|
508
|
+
|
|
509
|
+
[**JobGpuTypes**](JobGpuTypes.md)
|
|
510
|
+
|
|
511
|
+
### Authorization
|
|
512
|
+
|
|
513
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
514
|
+
|
|
515
|
+
### HTTP request headers
|
|
516
|
+
|
|
517
|
+
- **Content-Type**: Not defined
|
|
518
|
+
- **Accept**: `application/json`, `application/problem+json`
|
|
519
|
+
|
|
520
|
+
|
|
521
|
+
### HTTP response details
|
|
522
|
+
| Status code | Description | Response headers |
|
|
523
|
+
|-------------|-------------|------------------|
|
|
524
|
+
| **200** | OK | - |
|
|
525
|
+
| **429** | Rate limit exceeded (RFC 7807). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
|
|
526
|
+
| **0** | Error response (RFC 7807) | - |
|
|
527
|
+
|
|
528
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
529
|
+
|
|
530
|
+
|
|
531
|
+
## listJobs
|
|
532
|
+
|
|
533
|
+
> JobPage listJobs(status, cursor, limit)
|
|
534
|
+
|
|
535
|
+
List jobs
|
|
536
|
+
|
|
537
|
+
Lists this organization\'s jobs, newest first. Requires the `instances:read` scope. Jobs belonging to other organizations are never returned.
|
|
538
|
+
|
|
539
|
+
### Example
|
|
540
|
+
|
|
541
|
+
```ts
|
|
542
|
+
import {
|
|
543
|
+
Configuration,
|
|
544
|
+
JobsApi,
|
|
545
|
+
} from '@gpuai/sdk';
|
|
546
|
+
import type { ListJobsRequest } from '@gpuai/sdk';
|
|
547
|
+
|
|
548
|
+
async function example() {
|
|
549
|
+
console.log("🚀 Testing @gpuai/sdk SDK...");
|
|
550
|
+
const config = new Configuration({
|
|
551
|
+
// Configure HTTP bearer authorization: bearerAuth
|
|
552
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
553
|
+
});
|
|
554
|
+
const api = new JobsApi(config);
|
|
555
|
+
|
|
556
|
+
const body = {
|
|
557
|
+
// 'queued' | 'assigned' | 'running' | 'succeeded' | 'failed' | 'cancelled' | Only return jobs in this status. (optional)
|
|
558
|
+
status: status_example,
|
|
559
|
+
// string (optional)
|
|
560
|
+
cursor: cursor_example,
|
|
561
|
+
// number (optional)
|
|
562
|
+
limit: 56,
|
|
563
|
+
} satisfies ListJobsRequest;
|
|
564
|
+
|
|
565
|
+
try {
|
|
566
|
+
const data = await api.listJobs(body);
|
|
567
|
+
console.log(data);
|
|
568
|
+
} catch (error) {
|
|
569
|
+
console.error(error);
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
// Run the test
|
|
574
|
+
example().catch(console.error);
|
|
575
|
+
```
|
|
576
|
+
|
|
577
|
+
### Parameters
|
|
578
|
+
|
|
579
|
+
|
|
580
|
+
| Name | Type | Description | Notes |
|
|
581
|
+
|------------- | ------------- | ------------- | -------------|
|
|
582
|
+
| **status** | `queued`, `assigned`, `running`, `succeeded`, `failed`, `cancelled` | Only return jobs in this status. | [Optional] [Defaults to `undefined`] [Enum: queued, assigned, running, succeeded, failed, cancelled] |
|
|
583
|
+
| **cursor** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
584
|
+
| **limit** | `number` | | [Optional] [Defaults to `50`] |
|
|
585
|
+
|
|
586
|
+
### Return type
|
|
587
|
+
|
|
588
|
+
[**JobPage**](JobPage.md)
|
|
589
|
+
|
|
590
|
+
### Authorization
|
|
591
|
+
|
|
592
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
593
|
+
|
|
594
|
+
### HTTP request headers
|
|
595
|
+
|
|
596
|
+
- **Content-Type**: Not defined
|
|
597
|
+
- **Accept**: `application/json`, `application/problem+json`
|
|
598
|
+
|
|
599
|
+
|
|
600
|
+
### HTTP response details
|
|
601
|
+
| Status code | Description | Response headers |
|
|
602
|
+
|-------------|-------------|------------------|
|
|
603
|
+
| **200** | OK | - |
|
|
604
|
+
| **422** | Validation failed, such as an unknown status or an invalid cursor. | - |
|
|
605
|
+
| **429** | Rate limit exceeded (RFC 7807). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
|
|
606
|
+
| **0** | Error response (RFC 7807) | - |
|
|
607
|
+
|
|
608
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
609
|
+
|
package/docs/OperationsApi.md
CHANGED
|
@@ -4,10 +4,86 @@ All URIs are relative to *https://api.gpu.ai/v1*
|
|
|
4
4
|
|
|
5
5
|
| Method | HTTP request | Description |
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
|
+
| [**cancelOperation**](OperationsApi.md#canceloperation) | **POST** /operations/{id}/cancel | Cancel a launch that has not created its instance yet |
|
|
7
8
|
| [**getOperation**](OperationsApi.md#getoperation) | **GET** /operations/{id} | Get an async operation status |
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
|
|
12
|
+
## cancelOperation
|
|
13
|
+
|
|
14
|
+
> Operation cancelOperation(id)
|
|
15
|
+
|
|
16
|
+
Cancel a launch that has not created its instance yet
|
|
17
|
+
|
|
18
|
+
Cancels an instance.create operation that is still pending or in_progress and has no resource_id yet. Nothing is created or billed for a cancelled launch; if the supplier finishes creating the machine after the cancel, it is terminated right away. Cancelling an operation that already finished returns it unchanged, so the call is safe to repeat. Scoped like GET /operations/{id}: only the key that started the operation can cancel it. Requires the `instances:write` scope.
|
|
19
|
+
|
|
20
|
+
### Example
|
|
21
|
+
|
|
22
|
+
```ts
|
|
23
|
+
import {
|
|
24
|
+
Configuration,
|
|
25
|
+
OperationsApi,
|
|
26
|
+
} from '@gpuai/sdk';
|
|
27
|
+
import type { CancelOperationRequest } from '@gpuai/sdk';
|
|
28
|
+
|
|
29
|
+
async function example() {
|
|
30
|
+
console.log("🚀 Testing @gpuai/sdk SDK...");
|
|
31
|
+
const config = new Configuration({
|
|
32
|
+
// Configure HTTP bearer authorization: bearerAuth
|
|
33
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
34
|
+
});
|
|
35
|
+
const api = new OperationsApi(config);
|
|
36
|
+
|
|
37
|
+
const body = {
|
|
38
|
+
// string
|
|
39
|
+
id: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
40
|
+
} satisfies CancelOperationRequest;
|
|
41
|
+
|
|
42
|
+
try {
|
|
43
|
+
const data = await api.cancelOperation(body);
|
|
44
|
+
console.log(data);
|
|
45
|
+
} catch (error) {
|
|
46
|
+
console.error(error);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// Run the test
|
|
51
|
+
example().catch(console.error);
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Parameters
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
| Name | Type | Description | Notes |
|
|
58
|
+
|------------- | ------------- | ------------- | -------------|
|
|
59
|
+
| **id** | `string` | | [Defaults to `undefined`] |
|
|
60
|
+
|
|
61
|
+
### Return type
|
|
62
|
+
|
|
63
|
+
[**Operation**](Operation.md)
|
|
64
|
+
|
|
65
|
+
### Authorization
|
|
66
|
+
|
|
67
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
68
|
+
|
|
69
|
+
### HTTP request headers
|
|
70
|
+
|
|
71
|
+
- **Content-Type**: Not defined
|
|
72
|
+
- **Accept**: `application/json`, `application/problem+json`
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
### HTTP response details
|
|
76
|
+
| Status code | Description | Response headers |
|
|
77
|
+
|-------------|-------------|------------------|
|
|
78
|
+
| **200** | The operation, `cancelled` unless it had already finished. | - |
|
|
79
|
+
| **404** | `not_found`. No operation with this id for this key. | - |
|
|
80
|
+
| **409** | `validation_failed`. The operation is not a launch, or the launch already created its instance. The detail names the instance to delete instead. | - |
|
|
81
|
+
| **429** | Rate limit exceeded (RFC 7807). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
|
|
82
|
+
| **0** | Error response (RFC 7807) | - |
|
|
83
|
+
|
|
84
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
85
|
+
|
|
86
|
+
|
|
11
87
|
## getOperation
|
|
12
88
|
|
|
13
89
|
> Operation getOperation(id)
|