feat(docs): add more endpoints

This commit is contained in:
rzmk 2025-10-22 13:09:11 -04:00
parent 5adb611c85
commit 20c5d749d8
4 changed files with 180 additions and 0 deletions

View 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} />

View 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} />

View 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} />

View file

@ -115,6 +115,126 @@ paths:
capacity: capacity:
type: string type: string
description: if provided, only datasets where the user has this capacity are returned description: if provided, only datasets where the user has this capacity are returned
'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`)"
'status_show': 'status_show':
get: get:
operationId: status_show operationId: status_show