# Workloads batch

## POST /api/v1/workloads/batch

> Workload batch operations.

```json
{"openapi":"3.0.3","info":{"title":"NVIDIA Run:ai","version":"latest"},"tags":[{"name":"Workloads batch"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"schemas":{"WorkloadBatch":{"type":"object","description":"The ids and action to perform on a batch of workloads. The number of ids is limited to 100.","required":["ids","action"],"properties":{"ids":{"$ref":"#/components/schemas/IdsList"},"action":{"$ref":"#/components/schemas/Action1"}}},"IdsList":{"type":"array","description":"List of ids to perform the action on.","items":{"type":"string","format":"uuid","description":"Id to perform the action on."},"minLength":1},"Action1":{"type":"string","description":"The action to perform on the list of ids.","enum":["delete","suspend","resume"]},"BatchResponse":{"type":"object","required":["id"],"properties":{"id":{"$ref":"#/components/schemas/BatchId"},"succeeded":{"$ref":"#/components/schemas/IdsList"},"failed":{"type":"array","description":"The IDs that failed to update.","items":{"$ref":"#/components/schemas/BatchResponseFailureItem"}}}},"BatchId":{"type":"string","format":"uuid","description":"The ID of the batch operation."},"BatchResponseFailureItem":{"type":"object","required":["id","code","message"],"properties":{"id":{"type":"string","format":"uuid"},"code":{"$ref":"#/components/schemas/ErrorCode"},"message":{"$ref":"#/components/schemas/ErrorMessage"}}},"ErrorCode":{"type":"integer","format":"int32","description":"A numeric code representing the error type."},"ErrorMessage":{"type":"string","description":"The error message."},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"responses":{"400BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500InternalServerError":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/v1/workloads/batch":{"post":{"summary":"Workload batch operations.","operationId":"batch_workloads","tags":["Workloads batch"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkloadBatch"}}}},"responses":{"200":{"description":"Request completed successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchResponse"}}}},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://run-ai-docs.nvidia.com/api/workloads/workloads-batch.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
