UNI-Cloud API 1.1

Homepage Integration

Overviewchevron_right
Endpointschevron_right

API Changelog

Please beware that the documentation is still in Alpha!

Logs

Logs refers to the exports a device can make. This endpoint can be used to view, edit, delete exports, and even to download exports. To retrieve a log, you can get a Log object.

Endpoints
1linkGET /v1/Logs

2linkGET /v1/Logs/{id}

3linkPUT /v1/Logs/{id}

4linkDELETE /v1/Logs/{id}

5linkGET /v1/Logs/{id}/download

6linkPUT /v1/Logs/{id}/unread

7linkGET /v1/Logs/new/count

The Log Model

Attributes
chevron_right
  • IdGUID

    The identifier of the log.
  • projectIdGUID

    The identifier of the project that created the log.
  • fileNamestring

    The log's file name.
  • isOpenedbool

    Whether the log has been opened.
  • isDiagnosticbool

    Whether the log is a diagnostic log.
  • createdDateDateTime

    The creation date of the log.
  • lastUpdatedDateTime

    The last updated date of the log.
The Log Model
1link{

2link "projectId": "string",

3link "fileName": "string",

4link "isOpened": true,

5link "isDiagnostic": true,

6link "id": "string",

7link "createdDate": "2023-01-04T14:58:18.223Z",

8link "lastUpdated": "2023-01-04T14:58:18.223Z"

9link}

The Log Model
1linkexport interface Log {

2link id: string;

3link projectId: string;

4link fileName: string;

5link isOpened: boolean;

6link isDiagnostic: boolean;

7link createdDate: Date;

8link lastUpdated: Date;

9link}

The Log Model
1linkpublic class Log

2link{

3link public Guid Id { get; set; }

4link public Guid ProjectId { get; set; }

5link public string FileName { get; set; }

6link public bool IsOpened { get; set; }

7link public bool IsDiagnostic { get; set; }

8link public DateTime CreatedDate { get; set; }

9link public DateTime LastUpdated { get; set; }

10link}

linkGET Retrieve all Logs

ReadOnly

HTTP-Get handler that retrieves all the logs of the user making the request.

Parameters
chevron_right
    No parameters.

Returns
chevron_right

    A list of all logs of the user.

    Managers retrieves all logs under the user's tenant.

get
1linkGET https://api.marxact.com/v1/Logs HTTP/1.1

2linkAuthorization: Bearer {{token}}

response
1linkHTTP/1.1 200 OK

2linkContent-Type: application/json

3link[

4link { Log_1 },

5link ...

6link { Log_n },

7link]

linkGET Retrieve a Log by ID

ReadOnly

HTTP-Get handler that retrieves a log of the user making the request.

Parameters
chevron_right
  • IdGuid

    The identifier of the log

Returns
chevron_right

    The given log with the corresponding identifier owned by the user making the request, or 404 when it doesn't exist.

    Managers are capable or retrieving logs under the user's tenant.

get
1linkGET https://api.marxact.com/v1/Logs/{id} HTTP/1.1

2linkAuthorization: Bearer {{token}}

response
1linkHTTP/1.1 200 OK

2linkContent-Type: application/json

3link{

4link "result": {},

5link "value": {

6link Log,

7link }

8link}

linkPUT Update a log by ID

Admin

HTTP-Put handler that updates a log with the corresponding identifier.

Route Parameters
chevron_right
  • IdGuid

    The identifier of the log

Body
chevron_right
  • modelLog

    The updated log.

Returns
chevron_right

    The updated log when succesful.

put
1linkPUT https://api.marxact.com/v1/Logs/{id} HTTP/1.1

2linkAuthorization: Bearer {{token}}

3linkContent-Type: application/json

4link{

5link Log

6link}

response
1linkHTTP/1.1 200 OK

2linkContent-Type: application/json

3link{

4link UpdatedLog,

5link}

linkDELETE Delete a log by ID

Admin

HTTP-Delete handler that deletes a log wiht the corresponding identifier.

Parameters
chevron_right
  • IdGuid

    The identifier of the log

Returns
chevron_right

    The deleted log when succesful.

delete
1linkDELETE https://api.marxact.com/v1/Logs/{id} HTTP/1.1

2linkAuthorization: Bearer {{token}}

response
1linkHTTP/1.1 200 OK

2linkContent-Type: application/json

3link{

4link DeletedLog,

5link}

linkGET Download a Log

ReadOnly

HTTP-Get handler that retrieves a stream to download the log of the user making the request.

Parameters
chevron_right
  • IdGuid

    The identifier of the log

Returns
chevron_right

    A stream of the log with the corresponding identifier owned by the user making the request, or 404 when it doesn't exist.

    Managers are capable or retrieving logs under the user's tenant.

get
1linkGET https://api.marxact.com/v1/Logs/{id}/download HTTP/1.1

2linkAuthorization: Bearer {{token}}

response
1linkHTTP/1.1 200 OK

2linkAccess-Control-Expose-Headers: Content-Disposition, File-Type

3linkContent-Disposition: attachment; filename=<FILENAME>.txt|.csv|.pdf|.dxf; filename*=UTF-8''<FILENAME>.txt|.csv|.pdf|.dxf

4linkFile-Type: text/plain | application/<csv|pdf|dxf>

5link... FILE CONTENT ...

linkPUT Mark a Log as "Unread"

ReadOnly

HTTP-Put handler that marks a log of the user making the request as "unread"

Route Parameters
chevron_right
  • IdGuid

    The identifier of the log

Body
chevron_right
  • modelLog

    The log that should be marked as "unread".

Returns
chevron_right

    The updated log with the corresponding identifier owned by the user making the request, or 404 when it doesn't exist.

    Managers are capable or retrieving logs under the user's tenant.

put
1linkPUT https://api.marxact.com/v1/Logs/{id}/unread HTTP/1.1

2linkAuthorization: Bearer {{token}}

3linkContent-Type: application/json

4link{

5link Log

6link}

response
1linkHTTP/1.1 200 OK

2linkContent-Type: application/json

3link{

4link UnreadLog,

5link}

linkGET Count new Logs

ReadOnly

HTTP-Get handler that counts the amount of new logs of the user making the request.

Parameters
chevron_right
    No parameters.

Returns
chevron_right

    The amount of new logs.

    Managers are capable or counting logs under the user's tenant.

get
1linkGET https://api.marxact.com/v1/Logs/new/count HTTP/1.1

2linkAuthorization: Bearer {{token}}

response
1linkHTTP/1.1 200 OK

2linkn