Device42 Custom fields API

The Custom fields API from Device42 — 1 operation(s) for custom fields.

Operations 3

GET /api/2.0/custom_fields/ Get custom fields #
DELETE /api/2.0/custom_fields/ Delete custom field #
PUT /api/2.0/custom_fields/ Add or Update Custom field #

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-custom-fields-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-custom-fields-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Device42 Custom fields 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: Custom Fields
paths:
  /api/2.0/custom_fields/:
    get:
      operationId: getCustomFields
      summary: Get custom fields
      description: 'Get custom fields for given model. Required parameters are:


        object name'
      tags:
      - Custom Fields
      parameters:
      - $ref: '#/components/parameters/object_name'
      - name: id
        description: Custom Field ID
        in: query
        schema:
          type: integer
      - name: type
        in: query
        description: this is the custom field type. If left blank, default is text
        schema:
          type: string
          enum:
          - text
          - number
          - date
          - related_field
          - boolean
          - url
          - picklist
          - json
          - markup
      - name: key
        description: Custom Field Name
        in: query
        schema:
          type: string
      responses:
        '200':
          description: 'The above command returns results like this:'
          content:
            application/json:
              schema:
                properties:
                  custom_fields:
                    $ref: '#/components/schemas/custom_fields'
        '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: deleteCustomField
      summary: Delete custom field
      description: 'Delete custom field. Required parameters are:


        object name


        ID or Key


        If you want to delete custom fields that are in use, please pass in delete_in_use parameter, default action is to not delete fields in use.'
      tags:
      - Custom Fields
      parameters:
      - $ref: '#/components/parameters/object_name'
      - name: id
        in: query
        description: Custom Field ID
        schema:
          type: integer
      - name: key
        in: query
        description: Custom Field Name
        schema:
          type: string
      - name: delete_in_use
        in: query
        description: pass in <b>true</b> if you want to delete custom field that is in use
        schema:
          type: boolean
      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'
    put:
      operationId: putCustomField
      summary: Add or Update Custom field
      description: 'Create or update custom field. Required parameters are:


        object name


        key'
      tags:
      - Custom Fields
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                object_name:
                  description: Name of the object
                  type: string
                  enum:
                  - application_group
                  - application_group_calculation_rule
                  - appcomp
                  - appcomp_template
                  - asset
                  - building
                  - business_service
                  - cable
                  - certificate
                  - circuit
                  - cloud_account
                  - customer
                  - device
                  - dns_records
                  - dns_zone
                  - endusers
                  - hardware_model
                  - ip_address
                  - part
                  - partmodel
                  - pdu
                  - port
                  - purchase
                  - rack
                  - resource
                  - room
                  - secret
                  - service
                  - service_instance
                  - software
                  - software_instance
                  - subnet
                  - vendor
                  - vlan
                  - vrfgroup
                key:
                  description: Can be new or existing. This is the custom field name.
                  type: string
                type:
                  description: this is the custom field type. If left blank, default is text. Date should be formatted as YYYY-MM-DD
                  type: string
                  enum:
                  - text
                  - number
                  - date
                  - related_field
                  - boolean
                  - url
                  - picklist
                  - json
                  - markup
                mandatory:
                  description: Is custom field mandatory? yes/no
                  type: string
                  enum:
                  - 'yes'
                  - 'no'
                filterable:
                  description: Is custom field filterable? yes/no
                  type: string
                  enum:
                  - 'yes'
                  - 'no'
                log_for_api:
                  description: Log custom field? yes/no
                  type: string
                  enum:
                  - 'yes'
                  - 'no'
                add_to_picklist:
                  description: Comma separated values to add to picklist. If type is picklist and custom field is new, this is a required field. Duplicates will be ignored.
                  type: string
                remove_from_picklist:
                  description: Comma separated values to be removed from picklist. Duplicates will be ignored. Values that are in use will Not be deleted, unless <b>delete_in_use</b> parameter is provided and set to <b>yes</b>
                  type: string
                delete_in_use:
                  description: pass in <b>yes</b> if you want to delete Picklist value that is in use. Used in conjunction with <b>remove_from_picklist</b>.
                  type: string
                  enum:
                  - 'yes'
                  - 'no'
                multi_select:
                  description: Applies only to Picklist fields. Is custom field multi select? yes/no
                  type: string
                  enum:
                  - 'yes'
                  - 'no'
                include_in_context_popups:
                  description: Applies only to Device custom fields. Include the custom field in device pop-up panels and layout pages (true/false).<br> For example, the pop-up when you click a device on a rack view.
                  type: string
                  enum:
                  - 'true'
                  - 'false'
                related_field_name:
                  description: Required if type = related_field. The existing field to relate this custom field to. Below are details for some of the fields that have been renamed or require further clarification. appcomp (for application components), businessapp (for Business Service), circuit (for Telco Circuit), cloudinfrastructure (for Cloud Account),  hardware (for device hardware model), netport (for Switch Port), organisation (for Vendor), pdu (for Power Unit), pdu_model (for Power Unit Model), purchase (for Purchase Order), software (for Software Component), vlan (for Subnet)
                  type: string
                  enum:
                  - appcomp
                  - building
                  - businessapp
                  - certificate
                  - circuit
                  - cloudinfrastructure
                  - costcenter
                  - customer
                  - device
                  - dns_zone
                  - endusers
                  - hardware
                  - ip_address
                  - netport
                  - organisation
                  - os
                  - pdu
                  - pdu_model
                  - powercircuit
                  - purchase
                  - rack
                  - room
                  - servicecategory
                  - software_category
                  - software
                  - vlan
              required:
              - object_name
              - key
        required: true
      responses:
        '200':
          description: 'The above command returns results like this:'
          content:
            application/json:
              schema:
                properties:
                  msg:
                    example:
                    - Custom key field added or updated
                    - 2
                    - IPAddress_cf
                    - true
                    - true
                  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'
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.
  parameters:
    object_name:
      name: object_name
      description: Name of the object
      in: query
      required: true
      schema:
        type: string
        enum:
        - application_group
        - application_group_calculation_rule
        - appcomp
        - appcomp_template
        - asset
        - building
        - business_service
        - cable
        - certificate
        - circuit
        - cloud_account
        - customer
        - device
        - dns_records
        - dns_zone
        - endusers
        - hardware_model
        - ip_address
        - part
        - partmodel
        - pdu
        - port
        - purchase
        - rack
        - resource
        - room
        - secret
        - service
        - service_instance
        - software
        - software_instance
        - subnet
        - vendor
        - vlan
        - vrfgroup
  schemas:
    custom_fields:
      type: array
      items:
        type: object
        properties:
          id:
            example: 2
          key:
            example: room
          type_id:
            example: 1
          type:
            example: Text
          filterable:
            example: 'false'
          mandatory:
            example: 'true'
          fk_model_id:
            example: 'null'
          fk_model_input:
            example: 'null'
          log_for_api:
            example: 'true'
          is_multi:
            example: 'false'
          picklist:
            example: 'null'
  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.