Get all Providers

This route is restricted to Super Admin access only.

Get All Providers

This endpoint retrieves a complete list of all registered provider accounts on the marketplace. This is a privileged super administrative endpoint, providing access to sensitive provider details like contact information, limits, and status.

Endpoint

GET /api/v1/admin/providers

Authentication

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

This endpoint is strictly limited to super administrator. You must provide the master SUPER_ADMIN_KEY to successfully authenticate the request.


Request

This endpoint does not require a request body or any URL parameters.

Example Request

Here is an example of how to call this endpoint using cURL. Replace SUPER_ADMIN_KEY with your actual super administrative API key.

curl -X GET 'https://offers.dataoorts.com/api/v1/admin/providers' \
-H 'x-api-key: SUPER_ADMIN_KEY'

Responses

✅ Success Response (200 OK)

A successful request will return an HTTP 200 OK status code and a JSON array of provider objects.

Body

The body will be an array, where each object represents a single provider account.

[
  {
    "_id": "PRO_1593258024120000123",
    "name": "Quantum GPU Cloud",
    "email": "[email protected]",
    "phone": "+1-555-123-4567",
    "api_key": "a5b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1",
    "instance_limit": 20,
    "retention_month": 12,
    "is_active": true,
    "registered_at": "2024-05-15T12:00:00.123Z"
  },
  {
    "_id": "PRO_963658796216303000456",
    "name": "AI Farms",
    "email": "[email protected]",
    "phone": "+1-555-987-6543",
    "api_key": "6b7c8d9e0f1a2b3c4c6d7e8f9a0b1d5e6f7a8b9c0d1a5b1c2d3e4f5ae2f3a4b5",
    "instance_limit": 10,
    "retention_month": 6,
    "is_active": true,
    "registered_at": "2024-05-18T09:30:00.456Z"
  },
  .... and similar all other providers info
]

Field Descriptions:

FieldTypeDescription
_idstringThe provider's unique ID.
namestringThe provider's registered name.
emailstringThe provider's contact email.
phonestringThe provider's contact phone number.
api_keystringThe provider's Hashed API key. (Sensitive data, Super Admin view only).
instance_limitintegerThe maximum number of instances this provider can list.
retention_monthintegerThe number of months instances are kept before auto-deletion.
is_activebooleanThe status of the provider's account.
registered_atstringThe ISO 8601 timestamp of when the provider registered.

❌ Error Response (401 Unauthorized)

This response is returned if the x-api-key header is missing or invalid.

Body

{
  "error": "Unauthorized Access"
}

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


❌ Error Response (500 Internal Server Error)

This response indicates a problem on the server, such as a database connection error.

Body

{
  "error": "A database error occurred",
  "details": "Specific error message from the database driver."
}