| HTTP Method | Description |
|---|---|
| GET | Retrieve data |
| POST | Upload data |
| PUT | Update data |
| DELETE | Delete data |
Endpoint
GET http://<BAM_url_or_ip>/fm/1/api/v1/provider/<aws_azure_or_gcp>/discoveryWhere <aws_azure_or_gcp> is either aws,
azure, or gcp.
Authentication
The Cloud Discovery & Visibility API endpoints require an authorization token to be passed in the header to successfully execute. For more information on the API that retrieves an authorization token, refer to the REST API Swagger documentation.
Response codes and error messages
The CDV API returns standard HTTP status codes. When a request fails, the response contains a message that describes the problem.
This section describes the responses in CDV 26.1.1. In CDV 26.1, CDV returns 500 (Internal Server Error) for many invalid requests.
| Status code | Description |
|---|---|
| 200 | The request succeeded. |
| 400 | The request is not valid. For example, the request body is not
valid JSON, a required field is missing, a value is outside its
allowed range, or the authentication object
contains empty or placeholder values. |
| 401 | The cloud credentials in the request were rejected, or CDV could not assume the specified AWS role. |
| 404 | The requested object does not exist, or it belongs to a different
cloud platform. For example, the discovery job ID passed to
POST /detection does not match a discovery
job. |
| 409 | The object that the request would create already exists, such as a Schedule manager, a Visibility manager, or an Azure Service Bus namespace. |
| 500 | An unexpected error occurred in CDV. For details, check the CDV logs. For more information, refer to Cloud Discovery & Visibility logging. |
| 502 | CDV could not connect to the cloud provider API. For AWS and Azure, if CDV cannot connect through the proxy that is configured in Address Manager, the message is "Unable to connect through the proxy. Check your proxy settings and try again." For GCP, the message is "A network issue occurred while communicating with the service." For more information, refer to Connecting to cloud providers through a proxy. |
Most error responses contain the message as a JSON string. If the request body is
not valid JSON, CDV returns a 400 response with a
JsonFieldParseError object that names the field nearest to the
parsing error. If a message contains line breaks, CDV returns it as plain text
(Content-Type: text/plain). For the status codes that changed
in CDV 26.1.1, refer to API changes.
REST API Swagger documentation
To access the REST API Swagger documentation, click the help icon at the top right of the Address Manager UI and select Cloud Discovery & Visibility API documentation. You can also access this documentation by entering the following URL in your browser:
http://<BAM_url_or_ip>/fm/1/api/v1/doc/
From here, you can view a list of all supported API methods, their input parameters, and test the API methods. You can also download the OpenAPI JSON specification using the following URL in your browser:
http://<BAM_url_or_ip>/fm/1/api/v1/doc/swagger.json
To download the specification for the endpoints of a single cloud platform, use the following URL:
http://<BAM_url_or_ip>/fm/1/api/v1/doc/provider/<aws_azure_or_gcp>/swagger.json
To open these URLs, you must be logged in to Address Manager in the same browser.