Locations
Refresh Location
Queue a refresh of a location’s secret.
POST
/
v1
/
locations
/
refresh
curl -X POST https://api.byteport.com/v1/locations/refresh \
-H "Authorization: Bearer $BYTEPORT_API_KEY" \
-H "User-Agent: my-app/1.0" \
-H "Content-Type: application/json" \
-d '{ "name": "marketing-assets" }'
await fetch("https://api.byteport.com/v1/locations/refresh", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.BYTEPORT_API_KEY}`,
"User-Agent": "my-app/1.0",
"Content-Type": "application/json",
},
body: JSON.stringify({ name: "marketing-assets" }), // or { id: "..." }
});
import os, requests
requests.post(
"https://api.byteport.com/v1/locations/refresh",
headers={
"Authorization": f"Bearer {os.environ['BYTEPORT_API_KEY']}",
"User-Agent": "my-app/1.0",
},
json={"name": "marketing-assets"}, # or {"id": "..."}
)
(empty body)
{
"error": 404,
"message": "no location named marketing-assets"
}
Request a refresh of a location’s secret. The call flags the location for
Byteport’s background refresher and returns immediately with
202 Accepted — the
refresh has been queued, not completed. Poll
Get Location Status to observe the result.
Address the location by name or id; at least one is required. A
non-unique name returns 409 with the candidates — resend with the id of the
one you want.
This applies to providers whose secrets rotate (the OAuth providers — Dropbox,
Google Drive, OneDrive, Box). For static credentials it is effectively a no-op.
curl -X POST https://api.byteport.com/v1/locations/refresh \
-H "Authorization: Bearer $BYTEPORT_API_KEY" \
-H "User-Agent: my-app/1.0" \
-H "Content-Type: application/json" \
-d '{ "name": "marketing-assets" }'
await fetch("https://api.byteport.com/v1/locations/refresh", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.BYTEPORT_API_KEY}`,
"User-Agent": "my-app/1.0",
"Content-Type": "application/json",
},
body: JSON.stringify({ name: "marketing-assets" }), // or { id: "..." }
});
import os, requests
requests.post(
"https://api.byteport.com/v1/locations/refresh",
headers={
"Authorization": f"Bearer {os.environ['BYTEPORT_API_KEY']}",
"User-Agent": "my-app/1.0",
},
json={"name": "marketing-assets"}, # or {"id": "..."}
)
(empty body)
{
"error": 404,
"message": "no location named marketing-assets"
}
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Address the location by name or id.
The location name (its label). Resolved to a single location; if the name matches several, also send id to pick one.
Example:
"prod-backups"
The location's UUID. Addresses one location directly, or — alongside name — selects which match of a non-unique name to act on.
Example:
"3f9a2b7c-1d4e-4a8f-9c2b-6e5d0a1f7b83"
Response
Refresh queued. The response body is empty.
curl -X POST https://api.byteport.com/v1/locations/refresh \
-H "Authorization: Bearer $BYTEPORT_API_KEY" \
-H "User-Agent: my-app/1.0" \
-H "Content-Type: application/json" \
-d '{ "name": "marketing-assets" }'
await fetch("https://api.byteport.com/v1/locations/refresh", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.BYTEPORT_API_KEY}`,
"User-Agent": "my-app/1.0",
"Content-Type": "application/json",
},
body: JSON.stringify({ name: "marketing-assets" }), // or { id: "..." }
});
import os, requests
requests.post(
"https://api.byteport.com/v1/locations/refresh",
headers={
"Authorization": f"Bearer {os.environ['BYTEPORT_API_KEY']}",
"User-Agent": "my-app/1.0",
},
json={"name": "marketing-assets"}, # or {"id": "..."}
)
(empty body)
{
"error": 404,
"message": "no location named marketing-assets"
}

