Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

idempotency_keys #43

Merged
merged 2 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions public/site.webmanifest
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"name": "Cirro Guides",
"short_name": "Cirro Guides",
"icons": [
{
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-256x256.png",
"sizes": "256x256",
"type": "image/png"
}
],
"theme_color": "#3f51b5",
"background_color": "#3f51b5",
"display": "standalone"
"name": "Cirro Guides",
"short_name": "Cirro Guides",
"icons": [
{
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-256x256.png",
"sizes": "256x256",
"type": "image/png"
}
],
"theme_color": "#3f51b5",
"background_color": "#3f51b5",
"display": "standalone"
}
1 change: 1 addition & 0 deletions src/data/navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const navigation = [
{ title: "Terminology", href: "/docs/terminology" },
{ title: "Example Space", href: "/docs/example_space" },
{ title: "Webhooks", href: "/docs/webhooks" },
{ title: "Idempotency Keys", href: "/docs/idempotency_keys" },
],
},
{
Expand Down
14 changes: 14 additions & 0 deletions src/pages/docs/idempotency_keys.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: Idempotency Keys
description: Understand the use of idempotency keys in Cirro's API design.
---

## What are Idempotency Keys?

An idempotency key is a unique value generated by the client, which is sent in the HTTP request. The server uses this key to recognize subsequent retries of the same request. The key has to be unique across the app/space. The key has to be deterministic, meaning that the same key should be generated for the same request every time.

## How are Idempotency Keys used in Cirro?

In Cirro, idempotency keys are used to ensure that a request is only processed once, even if it is sent multiple times. This is particularly important in operations that involve payouts or other financial transactions, where duplicate processing could have serious consequences.

Idempotency keys are optional to pass in requests. However, they are highly recommended for operations that involve Payouts and GigResults in Cirro. If a request is sent with an idempotency key, Cirro first checks if a Payout or a GigResult with that key already exists. If it does, the existing resource is returned and no new resource is created. If it doesn't, a new resource is created and the idempotency key is stored for future reference.
Loading