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).

StatusDescription
200 - OKReturned if the request was completed successfully.
403 - ForbiddenReturned if you dont not have permission to delete the synchronization event history.
404 - NotFoundReturned if the link does not exist.

Example - Delete all events

Delete all system events associated with a link.

Request Parameters

KeyValueDescription
linkIdFAA5DCCA-1CE4-428F-9508-9F961AFFE895The ID of the external system link you wish to remove all system events for.

Response Headers

KeyValueDescription
Content-Typeapplication/json; charset=utf-8

Status Code

200 - OK

Example - Delete all events

Delete all system events associated with a stored document.

Request Parameters

KeyValueDescription
documentIdFAA5DCCA-1CE4-428F-9508-9F961AFFE895The ID of the stored document you wish to remove all system events for.

Response Headers

KeyValueDescription
Content-Typeapplication/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).

StatusDescription
200 - OKReturned if the request was completed successfully.

Example - Get events matching query

Get system events matching the supplied OData query

Request Headers

KeyValueDescription
Acceptapplication/json

Request Parameters

KeyValueDescription
$filterLevel eq 'ERROR' AND LinkId eq 'FAA5DCCA-1CE4-428F-9508-9F961AFFE895'OData query to return everything with a Level of 'ERROR'

Response Headers

KeyValueDescription
Content-Typeapplication/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).

StatusDescription
201 - CreatedReturned if the request was completed successfully.
403 - ForbiddenReturned if you dont not have permission to delete the synchronization event history.
404 - NotFoundReturned 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

KeyValueDescription
Content-Typeapplication/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

  • No labels