This functionality was first introduced in the Hillary release series. The specific methods described on this page work with Hillary R2 and later releases.
...
Code Block | ||||
---|---|---|---|---|
| ||||
{ "message": "Completed", "details": "", "request_id": "1" } |
Status Message | Description |
---|---|
Queued | The RestAPI Request is queued |
Processing | The RestAPI Request is being processed |
Completed | The RestAPI Request has been successfully processed |
Error | There was a fatal error processing the RestAPI Request |
Invalid Request ID | The request_id is invalid. |
JSON Data file format
A tutorial on how to create JSON data files is beyond the scope of this article. For a full description of the JSON data format see the wikipedia page or the JSON.org website.
The JSON data file should contain the fields "Name" (the value MUST be "LOCATION TARGET"), "Version" (the value MUST BE "1.3")and "Locations", where the Locations field contains an array of locations.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"Name":"LOCATION TARGET",
"Version":"1.3",
"Locations":
[
{ "comment": "Array of locations belongs here" }
]
} |
Each Location should contain the following fields:
Field | Description | Can be empty? | Example or Possible Values |
---|---|---|---|
LocationPath | Name of the location. Sub-locations seperated by the pipe symbol "|" | NO | Sample|Node Sample|Node2|Leaf1 Sample|Node2|Leaf2 |
Target | What category of target is this (Either Application or Device) | NO | Device Application |
Type | What sub-type of target is this (What type of Device, or Which Application) | NO | See the list of valid target types |
Name | The name of the location (This is a freeform text field) | NO | Main Lab QA Lab My Test Location |
Instance Name | The name of the database instance | YES | For scanning database application targets |
Hostname | The host name for hostname targets | YES | vm-test.localdomain www.myserver.example.com vm-myserver |
StartIP | The Start IP Address - use this for Application targets, Single, Range and Subnet targets | YES | 10.0.0.1 |
EndIP | The End IP Address - use this for Range targets only | YES | 10.0.0.99 |
SubnetMask | The netmask - as a number not as a dotted quad - use for Subnet targets only | YES | Use "24" not "255.255.255.0" "0" can be used for an empty target |
Port | The port on which to scan, for Application Targets only | YES | E.g. an SQL Server is usually on port 1433 but can be set to an arbitrary number. |
Exclusion | Whether this is a target exclusion. Use to exclude IP addresses from a larger list | YES | Valid values are "True" or "False". Empty implies False |
The list of valid Device Target types is:
...
Page Properties | ||
---|---|---|
| ||
|