POST /new

Creates a new network object. You can create various types of network objects such as hosts, ranges, groups, and abstract objects.

Resource Name: /network_objects/new

Permissions Required:

  • Edit network object

Request Body:

Element

Type

Description

csv boolean

Sets the origin of the network object created.

  • true (default) Shows origin of the new network object as Imported

  • false Shows origin of the new network object as Appviz Object.

customFields array of custom field objects  
name String Name of the custom field.
value String Value of the content of the custom field.

name

Mandatory

String

The network object's name.

objectContainerLevel String Object container level.
selectedDevice List of integers List of the new network object's selected devices IDs.
subject String Subject
tags List of strings List of network object tags.
name String Tag name.

type

Mandatory

String

Network object type. Can be one of the following:

  • Host

  • Range

  • Group

  • Abstract

content String Mandatory only for types: Host, Range and Group

Request json body examples

cURL example

curl --request POST \
  --url https://<localhost>/BusinessFlow/rest/v1/network_objects/new \
  --header 'Accept: application/json, application/xml' \
  --header 'Authorization: Bearer eyJraWQiLLQ' \
  --header 'Content-Type: application/json' \
  --data '{
  "customFields": [
    {
      "name": "field",
      "value": "the value"
    }
  ],
  "name": "host_example",
  "objectContainerLevel": "Automatic",
  "selectedDevice": [
    1
  ],
  "subject": "subject",
  "tags": [
    {
      "name": "tag1"
    }
  ],
  "type": "Host",
  "content": "1.1.1.1"
}'

 

Status Codes

Code Description
200 OK
400 Illegal request parameters
403 User is missing permissions
500 Internal server error

Validation:

  • Existing network object with the same name.
  • Invalid value for custom field.
  • Non-existing member network object.
  • Invalid IP.
  • Invalid range.
  • Invalid CIDR.
  • Invalid content for the type.

Return parameters

Parameter

Type

Description

objNewAffectedApplications

object

Affected applications by the network entity change.

affectedApplicationsRevisionsPerAppId

object

Affected applications revisions by application app_id.

incompleteMap

boolean

Indicates if the affected applications list is incomplete.

  • true: Indicates that the affected applications list is incomplete.

  • false: Indicates that the affected applications list is complete.

affectedObjects

array

List of affected network entities.

objectReplaceMap

object

Changed parent objects.

[key]

integer

Key description.

[value]

object

Value description.

significantChange

boolean

Indicates whether there is a significant change.

  • true: Indicates that there was a significant change in the network object.

  • false: Indicates that there was no significant change in the network object.

newObject

object

The newly created network object.

id

integer

Network object ID.

endpointGroupId

integer

Endpoint group ID.

head

boolean

Indicates if it is the head object.

  • true: Indicates that it is the head object.

  • false: Indicates that it is not the head object.

name

string

Network object name.

lcName

string

Lowercase network object name.

canonizedName

string

Canonicalized network object name.

dnsLookup

boolean

Indicates if DNS lookup is enabled.

  • true: Indicates that DNS lookup is enabled.

  • false: Indicates that DNS lookup is disabled.

type

string

Network object type. Possible values: Host, Range, Group, Abstract.

revisionOrigin

object

Origin of the revision.

metaData

object

Metadata of the network object.

md5

string

MD5 hash of the network object.

updateDate

integer

Update date of the network object.

hostIp

object

IP details of the host.

fullRange

boolean

Indicates if it is a full range.

  • true: Indicates that it is a full range.

  • false: Indicates that it is not a full range.

sortedFlatRanges

array

Sorted flat ranges of the network object.

sortedImplicitOrFlatRangesWithoutSubPoints

array

Sorted implicit or flat ranges of the network object without subpoints.

status

string

Status of the network object.

networkEntityType

string

Network entity type. Possible values: Endpoint.

objectStatus

string

Object status. Possible values: ACTIVE.

memberStatus

string

Member status. Possible values: ACTIVE.

dynamic

boolean

Indicates if the network object is dynamic.

  • true: Indicates that the network object is dynamic.

  • false: Indicates that the network object is not dynamic.

pciObject

boolean

Indicates if it is a PCI object.

  • true: Indicates that it is a PCI object.

  • false: Indicates that it is not a PCI object.

group

boolean

Indicates if it is a group object.

  • true: Indicates that it is a group object.

  • false: Indicates that it is not a group object.

Return example

{ "objNewAffectedApplications": { "affectedApplicationsRevisionsPerAppId": {}, "incompleteMap": false }, "affectedObjects": [], "newObject": { "id": 6, "endpointGroupId": 6, "head": true, "name": "ben", "lcName": "ben", "canonizedName": "ben", "dnsLookup": false, "type": "Host", "revisionOrigin": { "id": 3, "name": "origin.csv_file_import" }, "metaData": { "id": 6, "endpointGroupId": 6, "inProgress": false, "vulnerabilityScore": -1 }, "md5": "307939A2F58337024B33BC55BDF4EFEF", "updateDate": 1687876386889, "hostIp": { "low": 1700529000, "high": 1700529000, "id": 6, "minIp": 1700529000, "maxIp": 1700529000, "display": "101.92.3.104", "displayCIDR": [ "101.92.3.104/32" ], "displayRange": "101.92.3.104", "optimalDisplay": [ "101.92.3.104" ], "newObject": false, "singleIP": true, "cidr": true, "any": false }, "fullRange": false, "sortedFlatRanges": [ { "low": 1700529000, "high": 1700529000, "id": 6, "minIp": 1700529000, "maxIp": 1700529000, "display": "101.92.3.104", "displayCIDR": [ "101.92.3.104/32" ], "displayRange": "101.92.3.104", "optimalDisplay": [ "101.92.3.104" ], "newObject": false, "singleIP": true, "cidr": true, "any": false } ], "sortedImplicitOrFlatRangesWithoutSubPoints": [ { "low": 1700529000, "high": 1700529000, "id": 6, "minIp": 1700529000, "maxIp": 1700529000, "display": "101.92.3.104", "displayCIDR": [ "101.92.3.104/32" ], "displayRange": "101.92.3.104", "optimalDisplay": [ "101.92.3.104" ], "newObject": false, "singleIP": true, "cidr": true, "any": false } ], "status": "ACTIVE", "networkEntityType": "Endpoint", "objectStatus": "ACTIVE", "memberStatus": "ACTIVE", "dynamic": false, "pciObject": false, "group": false, "newObject": false }, "objectReplaceMap": {}, "significantChange": false }

 

â See also: