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. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.
openapi: 3.2.0
info:
title: Device42 History 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: History
paths:
/api/1.0/history/:
get:
operationId: getHistory
summary: Get
description: Retrieves all history for the past one week. (Note, as of 10.3.0 Device42 now has a more robust audit log available at /api/api/1.0/auditlogs/
tags:
- History
deprecated: true
responses:
'200':
description: 'The above command returns results like this:'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/getHistory'
'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/history/<number_of_weeks>/:
get:
operationId: getHistoryNumber_of_weeks
summary: Get by weeks
description: Retrieves history for specified number of weeks in the past
tags:
- History
deprecated: true
responses:
'200':
description: 'The above command returns results like this:'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/getHistory'
'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:
getHistory:
type: object
properties:
action:
example: Add/Change(API)
action_time:
example: '2014-03-19T13:09:35.474Z'
change_message:
example: 'added/edited via api with values: {u''domain'': u''d42.net'', u''type'': u''A'', u''nameserver'': u''ns1'', u''name'': u''oxrouter'', u''ttl'': u''3''}.'
content_type:
example: DNS A or AAAA Record
obj_repr:
example: oxrouter
user:
example: admin
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.