Table of Contents

    API

    Mock Server

    Use this URL to access a mockup of the API server. Your traffic will be recorded and compared to the documentation. You'll find your traffic analysis in the inspector or directly here in the documentation, right next to each resource.

mykabam

GET

/

Try to access any pages of site, and you need authorization for it

Response

403 (Forbidden)
Content-Type: text/html
{}

GET

/somepage

Try to access any pages of site, and you need authorization for it

Response

403 (Forbidden)
Content-Type: text/html
{}

Sign up

POST

/auth/signup

Register with username, password and email address via angular frontend

Response

201 (Created)
Content-Type: application/json; charset=UTF-8
{
  "username":"usernameToUseForNewUser"
  "email": "emailForNewUser@example.org"
}

POST

/auth/signup

Register with username, password and email address via static html form submit

Response

301 (Moved Permanently)
Header: Location: /

Sign up or sign in via google

GET

/auth/google

Authorize (or sign up) via google

Response

301 (Moved Permanently)

Sign in or attach profile to keychain via 3rd party oAuth providers

GET

/auth/github

Authorize via github

Response

301 (Moved Permanently)

GET

/auth/twitter

Authorize via twitter

Response

301 (Moved Permanently)

GET

/auth/facebook

Authorize via facebook

Response

301 (Moved Permanently)

Sign in via login and password

POST

/auth/login

By submiting the form

Response

301 (Moved Permanently)
Header: Location: /

POST

/auth/login

By angular application

Response

202 (Accepted)
{
  "username":"usernameToUseForNewUser",
  "email": "emailForNewUser@example.org"
}

Private message

GET

/api/messages

Get recent private message to this authorized user

Response

200 (OK)
Content-Type: application/json
[
    {
        "to": "523ea525e251a514514135325"
        "toProfile":{
        "username":"john1",
        "gravatar":"https://secure.gravatar.com/avatar/02ba513b62ef9f2f7798b9bac1ccf822.jpg?s=80&d=wavatar&r=g",
        "lang":"en",
        "root":false,
        "isBanned":"false",
        "roles":[],
        "skype":"johndoe1",
        "lastName":"doe1",
        "firstName":"john"
        },
        "from": "523ea525e251a514514135326",
        "fromProfile":{
        "username":"john2",
        "gravatar":"https://secure.gravatar.com/avatar/02ba513b62ef9f2f7798b9bac1ccf822.jpg?s=80&d=wavatar&r=g",
        "lang":"en",
        "root":false,
        "isBanned":"false",
        "roles":[],
        "skype":"johndoe2",
        "lastName":"doe2",
        "firstName":"john"
        },
        "message":"Hello, this is my message!"
    },
        {
        "to": "523ea525e251a514514135325"
        "toProfile":{
        "username":"john1",
        "gravatar":"https://secure.gravatar.com/avatar/02ba513b62ef9f2f7798b9bac1ccf822.jpg?s=80&d=wavatar&r=g",
        "lang":"en",
        "root":false,
        "isBanned":"false",
        "roles":[],
        "skype":"johndoe1",
        "lastName":"doe1",
        "firstName":"john"
        },
        "from": "523ea525e251a514514135326",
        "fromProfile":{
        "username":"john2",
        "gravatar":"https://secure.gravatar.com/avatar/02ba513b62ef9f2f7798b9bac1ccf822.jpg?s=80&d=wavatar&r=g",
        "lang":"en",
        "root":false,
        "isBanned":"false",
        "roles":[],
        "skype":"johndoe2",
        "lastName":"doe2",
        "firstName":"john"
        },
        "message":"Hello, this is my message!"
    },
        {
        "to": "523ea525e251a514514135325"
        "toProfile":{
        "username":"john1",
        "gravatar":"https://secure.gravatar.com/avatar/02ba513b62ef9f2f7798b9bac1ccf822.jpg?s=80&d=wavatar&r=g",
        "lang":"en",
        "root":false,
        "isBanned":"false",
        "roles":[],
        "skype":"johndoe1",
        "lastName":"doe1",
        "firstName":"john"
        },
        "from": "523ea525e251a514514135326",
        "fromProfile":{
        "username":"john2",
        "gravatar":"https://secure.gravatar.com/avatar/02ba513b62ef9f2f7798b9bac1ccf822.jpg?s=80&d=wavatar&r=g",
        "lang":"en",
        "root":false,
        "isBanned":"false",
        "roles":[],
        "skype":"johndoe2",
        "lastName":"doe2",
        "firstName":"john"
        },
        "message":"Hello, this is my message!"
    }
]

GET

/api/messages/john1

Get recent private message in form of dialog with user of john1

Response

200 (OK)
Content-Type: application/json
[
    {
        "to": "523ea525e251a514514135325"
        "toProfile":{
        "username":"john1",
        "gravatar":"https://secure.gravatar.com/avatar/02ba513b62ef9f2f7798b9bac1ccf822.jpg?s=80&d=wavatar&r=g",
        "lang":"en",
        "root":false,
        "isBanned":"false",
        "roles":[],
        "skype":"johndoe1",
        "lastName":"doe1",
        "firstName":"john"
        },
        "from": "523ea525e251a514514135326",
        "fromProfile":{
        "username":"john2",
        "gravatar":"https://secure.gravatar.com/avatar/02ba513b62ef9f2f7798b9bac1ccf822.jpg?s=80&d=wavatar&r=g",
        "lang":"en",
        "root":false,
        "isBanned":"false",
        "roles":[],
        "skype":"johndoe2",
        "lastName":"doe2",
        "firstName":"john"
        },
        "message":"Hello, this is my message!"
    },
        {
        "to": "523ea525e251a514514135325"
        "toProfile":{
        "username":"john1",
        "gravatar":"https://secure.gravatar.com/avatar/02ba513b62ef9f2f7798b9bac1ccf822.jpg?s=80&d=wavatar&r=g",
        "lang":"en",
        "root":false,
        "isBanned":"false",
        "roles":[],
        "skype":"johndoe1",
        "lastName":"doe1",
        "firstName":"john"
        },
        "from": "523ea525e251a514514135326",
        "fromProfile":{
        "username":"john2",
        "gravatar":"https://secure.gravatar.com/avatar/02ba513b62ef9f2f7798b9bac1ccf822.jpg?s=80&d=wavatar&r=g",
        "lang":"en",
        "root":false,
        "isBanned":"false",
        "roles":[],
        "skype":"johndoe2",
        "lastName":"doe2",
        "firstName":"john"
        },
        "message":"Hello, this is my message!"
    },
        {
        "to": "523ea525e251a514514135325"
        "toProfile":{
        "username":"john1",
        "gravatar":"https://secure.gravatar.com/avatar/02ba513b62ef9f2f7798b9bac1ccf822.jpg?s=80&d=wavatar&r=g",
        "lang":"en",
        "root":false,
        "isBanned":"false",
        "roles":[],
        "skype":"johndoe1",
        "lastName":"doe1",
        "firstName":"john"
        },
        "from": "523ea525e251a514514135326",
        "fromProfile":{
        "username":"john2",
        "gravatar":"https://secure.gravatar.com/avatar/02ba513b62ef9f2f7798b9bac1ccf822.jpg?s=80&d=wavatar&r=g",
        "lang":"en",
        "root":false,
        "isBanned":"false",
        "roles":[],
        "skype":"johndoe2",
        "lastName":"doe2",
        "firstName":"john"
        },
        "message":"Hello, this is my message!"
    }
]

POST

/api/messages/john1

Send message to user john1 via angularJS appliation

Response

201 (Created)
Content-Type: application/json; charset=UTF-8
{"status":201,"description":"Message is send!"}

POST

/api/messages/john1

Send message to user john1 via html form submit appliation

Response

301 (Moved Permanently)
Header: Location: back

kabam-plugin-my-profile

GET

/auth/myProfile

Get basic HTML page with form to edit this current user profile

Response

200 (OK)
Content-Type: text/html; charset=UTF-8

POST

/auth/myProfile

Edits the current user profile. For now works with this parameters, extracted from body of POST request

Response

301 (Moved Permanently)
Header: Location: back

kabam-plugin-rest

GET

/api/rest/user

Classic REST interface for every kabam mongoose data model present. Consider that the current user is root, and he tryes to edit current users via rest full api. If user is not root, nothing is shown in case of users

Get all users

Response

200 (OK)
Content-Type: application/json
{
    [
        {
            "__v" : 0 ,
            "_id" :
            { "$oid" : "5215f4e6cbf4096e10000001"} ,
            "apiKey" : "faa2819134c61e69e74d4a5cf53618cdba5774b962ef547281fe31f8e0aaf0953e373790da6931004233564d3c902e2464c70904046cf7a3b113711b7d3b73b7" ,
            "apiKeyCreatedAt" : { "$date" : "2013-08-22T11:24:22.849Z"} ,
            "email" : "nowak@gmail.com" ,
            "emailVerified" : true ,
            "firstName" : "Anatolij" ,
            "lastName" : "Nowak-Ostroumov" ,
            "isBanned" : false ,
            "isOnline" : true,
            "lang" : "en" ,
            "lastSeenOnline" : { "$date" : "2013-08-28T22:26:14.744Z"} ,
            "password" : "f02a90f3747eb6401f46dfc4170cff32269a7eae187a1a9d45aa3d6a095652614beaada7d581f7f4be76de26b1d3ddfd5e0abd60039a2d31da17b30d114951ee" ,
            "profileComplete" : true ,
            "roles" : [ ] ,
            "root" : true ,
            "salt" : "223817bf61bb3e962efb56a42d8324a3831155ed4ee2a099f6ac83ccf534062b3e470f4f3ec57097312d8475bfd748ea41ba1682668d3bc18b74c6b3300aeaf3" ,
            "username" : "vodolaz095"
        },
        {
            "__v" : 0 ,
            "_id" : { "$oid" : "521b9a308cd3bea60d000001"} ,
            "apiKey" : "e78516372dd8801e9dba39138463313a2bcda955bdf54a33c96ff091b9381824b4644d02e9b96fff8f1b5b7cb9d444d81d22b9f6f466ec2628b875484933eaad" ,
            "apiKeyCreatedAt" : { "$date" : "2013-08-26T18:10:56.193Z"} ,
            "email" : "devidd57@example.org" ,
            "emailVerified" : false ,
            "isBanned" : false ,
            "lang" : "en" ,
            "password" : "33fb8af59dfd1e98134a09f96beb57304411f2b1de652726d32094e6122a5bd59105a1f4318742b032e2420f062dee3316e8d642f2fe41ec68d2549f4610503c" ,
            "profileComplete" : true ,
            "roles" : [ ] ,
            "root" : false ,
            "salt" : "bdf8eabf5fb3ad08e218252b398b3d3c1523c9d01c86177d65845d390abd6111b25bac4ce87b034f2b955a59ac4a2b8e2e1e793c30d81acdbbd53a3363d4307e" ,
            "username" : "devidd"
        }
]
}

GET

/api/rest/user/:_id

Get one particular user

Response

200 (OK)
Content-Type: application/json
{
            "__v" : 0 ,
            "_id" :
            { "$oid" : "5215f4e6cbf4096e10000001"} ,
            "apiKey" : "faa2819134c61e69e74d4a5cf53618cdba5774b962ef547281fe31f8e0aaf0953e373790da6931004233564d3c902e2464c70904046cf7a3b113711b7d3b73b7" ,
            "apiKeyCreatedAt" : { "$date" : "2013-08-22T11:24:22.849Z"} ,
            "email" : "nowak@gmail.com" ,
            "emailVerified" : true ,
            "firstName" : "Anatolij" ,
            "lastName" : "Nowak-Ostroumov" ,
            "isBanned" : false ,
            "isOnline" : true,
            "lang" : "en" ,
            "lastSeenOnline" : { "$date" : "2013-08-28T22:26:14.744Z"} ,
            "password" : "f02a90f3747eb6401f46dfc4170cff32269a7eae187a1a9d45aa3d6a095652614beaada7d581f7f4be76de26b1d3ddfd5e0abd60039a2d31da17b30d114951ee" ,
            "profileComplete" : true ,
            "roles" : [ ] ,
            "root" : true ,
            "salt" : "223817bf61bb3e962efb56a42d8324a3831155ed4ee2a099f6ac83ccf534062b3e470f4f3ec57097312d8475bfd748ea41ba1682668d3bc18b74c6b3300aeaf3" ,
            "username" : "vodolaz095"
        }

PUT

/api/rest/user/:_id

Update one user

Response

202 (Accepted)
Content-Type: application/json

DELETE

/api/rest/user/:_id

Delete one user

Response

202 (Accepted)
Content-Type: application/json

Kabam plugin room

POST

/api/groups

create group

Response

201 (Created)
Content-Type: application/json;
{
}

POST

/api/groups/:id

update groups

Response

201 (Created)
Content-Type: application/json;
{
  "success":"Group updated!"
}

POST

/api/groups/createMessage/:id

send comments

Response

201 (Created)
Content-Type: application/json;
{
  "success":"You have created message in this group!"
}

POST

/api/groups/join/:id

join groups

Response

201 (Created)
Content-Type: application/json;
{
  "status":"Welcome to group!"
}

POST

/api/groups/leave/:id

leave groups

Response

201 (Created)
Content-Type: application/json;
{
}

POST

/api/groups/invite/:id

admin can invite to this group...

Response

201 (Created)
Content-Type: application/json;
{
    "success":"User has been invited to group!"
}

POST

/api/groups/ban/:id

admin can ban the user from this group...

Response

201 (Created)
Content-Type: application/json;
{
    "success":"User has been banned from this group!"
}

kabam plugin error logger

GET

/api/errors/:username

get error logs by user

Response

201 (Created)
Content-Type: application/json;
{
  startTime: Wed Aug 21 2013 01:52:34 GMT+0400 (MSK),
  duration: 49, //request duration in ms
  statusCode: 200,
  method: 'GET',
  ip: '127.0.0.1',
  uri: '/',
  username:'johndoe', //if user is authorized, his/her username is put here
  email:'email' //if user is authorized his/her email is put here
}

kabam-plugin-gridfs

GET

/files/<path_to_a_file>

Returns file if path_to_a_file exists and is a file

Response

201 (Created)
Content-Type: application/json;
{
  _id: '5f7a891f4f57ec84375a6a97',
  filename: '/some/path/to/a/file.txt/test.txt',
  contentType: 'text/plain',
  length: 11,
  chunkSize: 262144,
  aliases: null,
  metadata: {
    dirId: '8c4e17676bebe10c48321998',
    tags: [ 'some', 'path', 'to', 'a', 'file.txt', 'test.txt' ]
  },
  md5: '0956d2fbd5d5c29844a4d21ed2f76e0c'
}

GET

/files/<path_to_a_folder>

Returns file if path_to_a_folder exists and is a folder

Response

201 (Created)
Content-Type: application/json;
{
    files: [{
      _id: '5f7a891f4f57ec84375a6a97',
      filename: '/some/path/to/a/file.txt/test.txt',
      contentType: 'text/plain',
      length: 11,
      chunkSize: 262144,
      aliases: null,
      metadata: {
        dirId: '8c4e17676bebe10c48321998',
        tags: [ 'some', 'path', 'to', 'a', 'file.txt', 'test.txt' ]
      },
      md5: '0956d2fbd5d5c29844a4d21ed2f76e0c'
    }, {
      _id: '46496fbb384e39ddfbabcd05',
      filename: '/some/path/to/a/file.txt/Lenna.png',
      contentType: 'image/png',
      length: 473831,
      chunkSize: 262144,
      aliases: null,
      metadata: {
        dirId: '8c4e17676bebe10c48321998',
        tags: [ 'some', 'path', 'to', 'a', 'file.txt', 'Lenna.png' ]
      },
      md5: '814a0034f5549e957ee61360d87457e5'
    }],
    folders: []
}

kabam-plugin-analytics

GET

/analytics/<some_sites>/hotpixel.png

Track http request

Response

200 (OK)
Content-Type: application/json;
{
  "hotPixelString":"..."
}