---
title: "Create Network Device Auto Import Rule"
method: POST
path: "/network-device-auto-import-rule"
tags: ["Network Device Auto Import Rule"]
---

# Create Network Device Auto Import Rule

`POST /network-device-auto-import-rule`

## Request

- Base URL: `https://oneuptime.com/api`
- URL: `https://oneuptime.com/api/network-device-auto-import-rule`
- Auth: API key in header `APIKey`
- TypeScript: <https://skmtc.dev/oneuptime/apis/oneuptime-openapi-specification/docs/network-device-auto-import-rule/post.ts> (a function with typed inputs; its response is checked against the schema)

Endpoint to create a new Network Device Auto Import Rule

## Request body

- object
  - `data` NetworkDeviceAutoImportRuleCreateSchema, required: Create schema for NetworkDeviceAutoImportRule model. Create
    - `criteria` object: Versioned conditions that determine whether this rule matches a resource. Permissions - Create: [Project Owner, Project Admin, Create Network Device Auto Import Rule], Read: [Project Owner, Project Admin, Project Member, Viewer, Read Network Device Auto Import Rule], Update: [Project Owner, Project Admin, Edit Network Device Auto Import Rule]
    - `projectId` string, uuid: ID of your OneUptime Project in which this object belongs. Permissions - Create: [Project Owner, Project Admin, Create Network Device Auto Import Rule], Read: [Project Owner, Project Admin, Project Member, Viewer, Read Network Device Auto Import Rule], Update: [No access - you don't have permission for this operation]
    - `name` string, required: Name of this network device auto import rule. Permissions - Create: [Project Owner, Project Admin, Create Network Device Auto Import Rule], Read: [Project Owner, Project Admin, Project Member, Viewer, Read Network Device Auto Import Rule], Update: [Project Owner, Project Admin, Edit Network Device Auto Import Rule]
    - `description` string: Description of this network device auto import rule. Permissions - Create: [Project Owner, Project Admin, Create Network Device Auto Import Rule], Read: [Project Owner, Project Admin, Project Member, Viewer, Read Network Device Auto Import Rule], Update: [Project Owner, Project Admin, Edit Network Device Auto Import Rule]
    - `isEnabled` boolean: Whether this rule is enabled. Permissions - Create: [Project Owner, Project Admin, Create Network Device Auto Import Rule], Read: [Project Owner, Project Admin, Project Member, Viewer, Read Network Device Auto Import Rule], Update: [Project Owner, Project Admin, Edit Network Device Auto Import Rule]
    - `ipMatchTarget` string: Only trigger for discovered hosts whose IP is inside this CIDR (192.168.1.0/24) or octet range (10.16-22.0-255.51-66) — the same notations a scan target takes. Leave empty to match any address. Permissions - Create: [Project Owner, Project Admin, Create Network Device Auto Import Rule], Read: [Project Owner, Project Admin, Project Member, Viewer, Read Network Device Auto Import Rule], Update: [Project Owner, Project Admin, Edit Network Device Auto Import Rule]
    - `sysNamePattern` string: Regex or * wildcard pattern (case-insensitive) matched against the discovered host's SNMP sysName. Leave empty to match any name. Permissions - Create: [Project Owner, Project Admin, Create Network Device Auto Import Rule], Read: [Project Owner, Project Admin, Project Member, Viewer, Read Network Device Auto Import Rule], Update: [Project Owner, Project Admin, Edit Network Device Auto Import Rule]
    - `sysDescrPattern` string: Regex or * wildcard pattern (case-insensitive) matched against the discovered host's SNMP sysDescr. Leave empty to match any description. Permissions - Create: [Project Owner, Project Admin, Create Network Device Auto Import Rule], Read: [Project Owner, Project Admin, Project Member, Viewer, Read Network Device Auto Import Rule], Update: [Project Owner, Project Admin, Edit Network Device Auto Import Rule]
    - `sysObjectIdPattern` string: An OID prefix (1.3.6.1.4.1.9) or a '*' wildcard OID pattern with literal dots (1.3.6.1.4.1.9.* for Cisco) matched against the discovered host's SNMP sysObjectID — the vendor's registered enterprise OID. Not regex: dots match dots, so 1.3.6.1.4.1.9.* can never match enterprise 94. Leave empty to match any vendor. Only hosts reported by probes new enough to carry sysObjectID can match. Permissions - Create: [Project Owner, Project Admin, Create Network Device Auto Import Rule], Read: [Project Owner, Project Admin, Project Member, Viewer, Read Network Device Auto Import Rule], Update: [Project Owner, Project Admin, Edit Network Device Auto Import Rule]
    - `includePingOnlyHosts` boolean: Also import hosts that answered ping but not SNMP. Off by default: a wrong SNMP credential makes every host on a subnet report as ping-only, and this rule would then import all of them as half-identified devices. Permissions - Create: [Project Owner, Project Admin, Create Network Device Auto Import Rule], Read: [Project Owner, Project Admin, Project Member, Viewer, Read Network Device Auto Import Rule], Update: [Project Owner, Project Admin, Edit Network Device Auto Import Rule]
    - `pollingIntervalInMinutes` number: How often the scan's probe polls each device this rule imports, in minutes: 1, 2, 5, 10, 15, 30 or 60. The probe pings every device and walks the ones that answered SNMP. Leave it empty for the devices' default, every 5 minutes. The same choice as Check every when importing from Review Results. Permissions - Create: [Project Owner, Project Admin, Create Network Device Auto Import Rule], Read: [Project Owner, Project Admin, Project Member, Viewer, Read Network Device Auto Import Rule], Update: [Project Owner, Project Admin, Edit Network Device Auto Import Rule]
    - `isExclusion` boolean: Invert this rule: matching hosts are NEVER auto-imported, even when another rule matches them. Use it to carve printers, phones, or other unwanted hosts out of a broader rule. Permissions - Create: [Project Owner, Project Admin, Create Network Device Auto Import Rule], Read: [Project Owner, Project Admin, Project Member, Viewer, Read Network Device Auto Import Rule], Update: [Project Owner, Project Admin, Edit Network Device Auto Import Rule]
    - `monitorTemplateId` string, uuid: ID of the optional Network Device monitor template to apply to devices imported by this rule. Permissions - Create: [Project Owner, Project Admin, Create Network Device Auto Import Rule], Read: [Project Owner, Project Admin, Project Member, Viewer, Read Network Device Auto Import Rule], Update: [Project Owner, Project Admin, Edit Network Device Auto Import Rule]
    - `oidTemplateId` string, uuid: ID of the optional OID Collection Template to link to devices imported by this rule. Permissions - Create: [Project Owner, Project Admin, Create Network Device Auto Import Rule], Read: [Project Owner, Project Admin, Project Member, Viewer, Read Network Device Auto Import Rule], Update: [Project Owner, Project Admin, Edit Network Device Auto Import Rule]

## Response `201`

Created successfully

- object
  - `data` NetworkDeviceAutoImportRuleReadSchema: Read schema for NetworkDeviceAutoImportRule model. Read
    - `_id` string, uuid: ID of this object. Permissions - Create: [Project Owner, Project Admin, Create Network Device Auto Import Rule], Read: [Project Owner, Project Admin, Project Member, Viewer, Read Network Device Auto Import Rule], Update: [Project Owner, Project Admin, Edit Network Device Auto Import Rule]
    - `createdAt` object: Date and Time when the object was created. Permissions - Create: [Project Owner, Project Admin, Create Network Device Auto Import Rule], Read: [Project Owner, Project Admin, Project Member, Viewer, Read Network Device Auto Import Rule], Update: [Project Owner, Project Admin, Edit Network Device Auto Import Rule]
    - `updatedAt` object: Date and Time when the object was updated. Permissions - Create: [Project Owner, Project Admin, Create Network Device Auto Import Rule], Read: [Project Owner, Project Admin, Project Member, Viewer, Read Network Device Auto Import Rule], Update: [Project Owner, Project Admin, Edit Network Device Auto Import Rule]
    - `deletedAt` object: Date and Time when the object was deleted. Permissions - Create: [Project Owner, Project Admin, Create Network Device Auto Import Rule], Read: [Project Owner, Project Admin, Project Member, Viewer, Read Network Device Auto Import Rule], Update: [Project Owner, Project Admin, Edit Network Device Auto Import Rule]
    - `criteria` object: Versioned conditions that determine whether this rule matches a resource. Permissions - Create: [Project Owner, Project Admin, Create Network Device Auto Import Rule], Read: [Project Owner, Project Admin, Project Member, Viewer, Read Network Device Auto Import Rule], Update: [Project Owner, Project Admin, Edit Network Device Auto Import Rule]
    - `projectId` string, uuid: ID of your OneUptime Project in which this object belongs. Permissions - Create: [Project Owner, Project Admin, Create Network Device Auto Import Rule], Read: [Project Owner, Project Admin, Project Member, Viewer, Read Network Device Auto Import Rule], Update: [No access - you don't have permission for this operation]
    - `name` string, required: Name of this network device auto import rule. Permissions - Create: [Project Owner, Project Admin, Create Network Device Auto Import Rule], Read: [Project Owner, Project Admin, Project Member, Viewer, Read Network Device Auto Import Rule], Update: [Project Owner, Project Admin, Edit Network Device Auto Import Rule]
    - `description` string: Description of this network device auto import rule. Permissions - Create: [Project Owner, Project Admin, Create Network Device Auto Import Rule], Read: [Project Owner, Project Admin, Project Member, Viewer, Read Network Device Auto Import Rule], Update: [Project Owner, Project Admin, Edit Network Device Auto Import Rule]
    - `isEnabled` boolean: Whether this rule is enabled. Permissions - Create: [Project Owner, Project Admin, Create Network Device Auto Import Rule], Read: [Project Owner, Project Admin, Project Member, Viewer, Read Network Device Auto Import Rule], Update: [Project Owner, Project Admin, Edit Network Device Auto Import Rule]
    - `ipMatchTarget` string: Only trigger for discovered hosts whose IP is inside this CIDR (192.168.1.0/24) or octet range (10.16-22.0-255.51-66) — the same notations a scan target takes. Leave empty to match any address. Permissions - Create: [Project Owner, Project Admin, Create Network Device Auto Import Rule], Read: [Project Owner, Project Admin, Project Member, Viewer, Read Network Device Auto Import Rule], Update: [Project Owner, Project Admin, Edit Network Device Auto Import Rule]
    - `sysNamePattern` string: Regex or * wildcard pattern (case-insensitive) matched against the discovered host's SNMP sysName. Leave empty to match any name. Permissions - Create: [Project Owner, Project Admin, Create Network Device Auto Import Rule], Read: [Project Owner, Project Admin, Project Member, Viewer, Read Network Device Auto Import Rule], Update: [Project Owner, Project Admin, Edit Network Device Auto Import Rule]
    - `sysDescrPattern` string: Regex or * wildcard pattern (case-insensitive) matched against the discovered host's SNMP sysDescr. Leave empty to match any description. Permissions - Create: [Project Owner, Project Admin, Create Network Device Auto Import Rule], Read: [Project Owner, Project Admin, Project Member, Viewer, Read Network Device Auto Import Rule], Update: [Project Owner, Project Admin, Edit Network Device Auto Import Rule]
    - `sysObjectIdPattern` string: An OID prefix (1.3.6.1.4.1.9) or a '*' wildcard OID pattern with literal dots (1.3.6.1.4.1.9.* for Cisco) matched against the discovered host's SNMP sysObjectID — the vendor's registered enterprise OID. Not regex: dots match dots, so 1.3.6.1.4.1.9.* can never match enterprise 94. Leave empty to match any vendor. Only hosts reported by probes new enough to carry sysObjectID can match. Permissions - Create: [Project Owner, Project Admin, Create Network Device Auto Import Rule], Read: [Project Owner, Project Admin, Project Member, Viewer, Read Network Device Auto Import Rule], Update: [Project Owner, Project Admin, Edit Network Device Auto Import Rule]
    - `includePingOnlyHosts` boolean: Also import hosts that answered ping but not SNMP. Off by default: a wrong SNMP credential makes every host on a subnet report as ping-only, and this rule would then import all of them as half-identified devices. Permissions - Create: [Project Owner, Project Admin, Create Network Device Auto Import Rule], Read: [Project Owner, Project Admin, Project Member, Viewer, Read Network Device Auto Import Rule], Update: [Project Owner, Project Admin, Edit Network Device Auto Import Rule]
    - `pollingIntervalInMinutes` number: How often the scan's probe polls each device this rule imports, in minutes: 1, 2, 5, 10, 15, 30 or 60. The probe pings every device and walks the ones that answered SNMP. Leave it empty for the devices' default, every 5 minutes. The same choice as Check every when importing from Review Results. Permissions - Create: [Project Owner, Project Admin, Create Network Device Auto Import Rule], Read: [Project Owner, Project Admin, Project Member, Viewer, Read Network Device Auto Import Rule], Update: [Project Owner, Project Admin, Edit Network Device Auto Import Rule]
    - `isExclusion` boolean: Invert this rule: matching hosts are NEVER auto-imported, even when another rule matches them. Use it to carve printers, phones, or other unwanted hosts out of a broader rule. Permissions - Create: [Project Owner, Project Admin, Create Network Device Auto Import Rule], Read: [Project Owner, Project Admin, Project Member, Viewer, Read Network Device Auto Import Rule], Update: [Project Owner, Project Admin, Edit Network Device Auto Import Rule]
    - `monitorTemplateId` string, uuid: ID of the optional Network Device monitor template to apply to devices imported by this rule. Permissions - Create: [Project Owner, Project Admin, Create Network Device Auto Import Rule], Read: [Project Owner, Project Admin, Project Member, Viewer, Read Network Device Auto Import Rule], Update: [Project Owner, Project Admin, Edit Network Device Auto Import Rule]
    - `oidTemplateId` string, uuid: ID of the optional OID Collection Template to link to devices imported by this rule. Permissions - Create: [Project Owner, Project Admin, Create Network Device Auto Import Rule], Read: [Project Owner, Project Admin, Project Member, Viewer, Read Network Device Auto Import Rule], Update: [Project Owner, Project Admin, Edit Network Device Auto Import Rule]
    - `createdByUserId` string, uuid: User ID who created this object (if this object was created by a User). Permissions - Create: [No access - you don't have permission for this operation], Read: [Project Owner, Project Admin, Project Member, Viewer, Read Network Device Auto Import Rule], Update: [No access - you don't have permission for this operation]

## Other responses

- `400`: Bad request. This response indicates that the request was malformed or contained invalid data.
- `401`: Unauthorized. This response indicates that the request requires user authentication.
- `402`: Payment Required. This response indicates that the request requires payment or a valid subscription.
- `403`: Forbidden. This response indicates that the server understood the request, but refuses to authorize it.
- `405`: Project not found. This response indicates that the requested project does not exist or is not accessible.
- `408`: Request Timeout. This response indicates that the server timed out waiting for the request.
- `415`: Unable to reach server. This response indicates that the server is currently unreachable or down.
- `422`: Not authorized. This response indicates that the user does not have permission to access the requested resource.
- `500`: Internal Server Error. This response indicates that the server encountered an unexpected condition that prevented it from fulfilling the request.

---

[API](https://skmtc.dev/oneuptime/apis/oneuptime-openapi-specification.md) - [All operations](https://skmtc.dev/oneuptime/apis/oneuptime-openapi-specification/llms.txt) - [OpenAPI document](https://skmtc.dev/oneuptime/apis/oneuptime-openapi-specification/revisions/ba3307d00304?raw)
