API Documentation

Me /api/me

The Me API is used to read and/or update your own details and to discover users and activities around you.

Get me

GET /api/me

Returns you

Example output

{
  "first_name": "Test",
  "last_name": "User",
  "email": "info@organisedminds.com",
  "name_or_email": "Test User",
  "id": "0e831e95cc54",
  "user_since": "2013-12-05T10:02:29Z",
  "avatar": {
    "url": "https://app.organisedminds.com/assets/app/no-profile.jpg",
    "thumb_url": "https://app.organisedminds.com/assets/app/no-profile.jpg"
  },
  "contacts": [
     // empty
  ],
  "links": [
    { "href": "https://app.organisedminds.com/api/users/0e831e95cc54",
      "rel": "me"
    }
  ]
}

Update me

PUT /api/me

Updates your user object. Returns the new stored you. The request body should contain an updates for your user object in JSON format.

Example request

curl -X PUT -d '{"first_name":"Tester","last_name":"The Great"}' -H "Content-Type: application/json" \
  -H "Authorization: Bearer a0f6f5b5ce7227414af0ab8f91d0b61accd7d5009985012ef182708f0eed8d7f" \
  https://app.organisedminds.com/api/me

Example output

{
  "first_name": "Tester",
  "last_name": "The Great",
  "email": "info@organisedminds.com",
  "name_or_email": "Tester The Great",
  // snip; you get the picture, right?
}

My connetions

GET /api/me/connections

Returns your connections. Connections are:

  • The people you are collaborating with.
    You have delegated them an activity but the both of you do not share a workspace that contains that activity.
  • Members off the workspaces you are a member of.
  • People you have invited to OrganisedMinds.

Example output

[
    { "avatar" : {
        "thumb_url" : "https://app.organisedminds.com/assets/app/no-profile.jpg",
        "url" : "https://app.organisedminds.com/assets/app/no-profile.jpg"
      },
      "name_or_email" : "John Doe",
      "last_name" : "John",
      "email" : "john@example.com",
      "user_since" : "2013-12-05T13:14:20Z",
      "id" : "a4188f48b908",
      "first_name" : "Doe",
      "links" : [
         { "rel" : "workspace-member",
           "href" : "https://app.organisedminds.com/api/users/a4188f48b908"
         }
      ]
    },
    { "avatar" : {
        "thumb_url" : "https://app.organisedminds.com/assets/app/no-profile.jpg",
        "url" : "https://app.organisedminds.com/assets/app/no-profile.jpg"
      },
      "name_or_email" : "jane@example.com",
      "last_name" : null,
      "email" : "jane@example.com",
      "user_since" : "2013-12-05T13:10:40Z",
      "id" : "bbfadab12fae",
      "first_name" : null,
      "links" : [
        { "rel" : "collaborator",
          "href" : "https://app.organisedminds.com/api/users/bbfadab12fae"
        }
      ]
    }
  ]

What I follow

GET /api/me/follows

Returns a list of objects you follow.

Example output

{ "follows" : [
  { "activity" : {
    "name" : ":-D",
    "description" : "",
    "id" : 24,
    "updated_at" : "2013-12-05T13:50:07Z",
    "created_at" : "2013-12-05T13:50:07Z",
    // snip; left some details out for brevity
  } }
  ],
  "links" : [
    { "rel" : "first",
      "href" : "/api/me/follows?page=1"
    },
    { "rel" : "current",
      "href" : "/api/me/follows?page=1"
    },
    { "rel" : "last",
      "href" : "/api/me/follows?page=1"
    }
  ]
}

What is following me

GET /api/followings

Returns a list of objects following you.

Example output

{ "followings" : [],
  "links" : [
    { "rel" : "first",
       "href" : "/api/me/followings?page=1"
    },
    { "rel" : "current",
      "href" : "/api/me/followings?page=1"
    },
    { "rel" : "last",
      "href" : "/api/me/followings?page=0"
    }
  ]
}
comments powered by Disqus