Skip to content

Instantly share code, notes, and snippets.

@mjlassila
Created October 16, 2017 07:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mjlassila/2856fa72a7bbdb4b46c17696e1774ff8 to your computer and use it in GitHub Desktop.
Save mjlassila/2856fa72a7bbdb4b46c17696e1774ff8 to your computer and use it in GitHub Desktop.
Using Omeka S Pages API

Endpoint:

http://[site-address]/api/site_pages?key_identity=your-identity&key_credential=your-credential

One can build a complete site using the API, eg. starting first at

http://[...]/api/sites

{
"o:slug": "example-page-1234",
"@type": "o:SitePage",
"o:site": {
"@id": "http://omekas:8888/api/sites/2",
"o:id": 2
},
"o:title": "Example page 1234",
"o:block": [
{
"o:layout": "pageTitle",
"o:data": [
],
"o:attachment": [
]
},
{
"o:layout": "html",
"o:data": {
"html": "<p>This is an example</p>\r\n"
},
"o:attachment": [
]
},
{
"o:layout": "browsePreview",
"o:data": {
"query": "item_set_id[]=1035",
"heading": "Some items",
"link-text": "Browse our stuff"
},
"o:attachment": [
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment