Profile data
7 routes. Paths are relative to https://api.intersink.com/v1.
- GET/profiles/{profileId}/dataThe namespaces of a profile of this channel you may read (no documents)
- GET/profiles/{profileId}/data/{ns}One namespace of another profile of this channel (shared ones only)
- GET/profiles/data/{ns}One namespace for many profiles of this channel (e.g. every player in a room)
- GET/profiles/me/dataThe app data namespaces on your profile in this channel (no documents)
- GET/profiles/me/data/{ns}One app data namespace on your profile in this channel
- PUT/profiles/me/data/{ns}Replace one app data namespace on your profile (conditional write)
- DELETE/profiles/me/data/{ns}Delete one app data namespace on your profile (If-Match: its version)
The namespaces of a profile of this channel you may read (no documents)
GET/profiles/{profileId}/data
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| profileIdrequired | string, path |
Response
200. The payload in data is not described in the spec yet.
One namespace of another profile of this channel (shared ones only)
GET/profiles/{profileId}/data/{ns}
Needs a signed-in user (Bearer token or access_token cookie).
Signed-in users of the same channel read namespaces with visibility "channel"; the channel's servers (secret key, profile_data:read) read all. Never across channels.
Parameters
| Name | Type | Description |
|---|---|---|
| profileIdrequired | string, path | |
| nsrequired | string, path |
Response
200. The payload in data is of type object.
One namespace for many profiles of this channel (e.g. every player in a room)
GET/profiles/data/{ns}
Needs a signed-in user (Bearer token or access_token cookie).
profile_ids: comma-separated, at most 100. Signed-in users get the namespaces shared with the channel; the channel's servers (secret key, profile_data:read) get all.
Parameters
| Name | Type | Description |
|---|---|---|
| nsrequired | string, path | |
| profile_idsrequired | string, query |
Response
200. The payload in data is not described in the spec yet.
The app data namespaces on your profile in this channel (no documents)
GET/profiles/me/data
Needs a signed-in user (Bearer token or access_token cookie).
Response
200. The payload in data is not described in the spec yet.
One app data namespace on your profile in this channel
GET/profiles/me/data/{ns}
Needs a signed-in user (Bearer token or access_token cookie).
A namespace that does not exist yet answers version 0 with data null. The ETag header is the version.
Parameters
| Name | Type | Description |
|---|---|---|
| nsrequired | string, path |
Response
200. The payload in data is of type object.
Replace one app data namespace on your profile (conditional write)
PUT/profiles/me/data/{ns}
Needs a signed-in user (Bearer token or access_token cookie).
Body {"data": {…}, "visibility"?: "private"|"channel", "version"?: n}. Send the version you replace as If-Match: "n" (or body version); 0 / If-None-Match: * creates. 409 on a version conflict, 428 without a version, 413 over 32 KB per namespace or 128 KB per profile.
Parameters
| Name | Type | Description |
|---|---|---|
| nsrequired | string, path | |
| if-match | string, header | |
| if-none-match | string, header | |
| If-None-Match | string, header | |
| If-Match | string, header |
Request body application/json
| Field | Type | Description |
|---|---|---|
| datarequired | object | |
| visibility | string | One of: "private", "channel". |
| version | integer | Minimum 0. |
Response
200. The payload in data is of type object.
Delete one app data namespace on your profile (If-Match: its version)
DELETE/profiles/me/data/{ns}
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| nsrequired | string, path | |
| if-match | string, header | |
| If-Match | string, header |
Response
200. The payload in data is not described in the spec yet.