<back to all web services
ExternalEvents
Requires Authentication
| Requires the role: | EventPublisher |
The following routes are available for this service:| POST | /client/{externalOrganizationId}/events | Accepts and stores a collection of IoT events from an external system. | |
|---|
ExternalEvents Parameters:| Name | Parameter | Data Type | Required | Description |
|---|
| ExternalOrganizationId | path | string | Yes | External Organization Id |
| Events | body | List<ExternalOrganizationEvent> | No | |
ExternalOrganizationEvent Parameters:| Name | Parameter | Data Type | Required | Description |
|---|
| AccessId | form | string | No | |
| Timestamp | form | DateTime | No | |
| Event | form | int | No | |
| EventData | form | Object | No | |
| EventType | form | string | No | |
| AccessPointId | form | string | No | |
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
HTTP + XML
The following are sample HTTP requests and responses.
The placeholders shown need to be replaced with actual values.
POST /client/{externalOrganizationId}/events HTTP/1.1
Host: api.4spaces.io
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<ExternalEvents xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Viviot.Api.ServiceModel.Api.Business">
<Events xmlns:d2p1="http://schemas.datacontract.org/2004/07/Viviot.Infrastructure.Dto.Organization">
<d2p1:ExternalOrganizationEvent>
<d2p1:access_id>String</d2p1:access_id>
<d2p1:access_point_id>String</d2p1:access_point_id>
<d2p1:event>0</d2p1:event>
<d2p1:event_data />
<d2p1:event_type>String</d2p1:event_type>
<d2p1:timestamp>0001-01-01T00:00:00</d2p1:timestamp>
</d2p1:ExternalOrganizationEvent>
</Events>
<ExternalOrganizationId>String</ExternalOrganizationId>
</ExternalEvents>