Error logs API¶
For security reason, only API users, with the role API errors can access error log. All error logs can contain private information that was submitted to the Minddistrict platform and should be used with care.
Listing errors in the Minddistrict API¶
Information about errors that occurred in the Minddistrict API is transferred as json objects containing the following information:
Example request:
GET /api/2/configuration/apiusers/errorlog/items HTTP/1.1
Host: customer.minddistrict.com
Accept: application/json
Authorization: md-token gAAAAABfxfsqpTEgwXQmWb6a1cMiWY9Hi4w7cDKpmXCjOQruO8yC6jZQLkUxTmvuNYjp88Ue4Zmc8if0E8tRbN-XT1uERctRob-LxzbAM6mARqZmJ8W9MfEkYup8lSgnbxY1PQpykH3mfMW2KBpew8uT_HT1VKdROMtyxcwuokxhqUYeGQ0VymK3sMxUda-lJTaYczH9ECFy
The response will be a list of API error objects:
HTTP/1.0 200 Ok
Cache-Control: max-age=0, no-cache, no-store, must-revalidate
Content-Length: 1698
Content-Type: application/json;charset=UTF-8
{
"@items": [
{
"@type": "http://ns.minddistrict.com/error/api",
"@url": "https://customer.minddistrict.com/api/2/configuration/apiusers/errorlog/1606810412454607",
"code": 400,
"datetime": "2020-12-01T08:13:32",
"extra": [
{
"message": "Required input is missing.",
"name": "emotion"
},
{
"message": "Required input is missing.",
"name": "intensity"
}
],
"message": "Invalid JSON input",
"payload": "{\n \"@type\": \"http://ns.minddistrict.com/diary/schema/entry#emotion:6\",\n \"dt\": \"2014-04-12T11:41:09.817177\"\n}",
"uri": "/api/2/c/cb7bae66c0104b15ac661931811fe365/diary/entries",
"user_id": "cb7bae66c0104b15ac661931811fe365"
},
{
"@type": "http://ns.minddistrict.com/error/api",
"@url": "https://customer.minddistrict.com/api/2/configuration/apiusers/errorlog/1606810411706810",
"code": 400,
"datetime": "2020-12-01T08:13:31",
"extra": null,
"message": "Invalid new relation.",
"payload": "{\n \"@type\": \"http://ns.minddistrict.com/relation\",\n \"predicate\": \"attends\",\n \"professional\": {\n \"id\": \"p1234\"\n }\n}",
"uri": "/api/2/c/cb7bae66c0104b15ac661931811fe365/relations",
"user_id": "35fb5c76bdf446f79aef960da609a39b"
}
],
"@links": [],
"@paging": {
"found": 2,
"limit": null,
"start": null,
"total": 2
}
}
API Errors have the following properties:
Name |
Value |
Explanation |
Value type |
Notes |
---|---|---|---|---|
datetime |
When this error happened |
- |
Required | |
user_id |
Internal user ID who triggered this error |
- |
String |
Required |
message |
Error message |
- |
String |
Required |
extra |
Extra information |
- |
List of mapping |
|
uri |
URI where this error occurred |
- |
String |
Required |
code |
HTTP error code |
- |
Integer |
Required |
payload |
Original payload |
- |
String |
The @type
meta information for this object is: http://ns.minddistrict.com/error/api
.
Listing errors from a Koppeltaal integration¶
Note
The Koppeltaal errors log is only available in platforms that have Koppeltaal enabled.
Information about errors that occurred in an Koppeltaal integration is transferred as json objects containing the following information:
Example request:
GET /api/2/configuration/koppeltaal/errorlog/items HTTP/1.1
Host: customer.minddistrict.com
Accept: application/json
Authorization: md-token gAAAAABfxfsqpTEgwXQmWb6a1cMiWY9Hi4w7cDKpmXCjOQruO8yC6jZQLkUxTmvuNYjp88Ue4Zmc8if0E8tRbN-XT1uERctRob-LxzbAM6mARqZmJ8W9MfEkYup8lSgnbxY1PQpykH3mfMW2KBpew8uT_HT1VKdROMtyxcwuokxhqUYeGQ0VymK3sMxUda-lJTaYczH9ECFy
The response will be a list of koppeltaal error objects:
HTTP/1.0 200 Ok
Cache-Control: max-age=0, no-cache, no-store, must-revalidate
Content-Length: 987
Content-Type: application/json;charset=UTF-8
{
"@items": [
{
"@type": "http://ns.minddistrict.com/error/koppeltaal",
"@url": "https://customer.minddistrict.com/api/2/configuration/koppeltaal/errorlog/1606810410194737",
"datetime": "2020-12-01T08:13:30",
"event_id": "8a9a401e-80ba-4f97-910a-b6d88363074e",
"event_type": "CreateOrUpdateCarePlan",
"extra": [
{
"message": "The email address is already in use.",
"name": "email"
}
],
"message": "Cannot process participant https://fhir.example.com/Practitioner/40: Cannot create professional",
"patient_link": "https://fhir.example.com/Patient/31",
"resource_link": "https://fhir.example.com/CarePlan/203",
"was_fatal": true
}
],
"@links": [],
"@paging": {
"found": 1,
"limit": null,
"start": null,
"total": 1
}
}
Koppeltaal errors have the following properties:
Name |
Value |
Explanation |
Value type |
Notes |
---|---|---|---|---|
datetime |
When this error happened |
- |
Required | |
was_fatal |
Did the error prevent the message being processed altogether |
- |
Boolean |
Required |
event_id |
Event ID |
- |
String |
Required |
event_type |
Event type |
- |
String |
Required |
resource_link |
Resource FHIR Link |
- |
String |
Required |
patient_link |
Patient FHIR Link |
- |
String |
Required |
message |
Error message |
- |
String |
Required |
extra |
Extra information |
- |
List of mapping |
The @type
meta information for this object is: http://ns.minddistrict.com/error/koppeltaal
.
Listing errors from an HL7 integration¶
Note
The HL7 errors log is only available in platforms that have HL7 enabled.
Information about errors that occurred in an HL7 integration is transferred as json objects containing the following information:
Example request:
GET /api/2/configuration/hl7/errorlog/items HTTP/1.1
Host: customer.minddistrict.com
Accept: application/json
Authorization: md-token gAAAAABfxfsqpTEgwXQmWb6a1cMiWY9Hi4w7cDKpmXCjOQruO8yC6jZQLkUxTmvuNYjp88Ue4Zmc8if0E8tRbN-XT1uERctRob-LxzbAM6mARqZmJ8W9MfEkYup8lSgnbxY1PQpykH3mfMW2KBpew8uT_HT1VKdROMtyxcwuokxhqUYeGQ0VymK3sMxUda-lJTaYczH9ECFy
The response will be a list of HL7 error objects:
HTTP/1.0 200 Ok
Cache-Control: max-age=0, no-cache, no-store, must-revalidate
Content-Length: 1059
Content-Type: application/json;charset=UTF-8
{
"@items": [
{
"@type": "http://ns.minddistrict.com/error/hl7",
"@url": "https://customer.minddistrict.com/api/2/configuration/hl7/errorlog/1606810410194791",
"code": 400,
"datetime": "2020-12-01T08:13:30",
"extra": null,
"message": "Error in A04 message \"42\" (\"email: Email address cannot contain uppercase characters.\")",
"payload": "{\n \"active\": true,\n \"date_of_birth\": \"1980-07-24\",\n \"email\": \"CLINT@EXAMPLE.COM\",\n \"first_name\": \"Clint\",\n \"gender\": \"m\",\n \"id\": \"cliff123\",\n \"last_name\": \"Clifford\",\n \"message_control_id\": \"42\",\n \"message_event_type\": \"A04\"\n }",
"uri": "/api/hl7/c/create",
"user_id": "45151b6b1a1d450b85e964e7d95dbbc9"
}
],
"@links": [],
"@paging": {
"found": 1,
"limit": null,
"start": null,
"total": 1
}
}
HL7 errors have the following properties.
Name |
Value |
Explanation |
Value type |
Notes |
---|---|---|---|---|
datetime |
When this error happened |
- |
Required | |
user_id |
Internal user ID who triggered this error |
- |
String |
Required |
message |
Error message |
- |
String |
Required |
extra |
Extra information |
- |
List of mapping |
|
uri |
URI where this error occurred |
- |
String |
Required |
code |
HTTP error code |
- |
Integer |
Required |
payload |
Original payload |
- |
String |
The @type
meta information for this object is: http://ns.minddistrict.com/error/hl7
.