Skip to content
Richard Thombs edited this page Oct 16, 2016 · 17 revisions

Note: This API is under development and may change without notice.

Managing Item Lists

  1. List all Item Lists
  2. Get an Item List
  3. Update an Item List
  4. Delete an Item List
  5. Create a new Item List
  6. Create a new version of an existing Item List

Managing Item List contents

  1. Search for Items
  2. Get an Item
  3. Update an Item
  4. Create an Item
  5. Delete an Item

List the Item Lists in a Project

GET /api/projects/:pid/itemlists

Returns an array of all the Item Lists in the specified Project. Only the latest version of each Item List is returned.

Get an Item List

GET /api/projects/:pid/itemlists/:id

Retrieves a specific Item List.

Response

{
  ItemListID: 1,    // The Item List's unique ID
  Name: 'My list',  // The Item List's name
  Version: 1        // The Item List's version number
}

Update an existing Item List

PUT /api/projects/:pid/itemlists/:id

Updates the properties of an existing Item List

Request body

{
  Name: 'My list',         // The name of the Item List
  VariesByAttributeID: 99  // The Target AttributeID that defines the categories that this Item List varies by
}

Note: Once an Item List has been defined as variable and activated for the first time, it is not possible to switch it between normal and variable by changing the VariesByAttributeID.

Delete an existing Item List

DELETE /api/projects/:pid/itemlists/:id

Deletes the specified Item List.

Note: It is not possible to delete active Item Lists.

Create a new Item List

POST /api/projects/:pid/itemlists

Creates an entirely new Item List.

Request body

{
  Name: 'My item list',     // The name of the Item List
  VariesByAttributeID: null // The Target Attribute ID that this Item List will vary by, or null otherwise
}

Create a new version of an existing Item List

POST /api/projects/:pid/itemlists/:id?[empty=true]

Creates a new version of an existing Item List, optionally copying the contents.

Request parameters

empty - If true then the new version will be created empty. If false then the contents of the original Item List will be copied into the new version.

Managing Item List contents

Search for Items

GET /api/projects/:pid/itemlists/:lid/items

TODO

Get an Item

GET /api/projects/:pid/itemlists/:lid/items/:id

Update an Item

PUT /api/projects/:pid/itemlists/:lid/items/:id

Create an Item

POST /api/projects/:pid/itemlists/:lid/items

TODO

Note: It is not possible to modify the contents of active Item Lists.

Delete an Item

DELETE /api/projects/:pid/itemlists/:lid/items/:id

Deletes an Item from an Item List.

Note: It is not possible to modify the contents of active Item Lists.

Clone this wiki locally