You can easily test the REST API of the Event Portal. Here is some examples I tested.
First, follow this section PubSub+ Cloud to get your access token (you’ll need it to perform all of these requests).
How to retrieve events from an application domain?
- First you need to get your domain ID: run
GET
on https://solace.cloud/api/v1/eventPortal/applicationDomains?name={nameOfYourDomain}
you will get a JSON as the reply and you’ll be able to use the value of theid
element - then you can run
GET
on https://solace.cloud/api/v1/eventPortal/events?applicationDomainId={theIdYouHaveRetrieved} and you’ll get the list of all the events from this domain
How to create events?
Here is an example of a payload to create an event (this payload has to be sent with POST
verb on https://solace.cloud/api/v1/eventPortal/events)
{
“applicationDomainId”: “{theIdYouHaveRetrieved}”,
“description”: “Customer Account”,
“name”: “customerAccount”,
“revisionComment”: “customerAccount”,
“schemaId”: null,
“shared”: false,
“topicName”: “myDomain/customerAccount/account/v1/{accountId}”,
“type”: “event”,
“version”: “1.0”
}
All these requests can be tested using Postman for instance (this is what I used).