Post Alert

The SCR API provides a create operation, Post Alert, to allow GP Systems to record TMS Event Service (TES) Alerts centrally.

Endpoint
https://[baseURL]/AuditEvent
Query
POST https://[baseUrl]/AuditEvent 
Payload
SCR-Alert-AuditEvent 

Post Alert sequence diagram

AuditEvent

Example Post Alert call

POST https://[baseUrl]/AuditEvent /HTTP/1

Example Post Alert call payload

The resource cannot be rendered.

Element 'role' is not in the correct order At AuditEvent.agent[2].role[0], line 42, position 6

Example Post Alert success response

Returns a minimal response, i.e. just the successful http status, on successful write to the repository.

HTTP/1.1 201 Created
Date: Tue, 24 Aug 2020 11:00:00 GMT
Content-Type: application/fhir+json

Example Post Alert failure response

Returns an operationOutcome on failure. Error handling is in line with Spine Error Codes II [NB: internal Confluence link].

HTTP/1.1 400 Bad Request
Date: Tue, 24 Aug 2020 11:00:00 GMT
Content-Type: application/fhir+json
{
  "resourceType": "OperationOutcome",
  "id": "27242108-f2ee-429c-a387-ace44bb87f40",
  "issue": [
    {
      "severity": "error",
      "code": "invalid",
      "details": {
        "text": "Bad Request"
      }
    }
  ]
}