package_patch
Patch a dataset (package).
The difference between the update and patch methods is that the patch will perform an update of the provided parameters, while leaving all other parameters unchanged, whereas the update methods deletes all parameters not explicitly provided in the data_dict.
To partially update resources or other metadata not at the top level of a package use package_revise() instead to maintain existing nested values.
You must be authorized to edit the dataset and the groups that it belongs to.
apiTokenHeaderAuthorization<token>CKAN API token
multipart/form-data- body
id?stringthe name or id of the dataset
name?stringthe name of the new dataset, must be between 2 and 100 characters long and contain only lowercase alphanumeric characters, - and _
title?stringthe title of the dataset (default: same as name)
private?booleanif True creates a private dataset
author?stringthe name of the dataset's author
author_email?stringthe email address of the dataset's author
maintainer?stringthe name of the dataset's maintainer
maintainer_email?stringthe email address of the dataset's maintainer
license_id?stringthe id of the dataset's license, see license_list() for available values
notes?stringa description of the dataset
url?stringa URL for the dataset's source
version?stringno longer than 100 characters
state?stringthe current state of the dataset, e.g. 'active' or 'deleted', only active datasets show up in search results and other lists of datasets, thsi parameter will be ignored if you are not authorized to change the state of the dataset (default: 'active')
type?stringthe type of the dataset, IDatasetForm plugins associate themselves with different dataset types and provide custom dataset handling behaviour for these types
resources?array<>the dataset's resources
tags?array<>the dataset's tags
extras?array<>the dataset's extras, extras are arbitrary (key: value) metadata items that can be added to datasets, each extra dictionary should have keys 'key' (a string), 'value' (a string)
plugin_data?Private package data belonging to plugins. Only sysadmin users may set this value. It should be a dict that can be dumped into JSON, and plugins should namespace their data with the plugin name to avoid collisions with other plugins, e.g.:
{ "name": "test-dataset", "plugin_data": { "plugin1": {"key1": "value1"}, "plugin2": {"key2": "value2"} }}relationships_as_object?array<>list of relationship dictionaries
relationships_as_subject?array<>list of relationship dictionaries
groups?array<>the groups to which the dataset belongs, each group dictionary should have one or more of the following keys which identify an existing group: 'id' (the id of the group, string), or 'name' (the name of the group, string), to see which groups exist call group_list()
owner_org?stringthe id of the dataset's owning organization, see organization_list() or organization_list_for_user() for available values. This parameter can be made optional if the config option ckan.auth.create_unowned_dataset is set to True.
curl -X PATCH 'http://localhost:5000/api/3/action/package_patch'