Task:Single sign-on/UserManagement-API

(New page: ==URL map== ===GET requests=== ====/transactions/list/?since=UUID==== Returns array of transactions, which happened later then UUID specified. Possible reply: [ { "uuid":"0...)
(categorize)
 
Line 90: Line 90:
** action (can take values: create, update, delete)
** action (can take values: create, update, delete)
** User's UUID
** User's UUID
 +
 +
[[Category:Tasks]]

Latest revision as of 08:54, 11 May 2010

Contents

[edit] URL map

[edit] GET requests

[edit] /transactions/list/?since=UUID

Returns array of transactions, which happened later then UUID specified. Possible reply:

   [
       {   "uuid":"00000000-0000-0000-C000-000000000046",
           "action":"create",
           "timestamp":"2009-08-04T00:07:12+04:00",
           "data":{
               "uuid":"00000000-0000-0001-C000-000000000046",
               "login":"maemo",
               "email":"maemo@example.com",
               "firstname":"N",
               "lastname":"810",
               "foo":"bar"
           }
       },
       {   "uuid":"00000000-0000-0000-C000-000000000047",
           "action":"update",
           "timestamp":"2009-08-04T00:07:13+04:00",
           "data":{
               "uuid":"00000000-0000-0001-C000-000000000047",
               "login":"johndoe",
               "email":"johndoe@example.com",
               "firstname":"jonn",
               "lastname":"doe",
               "foo":"bar"
           }
       },
       {   "uuid":"00000000-0000-0000-C000-000000000049",
           "action":"delete",
           "timestamp":"2009-08-04T00:07:22+04:00"
       }
   ]

[edit] /user/?param=value

For example:

   /user/?uuid=00000000-0000-0000-C000-000000000046
   /user/?login=maemo
   /user/?email=maemo@example.com

These return [false] or array of single user's data:

   {
       "uuid":"00000000-0000-0001-C000-000000000047",
       "login":"johndoe",
       "email":"johndoe@example.com",
       "firstname":"jonn",
       "lastname":"doe",
       "foo":"bar"
   }

[edit] POST requests

[edit] /user/

Create user

Expects array with user-data as request-body

Returns [UUID] or [false]

[edit] /user/?uuid=UUID

Update user whose UUID matches

Expects array with user-data as request-body

Returns [true] or [false]

[edit] DELETE requests

[edit] /user/?uuid=UUID

Delete user whose UUID matches

Returns [true] or [false]

[edit] Implementation details

User-management service will be powered by Midgard-2 technology. Data will be represented by objects of 2 types: