Get API List for Services

Each service can contain one or more API endpoints. Through this interface, you can obtain a list of all APIs under a specific service, including detailed information such as the name, path, OpenAPI definition, pricing rules, etc.

This interface does not require authentication.

Interface Description

  • Request Method: GET
  • Request URL: https://platform.acedata.cloud/api/v1/services/{id_or_alias}/apis/
  • Request Headers:
    • accept: application/json

Where {id_or_alias} can be the UUID or alias of the service.

Query Parameters

Parameter Type Required Description
limit integer No Number of items per page, default 10
offset integer No Offset, default 0

CURL Request Example

curl -X GET \
  -H "accept: application/json" \
  "https://platform.acedata.cloud/api/v1/services/midjourney/apis/"

Example of Returned Result

{
  "count": 5,
  "results": [
    {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "name": "Midjourney Imagine",
      "title": "Midjourney Imagine",
      "path": "/v1/midjourney/imagine",
      "path2": null,
      "stage": "Production",
      "cost": [...],
      "definition": {
        "openapi": "3.0.1",
        "info": {"title": "Midjourney Imagine API"},
        "paths": {...}
      },
      "visible_models": null,
      "service_id": "d87e5e99-b797-4ade-9e73-b896896b0461",
      "document_id": "xxxx-xxxx",
      "created_at": "2024-01-01T00:00:00.000000Z",
      "updated_at": "2024-08-01T00:00:00.000000Z"
    }
  ]
}

Explanation of Returned Fields

Field Type Description
id string Unique identifier for the API (UUID)
name string API name
title string API title
path string API path (main path), e.g., /v1/midjourney/imagine
path2 string API alternative path
stage string Release stage: Alpha / Beta / Production
cost array Pricing rules (in JsonLogic format)
definition object OpenAPI specification definition (including request parameters and response format)
visible_models array List of visible models (only valid for LLM type APIs)
service_id string ID of the associated service
document_id string Associated document ID

Code Example

Python:

import requests

url = "https://platform.acedata.cloud/api/v1/services/midjourney/apis/"
headers = {"accept": "application/json"}

response = requests.get(url, headers=headers)
data = response.json()

for api in data["results"]:
    print(f"API: {api['name']} - Path: {api['path']} - Stage: {api['stage']}")