跳到主要内容
未列出页
此页面未列出。搜索引擎不会对其索引,只有拥有直接链接的用户才能访问。

Create Appdata

Description​

Create Appdata for your application.

URI Fragment​

/appdata/{userId}/{groupId}/{appId}

Supported Formats​

JSON

HTTP Method​

POST

Request Parameters​

NameTypeRequiredParameterDescription
userIdUserId*URI Template ParametersOnly @me is specifiable
groupIdGroupId*URI Template ParametersOnly @self is specifiable
appIdAppId*URI Template ParametersOnly @app is specifiable
fieldsArray*Query StringThe keys of appdata are specifiable
formatStringQuery StringOnly json is specifiable

Request Headers​

Request Body​

An isolated AppData, which is defined by developers. Simple hash of key/value pairs.

{

"key1" : "value1"``,

"key2" : "value2"

}

Response Status Code​

HTTP Status CodeHTTP Status MessageMeaning
201CreatedData successfully created or updated
400Bad RequestCorrupt request data on the client side
401UnauthorizedAuthorization error
403ForbiddenThe resource exists, but access is not possible due to a reason other than an authorization error.
404Not FoundThe resource doesn’t exist
500Internal Server ErrorAn error on the API server side
503Service UnavailableThe API cannot be used temporarily

Response Body​

N/A

Notes​

1.Keys can be up to 32 bytes in size. Values can be up to 1024 bytes in size.

2.Maximum number of key/value pairs are 30 entries per user in an application.

Example.​

HTTP Request

POST /social/api/restful/v2/appdata/@me/@self/@app?format=json&fields=max_score,score
Content-Type: application/json; charset=utf8

{
"max_score" : 96,
"score" : 78
}

HTTP Response

HTTP/1.1 201 Created