Downloads a FILE type document/get the inline content or source url of a certain document.
http://apis.wso2.com/api/appm/publisher/v1.1/apps/{appType}/id/{appId}/docs/{documentId}/content
GET
appm:read
curl -X GET -H "Authorization: Bearer 637084f12e5f93b8c4e7a8d7307635ab" "http://localhost:9763/api/appm/publisher/v1.1/apps/webapp/id/927068ec-300a-4503-89fc-ef5ebc41a7db/docs/6777080d-99eb-402b-aadc-a00a17e178c3/content" > sample.pdf
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
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Path |
appId required |
**APP ID** consisting of the **UUID** of the App. The following combination is also accepted as a valid APP ID: the provider of the app, name of the app and the version. Should be formatted as **provider-name-version**. |
String | |
Path |
documentId required |
Document UUID. |
String | |
Path |
appType required |
The App type (either Webapp/Mobile app). |
String | |
Header |
Accept optional |
Media types acceptable for the response. Default is JSON. |
String |
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 the Last Modified header of the formerly retrieved variant of the resource. |
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 |
Update document details.
http://apis.wso2.com/api/appm/publisher/v1.1/apps/{appType}/id/{appId}/docs/{documentId}
PUT
appm:create
curl -k -H "Authorization:Bearer b0982cd2aacd463ff5f63cd5ebe58f4a" -H "Content-Type: application/json" -X PUT -d data.json "http://localhost:9763/api/appm/publisher/v1.1/apps/webapp/id/a7a7dacc-8a1c-428e-930d-d181f60f14bd/docs/4cbbafc6-2327-49fc-9c3f-34ea36599091"
{
"sourceType": "INLINE",
"sourceUrl": null,
"otherTypeName": null,
"documentId": "0bcb7f05-599d-4e1a-adce-5cb89bfe58d5",
"summary": "This is a sample documentation for v1.0.0",
"name": "PhoneVerification Documentation",
"type": "HOWTO"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"visibility": "API_LEVEL",
"sourceType": "INLINE",
"sourceUrl": null,
"otherTypeName": null,
"documentId": "0bcb7f05-599d-4e1a-adce-5cb89bfe58d5",
"summary": "This is a sample documentation for v1.0.0",
"name": "PhoneVerification Documentation",
"type": "HOWTO"
}
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Path |
appId required |
**APP ID** consisting of the **UUID** of the App. The following combination is also accepted as a valid APP ID: the provider of the app, name of the app and the version. Should be formatted as **provider-name-version**. |
String | |
Path |
documentId required |
Document UUID. |
String | |
Path |
appType required |
The App type (either Webapp/Mobile app). |
String | |
Body |
body required |
Document object that needs to be added |
Document (Document) | |
Header |
Content-Type required |
Media type of the entity in the body. Default is JSON. |
String |
JSON |
Header |
If-Match optional |
Validator for conditional requests; based on the ETag. |
String | |
Header |
If-Unmodified-Since optional |
Validator for conditional requests; based on the Last Modified header. |
String |
HTTP Code | Description | Schema |
---|---|---|
200 |
OK. Document updated |
Document |
400 |
Bad Request. Invalid request or validation error. |
Error |
404 |
Not Found. The resource to be updated does not exist. |
Error |
412 |
Precondition Failed. The request has not been performed because one of the preconditions is not met. |
Error |