Themes service#
Themes service manages themes for exporting charts.
OpenAPI file: ThemesService.json
Endpoints#
List chart themes#
GET /themes/v1/chart-themes
Get all chart themes saved to the requested workspaces.
Query parameters
workspacesarray of string (RID)If supplied, will return only results within the supplied workspaces. If empty will return all results within workspaces that the user is permitted to see.
Response
The body is an array of ChartTheme.
Fields of ChartTheme
ridstring (RID)Unique resource identifier for the theme.
namestringThe name of the theme as defined by the user.
createdBystring (RID)The rid of the user who first created the theme.
createdAtstring (date-time)The time the theme was created.
updatedBystring (RID)The rid of the user who last updated the theme.
updatedAtstring (date-time)The rid of the user who last updated the theme.
contentChartThemeContentSpecifies the chart theme styling (e.g. font, legends, axes)
Set
typeto"v1".v1ChartThemeContentV1
Fields of
ChartThemeContentV1titleEnabledbooleanWhether to show a title in the export.
titleAlignmentTextAlignmentHow to align the text of the title.
Values of
TextAlignmentSTART
END
CENTER
JUSTIFY
titleFontSizeintegerFont size of the title.
titleFontColorstringFont color of the title.
captionEnabledbooleanWhether to show a caption in the export.
captionAlignmentTextAlignmentHow to align the text of the caption.
captionFontSizeintegerFont size of the caption.
captionFontColorstringFont color of the caption.
backgroundEnabledbooleanWhether to include a default background with the export. (
falseindicates that the background should be transparent)legendEnabledbooleanWhether to include a legend in the export.
legendPositionLegendPositionWhich side the legend should appear on.
Values of
LegendPositionTOP
BOTTOM
LEFT
RIGHT
legendFontSizeintegerFont size of the legend.
legendFontColorstringFont color of the legend.
legendPlacementLegendPlacementWhere on the chart the legend should be placed.
Values of
LegendPlacementOUTSIDE
INSIDE
rowGapEnabledbooleanWhether rows will be separated.
rowGapSizeintegerThe size of the row gap.
aspectRatioWidthintegerThe relative width of the chart export.
aspectRatioHeightintegerThe relative height of the chart export.
chartTypeThemesChartTypeThemesTheme parameters specific to chart types.
Fields of
ChartTypeThemestimeSeriesTimeSeriesChartThemeThe theme specific to parameters of the time series chart.
Set
typeto"v1".v1TimeSeriesChartThemeV1
Fields of
TimeSeriesChartThemeV1xAxisTickFontSizeintegerThe font size of the x-axis ticks.
xAxisTickFontColorstringThe font color of the x-axis ticks.
yAxisTitleFontSizeintegerThe font size of the y-axis labels.
yAxisTickFontSizeintegerThe font size of the y-axis ticks.
thresholdLineWidthintegerThe line thickness in px of the threshold line.
Request
curl "https://api.gov.nominal.io/api/themes/v1/chart-themes" \
-H "Authorization: Bearer <api key>"
import requests
response = requests.get(
"https://api.gov.nominal.io/api/themes/v1/chart-themes",
headers={"Authorization": "Bearer <api key>"},
)
response.raise_for_status()
print(response.json())
import httpx
response = httpx.get(
"https://api.gov.nominal.io/api/themes/v1/chart-themes",
headers={"Authorization": "Bearer <api key>"},
)
response.raise_for_status()
print(response.json())
import asyncio
import aiohttp
async def main() -> None:
async with aiohttp.ClientSession() as session:
async with session.get(
"https://api.gov.nominal.io/api/themes/v1/chart-themes",
headers={"Authorization": "Bearer <api key>"},
) as response:
response.raise_for_status()
print(await response.json())
asyncio.run(main())
Response: 200
[
{
"rid": "<chart theme rid>",
"name": "<name>",
"createdBy": "<created by>",
"createdAt": "2026-01-01T00:00:00Z",
"updatedBy": "<updated by>",
"updatedAt": "2026-01-01T00:00:00Z",
"content": {
"type": "v1",
"v1": {
"titleEnabled": true,
"titleAlignment": "START",
"titleFontSize": 1,
"titleFontColor": "<hex color>",
"captionEnabled": true,
"captionAlignment": "START",
"captionFontSize": 1,
"captionFontColor": "<hex color>",
"backgroundEnabled": true,
"legendEnabled": true,
"legendPosition": "TOP",
"legendFontSize": 1,
"legendFontColor": "<hex color>",
"legendPlacement": "OUTSIDE",
"rowGapEnabled": true,
"rowGapSize": 1,
"aspectRatioWidth": 1,
"aspectRatioHeight": 1,
"chartTypeThemes": {
"timeSeries": {
"type": "v1",
"v1": {
"xAxisTickFontSize": 1,
"xAxisTickFontColor": "<hex color>",
"yAxisTitleFontSize": 1,
"yAxisTickFontSize": 1,
"thresholdLineWidth": 1
}
}
}
}
}
}
]
Create chart theme#
POST /themes/v1/chart-themes
Create a new chart theme.
Body
namestring requiredThe name of the theme.
contentChartThemeContentrequiredThe theme fields.
Set
typeto"v1".v1ChartThemeContentV1
Fields of
ChartThemeContentV1titleEnabledboolean requiredWhether to show a title in the export.
titleAlignmentTextAlignmentrequiredHow to align the text of the title.
Values of
TextAlignmentSTART
END
CENTER
JUSTIFY
titleFontSizeinteger requiredFont size of the title.
titleFontColorstring requiredFont color of the title.
captionEnabledboolean requiredWhether to show a caption in the export.
captionAlignmentTextAlignmentrequiredHow to align the text of the caption.
captionFontSizeinteger requiredFont size of the caption.
captionFontColorstring requiredFont color of the caption.
backgroundEnabledboolean requiredWhether to include a default background with the export. (
falseindicates that the background should be transparent)legendEnabledboolean requiredWhether to include a legend in the export.
legendPositionLegendPositionrequiredWhich side the legend should appear on.
Values of
LegendPositionTOP
BOTTOM
LEFT
RIGHT
legendFontSizeinteger requiredFont size of the legend.
legendFontColorstring requiredFont color of the legend.
legendPlacementLegendPlacementrequiredWhere on the chart the legend should be placed.
Values of
LegendPlacementOUTSIDE
INSIDE
rowGapEnabledboolean requiredWhether rows will be separated.
rowGapSizeintegerThe size of the row gap.
aspectRatioWidthinteger requiredThe relative width of the chart export.
aspectRatioHeightinteger requiredThe relative height of the chart export.
chartTypeThemesChartTypeThemesrequiredTheme parameters specific to chart types.
Fields of
ChartTypeThemestimeSeriesTimeSeriesChartThemerequiredThe theme specific to parameters of the time series chart.
Set
typeto"v1".v1TimeSeriesChartThemeV1
Fields of
TimeSeriesChartThemeV1xAxisTickFontSizeinteger requiredThe font size of the x-axis ticks.
xAxisTickFontColorstring requiredThe font color of the x-axis ticks.
yAxisTitleFontSizeinteger requiredThe font size of the y-axis labels.
yAxisTickFontSizeinteger requiredThe font size of the y-axis ticks.
thresholdLineWidthintegerThe line thickness in px of the threshold line.
workspacestring (RID)The workspace in which to create the theme. If not provided, the theme will be created in the default workspace for the user’s organization, if the default workspace for the organization is configured.
Response
ridstring (RID)Unique resource identifier for the theme.
namestringThe name of the theme as defined by the user.
createdBystring (RID)The rid of the user who first created the theme.
createdAtstring (date-time)The time the theme was created.
updatedBystring (RID)The rid of the user who last updated the theme.
updatedAtstring (date-time)The rid of the user who last updated the theme.
contentChartThemeContentSpecifies the chart theme styling (e.g. font, legends, axes)
Set
typeto"v1".v1ChartThemeContentV1
Fields of
ChartThemeContentV1titleEnabledbooleanWhether to show a title in the export.
titleAlignmentTextAlignmentHow to align the text of the title.
Values of
TextAlignmentSTART
END
CENTER
JUSTIFY
titleFontSizeintegerFont size of the title.
titleFontColorstringFont color of the title.
captionEnabledbooleanWhether to show a caption in the export.
captionAlignmentTextAlignmentHow to align the text of the caption.
captionFontSizeintegerFont size of the caption.
captionFontColorstringFont color of the caption.
backgroundEnabledbooleanWhether to include a default background with the export. (
falseindicates that the background should be transparent)legendEnabledbooleanWhether to include a legend in the export.
legendPositionLegendPositionWhich side the legend should appear on.
Values of
LegendPositionTOP
BOTTOM
LEFT
RIGHT
legendFontSizeintegerFont size of the legend.
legendFontColorstringFont color of the legend.
legendPlacementLegendPlacementWhere on the chart the legend should be placed.
Values of
LegendPlacementOUTSIDE
INSIDE
rowGapEnabledbooleanWhether rows will be separated.
rowGapSizeintegerThe size of the row gap.
aspectRatioWidthintegerThe relative width of the chart export.
aspectRatioHeightintegerThe relative height of the chart export.
chartTypeThemesChartTypeThemesTheme parameters specific to chart types.
Fields of
ChartTypeThemestimeSeriesTimeSeriesChartThemeThe theme specific to parameters of the time series chart.
Set
typeto"v1".v1TimeSeriesChartThemeV1
Fields of
TimeSeriesChartThemeV1xAxisTickFontSizeintegerThe font size of the x-axis ticks.
xAxisTickFontColorstringThe font color of the x-axis ticks.
yAxisTitleFontSizeintegerThe font size of the y-axis labels.
yAxisTickFontSizeintegerThe font size of the y-axis ticks.
thresholdLineWidthintegerThe line thickness in px of the threshold line.
Request
curl -X POST "https://api.gov.nominal.io/api/themes/v1/chart-themes" \
-H "Authorization: Bearer <api key>" \
-H "Content-Type: application/json" \
--data '{
"name": "<name>",
"content": {
"type": "v1",
"v1": {
"titleEnabled": true,
"titleAlignment": "START",
"titleFontSize": 1,
"titleFontColor": "<hex color>",
"captionEnabled": true,
"captionAlignment": "START",
"captionFontSize": 1,
"captionFontColor": "<hex color>",
"backgroundEnabled": true,
"legendEnabled": true,
"legendPosition": "TOP",
"legendFontSize": 1,
"legendFontColor": "<hex color>",
"legendPlacement": "OUTSIDE",
"rowGapEnabled": true,
"aspectRatioWidth": 1,
"aspectRatioHeight": 1,
"chartTypeThemes": {
"timeSeries": {
"type": "v1",
"v1": {
"xAxisTickFontSize": 1,
"xAxisTickFontColor": "<hex color>",
"yAxisTitleFontSize": 1,
"yAxisTickFontSize": 1
}
}
}
}
}
}'
import requests
response = requests.post(
"https://api.gov.nominal.io/api/themes/v1/chart-themes",
headers={"Authorization": "Bearer <api key>"},
json={
"name": "<name>",
"content": {
"type": "v1",
"v1": {
"titleEnabled": True,
"titleAlignment": "START",
"titleFontSize": 1,
"titleFontColor": "<hex color>",
"captionEnabled": True,
"captionAlignment": "START",
"captionFontSize": 1,
"captionFontColor": "<hex color>",
"backgroundEnabled": True,
"legendEnabled": True,
"legendPosition": "TOP",
"legendFontSize": 1,
"legendFontColor": "<hex color>",
"legendPlacement": "OUTSIDE",
"rowGapEnabled": True,
"aspectRatioWidth": 1,
"aspectRatioHeight": 1,
"chartTypeThemes": {
"timeSeries": {
"type": "v1",
"v1": {
"xAxisTickFontSize": 1,
"xAxisTickFontColor": "<hex color>",
"yAxisTitleFontSize": 1,
"yAxisTickFontSize": 1,
},
},
},
},
},
},
)
response.raise_for_status()
print(response.json())
import httpx
response = httpx.post(
"https://api.gov.nominal.io/api/themes/v1/chart-themes",
headers={"Authorization": "Bearer <api key>"},
json={
"name": "<name>",
"content": {
"type": "v1",
"v1": {
"titleEnabled": True,
"titleAlignment": "START",
"titleFontSize": 1,
"titleFontColor": "<hex color>",
"captionEnabled": True,
"captionAlignment": "START",
"captionFontSize": 1,
"captionFontColor": "<hex color>",
"backgroundEnabled": True,
"legendEnabled": True,
"legendPosition": "TOP",
"legendFontSize": 1,
"legendFontColor": "<hex color>",
"legendPlacement": "OUTSIDE",
"rowGapEnabled": True,
"aspectRatioWidth": 1,
"aspectRatioHeight": 1,
"chartTypeThemes": {
"timeSeries": {
"type": "v1",
"v1": {
"xAxisTickFontSize": 1,
"xAxisTickFontColor": "<hex color>",
"yAxisTitleFontSize": 1,
"yAxisTickFontSize": 1,
},
},
},
},
},
},
)
response.raise_for_status()
print(response.json())
import asyncio
import aiohttp
async def main() -> None:
async with aiohttp.ClientSession() as session:
async with session.post(
"https://api.gov.nominal.io/api/themes/v1/chart-themes",
headers={"Authorization": "Bearer <api key>"},
json={
"name": "<name>",
"content": {
"type": "v1",
"v1": {
"titleEnabled": True,
"titleAlignment": "START",
"titleFontSize": 1,
"titleFontColor": "<hex color>",
"captionEnabled": True,
"captionAlignment": "START",
"captionFontSize": 1,
"captionFontColor": "<hex color>",
"backgroundEnabled": True,
"legendEnabled": True,
"legendPosition": "TOP",
"legendFontSize": 1,
"legendFontColor": "<hex color>",
"legendPlacement": "OUTSIDE",
"rowGapEnabled": True,
"aspectRatioWidth": 1,
"aspectRatioHeight": 1,
"chartTypeThemes": {
"timeSeries": {
"type": "v1",
"v1": {
"xAxisTickFontSize": 1,
"xAxisTickFontColor": "<hex color>",
"yAxisTitleFontSize": 1,
"yAxisTickFontSize": 1,
},
},
},
},
},
},
) as response:
response.raise_for_status()
print(await response.json())
asyncio.run(main())
Response: 200
{
"rid": "<chart theme rid>",
"name": "<name>",
"createdBy": "<created by>",
"createdAt": "2026-01-01T00:00:00Z",
"updatedBy": "<updated by>",
"updatedAt": "2026-01-01T00:00:00Z",
"content": {
"type": "v1",
"v1": {
"titleEnabled": true,
"titleAlignment": "START",
"titleFontSize": 1,
"titleFontColor": "<hex color>",
"captionEnabled": true,
"captionAlignment": "START",
"captionFontSize": 1,
"captionFontColor": "<hex color>",
"backgroundEnabled": true,
"legendEnabled": true,
"legendPosition": "TOP",
"legendFontSize": 1,
"legendFontColor": "<hex color>",
"legendPlacement": "OUTSIDE",
"rowGapEnabled": true,
"rowGapSize": 1,
"aspectRatioWidth": 1,
"aspectRatioHeight": 1,
"chartTypeThemes": {
"timeSeries": {
"type": "v1",
"v1": {
"xAxisTickFontSize": 1,
"xAxisTickFontColor": "<hex color>",
"yAxisTitleFontSize": 1,
"yAxisTickFontSize": 1,
"thresholdLineWidth": 1
}
}
}
}
}
}
Get chart theme#
GET /themes/v1/chart-themes/{chartThemeRid}
Get a specific chart theme by RID.
Path parameters
chartThemeRidstring (RID) requiredThe RID of chart theme.
Response
ridstring (RID)Unique resource identifier for the theme.
namestringThe name of the theme as defined by the user.
createdBystring (RID)The rid of the user who first created the theme.
createdAtstring (date-time)The time the theme was created.
updatedBystring (RID)The rid of the user who last updated the theme.
updatedAtstring (date-time)The rid of the user who last updated the theme.
contentChartThemeContentSpecifies the chart theme styling (e.g. font, legends, axes)
Set
typeto"v1".v1ChartThemeContentV1
Fields of
ChartThemeContentV1titleEnabledbooleanWhether to show a title in the export.
titleAlignmentTextAlignmentHow to align the text of the title.
Values of
TextAlignmentSTART
END
CENTER
JUSTIFY
titleFontSizeintegerFont size of the title.
titleFontColorstringFont color of the title.
captionEnabledbooleanWhether to show a caption in the export.
captionAlignmentTextAlignmentHow to align the text of the caption.
captionFontSizeintegerFont size of the caption.
captionFontColorstringFont color of the caption.
backgroundEnabledbooleanWhether to include a default background with the export. (
falseindicates that the background should be transparent)legendEnabledbooleanWhether to include a legend in the export.
legendPositionLegendPositionWhich side the legend should appear on.
Values of
LegendPositionTOP
BOTTOM
LEFT
RIGHT
legendFontSizeintegerFont size of the legend.
legendFontColorstringFont color of the legend.
legendPlacementLegendPlacementWhere on the chart the legend should be placed.
Values of
LegendPlacementOUTSIDE
INSIDE
rowGapEnabledbooleanWhether rows will be separated.
rowGapSizeintegerThe size of the row gap.
aspectRatioWidthintegerThe relative width of the chart export.
aspectRatioHeightintegerThe relative height of the chart export.
chartTypeThemesChartTypeThemesTheme parameters specific to chart types.
Fields of
ChartTypeThemestimeSeriesTimeSeriesChartThemeThe theme specific to parameters of the time series chart.
Set
typeto"v1".v1TimeSeriesChartThemeV1
Fields of
TimeSeriesChartThemeV1xAxisTickFontSizeintegerThe font size of the x-axis ticks.
xAxisTickFontColorstringThe font color of the x-axis ticks.
yAxisTitleFontSizeintegerThe font size of the y-axis labels.
yAxisTickFontSizeintegerThe font size of the y-axis ticks.
thresholdLineWidthintegerThe line thickness in px of the threshold line.
Request
curl "https://api.gov.nominal.io/api/themes/v1/chart-themes/<chart theme rid>" \
-H "Authorization: Bearer <api key>"
import requests
response = requests.get(
"https://api.gov.nominal.io/api/themes/v1/chart-themes/<chart theme rid>",
headers={"Authorization": "Bearer <api key>"},
)
response.raise_for_status()
print(response.json())
import httpx
response = httpx.get(
"https://api.gov.nominal.io/api/themes/v1/chart-themes/<chart theme rid>",
headers={"Authorization": "Bearer <api key>"},
)
response.raise_for_status()
print(response.json())
import asyncio
import aiohttp
async def main() -> None:
async with aiohttp.ClientSession() as session:
async with session.get(
"https://api.gov.nominal.io/api/themes/v1/chart-themes/<chart theme rid>",
headers={"Authorization": "Bearer <api key>"},
) as response:
response.raise_for_status()
print(await response.json())
asyncio.run(main())
Response: 200
{
"rid": "<chart theme rid>",
"name": "<name>",
"createdBy": "<created by>",
"createdAt": "2026-01-01T00:00:00Z",
"updatedBy": "<updated by>",
"updatedAt": "2026-01-01T00:00:00Z",
"content": {
"type": "v1",
"v1": {
"titleEnabled": true,
"titleAlignment": "START",
"titleFontSize": 1,
"titleFontColor": "<hex color>",
"captionEnabled": true,
"captionAlignment": "START",
"captionFontSize": 1,
"captionFontColor": "<hex color>",
"backgroundEnabled": true,
"legendEnabled": true,
"legendPosition": "TOP",
"legendFontSize": 1,
"legendFontColor": "<hex color>",
"legendPlacement": "OUTSIDE",
"rowGapEnabled": true,
"rowGapSize": 1,
"aspectRatioWidth": 1,
"aspectRatioHeight": 1,
"chartTypeThemes": {
"timeSeries": {
"type": "v1",
"v1": {
"xAxisTickFontSize": 1,
"xAxisTickFontColor": "<hex color>",
"yAxisTitleFontSize": 1,
"yAxisTickFontSize": 1,
"thresholdLineWidth": 1
}
}
}
}
}
}
Update chart theme#
PUT /themes/v1/chart-themes/{chartThemeRid}
Update an existing chart theme.
Path parameters
chartThemeRidstring (RID) requiredThe RID of chart theme to update.
Body
namestring requiredThe name of the theme.
contentChartThemeContentrequiredThe theme fields.
Set
typeto"v1".v1ChartThemeContentV1
Fields of
ChartThemeContentV1titleEnabledboolean requiredWhether to show a title in the export.
titleAlignmentTextAlignmentrequiredHow to align the text of the title.
Values of
TextAlignmentSTART
END
CENTER
JUSTIFY
titleFontSizeinteger requiredFont size of the title.
titleFontColorstring requiredFont color of the title.
captionEnabledboolean requiredWhether to show a caption in the export.
captionAlignmentTextAlignmentrequiredHow to align the text of the caption.
captionFontSizeinteger requiredFont size of the caption.
captionFontColorstring requiredFont color of the caption.
backgroundEnabledboolean requiredWhether to include a default background with the export. (
falseindicates that the background should be transparent)legendEnabledboolean requiredWhether to include a legend in the export.
legendPositionLegendPositionrequiredWhich side the legend should appear on.
Values of
LegendPositionTOP
BOTTOM
LEFT
RIGHT
legendFontSizeinteger requiredFont size of the legend.
legendFontColorstring requiredFont color of the legend.
legendPlacementLegendPlacementrequiredWhere on the chart the legend should be placed.
Values of
LegendPlacementOUTSIDE
INSIDE
rowGapEnabledboolean requiredWhether rows will be separated.
rowGapSizeintegerThe size of the row gap.
aspectRatioWidthinteger requiredThe relative width of the chart export.
aspectRatioHeightinteger requiredThe relative height of the chart export.
chartTypeThemesChartTypeThemesrequiredTheme parameters specific to chart types.
Fields of
ChartTypeThemestimeSeriesTimeSeriesChartThemerequiredThe theme specific to parameters of the time series chart.
Set
typeto"v1".v1TimeSeriesChartThemeV1
Fields of
TimeSeriesChartThemeV1xAxisTickFontSizeinteger requiredThe font size of the x-axis ticks.
xAxisTickFontColorstring requiredThe font color of the x-axis ticks.
yAxisTitleFontSizeinteger requiredThe font size of the y-axis labels.
yAxisTickFontSizeinteger requiredThe font size of the y-axis ticks.
thresholdLineWidthintegerThe line thickness in px of the threshold line.
Response
ridstring (RID)Unique resource identifier for the theme.
namestringThe name of the theme as defined by the user.
createdBystring (RID)The rid of the user who first created the theme.
createdAtstring (date-time)The time the theme was created.
updatedBystring (RID)The rid of the user who last updated the theme.
updatedAtstring (date-time)The rid of the user who last updated the theme.
contentChartThemeContentSpecifies the chart theme styling (e.g. font, legends, axes)
Set
typeto"v1".v1ChartThemeContentV1
Fields of
ChartThemeContentV1titleEnabledbooleanWhether to show a title in the export.
titleAlignmentTextAlignmentHow to align the text of the title.
Values of
TextAlignmentSTART
END
CENTER
JUSTIFY
titleFontSizeintegerFont size of the title.
titleFontColorstringFont color of the title.
captionEnabledbooleanWhether to show a caption in the export.
captionAlignmentTextAlignmentHow to align the text of the caption.
captionFontSizeintegerFont size of the caption.
captionFontColorstringFont color of the caption.
backgroundEnabledbooleanWhether to include a default background with the export. (
falseindicates that the background should be transparent)legendEnabledbooleanWhether to include a legend in the export.
legendPositionLegendPositionWhich side the legend should appear on.
Values of
LegendPositionTOP
BOTTOM
LEFT
RIGHT
legendFontSizeintegerFont size of the legend.
legendFontColorstringFont color of the legend.
legendPlacementLegendPlacementWhere on the chart the legend should be placed.
Values of
LegendPlacementOUTSIDE
INSIDE
rowGapEnabledbooleanWhether rows will be separated.
rowGapSizeintegerThe size of the row gap.
aspectRatioWidthintegerThe relative width of the chart export.
aspectRatioHeightintegerThe relative height of the chart export.
chartTypeThemesChartTypeThemesTheme parameters specific to chart types.
Fields of
ChartTypeThemestimeSeriesTimeSeriesChartThemeThe theme specific to parameters of the time series chart.
Set
typeto"v1".v1TimeSeriesChartThemeV1
Fields of
TimeSeriesChartThemeV1xAxisTickFontSizeintegerThe font size of the x-axis ticks.
xAxisTickFontColorstringThe font color of the x-axis ticks.
yAxisTitleFontSizeintegerThe font size of the y-axis labels.
yAxisTickFontSizeintegerThe font size of the y-axis ticks.
thresholdLineWidthintegerThe line thickness in px of the threshold line.
Request
curl -X PUT "https://api.gov.nominal.io/api/themes/v1/chart-themes/<chart theme rid>" \
-H "Authorization: Bearer <api key>" \
-H "Content-Type: application/json" \
--data '{
"name": "<name>",
"content": {
"type": "v1",
"v1": {
"titleEnabled": true,
"titleAlignment": "START",
"titleFontSize": 1,
"titleFontColor": "<hex color>",
"captionEnabled": true,
"captionAlignment": "START",
"captionFontSize": 1,
"captionFontColor": "<hex color>",
"backgroundEnabled": true,
"legendEnabled": true,
"legendPosition": "TOP",
"legendFontSize": 1,
"legendFontColor": "<hex color>",
"legendPlacement": "OUTSIDE",
"rowGapEnabled": true,
"aspectRatioWidth": 1,
"aspectRatioHeight": 1,
"chartTypeThemes": {
"timeSeries": {
"type": "v1",
"v1": {
"xAxisTickFontSize": 1,
"xAxisTickFontColor": "<hex color>",
"yAxisTitleFontSize": 1,
"yAxisTickFontSize": 1
}
}
}
}
}
}'
import requests
response = requests.put(
"https://api.gov.nominal.io/api/themes/v1/chart-themes/<chart theme rid>",
headers={"Authorization": "Bearer <api key>"},
json={
"name": "<name>",
"content": {
"type": "v1",
"v1": {
"titleEnabled": True,
"titleAlignment": "START",
"titleFontSize": 1,
"titleFontColor": "<hex color>",
"captionEnabled": True,
"captionAlignment": "START",
"captionFontSize": 1,
"captionFontColor": "<hex color>",
"backgroundEnabled": True,
"legendEnabled": True,
"legendPosition": "TOP",
"legendFontSize": 1,
"legendFontColor": "<hex color>",
"legendPlacement": "OUTSIDE",
"rowGapEnabled": True,
"aspectRatioWidth": 1,
"aspectRatioHeight": 1,
"chartTypeThemes": {
"timeSeries": {
"type": "v1",
"v1": {
"xAxisTickFontSize": 1,
"xAxisTickFontColor": "<hex color>",
"yAxisTitleFontSize": 1,
"yAxisTickFontSize": 1,
},
},
},
},
},
},
)
response.raise_for_status()
print(response.json())
import httpx
response = httpx.put(
"https://api.gov.nominal.io/api/themes/v1/chart-themes/<chart theme rid>",
headers={"Authorization": "Bearer <api key>"},
json={
"name": "<name>",
"content": {
"type": "v1",
"v1": {
"titleEnabled": True,
"titleAlignment": "START",
"titleFontSize": 1,
"titleFontColor": "<hex color>",
"captionEnabled": True,
"captionAlignment": "START",
"captionFontSize": 1,
"captionFontColor": "<hex color>",
"backgroundEnabled": True,
"legendEnabled": True,
"legendPosition": "TOP",
"legendFontSize": 1,
"legendFontColor": "<hex color>",
"legendPlacement": "OUTSIDE",
"rowGapEnabled": True,
"aspectRatioWidth": 1,
"aspectRatioHeight": 1,
"chartTypeThemes": {
"timeSeries": {
"type": "v1",
"v1": {
"xAxisTickFontSize": 1,
"xAxisTickFontColor": "<hex color>",
"yAxisTitleFontSize": 1,
"yAxisTickFontSize": 1,
},
},
},
},
},
},
)
response.raise_for_status()
print(response.json())
import asyncio
import aiohttp
async def main() -> None:
async with aiohttp.ClientSession() as session:
async with session.put(
"https://api.gov.nominal.io/api/themes/v1/chart-themes/<chart theme rid>",
headers={"Authorization": "Bearer <api key>"},
json={
"name": "<name>",
"content": {
"type": "v1",
"v1": {
"titleEnabled": True,
"titleAlignment": "START",
"titleFontSize": 1,
"titleFontColor": "<hex color>",
"captionEnabled": True,
"captionAlignment": "START",
"captionFontSize": 1,
"captionFontColor": "<hex color>",
"backgroundEnabled": True,
"legendEnabled": True,
"legendPosition": "TOP",
"legendFontSize": 1,
"legendFontColor": "<hex color>",
"legendPlacement": "OUTSIDE",
"rowGapEnabled": True,
"aspectRatioWidth": 1,
"aspectRatioHeight": 1,
"chartTypeThemes": {
"timeSeries": {
"type": "v1",
"v1": {
"xAxisTickFontSize": 1,
"xAxisTickFontColor": "<hex color>",
"yAxisTitleFontSize": 1,
"yAxisTickFontSize": 1,
},
},
},
},
},
},
) as response:
response.raise_for_status()
print(await response.json())
asyncio.run(main())
Response: 200
{
"rid": "<chart theme rid>",
"name": "<name>",
"createdBy": "<created by>",
"createdAt": "2026-01-01T00:00:00Z",
"updatedBy": "<updated by>",
"updatedAt": "2026-01-01T00:00:00Z",
"content": {
"type": "v1",
"v1": {
"titleEnabled": true,
"titleAlignment": "START",
"titleFontSize": 1,
"titleFontColor": "<hex color>",
"captionEnabled": true,
"captionAlignment": "START",
"captionFontSize": 1,
"captionFontColor": "<hex color>",
"backgroundEnabled": true,
"legendEnabled": true,
"legendPosition": "TOP",
"legendFontSize": 1,
"legendFontColor": "<hex color>",
"legendPlacement": "OUTSIDE",
"rowGapEnabled": true,
"rowGapSize": 1,
"aspectRatioWidth": 1,
"aspectRatioHeight": 1,
"chartTypeThemes": {
"timeSeries": {
"type": "v1",
"v1": {
"xAxisTickFontSize": 1,
"xAxisTickFontColor": "<hex color>",
"yAxisTitleFontSize": 1,
"yAxisTickFontSize": 1,
"thresholdLineWidth": 1
}
}
}
}
}
}
Delete chart theme#
DELETE /themes/v1/chart-themes/{chartThemeRid}
Delete an existing comment.
Path parameters
chartThemeRidstring (RID) requiredThe RID of chart theme to delete.
Response
No content (HTTP 204).
Request
curl -X DELETE "https://api.gov.nominal.io/api/themes/v1/chart-themes/<chart theme rid>" \
-H "Authorization: Bearer <api key>"
import requests
response = requests.delete(
"https://api.gov.nominal.io/api/themes/v1/chart-themes/<chart theme rid>",
headers={"Authorization": "Bearer <api key>"},
)
response.raise_for_status()
import httpx
response = httpx.delete(
"https://api.gov.nominal.io/api/themes/v1/chart-themes/<chart theme rid>",
headers={"Authorization": "Bearer <api key>"},
)
response.raise_for_status()
import asyncio
import aiohttp
async def main() -> None:
async with aiohttp.ClientSession() as session:
async with session.delete(
"https://api.gov.nominal.io/api/themes/v1/chart-themes/<chart theme rid>",
headers={"Authorization": "Bearer <api key>"},
) as response:
response.raise_for_status()
asyncio.run(main())
Response: 204
No content.
Errors#
Errors shows how these errors are sent.
Each error’s errorName is Themes: followed by its name below.
Status |
Name |
Notes |
|---|---|---|
400 |
|
|
404 |
|
|
409 |
|
Types#
ChartTheme#
ridstring (RID) requiredUnique resource identifier for the theme.
namestring requiredThe name of the theme as defined by the user.
createdBystring (RID) requiredThe rid of the user who first created the theme.
createdAtstring (date-time) requiredThe time the theme was created.
updatedBystring (RID)The rid of the user who last updated the theme.
updatedAtstring (date-time)The rid of the user who last updated the theme.
contentChartThemeContentrequiredSpecifies the chart theme styling (e.g. font, legends, axes)
ChartThemeContent#
Set type to the name of one of the other fields, and set only that field.
ChartThemeContentV1#
titleEnabledboolean requiredWhether to show a title in the export.
titleAlignmentTextAlignmentrequiredHow to align the text of the title.
titleFontSizeinteger requiredFont size of the title.
titleFontColorstring requiredFont color of the title.
captionEnabledboolean requiredWhether to show a caption in the export.
captionAlignmentTextAlignmentrequiredHow to align the text of the caption.
captionFontSizeinteger requiredFont size of the caption.
captionFontColorstring requiredFont color of the caption.
backgroundEnabledboolean requiredWhether to include a default background with the export. (
falseindicates that the background should be transparent)legendEnabledboolean requiredWhether to include a legend in the export.
legendPositionLegendPositionrequiredWhich side the legend should appear on.
legendFontSizeinteger requiredFont size of the legend.
legendFontColorstring requiredFont color of the legend.
legendPlacementLegendPlacementrequiredWhere on the chart the legend should be placed.
rowGapEnabledboolean requiredWhether rows will be separated.
rowGapSizeintegerThe size of the row gap.
aspectRatioWidthinteger requiredThe relative width of the chart export.
aspectRatioHeightinteger requiredThe relative height of the chart export.
chartTypeThemesChartTypeThemesrequiredTheme parameters specific to chart types.
ChartTypeThemes#
Theme parameters specific to chart types.
timeSeriesTimeSeriesChartThemerequiredThe theme specific to parameters of the time series chart.
LegendPlacement#
OUTSIDE
INSIDE
LegendPosition#
TOP
BOTTOM
LEFT
RIGHT
TextAlignment#
START
END
CENTER
JUSTIFY
TimeSeriesChartTheme#
Set type to the name of one of the other fields, and set only that field.
TimeSeriesChartThemeV1#
Theme parameters specific to the time series chart.
xAxisTickFontSizeinteger requiredThe font size of the x-axis ticks.
xAxisTickFontColorstring requiredThe font color of the x-axis ticks.
yAxisTitleFontSizeinteger requiredThe font size of the y-axis labels.
yAxisTickFontSizeinteger requiredThe font size of the y-axis ticks.
thresholdLineWidthintegerThe line thickness in px of the threshold line.
Page design based on Scalar, MIT License.