Update routing configurations of a hub
curl --request PATCH \
--url https://apiweb.mile.app/api/v3/configurations/hub/{hubId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"configs": [
{
"configId": "<string>",
"name": "<string>",
"isDefault": true,
"doDelete": true
}
]
}
'import requests
url = "https://apiweb.mile.app/api/v3/configurations/hub/{hubId}"
payload = { "configs": [
{
"configId": "<string>",
"name": "<string>",
"isDefault": True,
"doDelete": True
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
configs: [{configId: '<string>', name: '<string>', isDefault: true, doDelete: true}]
})
};
fetch('https://apiweb.mile.app/api/v3/configurations/hub/{hubId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apiweb.mile.app/api/v3/configurations/hub/{hubId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'configs' => [
[
'configId' => '<string>',
'name' => '<string>',
'isDefault' => true,
'doDelete' => true
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://apiweb.mile.app/api/v3/configurations/hub/{hubId}"
payload := strings.NewReader("{\n \"configs\": [\n {\n \"configId\": \"<string>\",\n \"name\": \"<string>\",\n \"isDefault\": true,\n \"doDelete\": true\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://apiweb.mile.app/api/v3/configurations/hub/{hubId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"configs\": [\n {\n \"configId\": \"<string>\",\n \"name\": \"<string>\",\n \"isDefault\": true,\n \"doDelete\": true\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v3/configurations/hub/{hubId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"configs\": [\n {\n \"configId\": \"<string>\",\n \"name\": \"<string>\",\n \"isDefault\": true,\n \"doDelete\": true\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"data": {
"6512a0b1c2d3e4f5a6b7c8d1": true,
"6512a0b1c2d3e4f5a6b7c8d2": true
}
}{
"status": false,
"message": "Bad request - invalid parameters provided."
}{
"status": false,
"message": "Bad request - invalid parameters provided."
}Configuration
Update routing configurations of a hub
Renames, deletes, or changes the default of several profiles of one hub in one call. Exactly one entry in configs must have isDefault: true, and at least one profile must remain after the deletes. Deleting also needs the delete/configuration permission.
data maps each configId to whether its change succeeded.
Requires the view/configuration permission.
PATCH
/
configurations
/
hub
/
{hubId}
Update routing configurations of a hub
curl --request PATCH \
--url https://apiweb.mile.app/api/v3/configurations/hub/{hubId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"configs": [
{
"configId": "<string>",
"name": "<string>",
"isDefault": true,
"doDelete": true
}
]
}
'import requests
url = "https://apiweb.mile.app/api/v3/configurations/hub/{hubId}"
payload = { "configs": [
{
"configId": "<string>",
"name": "<string>",
"isDefault": True,
"doDelete": True
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
configs: [{configId: '<string>', name: '<string>', isDefault: true, doDelete: true}]
})
};
fetch('https://apiweb.mile.app/api/v3/configurations/hub/{hubId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apiweb.mile.app/api/v3/configurations/hub/{hubId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'configs' => [
[
'configId' => '<string>',
'name' => '<string>',
'isDefault' => true,
'doDelete' => true
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://apiweb.mile.app/api/v3/configurations/hub/{hubId}"
payload := strings.NewReader("{\n \"configs\": [\n {\n \"configId\": \"<string>\",\n \"name\": \"<string>\",\n \"isDefault\": true,\n \"doDelete\": true\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://apiweb.mile.app/api/v3/configurations/hub/{hubId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"configs\": [\n {\n \"configId\": \"<string>\",\n \"name\": \"<string>\",\n \"isDefault\": true,\n \"doDelete\": true\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v3/configurations/hub/{hubId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"configs\": [\n {\n \"configId\": \"<string>\",\n \"name\": \"<string>\",\n \"isDefault\": true,\n \"doDelete\": true\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"data": {
"6512a0b1c2d3e4f5a6b7c8d1": true,
"6512a0b1c2d3e4f5a6b7c8d2": true
}
}{
"status": false,
"message": "Bad request - invalid parameters provided."
}{
"status": false,
"message": "Bad request - invalid parameters provided."
}Authorizations
Use a valid Bearer token to authenticate.
Path Parameters
Unique identifier of the hub.
Example: 64d9932e2beb9037735ff022
Body
application/json
Show child attributes
Show child attributes