Get Document Details
By document ID or alias, you can retrieve the complete content of a specific document. This is the most commonly used interface in the platform's document system.
This interface does not require authentication.
¶ Interface Description
- Request Method: GET
- Request URL:
https://platform.acedata.cloud/api/v1/documents/{id_or_alias}/ - Request Headers:
- accept:
application/json
- accept:
Where {id_or_alias} can be the document's UUID or the document's alias.
¶ CURL Request Example
Query by alias:
curl -X GET \
-H "accept: application/json" \
"https://platform.acedata.cloud/api/v1/documents/application-remaining-amount/"
Query by UUID:
curl -X GET \
-H "accept: application/json" \
"https://platform.acedata.cloud/api/v1/documents/a1f01bb1-604f-4a33-9b2e-d28d067fe5a3/"
¶ Return Result Example
{
"id": "a1f01bb1-604f-4a33-9b2e-d28d067fe5a3",
"alias": "application-remaining-amount",
"title": "Remaining Amount Inquiry",
"type": "Text",
"content": "# Ace Data Cloud Platform Remaining Amount Inquiry\n\n...",
"rank": 83483,
"private": false,
"api_id": null,
"proxy_id": null,
"dataset_id": null,
"integration_id": null,
"parent_id": "81b11994-539e-4af3-b631-f6c9d4c9cccf",
"sibling_id": null,
"tags": null,
"metadata": null,
"created_at": "2024-01-01T00:00:00.000000Z",
"updated_at": "2024-08-01T00:00:00.000000Z"
}
¶ Applicable Scenarios
This interface is suitable for:
- Retrieving API Document Content: Obtain specific API usage documentation by document alias.
- Building Document Pages: Frontend pages retrieve corresponding document content and render it via alias routing.
- Document Search: First search for documents through the list interface, then use this interface to get complete content.
¶ Document Alias and Page Routing
Each document has a unique alias, corresponding to the page routing on the platform:
https://platform.acedata.cloud/documents/{alias}
For example:
https://platform.acedata.cloud/documents/application-remaining-amounthttps://platform.acedata.cloud/documents/midjourney
¶ Code Example
Python:
import requests
# Get document by alias
alias = "application-remaining-amount"
url = f"https://platform.acedata.cloud/api/v1/documents/{alias}/"
headers = {"accept": "application/json"}
response = requests.get(url, headers=headers)
doc = response.json()
print(f"Title: {doc['title']}")
print(f"Type: {doc['type']}")
print(f"Content:\n{doc['content'][:500]}...")
