Endpoints in the REST API
This version of BMC Discovery supports versions 1.1 of the REST API and earlier. Higher versions are always backwards compatible with earlier versions. The base URL for the latest API version is:
discovery
Control scanning and view results
{{status subtle="false" colour="Blue" title="GET"/}}
/discovery
Click here to expand...
Description
Get the current status of the discovery process
Responses
Code | Description | Schema |
---|---|---|
200 | successful operation | { |
{{status subtle="false" colour="Yellow" title="PATCH"/}}
/discovery
Click here to expand...
Description
Either start or stop the discovery process. Note this call can return before the desired state has been reached.
Parameters
Name | Located in | Description | Default | Schema |
---|---|---|---|---|
body | body |
|
| { |
Responses
Code | Description | Schema |
---|---|---|
200 | successful operation |
|
{{status subtle="false" colour="Blue" title="GET"/}}
/discovery/cloud_metadata
Click here to expand...
Description
Get metadata for the cloud providers currently supported by BMC Discovery. This can be used as a reference when interacting with the /discovery/runs and /vault/credentials endpoints. Support for new cloud providers is available in TKU knowledge updates.
Responses
Code | Description | Schema |
---|---|---|
200 | successful operation | [ |
{{status subtle="false" colour="Blue" title="GET"/}}
/discovery/runs
Click here to expand...
Description
Get details of all currently processing discovery runs.
Responses
Code | Description | Schema |
---|---|---|
200 | successful operation | [ |
{{status subtle="false" colour="Green" title="POST"/}}
/discovery/runs
Click here to expand...
Description
Create a new snapshot discovery run.
Use the returned 'uuid' as the run_id to check the status of the new run at /discovery/runs/{run_id}.
Parameters
Name | Located in | Description | Default | Schema |
---|---|---|---|---|
body | body | Snapshot discovery run to be created |
| newRun { |
Responses
Code | Description | Schema |
---|---|---|
200 | successful operation | { |
{{status subtle="false" colour="Blue" title="GET"/}}
/discovery/runs/{run_id}
Click here to expand...
Description
This endpoint is lightweight to call so should be used if you need to poll until a discovery run has finished. When the 'finished' field is returned as true then use the more costly /discovery/runs/{run_id}/results and /discovery/runs/{run_id}/inferred endpoints to start exploring the results of the run.
Parameters
Name | Located in | Description | Default | Schema |
---|---|---|---|---|
run_id | path | ID of the discovery run |
| string* |
Responses
Code | Description | Schema |
---|---|---|
200 | successful operation | run { |
404 | Invalid run id |
|
{{status subtle="false" colour="Yellow" title="PATCH"/}}
/discovery/runs/{run_id}
Click here to expand...
Parameters
Name | Located in | Description | Default | Schema |
---|---|---|---|---|
run_id | path | ID of the discovery run |
| string* |
body | body |
|
| patchRunCancelled { |
Responses
Code | Description | Schema |
---|---|---|
200 | successful operation | boolean |
{{status subtle="false" colour="Blue" title="GET"/}}
/discovery/runs/{run_id}/results
Click here to expand...
Description
Get a summary of the results from scanning all endpoints in the run, partitioned by result type.
Parameters
Name | Located in | Description | Default | Schema |
---|---|---|---|---|
run_id | path | ID of the discovery run |
| string* |
Responses
Code | Description | Schema |
---|---|---|
200 | successful operation | runResultsSummary { |
{{status subtle="false" colour="Blue" title="GET"/}}
/discovery/runs/{run_id}/results/{result_type}
Click here to expand...
Description
Get a summary of the results from scanning all endpoints in the run that had a specific type of result. Results are returned in the same paginated format as in /data/search. See that endpoint for details on the following parameters:
- offset
- limit
- results_id
- delete
Parameters
Name | Located in | Description | Default | Schema |
---|---|---|---|---|
run_id | path | ID of the discovery run |
| string* |
result_type | path |
|
| string* |
offset | query |
| 0 | integer |
limit | query |
| 100 | integer |
results_id | query |
|
| string |
delete | query |
|
| boolean |
Responses
Code | Description | Schema |
---|---|---|
200 | Returns results in the same paginated format as the search endpoints | [ |
{{status subtle="false" colour="Blue" title="GET"/}}
/discovery/runs/{run_id}/results/{result_type}?format=object
Click here to expand...
Description
As /discovery/runs/{run_id}/results/{result_type} but returns found nodes as objects instead of rows of attribute values.
Parameters
Name | Located in | Description | Default | Schema |
---|---|---|---|---|
run_id | path | ID of the discovery run |
| string* |
result_type | path |
|
| string* |
offset | query |
| 0 | integer |
limit | query |
| 100 | integer |
results_id | query |
|
| string |
delete | query |
|
| boolean |
Responses
Code | Description | Schema |
---|---|---|
200 | Returns results in the same paginated format as the search endpoints | [ |
{{status subtle="false" colour="Blue" title="GET"/}}
/discovery/runs/{run_id}/inferred
Click here to expand...
Description
Get a summary of all inferred devices from a discovery run, partitioned by device type.
From BMC Discovery 11.2 patch 2, this summary also includes device kinds specific to cloud discovery.
Parameters
Name | Located in | Description | Default | Schema |
---|---|---|---|---|
run_id | path | ID of the discovery run |
| string* |
Responses
Code | Description | Schema |
---|---|---|
200 | successful operation | runInferredSummary { |
{{status subtle="false" colour="Blue" title="GET"/}}
/discovery/runs/{run_id}/inferred/{inferred_kind}
Click here to expand...
Description
Get a summary of the devices inferred by a discovery run which have a specific inferred kind. Results are returned in the same paginated format as in /data/search. See that endpoint for details on the following parameters:
- offset
- limit
- results_id
- delete
Parameters
Name | Located in | Description | Default | Schema |
---|---|---|---|---|
run_id | path | ID of the discovery run |
| string* |
inferred_kind | path |
|
| string* |
offset | query |
| 0 | integer |
limit | query |
| 100 | integer |
results_id | query |
|
| string |
delete | query |
|
| boolean |
Responses
Code | Description | Schema |
---|---|---|
200 | Returns results in the same paginated format as the search endpoints | [ |
404 | No such run id or inferred kind |
|
{{status subtle="false" colour="Blue" title="GET"/}}
/discovery/runs/{run_id}/inferred/{inferred_kind}?format=object
Click here to expand...
Description
As /discovery/runs/{run_id}/inferred/{inferred_kind} but returns found nodes as objects instead of rows of attribute values.
Parameters
Name | Located in | Description | Default | Schema |
---|---|---|---|---|
run_id | path | ID of the discovery run |
| string* |
inferred_kind | path |
|
| string* |
offset | query |
| 0 | integer |
limit | query |
| 100 | integer |
results_id | query |
|
| string |
delete | query |
|
| boolean |
Responses
Code | Description | Schema |
---|---|---|
200 | Returns results in the same paginated format as the search endpoints | [ |
404 | No such run id or inferred kind |
|
data
Retrieve data from the model
{{status subtle="false" colour="Blue" title="GET"/}}
/data/search
Click here to expand...
Description
Run a search query, receiving paginated results.
Parameters
Name | Located in | Description | Default | Schema |
---|---|---|---|---|
query | query | The search query to run, in BMC Discovery query language. If your query is too long to fit in a url, use POST /data/search |
| string* |
offset | query | The offset of the first item to return in this page of results. | 0 | integer |
limit | query | Limits how many items to return in this page of results. Further items can be retrieved by making another request with a different offset. | 100 | integer |
results_id | query | An opaque id that can be used to access a result set that has already been generated via a previous search request. Must be supplied if requesting an offset greater than 0. |
| string |
delete | query | Controls whether the result set is deleted or not before results are returned. |
| boolean |
Responses
Code | Description | Schema |
---|---|---|
200 | As a search query may return multiple results sets of different kinds, the response is a list of results objects - one per kind | [ |
{{status subtle="false" colour="Green" title="POST"/}}
/data/search
Click here to expand...
Description
An alternative to GET /data/search, for search queries which are too long for urls.
Parameters
Name | Located in | Description | Default | Schema |
---|---|---|---|---|
offset | query |
| 0 | integer |
limit | query |
| 100 | integer |
results_id | query |
|
| string |
delete | query |
|
| boolean |
body | body |
|
| searchQuery { |
Responses
Code | Description | Schema |
---|---|---|
200 | See notes on GET endpoint results | [ |
{{status subtle="false" colour="Blue" title="GET"/}}
/data/search?format=object
Click here to expand...
Description
As /data/search but returns results as objects instead of rows of values.
Parameters
Name | Located in | Description | Default | Schema |
---|---|---|---|---|
query | query |
|
| string* |
offset | query |
| 0 | integer |
limit | query |
| 100 | integer |
results_id | query |
|
| string |
delete | query |
|
| boolean |
Responses
Code | Description | Schema |
---|---|---|
200 | As a search query may return multiple results sets of different kinds, the response is a list of results objects - one per kind | [ |
{{status subtle="false" colour="Green" title="POST"/}}
/data/search?format=object
Click here to expand...
Description
An alternative to GET /data/search?format=object, for search queries which are too long for urls.
Parameters
Name | Located in | Description | Default | Schema |
---|---|---|---|---|
offset | query |
| 0 | integer |
limit | query |
| 100 | integer |
results_id | query |
|
| string |
delete | query |
|
| boolean |
body | body |
|
| searchQuery { |
Responses
Code | Description | Schema |
---|---|---|
200 | See notes on GET endpoint results | [ |
{{status subtle="false" colour="Blue" title="GET"/}}
/data/nodes/{node_id}
Click here to expand...
Description
Get the state of a node with specified id
Parameters
Name | Located in | Description | Default | Schema |
---|---|---|---|---|
node_id | path | ID of node to find |
| string* |
Responses
Code | Description | Schema |
---|---|---|
200 | successful operation | nodeResults { |
{{status subtle="false" colour="Blue" title="GET"/}}
/data/nodes/{node_id}?relationships=true
Click here to expand...
Description
Get the state of a node with specified id, along with the traversal specs of all current relationships it has.
Parameters
Name | Located in | Description | Default | Schema |
---|---|---|---|---|
node_id | path | ID of node to find |
| string* |
Responses
Code | Description | Schema |
---|---|---|
200 | successful operation | nodeResultsRels { |
{{status subtle="false" colour="Blue" title="GET"/}}
/data/nodes/{node_id}?traverse={traverse_spec}
Click here to expand...
Description
Get the state of a node with specified id, along with the IDs of all nodes reached by following a traversal spec.
Parameters
Name | Located in | Description | Default | Schema |
---|---|---|---|---|
node_id | path | ID of node to find |
| string* |
traverse_spec | path | A traversal spec to follow and retrieve related node IDs. May be wildcarded |
| string* |
flags | query | Search flags to use when traversing to related nodes, comma separated |
| [ |
Responses
Code | Description | Schema |
---|---|---|
200 | successful operation | nodeResultsTraverse { |
{{status subtle="false" colour="Blue" title="GET"/}}
/data/nodes/{node_id}/graph
Click here to expand...
Description
Graph data represents a set of nodes and relationships that are associated to the given node. If the node is of ModelDefinition kind, the graph data is obtained from the model's contents rather than running the generic graph traversal function.
Parameters
Name | Located in | Description | Default | Schema |
---|---|---|---|---|
node_id | path | ID of node for which the graph data is generated |
| string* |
focus | query | Context used for determining how the graph should be traversed. Must be one of:
| "software-connected" | string |
apply_rules | query | Whether to apply global rules - which is a set of pre-defined constraints to prevent traversing to too many nodes - while obtaining the graph data. | true | boolean |
Responses
Code | Description | Schema |
---|---|---|
200 | successful operation | nodeGraphResults { |
{{status subtle="false" colour="Blue" title="GET"/}}
/data/kinds/{kind}
Click here to expand...
Description
Finds all nodes of a specified node kind. Nodes can be filtered by zero to many attribute value using the request's query string. For example, /data/kinds/Host?os_type=Windows. All attribute values are assumed to be strings. Note that Swagger does not support free-form query strings, so tools (such as the Swagger UI) or code generated for this endpoint will not be aware of these.
Note also that as results of subsequent pages use the query string to control pagination, the following query string keys are reserved:
- offset
- limit
- format
- delete
- results_id
For an explanation of these parameters see GET /data/search. More involved filtering can be achieved using that endpoint.
Parameters
Name | Located in | Description | Default | Schema |
---|---|---|---|---|
kind | path | Node kind to retrieve results for |
| string* |
offset | query |
| 0 | integer |
limit | query |
| 100 | integer |
results_id | query |
|
| string |
delete | query |
|
| boolean |
Responses
Code | Description | Schema |
---|---|---|
200 | Returns results in the same paginated format as the search endpoints | [ |
{{status subtle="false" colour="Blue" title="GET"/}}
/data/kinds/{kind}?format=object
Click here to expand...
Description
As /data/kinds/{kind} but returns found nodes as objects instead of rows of attribute values.
Parameters
Name | Located in | Description | Default | Schema |
---|---|---|---|---|
kind | path | Node kind to retrieve results for |
| string* |
offset | query |
| 0 | integer |
limit | query |
| 100 | integer |
results_id | query |
|
| string |
delete | query |
|
| boolean |
Responses
Code | Description | Schema |
---|---|---|
200 | Returns results in the same paginated format as the search endpoints | [ |
vault
Manage the credential vault
{{status subtle="false" colour="Blue" title="GET"/}}
/vault
Click here to expand...
Responses
Code | Description | Schema |
---|---|---|
200 | successful operation | vault { |
{{status subtle="false" colour="Yellow" title="PATCH"/}}
/vault
Click here to expand...
Parameters
Name | Located in | Description | Default | Schema |
---|---|---|---|---|
body | body |
|
| patchVault { |
Responses
Code | Description | Schema |
---|---|---|
200 | successful operation |
|
credentials
Manage credentials
{{status subtle="false" colour="Blue" title="GET"/}}
/vault/credential_types
Click here to expand...
Description
Get a list of all credential types and filter by group and/or category.
Parameters
Name | Located in | Description | Default | Schema |
---|---|---|---|---|
group | query | Filter credential types by group |
| string |
category | query | Filter credential types by category |
| string |
Responses
Code | Description | Schema |
---|---|---|
200 | successful operation | [ |
{{status subtle="false" colour="Blue" title="GET"/}}
/vault/credential_types/{cred_type_name}
Click here to expand...
Parameters
Name | Located in | Description | Default | Schema |
---|---|---|---|---|
cred_type_name | path | Name of the credential type |
| string* |
Responses
Code | Description | Schema |
---|---|---|
200 | successful operation | credentialType { |
{{status subtle="false" colour="Blue" title="GET"/}}
/vault/credentials
Click here to expand...
Responses
Code | Description | Schema |
---|---|---|
200 | successful operation | [ |
{{status subtle="false" colour="Green" title="POST"/}}
/vault/credentials
Click here to expand...
Description
Parameters
Name | Located in | Description | Default | Schema |
---|---|---|---|---|
body | body | Credential to be added. Note that a default label is generated if no label is provided. |
| credentialInput { |
Responses
Code | Description | Schema |
---|---|---|
200 | successful operation | { |
{{status subtle="false" colour="Blue" title="GET"/}}
/vault/credentials/{cred_id}
Click here to expand...
Parameters
Name | Located in | Description | Default | Schema |
---|---|---|---|---|
cred_id | path | ID of the credential |
| string* |
Responses
Code | Description | Schema |
---|---|---|
200 | successful operation | credential { |
{{status subtle="false" colour="Yellow" title="PUT"/}}
/vault/credentials/{cred_id}
Click here to expand...
Description
Replaces a single credential. All required credential properties must be present. Optional properties that are missing will be reset to their defaults.
Parameters
Name | Located in | Description | Default | Schema |
---|---|---|---|---|
cred_id | path | ID of the credential |
| string* |
body | body | Credential properties |
| credentialInput { |
Responses
Code | Description | Schema |
---|---|---|
200 | successful operation |
|
{{status subtle="false" colour="Yellow" title="PATCH"/}}
/vault/credentials/{cred_id}
Click here to expand...
Description
Updates partial resources of a credential. Missing properties are left unchanged.
Parameters
Name | Located in | Description | Default | Schema |
---|---|---|---|---|
cred_id | path | ID of the credential |
| string* |
body | body | Credential properties |
| credentialInput { |
Responses
Code | Description | Schema |
---|---|---|
200 | successful operation |
|
{{status subtle="false" colour="Red" title="DELETE"/}}
/vault/credentials/{cred_id}
Click here to expand...
Description
Deletes a specific credential.
Parameters
Name | Located in | Description | Default | Schema |
---|---|---|---|---|
cred_id | path | ID of the credential |
| string* |
Responses
Code | Description | Schema |
---|---|---|
200 | successful operation |
|
knowledge
Upload new TKUs and pattern modules
{{status subtle="false" colour="Blue" title="GET"/}}
/knowledge
Click here to expand...
Description
Get the current state of the appliance's knowledge, including TKU versions.
Responses
Code | Description | Schema |
---|---|---|
200 | successful operation | knowledgeState { |
{{status subtle="false" colour="Green" title="POST"/}}
/knowledge/{filename}
Click here to expand...
Description
Upload a TKU or pattern module to the appliance. The body of the request should contain the knowledge upload file either as binary data or in multipart/form-data format (according to RFC 2388).
After calling this endpoint, use GET /knowledge/status to see progress of the upload.
From BMC Discovery 11.1 patch 3, the REST API supports uploading individual TPL files.
On versions of BMC Discovery prior to 11.1 patch 5, set the 'Content-Type' header to 'application/octet-stream' if uploading as binary data.
Parameters
Name | Located in | Description | Default | Schema |
---|---|---|---|---|
filename | path | Filename of the upload, for reporting purposes. Must have one of these extensions: .tpl, .zip, .drpm, .hrd |
| string* |
activate | query | Flag if patterns should be activated after upload | true | boolean |
allow_restart | query | Flag if services may be restarted in order to update Network Devices or Product Content. If this is false, but a restart IS required, the upload will not be performed. This case can be detected by checking the optional field 'restart_required' in the body of the error response | false | boolean |
file | formData | File to upload |
| file* |
Responses
Code | Description | Schema |
---|---|---|
200 | successful operation |
|
400 | invalid upload |
|
500 | server side error |
|
503 | another upload is in progress |
|
{{status subtle="false" colour="Blue" title="GET"/}}
/knowledge/status
Click here to expand...
Description
Get the current state of a knowledge upload.
Responses
Code | Description | Schema |
---|---|---|
200 | successful operation | { |
events
Push events
{{status subtle="false" colour="Green" title="POST"/}}
/events
Click here to expand...
Description
Returns a unique ID if the event has been recorded, otherwise an empty string is returned e.g. if the event source has been disabled.
Parameters
Name | Located in | Description | Default | Schema |
---|---|---|---|---|
body | body |
|
| event { |
Responses
Code | Description | Schema |
---|---|---|
200 | successful operation | string |
admin
Manage BMC Discovery
{{status subtle="false" colour="Blue" title="GET"/}}
/admin/baseline
Click here to expand...
Description
Get a summary of the appliance status, and details of which baseline checks have passed or failed.
Responses
Code | Description | Schema |
---|---|---|
200 | successful operation | baselineStatus { |
{{status subtle="false" colour="Blue" title="GET"/}}
/admin/about
Click here to expand...
Description
Get information about the appliance, like its version and versions of the installed packages.
Responses
Code | Description | Schema |
---|---|---|
200 | successful operation | about { |
{{status subtle="false" colour="Blue" title="GET"/}}
/admin/licensing
Click here to expand...
Description
Responses
Code | Description | Schema |
---|---|---|
200 | successful operation | file |
{{status subtle="false" colour="Blue" title="GET"/}}
/admin/licensing/csv
Click here to expand...
Description
Download raw license data in CSV format as a zip file for offline analysis.
Responses
Code | Description | Schema |
---|---|---|
200 | successful operation | file |
{{status subtle="false" colour="Blue" title="GET"/}}
/admin/licensing/raw
Click here to expand...
Description
Download the encrypted raw license data on this appliance for import on another appliance.
Responses
Code | Description | Schema |
---|---|---|
200 | successful operation | file |