GET /api/:space/member-messages

Description:

Returns a list of member messages for a specified space.

This assumes that messages have first been generated otherwise no data will be returned and the value of the "totalRecordsFound" variable in metadata will be 0.

GET responses can be filtered out based on the member-messages parameters to narrow down the results.

Resource URL:

https://<apphost>.competitionlabs.com/api/<your-space>/member-messages

Request header

KeyValueRequired
X-API-KEY

Yes
Content-Type
application/jsonYes

Request URL parameter

Parameter
Type
Required
Description
space
StringYesThis is the space name which is linked to the account


Example:

Request
curl
--header "X-API-KEY: <your-api-key>"
--request GET https://app.competitionlabs.com/api/<your-space>/member-messages?_limit=20&_skip=0&_sortByFields=created:desc
Response
{
	"meta": {
		"time": "2021-06-01T08:51:15.388Z",
		"totalRecordsFound": 5,
		"skip": 0,
		"limit": 20
	},
	"data": [{
		"jsonClass": "MemberMessage",
		"accountId": "TOQR32kB2TUmRj7Y-123",
		"memberId": "8W9033AByU-7qJmnbO4C",
		"eventRefType": "AchievementType",
		"eventReferenceId": "13U21HABb04K7-5xQMFl",
		"messageType": "Achievement",
		"subject": "test",
		"body": "",
		"status": "New",
		"created": "2020-03-15T18:48:39.118+0000",
		"metadata": [{
			"jsonClass": "Metadata",
			"key": "icon",
			"value": "6OwBqXABnvGGsQQTfHFp"
		}],
		"id": "GB-G33ABWweu1ZXez1LO"
	}, {
		"jsonClass": "MemberMessage",
		"accountId": "TOQR32kB2TUmRj7Y-123",
		"memberId": "8W9033AByU-7qJmnbO4C",
		"eventRefType": "AchievementType",
		"eventReferenceId": "1Lo61HABJC0TQpJJWByc",
		"messageType": "Achievement",
		"subject": "test2",
		"body": "",
		"status": "New",
		"created": "2020-03-15T18:48:39.117+0000",
		"metadata": [{
			"jsonClass": "Metadata",
			"key": "icon",
			"value": "6OwBqXABnvGGsQQTfHFp"
		}],
		"id": "Fh-G33ABWweu1ZXez1LN"
	}, {
		"jsonClass": "MemberMessage",
		"accountId": "TOQR32kB2TUmRj7Y-123",
		"memberId": "8W9033AByU-7qJmnbO4C",
		"eventRefType": "AchievementType",
		"eventReferenceId": "3HU-1HABb04K7-5xp8Hv",
		"messageType": "Achievement",
		"subject": "test3",
		"body": "",
		"status": "New",
		"created": "2020-03-15T18:29:22.437+0000",
		"metadata": [{
			"jsonClass": "Metadata",
			"key": "icon",
			"value": "6OwBqXABnvGGsQQTfHFp"
		}],
		"id": "pfB133ABWweu1ZXeKSWF"
	}...]
}