Skip to content

API : Element Sets

jimsafley edited this page Jun 3, 2013 · 4 revisions

GET element set

Return data about the specified element set:

Request

GET /element_sets/:id

Response

{
  "id": 1,
  "url": "http://yourdomain.com/api/element_sets/1",
  "record_type": null,
  "name": "Dublin Core",
  "description": "The Dublin Core metadata element set is common to all Omeka records.",
  "elements": {"count": 100, "url": "http://yourdomain.com/api/elements?element_set=1"}
}

GET element sets

Return data about element sets:

Request

GET /element_sets

Parameters

  • name: string
  • record_type: string

Response

An array of JSON element set representations (see above).

POST element set

Create a new element set.

Request

POST /element_sets
{
  "name": "Dublin Core",
  "description": "The Dublin Core metadata element set is common to all Omeka records."
}

Response

Location: http://yourdomain.com/api/element_sets/:id

An JSON representation of the newly created element set (see above).

PUT element set

Edit an existing element set.

Request

PUT /element_sets/:id
{
  "name": "Dublin Core",
  "description": "The Dublin Core metadata element set is common to all Omeka records."
}

Response

An JSON representation of the newly edited element set (see above).

DELETE element set

Delete an element set. "Dublin Core" and "Item Type Metadata" element sets may not be deleted.

Request

DELETE /element_sets/:id

Response

An 204 No Content response.