Authorization
Every request you make to the API must include a Bearer token for authorization. You can pass this token in the headers of your HTTP request with the keyAuthorization
and the value Bearer YOUR_TOKEN
.
YOUR_TOKEN
with your admin or access token.
Endpoints
Retrieve Policy Rules
- For a specific project:
- For an entire organisation:
:namespace
and :projectName
or :organisation
should be replaced with actual values that represent your project or organization.
Update Policy Rules
- For a specific project:
- For an entire organisation:
Issue Access Tokens
- For issuing an access token:
Usage of Access Tokens
Access Tokens are issued to provide access to the Digger API for non-admin users. These tokens should be treated as sensitive information and should not be shared publicly. Once you have an access token, you can use it in your GitHub Actiondigger/digger
. You need to set two parameters: digger-token
and digger-host
.
-
digger-token
: This is where you should pass your access token. -
digger-host
: This should be set tohttps://cloud.uselemon.cloud
.
secrets.DIGGER_TOKEN
is a GitHub secret where your Digger access token is stored.
Remember to replace the version (<version>
in the example) with the actual version of the Digger action you’re using.
And that’s it! You should now be able to update, retrieve policies and issue tokens using the Digger API, as well as use your issued access tokens in your GitHub Actions.