GET https://apis.wso2.com/api/am/store/v0.13/apis/{apiId}/documents/{documentId}/content
This operation can be used to retrive the content of an API's document. The document can be of 3 types. In each cases responses are different. 1. **Inline type**: The content of the document will be retrieved in `text/plain` content type 2. **FILE type**: The file will be downloaded with the related content type (eg. `application/pdf`) 3. **URL type**: The client will recieve the URL of the document as the Location header with the response with - `303 See Other` `X-WSO2-Tenant` header can be used to retrive the content of a document of an API that belongs to a different tenant domain. If not specified super tenant will be used. If Authorization header is present in the request, the user's tenant associated with the access token will be used. **NOTE:** * This operation does not require an Authorization header by default. But in order to see a restricted API's document content, you need to provide Authorization header.
Not required
GET https://localhost:9443/api/am/store/v0.13/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b/documents/0bcb7f05-599d-4e1a-adce-5cb89bfe58d5/content
HTTP/1.1 200 OK
Content-Disposition: attachment; filename="sample.pdf"
Content-Type: application/octet-stream
Content-Length: 7802
%PDF-1.4
%äüöß
2 0 obj
<</Length 3 0 R/Filter/FlateDecode>>
stream
..
>>
startxref
7279
%%EOF
curl "https://localhost:9443/api/am/store/v0.13/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b/documents/0bcb7f05-599d-4e1a-adce-5cb89bfe58d5/content" > sample.pdf
curl -k -H "X-WSO2-Tenant:test.com" "https://localhost:9443/api/am/store/v0.13/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b/documents/0bcb7f05-599d-4e1a-adce-5cb89bfe58d5/content" > sample.pdf
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Path |
apiId required |
**API ID** consisting of the **UUID** of the API. Using the **UUID** in the API call is recommended. The combination of the provider of the API, name of the API and the version is also accepted as a valid API ID. Should be formatted as **provider-name-version**. |
String | |
Path |
documentId required |
Document Identifier |
String | |
Header |
X-WSO2-Tenant optional |
For cross-tenant invocations, this is used to specify the tenant domain, where the resource need to be retirieved from. |
String | |
Header |
Accept optional |
Media types acceptable for the response. Default is application/json. |
String |
application/json |
Header |
If-None-Match optional |
Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resource. |
String | |
Header |
If-Modified-Since optional |
Validator for conditional requests; based on Last Modified header of the formerly retrieved variant of the resource (Will be supported in future). |
String |
HTTP Code | Description | Schema |
---|---|---|
200 |
OK. File or inline content returned. |
|
303 |
See Other. Source can be retrived from the URL specified at the Location header. |
|
304 |
Not Modified. Empty body because the client has already the latest version of the requested resource. |
|
404 |
Not Found. Requested Document does not exist. |
Error |
406 |
Not Acceptable. The requested media type is not supported |
Error |
GET https://apis.wso2.com/api/am/store/v0.13/apis/{apiId}/documents/{documentId}
This operation can be used to retrieve a particular document's metadata associated with an API. `X-WSO2-Tenant` header can be used to retrive a document of an API that belongs to a different tenant domain. If not specified super tenant will be used. If Authorization header is present in the request, the user's tenant associated with the access token will be used. **NOTE:** * This operation does not require an Authorization header by default. But in order to see a restricted API's document, you need to provide Authorization header.
Not required
GET https://localhost:9443/api/am/store/v0.13/apis/c43a325c-260b-4302-81cb-768eafaa3aed/documents/850a4f34-db2c-4d23-9d85-3f95fbfb082c
HTTP/1.1 200 OK
Content-Type: application/json
{
"sourceType": "INLINE",
"sourceUrl": null,
"otherTypeName": null,
"documentId": "850a4f34-db2c-4d23-9d85-3f95fbfb082c",
"summary": "This is a sample documentation for v1.0.0",
"name": "PhoneVerification API Documentation",
"type": "HOWTO"
}
curl "https://localhost:9443/api/am/store/v0.13/apis/c43a325c-260b-4302-81cb-768eafaa3aed/documents/850a4f34-db2c-4d23-9d85-3f95fbfb082c"
curl -k -H "X-WSO2-Tenant:test.com" https://localhost:9443/api/am/store/v0.13/apis/c43a325c-260b-4302-81cb-768eafaa3aed/documents/850a4f34-db2c-4d23-9d85-3f95fbfb082c
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Path |
apiId required |
**API ID** consisting of the **UUID** of the API. Using the **UUID** in the API call is recommended. The combination of the provider of the API, name of the API and the version is also accepted as a valid API ID. Should be formatted as **provider-name-version**. |
String | |
Path |
documentId required |
Document Identifier |
String | |
Header |
X-WSO2-Tenant optional |
For cross-tenant invocations, this is used to specify the tenant domain, where the resource need to be retirieved from. |
String | |
Header |
Accept optional |
Media types acceptable for the response. Default is application/json. |
String |
application/json |
Header |
If-None-Match optional |
Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resource. |
String | |
Header |
If-Modified-Since optional |
Validator for conditional requests; based on Last Modified header of the formerly retrieved variant of the resource (Will be supported in future). |
String |
HTTP Code | Description | Schema |
---|---|---|
200 |
OK. Document returned. |
Document |
304 |
Not Modified. Empty body because the client has already the latest version of the requested resource. |
|
404 |
Not Found. Requested Document does not exist. |
Error |
406 |
Not Acceptable. The requested media type is not supported |
Error |