bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 31쪽 중 31쪽
rning>
Always treat your API key as a secret. Do not share it or expose it in client-side code (e.g., browsers or mobile apps). Instead, store it securely in an environment variable or a key management service in your backend server.
</Warning>
<img alt="Vmaas2 Jp" />
## Making requests
<Note>
Accessing APIs requires IO credits. Make sure you have sufficient IO credits before using any API endpoint.
Contact support or visit the IO Credits documentation page for more details.
</Note>
Include the API key in an `Authorization` HTTP header for all API requests:
```
Authorization: X-API-KEY $IOCLOUD_API_KEY
```
Replace `$IOCLOUD_API_KEY` with your **API key**.
### Example: Deploy VMs
The following `curl` command demonstrates how to deploy VMs in IO Cloud.\
Make sure to include your `x-api-key` header and, if needed, adjust the query parameters such as `status`, `page`, or `page_size`.:
```curl theme={null}
curl -X POST "https://api.io.solutions/enterprise/v1/io-cloud/vmaas/deploy?page=0&page_size=10&status=running" \
-H "accept: application/json" \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY_HERE" \
-d '{
"name": "test-deployment",
"hardware_quantity": 2,
"hardware_name": "NVIDIA A100",
"region": "us-east-1"
}'
```
This request should return a similar response:
```json theme={null}
{
"data": {
"deployments": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "running",
"name": "test-deployment",
"completed_percent": 75,
"hardware_quantity": 2,
"brand_name": "NVIDIA",
"hardware_name": "A100",
"compute_minutes_served": 120,
"compute_minutes_remaining": 240
}
],
"total": 1,
"statuses": ["running"]
}
}
```
# Get a VM's Jobs History
Source: https://io.net/docs/reference/vmaas/get-vms-jobs-history
openapi/vmaas/get-vms-jobs-history.json GET /enterprise/v1/io-cloud/vmaas/deployment/{deployment_id}/vms-jobs/{container_id}
Retrieve the job execution history for a specific VM or container within a deployment. Includes logs and status of completed or active jobs.프로젝트로 돌아가기