Update session configuration defaults
Updates explicit defaults using a revision check. Existing sessions inherit fields they have not overridden. Runtime application is asynchronous.
Requires sessions:manage. Project tokens only access resources in their own project.
curl --request PUT \
--url https://api.polymorfa.com/platform/session-configuration \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"revision": 1,
"configuration": {
"set": {
"historySync": {
"requestFull": true
},
"hms": {
"enabled": false
},
"observation": {}
},
"reset": []
}
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
revision: 1,
configuration: {
set: {historySync: {requestFull: true}, hms: {enabled: false}, observation: {}},
reset: []
}
})
};
fetch('https://api.polymorfa.com/platform/session-configuration', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.polymorfa.com/platform/session-configuration"
payload = {
"revision": 1,
"configuration": {
"set": {
"historySync": { "requestFull": True },
"hms": { "enabled": False },
"observation": {}
},
"reset": []
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.polymorfa.com/platform/session-configuration"
payload := strings.NewReader("{\n \"revision\": 1,\n \"configuration\": {\n \"set\": {\n \"historySync\": {\n \"requestFull\": true\n },\n \"hms\": {\n \"enabled\": false\n },\n \"observation\": {}\n },\n \"reset\": []\n }\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))
}false{
"data": {
"requestedHistory": {
"mode": "metadata_only",
"requestFull": true
},
"effective": {
"observation": {
"presenceMode": "off",
"typingMode": "off",
"labelMode": "off",
"quickReplyMode": "off"
},
"historySync": {
"mode": "metadata_only",
"requestFull": true
},
"hms": {
"enabled": false
}
},
"overrides": {
"historySync": {
"mode": "metadata_only",
"requestFull": true
},
"hms": {
"enabled": false
},
"observation": {
"presenceMode": "off",
"typingMode": "off",
"labelMode": "off",
"quickReplyMode": "off"
}
},
"sources": {
"observation.presenceMode": "platform",
"observation.typingMode": "platform",
"observation.labelMode": "platform",
"observation.quickReplyMode": "platform",
"historySync.mode": "platform",
"historySync.requestFull": "platform",
"hms": "platform"
},
"revisions": {
"team": 1,
"project": 1,
"session": 1
},
"historyConsent": "pending",
"application": {
"desiredGeneration": 1,
"appliedGeneration": 1,
"status": "pending"
}
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>"
},
"data": null,
"docs": "<string>"
}Authorizations
Send your team API key or project token as Authorization: Bearer <token>. The credential must have the required permissions. Project tokens can access only their own project.
Body
Specifies revision for this management session configuration update request.
Value constraints
| Constraint | Accepted input |
|---|---|
| Numeric value | 0 or greater |
x >= 0Structured configuration values for this management session configuration update request.
Show child attributes
Show child attributes
Identifier of the Polymorfa project that owns this resource.
Value constraints
| Constraint | Accepted input |
|---|---|
| Format | uuid |
Response
Success
Structured data carried by this object.
Show child attributes
Show child attributes
Was this page helpful?
curl --request PUT \
--url https://api.polymorfa.com/platform/session-configuration \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"revision": 1,
"configuration": {
"set": {
"historySync": {
"requestFull": true
},
"hms": {
"enabled": false
},
"observation": {}
},
"reset": []
}
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
revision: 1,
configuration: {
set: {historySync: {requestFull: true}, hms: {enabled: false}, observation: {}},
reset: []
}
})
};
fetch('https://api.polymorfa.com/platform/session-configuration', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.polymorfa.com/platform/session-configuration"
payload = {
"revision": 1,
"configuration": {
"set": {
"historySync": { "requestFull": True },
"hms": { "enabled": False },
"observation": {}
},
"reset": []
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.polymorfa.com/platform/session-configuration"
payload := strings.NewReader("{\n \"revision\": 1,\n \"configuration\": {\n \"set\": {\n \"historySync\": {\n \"requestFull\": true\n },\n \"hms\": {\n \"enabled\": false\n },\n \"observation\": {}\n },\n \"reset\": []\n }\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))
}false{
"data": {
"requestedHistory": {
"mode": "metadata_only",
"requestFull": true
},
"effective": {
"observation": {
"presenceMode": "off",
"typingMode": "off",
"labelMode": "off",
"quickReplyMode": "off"
},
"historySync": {
"mode": "metadata_only",
"requestFull": true
},
"hms": {
"enabled": false
}
},
"overrides": {
"historySync": {
"mode": "metadata_only",
"requestFull": true
},
"hms": {
"enabled": false
},
"observation": {
"presenceMode": "off",
"typingMode": "off",
"labelMode": "off",
"quickReplyMode": "off"
}
},
"sources": {
"observation.presenceMode": "platform",
"observation.typingMode": "platform",
"observation.labelMode": "platform",
"observation.quickReplyMode": "platform",
"historySync.mode": "platform",
"historySync.requestFull": "platform",
"hms": "platform"
},
"revisions": {
"team": 1,
"project": 1,
"session": 1
},
"historyConsent": "pending",
"application": {
"desiredGeneration": 1,
"appliedGeneration": 1,
"status": "pending"
}
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>"
},
"data": null,
"docs": "<string>"
}