Device42 DOQL Queries API

The DOQL Queries API from Device42 — 2 operation(s) for doql queries.

Operations 4

GET /api/1.0/saved_doql_queries/ Get all #
POST /api/1.0/saved_doql_queries/ Create/update #
GET /api/1.0/saved_doql_queries/{ID}/ Get specific #
DELETE /api/1.0/saved_doql_queries/{ID}/ 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-doql-queries-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-doql-queries-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Device42 DOQL Queries 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: DOQL Queries
paths:
  /api/1.0/saved_doql_queries/:
    get:
      operationId: getSaved_doql_queries
      description: Retrieve information about all saved DOQL queries. You must be a superuser to access the API
      summary: Get all
      tags:
      - DOQL Queries
      parameters:
      - $ref: '#/components/parameters/name'
      - $ref: '#/components/parameters/last_updated_lt'
      - $ref: '#/components/parameters/last_updated_gt'
      - $ref: '#/components/parameters/first_added_lt'
      - $ref: '#/components/parameters/first_added_gt'
      responses:
        '200':
          description: 'The above command returns results like this:'
          content:
            application/json:
              schema:
                properties:
                  savedDOQL:
                    $ref: '#/components/schemas/savedDOQLQueries'
        '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'
    post:
      operationId: postSaved_doql_queries
      description: 'Create/update a saved DOQL query. You must be a superuser to access the API. Required parameters:


        name'
      summary: Create/update
      tags:
      - DOQL Queries
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                name:
                  description: Name of saved DOQL. Required if creating new saved DOQL
                  type: string
                id:
                  description: Saved DOQL ID if modifying existing one
                  type: string
                saved_query:
                  description: Text of DOQL Query
                  type: string
                notes:
                  description: User entered notes
                  type: string
                include_headers:
                  description: Boolean value to whether to export header or not in CSV format
                  type: string
                output_format:
                  description: Choices of csv or json
                  type: string
                tags:
                  description: Comma-separated tags
                  type: string
              required:
              - name
        required: true
      responses:
        '200':
          description: 'The above command returns results like this:'
          content:
            application/json:
              schema:
                properties:
                  msg:
                    example:
                    - Saved DOQL added successfully
                  code:
                    example: 0
        '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'
  /api/1.0/saved_doql_queries/{ID}/:
    get:
      operationId: getSaved_doql_queriesID
      summary: Get specific
      description: Retrieve detailed information about a specific saved DOQL query. You must be a superuser to access the API
      tags:
      - DOQL Queries
      parameters:
      - name: ID
        in: path
        required: true
        description: The ID of the Saved DOQL to retrieve
        schema:
          type: integer
      responses:
        '200':
          description: 'The above command returns results like this:'
          content:
            application/json:
              schema:
                properties:
                  name:
                    example: Power_outlet1
                  tags:
                    type: array
                    example:
                    - power
                    items: {}
                  include_headers:
                    example: true
                  notes:
                    example: ''
                  saved_query:
                    example: select * from view_rudata_v2
                  output_type:
                    example: csv
                  id:
                    example: 182
        '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: deleteSaved_doql_queriesID
      summary: Delete
      description: This API is used to delete saved DOQL query with the saved DOQL ID supplied as the required argument. You must be a superuser to access the API
      tags:
      - DOQL Queries
      parameters:
      - name: ID
        in: path
        required: true
        description: Saved DOQL Query ID
        schema:
          type: integer
      responses:
        '200':
          description: 'The above command returns results like this:'
          content:
            application/json:
              schema:
                properties:
                  deleted:
                    example: 'true'
                  id:
                    example: '182'
        '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.
    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.
    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.
    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.
  parameters:
    name:
      name: name
      in: query
      description: filter by name (Added in v6.0.0)
      schema:
        type: string
    first_added_lt:
      name: first_added_lt
      in: query
      description: first added less than date YYYY-MM-DD format
      schema:
        type: string
    last_updated_lt:
      name: last_updated_lt
      in: query
      description: last updated less than date YYYY-MM-DD format
      schema:
        type: string
    last_updated_gt:
      name: last_updated_gt
      in: query
      description: last updated equal to or greater than date YYYY-MM-DD format
      schema:
        type: string
    first_added_gt:
      name: first_added_gt
      in: query
      description: first added equal to or greater than date YYYY-MM-DD format
      schema:
        type: string
  schemas:
    savedDOQLQueries:
      type: array
      items:
        type: object
        properties:
          name:
            example: Power_outlet
          tags:
            type: array
            items:
              example: power
          include_headers:
            example: true
          notes:
            example: query
          saved_query:
            example: select * from view_rudata_v2
          output_type:
            example: csv
          id:
            example: 182
  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.