Docs
Live demo
GET/api/v2/targets/{id}/databases/{db}/schemas
targets:readAPI token

Retrieve discovered schemas in a specific database. With refresh=true an organization admin starts discovery as POST /targets/{id}/discover does.

Parameters

Path and query2 required of 3
idstringpathrequired

Target ID (UUID)

dbstringpathrequired

Database name

refreshbooleanquery

Start discovery of the target. Organization admins only, a viewer gets 403

Responses

200

OK

DiscoveryResourceResponse · 3 fields
itemsarray of string
job_idstring

Included when refresh=true triggers async job

2 fields
as_ofstring

Timestamp of the discovery data

staleboolean

Whether the cache is considered stale

202

Discovery started (refresh=true by an organization admin)

409

With refresh=true only. Discovery of the target is paused after failed runs (code target.operation_backoff_active), or the target is being deleted (code cleanup_in_progress), or discovery already runs on this target or waits for its next attempt (code operation.already_running: details.existing_job_id and resources with relation running_operation name that job, details.started_at is when it was started, resolution.code operation.view_running opens it). Nothing was queued.

Common errors: 400 401 403 404 429 504. They mean the same for every operation, see Errors.

↑ ↓ to moveEnter to openEsc to close