feat(docs): add more endpoints

This commit is contained in:
rzmk 2025-10-24 01:10:08 -04:00
parent 2f4edc08cf
commit 5b7999b6ea
7 changed files with 454 additions and 64 deletions

View file

@ -0,0 +1,20 @@
---
title: format_autocomplete
full: true
_openapi:
method: POST
route: format_autocomplete
toc: []
structuredData:
headings: []
contents:
- content: |
Return a list of resource formats whose names contain a string.
---
{/* 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 resource formats whose names contain a string.
<APIPage document={"./lib/openapi.yml"} operations={[{"path":"format_autocomplete","method":"post"}]} webhooks={[]} hasHead={false} />

View file

@ -0,0 +1,20 @@
---
title: group_autocomplete
full: true
_openapi:
method: POST
route: group_autocomplete
toc: []
structuredData:
headings: []
contents:
- content: |
Return a list of group names that contain a string.
---
{/* 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 group names that contain a string.
<APIPage document={"./lib/openapi.yml"} operations={[{"path":"group_autocomplete","method":"post"}]} webhooks={[]} hasHead={false} />

View file

@ -0,0 +1,20 @@
---
title: organization_autocomplete
full: true
_openapi:
method: POST
route: organization_autocomplete
toc: []
structuredData:
headings: []
contents:
- content: |
Return a list of organization names that contain a string.
---
{/* 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 organization names that contain a string.
<APIPage document={"./lib/openapi.yml"} operations={[{"path":"organization_autocomplete","method":"post"}]} webhooks={[]} hasHead={false} />

View file

@ -0,0 +1,26 @@
---
title: package_autocomplete
full: true
_openapi:
method: POST
route: package_autocomplete
toc: []
structuredData:
headings: []
contents:
- content: >
Return a list of datasets (packages) that match a string.
Datasets with names or titles that contain the query string will be
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 a list of datasets (packages) that match a string.
Datasets with names or titles that contain the query string will be returned.
<APIPage document={"./lib/openapi.yml"} operations={[{"path":"package_autocomplete","method":"post"}]} webhooks={[]} hasHead={false} />

View file

@ -0,0 +1,127 @@
---
title: resource_search
full: true
_openapi:
method: POST
route: resource_search
toc: []
structuredData:
headings: []
contents:
- content: >
Searches for resources in public Datasets satisfying the search
criteria.
It returns a dictionary with 2 fields: `count` and `results`. The
`count` field contains the total number of Resources found without the
limit or query parameters having an effect. The `results` field is a
list of dictized Resource objects.
The 'query' parameter is a required field. It is a string of the form
`{field}:{term}` or a list of strings, each of the same form. Within
each string, `{field}` is a field or extra field on the Resource
domain object.
If `{field}` is `"hash"`, then an attempt is made to match the
`{term}` as a *prefix* of the `Resource.hash` field.
If `{field}` is an extra field, then an attempt is made to match
against the extra fields stored against the Resource.
Note: The search is limited to search against extra fields declared in
the config setting `ckan.extra_resource_fields`.
Note: Due to a Resource's extra fields being stored as a json blob,
the match is made against the json string representation. As such,
false positives may occur:
If the search criteria is:
```
query = "field1:term1"
```
Then a json blob with the string representation of:
```json
{"field1": "foo", "field2": "term1"}
```
will match the search criteria! This is a known short-coming of this
approach.
All matches are made ignoring case; and apart from the `"hash"` field,
a term matches if it is a substring of the fields value.
Finally, when specifying more than one search criteria, the criteria
are AND-ed together.
The `order` parameter is used to control the ordering of the results.
Currently only ordering one field is available, and in ascending order
only.
The context may contain a flag, *search_query*, which if True will
make this action behave as if being used by the internal search api.
ie - the results will not be dictized, and SearchErrors are thrown for
bad search queries (rather than ValidationErrors).
---
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
Searches for resources in public Datasets satisfying the search criteria.
It returns a dictionary with 2 fields: `count` and `results`. The `count` field contains the total number of Resources found without the limit or query parameters having an effect. The `results` field is a list of dictized Resource objects.
The 'query' parameter is a required field. It is a string of the form `{field}:{term}` or a list of strings, each of the same form. Within each string, `{field}` is a field or extra field on the Resource domain object.
If `{field}` is `"hash"`, then an attempt is made to match the `{term}` as a *prefix* of the `Resource.hash` field.
If `{field}` is an extra field, then an attempt is made to match against the extra fields stored against the Resource.
Note: The search is limited to search against extra fields declared in the config setting `ckan.extra_resource_fields`.
Note: Due to a Resource's extra fields being stored as a json blob, the match is made against the json string representation. As such, false positives may occur:
If the search criteria is:
```
query = "field1:term1"
```
Then a json blob with the string representation of:
```json
{"field1": "foo", "field2": "term1"}
```
will match the search criteria! This is a known short-coming of this approach.
All matches are made ignoring case; and apart from the `"hash"` field, a term matches if it is a substring of the fields value.
Finally, when specifying more than one search criteria, the criteria are AND-ed together.
The `order` parameter is used to control the ordering of the results. Currently only ordering one field is available, and in ascending order only.
The context may contain a flag, *search_query*, which if True will make this action behave as if being used by the internal search api. ie - the results will not be dictized, and SearchErrors are thrown for bad search queries (rather than ValidationErrors).
<APIPage document={"./lib/openapi.yml"} operations={[{"path":"resource_search","method":"post"}]} webhooks={[]} hasHead={false} />

View file

@ -0,0 +1,20 @@
---
title: user_autocomplete
full: true
_openapi:
method: POST
route: user_autocomplete
toc: []
structuredData:
headings: []
contents:
- content: |
Return a list of user names that contain a string.
---
{/* 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 user names that contain a string.
<APIPage document={"./lib/openapi.yml"} operations={[{"path":"user_autocomplete","method":"post"}]} webhooks={[]} hasHead={false} />