Arbeit für später ein- oder ausschalten, auf Gruppen begrenzen, das Budget eines Laufs und die Läufe gleichzeitig setzen
curl --request PUT \
--url https://ki.muster.example/api/v1/mandanten/{id}/work-rules \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"on": true,
"groups": "all",
"budget": {
"steps": 30,
"tokens": 250500,
"minutes": 30
},
"openRuns": 25
}
'import requests
url = "https://ki.muster.example/api/v1/mandanten/{id}/work-rules"
payload = {
"on": True,
"groups": "all",
"budget": {
"steps": 30,
"tokens": 250500,
"minutes": 30
},
"openRuns": 25
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
on: true,
groups: 'all',
budget: {steps: 30, tokens: 250500, minutes: 30},
openRuns: 25
})
};
fetch('https://ki.muster.example/api/v1/mandanten/{id}/work-rules', 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://ki.muster.example/api/v1/mandanten/{id}/work-rules",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'on' => true,
'groups' => 'all',
'budget' => [
'steps' => 30,
'tokens' => 250500,
'minutes' => 30
],
'openRuns' => 25
]),
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://ki.muster.example/api/v1/mandanten/{id}/work-rules"
payload := strings.NewReader("{\n \"on\": true,\n \"groups\": \"all\",\n \"budget\": {\n \"steps\": 30,\n \"tokens\": 250500,\n \"minutes\": 30\n },\n \"openRuns\": 25\n}")
req, _ := http.NewRequest("PUT", 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.put("https://ki.muster.example/api/v1/mandanten/{id}/work-rules")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"on\": true,\n \"groups\": \"all\",\n \"budget\": {\n \"steps\": 30,\n \"tokens\": 250500,\n \"minutes\": 30\n },\n \"openRuns\": 25\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://ki.muster.example/api/v1/mandanten/{id}/work-rules")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"on\": true,\n \"groups\": \"all\",\n \"budget\": {\n \"steps\": 30,\n \"tokens\": 250500,\n \"minutes\": 30\n },\n \"openRuns\": 25\n}"
response = http.request(request)
puts response.read_body{
"rules": {
"on": true,
"groups": "all",
"budget": {
"steps": 30,
"tokens": 250500,
"minutes": 30
},
"openRuns": 25
},
"standard": {
"on": true,
"groups": "all",
"budget": {
"steps": 30,
"tokens": 250500,
"minutes": 30
},
"openRuns": 25
},
"limits": {
"steps": {
"min": 123,
"max": 123
},
"tokens": {
"min": 123,
"max": 123
},
"minutes": {
"min": 123,
"max": 123
},
"openRuns": {
"min": 123,
"max": 123
}
},
"changed": {
"by": "<string>",
"at": "<string>"
}
}{
"error": "forbidden",
"message": "Nur für Admins dieses Mandanten",
"reason": "admins_only"
}{
"error": "forbidden",
"message": "Nur für Admins dieses Mandanten",
"reason": "admins_only"
}{
"error": "forbidden",
"message": "Nur für Admins dieses Mandanten",
"reason": "admins_only"
}{
"error": "forbidden",
"message": "Nur für Admins dieses Mandanten",
"reason": "admins_only"
}Arbeit für später ein- oder ausschalten, auf Gruppen begrenzen, das Budget eines Laufs und die Läufe gleichzeitig setzen
Arbeit für später ein- oder ausschalten, auf Gruppen begrenzen, das Budget eines Laufs und die Läufe gleichzeitig setzen.
Im Chat mit «Mono Admin»: .
PUT
/
mandanten
/
{id}
/
work-rules
Arbeit für später ein- oder ausschalten, auf Gruppen begrenzen, das Budget eines Laufs und die Läufe gleichzeitig setzen
curl --request PUT \
--url https://ki.muster.example/api/v1/mandanten/{id}/work-rules \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"on": true,
"groups": "all",
"budget": {
"steps": 30,
"tokens": 250500,
"minutes": 30
},
"openRuns": 25
}
'import requests
url = "https://ki.muster.example/api/v1/mandanten/{id}/work-rules"
payload = {
"on": True,
"groups": "all",
"budget": {
"steps": 30,
"tokens": 250500,
"minutes": 30
},
"openRuns": 25
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
on: true,
groups: 'all',
budget: {steps: 30, tokens: 250500, minutes: 30},
openRuns: 25
})
};
fetch('https://ki.muster.example/api/v1/mandanten/{id}/work-rules', 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://ki.muster.example/api/v1/mandanten/{id}/work-rules",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'on' => true,
'groups' => 'all',
'budget' => [
'steps' => 30,
'tokens' => 250500,
'minutes' => 30
],
'openRuns' => 25
]),
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://ki.muster.example/api/v1/mandanten/{id}/work-rules"
payload := strings.NewReader("{\n \"on\": true,\n \"groups\": \"all\",\n \"budget\": {\n \"steps\": 30,\n \"tokens\": 250500,\n \"minutes\": 30\n },\n \"openRuns\": 25\n}")
req, _ := http.NewRequest("PUT", 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.put("https://ki.muster.example/api/v1/mandanten/{id}/work-rules")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"on\": true,\n \"groups\": \"all\",\n \"budget\": {\n \"steps\": 30,\n \"tokens\": 250500,\n \"minutes\": 30\n },\n \"openRuns\": 25\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://ki.muster.example/api/v1/mandanten/{id}/work-rules")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"on\": true,\n \"groups\": \"all\",\n \"budget\": {\n \"steps\": 30,\n \"tokens\": 250500,\n \"minutes\": 30\n },\n \"openRuns\": 25\n}"
response = http.request(request)
puts response.read_body{
"rules": {
"on": true,
"groups": "all",
"budget": {
"steps": 30,
"tokens": 250500,
"minutes": 30
},
"openRuns": 25
},
"standard": {
"on": true,
"groups": "all",
"budget": {
"steps": 30,
"tokens": 250500,
"minutes": 30
},
"openRuns": 25
},
"limits": {
"steps": {
"min": 123,
"max": 123
},
"tokens": {
"min": 123,
"max": 123
},
"minutes": {
"min": 123,
"max": 123
},
"openRuns": {
"min": 123,
"max": 123
}
},
"changed": {
"by": "<string>",
"at": "<string>"
}
}{
"error": "forbidden",
"message": "Nur für Admins dieses Mandanten",
"reason": "admins_only"
}{
"error": "forbidden",
"message": "Nur für Admins dieses Mandanten",
"reason": "admins_only"
}{
"error": "forbidden",
"message": "Nur für Admins dieses Mandanten",
"reason": "admins_only"
}{
"error": "forbidden",
"message": "Nur für Admins dieses Mandanten",
"reason": "admins_only"
}Autorisierungen
Body
application/json