[Group Management] API access to remove group member
Description
API access to remove location object's group member.
API
api_code : api.common.group.set.object.delete
HOST : http://cms.catchloc.com/api.partner.common.php
Method : GET
Protocol : JSON
Parameters
api : api_code
api_key : Client's partner key
timestamp : Unix timestamp
cert_key : Certfication key
group_key : HASH KEY to certify GROUP
member_key : HASH KEY to certify device
Response
result : RESULT
message : result code
Example
===== Request =====
http://cms.catchloc.com/api.partner.common.php?
api=api.common.group.set.object.delete&
api_key=xxxxx&
timestamp=1513319595&
cert_key=xxxxx&
group_key=xxxxxx&
member_key=xxxxxx
===== Response =====
- Success
{
"result":"OK",
"message":"GROUP_MEMBER_DELETE"
}
- Fail
{
"result":"FAIL",
"message":"Reason"
에러사유:
- NO_MEMBER_INFO : No information allocated to member_key
- NO_GROUP_INFO : No information allocated to group_key
}
===== Request =====
String group_key = "HASH KEY to certify GROUP";
String member_key = "HASH KEY to certify device";
CatchLoc catchloc = new CatchLoc();
catchloc.setApiKey("API KEY");
catchloc.setServerKey("SERVER KEY");
JSONObject result = catchloc.removeGroupMember(group_key, member_key);
===== Response (JSONObject) =====
{
"result" : "ok",
"type" : "jsonobject",
"message" : API Response Body
}
===== Request =====
import CatchLocSDKForAPI (common)
CatchLocAPI.shared.setApiKey(API_KEY)
CatchLocAPI.shared.setserverKey(SERVER_KEY)
-GROUP_KEY : HASH KEY for GROUP authentication
-MEMBER_KEY : HASH KEY for DEVICE authentication
CatchLocAPI.shared.removeGroupMember(groupKey: GROUP_KEY, memberKey: MEMBER_KEY)
{ result in
let jsonData = result.response
or
let jsonString = result.description()
}
===== Response =====
{
"response" : API Response Body
}
===== Request =====
$group_key = 'HASH KEY to certify GROUP';
$member_key = 'HASH KEY to certify device';
$catchloc = new CatchLoc();
$catchloc->setApiKey("API KEY");
$catchloc->setServerKey("SERVER KEY")
$result = $catchloc->removeGroupMember($group_key, $member_key);
===== Response (JSON String) =====
"{
"result" : "ok",
"type" : "map",
"message" : API Response Body
}"
===== Request =====
var callback = function(json)
{
code... (handle for api response)
(e.g. : create marker on map or print list)
};
var params =
{
group_key: 'HASH KEY to certify GROUP',
member_key: 'HASH KEY to certify device',
};
CatchLoc.setApiKey("API KEY");
CatchLoc.setServerKey("SERVER KEY");
CatchLoc.removeGroupMember(params, callback);
===== Response (JSON, using parameter in callback function) =====
{
"result" : "ok",
"type" : "json",
"message" : API Response Body
}