POST | https://[domain].deskie.io/api/groups.json
{
"group" : {
"group_title" : "Test group",
"group_from_name" : "Test group from name",
"group_signature" : "Test group signature"
}
}
{
"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
}
}
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 | https://[domain].deskie.io/api/groups.json
{
"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
}
curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X GET https://[domain].deskie.io/api/groups.json?limit=50&page=2
GET | https://[domain].deskie.io/api/groups/[id].json
{
"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
}
}
curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X GET https://[domain].deskie.io/api/groups/200.json
PUT | https://[domain].deskie.io/api/groups/[id].json
{
"group" : {
"group_title" : "Test group 2",
"group_from_name" : "Test group 2 from name"
}
}
{
"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
}
}
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
PUT | https://[domain].deskie.io/api/groups/[id]/disable.json
{
"group" : {
"replace_group_id" : 300
}
}
{
"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
}
}
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
PUT | https://[domain].deskie.io/api/groups/[id]/enable.json
{
"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
}
}
curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X PUT -d '' https://[domain].deskie.io/groups/api/200/enable.json
DELETE | https://[domain].deskie.io/api/groups/[id].json
{
"group" : {
"replace_group_id" : 300
}
}
HTTP Status: 200 OK
curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X DELETE https://[domain].deskie.io/api/groups/200.json