System Logs
Troubleshooting APIs
An unsuccessful SystemLog API request returns the following information in the response body:
- Type: A link to the standard HTTP response code.
- Details: A brief description of the error.
-
parameters: An optional JSON object to provide extra error information.
Sample API error response
{
"type": "404",
"detail": "resource not found",
"parameters":
{
"name": "entityType",
"value": "the request URL"
}
}
<!--NeedCopy-->
API 1: GET/ Records
- This API is called to get system log records in the specified time range.
- It will return all the records in that time range. If there are more records than the default take count it will return a continuation token that can be used for getting the remaining records.
GET query parameters
-
StartDateTime
- Start date from which logs need to be retrived.
- Should be specified as yyyy-MM-ddTHH:mm:ssZ.
- All DateTimes are in UTC.
- If not specified default value is DateTime.MinValue.
-
EndDateTime
- End date to which logs need to be retrived.
- Should be specified as yyyy-MM-ddTHH:mm:ssZ.
- All DateTimes are in UTC.
- If not specified default value is DateTime.Now.
-
Limit
- Number of records to be retrived.
- Default value is 50.
-
ContinuationToken
- If there are more than the Limit value number of records the API will return a ContinuationToken.
- The caller should pass this in the next request to get the next page.
- The caller is not expected to modify the ContinuationToken.
Response codes
The following section lists the response codes for the APIs with examples.
200 OK
GET/ records
Records retrived successfully
{
"Items": [{
"RecordId": null,
"UtcTimestamp": "2020-07-20T14:26:59.6103585Z",
"CustomerId": "hulk",
"EventType": "delegatedadministration:administrator/create",
"TargetId": "6233644161364977157",
"TargetDisplayName": "[testcduser1@gmail.com](mailto:testcduser1@gmail.com)",
"TargetEmail" : "[testcduser1@gmail.com](mailto:testcduser1@gmail.com)",
"TargetUserId": "a90b4449675f4fcf97e1663623334d74",
"TargetType": "administrator",
"BeforeChanges": null,
"AfterChanges": {
"CustomerId": "hulk",
"Principal": "[testcduser1@gmail.com](mailto:testcduser1@gmail.com)",
"UserId": "6233644161364977157",
"AccessType": "Full",
"CreatedDate": "07/20/2020 14:26:53",
"UpdatedDate": "07/20/2020 14:26:53",
"DisplayName": "Rafa Doe",
"Pending": "False"
},
"AgentId": "delegatedadministration",
"ServiceProfileName": null,
"ActorId": null,
"ActorDisplayName": "CwcSystem",
"ActorType": "system",
"Message": {
"en-US": "Created new administrator user '6233644161364977157'.",
"de-DE": "Der neue Administratorbenutzer '6233644161364977157' wurde erstellt.",
"es-ES": "Se ha creado el usuario administrador "6233644161364977157".",
"fr-FR": "L'utilisateur administrateur '6233644161364977157' a été créé.",
"ja-JP": "新しい管理者ユーザー '6233644161364977157' を作成しました。"
}
}],
"Count": 74,
"EstimatedTotalItems": 250,
"ContinuationToken": "+RID:~ry4EAPqekBg-KQAAAAAAAA==#RT:1#TRC:74#ISV:2#IEO:65551#FPC:AgEAAQA4AD+pAcD/HzAAIkD/HwAUwQkABhEAABjxAsAAH4ACgKEAABi0BsAAYAAAYAADEQAMABEABgBhAAAwATAAcQBgADEAFADBBeABggj+//8fQRkAoPIFAMAPALEA+AGDBOBBYCMQACEAAP8RQH8A"
}
<!--NeedCopy-->
400 Validation Errors
GET/ records
PUT/ personalizations/{id}
- Based on the validation errors. The Customer must be notified to enter the specific fields.
Case 1: DateTime range is invalid
Error 1
{
"type": "https://errors-api.cloud.com/systemlog/getRecordsDateTimeRangeInvalid",
"detail": "Start DateTime cannot be after the end DateTime.",
"parameters": {
"startDateTime": "2020-07-25T00:00:00Z",
"endDateTime": "2020-07-24T19:31:10Z"
}
}
<!--NeedCopy-->
Error 2
{
"type": "https://errors-api.cloud.com/systemlog/getRecordsDateTimeRangeInvalid",
"detail": "Invalid value provided for startDateTime.",
"parameters": {
"startDateTime": "invalid"
}
}
<!--NeedCopy-->
Case 2: Limit count is more than the max limit count
{
"type": "https://errors-api.cloud.com/common/outOfRange",
"detail": "Maximum items per page is between 1 and 200",
"parameters": {
"limit": "10000000"
}
}
<!--NeedCopy-->
Case 3: Limit is invalid
{
"type": "https://errors-api.cloud.com/systemlog/getRecordsLimitInvalid",
"detail": "Invalid value provided for limit.",
"parameters": {
"limit": "invalid"
}
}
<!--NeedCopy-->
401 UnAuthorized
GET/ records
Case 1: If the Authorization header is empty or missing the reason mentioned in the parameters value is missing
{
"type": "https://errors-api.cloud.com/common/authentication",
"detail": "Missing or invalid authentication details",
"parameters": [
{
"name": "reason",
"value": "missing"
}
]
}
<!--NeedCopy-->
Case 2: If the Authorization header is invalid the reason mentioned in the parameters value is invalid
{
"type": "https://errors-api.cloud.com/common/authentication",
"detail": "Missing or invalid authentication details",
"parameters": [
{
"name": "reason",
"value": "invalid"
}
]
}
<!--NeedCopy-->
403 Forbidden
If the Authorization details are provided incorrectly in the header then following error occurs:
GET/ records
Case 1: Customer (Bearer Token) details are not correct
{
"type": "https://errors-api.cloud.com/common/authorization",
"detail": "Access denied"
}
<!--NeedCopy-->
404 Not Found
GET/ records
Case 1: In case the url is not as per the swagger document
{
"type": "https://errors-api.cloud.com/systemlog/notFound",
"detail": "resource not found",
"parameters": [
{
"name": "entityType",
"value": "/personalizati"
}
]
}
<!--NeedCopy-->
500 Internal Server Error
Report these errors directly to the engineering team to help resolve the issues. Take a note of the customer ID and Transaction ID from the customer to troubleshoot further.
GET/ records
Case 1: Server Errors
{
"type": "https://errors-api.cloud.com/systemlog/internalerror",
"detail": "There was a internal issue"
}
<!--NeedCopy-->
Troubleshooting APIs
In this article
Copied!
Failed!