DELETE Discovery/{guid}

Deletes a Network Discovery job including all stored results. If the Discovery job is pending or currently in progress, this method cancels the job, removes all associated data, and deletes the Discovery object. For help making the correct API calls to delete data, see Deleting data via the Web SDK.

BEST PRACTICE  Run DELETE Discovery/{guid} when the Network Discovery job is not currently running. Otherwise, partial scan results can appear in the Policy tree. For more information, see Managing discovery jobs.

Requirements

  • Permissions: The caller must have Delete permission to the requested object.
  • Token scope:  Certificate:Delete

Headers

  • Content type: Content-Type:application/json.

  • Token: The bearer access token that you received. For example, Authorization:Bearer 4MyGeneratedBearerTknz==. For more information, see Passing a bearer token in your API calls.

Parameters

Input parameters

Name

Description

{guid}

In the request URL, specify the GUID of the Network Discovery job. For example:

Location of Discovery GUID

Returns

Response description

Name

Description

Success

The status of job deletion:

  • true: Successful deletion of the Network Discovery Config object, all corresponding owner records from SecretStore, and results data from the discovery_results database table.
  • false: The Network Discovery job failed to delete due to an Error.

Error

The reason for failure. If Discovery/Delete{guid} ran successfully, this field is omitted.

  • Discovery jobs delete failed. Failed to delete jobs for Network Discovery with GUID [guid]. [ ToDo Engine result codes.]

  • Discovery results delete failed. Failed to delete results for Network Discovery with GUID [guid]. [ ToDo Engine result codes.]

  • Discovery results delete failed. Failed to delete results for Network Discovery with GUID [ guid]. Details:[ Discovery result codes ].
  • Invalid Network Discovery GUID. The value [guid] is null, empty, or in an invalid format.
  • Invalid permissions. You do not have permission to delete the Network Discovery with GUID [guid].
  • Network Discovery object delete failed. A Config error occurred; error: Config result codes].
  • Object delete failed. The Network Discovery is locked and in use by another process. Please try again later.
  • Object delete failed. The Network Discovery object that corresponds with GUID [guid] is not a Network Discovery.", guid) ToDo Engine result codes.

  • Object retrieval failed. The Network Discovery object with GUID [guid] does not exist or you do not have access to it.
  • Secret Store data delete failed. The corresponding Secret Store data failed to delete; error: [ SecretStore result codes].

Example: Delete a Network Discovery job

Request

DELETE https://tpp.venafi.example/vedsdk/Discovery/{fdb929ee-07eb-48bd-8610-b5f2cc43de7f}
Authorization:Bearer 4MyGeneratedBearerTknz==

Response

HTTP/1.1 200 OK
{
   "Success":true
}