GitGuardian API
Introduction Whether you want to build a complete integration with your software development workflow or simply want to test GitGuardian's policy break…
Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.
Overview
Introduction
Whether you want to build a complete integration with your software development
workflow or simply want to test GitGuardian's policy break detection on any text content,
you can use our API.
- The base url for the latest version is
https://api.gitguardian.com/v1orhttps://api.eu1.gitguardian.com/v1depending on your location. - All data is sent and received as JSON by default.
- All timestamps returned are ISO-8601 compliant, example:
2020-03-16T04:46:00+00:00 # for date-timeGitGuardian supported wrappers:
- Python: py-gitguardian
GitGuardian provides you with GitGuardian Shield,
a CLI application that uses the GitGuardian API through py-gitguardian
to scan your files and detect potential secrets or issues in your code.
This CLI application can be used in many CIs (such as GitHub Actions, GitLab Pipelines, CircleCI,...)
or as a pre-commit or pre-receive hook.
Authentication
The GitGuardian API uses API keys to authenticate requests.
For a detailed explanation, please refer to our dedicated documentation.
Use /v1/health to check the validity of your token if needed.
Pagination
The GitGuardian API employs cursor-based pagination.
For a detailed explanation, please refer to our dedicated documentation.
Endpoints 218
API Tokens
- GETRetrieve details of the current API token.
/v1/api_tokens/self - DELETERevoke the current API token.
/v1/api_tokens/self - GETList API tokens.
/v1/api_tokensList all the tokens in the workspace, some filters are available and described below. - POSTCreate an API token.
/v1/api_tokensCreate a new personal access token or service account token in the workspace. Unlike the other API token endpoints, this one requires no particular scope: any… - GETRetrieve details of an API token.
/v1/api_tokens/:token_id - DELETERevoke an API token.
/v1/api_tokens/:token_id - POSTCreate a JSON Web Token.
/v1/auth/jwtCreate a short lived JWT for authentication to specific GitGuardian services, including HasMySecretLeaked.
Internal Secret Locations
- GETList locations of a secret incident
/v1/incidents/secrets/:incident_id/locationsList the files that still hold the secret of an incident, on the default branch of each source of your perimeter. One location is one file of one source. It… - GETList locations of a source
/v1/sources/:source_id/locationsList the files of a source that still hold a secret, on the default branch of the source. One location is one file and one secret incident. It carries the…
Secret Detectors
- GETList secret detectors
/v1/secret_detectorsList secret detectors. - GETGet a secret detector
/v1/secret_detectors/:detector_nameGet a secret detector.
Custom Hosts
- GETList detector custom hosts
/v1/detector-custom-hostsList the custom hosts configured on the workspace, grouped by secret detector. Only secret detectors that support custom hosts are returned.
Severity Rules
- GETList severity rules
/v1/severity-rulesList the severity rules currently active for the workspace. These rules determine how incident severity is automatically assigned. Use the rule id to…
Secrets
- GETRetrieve a secret value
/v1/secrets/:secret_idRetrieve the information, including its clear text value, of a secret by its ID. Access requires the token to see at least one incident linked to the secret,… - GETGet the validity and analysis of a secret
/v1/secrets/:secret_id/validityRetrieve the current validity status of a secret together with its validity override. validity_override is null when no override is set. analysis contains the… - POSTOverride the validity of a secret
/v1/secrets/:secret_id/validityOverride the validity status of a secret with a customer-provided value. While an override is set, GitGuardian stops running its periodic validity checks for… - DELETERemove the validity override of a secret
/v1/secrets/:secret_id/validityRemove the customer-provided validity override of a secret. GitGuardian resumes its periodic validity checks and a fresh check is triggered to recompute the… - POSTRequest a new validity check of a secret
/v1/secrets/:secret_id/validity/checkRequest a new validity check of a secret, to find out whether it is still valid. The check runs asynchronously: a 202 means it was accepted, not that it… - POSTRevoke a secret
/v1/secrets/:secret_id/revokeAsk the provider of a secret to revoke it, so that it can no longer be used. Only secrets whose detector has a revoker can be revoked. The response tells…
Code Fixing
- POSTCreate code fix requests
/v1/code-fix-requestsCreate code fix requests for multiple secret incidents with their locations. This will generate pull requests to automatically remediate the detected secrets.…
GitHub Check Runs
- GETList GitHub check runs
/v1/check-runsList the GitHub check runs that GitGuardian ran on pull requests, from the most recent to the oldest. Filter on incident_id to get the check runs that… - POSTSkip a GitHub check run
/v1/check-runs/:check_run_id/skipSkip a GitHub check run that blocks a pull request, as the "Skip" buttons of the check run do on GitHub. This works even when the buttons are disabled in the…
Invitations
- GETList invitations
/v1/invitationsThis endpoint allows you to list all pending invitations. The response contains the list of invitations and a pagination cursor to retrieve the next page. The… - POSTCreate an invitation
/v1/invitationsThis endpoint allows you to send an invitation to a user. If you are using a personal access token, you need to have an access level superior or equal to… - GETRetrieve an invitation
/v1/invitations/:invitation_idRetrieve an existing invitation. If you are using a personal access token, you need to have an access level superior or equal to member. - DELETEDelete an invitation
/v1/invitations/:invitation_idDelete an existing invitation. If you are using a personal access token, you need to have an access level superior or equal to manager. - POSTResend an invitation
/v1/invitations/:invitation_id/resendResend an existing invitation. If you are using a personal access token, you need to have an access level superior or equal to manager. - GETCheck invitation permission for a resource
/v1/invitations/:invitation_id/:resource_type/:resource_idReturn the permission an invitation has on a resource. If the invitation has an admin access level, it will be the highest possible value. - PUTGive an invitation access to a resource
/v1/invitations/:invitation_id/:resource_type/:resource_idThis will create or update a direct access for the invitation on the resource. If the invitation has an administrator access level, it will take precedence… - DELETERevoke an invitation's access to a resource
/v1/invitations/:invitation_id/:resource_type/:resource_idRevoke an invitation access to a resource. This only works for direct accesses. If the access is from the administrator access level of the invitation, a 404… - GETList secret incidents an invitation has access to
/v1/invitations/:invitation_id/secret-incidentsList secret incidents that an invitation has access to.
Sources
- GETList sources
/v1/sourcesList sources known by GitGuardian. - GETRetrieve a source
/v1/sources/:source_idRetrieve a source known by GitGuardian. - PATCHUpdate a source
/v1/sources/:source_idUpdate some source attributes such as monitored status and source criticality. The monitored status can be updated for all source types except Custom Sources.… - POSTTrigger scans on sources
/v1/sources/scans⚠️ Beta Version: This endpoint is in beta and may be subject to changes in future releases. Trigger historical scans for a list of source IDs. The scans are… - GETList scans
/v1/scans⚠️ Beta endpoint: behavior and schemas are subject to change. List historical scans with the same payload the scan detail endpoint returns, so a whole… - GETRetrieve a scan
/v1/scans/:scan_id⚠️ Beta endpoint: behavior and schemas are subject to change. Retrieve a historical scan's progress: element and byte counters, plus the scan's audit summary… - GETList custom sources
/v1/sources/custom-sourcesList custom sources for the authenticated account. ⚠️ Beta Version: This endpoint is in beta and may be subject to changes in future releases. - POSTCreate custom source
/v1/sources/custom-sourcesCreate a new custom source for the authenticated account. ⚠️ Beta Version: This endpoint is in beta and may be subject to changes in future releases. - GETGet a custom source
/v1/sources/custom-sources/:custom_source_idGet a custom source by ID. ⚠️ Beta Version: This endpoint is in beta and may be subject to changes in future releases. - DELETEDelete a custom source
/v1/sources/custom-sources/:custom_source_idDelete a custom source. This will also delete the related integration if no other sources exist. ⚠️ Beta Version: This endpoint is in beta and may be subject… - PATCHUpdate a custom source
/v1/sources/custom-sources/:custom_source_idUpdate a custom source's name, description, and validators-only scan setting. ⚠️ Beta Version: This endpoint is in beta and may be subject to changes in…
Members
- GETList members
/v1/membersList members of the workspace. - GETRetrieve a member
/v1/members/:member_idRetrieve an existing workspace member. If you are using a personal access token, you need to have an access level greater or equal to member. - DELETEDelete a member
/v1/members/:member_idDelete an existing workspace member. If you are using a personal access token, you need to have an access level greater or equal to manager. - PATCHUpdate a member
/v1/members/:member_idUpdate an existing workspace member. If you are using a personal access token, you need to have an access level greater or equal to manager. - GETList teams of a member
/v1/members/:member_id/teamsList teams of a workspace member. The response contains the list of teams and a pagination cursor to retrieve the next page. The teams are sorted by id. If… - GETCheck member permission for a resource
/v1/members/:member_id/:resource_type/:resource_idReturn the permission a member has on a resource. The permission is the higher value between the different accesses the member can have (direct access,… - PUTGive a member access to a resource
/v1/members/:member_id/:resource_type/:resource_idThis will create or update a direct access for the member on the resource. If the member has higher permission from another source, they will take precedence… - DELETERevoke a member's access to a resource
/v1/members/:member_id/:resource_type/:resource_idRevoke a member access to a resource. This only works for direct accesses. If the member has only indirect access, a 404 is returned. - GETList secret incidents a member has access to
/v1/members/:member_id/secret-incidentsList secret incidents that a member has access to. - GETRetrieve a member's email settings
/v1/members/:member_id/email_notificationsRetrieve a member's email settings If you are using a personal access token, you need to have access level greater than member to view other member's settings - PATCHUpdate a member's email settings
/v1/members/:member_id/email_notificationsUpdate a member's email settings If you are using a personal access token, you need to have access level greater than member to edit other member's settings - GETList team memberships of a member
/v1/members/:member_id/team_membershipsList team memberships of a workspace member. The response contains the list of team memberships and a pagination cursor to retrieve the next page. The team…
Scan Methods
- POSTContent scan
/v1/scanScan provided document content for policy breaks. Request body shouldn't exceed 1MB. This endpoint is stateless and as such will not store in our servers… - POSTMultiple content scan
/v1/multiscanScan provided document contents for policy breaks. Multiple documents are returned by the same index order. There should not be more than 20 documents in the… - POSTScan content and create incidents
/v1/scan/create-incidentsScan provided content for hardcoded secrets and create incidents that will be reflected on the GitGuardian dashboard. ⚠️ Beta Version: This endpoint is in…
Quota
- GETQuota overview
/v1/quotasCheck available scanning calls for this token. Quota is shared between all tokens of a workspace
Status
- GETAPI Health
/v1/healthCheck the status of the API and your token without spending your quota.
Teams
- GETList teams
/v1/teamsThis endpoint allows you to list all the teams of your workspace. The response contains the list of teams and a pagination cursor to retrieve the next page.… - POSTCreate a team
/v1/teamsThis endpoint allows you to create a team. If you are using a personal access token, you need to have an access level superior or equal to manager. If a… - GETRetrieve a team
/v1/teams/:team_idRetrieve an existing team. If you are using a personal access token, you need to have an access level greater or equal to member. - DELETEDelete a team
/v1/teams/:team_idDelete an existing team. If you are using a personal access token, you must have "can manage" permission on the team or be a workspace manager. The… - PATCHUpdate a team
/v1/teams/:team_idUpdate a team's name and/or its description. If you are using a personal access token, you must have "can manage" permission on the team or be a workspace… - GETCheck team permission for a resource
/v1/teams/:team_id/:resource_type/:resource_idReturn the permission a team has on a resource. For the global team, it will always be the highest possible permission. - PUTGive a team access to a resource
/v1/teams/:team_id/:resource_type/:resource_idThis will create or update a direct access for the team on the resource. If the access to the resource is already given by the team's perimeter, an error is… - DELETERevoke a team's access to a resource
/v1/teams/:team_id/:resource_type/:resource_idRevoke the access a team has to a resource. This only works for direct accesses. If the access to the resource is given by the team's perimeter, an error is… - GETList secret incidents a team has access to
/v1/teams/:team_id/secret-incidentsList secret incidents that a team has access to.
Team Invitations
- GETList team invitations
/v1/teams/:team_id/team_invitationsList all existing team invitations. If you are using a personal access token, you must have "can manage" permission on the team or be a workspace manager. - POSTCreate a team invitation
/v1/teams/:team_id/team_invitationsThis endpoint allows you to create a team invitation from an existing team and invitation. If you are using a personal access token, you must have "can… - DELETEDelete a team invitation
/v1/teams/:team_id/team_invitations/:team_invitation_idDelete an existing team invitation. If you are using a personal access token, you must have "can manage" permission on the team or be a workspace manager. - PATCHUpdate a team invitation
/v1/teams/:team_id/team_invitations/:team_invitation_idUpdate permissions of a team invitation. If you are using a personal access token, you must have "can manage" permission on the team or be a workspace manager.
Team Memberships
- GETList team memberships
/v1/teams/:team_id/team_membershipsList all the memberships of a team. If you are using a personal access token, you need to be a workspace manager or be part of the team. - POSTAdd a member to a team
/v1/teams/:team_id/team_membershipsAdd a member to a team. If you are using a personal access token, you must have "can manage" permission on the team or be a workspace manager. - DELETERemove a member from a team
/v1/teams/:team_id/team_memberships/:team_membership_idRemove a member from a team. If you are using a personal access token, you must have "can manage" permission on the team or be a workspace manager, or be the… - PATCHUpdate a team membership
/v1/teams/:team_id/team_memberships/:team_membership_idUpdate permissions of a team membership. If you are using a personal access token, you must have "can manage" permission on the team or be a workspace manager.
Health Checks
- GETList health checks
/v1/health-checksList the latest health check per integration instance for the authenticated account. Each entry represents the most recent health check run for a given… - GETList health check history for an instance
/v1/health-checks/:type/:instance_idList all historical health check runs for a specific integration instance, ordered by most recent first by default. The type path parameter identifies the… - POSTTrigger a health check
/v1/health-checks/:type/:instance_id/triggerEnqueue a health check for a specific integration instance. The check runs asynchronously. The response includes a result_url pointing to the instance history…
Honeytokens
- GETList honeytokens
/v1/honeytokensThis endpoint allows you to list all the honeytokens of your workspace. The response contains the list of honeytokens and a pagination cursor to retrieve the… - POSTCreate a honeytoken
/v1/honeytokensThis endpoint allows you to create a honeytoken of a type. If you are using a personal access token, you need to have an access level superior or equal to… - GETList a machine/user's honeytoken deployments (read-only)
/v1/honeytokens/endpoint-deployments?machine_id=7e3a9d7f-8a5e-4e23-9c2f-eb1d6f64fa55&username=alice⚠️ Beta Version: This endpoint is in beta and may be subject to changes in future releases. Lists the live honeytoken deployments for a machine and OS user,… - POSTReconcile (plant) honeytokens for a machine/user
/v1/honeytokens/endpoint-deployments⚠️ Beta Version: This endpoint is in beta and may be subject to changes in future releases. Reconciles the endpoint honeytokens for a machine and OS user, and… - PATCHConfirm a honeytoken endpoint deployment
/v1/honeytokens/endpoint-deployments/:id⚠️ Beta Version: This endpoint is in beta and may be subject to changes in future releases. Report the outcome of an endpoint deployment returned by POST… - POSTCreate a honeytoken within a context
/v1/honeytokens/with-contextThis endpoint allows you to create a honeytoken of a given type within a context. The context is a realistic file in which your honeytoken is inserted. If… - GETRetrieve a honeytoken
/v1/honeytokens/:honeytoken_idRetrieve an existing honeytoken. If you are using a personal access token, you need to have an access level greater or equal to manager. - PATCHUpdate a honeytoken
/v1/honeytokens/:honeytoken_idUpdate a name or descriptions of an existing honeytoken. - POSTReset the honeytoken
/v1/honeytokens/:honeytoken_id/resetResets a triggered honeytoken. All the associated events will be closed. - POSTRevoke the honeytoken
/v1/honeytokens/:honeytoken_id/revokeRevokes an active or triggered honeytoken. All the associated events will be closed. - POSTBulk prefix lookup for honeytoken HMSL hashes
/v1/honeytokens/prefixesAccepts a list of 5-character HMSL hash prefixes and returns hints for matching honeytokens owned by the caller's account. The response contains only SHA-256…
Honeytoken Notes
- GETList notes on an honeytoken
/v1/honeytokens/:honeytoken_id/notesList notes left on a honeytoken in chronological order. - POSTCreate an honeytoken note
/v1/honeytokens/:honeytoken_id/notesAdd a note on a honeytoken. - DELETEDelete a honeytoken note
/v1/honeytokens/:honeytoken_id/notes/:note_idDelete an existing comment on a honeytoken. Only honeytoken notes created by the current API key can be deleted. - PATCHUpdate a honeytoken note
/v1/honeytokens/:honeytoken_id/notes/:note_idUpdate an existing comment on a honeytoken. Only honeytoken notes created by the current API key can be updated.
Honeytokens Events
- GETList all honeytokens events
/v1/honeytokens_eventsList events related to all honeytokens of the workspace.
Honeytoken Sources
- GETList sources on an honeytoken
/v1/honeytokens/:honeytoken_id/sourcesList sources where a honeytoken appears.
IP Allowlist
- GETList IP allowlist rules
/v1/ip-allowlistThis endpoint allows you to list all the IP allowlist rules of your workspace. The response contains the list of IP allowlist rules and a pagination cursor to… - POSTCreate an IP allowlist rule
/v1/ip-allowlistThis endpoint allows you to create an IP allowlist rule. If you are using a personal access token, you need to have an access level superior or equal to… - GETRetrieve an IP allowlist rule
/v1/ip-allowlist/:ip_allowlist_rule_idRetrieve an existing IP allowlist rule. If you are using a personal access token, you need to have an access level greater or equal to manager. - DELETEDelete an IP allowlist rule
/v1/ip-allowlist/:ip_allowlist_rule_idDelete an existing IP allowlist rule. - PATCHUpdate an IP allowlist rule
/v1/ip-allowlist/:ip_allowlist_rule_idUpdate the tag or the IP ranges of an existing IP allowlist rule.
IPs
- GETList GitGuardian IP addresses
/v1/ipsGet GitGuardian's egress IP addresses for IP allowlisting. Use these IP addresses to configure access controls and allow GitGuardian services to access your…
SCIM Users
- GETList members (SCIM)
/v1/scim/v2/UsersList members of the workspace (using SCIM Protocol). - POSTCreate a member (SCIM)
/v1/scim/v2/UsersCreate a new workspace member (using SCIM Protocol). - GETDetail of a member (SCIM)
/v1/scim/v2/Users/:idDetail of a workspace member (using SCIM Protocol). - PUTUpdate of a member (SCIM)
/v1/scim/v2/Users/:idUpdate of a workspace member (using SCIM Protocol). - DELETEDelete a member (SCIM)
/v1/scim/v2/Users/:idDelete a workspace member (using SCIM Protocol). - PATCHUpdate (partial) of a member (SCIM)
/v1/scim/v2/Users/:idUpdate of a workspace member (using SCIM Protocol).
SCIM Groups
- GETList groups (SCIM)
/v1/scim/v2/GroupsList groups (teams in GIM) of the workspace using the SCIM Protocol. - POSTCreate a group (SCIM)
/v1/scim/v2/GroupsCreate a new group (team in GIM) using the SCIM Protocol. - GETDetail of a group (SCIM)
/v1/scim/v2/Groups/:idDetail of a group (team in GIM) using the SCIM Protocol. - PUTUpdate a group (SCIM)
/v1/scim/v2/Groups/:idUpdate a group (team in GIM) using the SCIM Protocol. - DELETEDelete a group (SCIM)
/v1/scim/v2/Groups/:idDelete a group (team in GIM) using the SCIM Protocol. - PATCHPartially update a group (SCIM)
/v1/scim/v2/Groups/:idPartially update a group (team in GIM) using the SCIM Protocol.
SCIM Metadata
- GETService Provider Configuration (SCIM)
/v1/scim/v2/ServiceProviderConfigList the SCIM specification features available on a service provider. - GETList Resource Types (SCIM)
/v1/scim/v2/ResourceTypesList of Resource Types - GETResource Types (SCIM)
/v1/scim/v2/ResourceTypes/:nameDetail of a Resource Types - GETList Schemas (SCIM)
/v1/scim/v2/SchemasList of SCIM Schemas - GETSchema (SCIM)
/v1/scim/v2/Schemas/:nameDetail of a Schema
Custom Tags
- GETList custom tags
/v1/custom_tagsList all existing custom tags. - POSTCreate a custom tag
/v1/custom_tagsThis endpoint allows you to create a custom tag. - DELETEDelete a custom tags key
/v1/custom_tags?key=envThis endpoint allows you to delete all custom tags using the given key. Deletion is blocked when any of the custom tags is referenced in one or more active… - PATCHUpdate custom tags key
/v1/custom_tags?old_key=env&new_key=environmentThis endpoint allows you to update a key for all custom tags using it. - GETRetrieve a custom tag
/v1/custom_tags/:custom_tag_idThis endpoint allows you to retrieve an existing custom tag. - PUTFull Update of a Custom Tag
/v1/custom_tags/:custom_tag_idThis endpoint allows you to update a specific custom tag. It replaces the entire custom tag (key and value). This does not impact other custom tags sharing… - DELETEDeletion of a custom tag
/v1/custom_tags/:custom_tag_idThis endpoint allows you to delete a specific custom tag. This does not impact other custom tags sharing the same key. Deletion is blocked when the custom tag… - PATCHPartial update of a Custom Tag
/v1/custom_tags/:custom_tag_idThis endpoint allows you to partially update a specific custom tag. It updates only the specified fields (key or value), leaving the other fields unchanged.…
Endpoint Machines
- GETList machines
/v1/endpoints/machinesList the machines of the workspace that ggshield or the endpoint scanner report, with the partitions (user and system contexts) found on each machine. The… - GETRetrieve a machine
/v1/endpoints/machines/:idRetrieve a machine of the workspace, with its partitions. The API token must have the Manager access level or above, or be a service account token.
NHI Identities
- GETList identities
/v1/nhi/identitiesList the non-human identities (NHIs) of the workspace. The response contains a page of identities and a pagination cursor to retrieve the next page. Filters… - POSTPromote identities to incidents
/v1/nhi/identities/promoteCreate a secret incident for the secret of each identity, as the "Promote to incident" action of the dashboard does. An identity whose secret already has an… - GETRetrieve an identity
/v1/nhi/identities/:identity_idRetrieve a non-human identity, with its permissions and a summary of its secrets. The API token must have the Manager access level or above, or be a service… - GETList the locations of an identity
/v1/nhi/identities/:identity_id/locationsList the places that hold a secret of a non-human identity: the paths in secrets managers, the resources of consumers such as Kubernetes clusters or CI… - GETGet the validity of an identity
/v1/nhi/identities/:identity_id/validityRetrieve the validity of the secret an identity holds, and its validity override. validity_override is null when no override is set. The workspace must have… - POSTOverride the validity of an identity
/v1/nhi/identities/:identity_id/validitySet the validity of the secret an identity holds with your own check result. The override applies to every copy of the secret. It stays until you remove it:… - DELETERemove the validity override of an identity
/v1/nhi/identities/:identity_id/validityRemove the validity override of an identity. The identity gets the last validity that ggscout sent for its secret again. Its check date stays the one of the…
NHI Policies
- GETList NHI policies
/v1/nhi/policiesList the NHI policies and the incident mode the workspace chose for each one. The incident mode sets what the breaches of a policy produce: hidden: the… - GETRetrieve an NHI policy
/v1/nhi/policies/:policy_nameRetrieve one NHI policy and its incident mode. The workspace must have full NHI governance activation. The API token must have the Manager access level or… - PUTSet the incident mode of an NHI policy
/v1/nhi/policies/:policy_nameSet the incident mode of an NHI policy for the workspace. Incidents are created only once NHI incident promotion is active for the workspace. Before that, the…
NHI Sources
- GETList sources
/v1/nhi/sourcesList the sources that send non-human identities to GitGuardian: secrets managers, consumers such as Kubernetes clusters or CI systems, and cloud providers.…
NHI Identity Owners
- GETList owners of an identity
/v1/nhi/identities/:identity_id/ownersList the active owners of a non-human identity: the owners suggested by GitGuardian and the owners added manually. Removed owners are not listed. The API… - POSTAdd owners to an identity
/v1/nhi/identities/:identity_id/ownersAdd owners to a non-human identity, identified by their email address. Owners that already exist on the identity are kept. An identity can have at most 5… - PUTReplace the owners of an identity
/v1/nhi/identities/:identity_id/owners/updateReplace the owners of a non-human identity with the given list. Owners not in the list are removed, and missing owners are added. An empty list removes all… - DELETERemove an owner from an identity
/v1/nhi/identities/:identity_id/owners/:owner_idRemove an owner from a non-human identity. The removed owner is no longer listed, and GitGuardian does not suggest it again for this identity. The API token…
Developer
- GETList developers
/v1/public-perimeter/developersList developers in the public perimeter.
OAuth2
- POSTExchange an authorization code for an access token.
/v1/oauth/tokenToken endpoint as defined by RFC 6749 §4.1.3. Exchange an authorization code (obtained from the authorization endpoint) for a GitGuardian Personal Access… - POSTDynamically register an OAuth 2.0 client.
/v1/oauth/registerDynamic Client Registration endpoint as defined by RFC 7591. Allows OAuth clients (notably MCP clients) to register themselves without out-of-band… - GETList public keys used to sign JWTs.
/v1/auth/jwksJSON Web Key Set (RFC 7517) endpoint. Returns the public keys that should be used to validate the signature of JWTs issued by this GitGuardian instance,… - GETOpenID Connect discovery document.
/.well-known/openid-configurationOpenID Connect discovery document (OpenID Connect Discovery 1.0). Returns the URLs and capabilities clients need to validate OpenID Connect id_tokens issued… - GETOAuth 2.0 Authorization Server Metadata.
/.well-known/oauth-authorization-serverOAuth 2.0 Authorization Server Metadata as defined by RFC 8414. Used by OAuth 2.0 clients (notably MCP clients performing the Authorization Code + PKCE flow)…
Internal Secret Incidents
- GETList secret incidents
/v1/incidents/secretsList secret incidents detected by the GitGuardian dashboard. Occurrences are not returned in this route. - GETRetrieve a secret incident
/v1/incidents/secrets/:incident_idRetrieve secret incident detected by the GitGuardian dashboard with its occurrences. - PATCHUpdate a secret incident
/v1/incidents/secrets/:incident_idUpdate a secret incident. - GETRetrieve where a secret has been publicly leaked
/v1/incidents/secrets/:incident_id/leaksRetrieve where a secret has been publicly leaked. Limitations: Does not work for multimatch secrets. Does not return publicly visible internal sources. - POSTAssign a secret incident
/v1/incidents/secrets/:incident_id/assignAssign secret incident detected by the GitGuardian dashboard to a workspace member by email. - POSTUnassign a secret incident
/v1/incidents/secrets/:incident_id/unassignUnassign secret incident from a workspace member by email. - GETList the collaborators of a secret incident
/v1/incidents/secrets/:incident_id/collaboratorsList the workspace members who collaborate on a secret incident. If incident collaborators are not enabled for the workspace, a 404 is returned. - PATCHUpdate the collaborators of a secret incident
/v1/incidents/secrets/:incident_id/collaboratorsAdd and remove workspace members in the collaborators of a secret incident, in one request. The request changes only what differs from the current… - POSTResolve a secret incident
/v1/incidents/secrets/:incident_id/resolveResolve a secret incident detected by the GitGuardian dashboard. - POSTIgnore a secret incident
/v1/incidents/secrets/:incident_id/ignoreIgnore a secret incident detected by the GitGuardian dashboard. - POSTReopen a secret incident
/v1/incidents/secrets/:incident_id/reopenUnresolve or unignore a secret incident detected by the GitGuardian dashboard. - POSTShare a secret incident
/v1/incidents/secrets/:incident_id/shareShare a secret incident by creating a public link. - POSTUnshare a secret incident
/v1/incidents/secrets/:incident_id/unshareUnshare a secret incident by revoking its public link. - POSTGrant access to a secret incident
/v1/incidents/secrets/:incident_id/grant_accessDeprecated. Grant a user, an existing invitee or a team access to a secret incident. DEPRECATED: This endpoint has been replaced by this one for members, this… - POSTRevoke access to a secret incident
/v1/incidents/secrets/:incident_id/revoke_accessDeprecated. Revoke access of a user, an existing invitee or a team to a secret incident. DEPRECATED: This endpoint has been replaced by this one for members,… - GETList members having access to a secret incident
/v1/incidents/secrets/:incident_id/membersDeprecated. List all the members having access to a secret incident. DEPRECATED: This endpoint has been replaced by /v1/secret-incidents/{incident_id}/members - GETList teams having access to a secret incident
/v1/incidents/secrets/:incident_id/teamsDeprecated. List all the teams having access to a secret incident. DEPRECATED: This endpoint has been replaced by /v1/secret-incidents/{incident_id}/teams - GETList invitations having access to a Secret Incident
/v1/incidents/secrets/:incident_id/invitationsDeprecated. List all the invitations having access to a Secret Incident. DEPRECATED: This endpoint has been replaced by… - GETRetrieve the impacted perimeter of a secret incident
/v1/incidents/secrets/:incident_id/impacted_perimeterRetrieve metrics about the impacted perimeter of a secret incident detected by the GitGuardian dashboard. - GETGet vault information for a secret incident
/v1/incidents/secrets/:incident_id/vaultsReturns detailed vault path information if the secret is stored in a vault. This endpoint requires the NHI (Non-Human Identity) feature to be enabled and the… - POSTRequest a new presence check for a secret incident
/v1/incidents/secrets/:incident_id/check-presenceRequest a new presence check for a secret incident, to find out whether its occurrences are still present on their sources. The check runs asynchronously: a… - DELETEUnlink a ticket from a secret incident, public incident or honeytoken
/v1/incidents/secrets/:resource_id/destination-tickets/:ticket_id?resource_type=secret-incidentsRemove the link between a resource and a ticket previously created on an external platform (Jira, ServiceNow). The ticket itself is left untouched on the… - GETList members with access to a secret incident
/v1/secret-incidents/:incident_id/membersList members that have access to a secret incident. - GETList teams with access to a secret incident
/v1/secret-incidents/:incident_id/teamsList teams that have access to a secret incident. - GETList invitations with access to a secret incident
/v1/secret-incidents/:incident_id/invitationsList invitations that have access to a secret incident. - GETRetrieve the remediation workflow
/v1/remediation-workflowRetrieve the remediation workflow displayed for secret incidents. Returns the custom remediation workflow configured for the account when one exists and is… - GETList secret incidents of a source
/v1/sources/:source_id/incidents/secretsList secret incidents linked to a source. Occurrences are not returned in this route. - GETList secret incidents of a team
/v1/teams/:team_id/incidents/secretsDeprecated. List secret incidents of a particular team. Occurrences are not returned in this route. DEPRECATED: THis endpoint has been replaced by…
Internal Secret Incident Notes
- GETList notes on a secret incident
/v1/incidents/secrets/:incident_id/notesList notes left on a secret incident in chronological order. - POSTCreate a secret incident note
/v1/incidents/secrets/:incident_id/notesAdd a note on a secret incident. - DELETEDelete a secret incident note
/v1/incidents/secrets/:incident_id/notes/:note_idDelete an existing comment on a secret incident. Only incident notes created by the current API key can be deleted. - PATCHUpdate a secret incident note
/v1/incidents/secrets/:incident_id/notes/:note_idUpdate an existing comment on a secret incident. Only incident notes created by the current API key can be updated.
Internal Secret Incident Activity Logs
- GETList activity logs of a secret incident
/v1/incidents/secrets/:incident_id/activity-logsList every activity log entry of a secret incident in chronological order. Entries include both user-written notes and system-generated actions. To list only…
Internal Secret Occurrences
- GETList secret occurrences
/v1/occurrences/secretsList occurrences of secrets in the monitored perimeter. - GETGet the content of an occurrence
/v1/occurrences/secrets/:occurrence_id/contentRetrieve the content GitGuardian stored for an occurrence, together with the position of each secret match inside it. The content stays available after the…
Public Secret Incidents
- GETList public secret incidents
/v1/public-incidents/secretsList public secret incidents detected by the GitGuardian dashboard. - GETRetrieve a public secret incident
/v1/public-incidents/secrets/:incident_idRetrieve public secret incident detected by the GitGuardian dashboard - POSTResolve a public secret incident
/v1/public-incidents/secrets/:incident_id/resolveResolve a public secret incident detected by the GitGuardian dashboard. - POSTIgnore a public secret incident
/v1/public-incidents/secrets/:incident_id/ignoreIgnore a public secret incident detected by the GitGuardian dashboard. - POSTReopen a public secret incident
/v1/public-incidents/secrets/:incident_id/reopenReopen a public secret incident that was previously resolved or ignored. - POSTAssign a public secret incident
/v1/public-incidents/secrets/:incident_id/assignAssign a public secret incident to a workspace member by email or member ID. - POSTUnassign a public secret incident
/v1/public-incidents/secrets/:incident_id/unassignUnassign a public secret incident from its current assignee. - GETList the collaborators of a public secret incident
/v1/public-incidents/secrets/:incident_id/collaboratorsList the workspace members who collaborate on a public secret incident. If incident collaborators are not enabled for the workspace, a 404 is returned. - PATCHUpdate the collaborators of a public secret incident
/v1/public-incidents/secrets/:incident_id/collaboratorsAdd and remove workspace members in the collaborators of a public secret incident, in one request. The request changes only what differs from the current… - POSTShare a public secret incident
/v1/public-incidents/secrets/:incident_id/shareCreate a public link to share a public secret incident with an external developer. - POSTUnshare a public secret incident
/v1/public-incidents/secrets/:incident_id/unshareDelete a public secret incident's share link. - POSTSet severity of a public secret incident
/v1/public-incidents/secrets/:incident_id/set_severitySet the severity of a public secret incident. - POSTSet custom tags of a public secret incident
/v1/public-incidents/secrets/:incident_id/set_custom_tagsSet the custom tags of a public secret incident. - GETGet vault information for a public secret incident
/v1/public-incidents/secrets/:incident_id/vaultsReturns detailed vault path information if the secret is stored in a vault. This endpoint requires the NHI (Non-Human Identity) feature to be enabled and the… - POSTRequest a new presence check for a public secret incident
/v1/public-incidents/secrets/:incident_id/check-presenceRequest a new presence check for a public secret incident, to find out whether its occurrences are still present on their sources. The check runs…
Public Secret Occurrences
- GETList public secret occurrences
/v1/public-incidents/secrets/:incident_id/occurrencesList occurrences of a public secret incident detected by the GitGuardian dashboard - GETRetrieve a public secret occurrence
/v1/public-incidents/secrets/:incident_id/occurrences/:occurrence_idRetrieve a specific occurrence of a public secret incident detected by the GitGuardian dashboard - GETGet the content of a public occurrence
/v1/public-incidents/secrets/:incident_id/occurrences/:occurrence_id/contentRetrieve the content GitGuardian stored for an occurrence of a public incident, together with the position of each secret match inside it. The content stays…
Public Secret Incident Notes
- GETList notes on a public secret incident
/v1/public-incidents/secrets/:incident_id/notesList notes left on a public secret incident in chronological order. - POSTCreate a public secret incident note
/v1/public-incidents/secrets/:incident_id/notesAdd a note on a public secret incident. - DELETEDelete a public secret incident note
/v1/public-incidents/secrets/:incident_id/notes/:note_idDelete an existing comment on a public secret incident. Only incident notes created by the current API key can be deleted. - PATCHUpdate a public secret incident note
/v1/public-incidents/secrets/:incident_id/notes/:note_idUpdate an existing comment on a public secret incident. Only incident notes created by the current API key can be updated.
Public Secret Incident Activity Logs
- GETList activity logs of a public secret incident
/v1/public-incidents/secrets/:incident_id/activity-logsList every activity log entry of a public secret incident in chronological order. Entries include both user-written notes and system-generated actions. To…
Audit Logs
- GETList audit Logs
/v1/audit_logsList audit logs. - GETList audit log event names
/v1/audit_logs/event_namesList all the existing event names for audit logs. Use this endpoint to discover which event types are available for filtering when querying audit logs.
Team Requests
- GETList team requests of a team
/v1/teams/:team_id/team_requestsList pending requests of a team. If you are using a personal access token, you must have "can manage" permission on the team or be a workspace manager. - POSTRequest access to a team
/v1/teams/:team_id/team_requestsCreate an access request to a team. You must be authenticated via a Personal Access Token. You must not already have a pending request on the team, be a… - DELETECancel or decline a team request
/v1/teams/:team_id/team_requests/:team_request_idCancel or decline a team request. If you are using a personal access token, you must have "can manage" permission on the team or be a workspace manager, or be… - POSTAccept a team request
/v1/teams/:team_id/team_requests/:team_request_id/acceptAccept a team request by adding the member to the team. If you are using a personal access token, you must have "can manage" permission on the team or be a… - GETList team requests of a member
/v1/members/:member_id/team_requestsList pending team requests of a member. If you are using a personal access token, you need to be either a workspace manager or the member being queried.
Team Sources
- GETList team sources
/v1/teams/:team_id/sourcesList sources belonging to a team's perimeter. - POSTUpdate a team perimeter
/v1/teams/:team_id/sourcesThis endpoint allows you to add and remove sources from the perimeter of a team. If you are using a personal access token, you need to be a workspace manager.
Honeytoken Activity Logs
- GETList activity logs of a honeytoken
/v1/honeytokens/:honeytoken_id/activity-logsList every activity log entry of a honeytoken in chronological order. Entries include both user-written notes and system-generated actions. To list only user…
API details
- Base URL
https://api.gitguardian.comhttps://api.eu1.gitguardian.com- Authentication
- A bearer token in the Authorization header
- Operations
- 218 operations on 156 pathsGET 107POST 59DELETE 24PATCH 20PUT 8
6 marked deprecated - Main resources
- Internal Secret Incidents 28Public Secret Incidents 15Sources 13Members 12Honeytokens 11Teams 10Invitations 9Custom Tags 8API Tokens 7NHI Identities 7
- Response formats
application/jsonapplication/scim+json- Description format
- OpenAPI 3.0.3, API version
1.1.0 - Links
- OpenAPI document · Terms of service · Support
- Listed from
- Gitguardian's published OpenAPI description
How to test the GitGuardian API in Swastik Codes
- Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
- Fork it into your workspaceChoose a workspace. You get your own copy of the GitGuardian API collection, without the publisher's secrets.
- Add your credentialsThis API uses A bearer token in the Authorization header. Add yours in the collection's variables or an environment; the requests already reference it.
- Send a requestPick an endpoint, for example “Retrieve details of the current API token.” (GET /v1/api_tokens/self), and press Send. Check the response, add tests and run the whole collection with the runner.
Frequently asked questions
What is the GitGuardian API?
Introduction Whether you want to build a complete integration with your software development workflow or simply want to test GitGuardian's policy break… It is listed under Identity & security and has 218 endpoints.
Who publishes the GitGuardian API?
It is listed from Gitguardian's public API description (an OpenAPI document), not published by Gitguardian on Swastik Codes. Anyone who controls gitguardian.com can claim the profile by adding a DNS TXT record.
What is the base URL of the GitGuardian API?
Its description lists 2 base URLs: https://api.gitguardian.com, https://api.eu1.gitguardian.com. The first is the usual one; the others are typically sandbox or regional servers.
How do I authenticate with the GitGuardian API?
With A bearer token in the Authorization header.
How many endpoints does the GitGuardian API have?
218 operations on 156 paths (107 GET, 59 POST, 24 DELETE, 20 PATCH, 8 PUT). The largest groups are Internal Secret Incidents, Public Secret Incidents, Sources, Members.
Is forking the GitGuardian API free?
Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.