list available locations.md

List available Locations

Management API · Locations

GET https://app.mk.io/api/v1/locations

Listing, Sorting and Filtering Locations

This endpoint returns the list of locations.

Sorting

The results from this endpoint can be ordered using the $orderby query parameter. Specify a list of field names, separated by commas where each one can optionally specify asc or desc.

Sorting is valid on the following fields: displayName, id, name

Filtering

The $filter query parameter allows for locations to be filtered on the basis of fields in the schema using OData query syntax. See this document for more details on the syntax used.

Filters are valid on the following fields: cloud/name, cloud/region/name, displayName, id, name

Examples:

?$top=10 - Returns only the first 10 locations from the list.

?$orderby=name desc - Sorts locations by name in descending order.

?$filter=name eq 'descriptive name' - Returns locations that match the provided name.

RBAC Capability Required: core.location.get

Authentication

Query parameters

Name Type Required Description
$orderby string No Specifies the key by which the result collection should be ordered.
$filter string No Restricts the set of items returned.
$top string No Specifies a non-negative integer n that limits the number of items returned from a collection.
$skiptoken string No Specifies a start offset to support paginated results. Use @odata.nextLink in the result object to enumerate the collection - it will be present only if there's more than one page of entities.

Example request

curl -X GET "https://app.mk.io/api/v1/locations" \
  -H "Authorization: Bearer <token>"

Responses

200 — A list of locations

400 — Bad Request

401 — Unauthorized

403 — Forbidden

404 — Not Found

429 — Too Many Requests

500 — Internal Server Error


Source spec: management-api · operationId: [get]_/api/v1/locations