Set Featured Instance

This route is restricted to Admin access only.

📘

Providers Only: To feature your GPU instance offers in the Marketplace, contact us at [email protected]

Update Instance Feature Status

This endpoint allows an administrator to set or unset the "featured" status of a specific instance. Featured instances can be prominently displayed on the marketplace's main pages.

Endpoint

PATCH /api/v1/admin/instances/{instance_id}/feature-status

Authentication

TypeRequiredLocationDescription
Admin KeytrueHeaderThe key must be sent as x-api-key: ADMIN_KEY.

This is a protected administrative endpoint. You must provide the master ADMIN_KEY to successfully authenticate the request.

📘

This route is restricted to Admin access only.


URL Parameters

ParameterTypeRequiredDescription
instance_idstringtrueThe unique ID of the instance to be updated.

Request Body

The request body must be a JSON object containing the new feature status.

FieldTypeRequiredDescription
is_featuredbooleantrueSet to true to feature the instance, or false to remove its featured status.

Example Request

Here is an example of how to feature an instance using cURL. Replace YOUR_INSTANCE_ID and YOUR_ADMIN_KEY.

curl -X PATCH 'https://offers.dataoorts.com/api/v1/admin/instances/YOUR_INSTANCE_ID/feature-status' \
-H 'Content-Type: application/json' \
-H 'x-api-key: YOUR_ADMIN_KEY' \
-d '{
    "is_featured": true
}'
curl -X PATCH 'https://offers.dataoorts.com/api/v1/admin/instances/YOUR_INSTANCE_ID/feature-status' \
-H 'Content-Type: application/json' \
-H 'x-api-key: YOUR_ADMIN_KEY' \
-d '{
    "is_featured": false
}'

Responses

✅ Success Response (200 OK)

Returned when the instance's featured status is successfully updated.

Body

{
  "status": "Success",
  "message": "Success: Instance 'IID_21052024103005123' featured status has been set to True."
}

Note: The message may vary slightly if the status was already set to the requested value.


❌ Error Response (400 Bad Request)

Returned if the request body is missing or malformed.

Body (Example: Missing is_featured key)

{
  "error": "Bad Request: Missing 'is_featured' key in JSON body."
}

Body (Example: Incorrect data type)

{
  "error": "Bad Request: 'is_featured' must be a boolean (true or false)."
}

❌ Error Response (401 Unauthorized)

Returned if the x-api-key header is missing or the provided key is invalid.

Body

{
  "error": "Unauthorized"
}
❗️

More than three failed authentication attempts will result in a permanent IP block.


❌ Error Response (404 Not Found)

Returned if no instance exists with the instance_id provided in the URL.

Body

{
  "error": "Not Found",
  "details": "Update failed: No instance found with ID 'IID_NON_EXISTENT'."
}

❌ Error Response (500 Internal Server Error)

Returned for database errors or other unexpected issues on the server.

Body

{
  "error": "An internal server error occurred",
  "details": "Specific error message from the server."
}