Get Location
Retrieve a single location by name or id.
# By name:
curl -X POST https://api.byteport.com/v1/locations/get \
-H "Authorization: Bearer $BYTEPORT_API_KEY" \
-H "User-Agent: my-app/1.0" \
-H "Content-Type: application/json" \
-d '{ "name": "prod-backups" }'
# By id:
curl -X POST https://api.byteport.com/v1/locations/get \
-H "Authorization: Bearer $BYTEPORT_API_KEY" \
-H "User-Agent: my-app/1.0" \
-H "Content-Type: application/json" \
-d '{ "id": "3f9a2b7c-1d4e-4a8f-9c2b-6e5d0a1f7b83" }'
const res = await fetch("https://api.byteport.com/v1/locations/get", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.BYTEPORT_API_KEY}`,
"User-Agent": "my-app/1.0",
"Content-Type": "application/json",
},
body: JSON.stringify({ name: "prod-backups" }), // or { id: "..." }
});
const location = await res.json();
import os, requests
location = requests.post(
"https://api.byteport.com/v1/locations/get",
headers={
"Authorization": f"Bearer {os.environ['BYTEPORT_API_KEY']}",
"User-Agent": "my-app/1.0",
},
json={"name": "prod-backups"}, # or {"id": "..."}
).json()
{
"id": "3f9a2b7c-1d4e-4a8f-9c2b-6e5d0a1f7b83",
"provider": "s3",
"label": "prod-backups",
"metadata": { "region": "us-east-1" }
}
{
"error": "name is not unique; re-issue with an \"id\" field for one of the candidates",
"name": "prod-backups",
"candidates": [
{
"id": "3f9a2b7c-1d4e-4a8f-9c2b-6e5d0a1f7b83",
"provider": "s3",
"created_at": "2026-05-14T17:02:11Z",
"updated_at": "2026-06-01T09:44:20Z"
},
{
"id": "8c2e1f4a-9b3d-4e6f-a1c7-2d5b0e9f7a34",
"provider": "gcs",
"created_at": "2026-05-20T11:07:33Z",
"updated_at": "2026-05-20T11:07:33Z"
}
]
}
name (its label) or id (its UUID); at least
one is required. Because labels aren’t unique, a bare name that matches more
than one location returns 409 with the candidates — resend with the id of the
one you want (both name and id together is also accepted, and selects that
match). This endpoint is a POST because the target rides in the request body.
# By name:
curl -X POST https://api.byteport.com/v1/locations/get \
-H "Authorization: Bearer $BYTEPORT_API_KEY" \
-H "User-Agent: my-app/1.0" \
-H "Content-Type: application/json" \
-d '{ "name": "prod-backups" }'
# By id:
curl -X POST https://api.byteport.com/v1/locations/get \
-H "Authorization: Bearer $BYTEPORT_API_KEY" \
-H "User-Agent: my-app/1.0" \
-H "Content-Type: application/json" \
-d '{ "id": "3f9a2b7c-1d4e-4a8f-9c2b-6e5d0a1f7b83" }'
const res = await fetch("https://api.byteport.com/v1/locations/get", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.BYTEPORT_API_KEY}`,
"User-Agent": "my-app/1.0",
"Content-Type": "application/json",
},
body: JSON.stringify({ name: "prod-backups" }), // or { id: "..." }
});
const location = await res.json();
import os, requests
location = requests.post(
"https://api.byteport.com/v1/locations/get",
headers={
"Authorization": f"Bearer {os.environ['BYTEPORT_API_KEY']}",
"User-Agent": "my-app/1.0",
},
json={"name": "prod-backups"}, # or {"id": "..."}
).json()
{
"id": "3f9a2b7c-1d4e-4a8f-9c2b-6e5d0a1f7b83",
"provider": "s3",
"label": "prod-backups",
"metadata": { "region": "us-east-1" }
}
{
"error": "name is not unique; re-issue with an \"id\" field for one of the candidates",
"name": "prod-backups",
"candidates": [
{
"id": "3f9a2b7c-1d4e-4a8f-9c2b-6e5d0a1f7b83",
"provider": "s3",
"created_at": "2026-05-14T17:02:11Z",
"updated_at": "2026-06-01T09:44:20Z"
},
{
"id": "8c2e1f4a-9b3d-4e6f-a1c7-2d5b0e9f7a34",
"provider": "gcs",
"created_at": "2026-05-20T11:07:33Z",
"updated_at": "2026-05-20T11:07:33Z"
}
]
}
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
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.
"prod-backups"
The location's UUID. Addresses one location directly, or — alongside name — selects which match of a non-unique name to act on.
"3f9a2b7c-1d4e-4a8f-9c2b-6e5d0a1f7b83"
Response
The requested location.
The non-secret projection of a location (a stored credential). Returned by Create, Get, Replace, and Update Label. Never includes the secret material — only the fields safe to display.
Unique identifier for the location (a UUID). Address a location by this id, or by its name (label).
"3f9a2b7c-1d4e-4a8f-9c2b-6e5d0a1f7b83"
The storage backend this location authenticates against, set at creation and immutable thereafter.
s3, r2, wasabi, b2, gcs, azureblob, dropbox, drive, onedrive, box "s3"
The human-readable name for the location. Labels are not unique: an account may reuse one across providers, and the same name can match several locations — pass an id to disambiguate. Set at creation and changed via Update Label.
"prod-backups"
Non-secret, provider-specific configuration stored alongside the secret (e.g. region, scopes, account_email). Byteport may stamp additional display hints here. Omitted entirely when empty.
{ "region": "us-east-1" }
# By name:
curl -X POST https://api.byteport.com/v1/locations/get \
-H "Authorization: Bearer $BYTEPORT_API_KEY" \
-H "User-Agent: my-app/1.0" \
-H "Content-Type: application/json" \
-d '{ "name": "prod-backups" }'
# By id:
curl -X POST https://api.byteport.com/v1/locations/get \
-H "Authorization: Bearer $BYTEPORT_API_KEY" \
-H "User-Agent: my-app/1.0" \
-H "Content-Type: application/json" \
-d '{ "id": "3f9a2b7c-1d4e-4a8f-9c2b-6e5d0a1f7b83" }'
const res = await fetch("https://api.byteport.com/v1/locations/get", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.BYTEPORT_API_KEY}`,
"User-Agent": "my-app/1.0",
"Content-Type": "application/json",
},
body: JSON.stringify({ name: "prod-backups" }), // or { id: "..." }
});
const location = await res.json();
import os, requests
location = requests.post(
"https://api.byteport.com/v1/locations/get",
headers={
"Authorization": f"Bearer {os.environ['BYTEPORT_API_KEY']}",
"User-Agent": "my-app/1.0",
},
json={"name": "prod-backups"}, # or {"id": "..."}
).json()
{
"id": "3f9a2b7c-1d4e-4a8f-9c2b-6e5d0a1f7b83",
"provider": "s3",
"label": "prod-backups",
"metadata": { "region": "us-east-1" }
}
{
"error": "name is not unique; re-issue with an \"id\" field for one of the candidates",
"name": "prod-backups",
"candidates": [
{
"id": "3f9a2b7c-1d4e-4a8f-9c2b-6e5d0a1f7b83",
"provider": "s3",
"created_at": "2026-05-14T17:02:11Z",
"updated_at": "2026-06-01T09:44:20Z"
},
{
"id": "8c2e1f4a-9b3d-4e6f-a1c7-2d5b0e9f7a34",
"provider": "gcs",
"created_at": "2026-05-20T11:07:33Z",
"updated_at": "2026-05-20T11:07:33Z"
}
]
}

