mirror of
https://github.com/dathere/ckanaction.git
synced 2025-12-18 08:19:26 +00:00
Compare commits
3 commits
5adb611c85
...
e13124ee42
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e13124ee42 | ||
|
|
6d843632ff | ||
|
|
20c5d749d8 |
18 changed files with 857 additions and 54 deletions
20
docs/content/docs/group_list.mdx
Normal file
20
docs/content/docs/group_list.mdx
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
title: group_list
|
||||
full: true
|
||||
_openapi:
|
||||
method: POST
|
||||
route: group_list
|
||||
toc: []
|
||||
structuredData:
|
||||
headings: []
|
||||
contents:
|
||||
- content: |
|
||||
Return a list of the names of the site's groups.
|
||||
---
|
||||
|
||||
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
|
||||
|
||||
Return a list of the names of the site's groups.
|
||||
|
||||
|
||||
<APIPage document={"./lib/openapi.yml"} operations={[{"path":"group_list","method":"post"}]} webhooks={[]} hasHead={false} />
|
||||
20
docs/content/docs/group_list_authz.mdx
Normal file
20
docs/content/docs/group_list_authz.mdx
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
title: group_list_authz
|
||||
full: true
|
||||
_openapi:
|
||||
method: POST
|
||||
route: group_list_authz
|
||||
toc: []
|
||||
structuredData:
|
||||
headings: []
|
||||
contents:
|
||||
- content: |
|
||||
Return the list of groups that the user is authorized to edit.
|
||||
---
|
||||
|
||||
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
|
||||
|
||||
Return the list of groups that the user is authorized to edit.
|
||||
|
||||
|
||||
<APIPage document={"./lib/openapi.yml"} operations={[{"path":"group_list_authz","method":"post"}]} webhooks={[]} hasHead={false} />
|
||||
18
docs/content/docs/group_package_show.mdx
Normal file
18
docs/content/docs/group_package_show.mdx
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
title: group_package_show
|
||||
full: true
|
||||
_openapi:
|
||||
method: POST
|
||||
route: group_package_show
|
||||
toc: []
|
||||
structuredData:
|
||||
headings: []
|
||||
contents:
|
||||
- content: Return the datasets (packages) of a group.
|
||||
---
|
||||
|
||||
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
|
||||
|
||||
Return the datasets (packages) of a group.
|
||||
|
||||
<APIPage document={"./lib/openapi.yml"} operations={[{"path":"group_package_show","method":"post"}]} webhooks={[]} hasHead={false} />
|
||||
20
docs/content/docs/group_show.mdx
Normal file
20
docs/content/docs/group_show.mdx
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
title: group_show
|
||||
full: true
|
||||
_openapi:
|
||||
method: POST
|
||||
route: group_show
|
||||
toc: []
|
||||
structuredData:
|
||||
headings: []
|
||||
contents:
|
||||
- content: >-
|
||||
Return the details of a group (only its first 1000 datasets are
|
||||
returned).
|
||||
---
|
||||
|
||||
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
|
||||
|
||||
Return the details of a group (only its first 1000 datasets are returned).
|
||||
|
||||
<APIPage document={"./lib/openapi.yml"} operations={[{"path":"group_show","method":"post"}]} webhooks={[]} hasHead={false} />
|
||||
20
docs/content/docs/license_list.mdx
Normal file
20
docs/content/docs/license_list.mdx
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
title: license_list
|
||||
full: true
|
||||
_openapi:
|
||||
method: POST
|
||||
route: license_list
|
||||
toc: []
|
||||
structuredData:
|
||||
headings: []
|
||||
contents:
|
||||
- content: |
|
||||
Return the list of licenses available for datasets on the site.
|
||||
---
|
||||
|
||||
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
|
||||
|
||||
Return the list of licenses available for datasets on the site.
|
||||
|
||||
|
||||
<APIPage document={"./lib/openapi.yml"} operations={[{"path":"license_list","method":"post"}]} webhooks={[]} hasHead={false} />
|
||||
20
docs/content/docs/organization_list.mdx
Normal file
20
docs/content/docs/organization_list.mdx
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
title: organization_list
|
||||
full: true
|
||||
_openapi:
|
||||
method: POST
|
||||
route: organization_list
|
||||
toc: []
|
||||
structuredData:
|
||||
headings: []
|
||||
contents:
|
||||
- content: |
|
||||
Return a list of the names of the site's organizations.
|
||||
---
|
||||
|
||||
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
|
||||
|
||||
Return a list of the names of the site's organizations.
|
||||
|
||||
|
||||
<APIPage document={"./lib/openapi.yml"} operations={[{"path":"organization_list","method":"post"}]} webhooks={[]} hasHead={false} />
|
||||
58
docs/content/docs/organization_list_for_user.mdx
Normal file
58
docs/content/docs/organization_list_for_user.mdx
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
---
|
||||
title: organization_list_for_user
|
||||
full: true
|
||||
_openapi:
|
||||
method: POST
|
||||
route: organization_list_for_user
|
||||
toc: []
|
||||
structuredData:
|
||||
headings: []
|
||||
contents:
|
||||
- content: >
|
||||
Return the organizations that the user has a given permission for.
|
||||
|
||||
|
||||
Specifically it returns the list of organizations that the currently
|
||||
authorized user has a given permission (for example: "manage_group")
|
||||
against.
|
||||
|
||||
|
||||
By default this returns the list of organizations that the currently
|
||||
authorized user is member of, in any capacity.
|
||||
|
||||
|
||||
When a user becomes a member of an organization in CKAN they're given
|
||||
a "capacity" (sometimes called a "role"), for example "member",
|
||||
"editor" or "admin".
|
||||
|
||||
|
||||
Each of these roles has certain permissions associated with it. For
|
||||
example the admin role has the "admin" permission (which means they
|
||||
have permission to do anything). The editor role has permissions like
|
||||
"create_dataset", "update_dataset" and "delete_dataset". The member
|
||||
role has the "read" permission.
|
||||
|
||||
|
||||
This function returns the list of organizations that the authorized
|
||||
user has a given permission for. For example the list of organizations
|
||||
that the user is an admin of, or the list of organizations that the
|
||||
user can create datasets in. This takes account of when permissions
|
||||
cascade down an organization hierarchy.
|
||||
---
|
||||
|
||||
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
|
||||
|
||||
Return the organizations that the user has a given permission for.
|
||||
|
||||
Specifically it returns the list of organizations that the currently authorized user has a given permission (for example: "manage_group") against.
|
||||
|
||||
By default this returns the list of organizations that the currently authorized user is member of, in any capacity.
|
||||
|
||||
When a user becomes a member of an organization in CKAN they're given a "capacity" (sometimes called a "role"), for example "member", "editor" or "admin".
|
||||
|
||||
Each of these roles has certain permissions associated with it. For example the admin role has the "admin" permission (which means they have permission to do anything). The editor role has permissions like "create_dataset", "update_dataset" and "delete_dataset". The member role has the "read" permission.
|
||||
|
||||
This function returns the list of organizations that the authorized user has a given permission for. For example the list of organizations that the user is an admin of, or the list of organizations that the user can create datasets in. This takes account of when permissions cascade down an organization hierarchy.
|
||||
|
||||
|
||||
<APIPage document={"./lib/openapi.yml"} operations={[{"path":"organization_list_for_user","method":"post"}]} webhooks={[]} hasHead={false} />
|
||||
20
docs/content/docs/organization_show.mdx
Normal file
20
docs/content/docs/organization_show.mdx
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
title: organization_show
|
||||
full: true
|
||||
_openapi:
|
||||
method: POST
|
||||
route: organization_show
|
||||
toc: []
|
||||
structuredData:
|
||||
headings: []
|
||||
contents:
|
||||
- content: >-
|
||||
Return the details of an organization (only its first 10 datasets are
|
||||
returned).
|
||||
---
|
||||
|
||||
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
|
||||
|
||||
Return the details of an organization (only its first 10 datasets are returned).
|
||||
|
||||
<APIPage document={"./lib/openapi.yml"} operations={[{"path":"organization_show","method":"post"}]} webhooks={[]} hasHead={false} />
|
||||
20
docs/content/docs/package_relationships_list.mdx
Normal file
20
docs/content/docs/package_relationships_list.mdx
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
title: package_relationships_list
|
||||
full: true
|
||||
_openapi:
|
||||
method: POST
|
||||
route: package_relationships_list
|
||||
toc: []
|
||||
structuredData:
|
||||
headings: []
|
||||
contents:
|
||||
- content: |
|
||||
Return a datset's relationships.
|
||||
---
|
||||
|
||||
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
|
||||
|
||||
Return a datset's relationships.
|
||||
|
||||
|
||||
<APIPage document={"./lib/openapi.yml"} operations={[{"path":"package_relationships_list","method":"post"}]} webhooks={[]} hasHead={false} />
|
||||
|
|
@ -29,7 +29,7 @@ _openapi:
|
|||
|
||||
The following advanced Solr parameters are supported as well. Note
|
||||
that some of these are only available on particular Solr versions. See
|
||||
Solr’s dismax and edismax documentation for further details on them:
|
||||
Solr's dismax and edismax documentation for further details on them:
|
||||
|
||||
|
||||
`qf`, `wt`, `bf`, `boost`, `tie`, `defType`, `mm`
|
||||
|
|
@ -44,6 +44,18 @@ _openapi:
|
|||
- `fq=tags:economy` datasets with the tag *economy*
|
||||
|
||||
- `facet.field=["tags"] facet.limit=10 rows=0` top 10 tags
|
||||
|
||||
|
||||
<Callout title="Title" type="error">
|
||||
|
||||
There is an issue for the Body dropdown within this UI where an empty
|
||||
object `{}` is set for the `facet` field.
|
||||
|
||||
|
||||
Please either remove this field by clicking "Open JSON editor" in the
|
||||
Body dropdown or set it to `true` (the default value) or `false`.
|
||||
|
||||
</Callout>
|
||||
---
|
||||
|
||||
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
|
||||
|
|
@ -58,7 +70,7 @@ For more in depth treatment of each parameter, please read the [Solr Documentati
|
|||
|
||||
This action accepts a subset of Solr's search query parameters.
|
||||
|
||||
The following advanced Solr parameters are supported as well. Note that some of these are only available on particular Solr versions. See Solr’s dismax and edismax documentation for further details on them:
|
||||
The following advanced Solr parameters are supported as well. Note that some of these are only available on particular Solr versions. See Solr's dismax and edismax documentation for further details on them:
|
||||
|
||||
`qf`, `wt`, `bf`, `boost`, `tie`, `defType`, `mm`
|
||||
|
||||
|
|
@ -68,5 +80,11 @@ Examples:
|
|||
- `fq=tags:economy` datasets with the tag *economy*
|
||||
- `facet.field=["tags"] facet.limit=10 rows=0` top 10 tags
|
||||
|
||||
<Callout title="Title" type="error">
|
||||
There is an issue for the Body dropdown within this UI where an empty object `{}` is set for the `facet` field.
|
||||
|
||||
Please either remove this field by clicking "Open JSON editor" in the Body dropdown or set it to `true` (the default value) or `false`.
|
||||
</Callout>
|
||||
|
||||
|
||||
<APIPage document={"./lib/openapi.yml"} operations={[{"path":"package_search","method":"post"}]} webhooks={[]} hasHead={false} />
|
||||
18
docs/content/docs/resource_show.mdx
Normal file
18
docs/content/docs/resource_show.mdx
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
title: resource_show
|
||||
full: true
|
||||
_openapi:
|
||||
method: POST
|
||||
route: resource_show
|
||||
toc: []
|
||||
structuredData:
|
||||
headings: []
|
||||
contents:
|
||||
- content: Return the metadata of a resource.
|
||||
---
|
||||
|
||||
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
|
||||
|
||||
Return the metadata of a resource.
|
||||
|
||||
<APIPage document={"./lib/openapi.yml"} operations={[{"path":"resource_show","method":"post"}]} webhooks={[]} hasHead={false} />
|
||||
18
docs/content/docs/resource_view_list.mdx
Normal file
18
docs/content/docs/resource_view_list.mdx
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
title: resource_view_list
|
||||
full: true
|
||||
_openapi:
|
||||
method: POST
|
||||
route: resource_view_list
|
||||
toc: []
|
||||
structuredData:
|
||||
headings: []
|
||||
contents:
|
||||
- content: Return the list of resource views for a particular resource.
|
||||
---
|
||||
|
||||
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
|
||||
|
||||
Return the list of resource views for a particular resource.
|
||||
|
||||
<APIPage document={"./lib/openapi.yml"} operations={[{"path":"resource_view_list","method":"post"}]} webhooks={[]} hasHead={false} />
|
||||
18
docs/content/docs/resource_view_show.mdx
Normal file
18
docs/content/docs/resource_view_show.mdx
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
title: resource_view_show
|
||||
full: true
|
||||
_openapi:
|
||||
method: POST
|
||||
route: resource_view_show
|
||||
toc: []
|
||||
structuredData:
|
||||
headings: []
|
||||
contents:
|
||||
- content: Return the metadata of a resource_view.
|
||||
---
|
||||
|
||||
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
|
||||
|
||||
Return the metadata of a resource_view.
|
||||
|
||||
<APIPage document={"./lib/openapi.yml"} operations={[{"path":"resource_view_show","method":"post"}]} webhooks={[]} hasHead={false} />
|
||||
27
docs/content/docs/tag_list.mdx
Normal file
27
docs/content/docs/tag_list.mdx
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
---
|
||||
title: tag_list
|
||||
full: true
|
||||
_openapi:
|
||||
method: POST
|
||||
route: tag_list
|
||||
toc: []
|
||||
structuredData:
|
||||
headings: []
|
||||
contents:
|
||||
- content: >
|
||||
Return a list of the site's tags.
|
||||
|
||||
|
||||
By default only free tags (tags that don't belong to a vocabulary) are
|
||||
returned. If the `vocabulary_id` argument is given then only tags
|
||||
belonging to that vocabulary will be returned instead.
|
||||
---
|
||||
|
||||
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
|
||||
|
||||
Return a list of the site's tags.
|
||||
|
||||
By default only free tags (tags that don't belong to a vocabulary) are returned. If the `vocabulary_id` argument is given then only tags belonging to that vocabulary will be returned instead.
|
||||
|
||||
|
||||
<APIPage document={"./lib/openapi.yml"} operations={[{"path":"tag_list","method":"post"}]} webhooks={[]} hasHead={false} />
|
||||
18
docs/content/docs/tag_show.mdx
Normal file
18
docs/content/docs/tag_show.mdx
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
title: tag_show
|
||||
full: true
|
||||
_openapi:
|
||||
method: POST
|
||||
route: tag_show
|
||||
toc: []
|
||||
structuredData:
|
||||
headings: []
|
||||
contents:
|
||||
- content: Return the details of a tag and all its datasets.
|
||||
---
|
||||
|
||||
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
|
||||
|
||||
Return the details of a tag and all its datasets.
|
||||
|
||||
<APIPage document={"./lib/openapi.yml"} operations={[{"path":"tag_show","method":"post"}]} webhooks={[]} hasHead={false} />
|
||||
20
docs/content/docs/user_list.mdx
Normal file
20
docs/content/docs/user_list.mdx
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
title: user_list
|
||||
full: true
|
||||
_openapi:
|
||||
method: POST
|
||||
route: user_list
|
||||
toc: []
|
||||
structuredData:
|
||||
headings: []
|
||||
contents:
|
||||
- content: |
|
||||
Return a list of the site's user accounts.
|
||||
---
|
||||
|
||||
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
|
||||
|
||||
Return a list of the site's user accounts.
|
||||
|
||||
|
||||
<APIPage document={"./lib/openapi.yml"} operations={[{"path":"user_list","method":"post"}]} webhooks={[]} hasHead={false} />
|
||||
24
docs/content/docs/user_show.mdx
Normal file
24
docs/content/docs/user_show.mdx
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
title: user_show
|
||||
full: true
|
||||
_openapi:
|
||||
method: POST
|
||||
route: user_show
|
||||
toc: []
|
||||
structuredData:
|
||||
headings: []
|
||||
contents:
|
||||
- content: |
|
||||
Return a user account.
|
||||
|
||||
Either the `id` should be passed or the user should be logged in.
|
||||
---
|
||||
|
||||
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
|
||||
|
||||
Return a user account.
|
||||
|
||||
Either the `id` should be passed or the user should be logged in.
|
||||
|
||||
|
||||
<APIPage document={"./lib/openapi.yml"} operations={[{"path":"user_show","method":"post"}]} webhooks={[]} hasHead={false} />
|
||||
|
|
@ -115,7 +115,477 @@ paths:
|
|||
capacity:
|
||||
type: string
|
||||
description: if provided, only datasets where the user has this capacity are returned
|
||||
'status_show':
|
||||
'group_list':
|
||||
post:
|
||||
operationId: group_list
|
||||
summary: group_list
|
||||
description: |
|
||||
Return a list of the names of the site's groups.
|
||||
requestBody:
|
||||
required: false
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
description: "the type of group to list (default: `'group'`), see docs for `IGroupForm`"
|
||||
sort:
|
||||
type: string
|
||||
description: "sorting of the search results. Default: \"title asc\" string of field name and sort-order. The allowed fields are 'name', 'package_count' and 'title'"
|
||||
limit:
|
||||
type: integer
|
||||
description: "the maximum number of groups returned. Default: `1000` when `all_fields=false` unless set in site's configuration `ckan.group_and_organization_list_max`. Default: 25 when `all_fields=true` unless set in site's configuration `ckan.group_and_organization_list_all_fields_max`"
|
||||
offset:
|
||||
type: integer
|
||||
description: "when `limit` is given, the offset to start returning groups from"
|
||||
groups:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: a list of names of the groups to return, if given only groups whose names are in this list will be returned
|
||||
all_fields:
|
||||
type: boolean
|
||||
description: "return group dictionaries instead of just names. Only core fields are returned - get some more using the include_* options. Returning a list of packages is too expensive, so the *packages* property for each group is deprecated, but there is a count of the packages in the *package_count* property. (default: `False`)"
|
||||
include_dataset_count:
|
||||
type: boolean
|
||||
# If `all_fields` is true?
|
||||
description: "if `all_fields`, include the full package_count (default: `True`)"
|
||||
include_extras:
|
||||
type: boolean
|
||||
description: "if `all_fields`, include the group extra fields (default: `False`)"
|
||||
include_tags:
|
||||
type: boolean
|
||||
description: "if `all_fields`, include the group tags"
|
||||
include_groups:
|
||||
type: boolean
|
||||
description: "if `all_fields`, include the groups the groups are in"
|
||||
include_users:
|
||||
type: boolean
|
||||
description: "if `all_fields`, include the group users"
|
||||
'organization_list':
|
||||
post:
|
||||
operationId: organization_list
|
||||
summary: organization_list
|
||||
description: |
|
||||
Return a list of the names of the site's organizations.
|
||||
requestBody:
|
||||
required: false
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
description: "the type of organization to list (default: `'group'`), see docs for `IGroupForm`"
|
||||
sort:
|
||||
type: string
|
||||
description: "sorting of the search results. Default: \"title asc\" string of field name and sort-order. The allowed fields are 'name', 'package_count' and 'title'"
|
||||
limit:
|
||||
type: integer
|
||||
description: "the maximum number of organizations returned. Default: `1000` when `all_fields=false` unless set in site's configuration `ckan.group_and_organization_list_max`. Default: 25 when `all_fields=true` unless set in site's configuration `ckan.group_and_organization_list_all_fields_max`"
|
||||
offset:
|
||||
type: integer
|
||||
description: "when `limit` is given, the offset to start returning organizations from"
|
||||
organizations:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
# Original docs typo seems like they say groups instead of organizations
|
||||
description: a list of names of the organizations to return, if given only organizations whose names are in this list will be returned
|
||||
all_fields:
|
||||
type: boolean
|
||||
# Original docs typo seems like they say group instead of organization
|
||||
description: "return organization dictionaries instead of just names. Only core fields are returned - get some more using the include_* options. Returning a list of packages is too expensive, so the *packages* property for each group is deprecated, but there is a count of the packages in the *package_count* property. (default: `False`)"
|
||||
include_dataset_count:
|
||||
type: boolean
|
||||
# If `all_fields` is true?
|
||||
description: "if `all_fields`, include the full package_count (default: `True`)"
|
||||
include_extras:
|
||||
type: boolean
|
||||
description: "if `all_fields`, include the organization extra fields (default: `False`)"
|
||||
include_tags:
|
||||
type: boolean
|
||||
description: "if `all_fields`, include the organization tags (default: `False`)"
|
||||
include_groups:
|
||||
type: boolean
|
||||
# Modified to organizations instead of groups?
|
||||
description: "if `all_fields`, include the organizations the organizations are in"
|
||||
include_users:
|
||||
type: boolean
|
||||
description: "if `all_fields`, include the organization users"
|
||||
'group_list_authz':
|
||||
post:
|
||||
operationId: group_list_authz
|
||||
summary: group_list_authz
|
||||
description: |
|
||||
Return the list of groups that the user is authorized to edit.
|
||||
requestBody:
|
||||
required: false
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
available_only:
|
||||
type: boolean
|
||||
description: "remove the existing groups in the package (default: `False`)"
|
||||
am_member:
|
||||
type: boolean
|
||||
description: "if `True` return only the groups the logged-in user is a member of, otherwise return all groups that the user is authorized to edit (for example, sysadmin users are authorized to edit all groups) (default: `False`)"
|
||||
'organization_list_for_user':
|
||||
post:
|
||||
operationId: organization_list_for_user
|
||||
summary: organization_list_for_user
|
||||
description: |
|
||||
Return the organizations that the user has a given permission for.
|
||||
|
||||
Specifically it returns the list of organizations that the currently authorized user has a given permission (for example: "manage_group") against.
|
||||
|
||||
By default this returns the list of organizations that the currently authorized user is member of, in any capacity.
|
||||
|
||||
When a user becomes a member of an organization in CKAN they're given a "capacity" (sometimes called a "role"), for example "member", "editor" or "admin".
|
||||
|
||||
Each of these roles has certain permissions associated with it. For example the admin role has the "admin" permission (which means they have permission to do anything). The editor role has permissions like "create_dataset", "update_dataset" and "delete_dataset". The member role has the "read" permission.
|
||||
|
||||
This function returns the list of organizations that the authorized user has a given permission for. For example the list of organizations that the user is an admin of, or the list of organizations that the user can create datasets in. This takes account of when permissions cascade down an organization hierarchy.
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: the name or id of the user to get the organization list for (defaults to the currently authorized user, logged in or via the API key)
|
||||
permission:
|
||||
type: string
|
||||
description: "the permission the user has against the returned organizations, for example `\"read\"` or `\"create_dataset\"` (default: `\"manage_group\"`)"
|
||||
include_dataset_count:
|
||||
type: boolean
|
||||
description: "include the package_count in each org (default: `False`)"
|
||||
'license_list':
|
||||
post:
|
||||
operationId: license_list
|
||||
summary: license_list
|
||||
description: |
|
||||
Return the list of licenses available for datasets on the site.
|
||||
'tag_list':
|
||||
post:
|
||||
operationId: tag_list
|
||||
summary: tag_list
|
||||
description: |
|
||||
Return a list of the site's tags.
|
||||
|
||||
By default only free tags (tags that don't belong to a vocabulary) are returned. If the `vocabulary_id` argument is given then only tags belonging to that vocabulary will be returned instead.
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
query:
|
||||
type: string
|
||||
description: a tag name query to search for, if given only tags whose names contain this string will be returned
|
||||
vocabulary_id:
|
||||
type: string
|
||||
# if "give" maybe should be if "given"?
|
||||
description: the id or name of a vocabulary, if give only tags that belong to this vocabulary will be returned
|
||||
all_fields:
|
||||
type: boolean
|
||||
description: "return full tag dictionaries instead of just names (default: `False`)"
|
||||
'user_list':
|
||||
post:
|
||||
operationId: user_list
|
||||
summary: user_list
|
||||
description: |
|
||||
Return a list of the site's user accounts.
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
q:
|
||||
type: string
|
||||
description: filter the users returned to those whose names contain a string
|
||||
email:
|
||||
type: string
|
||||
description: filter the users returned to those whose email match a string (you must be a sysadmin to use this filter)
|
||||
order_by:
|
||||
type: string
|
||||
description: "which field to sort the list (default: `'display_name'`)."
|
||||
enum: ["id", "name", "fullname", "display_name", "created", "about", "sysadmin", "number_created_packages"]
|
||||
all_fields:
|
||||
type: boolean
|
||||
description: return full user disctionaries instead of just names
|
||||
include_site_user:
|
||||
type: boolean
|
||||
description: "add site_user to the result (default: `False`)"
|
||||
'package_relationships_list':
|
||||
post:
|
||||
operationId: package_relationships_list
|
||||
summary: package_relationships_list
|
||||
description: |
|
||||
Return a datset's relationships.
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: the id or name of the first package
|
||||
id2:
|
||||
type: string
|
||||
description: the id or name of the second package
|
||||
rel:
|
||||
type: string
|
||||
description: "relationship as string, see `package_relationship_create()` for the relationship types"
|
||||
'package_show':
|
||||
post:
|
||||
operationId: package_show
|
||||
summary: package_show
|
||||
description: Return the metadata of a dataset and its resources.
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
required:
|
||||
- id
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: the id or name of the dataset
|
||||
use_default_schema:
|
||||
type: boolean
|
||||
description: use default package schema instead of a custom schema defined with an IDatasetForm plugin
|
||||
include_plugin_data:
|
||||
type: boolean
|
||||
description: Include the internal plugin data object (sysadmin only)
|
||||
x-codeSamples:
|
||||
- lang: rust
|
||||
label: Rust SDK (ckanaction) example
|
||||
source: |
|
||||
use dotenvy::dotenv;
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
// Load environment variables from .env file
|
||||
dotenv()?;
|
||||
|
||||
// Initialize and build CKAN struct
|
||||
let ckan = ckanaction::CKAN::builder()
|
||||
.url("http://localhost:5000")
|
||||
.token(dotenvy::var("CKAN_API_TOKEN")?)
|
||||
.build();
|
||||
|
||||
// Send request to /package_show and print output
|
||||
let result = ckan.package_show()
|
||||
.id("6b044c6b-e896-4800-a94d-9e5147b25a25".to_string())
|
||||
.call()
|
||||
.await?;
|
||||
println!("{result:#?}");
|
||||
|
||||
Ok(())
|
||||
}
|
||||
'resource_show':
|
||||
post:
|
||||
operationId: resource_show
|
||||
summary: resource_show
|
||||
description: Return the metadata of a resource.
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: the id of the resource
|
||||
'resource_view_show':
|
||||
post:
|
||||
operationId: resource_view_show
|
||||
summary: resource_view_show
|
||||
description: Return the metadata of a resource_view.
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: the id of the resource_view
|
||||
resource_view_list:
|
||||
post:
|
||||
operationId: resource_view_list
|
||||
summary: resource_view_list
|
||||
description: Return the list of resource views for a particular resource.
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: the id of the resource
|
||||
group_show:
|
||||
post:
|
||||
operationId: group_show
|
||||
summary: group_show
|
||||
description: Return the details of a group (only its first 1000 datasets are returned).
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: the id or name of the group
|
||||
include_datasets:
|
||||
type: boolean
|
||||
description: "include a truncated list of the group's datasets (default: `False`)"
|
||||
include_dataset_count:
|
||||
type: boolean
|
||||
description: "include the full package_count (default: `True`)"
|
||||
include_extras:
|
||||
type: boolean
|
||||
description: "include the group's extra fields (default: `True`)"
|
||||
include_users:
|
||||
type: boolean
|
||||
description: "include the group's users (default: `True` if `ckan.auth.public_user_details` is `True` otherwise `False`)"
|
||||
include_groups:
|
||||
type: boolean
|
||||
description: "include the group's sub groups (default `True`)"
|
||||
include_tags:
|
||||
type: boolean
|
||||
description: "include the group's tags (default: `True`)"
|
||||
include_followers:
|
||||
type: boolean
|
||||
description: "include the group's number of followers (default: `True`)"
|
||||
organization_show:
|
||||
post:
|
||||
operationId: organization_show
|
||||
summary: organization_show
|
||||
# Original docs typo "a" instead of "an"
|
||||
description: Return the details of an organization (only its first 10 datasets are returned).
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: the id or name of the organization
|
||||
include_datasets:
|
||||
type: boolean
|
||||
description: "include a truncated list of the org's datasets (default: `False`)"
|
||||
include_dataset_count:
|
||||
type: boolean
|
||||
description: "include the full package_count (default: `True`)"
|
||||
include_extras:
|
||||
type: boolean
|
||||
description: "include the organization's extra fields (default: `True`)"
|
||||
include_users:
|
||||
type: boolean
|
||||
description: "include the organization's users (default: `True` if `ckan.auth.public_user_details` is `True` otherwise `False`)"
|
||||
include_groups:
|
||||
type: boolean
|
||||
description: "include the organization's sub groups (default `True`)"
|
||||
include_tags:
|
||||
type: boolean
|
||||
description: "include the organization's tags (default: `True`)"
|
||||
include_followers:
|
||||
type: boolean
|
||||
description: "include the organization's number of followers (default: `True`)"
|
||||
group_package_show:
|
||||
post:
|
||||
operationId: group_package_show
|
||||
summary: group_package_show
|
||||
description: Return the datasets (packages) of a group.
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: the id or name of the group
|
||||
limit:
|
||||
type: integer
|
||||
description: the maximum number of datasets to return
|
||||
tag_show:
|
||||
post:
|
||||
operationId: tag_show
|
||||
summary: tag_show
|
||||
description: Return the details of a tag and all its datasets.
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: the name or id of the tag
|
||||
vocabulary_id:
|
||||
type: string
|
||||
description: the id or name of the tag vocabulary that the tag is in - if it is not specified it will assume it is a free tag
|
||||
include_datasets:
|
||||
type: boolean
|
||||
description: "include a list of the tag's datasets (up to a limit of 1000 - for more flexibility, use package_search) (default: `False`)"
|
||||
user_show:
|
||||
post:
|
||||
operationId: user_show
|
||||
summary: user_show
|
||||
description: |
|
||||
Return a user account.
|
||||
|
||||
Either the `id` should be passed or the user should be logged in.
|
||||
requestBody:
|
||||
required: false
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: the id or name of the user
|
||||
include_datasets:
|
||||
type: boolean
|
||||
description: "include a list of datasets the user has created. If it is the same user or a sysadmin requesting, it includes datasets that are draft or private (default: `False`, limit: 50)"
|
||||
include_num_followers:
|
||||
type: boolean
|
||||
description: "include the number of followers the user has (default: `False`)"
|
||||
include_password_hash:
|
||||
type: boolean
|
||||
description: "include the stored password hash (sysadmin only, default: `False`)"
|
||||
include_plugin_extras:
|
||||
type: boolean
|
||||
description: "include the internal plugin extras object (sysadmin only, default: `False`)"
|
||||
status_show:
|
||||
get:
|
||||
operationId: status_show
|
||||
summary: status_show
|
||||
|
|
@ -187,56 +657,6 @@ paths:
|
|||
.await?;
|
||||
println!("{result:#?}");
|
||||
|
||||
Ok(())
|
||||
}
|
||||
'package_show':
|
||||
post:
|
||||
operationId: package_show
|
||||
summary: package_show
|
||||
description: Return the metadata of a dataset and its resources.
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
required:
|
||||
- id
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: the id or name of the dataset
|
||||
default: ""
|
||||
use_default_schema:
|
||||
type: boolean
|
||||
description: use default package schema instead of a custom schema defined with an IDatasetForm plugin
|
||||
include_plugin_data:
|
||||
type: boolean
|
||||
description: Include the internal plugin data object (sysadmin only)
|
||||
x-codeSamples:
|
||||
- lang: rust
|
||||
label: Rust SDK (ckanaction) example
|
||||
source: |
|
||||
use dotenvy::dotenv;
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
// Load environment variables from .env file
|
||||
dotenv()?;
|
||||
|
||||
// Initialize and build CKAN struct
|
||||
let ckan = ckanaction::CKAN::builder()
|
||||
.url("http://localhost:5000")
|
||||
.token(dotenvy::var("CKAN_API_TOKEN")?)
|
||||
.build();
|
||||
|
||||
// Send request to /package_show and print output
|
||||
let result = ckan.package_show()
|
||||
.id("6b044c6b-e896-4800-a94d-9e5147b25a25".to_string())
|
||||
.call()
|
||||
.await?;
|
||||
println!("{result:#?}");
|
||||
|
||||
Ok(())
|
||||
}
|
||||
'package_search':
|
||||
|
|
@ -254,7 +674,7 @@ paths:
|
|||
|
||||
This action accepts a subset of Solr's search query parameters.
|
||||
|
||||
The following advanced Solr parameters are supported as well. Note that some of these are only available on particular Solr versions. See Solr’s dismax and edismax documentation for further details on them:
|
||||
The following advanced Solr parameters are supported as well. Note that some of these are only available on particular Solr versions. See Solr's dismax and edismax documentation for further details on them:
|
||||
|
||||
`qf`, `wt`, `bf`, `boost`, `tie`, `defType`, `mm`
|
||||
|
||||
|
|
@ -263,6 +683,12 @@ paths:
|
|||
- `q=flood` datasets containing the word *flood*, *floods*, or *flooding*
|
||||
- `fq=tags:economy` datasets with the tag *economy*
|
||||
- `facet.field=["tags"] facet.limit=10 rows=0` top 10 tags
|
||||
|
||||
<Callout title="Title" type="error">
|
||||
There is an issue for the Body dropdown within this UI where an empty object `{}` is set for the `facet` field.
|
||||
|
||||
Please either remove this field by clicking "Open JSON editor" in the Body dropdown or set it to `true` (the default value) or `false`.
|
||||
</Callout>
|
||||
requestBody:
|
||||
required: false
|
||||
content:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue