Skip to main content

TextData

textdatagroup.create​

This is an API for creating a TextDataGroup.

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 MethodPOST
REST URI Fragment/textdata/{appId}/{groupId}
REST Query ParametersCreate-TextDataGroup-Request-Parameters
Return ObjectNone

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
201Created–Data successfully created.
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​

Create-TextDataGroup-Request-Parameters​

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

NameTypeDescription
appIdAppIdRequired Only '@app' is specifiable.
groupIdGroupIdRequired Only '@all' is specifiable.

Base data types

  • Starndard-Request-Parameters

TextdataGroup​

NameTypeDescription
nameStringThis is the name of the TextDataGroup to be created.
parentIdStringThis is the id value for indicating the ownership.
Name field​

Only alphanumerical characters and underscores can be used.Up to a maximum of 32 bytes can be assigned.

parentId field​

parentId are such that the id value of the parent is input from the perspective of the child so that the parent-child relationship is apparent. Please be sure to input this if the data structure has a parent-child relationship, since it is necessary for monitoring.

Restrictions​

  • Five TextDataGroups can be created per application.

Sample data​

RESTful API​

Create a new TextDataGroup​
POST /social/api/restful/v2/textdata/@app/@all

{ "name": "diary" }

HTTP/1.1 201 Created

A Bad Request will result if the TextDataGroup you are trying to create already exists, or the TextDataGroup has reached the upper limit.

POST /social/api/restful/v2/textdata/@app/@all

{ "name": "diary" }

HTTP/1.1 400 Bad Request

{
"Error" : {
"Code" : "400",
"Message" : "Bad Request"
}
}

textdatagroup.get​

This is an API for acquiring TextDataGroup information.

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/textdata/{appId}/{groupId} ``` /textdata/{appId}/{textdataGroupName}{-prefix
REST Query ParametersGet-TextDataGroup-Request-Parameters
Return ObjectTextDataGroup Collection

認可​

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-TextDataGroup-Request-Parameters​

appId, groupId and textdataGroupName are specified as URI Template Parameters, and all other parameters are specified as Query String.

NameTypeDescription
appIdAppIdRequired Only '@app' is specifiable.
groupIdGroupIdRequired Only '@all' is specifiable.
textdataGroupNameStringThis is the name of the TextDataGroup.

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

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

TextDataGroup​

NameTypeDescription
idStringThe ID of the TextDataGroup object
nameStringName of the TextDataGroup object
appIdStringThe id of the application
parentIdStringID of the parent TextDataGroup object

Sample data​

RESTful API​

In the event of acquiring a TextDataGroup collection​
GET /social/api/restful/v2/textdata/@app/@all
Host: app.sb.mbga-platform.jp

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

{
"entry" : [
{
"parentId" : "0",
"appId" : "sb.mbga.jp:12000000",
"name" : "dialy",
"id" : "1"
},
{
"parentId" : "1",
"appId" : "sb.mbga.jp:12000000",
"name" : "comment",
"id" : "2"
},
],
"startIndex" : 1,
"itemsPerPage" : 50,
"totalResults" : 2
}
Acquire specific TextDataGroup information​
GET /social/api/restful/v2/textdata/@app/diary/@self
Host: app.sb.mbga-platform.jp

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

{
"parentId" : "0",
"appId" : "sb.mbga.jp:12000000",
"name" : "dialy",
"id" : "1"
}

textdatagroup.delete​

This is an API for deleting a TextDataGroup entry.

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 MethodDELETE
REST URI Fragment``` /textdata/{appId}/{textdataGroupName}{-prefix
REST Query ParametersDelete-TextDataGroup-Request-Parameters
Return ObjectObjecd-Id

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
201Accepted–Data successfully deleted.
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​

Delete-TextDataGroup-Request-Parameters​

appId, groupId and textdataGroupName are specified as URI Template Parameters, and all other parameters are specified as Query String.

NameTypeDescription
appIdAppIdRequired Only '@app' is specifiable.
groupIdGroupIdRequired Only '@self' is specifiable.
textdataGroupNameStringThis is the name of the TextDataGroup

Base data types

  • Standard-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.

Sample data​

RESTful API​

Delete a TextDataGroup entry​
DELETE /social/api/restful/v2/textdata/@app/diary/@self
Host: app.sb.mbga-platform.jp

HTTP/1.1 202 Accepted

"1"

textdata.create​

This is an API for creating a TextData entry.

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 MethodPOST
REST URI Fragment``` /textdata/{appId}/{textdataGroupName}{-prefix
REST Query ParametersCreate-TextData-Request-Parameters
Return ObjectTextData

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
201Created–Data successfully created.
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​

Create-TextData-Request-Parameters​

appId, groupId and textdataGroupName are specified as URI Template Parameters, and all other parameters are specified as Query String.

NameTypeDescription
appIdAppIdRequired Only '@app' is specifiable.
groupIdGroupIdRequired Only '@all' is specifiable.
textdataGroupNameStringThis is the name of the TextDataGroup

Base data types

  • Starndard-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.

TextData​

NameTypeDescription
dataStringTextData
parentIdStringID of the parent TextData object
writerIdStringThe userId of the person who wrote the data
ownerIdStringThe userId of the owner of the data

Precautions​

  • The size of the data is restricted to 2048 bytes.
  • parentId are such that the id value of the parent is input from the perspective of the child so that the parent-child relationship is apparent. Please be sure to input this if the data structure has a parent-child relationship, since it is necessary for monitoring.
  • Input a string that can be seen as a sentence in the data field. Please note that if it cannot be recognized, it may be deleted by the operator.
  • If the data field contains any prohibited words that violate Mobage’s operations policy, a 400 Bad Request will be returned if you attempt to add or update the TextData entry.
  • For an entry in Trusted Mode, please be sure to set the TextData#ownerId. TextData#ownerId is a field that was prepared to indicate the original owner, or the owner of the parent data.
    • For example, when an arbitrary user writes on the message board that was assigned to each user, the owner is the user to whom the message board was assigned to, so the owner's ID is set in TextData#ownerId.
    • If the entry is not intended for the owner, please set the application ID in TextData#ownerId.
  • Please be sure to set TextData#writerId when an entry is created or updated by the user. If TextData#writerId is not set, it will automatically be set to 0, indicating that the entry was controlled by a partner.
  • If the user in TextData#writerId has blacklisted a viewer, please use the BlackList API to disable entries from being made.

Restrictions​

  • The maximum number of entries that can be stored in each TextDataGroup is 100,000 for up to 10,000 users who installed the application.
      • If more than 10,000 users have installed the application up to the previous day, the maximum number of entries is 10 times the number of users who installed the application according to the count up to the previous day.

Sample data​

RESTful API​

Create a TextData entry​

This is an example in which user 10012 commented on user 10009's message board, which is set up in the game's My Page.

POST /social/api/restful/v2/textdata/@app/comment/@all
Host: app.sb.mbga-platform.jp

{
"data": "I also play the Bandid Nation.",
"writerId": "10012",
"ownerId": "10009"
}

HTTP/1.1 201 Created

{
"status" : 0,
"data" : "I also play the Bandid Nation.",
"published" : "2010-10-04T09:05:28",
"writerId" : "sb.mbga.jp:10012",
"parentId" : "0",
"id" : "22",
"updated" : "2010-10-04T09:05:28",
"groupName" : "comment",
"ownerId" : "sb.mbga.jp:10009"
}

If the data to be posted contains a banned word, 400 Bad Request is returned.

POST /social/api/restful/v2/textdata/@app/comment/@all
Host: app.sb.mbga-platform.jp

{ "data": "If words such as "kill" are posted on a message board or elsewhere, the management team may delete these words." }

HTTP/1.1 400 Bad Reqeut

{
"Error" : {
"Code" : "400",
"Message" : "Bad Request"
}
}

textdata.get​

This is an API for acquiring a TextData entry.

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``` /textdata/{appId}/{textdataGroupName}{-prefix
REST Query ParametersGet-TextData-Request-Parameters
Return ObjectTextData 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-TextData-Request-Parameters​

appId, groupId and textdataGroupName are specified as URI Template Parameters, and all other parameters are specified as Query String.

NameTypeDescription
appIdAppIdRequired Only '@app' is specifiable.
groupIdGroupIdRequired Only '@all' is specifiable.
textdataGroupNameStringThis is the name of the TextDataGroup
fieldsArrayOptional

Base data types

  • Starndard-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
filterByString or ArrayOptional, The specifiable fields are 'ownerId' and 'writerId'
filterOpString or ArrayOptional, equals is the only specifiable operator
filterValueString or ArrayOptional, It is required if filterBy has been assigned.
countNumberOptional, An integer between 1 and 1000. The default value is 50.
sortByStringOptional, The specifiable fields are 'id' or 'updated'
sortOrderStringOptional, 'ascending' or 'descending'
startIndexNumberOptional, An integer of 1 or greater

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

TextData​

NameTypeDescription
idStringThe id of the TextData object
groupNameStringThe name of the TextDataGroup object.
parentIdStringThe id of the parent TextData object.
writerIdStringThe userId of the person who wrote the data
ownerIdStringThe userId of the owner of the data
dataStringThe text data
statusNumberThe logical status value
publishedDateTimeDate published
updatedDateTimeDate updated
Status field​
statusDescription
0Normal
11Modified by user
21Modified by operator
31Modified by partner
Precautions​
  • A time zone specifier is not included in the dateTime format contained in the response from the API. Therefore, the time is displayed in GMT (Greenwich Mean Time).
  • Please only specify ids within the same group for a GET in which multiple id are specified. ids belonging to different groups cannot be acquired.

Sample data​

RESTful API​

Acquire a TextData collection​

This is an example of writerId sorting the TextData list belonging to a comment from the smallest to the largest, and then acquiring 2 entries at a time.

GET /social/api/restful/v2/textdata/@app/comment/@all?sortBy=writerId&sortOrder=ascending&count=2
Host: app.sb.mbga-platform.jp

HTTP/1.1 200 OK

{
"entry" : [
{
"status" : 0,
"data" : "comment01",
"writerId" : "sb.mbga.jp:12345",
"published" : "2010-10-10T10:10:10",
"parentId" : "0",
"groupName" : "comment",
"updated" : "2010-10-10T10:10:10",
"id" : "10",
"ownerId" : "sb.mbga.jp:23456"
},
{
"status" : 21,
"data" : "comment02",
"writerId" : "sb.mbga.jp:23456",
"published" : "2010-10-10T11:11:11",
"parentId" : "0",
"groupName" : "comment",
"updated" : "2010-10-10T12:00:00",
"id" : "12",
"ownerId" : "sb.mbga.jp:0"
}
],
"startIndex" : 1,
"sorted" : true,
"itemsPerPage" : 2,
"totalResults" : 12,
"filtered" : false
}

If a groupName that does not exist is assigned, 404 Not Found is returned.

GET /social/api/restful/v2/textdata/@app/unknown/@all
Host: app.sb.mbga-platform.jp

HTTP/1.0 404 Not Found

{
"Error" : {
"Code" : "404",
"Message" : "Not Found"
}
}
Acquire a TextData entry​

This is an example of an acquisition through assigning a field.

GET /social/api/restful/v2/textdata/@app/comment/@all/10?fields=data,writerId,status
Host: app.sb.mbga-platform.jp

HTTP/1.1 200 OK

{
"writerId" : "sb.mbga.jp:12345",
"status" : 0,
"data" : "comment01"
}

If a textdataId that does not exist is assigned, 404 Not Found is returned.

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

HTTP/1.0 404 Not Found

{
"Error" : {
"Code" : "404",
"Message" : "Not Found"
}
}
Acquiring a TextData entry by assigning multiple TextData.id​
GET /social/api/restful/v2/textdata/@app/comment/@all/10,20?fields=data,writerId,status,id
Host: app.sb.mbga-platform.jp

HTTP/1.1 200 OK

{
"entry" : [
{
"status" : 0,
"data" : "comment01",
"writerId" : "sb.mbga.jp:12345",
"id" : "10",
},
{
"status" : 21,
"data" : "comment02",
"writerId" : "sb.mbga.jp:23456",
"id" : "12",
}
],
"startIndex" : 1,
"sorted" : false,
"itemsPerPage" : 50,
"totalResults" : 2,
"filtered" : false
}

textdata.update​

This is an API for updating TextData entries.

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 MethodPUT
REST URI Fragment``` /textdata/{appId}/{textdataGroupName}/{groupId}{-prefix
REST Query ParametersUpdate-TextData-Request-Parameters
Return ObjectNone

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
202Accepted–Data successfully updated.
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​

Update-TextData-Request-Parameters​

appId, groupId and textdataGroupName are specified as URI Template Parameters, and all other parameters are specified as Query String.

NameTypeDescription
appIdAppIdRequired Only '@app' is specifiable.
groupIdGroupIdRequired Only '@all' is specifiable.
textdataGroupNameStringThis is the name of the TextDataGroup

Base data types

  • Starndard-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.

TextData​

NameTypeDescription
dataStringThe text data
parentIdStringID of the parent TextData object
ownerIdStringThe userId of the owner of the data

Precautions​

  • The data size is up to 2048 bytes.

Sample data​

RESTful API​

Update a TextData entry​
PUT /social/api/restful/v2/textdata/@app/comment/@all/20
Host: app.sb.mbga-platform.jp

{ "data": "You are now level 30!" }

HTTP/1.1 202 Accepted
  • If the data to be posted contains a banned word, 400 Bad Request is returned.
  • If a groupName that does not exist is assigned, 404 Not Found is returned.

textdata.delete​

This is an API for deleting TextData entries.

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 MethodDELETE
REST URI Fragment``` /textdata/{appId}/{textdataGroupName}/{groupId}{-prefix
REST Query ParametersDelete-TextData-Request-Parameters
Return ObjectObjectId

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
202Accepted–Data successfully deleted.
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​

Delete-TextData-Request-Parameters​

appId, groupId and textdataGroupName are specified as URI Template Parameters, and all other parameters are specified as Query String.

NameTypeDescription
appIdAppIdRequired Only '@app' is specifiable.
groupIdGroupIdRequired Only '@all' is specifiable.
textdataGroupNameStringThis is the name of the TextDataGroup.

Base data types

  • Starndard-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.

Precautions​

  • If the data has been deleted, acquiring the entry source through GET will result in 404 Not Found.
  • For the time being, it can be acquired with a status of 20 if it had been deleted by the operator.

Sample data​

RESTful API​

Deleting a TextData entry.​
DELETE /social/api/restful/v2/textdata/@app/comment/@all/20
Host: app.sb.mbga-platform.jp

HTTP/1.1 202 Accepted

If a textdataId that has been deleted or a textdataId that does not exist is assigned, 404 Not Found is returned.

DELETE /social/api/restful/v2/textdata/@app/comment/@all/20
Host: app.sb.mbga-platform.jp

HTTP/1.1 404 Not Found

{
"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​

  • 06/05/2012
    • Deletion Status field It ”20:Deleted by operator” .
  • 12/2010
    • Initial Release.
  • 11/24/2010
    • Modified the textdatagroup.update method
  • 11/09/2010
    • Added Precautions for deletion by the operator
  • 11/04/2010
    • Once textdata.delete is executed, that entry can no longer be acquired through textdata.get
  • 10/18/2010
    • Modified the sample and Precautions for textdatagroup.create
  • 10/06/2010
    • Modified sb.dena.jp -> sb.mbga.jp