Kinds
The item “kind” describes the type of the item. Frequently used item kinds are:
- office, domainoffice: a “Group” eg. collection of items
- startpage, domainstartpage: menu item stub
- wallmessage: short status message posted on the newsfeed
- document: downloadable documents
- note: html text
- bookmark: hyperlink and description
- folder, dossier: folders to put other items in
- forum, question, poll:
- response, reply, comment, pollvote: replies to other items
- file, advancedlink: attachments to other items
- todo, milestone: tasks and stages
GET
The GET method returns the item with the given id and its children (recursively) .This example shows the JSON result for a folder with some content in it:
GET projecten.viadesk.com/api/item.json?id=407565-6…
&depth=1 // include children n levels deep (optional, default is zero)
&includeUsers=true // optional, defaul is true
&includeVersions=true // optional, default is false
&includeLogs=true // optional, default is false
reponse body:
{
"id": "407565-666f6c646572",
"name": "API Documents", // the folder name
"kind": "folder", // this item is a “folder”
"canWrite": true, // user may rename or delete this folder
"canAddChildren": true, // user may add document to this folder
"created": "2011-05-01T21:45:15CEST"
"modified": "2011-05-01T21:45:15CEST",
"replyCount": 4,
"office": { // this office where this item resides:
"name": "Mobile Development",
"id": "407102-6f6666696365"
},
"children": [
{
"id": "426287-646f63756d656e74",
"kind": "document", // this item is a “document”
"name": "Viadesk Api.pdf",
"size": 456596, // the file size
"canWrite": true,
"canAddChildren": true,
"created": "2012-02-01T16:49:34CET",
"modified": "2012-02-01T16:49:34CET",
"author": { // compact representation of user object:
"name": "Marc Leidner",
"id": "6180-75736572",
"email": "marc@viadesk.nl",
"thumbnailUrl": "projecten.viadesk.com/thumbnail/393836-75736572…"
}
} etc.
This example shows a document item and its replies:
GET projecten.viadesk.com/api/item?id=422959-646f63…
response body:
{
"id": "422959-646f63756d656e74",
"name": "Navigation incl groups (versie 3).pdf",
"kind": "document",
"size": 976949,
"canWrite": true,
"canAddChildren": true, // the user may add comments to this document
"created": "2011-11-16T12:12:35CET",
"modified": "2011-11-16T12:12:35CET",
"author": {
"name": "Paul Janssen",
"id": "6200-75736572",
"email": "paul@viadesk.nl",
"thumbnailUrl": "projecten.viadesk.com/thumbnail/119025-75736572…"
}
"diggsPositive": 2, // number of users who “like” this document
"replyCount": 3, // number of replies to this document
"children": [
{
"id": "423027-726573706f6e7365",
"kind": "response", // this item is a “response”
"body": "Blah blah blah", // the comment body
"canWrite": true,
"canAddChildren": true,
"created": "2011-11-16T16:23:45CET",
"modified": "2011-11-16T16:24:02CET",
"author": {
"name": "Paula Janssen",
"id": "6200-75736572",
"email": "paula@viadesk.nl",
"thumbnailUrl": "projecten.viadesk.com/thumbnail/119025-75736572…"
}
} etc.