Authentication and AuthorizationSee article Informations on authentication. Request logsRequest: - Endpoint: cloud-service-logging/accounts/$account/logs/paginated
- Method: GET
- URL Params:
- lang EN/DE
- limit 1..200
- categories OTHER, DEVICE
- marker string
Response: Codeblock |
---|
{
"logs": [{
"id": uuid,
"messageId": string, // format 5 digit
"created": timestamp, // yyyy-mm-ddThh:mm:ss.SSSZ
"properties":{
"auditEntityId": uuid,
"auditNewValue": string,
"auditOldValue": string,
"auditSourceIp": string, // IPv4 address
"auditEntityName": string,
"auditEntityType": string,
"auditSourceAgent": string,
"auditOldValueChange": string,
"auditNewValueChange": string
},
"references":[
{
"id": uuid,
"type": string // account, addin, device, network, principal, site, page
},
{
"id": uuid,
"type": string,
"name": string
}],
"data":[],
"accountId": uuid,
"originatorId": uuid,
"serviceId": uuid,
"serviceName": string,
"logLevel": string, // INFO, WARNING, ERROR
"message": string
"isAuditLog": boolean
},
...
],
"next": string, // this parameter is optional
"previous": string // this parameter is optional
} |
MarkersThe log messages API returns up to two markers: next and previous. These markers have the following format: Codeblock |
---|
{
"type": string // NEXT_PAGE, PREVIOUS_PAGE
"logCreatedAt": timestamp // seconds from 1/1/1970
"logPersistedAt": timestamp // seconds from 1/1/1970
} |
The marker is the url-encoded version of next field. It is possible to request the logs newer than a specific timestamp: Codeblock |
---|
curl -X GET -H "accept: application/json" -H "Authorization: Bearer $token" https://cloud.lancom.de/cloud-service-logging/accounts/$account/logs/paginated?lang=EN&categories=OTHER&marker=%7B%22type%22:%22PREVIOUS_PAGE%22,%22logCreatedAt%22:1613145056300000%7D |
Reference ResolutionThe log object contains different types of references, the reference format is: Codeblock |
---|
{
"id": uuid
"type": string
"name": string
} |
The id and type are mandatory and always present in the reference object. The name is optional, and present only for the reference of type principal. AccountThis reference represents the project, the organization or the distribution. Request: - Endpoint: /cloud-service-auth/accounts
- Method: GET
- URL params:
- id: list of account uuids
Response: Codeblock |
---|
[
{
"name": string,
"id": uuid,
"parent": uuid,
...
"identifier": string,
"created": timestamp, // yyyy-mm-ddThh:mm:ss.SSS+ZZ:ZZ
...
}
] |
AddinRequest: - Endpoint: /cloud-service-config/configapplication/accounts/$account/applications
- Method: GET
Response: Codeblock |
---|
[
{
"name": string,
"enabled": boolean,
"type": string,
...
"id": uuid
},
...
] |
DeviceRequest: - Endpoint: cloud-service-devices/accounts/$account/devices
- Method: GET
- URL params:
Response: Codeblock |
---|
[
{
"id": uuid,
"status": {
"name": string,
"serial": string,
...
},
...
}
] |
NetworkRequest: - Endpoint: /confignetwork/accounts/$account/networks
- Method: GET
Response: Codeblock |
---|
[
{
"id": uuid,
"name": string,
...
] |
PrincipalRequest: - Endpoint: /cloud-service-auth/accounts/$account/members
- Method: GET
- URL params:
Response: Codeblock |
---|
[
{
"id": uuid,
"icon": string,
"name": string,
"email": string,
...
}
] |
SiteRequest: - Endpoint: /cloud-service-devices/accounts/$account/sites
- Method: GET
- URL params:
Response: Codeblock |
---|
[
{
"name": string,
"comment": string,
...
"id": uuid,
...
}
] |
PageThe page reference has a static resolution: UUID | EN | DE |
---|
03acf5fd-aa64-4cfe-8a67-4a0f7d4a59a3 | "Notification Settings" | "Benachrichtigungseinstellungen" | b3feccdc-cd04-4e45-82f6-b4603737dda8 | "Log Download" | "Log-Download" |
Template and ReferenceThe log messages are immutable, it is not possible to change in the database. The rendering of the messages changes, we use a template to then be able to have the updated naming of devices, networks, principals... Here some template examples: Codeblock |
---|
"User {ref:f16783c3-cb0c-3727-95c1-0752f938f7a7} has logged in for this account"
"The device {ref:ce4e47f6-c374-44dd-ba58-750a06e9c363} has established its cloud connectivity." |
The string {ref:uuid} is replaced with name of the reference. Some references have the name embedded in the log messages (e.g. metric, principal), other references only specify the type and the uuid. The name resolution then requires an additional call to the corresponding API, listed above. Info |
---|
It is reccommended to cache the reference resolution in order to reduce the amount of API call. |
|