Skip to main content

BlackList

blacklist.get​

This acquires a list of users who are specified in a blacklist.

API definitions​

REST Base URIhttp://app.mbga-platform.jp/social/api/restful/v2 ( Service ) http://app.sb.mbga-platform.jp/social/api/restful/v2 ( Sandbox )
REST HTTP MethodGET
REST URI Fragment``` /blacklist/{userId}/{groupId}{-prefix
REST Query ParametersGet-BlackList-Request-Parameters
Return ObjectBlackList Collection

Approval​

typepermissiondescription
ANONYMOUSfalseUnauthorized access
SECURITY_TOKENfalseAuthorization using a security token
OAUTH_MOBILEfalseAuthorization using an OAuth Token issued for a mobile device
OAUTH_CONSUMERtrueAuthorization using a Consumer Request

RESTful API response codes​

HTTP Status CodeHTTP Status MessageJSON-RPC Error CodesMeaning
200OK–Data successfully acquired
400Bad Request-32700, -32600, -32601, -32602, 400Corrupt request data on the client side
401Unauthorized401Authorization error
403Forbidden403The resource exists, but access is not possible due to a reason other than an authorization error
404Not Found404The resource doesn’t exist
405Method Not Allowed405That operation is not allowed
500Internal Server Error-32603An error on the API server side
503Service Unavailable–The API cannot be used temporarily

JSON-RPC error codes​

These are values are included in the code field of the Error object when an error has occurred.

RPC CodeMeaning
-32700 (Parse error)Invalid JSON format
-32600 (Invalid Request)Invalid JSON-RPC request
-32601 (Method not found)The method either doesn’t exist or is an unusable method
-32602 (Invalid params)Invalid API request parameters
-32603 (Internal server error)An error on the API server side
400 (Bad Request)A bad request on the client side that does not correspond to any other error
401 (Unauthorized)Authorization error
403 (Forbidden)The resource exists, but access is not possible due to a reason other than an authorization error
404 (Not Found)The resource doesn’t exist
405 (Method Not Allowed)That operation is not allowed

Data types​

Get-BlackList-Request-Parameters​

UserId, groupId and personId are specified as URI Template Parameters, and all other parameters are specified as Query String.

NameTypeDescription
userIdUserId or ArrayRequired
groupIdGroupIdRequired Only '@all' is specifiable.
personIdUserId or ArrayOptional
fieldsArrayOptional

Base data types

  • Standard-Request-Parameters
  • Collection-Request-Parameters
Starndard-Request-Parameters​

The following is a list of the supported fields.

NameTypeDescription
formatStringOptional Only 'json' is specifiable.

See 6.1 Standard Request Parameters - OpenSocial Core API Server Specification for details.

Collection-Request-Parameters​

The following is a list of the supported fields.

NameTypeDescription
countNumberOptional, An integer between 1 and 1000. The default value is 50.
startIndexNumberOptional, An integer of 1 or greater
sortByStringOptional, Only 'tergetId' is specifiable.
sortOrderStringOptional, 'ascending' or 'descending'

See 6.2 Collection Request Parameters - OpenSocial Core API Server Specification for details.

BlackList​

NameTypeDescription
idUserIdA user who has added a targetId user to the blacklist
tergetIdUserIdA user who has been added to the blacklist by an id user

Sample data​

RESTful API​

Acquires a list of blacklisted users.​
GET /social/api/restful/v2/blacklist/1234/@all
Host: app.sb.mbga-platform.jp

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
"entry" : [
{
"id" : "sb.mbga.jp:1234",
"tergetId": "sb.mbga.jp:5678",
},
{
"id" : "sb.mbga.jp:1234",
"tergetId": "sb.mbga.jp:6789",
},
],
"startIndex" : 1,
"itemsPerPage" : 50,
"totalResults" : 2
}
A blacklist check between two parties​
GET /social/api/restful/v2/blacklist/1234/@all/5678
Host: app.sb.mbga-platform.jp

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
"id" : "sb.mbga.jp:1234",
"tergetId": "sb.mbga.jp:5678",
}

If a user specified in personId is not registered in the blacklist, 404 Not Found is returned.

GET /social/api/restful/v2/blacklist/1234/@all/9999
Host: app.sb.mbga-platform.jp

HTTP/1.1 404 Not Found
Content-Type: application/json; charset=utf-8

{
"Error" : {
"Code" : "404",
"Message" : "Not Found"
}
}

See Also​

OpenSocial Core API Server Specification 1.0
OpenSocial Core Data Specification 1.0
OpenSocial Social API Server Specification 1.0
OpenSocial Social Data Specification 1.0

Revision History​

  • 12/2010
    • Initial Release.
  • 10/06/2010
    • Modified sb.dena.jp -> sb.mbga.jp