Skip to content

Commit ed002a7

Browse files
Add reviewed example of duplicate API command
1 parent dc4bdd9 commit ed002a7

File tree

1 file changed

+11
-2
lines changed
  • src/content/docs/secrets-store/manage-secrets

1 file changed

+11
-2
lines changed

src/content/docs/secrets-store/manage-secrets/how-to.mdx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,16 @@ Duplicate a secret to keep the same secret value but change name, scope, or comm
6464

6565
</TabItem> <TabItem label="API">
6666

67-
[Add API instructions here]
67+
```bash
68+
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/secrets_store/stores/$STORE_ID/secrets/$SECRET_ID/duplicate \
69+
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
70+
--header "Content-Type: application/json" \
71+
--data '{
72+
"name":"<NEW_DUPLICATE_NAME>",
73+
"scopes":["workers"],
74+
"comment":""
75+
}'
76+
```
6877

6978
</TabItem> </Tabs>
7079

@@ -97,7 +106,7 @@ https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/secrets_store/stores/$
97106
"comment":"<NEW_COMMENT>",
98107
"value":"<NEW_SECRET_VALUE>",
99108
"scopes":["workers"]
100-
}'
109+
}'
101110
```
102111

103112
</TabItem> </Tabs>

0 commit comments

Comments
 (0)