-
Notifications
You must be signed in to change notification settings - Fork 197
API : Item Types
jimsafley edited this page Jun 3, 2013
·
7 revisions
Return data about the specified item type.
GET /item_types/:id
{
"id": 1,
"url": "/item_types/1",
"name": "Text",
"description": "A resource consisting primarily of words for reading.",
"elements": [
{"id": 1},
{"id": 2},
{"id": 3}
],
"items": {"count": 100, "url": "/items?item_type=1"}
}
Return data about item types.
GET /item_types
- name: string
An array of JSON item type representations (see above).
Create a new item type.
POST /item_types
{
"name": "Text",
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
"elements": [
{"id": 1},
{"id": 2},
{"id": 3}
]
}
Location: http://yourdomain.com/api/item_types/:id
An JSON representation of the newly created item type (see above).
Edit an existing item type.
PUT /item_types/:id
{
"name": "Text",
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
"elements": [
{"id": 1},
{"id": 2},
{"id": 3}
]
}
An JSON representation of the newly edited item type (see above).
Delete an item type.
DELETE /item_types/:id
An 204 No Content
response.