Update a source
Changed onUpdate some source attributes such as monitored status and source criticality.
The monitored status can be updated for all source types except Custom Sources.
⚠️ Note: some sources types are supported on this endpoint, but cannot be updated yet on the dashboard.
Business sources can't be updated if your account doesn't have access to them.
Request
- Base URLhttps://api.gitguardian.com
- URLhttps://api.gitguardian.com/v1/sources/{source_id}
- AuthHTTP bearer
Path parameters
The id of the source to retrieve.
Request body
Example request
{
"id": 6531,
"url": "https://github.com/GitGuardian/gg-shield",
"type": "github",
"full_name": "gitguardian/gg-shield",
"full_path": "GitGuardian/ggshield",
"health": "at_risk",
"default_branch": "main",
"default_branch_head": "abcd97b4aaf927ea934504263322e75e86c31xyz",
"open_incidents_count": 3,
"closed_incidents_count": 2,
"visibility": "public",
"external_id": "125",
"source_criticality": "critical",
"last_scan": {
"date": "2021-05-20T12:40:55.662949Z",
"status": "finished",
"failing_reason": "DMCA takedown",
"commits_scanned": 123,
"branches_scanned": 2,
"duration": "1:30.454444"
},
"monitored": true,
"monitoring_status": "active",
"deleted": true
}Response
The source was updated successfully
Example response
{
"id": 6531,
"url": "https://github.com/GitGuardian/gg-shield",
"type": "github",
"full_name": "gitguardian/gg-shield",
"full_path": "GitGuardian/ggshield",
"health": "at_risk",
"default_branch": "main",
"default_branch_head": "abcd97b4aaf927ea934504263322e75e86c31xyz",
"open_incidents_count": 3,
"closed_incidents_count": 2,
"visibility": "public",
"external_id": "125",
"source_criticality": "critical",
"last_scan": {
"date": "2021-05-20T12:40:55.662949Z",
"status": "finished",
"failing_reason": "DMCA takedown",
"commits_scanned": 123,
"branches_scanned": 2,
"duration": "1:30.454444"
},
"monitored": true,
"monitoring_status": "active",
"deleted": true
}Changes
- info
added the optional property
to the response with the status
- info
- warning
added the new
launchedenum value to the///response property for the response status - warning
added the new
running_cancelledenum value to the///response property for the response status - warning
added the new
running_failedenum value to the///response property for the response status - warning
added the new
skippedenum value to the///response property for the response status - info
added the new
launchedenum value to the request property/// - info
added the new
running_cancelledenum value to the request property/// - info
added the new
running_failedenum value to the request property/// - info
added the new
skippedenum value to the request property///
- warning