jpclipffel.device42.device42_api (1.0.1) — module

Low-level interface to Device42 REST API

| "added in version" 3.0 of jpclipffel.device42"

Authors: Jean-Philippe Clipffel (@jpclipffel)

preview | supported by community

Install collection

Install with ansible-galaxy collection install jpclipffel.device42:==1.0.1


Add to requirements.yml

  collections:
    - name: jpclipffel.device42
      version: 1.0.1

Description

Low-level interface to Device42 REST API

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Query resource
  device42_api:
    meth: GET
    path: devices

Inputs

    
data:
    description:
    - Request payload (will be merged in formData or query)
    required: false
    type: dict

path:
    description:
    - API path (defaults to API v1.0, e.g. '/api/1.0/<path>')
    required: true
    type: str

method:
    description:
    - HTTP method (e.g. 'GET', 'POST', etc.)
    required: true
    type: str

Outputs

code:
  description: The 'code' fields from Device42 response
  returned: always
  type: int
data:
  description: The full Device42 response
  returned: always
  type: complex
msg:
  description: The 'msg' field from Device42 response
  returned: always
  type: str