Skip to main content
POST
/
v1
/
provisioning
/
client-profiles
/
{client_id}
/
services
Create Service Endpoint
curl --request POST \
  --url https://api.example.com/v1/provisioning/client-profiles/{client_id}/services \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "auth_mode": "service_token",
  "canary_pct": 0,
  "drift_policy": {},
  "endpoint_name": "<string>",
  "max_instances": 3,
  "min_instances": 1,
  "plan": "starter"
}
'
import requests

url = "https://api.example.com/v1/provisioning/client-profiles/{client_id}/services"

payload = {
"auth_mode": "service_token",
"canary_pct": 0,
"drift_policy": {},
"endpoint_name": "<string>",
"max_instances": 3,
"min_instances": 1,
"plan": "starter"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
auth_mode: 'service_token',
canary_pct: 0,
drift_policy: {},
endpoint_name: '<string>',
max_instances: 3,
min_instances: 1,
plan: 'starter'
})
};

fetch('https://api.example.com/v1/provisioning/client-profiles/{client_id}/services', 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://api.example.com/v1/provisioning/client-profiles/{client_id}/services",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'auth_mode' => 'service_token',
'canary_pct' => 0,
'drift_policy' => [

],
'endpoint_name' => '<string>',
'max_instances' => 3,
'min_instances' => 1,
'plan' => 'starter'
]),
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://api.example.com/v1/provisioning/client-profiles/{client_id}/services"

payload := strings.NewReader("{\n \"auth_mode\": \"service_token\",\n \"canary_pct\": 0,\n \"drift_policy\": {},\n \"endpoint_name\": \"<string>\",\n \"max_instances\": 3,\n \"min_instances\": 1,\n \"plan\": \"starter\"\n}")

req, _ := http.NewRequest("POST", 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.post("https://api.example.com/v1/provisioning/client-profiles/{client_id}/services")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"auth_mode\": \"service_token\",\n \"canary_pct\": 0,\n \"drift_policy\": {},\n \"endpoint_name\": \"<string>\",\n \"max_instances\": 3,\n \"min_instances\": 1,\n \"plan\": \"starter\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.example.com/v1/provisioning/client-profiles/{client_id}/services")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"auth_mode\": \"service_token\",\n \"canary_pct\": 0,\n \"drift_policy\": {},\n \"endpoint_name\": \"<string>\",\n \"max_instances\": 3,\n \"min_instances\": 1,\n \"plan\": \"starter\"\n}"

response = http.request(request)
puts response.read_body
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>",
      "ctx": {},
      "input": "<unknown>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

client_id
string
required

Body

application/json
auth_mode
string
default:service_token
canary_pct
integer
default:0
drift_policy
Drift Policy · object
endpoint_name
string | null
max_instances
integer
default:3
min_instances
integer
default:1
plan
string
default:starter

Response

Successful Response