Skip to content

Situation

irrecs edited this page Nov 19, 2013 · 10 revisions

Base URL: api/dime/rest/{mainSaId}/situation

Method Path Description
GET @me/@all Returns a collection of all the situations of the user.
POST @me Creates a new situation
POST @me/{situationId} Updates a specific situation (also for activate/deactivate the situation)
DELETE @me/{situationId} Deletes a specific situation

Examples:

  • Call: api/dime/rest/5b223cde-07e5-4987-b531-231876fa7601/situation/@me/@all
  • Response:
{
   "response":{
      "meta":{
         "v":"0.9",
         "status":"OK",
         "code":200,
         "timeRef":"2011-08-30T15:01:59+02:00",
         "msg": ""
   },
   "data":{
      "startIndex":0,
      "itemsPerPage":1,
      "totalResults":1,
      "entry": {
        "guid": "<situationId>",
        "lastModified":1338824999
        "created": 1338824999,
       "nao:score": 0,
       "name": "Attending Conference",
       "userId":"<userId>|@me",
       "imageUrl": "imageUrl or null",
       "type": "situation",
       "contextElements": [
           {  guid: ..., type: "dcon:currentActivity", label:"Activity", name:"Working", dcon:weight: 0.5, dcon:isRequired: false, dcon:isExcluder: false},
           {  guid: ..., type: "dcon:currentPlace", label:"Current Place", name:"DERI", dcon:weight: 0.6, dcon:isRequired: false, dcon:isExcluder: false},
           {  guid: ..., type: "dcon:nearbyPlace", label:"Nearby Place", name:"Westwood", dcon:weight: 0.2, dcon:isRequired: false, dcon:isExcluder: false}, 
        ],
        "items": [],
        "nao:creator": "urn:uuid:9f43a920-1979-4465-9b82-818dae8d5736",
        "active": false        
      }
    }
}

Clone this wiki locally