Skip to content

Thing API Documentation

jholt456 edited this page Jun 16, 2012 · 27 revisions

Get a List of Things

Gets all things in the team thing system

End point
GET /api/thing
Example

Request Parameters
None

Response
Returns an array of things

[{"id":3,
  "description":"Get the team ready",
  "isStarred":false,
  "status":"InProgress",
  "dateCreated":"2012-03-23T17:40:06.527",
  "owner":{"id":10,
           "imagePath":"/images/GenericUserImage.gif",
           "emailAddress":"holt@telerik.com"},
  "team":{"name":"A-Team",
          "id":2,
          "ownerId":10,
          "administrators":[],
          "isPublic":false,
          "imagePath":"/images/GenericUserImage.gif"},
   "assignedTo":[{"id":18,
                  "imagePath":"http://teamthing.apphb.com:16167/images/GenericUserImage.gif",
                  "emailAddress":"demo@demo.com"}]},
 {"id":4,
  "description":"vcdfasdfasdf",
  "isStarred":false,
  "status":"InProgress",
  "dateCreated":"2012-03-27T13:03:44.317",
  "owner":{"id":10,
           "imagePath":"/images/GenericUserImage.gif",
           "emailAddress":"holt@telerik.com"},
  "team":{"name":"A Sweet Team",
          "id":20,
          "ownerId":10,
          "administrators":[10],
          "isPublic":false,
          "imagePath":"/images/GenericUserImage.gif"},
  "assignedTo":[{"id":18,
                 "imagePath":"http://teamthing.apphb.com:16167/images/GenericUserImage.gif",
                 "emailAddress":"demo@demo.com"}]}]

Get a Thing

Get the thing with the specified thingId

End point
GET api/thing/{thingId}
Example

Request Parameters
None

Response
Returns a single thing and all associated data

{"id":3,
 "description":"Get the team ready",
 "isStarred":false,
 "status":"InProgress",
 "dateCreated":"2012-03-23T17:40:06.527",
 "owner":{"id":10,
          "imagePath":"/images/GenericUserImage.gif",
          "emailAddress":"holt@telerik.com"},
 "team":{"name":"A-Team",
         "id":2,
         "ownerId":10,
         "administrators":[],
         "isPublic":false,
         "imagePath":"/images/GenericUserImage.gif"},
         "assignedTo":[{"id":18,
                        "imagePath":"http://teamthing.apphb.com:16167/images/GenericUserImage.gif",
                        "emailAddress":"demo@demo.com"}]}

Create a Thing

Create a new thing in the team thing application.

End point
POST api/thing

Request Parameters
* = Required
*createdById : int ex: 2 (current user id usually)
description : string ex: "My New Thing"
*assignedTo : int array ex: [5,6]
*teamId : int ex: 5

Example Request

{"CreatedById":5,
 "Description":"My New Thing", 
 "AssignedTo":[5,6], 
 "teamId":10}

Response

{"id":30,
 "description":"My New Thing",
 "isStarred":false,
 "status":"InProgress",
 "dateCreated":"2012-06-15T17:40:06.527",
 "owner":{"id":2,
          "imagePath":"/images/GenericUserImage.gif",
          "emailAddress":"holt@telerik.com"},
 "team":{"name":"A-Team",
         "id":5,
         "ownerId":10,
         "administrators":[],
         "isPublic":false,
         "imagePath":"/images/GenericUserImage.gif"},
         "assignedTo":[{"id":18,
                        "imagePath":"http://teamthing.apphb.com:16167/images/GenericUserImage.gif",
                        "emailAddress":"demo@demo.com"}]}

Delete a Thing

Deletes the thing with the specified thingId from the team thing application.

End point
DELETE api/thing/{thingId}

Request Parameters
* = Required
*deletedById : int

Response
204 Indicates Success

Clone this wiki locally