Pull Findings From Configured API
secobserve_api_importImport security findings from a configured upstream API into SecObserve, attaching them to a branch and service. Returns counts of new, updated, and resolved observations.
Instructions
Pull findings into SecObserve from an upstream API it already has credentials for.
The credentials, base URL and parser come from an API configuration stored on the product; list them with secobserve_list(resource="api_configurations"). The call blocks while SecObserve fetches and parses, so it can take a while.
Args: params (ApiImportInput): Validated input containing: - api_configuration_id (Optional[int]) or api_configuration_name (Optional[str]): exactly one. - branch_id (Optional[int]) with the id form, or branch_name (Optional[str]) with the name form; a named branch is created if missing. - service (Optional[str]): Service to attach findings to. - docker_image_name_tag / endpoint_url (Optional[str]): origin metadata.
Returns: str: observations_new, observations_updated and observations_resolved as reported by the API, one per line.
Examples: - Use when: "refresh findings from our Dependency Track project" -> api_configuration_name="dtrack-portal", branch_name="main" - Use when: scripted re-import after an upstream scan -> api_configuration_id=5 - Don't use when: you have the report file locally (use secobserve_upload_file).
Error Handling: 400 means the upstream call or parse failed -- the message carries the upstream error. A timeout does not mean the import failed: check secobserve_list(resource="vulnerability_checks") before retrying, or raise SECOBSERVE_TIMEOUT.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |