Skip to content

Commit

Permalink
Update Idempotency-Key usage in documentation (#192)
Browse files Browse the repository at this point in the history
* [FND-3122] Remove idempotency key for refresh token endpoint

* [FND-3130] Add idempotency key to all update endpoints
  • Loading branch information
Eric Cornelissen authored Aug 15, 2023
1 parent fe5082c commit cdacdc3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions versions/v2/content/assets.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ curl -X PUT 'https://api.cobalt.io/assets/AN-ASSET-IDENTIFIER' \
-H 'Accept: application/vnd.cobalt.v2+json' \
-H 'Authorization: Bearer YOUR-PERSONAL-API-TOKEN' \
-H 'Content-Type: application/vnd.cobalt.v2+json' \
-H 'Idempotency-Key: A-UNIQUE-IDENTIFIER-TO-PREVENT-UNINTENTIONAL-DUPLICATION' \
-H 'X-Org-Token: YOUR-V2-ORGANIZATION-TOKEN' \
--data '{
"title": "Updated title",
Expand Down
3 changes: 1 addition & 2 deletions versions/v2/content/tokens.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ This endpoint retrieves a list of all tokens that belong to you.
```sh
curl -X POST "https://api.cobalt.io/tokens/YOUR-TOKEN-ID/refresh" \
-H "Accept: application/vnd.cobalt.v2+json" \
-H "Authorization: Bearer YOUR-PERSONAL-API-TOKEN" \
-H "Idempotency-Key: A-UNIQUE-IDENTIFIER-TO-PREVENT-UNINTENTIONAL-DUPLICATION"
-H "Authorization: Bearer YOUR-PERSONAL-API-TOKEN"
```

> The above command returns JSON structured like this:
Expand Down
1 change: 1 addition & 0 deletions versions/v2/content/update-finding-state.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ This endpoint retrieves the current state of a finding as well as possible next
curl -X PATCH "https://api.cobalt.io/findings/YOUR-FINDING-ID" \
-H "Accept: application/vnd.cobalt.v2+json" \
-H 'Content-Type: application/vnd.cobalt.v2+json' \
-H "Idempotency-Key: A-UNIQUE-IDENTIFIER-TO-PREVENT-UNINTENTIONAL-DUPLICATION" \
-H "Authorization: Bearer YOUR-PERSONAL-API-TOKEN" \
-H "X-Org-Token: YOUR-V2-ORGANIZATION-TOKEN" \
-d '{"state":"triaging"}'
Expand Down
1 change: 1 addition & 0 deletions versions/v2/content/webhooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ curl -X PATCH 'https://api.cobalt.io/webhooks/YOUR-WEBHOOK-IDENTIFIER' \
-H 'Accept: application/vnd.cobalt.v2+json' \
-H 'Authorization: Bearer YOUR-PERSONAL-API-TOKEN' \
-H 'Content-Type: application/vnd.cobalt.v2+json' \
-H 'Idempotency-Key: A-UNIQUE-IDENTIFIER-TO-PREVENT-UNINTENTIONAL-DUPLICATION' \
-H 'X-Org-Token: YOUR-V2-ORGANIZATION-TOKEN' \
--data '{
"name": "FooBar",
Expand Down

0 comments on commit cdacdc3

Please sign in to comment.