I would like to know how to read and understand the following things:
the full list of the local fields (properties) of the events
how to get the reference fields (for example: to know that affectedUser is another entity/collection and so on...)
what are the supported Actions for the relevant event type and what are the actionType IDs - for example I realised that to create a comment to Incident - I should send
"actionTypeId": 438
I guess all the answers should come from appropriate reading and understanding of the schema, but could you share any suggestions and hints on the above.
Also another question from my side:
what about the custom fields and how to discover them
how to change the Status of an event?
Thank you very much in advance. appreciate it
Kind regards,
Stefan Hristov
Page 1 / 1
Hi Stefan,
I will attempt to provide some answers where I can.
the full list of the local fields (properties) of the events
Another useful example to take this one step further. Pulling the parent event details when pulling task or decision information and drilling into the users related properties…
what are the supported Actions for the relevant event type and what are the actionType IDs - for example I realised that to create a comment to Incident
Actions are defined by system admins (with the exception of some of the core actions). I think this could be different for each of us. The easiest way to find an id of anything in the system is to look at the URL when viewing the entity. The below is an example of an action with the id of 326…
If you mean (for example) resolving an event, you can do this by posting an action. The body of an Api can be built using XML or Json, whichever you are more comfortable with. I have included an example from our workings to get you going.
What I am more concerned is if it is possible and how to discover the data model/structure of the events via the API from the metadata/definitions (without checking on the UI). In other words to know for example:
all local fields for the events (plus all available values for the select list fields)
all reference fields
all custom fields
all action types and their IDs
all required fields when do a POST request
Are all of these possible to achieve and build the data model by using some of these endpoints from the doc:
/events/schema
/raml
/events/raml
/events/incident/definition
The last one /events/incident/definition returns this data which looks good but I noticed there some differencies with the field names - for example when I get 1 event by ID - fields like 'eventStatus’ or 'eventState’ are with other names here in this reponse (maybe there are more other field names mismatches)