DESKIE API
Groups
Create a group

POST  |  https://[domain].deskie.io/api/groups.json
Create a new group.
Parameters
Request

{
  "group" : {
    "group_title" : "Test group",
    "group_from_name" : "Test group from name",
    "group_signature" : "Test group signature"
  }
}
Response

{
  "group" : {
    "group_id" : 200,
    "group_title" : "Test group",
    "group_from_name" : "Test group from name",
    "group_signature" : "Test group signature",
    "active" : true,
    "created_at" : Mon, 05 May 2014 00:15:17 +0300,
    "updated_at" : Tue, 23 Dec 2014 10:55:23 +0200
  }
}
Sample code

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X POST -d '{ "group": { "group_title":"Test group", "group_from_name":"Test group from name", "group_signature":"Test group signature" }}' https://[domain].deskie.io/api/groups.json
Get a list of groups

GET  |  https://[domain].deskie.io/api/groups.json
Get a list of groups.
Parameters
Response

{
    "0" : {
      "group" : {
        "group_id" : 200,
        "group_title" : "Test group",
        "group_from_name" : "Test group from name",
        "group_signature" : "Test group signature",
        "active" : true,
        "created_at" : Mon, 05 May 2014 00:15:17 +0300,
        "updated_at" : Tue, 23 Dec 2014 10:55:23 +0200
      }
    },
    "1" : {
      "group" : {
        "group_id" : 202,
        "group_title" : "Test group 2",
        "group_from_name" : "Test group 2 from name",
        "group_signature" : "Test group 2 signature",
        "active" : false,
        "created_at" : Mon, 15 May 2014 00:15:17 +0300,
        "updated_at" : Tue, 13 Dec 2014 10:55:23 +0200
      }
    },
    "total_count":10
}
Sample code

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X GET https://[domain].deskie.io/api/groups.json?limit=50&page=2
View a group

GET  |  https://[domain].deskie.io/api/groups/[id].json
View data of a specific group.
Response

{
  "group" : {
    "group_id" : 200,
    "group_title" : "Test group",
    "group_from_name" : "Test group from name",
    "group_signature" : "Test group signature",
    "active" : true,
    "created_at" : Mon, 05 May 2014 00:15:17 +0300,
    "updated_at" : Tue, 23 Dec 2014 10:55:23 +0200
  }
}
Sample code

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X GET https://[domain].deskie.io/api/groups/200.json
Edit a group

PUT  |  https://[domain].deskie.io/api/groups/[id].json
Edit data of a specific group.
Parameters
Request

{
  "group" : {
    "group_title" : "Test group 2",
    "group_from_name" : "Test group 2 from name"
  }
}
Response

{
  "group" : {
    "group_id" : 200,
    "group_title" : "Test group 2",
    "group_from_name" : "Test group 2 from name",
    "group_signature" : "Test group 2 signature",
    "active" : true,
    "created_at" : Mon, 05 May 2014 00:15:17 +0300,
    "updated_at" : Tue, 23 Dec 2014 10:55:23 +0200
  }
}
Sample code

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X PUT -d '{ "group": { "group_title":"Test group 2", "group_from_name":"Test group 2 from name" }}' https://[domain].deskie.io/api/groups/200.json
Deactivate a group

PUT  |  https://[domain].deskie.io/api/groups/[id]/disable.json
Deactivate a group.
Parameters
Request

{
  "group" : {
    "replace_group_id" : 300
  }
}
Response

{
  "group" : {
    "group_id" : 200,
    "group_title" : "Test group 2",
    "group_from_name" : "Test group 2 from name",
    "group_signature" : "Test group 2 signature",
    "active" : false,
    "created_at" : Mon, 05 May 2014 00:15:17 +0300,
    "updated_at" : Tue, 23 Dec 2014 10:55:23 +0200
  }
}
Sample code

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X PUT -d '{ "group": { "replace_group_id":"300" }}' https://[domain].deskie.io/api/groups/200/disable.json
Activate a group

PUT  |  https://[domain].deskie.io/api/groups/[id]/enable.json
Activate a group.
Response

{
  "group" : {
    "group_id" : 200,
    "group_title" : "Test group 2",
    "group_from_name" : "Test group 2 from name",
    "group_signature" : "Test group 2 signature",
    "active" : true,
    "created_at" : Mon, 05 May 2014 00:15:17 +0300,
    "updated_at" : Tue, 23 Dec 2014 10:55:23 +0200
  }
}
Sample code

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X PUT -d '' https://[domain].deskie.io/groups/api/200/enable.json
Delete a group

DELETE  |  https://[domain].deskie.io/api/groups/[id].json
Delete a group.
Parameters
Request

{
  "group" : {
    "replace_group_id" : 300
  }
}
Response

HTTP Status: 200 OK
Sample code

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X DELETE https://[domain].deskie.io/api/groups/200.json