Deploy a Widget
To deploy a widget, send a POST request on
/widgets/deployments
.POST https://api.didomi.io/widgets/deployments?organization_id=YOUR_ORG_ID
{
"widget_id": "WIDGET_ID"
}
Note that if you have added metadata to a purpose, a preference or a preference_value, they will be available in the remote widget configuration in case you are using our APIs or Headless widgets.
To list all deployments, send a GET request on
/widgets/deployments
.GET https://api.didomi.io/widgets/deployments?organization_id=YOUR_ORG_ID
[
{
"id": "String",
"created_at": "Date",
"updated_at": "Date",
"organization_id": "String",
"widget_id": "String",
"config": {}
"deployment_id": "String",
}
]
Optional query parameters:
$limit
: number of max results to return$skip
: Number of results to skip$sort
: represents sorting options. Accepts date properties to sort (created_at
,updated_at
) as keys and -1 or 1 for sort direction as value.$sort[created_at]=1
or-1
$sort[updated_at]=1
or-1
widget_id
: To filter deployments by widget ID
To find a deployment, send a GET request on
/widgets/deployments/{id}
.GET https://api.didomi.io/widgets/deployments/{id}?organization_id=YOUR_ORG_ID
{
"id": "String",
"created_at": "Date",
"updated_at": "Date",
"organization_id": "String",
"widget_id": "String",
"config": {}
"deployment_id": "String",
}
A remote widget is a embeddable widget that has been deployed. Although the configuration object is generally used by our SDK to render the widget, you can use the endpoint below to re-build your own widget while relying on Widget engine.
*
api_key
and widget_id
are both accessible in Didomi Console, in the widget edit page. https://pmp-sdk.privacy-center.org/configs/{{api_key}}/containers/{{widget_id}}.json
This way of fetching widget configuration is the most reliable provided by Didomi.
Remote widgets configuration is stored in a S3 Standard Bucket which is design for 99.99% availability.
Last modified 13d ago