WidgetService
Widgets
Create a new widget
Creates a widget bound to an agent. The widget's DNS label and hostname are generated by the server and returned in info. The hostname may take up to a minute to become reachable while the edge propagates.
post/v1/workspaces/{workspaceId}/widgets
Path parameters
workspaceIdstring required
Example:workspace_01HXKD2E5NQM3T9AYWCF133E3Q
Workspace ID.
Request body
Example request
{
"workspaceId": "workspace_01HXKD2E5NQM3T9AYWCF133E3Q",
"spec": {
"agentId": "agent_01HXKD2E5NQM3T9AYWCFMGWT9Y",
"variationId": "agentvar_01HXKD2E5NQM3T9AYWCF32BSPP"
}
}Response
OK
Example response
{
"metadata": {
"accountId": "account_01HXKD2E5NQM3T9AYWCFTJHJVF",
"workspaceId": "workspace_01HXKD2E5NQM3T9AYWCF133E3Q",
"profileId": "profile_01HXKD2E5NQM3T9AYWCFS0AP08"
},
"spec": {
"agentId": "agent_01HXKD2E5NQM3T9AYWCFMGWT9Y",
"variationId": "agentvar_01HXKD2E5NQM3T9AYWCF32BSPP"
},
"info": {
"dnsLabel": "k7m2xq9fp4wn",
"host": "k7m2xq9fp4wn.widgets.cadenya.com",
"createdBy": {
"metadata": {
"accountId": "account_01HXKD2E5NQM3T9AYWCFTJHJVF",
"profileId": "profile_01HXKD2E5NQM3T9AYWCFS0AP08"
}
}
}
}