Update asset IP

Updates the specified asset IP address.

Required Permissions

Requires the ADMIN role or higher.

HTTP Request

PUT /api/sonar/ip-addresses/:guid
cURL Example
curl -H "Authorization: Bearer <API_KEY>" \
     -d ip="192.168.1.100" \
     -d hostname="server01" \
     -d description="Web server" \
     -d scoring_type="priority" \
     -d priority=medium \
     -X PUT \
     https://HOSTNAME/api/sonar/ip-addresses/f47ac10b-58cc-4372-a567-0e02b2c3d479
Request Parameters
KeyRequiredTypeDescriptionNote
guidYesStringIP address GUID36 characters
ipYesStringIP address
site_guidNoStringSite GUID36 characters
category_guidNoStringCategory GUID36 characters
descriptionNoStringDescriptionMaximum 2000 characters
emp_guidNoStringPrimary contact GUID36 characters
emp_guid2NoStringSecondary contact GUID36 characters
hostnameNoStringHostnameMaximum 255 characters
os_nameNoStringOS nameMaximum 50 characters
os_verNoStringOS versionMaximum 20 characters
workgroupNoStringWorkgroupMaximum 255 characters
locationNoStringLocationMaximum 255 characters
macNoStringMAC address
installedNoStringInstallation dateyyyy-MM-dd'T'HH:mm:ss.SSSX format
scoring_typeYesStringScoring typepriority or cia
priorityNoStringPriorityRequired when scoring_type is priority. One of low, medium, high
confidentialityNoStringConfidentialityRequired when scoring_type is cia. One of low, medium, high
integrityNoStringIntegrityRequired when scoring_type is cia. One of low, medium, high
availabilityNoStringAvailabilityRequired when scoring_type is cia. One of low, medium, high

Success Response

{}

Error Responses

Required argument is missing

HTTP status code 400

{
  "error_code": "null-argument",
  "error_msg": "guid should be not null"
}
Invalid GUID format

HTTP status code 400

{
  "error_code": "invalid-param-type",
  "error_msg": "guid should be guid type."
}
CIA values included when scoring_type is priority

HTTP status code 400

{
  "error_code": "invalid-argument",
  "error_msg": "'confidentiality', 'integrity', 'availability' must not be set when type is 'priority'."
}
Priority value included when scoring_type is cia

HTTP status code 400

{
  "error_code": "invalid-argument",
  "error_msg": "'priority' must not be set when type is 'cia'."
}
Invalid priority value

HTTP status code 400

{
  "error_code": "invalid-argument",
  "error_msg": "'priority' should be one of 'low', 'medium', 'high'."
}
Invalid CIA value

HTTP status code 400

{
  "error_code": "invalid-argument",
  "error_msg": "'confidentiality' should be one of 'low', 'medium', 'high'."
}
Unsupported scoring_type

HTTP status code 400

{
  "error_code": "invalid-argument",
  "error_msg": "unsupported type: ABC"
}
Duplicate IP address

HTTP status code 500

{
  "error_code": "illegal-state",
  "error_msg": "duplicated ip: 192.168.10.211"
}
IP address not found

HTTP status code 500

{
  "error_code": "illegal-state",
  "error_msg": "ip address not found"
}
No permission

HTTP status code 500

{
  "error_code": "illegal-state",
  "error_msg": "no-permission"
}