ckan.logic.action.delete

Functions for deleting data from CKAN.

ckan.logic.action.delete.package_delete(context, data_dict)

Delete a dataset (package).

You must be authorized to delete the dataset.

Parameters:id (string) – the id or name of the dataset to delete
ckan.logic.action.delete.resource_delete(context, data_dict)

Delete a resource from a dataset.

You must be a sysadmin or the owner of the resource to delete it.

Parameters:id (string) – the id of the resource
ckan.logic.action.delete.package_relationship_delete(context, data_dict)

Delete a dataset (package) relationship.

You must be authorised to delete dataset relationships, and to edit both the subject and the object datasets.

Parameters:
  • subject (string) – the id or name of the dataset that is the subject of the relationship
  • object (string) – the id or name of the dataset that is the object of the relationship
  • type (string) – the type of the relationship
ckan.logic.action.delete.related_delete(context, data_dict)

Delete a related item from a dataset.

You must be a sysadmin or the owner of the related item to delete it.

Parameters:id (string) – the id of the related item
ckan.logic.action.delete.member_delete(context, data_dict=None)

Remove an object (e.g. a user, dataset or group) from a group.

You must be authorized to edit a group to remove objects from it.

Parameters:
  • id (string) – the id of the group
  • object (string) – the id of the object to be removed
  • object_type (string) – the type of the object to be removed, e.g. package or user
ckan.logic.action.delete.group_delete(context, data_dict)

Delete a group.

You must be authorized to delete the group.

Parameters:id (string) – the name or id of the group
ckan.logic.action.delete.organization_delete(context, data_dict)

Delete a organization.

You must be authorized to delete the organization.

Parameters:id (string) – the name or id of the organization
ckan.logic.action.delete.task_status_delete(context, data_dict)

Delete a task status.

You must be a sysadmin to delete task statuses.

Parameters:id (string) – the id of the task status to delete
ckan.logic.action.delete.vocabulary_delete(context, data_dict)

Delete a tag vocabulary.

You must be a sysadmin to delete vocabularies.

Parameters:id (string) – the id of the vocabulary
ckan.logic.action.delete.tag_delete(context, data_dict)

Delete a tag.

You must be a sysadmin to delete tags.

Parameters:
  • id (string) – the id or name of the tag
  • vocabulary_id (string) – the id or name of the vocabulary that the tag belongs to (optional, default: None)
ckan.logic.action.delete.unfollow_user(context, data_dict)

Stop following a user.

Parameters:id (string) – the id or name of the user to stop following
ckan.logic.action.delete.unfollow_dataset(context, data_dict)

Stop following a dataset.

Parameters:id (string) – the id or name of the dataset to stop following
ckan.logic.action.delete.unfollow_group(context, data_dict)

Stop following a group.

Parameters:id (string) – the id or name of the group to stop following