-
Notifications
You must be signed in to change notification settings - Fork 198
API : Items
jimsafley edited this page May 17, 2013
·
16 revisions
Return data about the specified item.
GET /items/:id
{
"id": 1,
"url": "/items/1",
"item_type": {"id": 1, "url": "/item_types/1", "name": "Text"},
"collection": {"id": 1, "url": "/collections/1"},
"owner": {"id": 1, "url": "/users/1"},
"public": true,
"featured": false,
"added": "2013-03-27T08:17:37+00:00",
"modified": "2013-04-21T15:05:07+00:00",
"files": {"count": 100, "url": "/files?item=1"},
"element_texts": [
{
"html": false,
"text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
"element_set": {"id": 1, "url": "/element_sets/1", "name": "Dublin Core"},
"element": {"id": 1, "url": "/elements/1", "name": "Title"}
}
]
}
Return data about items.
GET /items
- collection: integer
- item_type: integer
- featured: boolean
- public: boolean
- added_since: string (ISO 8601)
- modified_since: string (ISO 8601)
- owner (user): integer
An array of item objects (see above).
Create a new item.
POST /items
{
"item_type": {"id": 1},
"collection": {"id": 1},
"public": true,
"featured": false,
"element_texts": [
{
"html": false,
"text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
"element": {"id": 1}
}
]
}
An item object (see above).