Portal
The Portal, the site’s front page: read it, edit its draft and publish it, upload its images, and list the public catalogue.
The page.
application/json- response
meta?The copyright and name of the platform.
data?curl -X GET "https://platform.example.com/api/portal"{ "meta": {}, "data": { "header": { "title": { "th": "string", "en": "string" }, "subtitle": { "th": "string", "en": "string" }, "logo": "string" }, "blocks": [ { "id": "string", "kind": "map", "visibility": "everyone" } ], "publicAccess": { "enabled": true }, "publishedAt": "2019-08-24T14:15:22Z" }}keyword?stringWords to look for in the name and the description.
types?stringKinds of Item, comma separated: databaseItem, webMap, form, application, file, webService. The default is the first four.
folder?stringOnly what is directly in this folder (its id).
skip?integerHow many to leave out first. The default is 0.
limit?integerHow many to return, 1 to 100. The default is 20.
One page of the catalogue.
application/json- response
meta?The copyright and name of the platform.
data?curl -X GET "https://platform.example.com/api/portal/catalog"{ "meta": {}, "data": { "total": 0, "items": [ { "_id": "string", "name": "string", "description": "string", "type": "string", "subtype": "string", "owner": "string", "lastModified": "2019-08-24T14:15:22Z" } ] }}AuthorizationBearer <token>An access token of an OAuth client: Authorization: Bearer <token>.
The draft.
application/json- response
meta?The copyright and name of the platform.
data?curl -X GET "https://platform.example.com/api/portal/draft" \ -H "Authorization: Bearer $TOKEN"{ "meta": {}, "data": { "header": { "title": { "th": "string", "en": "string" }, "subtitle": { "th": "string", "en": "string" }, "logo": "string" }, "draft": { "blocks": [ { "id": "string", "kind": "map", "visibility": "everyone" } ], "updatedAt": "2019-08-24T14:15:22Z", "updatedBy": "string" }, "published": { "publishedAt": "2019-08-24T14:15:22Z", "publishedBy": "string" }, "unpublishedChanges": true }}AuthorizationBearer <token>An access token of an OAuth client: Authorization: Bearer <token>.
application/json- body
header?The title, subtitle and logo of the site.
blocks*array<>The blocks, top to bottom.
The draft as it is now stored.
application/json- response
meta?The copyright and name of the platform.
data?curl -X PUT "https://platform.example.com/api/portal/draft" \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "blocks": []}'{ "meta": {}, "data": { "header": { "title": { "th": "string", "en": "string" }, "subtitle": { "th": "string", "en": "string" }, "logo": "string" }, "draft": { "blocks": [ { "id": "string", "kind": "map", "visibility": "everyone" } ], "updatedAt": "2019-08-24T14:15:22Z", "updatedBy": "string" }, "published": { "publishedAt": "2019-08-24T14:15:22Z", "publishedBy": "string" }, "unpublishedChanges": true }}AuthorizationBearer <token>An access token of an OAuth client: Authorization: Bearer <token>.
multipart/form-data- body
image*fileThe image file.
binaryThe file.
application/json- response
meta?The copyright and name of the platform.
data?curl -X POST "https://platform.example.com/api/portal/images" \ -H "Authorization: Bearer $TOKEN"{ "meta": {}, "data": { "file": "string", "url": "string" }}AuthorizationBearer <token>An access token of an OAuth client: Authorization: Bearer <token>.
The draft, which now equals the published page.
application/json- response
meta?The copyright and name of the platform.
data?curl -X POST "https://platform.example.com/api/portal/publish" \ -H "Authorization: Bearer $TOKEN"{ "meta": {}, "data": { "header": { "title": { "th": "string", "en": "string" }, "subtitle": { "th": "string", "en": "string" }, "logo": "string" }, "draft": { "blocks": [ { "id": "string", "kind": "map", "visibility": "everyone" } ], "updatedAt": "2019-08-24T14:15:22Z", "updatedBy": "string" }, "published": { "publishedAt": "2019-08-24T14:15:22Z", "publishedBy": "string" }, "unpublishedChanges": true }}