GitHub Sync

When using the Detection Rules as Code feature, you can use the API to start a sync in Scanner.

Syncs happen automatically every 5 minutes, but you can kickoff a sync via API if you want to sync immediately after an event (e.g. pushing a commit to GitHub).

Sync GitHub repositories

POST /v1/sync_github_repositories

Sync GitHub repositories for the given tenant.

Body

Name
Type
Description

tenant_id required

string

Unique identifier for the tenant

Example

curl $API_BASE/v1/sync_github_repositories \
-H "Authorization: Bearer $SCANNER_API_KEY" \
-H "Content-Type: application/json" \
-X POST \
-d '{ "tenant_id": "00000000-0000-0000-0000-000000000000" }'

Response

Returns the tenant_id.

{ "tenant_id": "00000000-0000-0000-0000-000000000000" }

Last updated

Was this helpful?