Document (Collection)


Get a list of documents of an API

GET https://apis.wso2.com/api/am/store/v0.13/apis/{apiId}/documents

This operation can be used to retrive a list of documents belonging to an API by providing the id of the API. `X-WSO2-Tenant` header can be used to retrive documents 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 documents, you need to provide Authorization header.

OAuth 2.0 Scope

Not required

Request

GET https://localhost:9443/api/am/store/v0.13/apis/c43a325c-260b-4302-81cb-768eafaa3aed/documents

Response

HTTP/1.1 200 OK Content-Type: application/json { "previous": "", "list": [ { "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" }, { "sourceType": "URL", "sourceUrl": "http://wiki.cdyne.com/index.php/Phone_Verification", "otherTypeName": null, "documentId": "98e18be8-5861-43c7-ba26-8cbbccd3a76f", "summary": "This is the URL for online documentation", "name": "Online Documentation", "type": "SAMPLES" }, { "sourceType": "FILE", "sourceUrl": null, "otherTypeName": null, "documentId": "b66451ff-c6c2-4f6a-b91d-3821dc119b04", "summary": "This is a sample documentation pdf", "name": "Introduction to PhoneVerification API PDF", "type": "HOWTO" } ], "count": 3, "next": "" }

Sample CURL

curl https://localhost:9443/api/am/store/v0.13/apis/c43a325c-260b-4302-81cb-768eafaa3aed/documents

Sample CURL - for tenant

curl -k -H "X-WSO2-Tenant:test.com" https://localhost:9443/api/am/store/v0.13/apis/c43a325c-260b-4302-81cb-768eafaa3aed/documents

Parameters

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

Query

limit

optional

Maximum size of resource array to return.

Integer

25

Query

offset

optional

Starting point within the complete list of items qualified.

Integer

0

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

Responses

HTTP Code Description Schema

200

OK. Document list is returned.

DocumentList

304

Not Modified. Empty body because the client has already the latest version of the requested resource (Will be supported in future).

404

Not Found. Requested API does not exist.

Error

406

Not Acceptable. The requested media type is not supported

Error