Replace an API key
curl --request PUT \
--url https://go-fetch.io/api/v1/api-keys/{id}/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"environment": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"scopes": []
}
'import requests
url = "https://go-fetch.io/api/v1/api-keys/{id}/"
payload = {
"environment": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"scopes": []
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
environment: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: '<string>',
scopes: []
})
};
fetch('https://go-fetch.io/api/v1/api-keys/{id}/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization_name": "<string>",
"environment": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"environment_name": "<string>",
"environment_slug": "<string>",
"name": "<string>",
"prefix": "<string>",
"scopes": [
"read"
],
"last_used_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"rate_limit": 50000,
"is_active": true,
"expires_at": "2023-11-07T05:31:56Z"
}API keys
Replace an API key
Needs a key with the admin scope.
PUT
/
api
/
v1
/
api-keys
/
{id}
/
Replace an API key
curl --request PUT \
--url https://go-fetch.io/api/v1/api-keys/{id}/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"environment": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"scopes": []
}
'import requests
url = "https://go-fetch.io/api/v1/api-keys/{id}/"
payload = {
"environment": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"scopes": []
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
environment: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: '<string>',
scopes: []
})
};
fetch('https://go-fetch.io/api/v1/api-keys/{id}/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization_name": "<string>",
"environment": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"environment_name": "<string>",
"environment_slug": "<string>",
"name": "<string>",
"prefix": "<string>",
"scopes": [
"read"
],
"last_used_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"rate_limit": 50000,
"is_active": true,
"expires_at": "2023-11-07T05:31:56Z"
}Authorizations
Path Parameters
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Friendly name for the API key
Required string length:
1 - 255read- readwrite- writeadmin- admin
Available options:
read, write, admin Requests per hour, from 1 to 100,000. A value outside that range is refused with a 400 that names rate_limit.
Required range:
1 <= x <= 100000Response
200 - application/json
Friendly name for the API key
Maximum string length:
255read- readwrite- writeadmin- admin
Available options:
read, write, admin Requests per hour, from 1 to 100,000. A value outside that range is refused with a 400 that names rate_limit.
Required range:
1 <= x <= 100000