member data
API Support | Available since | Last updated | Output |
---|---|---|---|
5.9900 | 5.9900 | xml, json, * |
Description
The behaviour and URL of this service is not consistent with other services, please read the description carefully.
Creates or replaces the specified personal member data and can be accessed through the following URL:
/ps/api/member-data/{memberid}/data/{name}
Or
/ps/servlet/members/{memberid}/data/{name}
Where name
can contain lowercase letters, numbers, hyphen or underscore and can have an optional alphanumeric extension after a dot which is ignored, for example public-picture.png
.
There is a limit of 16 data names per member and per name a size limit on png
or jpeg
of 10 MB and 100 KB for other data. Images are scaled down to a maximum width or height of 512 pixels.
Allowed media types
The media types that can be stored are:
Type of content | Media type |
---|---|
JPEG image | image/jpeg |
PNG image | image/png |
XML | application/xml |
Vendor-specific XML | application/[subtype]+xml |
JSON | application/json |
Vendor-specific JSON | application/[subtype]+json |
Detecting collisions
Since member data are requested and/or updated frequently, this service relies on precondition header fields to detect and prevent collisions. If the preconditions fail, this service returns an HTTP 412 Precondition Failed error, otherwise the update proceeds.
The recommended approach is to send the Etag returned by this service or the GET request in the If-Match
HTTP header. This services supports If-Match
, If-None-Match
, andIf-Unmodified-since
HTTP headers to check whether the update is possible.
Parameters
Name | Description | Required | Type | Default |
---|---|---|---|---|
title | A user friendly title for the data (e.g. Profile picture) | No | String |
We recommend that you always use entity tags when making a request to this service using If-Match HTTP
header.
Permission
Only the member themselves or an administrator can use this service.
Response
Returns the member data.
The media type is returned in the Content-Type HTTP header and is one of the allowed media types. JSON and XML response are always encoded using utf-8.
The HTTP 200 response always includes the Cache-Control , Etag , and Last-Modified HTTP headers. To detect and prevent collisions, use the entity tag to make any PUT or DELETE request on member data.
Error handling
Code | Cause / Description |
---|---|
0x102D | No member data found |
0x102E | Too many member data items (max is 16) |
0x102F | Member data exceeds maximum length |
0x1030 | Unsupported media type for member data (HTTP Status 415) |
0x1031 | Unable to process image |
0x1030 | Member data name does not match `[name].[extension]` |
0x1030 | Member data name should not exceed 250 characters |
0x1031 | Member data has been modified since update attempt |
0x1032 | Member data is invalid if XML or JSON cannot be parsed |
Maximum length for text: 100kb.
Maximum length for images: 10Mb.