Retrieves a list of inactive AES encryption key(s). An AES key becomes inactive after it has been rotated.
This request has no parameters.
Returned if the keys were retrieved successfully
1
2
curl --request GET \
--url 'http://{baseurl}/rest/secrets/1.0/keys/inactive'
Delete the inactive AES encryption key(s). Post rotation, inactive AES key(s) can be cleaned up.
This request has no parameters.
Returned if the keys were deleted successfully
1
2
curl --request DELETE \
--url 'http://{baseurl}/rest/secrets/1.0/keys/inactive'
Rotate the current AES encryption key. Existing secrets will be re-encrypted with the new key.
This request has no parameters.
Returned if the key was rotated successfully
1
2
curl --request POST \
--url 'http://{baseurl}/rest/secrets/1.0/keys/rotate'
Find all the keys for the currently authenticated user. Optionally, users with ADMIN and higher permissions may choose to specify the user
parameter to retrieve GPG keys for another user.
Only authenticated users may call this endpoint.
string
number
number
Returns a paged response of of keys for the user.
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/gpg/latest/keys' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
"isLastPage": true,
"limit": 25,
"nextPageStart": 2154,
"size": 1,
"start": 2154,
"values": [
{
"emailAddress": "bitbucket@example.com",
"expiryDate": 61550496000000,
"fingerprint": "43:51:43:a1:b5:fc:8b:b7:0a:3a:a9:b1:0f:66:73:a8",
"id": "00000000000004d2",
"subKeys": []
}
]
}
Add a GPG key to the authenticated user's account. Optionally, users with ADMIN and higher permissions may choose to specify the user
parameter to add a GPG key for another user.
Only authenticated users may call this endpoint.
string
The request body.
string
Response contains the GPG key that was just created.
1
2
3
4
5
6
7
curl --request POST \
--url 'http://{baseurl}/rest/gpg/latest/keys' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"text": "-----BEGIN PGP SIGNATURE-----\n\niQEzBAABCAAdFiEEM8MrWnoxlp3K1lFY5BMGiWNefn4FAlkqKE4ACgkQ5BMGiWNe\nfn6/kggAyzKhDDqdVb3Rq02hiSqeqKa1JuKRqDmzIpa6Pxa+1CpCnxwaIVrGgIii\nvj0ZNJzL1Bm2xm0JasotJDiZq5pFKi0FfQ0WmskuhsW1VY/f08TltHpHvK2kHVRr\nGEMVDUb0nj0I7Duc8XTipiYoDGS1GvydNR/bu3SsFTcZyapXirQcTCRT6/Sn0/IP\npUeIwQo1qK4e8gTOhWhfWEiVig39lQhiZFtm5S/vfAY72/Rgp68zMYmwasMSnBgF\n/LLFW6lXAqZIoAP8AnmsMRjCH6mS98+/lxKq2+K71+2YUUIAnNEeO09Lufo3B3Da\nPbs7BpD28w4lKlzb2EQ0n0C9rrxdPA==\n=VZpm\n-----END PGP SIGNATURE-----\n"
}'
1
2
3
4
5
6
7
{
"emailAddress": "bitbucket@example.com",
"expiryDate": 61550496000000,
"fingerprint": "43:51:43:a1:b5:fc:8b:b7:0a:3a:a9:b1:0f:66:73:a8",
"id": "00000000000004d2",
"subKeys": []
}
Delete all GPG keys for a supplied user.
string
The GPG keys matching the supplied user were deleted.
1
2
curl --request DELETE \
--url 'http://{baseurl}/rest/gpg/latest/keys'
Delete the GPG key with the specified ID or Key Fingerprint.
string
RequiredThe key has been deleted successfully.
1
2
curl --request DELETE \
--url 'http://{baseurl}/rest/gpg/latest/keys/{fingerprintOrId}'
Find repository secret scanning allowlist rules by filtering.
Repository Admin is required
string
Requiredstring
Requiredstring
string
number
number
Page of allowlist rules
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/secret-scanning/allowlist' \
--header 'Accept: application/json;charset=UTF-8'
Create a new repository secret scanning allowlist rule. Repository allowlist rules are used when scanning the given repository.
Repository Admin is required
string
Requiredstring
RequiredAllowlist rule to create, either the line regular expression or the path regular expression must be present
string
string
string
The created rule
1
2
3
curl --request POST \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/secret-scanning/allowlist' \
--header 'Accept: application/json;charset=UTF-8'
Get a repository secret scanning allowlist rule by ID.
Repository Admin is required
string
Requiredstring
Requiredstring
RequiredThe requested allowlist rule
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/secret-scanning/allowlist/{id}' \
--header 'Accept: application/json;charset=UTF-8'
Edit a repository secret scanning allowlist rule.
Repository Admin is required
string
Requiredstring
Requiredstring
Requiredstring
string
string
The updated allowlist rule
1
2
3
curl --request PUT \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/secret-scanning/allowlist/{id}' \
--header 'Accept: application/json;charset=UTF-8'
Delete a repository secret scanning allowlist rule with the provided ID.
Repository Admin is required
string
Requiredstring
Requiredstring
RequiredEmpty response indicating that the allowlist rule was deleted
1
2
curl --request DELETE \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/secret-scanning/allowlist/{id}'
Check whether a repository is exempt from secret scanning
This request has no parameters.
True if the repository is exempt from secret scanning, false otherwise
any
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/secret-scanning/exempt' \
--header 'Accept: application/json;charset=UTF-8'
Exempt a repository from being scanned for secrets
Deprecated since 8.6. Exemptions are now managed by scope. Use POST /rest/api/1.0/secret-scanning/exempt for global scope Use POST /rest/api/1.0/projects/{projectKey}/secret-scanning/exempt for the project scope
This request has no parameters.
An exempt repo was added
1
2
curl --request PUT \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/secret-scanning/exempt'
Remove a repository from being exempt from secret scanning
This request has no parameters.
Empty response indicating that the exempt repository was deleted
1
2
curl --request DELETE \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/secret-scanning/exempt'
Find repository secret scanning rules by filtering.
Repository Admin is required
string
Requiredstring
Requiredstring
string
number
number
Page of rules
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/secret-scanning/rules' \
--header 'Accept: application/json;charset=UTF-8'
Create a new repository secret scanning rule. Repository rules are used when scanning the given repository.
Repository Admin is required
string
Requiredstring
RequiredRule to create, either the line regular expression or the path regular expression must be present
string
string
string
The created rule
1
2
3
curl --request POST \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/secret-scanning/rules' \
--header 'Accept: application/json;charset=UTF-8'
Get a repository secret scanning rule by ID.
Repository Admin is required
string
Requiredstring
Requiredstring
RequiredThe requested rule
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/secret-scanning/rules/{id}' \
--header 'Accept: application/json;charset=UTF-8'
Edit a repository secret scanning rule.
Repository Admin is required
string
Requiredstring
Requiredstring
Requiredstring
string
string
The updated rule
1
2
3
curl --request PUT \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/secret-scanning/rules/{id}' \
--header 'Accept: application/json;charset=UTF-8'
Delete a repository secret scanning rule with the provided ID.
Repository Admin is required
string
Requiredstring
Requiredstring
RequiredEmpty response indicating that the rule was deleted
1
2
curl --request DELETE \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/secret-scanning/rules/{id}'
Find project secret scanning allowlist rules by filtering.
Project Admin is required
string
Requiredstring
string
number
number
Page of allowlist rules
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/secret-scanning/allowlist' \
--header 'Accept: application/json;charset=UTF-8'
Create a new project level secret scanning allowlist rule. Project allowlist rules are used when scanning all non exempt repositories in the provided project.
Project Admin is required
string
RequiredAllowlist rule to create, either the line regular expression or the path regular expression must be present
string
string
string
The created allowlist rule
1
2
3
curl --request POST \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/secret-scanning/allowlist' \
--header 'Accept: application/json;charset=UTF-8'
Get a project secret scanning allowlist rule by ID.
Project Admin is required
string
Requiredstring
RequiredThe requested allowlist rule
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/secret-scanning/allowlist/{id}' \
--header 'Accept: application/json;charset=UTF-8'
Edit a project secret scanning allowlist rule.
Project Admin is required
string
Requiredstring
Requiredstring
string
string
The updated allowlist rule
1
2
3
curl --request PUT \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/secret-scanning/allowlist/{id}' \
--header 'Accept: application/json;charset=UTF-8'
Delete a project secret scanning allowlist rule with the provided ID.
Project Admin is required
string
Requiredstring
RequiredEmpty response indicating that the rule was deleted, or not found at this location
1
2
curl --request DELETE \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/secret-scanning/allowlist/{id}'
Find repositories exempt from secret scanning in a project
string
number
number
Page of repositories
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/secret-scanning/exempt' \
--header 'Accept: application/json;charset=UTF-8'
Bulk exempt a list of repositories from being scanned for secrets. User must be have PROJECT ADMIN permissions.
array<RestRepositorySelector>
true
string
string
All requested repositories were made exempt
1
2
curl --request POST \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/secret-scanning/exempt'
Find project secret scanning rules by filtering.
Project Admin is required
string
Requiredstring
string
number
number
Page of rules
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/secret-scanning/rules' \
--header 'Accept: application/json;charset=UTF-8'
Create a new project level secret scanning rule. Project rules are used when scanning all non exempt repositories in the provided project.
Project Admin is required
string
RequiredRule to create, either the line regular expression or the path regular expression must be present
string
string
string
The created rule
1
2
3
curl --request POST \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/secret-scanning/rules' \
--header 'Accept: application/json;charset=UTF-8'
Get a project secret scanning rule by ID.
Project Admin is required
string
Requiredstring
RequiredThe requested rule
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/secret-scanning/rules/{id}' \
--header 'Accept: application/json;charset=UTF-8'
Edit a project secret scanning rule.
Project Admin is required
string
Requiredstring
Requiredstring
string
string
The updated rule
1
2
3
curl --request PUT \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/secret-scanning/rules/{id}' \
--header 'Accept: application/json;charset=UTF-8'
Delete a project secret scanning rule with the provided ID.
Project Admin is required
string
Requiredstring
RequiredEmpty response indicating that the rule was deleted, or not found at this location
1
2
curl --request DELETE \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/secret-scanning/rules/{id}'
Find all repositories exempt from secret scanning
string
number
number
Page of repositories
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/api/latest/secret-scanning/exempt' \
--header 'Accept: application/json;charset=UTF-8'
Bulk exempt a list of repositories from being scanned for secrets. User must be have global ADMIN permissions.
array<RestRepositorySelector>
true
string
string
All requested repositories were made exempt
1
2
curl --request POST \
--url 'http://{baseurl}/rest/api/latest/secret-scanning/exempt'
Find global secret scanning rules by filtering.
string
string
number
number
Page of rules
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/api/latest/secret-scanning/rules' \
--header 'Accept: application/json;charset=UTF-8'
Create a new global secret scanning rule. Global rules are used when scanning all non exempt repositories.
Rule to create, either the line regular expression or the path regular expression must be present
string
string
string
The created rule
1
2
3
curl --request POST \
--url 'http://{baseurl}/rest/api/latest/secret-scanning/rules' \
--header 'Accept: application/json;charset=UTF-8'
Get a global secret scanning rule by ID.
string
RequiredThe requested rule
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/api/latest/secret-scanning/rules/{id}' \
--header 'Accept: application/json;charset=UTF-8'
Edit an existing global secret scanning rule
string
Requiredstring
string
string
The updated rule
1
2
3
curl --request PUT \
--url 'http://{baseurl}/rest/api/latest/secret-scanning/rules/{id}' \
--header 'Accept: application/json;charset=UTF-8'
Delete a global secret scanning rule with the provided ID
string
RequiredEmpty response indicating that the rule was deleted
1
2
curl --request DELETE \
--url 'http://{baseurl}/rest/api/latest/secret-scanning/rules/{id}'
Get all X.509 certificates that have been added to the system.
The authenticated user must have the ADMIN permission to call this resource.
This request has no parameters.
A page of X.509 certificates
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/api/latest/signing/x509-certificates' \
--header 'Accept: application/json;charset=UTF-8'
Create an X.509 certificate. This will add the given X.509 certificate to the system. Existing entries will not be overridden if an X.509 certificate already exists. Once added, an X.509 certificate cannot be updated.
The authenticated user must have the ADMIN permission to call this resource.
The multipart form data containing the certificate in a form-field named 'certificate'
string
The newly created X.509 certificate
1
2
3
curl --request POST \
--url 'http://{baseurl}/rest/api/latest/signing/x509-certificates' \
--header 'Accept: application/json;charset=UTF-8'
Update the certificate revocation list (CRL) entries for an issuer X.509 certificate in the system, identified by id
. This will add any new revoked X.509 certificates that were issued by the given issuer X.509 certificate.
This endpoint will schedule a request to asynchronously perform the task. Please allow time for the task to complete as it will vary depending on how many CRLs there are to retrieve and process.
Note: CRL updates are scheduled to run every 24 hours. You may wish to trigger a refresh manually using this endpoint, otherwise, entries will be updated daily.
The authenticated user must have the ADMIN permission to call this resource.
string
RequiredSuccessfully started processing CRLs.
any
1
2
3
curl --request PUT \
--url 'http://{baseurl}/rest/api/latest/signing/x509-certificates/crl/{id}' \
--header 'Accept: application/json;charset=UTF-8'
Delete an X.509 certificate specified by the given ID.
The authenticated user must have the ADMIN permission to call this resource.
string
RequiredAn empty response if the X.509 certificate was successfully deleted
1
2
3
curl --request DELETE \
--url 'http://{baseurl}/rest/api/latest/signing/x509-certificates/{id}' \
--header 'Accept: application/json;charset=UTF-8'
Gets the configuration details for system signing Git objects.
This request has no parameters.
The configuration details for system signing Git objects
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/api/latest/system-signing/configuration' \
--header 'Accept: application/json;charset=UTF-8'
Updates the configuration for system signing Git objects.
boolean
The updated configuration details for system signing Git objects
1
2
3
4
5
6
7
curl --request POST \
--url 'http://{baseurl}/rest/api/latest/system-signing/configuration' \
--header 'Accept: application/json;charset=UTF-8' \
--header 'Content-Type: application/json' \
--data '{
"enabled": false
}'
Rate this page: