System Events

System Events

Resource: System Events ( /api/systemevents )

System Events (Collection) resource, for fetching all or a subset of system events

This resource supports the following methods: DELETE, GET, POST

 

Methods

DELETE


Delete all System Events associated with a link

Status Codes

These are the expected status codes returned by the service. In addition, some other status codes may be returned if either an internal error occurs or there is an authentication issue (such as an expired OAuth token).

Status

Description

200 - OK

Returned if the request was completed successfully.

403 - Forbidden

Returned if you dont not have permission to delete the synchronization event history.

404 - NotFound

Returned if the link does not exist.

 

Example - Delete all events

 

Delete all system events associated with a link.

Request Parameters

Key

Value

Description

linkId

FAA5DCCA-1CE4-428F-9508-9F961AFFE895

The ID of the external system link you wish to remove all system events for.

Response Headers

Key

Value

Description

Content-Type

application/json; charset=utf-8

 

Status Code

200 - OK

 

Example - Delete all events

 

Delete all system events associated with a stored document.

Request Parameters

Key

Value

Description

documentId

FAA5DCCA-1CE4-428F-9508-9F961AFFE895

The ID of the stored document you wish to remove all system events for.

Response Headers

Key

Value

Description

Content-Type

application/json; charset=utf-8

 

Status Code

200 - OK

 

 

GET


Retrieves all (or a subset) of external systems events

This method supports the OData parameters $filter, $top, $take, $orderby and $inlinecount. See OData Topic for more details.

Status Codes

These are the expected status codes returned by the service. In addition, some other status codes may be returned if either an internal error occurs or there is an authentication issue (such as an expired OAuth token).

Status

Description

200 - OK

Returned if the request was completed successfully.

 

Example - Get events matching query

 

Get system events matching the supplied OData query

Request Headers

Key

Value

Description

Accept

application/json

 

Request Parameters

Key

Value

Description

$filter

Level eq 'ERROR' AND LinkId eq 'FAA5DCCA-1CE4-428F-9508-9F961AFFE895'

OData query to return everything with a Level of 'ERROR'

Response Headers

Key

Value

Description

Content-Type

application/json; charset=utf-8

 

Response Body

{ "Skip": 0, "Top": 25, "Total": 1, "Items": [ { "Id": "5a416dff-a4cd-4e46-a702-7a55fbc252a0", "OccurredAt": "2012-01-01T14:45:05Z", "LinkId": "faa5dcca-1ce4-428f-9508-9f961affe895", "SystemId": "5d4970a6-bdcc-4816-970f-eab5943279d4", "ReferenceId": "90b23d7b-87c3-41fb-a5f8-e08af9395f48", "Message": "Synchronization succeeded", "Type": "CompileSynchronizationContextTask", "Source": "Synchronization", "EntityType": "Requirement", "EntityId": "a2466924-9267-47ba-8959-d0d7741d5fc9", "Level": "ERROR", "Self": "http://localhost/api/systemevent/5a416dff-a4cd-4e46-a702-7a55fbc252a0", "Links": [ { "Href": "http://localhost/api/api/externalsystem/5d4970a6-bdcc-4816-970f-eab5943279d4", "Rel": "ExternalSystem" }, { "Href": "http://localhost/api/api/externalsystemlink/faa5dcca-1ce4-428f-9508-9f961affe895", "Rel": "ExternalSystemLink" } ] } ] }

Status Code

200 - OK

 

 

POST


Adds a new system event to the log

Required Permissions

  • Administration

Status Codes

These are the expected status codes returned by the service. In addition, some other status codes may be returned if either an internal error occurs or there is an authentication issue (such as an expired OAuth token).

Status

Description

201 - Created

Returned if the request was completed successfully.

403 - Forbidden

Returned if you dont not have permission to delete the synchronization event history.

404 - NotFound

Returned if the link does not exist.

 

Example - Create new event

 

Post new system event (associated with a stored document)

Request Body

{ "DocumentId": "143138cb-7e6c-4658-96d9-ea60f9385583", "Type": "ExecutionPlan", "Message": "Planning report generated in 5 minutes 33 seconds.", "Source": "Synchronization", "Level": "INFO" }

Response Headers

Key

Value

Description

Content-Type

application/json; charset=utf-8

 

Response Body

{ "Id": "25ae0770-8960-49fc-8a0c-a7c3aa5d2d9f", "OccurredAt": "2012-01-01T14:45:05Z", "DocumentId": "143138cb-7e6c-4658-96d9-ea60f9385583", "Message": "Planning report generated in 5 minutes 33 seconds.", "Type": "ExecutionPlan", "Source": "Synchronization", "Level": "INFO", "Self": "http://localhost/api/systemevent/25ae0770-8960-49fc-8a0c-a7c3aa5d2d9f" }

Status Code

201 - Created