Create Appdata
- Description
- URI Fragment
- Supported Formats
- HTTP Method
- Request Parameters
- Request Headers
- Request Body
- Response Status Code
- Response Body
- Notes
- Example.
Description
Create Appdata for your application.
URI Fragment
/appdata/{userId}/{groupId}/{appId}
Supported Formats
JSON
HTTP Method
POST
Request Parameters
| Name | Type | Required | Parameter | Description |
|---|---|---|---|---|
| userId | UserId | * | URI Template Parameters | Only @me is specifiable |
| groupId | GroupId | * | URI Template Parameters | Only @self is specifiable |
| appId | AppId | * | URI Template Parameters | Only @app is specifiable |
| fields | Array | * | Query String | The keys of appdata are specifiable |
| format | String | Query String | Only 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 Code | HTTP Status Message | Meaning |
|---|---|---|
| 201 | Created | Data successfully created or updated |
| 400 | Bad Request | Corrupt request data on the client side |
| 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 |
| 500 | Internal Server Error | An error on the API server side |
| 503 | Service Unavailable | The 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