Uploading document files against an App.
http://apis.wso2.com/api/appm/publisher/v1.1/apps/{appType}/id/{appId}/docs/{documentId}/content
POST
appm:create
curl -X POST -H "Authorization: Bearer 0c28ea242609cdbaef56c80452e0c843" -H "Content-Type: multipart/form-data" -F "file=@@sample.pdf" "http://localhost:9763/api/appm/publisher/v1.1/apps/webapp/id/a7a7dacc-8a1c-428e-930d-d181f60f14bd/docs/6d47f5d5-f046-47e9-a65d-6eb50d5cd05e/content"
HTTP/1.1 200 OK
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Path |
appType required |
The App type (either Webapp/Mobile app). |
String | |
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 | |
Form |
file optional |
Document to be uploaded. |
file | |
Form |
inlineContent optional |
Inline content of the document. |
String | |
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 uploaded successfully. |
StaticContent |
400 |
Bad Request. Invalid request or validation error. |
Error |
404 |
Not Found. Requested entity does not exist. |
Error |
Retrieving the document.
http://apis.wso2.com/api/appm/publisher/v1.1/apps/{appType}/id/{appId}/docs/{documentId}
GET
appm:read
curl -X GET -H "Authorization: Bearer 4fc0a364a336a37c663790364da307a3" "http://localhost:9763/api/appm/publisher/v1.1/apps/webapp/id/a7a7dacc-8a1c-428e-930d-d181f60f14bd/docs/6d47f5d5-f046-47e9-a65d-6eb50d5cd05e"
HTTP/1.1 200 OK
Content-Type: application/json
{
"sourceType": "INLINE",
"sourceUrl": null,
"otherTypeName": null,
"documentId": "0bcb7f05-599d-4e1a-adce-5cb89bfe58d5",
"summary": "This is a sample documentation",
"name": "PhoneVerification API Documentation",
"type": "HOWTO"
}
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Path |
appType required |
The App type (either Webapp/Mobile app). |
String | |
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 | |
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 retrieved successfully. |
file |
400 |
Bad Request. Invalid request or validation error. |
Error |
404 |
Not Found. Requested entity does not exist. |
Error |
412 |
Precondition Failed. The request has not been performed because one of the preconditions is not met. |
Error |
Add a new document to an API
http://apis.wso2.com/api/appm/publisher/v1.1/apps/{appType}/id/{appId}/docs
POST
appm:create
curl -H "Authorization: Bearer 4fc0a364a336a37c663790364da307a3" -H "Content-Type:application/json" -X POST -d @data.json "http://localhost:9763/api/appm/publisher/v1.1/apps/webapp/id/0950b09c-0afe-47f2-88d6-72e9b88b1931/docs"
{
"sourceType": "INLINE",
"sourceUrl": null,
"otherTypeName": null,
"summary": "This is a sample documentation",
"name": "Introduction to PhoneVerification API",
"type": "HOWTO"
}
HTTP/1.1 201 Created Content-Type: application/json
{
"sourceType": "INLINE",
"sourceUrl": null,
"otherTypeName": null,
"documentId": "ffd5790d-b7a9-4cb6-b76a-f8b83ecdd058",
"summary": "This is a sample documentation",
"name": "Introduction to PhoneVerification API",
"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 |
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 |
HTTP Code | Description | Schema |
---|---|---|
201 |
Created. Successful response with the newly created document object as the entity in the body. Location header contains the URL of the newly added document. |
Document |
400 |
Bad Request. Invalid request or validation error. |
Error |
415 |
Unsupported media type. The entity of the request was in an unsupported format. |