Device42 Audit Log API

The Audit Log API from Device42 — 1 operation(s) for audit log.

Operations 2

GET /api/1.0/auditlogs/ Get #
DELETE /api/1.0/auditlogs/ Delete #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/device42:device42-audit-log-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

device42-audit-log-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Device42 Audit Log API
  version: '2.0'
  description: 'API Overview


    RESTful APIs are supported in Device42 as one of the primary methods of entering, editing and retrieving data.'
  contact:
    name: Device42
    email: support@device42.com
servers:
- url: https://<host>
security:
- basicAuth: []
- bearerAuth: []
tags:
- name: Audit Log
paths:
  /api/1.0/auditlogs/:
    get:
      operationId: getAuditlogs
      summary: Get
      description: Retrieves the audit history for all changes made in Device42
      tags:
      - Audit Log
      parameters:
      - $ref: '#/components/parameters/object_id'
      - $ref: '#/components/parameters/content_type'
      - $ref: '#/components/parameters/action_time_gt'
      - $ref: '#/components/parameters/action_time_lt'
      - name: related
        in: query
        description: Related audit changes. Options are 'all' or 'related'
        schema:
          type: string
      - name: action
        in: query
        description: What action was taken described in the audit. Options are Insert, Delete, Update, Truncate, View, Login, API
        schema:
          type: string
      responses:
        '200':
          description: 'The above command returns results like this:'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/getAuditLogs'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
    delete:
      operationId: deleteAuditlogs
      summary: Delete
      description: Deletes audit history logs made in Device42
      tags:
      - Audit Log
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                days:
                  description: Events older than “days” will be deleted
                  type: integer
                chunk_size:
                  description: Use to limit the number of records that will be deleted.
                  type: integer
              required:
              - days
        required: true
      responses:
        '200':
          description: 'The above command returns results like this:'
          content:
            application/json:
              schema:
                properties:
                  chunk_size:
                    example: 1000
                  loops:
                    example: 7
                  deleted audit records:
                    example: true
                  days:
                    example: 1
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
components:
  responses:
    Forbidden:
      description: Forbidden (The resource requested is hidden)
      content:
        application/json:
          example:
            errors:
            - code: 403
              reason: Forbidden
              title: Forbidden
              detail: The resource requested is hidden
    BadRequest:
      description: Bad Request (A validation exception has occurred.)
      content:
        application/json:
          example:
            errors:
            - code: 400
              reason: BAD_REQUEST
              title: The error response code title.
              detail: Details of the error response.
    Unauthorized:
      description: Unauthorized (Invalid credentials.)
      content:
        application/json:
          example:
            errors:
            - code: 401
              reason: Unauthorized
              title: Unauthorized
              detail: Invalid credentials.
    InternalServerError:
      description: Internal Server Error (A required parameter is missing or there is an issue with the server. Check the returned 'msg' field from the call.)
      content:
        application/json:
          example:
            errors:
            - code: 500
              reason: Internal Server Error
              title: Internal Server Error
              detail: A required parameter is missing or there is an issue with the server. Check the returned 'msg' field from the call.
    NotFound:
      description: Not Found (The specified resource could not be found)
      content:
        application/json:
          example:
            errors:
            - code: 404
              reason: Not Found
              title: Not Found
              detail: The specified resource could not be found.
    ServiceUnavailable:
      description: Service Unavailable (Please check if your Device42 instance is working normally.)
      content:
        application/json:
          example:
            errors:
            - code: 503
              reason: Service Unavailable
              title: Service Unavailable
              detail: Please check if your Device42 instance is working normally.
  schemas:
    getAuditLogs:
      type: object
      properties:
        total_count:
          example: 6
        limit:
          example: 1000
        offset:
          example: 0
        auditlogs:
          type: array
          items:
            type: object
            properties:
              object_id:
                example: 1
              from:
                example: Internal
              object_type:
                example: user
              object_fields:
                example: '{\"id\": \"1\", \"status\": \"Affinity Group processing completed in 0:00:00.088542\", \"enabled\": \"t\", \"upgraded\": \"t\", \"saved_doql_id\": \"1\", \"last_processed\": \"2022-11-08 15:33:00.733269+00\", \"target_reports\": \"3\"}'
              user:
                example: admin
              x_d42_source:
                example: 'null'
              changed_fields:
                type: object
                properties:
                  message:
                    example: User logged in from ['10.42.08']
                  status:
                    example: Affinity Group processing completed in 0:00:00.254720.
              action_time:
                example: '2022-11-09T15:37:04.632566Z'
              api_data:
                example: 'null'
              action:
                example: Login
              url:
                example: 'null'
  parameters:
    action_time_lt:
      name: action_time_lt
      in: query
      description: Returns actions within the last X amount of days in YYYY-MM-DDTHH:MM:ss.uuuuuu (ie 2016-10-27T13:52:01.213416)
      schema:
        type: string
    object_id:
      name: object_id
      in: query
      description: Filters by object ID (ie, device ID, asset ID)
      schema:
        type: integer
    action_time_gt:
      name: action_time_gt
      in: query
      description: Filters actions that have happened past the time entered (ie, greater than 2 weeks) in YYYY-MM-DDTHH:MM:ss.uuuuuu (ie 2016-10-27T13:52:01.213416)
      schema:
        type: string
    content_type:
      name: content_type
      in: query
      description: Returns changes done to a particular content type
      schema:
        type: string
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: Basic authentication using a Device42 user's username and password.
    bearerAuth:
      type: http
      scheme: bearer
      description: Bearer token obtained from POST /tauth/1.0/token/ using an API Client's key/secret as Basic auth credentials.