mirror of
https://github.com/langgenius/dify.git
synced 2026-09-08 11:04:27 +08:00
Merge remote-tracking branch 'origin/feat/dataset-api-key-scope' into feat/dataset-api-key-scope
This commit is contained in:
commit
1bb3e360e3
@ -5835,7 +5835,7 @@ Check if dataset is in use
|
|||||||
| 200 | Dataset use status retrieved successfully | **application/json**: [UsageCheckResponse](#usagecheckresponse)<br> |
|
| 200 | Dataset use status retrieved successfully | **application/json**: [UsageCheckResponse](#usagecheckresponse)<br> |
|
||||||
|
|
||||||
### [GET] /datasets/{resource_id}/api-keys
|
### [GET] /datasets/{resource_id}/api-keys
|
||||||
**Get all API keys for a dataset**
|
**Get all API keys that can access a dataset**
|
||||||
|
|
||||||
#### Parameters
|
#### Parameters
|
||||||
|
|
||||||
@ -5850,7 +5850,7 @@ Check if dataset is in use
|
|||||||
| 200 | API keys retrieved successfully | **application/json**: [ApiKeyList](#apikeylist)<br> |
|
| 200 | API keys retrieved successfully | **application/json**: [ApiKeyList](#apikeylist)<br> |
|
||||||
|
|
||||||
### [POST] /datasets/{resource_id}/api-keys
|
### [POST] /datasets/{resource_id}/api-keys
|
||||||
**Create a new API key for a dataset**
|
**Create a new API key bound to a single dataset**
|
||||||
|
|
||||||
#### Parameters
|
#### Parameters
|
||||||
|
|
||||||
@ -12653,6 +12653,7 @@ Soft lifecycle state for Agent records.
|
|||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
| ---- | ---- | ----------- | -------- |
|
| ---- | ---- | ----------- | -------- |
|
||||||
| created_at | integer | | No |
|
| created_at | integer | | No |
|
||||||
|
| dataset_id | string | | No |
|
||||||
| id | string | | Yes |
|
| id | string | | Yes |
|
||||||
| last_used_at | integer | | No |
|
| last_used_at | integer | | No |
|
||||||
| token | string | | Yes |
|
| token | string | | Yes |
|
||||||
|
|||||||
@ -1148,6 +1148,7 @@ export type ApiKeyList = {
|
|||||||
|
|
||||||
export type ApiKeyItem = {
|
export type ApiKeyItem = {
|
||||||
created_at?: number | null
|
created_at?: number | null
|
||||||
|
dataset_id?: string | null
|
||||||
id: string
|
id: string
|
||||||
last_used_at?: number | null
|
last_used_at?: number | null
|
||||||
token: string
|
token: string
|
||||||
|
|||||||
@ -763,6 +763,7 @@ export const zWorkflowRestoreResponse = z.object({
|
|||||||
*/
|
*/
|
||||||
export const zApiKeyItem = z.object({
|
export const zApiKeyItem = z.object({
|
||||||
created_at: z.int().nullish(),
|
created_at: z.int().nullish(),
|
||||||
|
dataset_id: z.string().nullish(),
|
||||||
id: z.string(),
|
id: z.string(),
|
||||||
last_used_at: z.int().nullish(),
|
last_used_at: z.int().nullish(),
|
||||||
token: z.string(),
|
token: z.string(),
|
||||||
|
|||||||
@ -1712,37 +1712,37 @@ export const byApiKeyId2 = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get all API keys for a dataset
|
* Get all API keys that can access a dataset
|
||||||
*
|
*
|
||||||
* Get all API keys for a dataset
|
* Get all API keys that can access a dataset
|
||||||
*/
|
*/
|
||||||
export const get35 = oc
|
export const get35 = oc
|
||||||
.route({
|
.route({
|
||||||
description: 'Get all API keys for a dataset',
|
description: 'Get all API keys that can access a dataset',
|
||||||
inputStructure: 'detailed',
|
inputStructure: 'detailed',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
operationId: 'getDatasetsByResourceIdApiKeys',
|
operationId: 'getDatasetsByResourceIdApiKeys',
|
||||||
path: '/datasets/{resource_id}/api-keys',
|
path: '/datasets/{resource_id}/api-keys',
|
||||||
summary: 'Get all API keys for a dataset',
|
summary: 'Get all API keys that can access a dataset',
|
||||||
tags: ['console'],
|
tags: ['console'],
|
||||||
})
|
})
|
||||||
.input(z.object({ params: zGetDatasetsByResourceIdApiKeysPath }))
|
.input(z.object({ params: zGetDatasetsByResourceIdApiKeysPath }))
|
||||||
.output(zGetDatasetsByResourceIdApiKeysResponse)
|
.output(zGetDatasetsByResourceIdApiKeysResponse)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new API key for a dataset
|
* Create a new API key bound to a single dataset
|
||||||
*
|
*
|
||||||
* Create a new API key for a dataset
|
* Create a new API key bound to a single dataset
|
||||||
*/
|
*/
|
||||||
export const post22 = oc
|
export const post22 = oc
|
||||||
.route({
|
.route({
|
||||||
description: 'Create a new API key for a dataset',
|
description: 'Create a new API key bound to a single dataset',
|
||||||
inputStructure: 'detailed',
|
inputStructure: 'detailed',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
operationId: 'postDatasetsByResourceIdApiKeys',
|
operationId: 'postDatasetsByResourceIdApiKeys',
|
||||||
path: '/datasets/{resource_id}/api-keys',
|
path: '/datasets/{resource_id}/api-keys',
|
||||||
successStatus: 201,
|
successStatus: 201,
|
||||||
summary: 'Create a new API key for a dataset',
|
summary: 'Create a new API key bound to a single dataset',
|
||||||
tags: ['console'],
|
tags: ['console'],
|
||||||
})
|
})
|
||||||
.input(z.object({ params: zPostDatasetsByResourceIdApiKeysPath }))
|
.input(z.object({ params: zPostDatasetsByResourceIdApiKeysPath }))
|
||||||
|
|||||||
@ -70,6 +70,7 @@ export type ApiKeyList = {
|
|||||||
|
|
||||||
export type ApiKeyItem = {
|
export type ApiKeyItem = {
|
||||||
created_at?: number | null
|
created_at?: number | null
|
||||||
|
dataset_id?: string | null
|
||||||
id: string
|
id: string
|
||||||
last_used_at?: number | null
|
last_used_at?: number | null
|
||||||
token: string
|
token: string
|
||||||
|
|||||||
@ -14,6 +14,7 @@ export const zApiBaseUrlResponse = z.object({
|
|||||||
*/
|
*/
|
||||||
export const zApiKeyItem = z.object({
|
export const zApiKeyItem = z.object({
|
||||||
created_at: z.int().nullish(),
|
created_at: z.int().nullish(),
|
||||||
|
dataset_id: z.string().nullish(),
|
||||||
id: z.string(),
|
id: z.string(),
|
||||||
last_used_at: z.int().nullish(),
|
last_used_at: z.int().nullish(),
|
||||||
token: z.string(),
|
token: z.string(),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user