Context Passport
Create bounded durable logical session identity
POST
/
api
/
v1
/
context-passports
Create bounded durable logical session identity
curl --request POST \
--url http://127.0.0.1:18000/api/v1/context-passports \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"deployment": "<string>",
"cache_hints": {},
"metadata": {},
"preferred_binding_id": "<string>",
"preferred_target_id": "<string>",
"ttl_seconds": 3600
}
'import requests
url = "http://127.0.0.1:18000/api/v1/context-passports"
payload = {
"deployment": "<string>",
"cache_hints": {},
"metadata": {},
"preferred_binding_id": "<string>",
"preferred_target_id": "<string>",
"ttl_seconds": 3600
}
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({
deployment: '<string>',
cache_hints: {},
metadata: {},
preferred_binding_id: '<string>',
preferred_target_id: '<string>',
ttl_seconds: 3600
})
};
fetch('http://127.0.0.1:18000/api/v1/context-passports', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://127.0.0.1:18000/api/v1/context-passports"
payload := strings.NewReader("{\n \"deployment\": \"<string>\",\n \"cache_hints\": {},\n \"metadata\": {},\n \"preferred_binding_id\": \"<string>\",\n \"preferred_target_id\": \"<string>\",\n \"ttl_seconds\": 3600\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))
}{}{
"error": {
"code": "<string>",
"message": "<string>",
"category": "<string>",
"remediation": "<string>",
"request_id": "<string>",
"retryable": true
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
Created
The response is of type object.
⌘I
Create bounded durable logical session identity
curl --request POST \
--url http://127.0.0.1:18000/api/v1/context-passports \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"deployment": "<string>",
"cache_hints": {},
"metadata": {},
"preferred_binding_id": "<string>",
"preferred_target_id": "<string>",
"ttl_seconds": 3600
}
'import requests
url = "http://127.0.0.1:18000/api/v1/context-passports"
payload = {
"deployment": "<string>",
"cache_hints": {},
"metadata": {},
"preferred_binding_id": "<string>",
"preferred_target_id": "<string>",
"ttl_seconds": 3600
}
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({
deployment: '<string>',
cache_hints: {},
metadata: {},
preferred_binding_id: '<string>',
preferred_target_id: '<string>',
ttl_seconds: 3600
})
};
fetch('http://127.0.0.1:18000/api/v1/context-passports', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://127.0.0.1:18000/api/v1/context-passports"
payload := strings.NewReader("{\n \"deployment\": \"<string>\",\n \"cache_hints\": {},\n \"metadata\": {},\n \"preferred_binding_id\": \"<string>\",\n \"preferred_target_id\": \"<string>\",\n \"ttl_seconds\": 3600\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))
}{}{
"error": {
"code": "<string>",
"message": "<string>",
"category": "<string>",
"remediation": "<string>",
"request_id": "<string>",
"retryable": true
}
}