Moves charts into a folder
PATCH
https://api.datawrapper.de/v3/charts Requires scopes chart:write.
Example Request
curl --request PATCH \
--url https://api.datawrapper.de/v3/charts \
--header 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
--header 'Content-Type: application/json' \
--data '{
"ids": [
"string"
],
"patch": {
"folderId": 0,
"teamId": "ABCdEFgh",
"workspace": "my-workspace"
}
}'Headers
| Name | Value | Required | Description |
|---|---|---|---|
Content-Type | application/json | Yes | The format of the request body. |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
ids | string[] | Yes | The IDs of the charts that should be updated. |
patch | object | Yes | An object containing the chart attributes that should be updated. |
patch.folderId | number | Yes | ID of the folder that the visualization should be moved into. The authenticated user must have access to this folder. |
patch.teamId | string | No | ID of the team that should own the visualization. The authenticated user must have access to this team. |
patch.workspace | string | No | Slug of the workspace that the visualization should be moved into. The authenticated user must have access to this workspace. |
Response
Returns an array of objects with the following fields:
| Field | Type | Required | Description |
|---|---|---|---|
id | string | No | ID of the visualization |
title | string | No | Title of the visualization |
publicId | string | No | Public ID of the visualization. May be different from the internal ID, if *hash publishing* is enabled. |
authorId | integer | No | ID of user that created the visualization. |
organizationId | string | No | ID of the team that the visualization is located in. If null, visualization is private. |
folderId | integer | No | ID of the folder that the visualization is located in. If null, visualization is in the root of a team, or your private archive. |
folder | object | No | |
folder.name | string | No | User-defined folder name |
language | string | No | Visualization language (output locale), e.g en-US |
theme | string | No | ID of theme applied to the visualization |
type | string | No | Type of visualization, e.g d3-lines, d3-maps-choropleth, tables |
createdAt | string | No | Time and date when the visualization was created. |
lastModifiedAt | string | No | Time and date when the visualization was last edited. |
publishedAt | string | No | Time and date when the visualization was last published. null, if the visualization has not been published yet. |
lastEditStep | integer | No | A number encoding which of the editor steps this chart has been edited in so far. 5 = published. |
publicVersion | integer | No | Indicates how many times a visualization has been published. |
author | object | No | |
author.name | string | No | Name of the user who created the visualization |
author.email | string | No | Email address of the user who created the visualization |
author.avatar | string | No | URL pointing to the user avatar |
author.color | string | No | Color chosen by the user |
thumbnails | object | No | |
thumbnails.full | string | No | URL pointing to the most recently generated preview thumbnail for the visualization. (Image includes header & footer). |
thumbnails.plain | string | No | URL pointing to the most recently generated preview thumbnail for the visualization. (Image is just the visualization, without header & footer). |
url | string | No | API URL for the visualization, can be used to retreive additional information, including its metadata. |
guestSession | string | No | Guest session id |
downloadImageFilename | string | No | Download image filename |
downloadDataFilename | string | No | Download data filename |
sourceImageFilenames | object | No | Source image filenames |
sourceImageFilenames.png | string | No | |
sourceImageFilenames.svg | string | No | |
sourceImageFilenames.pdf | string | No | |
readonlyKeys | string[] | No | |
openComments | integer | No | Number of comments on the visualization |
workspaceTeamSettings | object | No | Frontend-allowed team and workspace settings |
deletionInDays | number | No | Number of days until the visualization will be permanently deleted. |
deletedBy | object | No | User who moved the visualization to the trash. |
deletedBy.name | string | No | Name of the user who moved the visualization to the trash. |
deletedBy.email | string | No | Email address of the user who moved the visualization to the trash. |
deletedBy.avatar | string | No | URL pointing to the user avatar |
deletedBy.color | string | No | Color chosen by the user |
publicUrl | string | No | URL of published visualization. |
deleted | boolean | No | |
deletedAt | string | No | Time and date when the visualization was deleted. |
forkable | boolean | No | Indicates if the visualization has been shared in the Datawrapper River. |
isFork | boolean | No | Indicates if the visualization is a copy of another visualization. |
forkedFrom | string | No | ID of the visualization that this visualization was copied from. null if it is not a copy. |
externalData | string | No | External data URL, relevant for live visualizations. |
metadata | object | No | All of the visualization's settings. |
chartHash | string | No | Hash of the visualization's metadata. |
customFields | object | No | |
keywords | string | No | Keywords |
utf8 | boolean | No | UTF-8 |
river | object | No | |
river.source | string | No | |
river.sourceUrl | string | No | |
basedOnByline | string | No | |
workspace | string | No |