CLIENT PROPERTIES

The page is split out from the Property Configuration page, as the logic is very different. It does exist on the same route though, as they share the same requirements.

The actions here focus on manipulating the resulting Custom Properties on the Event.


Client Property Object

Client Properties resemble Custom Properties but with additional information. If they exist, AdditionalProperties will be included too.

{
  "name": "PropertyName",
  "displayName": "Property DisplayName",
  "type": 0,
  "category": "CustomPropertyCategory",
  "key": "CustomPropertyKey",
  "defaultValue": "DefaultValue",
  "value": "ActualValue",
  "required": false,
  "additionalProperties": null
}

Client Property Dictionaries:

When submitted data to these APIs, it is common to need to submit a Values dictionary property, which is combined with the specified Property Configuration to generate the Custom Properties.

The structure of this should be that the Key matches up to the Name of the property in the template. For example, for the following property:

{
  "name": "Identifier1",
  "displayName": "Test Property",
  "type": "TextField",
  "category": "Category",
  "key": "TextFieldData",
  "defaultValue": "DefaultValue",
  "required": false
}

We would have a Dictionary entry like this: "Identifer1": "my-new-value"

Which would result in a Custom Property like this:

{
  "Category": "Category",
  "Key": "TextFieldData",
  "Value": "my-new-value"
}

Therefore, when building a Values dictionary, you would expect something like this:

{
  "Values": {
    "Identifier1": "my-new-value",
    "Identifier2": "my-second-value",
    "Identifier3": "my-third-value"
  }
}

Supported Actions

POST /clientproperty/validate/

Validate a set of properties against a template requirements.

Request Body:

{
  "TemplateId": "82255191-f998-4326-b1e9-179bfa1b032f",
  "Values": {
    "ExampleKey" : "ExampleValue"
  }
}

Response: 200 OK and JSON containing any error messages.

{
    "prop1": "Value (test) for Synopsis (EN) must be one of the following: '[\r\n  \"dasy\",\r\n  \"ensy\",\r\n  \"fisy\",\r\n  \"nosy\"\r\n]'",
    "prop3": "Value test for IsLive should be a boolean."
}

Note: If not valid, the response will still be a 200 OK.


POST /clientproperty/{eventId}

Add Custom Properties to the Event using a template.

The values must pass validation for any to be added to the Event. Additionally, all properties associated with an existing template will be removed.

Request Body:

{
  "TemplateId": "",
  "Values": {}
}

Response: 201 Created or 400 Bad Request if the Values are invalid.


PUT /clientproperty/{eventId}

Update the Client Property values for an Event.

Request Body:

{
  "Values": {}
}

Behaviour is the same as above, except it updates the Custom Properties rather than overwriting them. You also do not need to specify the TemplateId as that is unused.


GET /clientproperty/{eventId}

Get Client Properties for the given Event Id where the values will pulled from Custom Properties on the Event.

Response:

200 OK and a JSON array containing multiple Client Property objects.

or

204 No Content if no template is set on the Event.


GET /clientproperty/template{templateId}

Get Client Properties for the template by Property Configuration Id

Behaviour is the same as above, except each property’s Value will be always be empty.


GET /clientproperty/template/reference/{referenceId}

Get Client Properties for the template by Property Configuration Reference Id.

Behaviour is the same as above.


DEL /clientproperty/{eventId}

Delete Client Properties from an Event.

Response: 410 Gone