organization_create {ckanr} | R Documentation |
Create an organization
Description
Create an organization
Usage
organization_create(
name = NULL,
id = NULL,
title = NULL,
description = NULL,
image_url = NULL,
state = "active",
approval_status = NULL,
extras = NULL,
packages = NULL,
users = NULL,
url = get_default_url(),
key = get_default_key(),
as = "list",
...
)
Arguments
name |
(character) the name of the organization, a string between 2 and 100 characters long, containing only lowercase alphanumeric characters,
|
id |
the id of the organization (optional) |
title |
(character) the title of the organization (optional) |
description |
(character) the description of the organization (optional) |
image_url |
(character) the URL to an image to be displayed on the organization's page (optional) |
state |
(character) the current state of the organization, e.g. 'active' or 'deleted', only active organization show up in search results and other lists of organization, this parameter will be ignored if you are not authorized to change the state of the organization (optional). Default: 'active' |
approval_status |
(character) Approval status |
extras |
The organization's extras (optional), extras are arbitrary
(key: value) metadata items that can be added to organizations, each extra
dictionary should have keys 'key' (a string), 'value' (a string)
|
packages |
(list of dictionaries) the datasets (packages) that belong to the organization, a list of dictionaries each with keys 'name' (string, the id or name of the dataset) and optionally 'title' (string, the title of the dataset) |
users |
(character) the users that belong to the organization, a list of dictionaries each with key 'name' (string, the id or name of the user) and optionally 'capacity' (string, the capacity in which the user is a member of the organization) |
url |
Base url to use. Default: https://data.ontario.ca/ See
also |
key |
A privileged CKAN API key, Default: your key set with
|
as |
(character) One of list (default), table, or json. Parsing with
table option uses |
... |
Curl args passed on to |
Examples
## Not run:
# Setup
ckanr_setup(url = "https://demo.ckan.org/", key = getOption("ckan_demo_key"))
# create an organization
(res <- organization_create("foobar", title = "Foo bars",
description = "love foo bars"))
res$name
## End(Not run)