Get locations
Description:
Returns a paginated list of available locations.Precondition:
User must be authenticated.Response:
Returns the list of locations.Maximum number of locations to return. Must be between 1 and 10000.
Number of locations to skip before returning results, for pagination.
Sort order for the results. Default is name:asc.
Allowed values: name, name:asc, name:desc.
The locations have been successfully returned.
Location ID
Location name
Location DNS
Tenant ID
Total number of items available.
Maximum number of items returned per page.
Number of items skipped before the current page.
Unauthorized
Possible error codes: ERR_AUTH_INVALID_CSRF, ERR_AUTH_UNAUTHORIZED
Error code
Error message
Unprocessable Content
Possible error codes: ERR_INPUT_INVALID_FORMAT
Error code
Error message
Request blocked by WAF
curl -X GET \
"https://{instance}.kiteworks.com/rest/locations" \
-H "Authorization: Bearer YOUR_TOKEN"import requests
url = "https://{instance}.kiteworks.com/rest/locations"
headers = {
"Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.json())Create a location entry.
Creates a new location entry with a name and optional domain. Requires system admin privileges.
If set to true, returns information about the newly created entity.
Determines the detail level of the response body.
Location name. Ask administrator for location names for your server
A URL domain that can be used to access the servers in this location,
e.g. location.domain.com.
The domain should be registered in a DNS to point to the servers.
Indicates whether HATEOAS links should be included in the response
Location created successfully.
Location ID
Location name
Location DNS
Tenant ID
Forbidden
Possible error codes: ERR_ACCESS_SYSTEM_ADMIN
Error code
Error message
Conflict
Possible error codes: ERR_ENTITY_EXISTS
Error code
Error message
Unprocessable Content
Possible error codes: ERR_INPUT_INVALID_FORMAT, ERR_INPUT_REQUIRED
Error code
Error message
Request blocked by WAF
curl -X POST \
"https://{instance}.kiteworks.com/rest/locations" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"domain": "string",
"addLinks": true
}'import requests
url = "https://{instance}.kiteworks.com/rest/locations"
headers = {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json",
}
payload = {
"name": "string",
"domain": "string",
"addLinks": true
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())Return location name.
Returns the details of the specified location, including its name and DNS URL.
ID of the location to be retrieved
Location details retrieved successfully.
Location ID
Location name
Location DNS
Tenant ID
Request blocked by WAF
curl -X GET \
"https://{instance}.kiteworks.com/rest/locations/:id" \
-H "Authorization: Bearer YOUR_TOKEN"import requests
id = "VALUE" # ID of the location to be retrieved
url = f"https://{{instance}}.kiteworks.com/rest/locations/{id}"
headers = {
"Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.json())Delete a location.
Permanently deletes the specified location. Requires system admin privileges.
ID of the location to remove from
Location deleted successfully.
Forbidden
Possible error codes: ERR_ACCESS_SYSTEM_ADMIN, ERR_ACCESS_USER
Error code
Error message
Request blocked by WAF
curl -X DELETE \
"https://{instance}.kiteworks.com/rest/locations/:id" \
-H "Authorization: Bearer YOUR_TOKEN"import requests
id = "VALUE" # ID of the location to remove from
url = f"https://{{instance}}.kiteworks.com/rest/locations/{id}"
headers = {
"Authorization": "Bearer YOUR_TOKEN",
}
response = requests.delete(url, headers=headers)
print(response.json())