# testing the Event Portal REST API

**URL:** <https://community.solace.com/t/testing-the-event-portal-rest-api/308>\
**Category:** Solace Event Portal\
**Tags:** rest, event-portal\
**Created:** [July 2, 2020, 1:35pm UTC](https://community.solace.com/t/testing-the-event-portal-rest-api/308 "2020-07-02T13:35:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Magali\_Boulet](https://yyz1.discourse-cdn.com/solace/user_avatar/community.solace.com/magali_boulet/32/2362_2.png) [@Magali\_Boulet](https://community.solace.com/u/Magali_Boulet)\
**Post date:** [July 2, 2020, 1:35pm UTC](https://community.solace.com/t/testing-the-event-portal-rest-api/308/1 "2020-07-02T13:35:40Z")

</div>

You can easily test the REST API of the Event Portal. Here is some examples I tested.  
First, follow this section [PubSub+&nbsp;Cloud](https://docs.solace.com/Solace-Cloud/Event-Portal/Event-Portal-REST-API.htm) 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}](https://solace.cloud/api/v1/eventPortal/applicationDomains?name=%7BnameOfYourDomain%7D)  
you will get a JSON as the reply and you’ll be able to use the value of the `id` element
- then you can run `GET` on [https://solace.cloud/api/v1/eventPortal/events?applicationDomainId={theIdYouHaveRetrieved}](https://solace.cloud/api/v1/eventPortal/events?applicationDomainId=%7BtheIdYouHaveRetrieved%7D) 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](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).

---

<div class="post-metadata">

**Author:** ![marc](https://yyz1.discourse-cdn.com/solace/user_avatar/community.solace.com/marc/32/2191_2.png) [@marc](https://community.solace.com/u/marc)\
**Post date:** [July 2, 2020, 2:47pm UTC](https://community.solace.com/t/testing-the-event-portal-rest-api/308/2 "2020-07-02T14:47:10Z")

</div>

That’s great, thanks for sharing @Magali_Boulet! I haven’t had a chance to play with the event portal REST API yet myself 🙂  
Because the API is defined via OpenAPI you can also use this page to try out other parts of the API as well: [http://openapi.solace.cloud/](http://openapi.solace.cloud/)
