/v1/workspaces/{workspace_id}/configs/{config_id}/compareAuthCompare environments
Each setting's value and targeting side by side in 2-5 environments, with `differs` per setting.
Path parameters
config_id*string · uuidId of the config.
workspace_id*string · uuidId of the workspace.
Query parameters
cursorstringOpaque cursor for pagination: the `next_cursor` of the previous page.
limitintegerPage size.
environment_ids*stringComma-separated environment ids of the config's project, 2-5 of them.
Response · 200 A page of settings compared.
environments*arrayThe compared environments, in request order.
data*arrayOne row per setting, in `ordinal` order.
pagination*objectThe cursor for the next page.
Example
Request
GET https://api.flags.productcraft.co/v1/workspaces/{workspace_id}/configs/{config_id}/compare
Authorization: Bearer YOUR_TOKENimport { Flags } from "@productcraft/flags";
// Reads PRODUCTCRAFT_API_KEY from the environment
const flags = new Flags();
for await (const config of flags.configs.compare("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f", {
environment_ids: "0b8c7a52-5a8e-4b8f-9d0a-6b1f0e0c1a11,7c1d9e44-2f3a-4c55-8e6b-1a2b3c4d5e6f",
})) {
console.log(config);
}flags.configs.compare(configId, params, options?): PagePromise<Flags.CompareRow>
Response
{
"environments": [
{
"id": "00000000-0000-0000-0000-000000000000",
"key": "production",
"name": "Production"
}
],
"data": [
{
"setting": {},
"values": [
{
"setting_id": "00000000-0000-0000-0000-000000000000",
"environment_id": "00000000-0000-0000-0000-000000000000",
"environment_key": "production",
"value": false,
"rules": [
null
],
"percentages": [
null
],
"percentage_attribute": null,
"version": 3,
"updated_by": {},
"updated_at": "2026-01-01T00:00:00.000Z"
}
],
"differs": true
}
],
"pagination": {}
}