Skip to main content

Good morning/afternoon.
I'm not very familiar with the Rest API and currently I’m developing a project that will automate some events in my workspace, and I'm having a hard time retrieving the full description of an event from a request. I can get the short description, the custom fields, and basically every other piece of data I've looked for — but I can't retrieve the full description.

I've already tried the following (and other similar) requests:


/assystREST/v2/events/{event_id}

/assystREST/v2/events/{event_id}?fields=customFields,customFields.singleSelectValue,customFields.systemLookupValue,customFields.multiSelectValues
 

I also know it's probably not under actions, but I tried this as well:
/assystREST/v2/actions?eventId={event_id}


At the image you can see what I’m looking for.
 


Thank you in advance for your support.

Hi 😊

I hope you got help elsewhere as it looks like this was posted in the wrong sub-forum for this type of question, and thus seems to have fell off the radar.

In case this is still an open question, what you're looking for is the use of fields=remarks when you want event plain and/or rich text remarks . 

Examples:

Simple request for an event, with all its standard fields plus remarks (rich remarks will also be included):

assystREST/v2/events/{event_id}.json?fields=remarks

 

In your last example, where you use the action endpoint, the action’s remark should be included by default. However, to get the event's remark, you again need to expand into the event remarks but with a slight variation. From an action you would first need to expand into the event, and then retrieve the event remark using something like fields=event.remarks.

Here, an example where a list of action IDs is used as the main query parameter, and we then fetch the associated event and remarks through field expansion:

assystREST/v2/actions.json?id=action_id1,action_id2,action_id3&fields=event.remarks

 

Your second example includes custom fields, but the use of field expansion without any filtering can lead to needlessly verbose responses, which can be expensive for the application server to respond to at a large scale.  As a final example, here’s one that incorporates both event remarks and custom fields but filters most of the unmentioned event attributes:

assystREST/v2/actions.json?eventId={event_id}&fields=event[remarks,customFields,customFields.singleSelectValue,customFields.systemLookupValue,customFields.multiSelectValues]

(Please note: this last example uses the action endpoint only for demonstration purposes. The same result could be achieved using the events endpoint, with some modifications to the field expansion to include actions. The use of filtering can also quickly become confusing and time-consuming to construct when expanding and filtering multiple layers deep. As a beginner, I would recommend staying away from deeply nested expansions.)

 

I hope this can be of help~ 

 

Best regards,
Richard