Widgets
Update a widget custom component
PATCH
/
v1
/
widget
/
custom-components
/
{id}
Update a widget custom component
curl --request PATCH \
--url https://api.sempera.org/v1/widget/custom-components/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"pathway_node": "<string>",
"width": "<string>",
"height": "<string>",
"variables": [
"<string>"
],
"iframe_url": "<string>"
}
'import requests
url = "https://api.sempera.org/v1/widget/custom-components/{id}"
payload = {
"pathway_node": "<string>",
"width": "<string>",
"height": "<string>",
"variables": ["<string>"],
"iframe_url": "<string>"
}
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({
pathway_node: '<string>',
width: '<string>',
height: '<string>',
variables: ['<string>'],
iframe_url: '<string>'
})
};
fetch('https://api.sempera.org/v1/widget/custom-components/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": "<string>",
"org_id": "<string>",
"widget_id": "<string>",
"pathway_id": "<string>",
"pathway_node": "<string>",
"width": "<string>",
"height": "<string>",
"variables": [
"<string>"
],
"iframe_url": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
},
"errors": null
}{
"error": {
"code": "AGENT_ENV_UNPINNED",
"message": "<string>",
"request_id": "<string>",
"field": "<string>",
"scope": "<string>",
"reason": "<string>"
}
}{
"error": {
"code": "AGENT_ENV_UNPINNED",
"message": "<string>",
"request_id": "<string>",
"field": "<string>",
"scope": "<string>",
"reason": "<string>"
}
}{
"error": {
"code": "AGENT_ENV_UNPINNED",
"message": "<string>",
"request_id": "<string>",
"field": "<string>",
"scope": "<string>",
"reason": "<string>"
}
}{
"error": {
"code": "AGENT_ENV_UNPINNED",
"message": "<string>",
"request_id": "<string>",
"field": "<string>",
"scope": "<string>",
"reason": "<string>"
}
}{
"error": {
"code": "AGENT_ENV_UNPINNED",
"message": "<string>",
"request_id": "<string>",
"field": "<string>",
"scope": "<string>",
"reason": "<string>"
}
}{
"error": {
"code": "AGENT_ENV_UNPINNED",
"message": "<string>",
"request_id": "<string>",
"field": "<string>",
"scope": "<string>",
"reason": "<string>"
}
}Authorizations
A workspace API key, sent as Authorization: Bearer sempera_sk_... Each operation names the one scope it needs. Scopes, key kinds and roles are in the Authentication guide.
Path Parameters
⌘I
Update a widget custom component
curl --request PATCH \
--url https://api.sempera.org/v1/widget/custom-components/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"pathway_node": "<string>",
"width": "<string>",
"height": "<string>",
"variables": [
"<string>"
],
"iframe_url": "<string>"
}
'import requests
url = "https://api.sempera.org/v1/widget/custom-components/{id}"
payload = {
"pathway_node": "<string>",
"width": "<string>",
"height": "<string>",
"variables": ["<string>"],
"iframe_url": "<string>"
}
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({
pathway_node: '<string>',
width: '<string>',
height: '<string>',
variables: ['<string>'],
iframe_url: '<string>'
})
};
fetch('https://api.sempera.org/v1/widget/custom-components/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": "<string>",
"org_id": "<string>",
"widget_id": "<string>",
"pathway_id": "<string>",
"pathway_node": "<string>",
"width": "<string>",
"height": "<string>",
"variables": [
"<string>"
],
"iframe_url": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
},
"errors": null
}{
"error": {
"code": "AGENT_ENV_UNPINNED",
"message": "<string>",
"request_id": "<string>",
"field": "<string>",
"scope": "<string>",
"reason": "<string>"
}
}{
"error": {
"code": "AGENT_ENV_UNPINNED",
"message": "<string>",
"request_id": "<string>",
"field": "<string>",
"scope": "<string>",
"reason": "<string>"
}
}{
"error": {
"code": "AGENT_ENV_UNPINNED",
"message": "<string>",
"request_id": "<string>",
"field": "<string>",
"scope": "<string>",
"reason": "<string>"
}
}{
"error": {
"code": "AGENT_ENV_UNPINNED",
"message": "<string>",
"request_id": "<string>",
"field": "<string>",
"scope": "<string>",
"reason": "<string>"
}
}{
"error": {
"code": "AGENT_ENV_UNPINNED",
"message": "<string>",
"request_id": "<string>",
"field": "<string>",
"scope": "<string>",
"reason": "<string>"
}
}{
"error": {
"code": "AGENT_ENV_UNPINNED",
"message": "<string>",
"request_id": "<string>",
"field": "<string>",
"scope": "<string>",
"reason": "<string>"
}
}