This endpoint permanently terminates an Orion Series GPU virtual machine or Bare Metal instance and deallocates its underlying hardware, storage, and networking resources. You can identify the target instance using either its integer Instance ID or string DC Provider Instance ID.
Terminate an Instance - Overview
The Orion Series Instance Termination API allows authenticated users to permanently terminate an Orion instance and delete all its associated data.
The endpoint identifies the target instance using either its numeric instance ID or its string-based provider VM ID (VMID). It can be integrated into infrastructure cleanup scripts, automated resource management workflows, and custom instance management applications.
When termination request succeeds, the API returns the instance's current status and a confirmation message.
Important Warning: Termination is permanent and deletes the instance and its associated data. Back up any required data and carefully verify the instance identifier before submitting the request.
Endpoint
| Property | Value |
|---|---|
| HTTP Method | POST |
| Endpoint | /orion/delete |
| Full URL | https://cloud.dataoorts.com/api/v1/orion/delete |
| Authentication | Bearer Token |
| Content Type | application/json |
| Response Format | JSON |
Authentication
This endpoint requires a valid Dataoorts Unify API key.
Include your API key in the Authorization header using the Bearer authentication scheme.
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
Accept: application/jsonGenerate or manage your API key through the Dataoorts Unify API.
Keep your API key confidential and never expose it in public repositories or client-side applications.
Request Parameters
The request body must be sent as JSON.
| Parameter | Type | Required | Description |
|---|---|---|---|
instance_id | Integer or String | Yes | The numeric instance ID or string-based DC Provider Instance ID (VMID) of the Orion instance you want to terminate. |
Provide either the instance ID or the provider VMID through the instance_id parameter. Verify that the identifier corresponds to the intended instance before submitting the request.
Request Examples
cURL — Using Instance ID
Use the following command to terminate an Orion instance using its numeric instance ID:
curl --request POST \
--url "https://cloud.dataoorts.com/api/v1/orion/delete" \
--header "Authorization: Bearer YOUR_API_KEY" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data '{
"instance_id": 50
}'cURL — Using Provider VMID
You can also supply the provider VMID as a string:
curl --request POST \
--url "https://cloud.dataoorts.com/api/v1/orion/delete" \
--header "Authorization: Bearer YOUR_API_KEY" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data '{
"instance_id": "sf-6979d897dbe948d5b8ff1ec6"
}'Replace YOUR_API_KEY and the example identifier with your actual values.
Python Example Implementation
The following example uses the requests library to terminate an Orion instance using either its numeric Instance ID or its DC Provider Instance VMID.
Install the required dependency:
pip install requestsimport os
import requests
API_URL = "https://cloud.dataoorts.com/api/v1/orion/delete"
def delete_orion_instance(
api_key: str,
instance_id: int | str,
) -> dict:
"""
Permanently terminate an Orion instance.
Args:
api_key: Your Dataoorts Unify API key.
instance_id: The numeric instance ID or string-based provider VMID.
Returns:
dict: The JSON response containing the termination result.
Raises:
requests.exceptions.RequestException:
If the HTTP request fails or returns an unsuccessful
HTTP status code.
ValueError:
If the response cannot be decoded as JSON.
"""
headers = {
"Authorization": f"Bearer {api_key}",
"Content-Type": "application/json",
"Accept": "application/json",
}
payload = {
"instance_id": instance_id,
}
response = requests.post(
API_URL,
headers=headers,
json=payload,
timeout=60,
)
response.raise_for_status()
try:
return response.json()
except requests.exceptions.JSONDecodeError as exc:
raise ValueError(
"The API returned an invalid JSON response."
) from exc
if __name__ == "__main__":
api_key = os.getenv("DATAOORTS_API_KEY")
if not api_key:
raise RuntimeError(
"Set the DATAOORTS_API_KEY environment variable."
)
# Verify the identifier and back up required data before proceeding.
try:
result = delete_orion_instance(
api_key=api_key,
instance_id=50,
)
print("Status:", result.get("status"))
print("Current Status:", result.get("current_status"))
print("Message:", result.get("message"))
except requests.exceptions.RequestException as exc:
print(f"API request failed: {exc}.")
except ValueError as exc:
print(f"Invalid API response: {exc}.")Set your API key before running the script.
Linux / macOS
export DATAOORTS_API_KEY="YOUR_API_KEY"
python delete_orion_instance.pyWindows PowerShell
$env:DATAOORTS_API_KEY="YOUR_API_KEY"
python delete_orion_instance.pyReplace 50 with numeric instance ID or string-based DC Provider VMID of Instance you intend to terminate.
Important: The Python example submits the termination request directly. Verify the target instance and back up all required data before executing it.
Example Success Response
When an instance is terminated successfully, the API returns a JSON response similar to the following:
{
"current_status": "terminated",
"message": "Instance 50 terminated successfully.",
"status": "success"
}The instance identifier and confirmation message will reflect the actual request.
Response Fields
| Field | Type | Description |
|---|---|---|
status | String | Indicates the result of the POST or DELETE API request. A successful response returns success. |
current_status | String | The instance status reported by the API after the termination request. The example returns terminated. |
message | String | The confirmation message indicating that the Orion GPU Instance was terminated successfully. |
Understanding the Termination Process
After submitting the request:
- Dataoorts API processes the termination request using the supplied Instance ID or DC Provider VMID.
- If the operation succeeds, the API returns the termination status and confirmation message.
- The instance and its associated data are permanently deleted.
- The deleted data cannot be recovered through the terminated instance.
A successful response confirms the result reported by the API. If the request times out or returns an error, do not automatically assume that termination failed.
Important Notes
1. Permanent Data Loss: Back up all required datasets, application files, configurations, and other important data before terminating the instance.
2. Verify the Identifier: Ensure that instance_id contains the correct instance ID or provider VMID for the intended Orion instance.
3. Irreversible Operation: Termination permanently deletes the instance and its associated data. It is different from rebooting or hibernating an instance.
4. Handle Timeouts Carefully: If the request times out or returns an error, check the instance's current state before retrying. The server may have processed the termination even if the client did not receive a response.
Error Handling
If request fails, API may return unsuccessful HTTP status code and JSON response containing an error message.
Your application should handle authentication failures, invalid instance identifiers, network errors, request timeouts, server errors, & unexpected response formats. Error codes & messages depend on the API response.
In Python, response.raise_for_status() raises an exception for unsuccessful HTTP status codes, Do not assume that every response contains the same fields as the successful response shown above.
Get Help and Support
For assistance with Orion Instance Termination/API integration, Contact support team at [email protected].
