Ingestion Jobs - Create
创建具有指定作业 ID 的引入作业。
PUT {endpoint}/openai/ingestion/jobs/{job-id}?api-version=2025-03-01-preview
URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
endpoint
|
path | True |
string (url) |
支持的认知服务终结点(协议和主机名,例如:https://aoairesource.openai.azure.com。将“aoairesource”替换为 Azure OpenAI 帐户名称。 |
|
job-id
|
path | True |
string |
将创建的作业的 ID。 |
|
api-version
|
query | True |
string |
请求的 API 版本。 |
请求头
| 名称 | 必需 | 类型 | 说明 |
|---|---|---|---|
| mgmt-user-token |
string |
用于访问工作区的令牌(仅适用于用户计算作业)。 |
|
| aml-user-token |
string |
用于访问工作区中作业中的资源的令牌(仅适用于用户计算作业)。 |
请求正文
请求正文可以为下列任一内容:
| 名称 | 说明 |
|---|---|
|
Ingestion |
|
|
Ingestion |
IngestionJobSystemCompute
| 名称 | 必需 | 类型 | 说明 |
|---|---|---|---|
| kind | True |
string:
System |
IngestionJobType |
| completionAction |
完成作。 |
||
| dataRefreshIntervalInHours |
integer |
||
| datasource | SystemComputeDatasource: |
SystemComputeDatasource |
|
| jobId |
string |
||
| searchServiceConnection | BaseConnection: |
BaseConnection |
IngestionJobUserCompute
| 名称 | 必需 | 类型 | 说明 |
|---|---|---|---|
| kind | True |
string:
User |
IngestionJobType |
| workspaceId | True |
string |
|
| compute | JobCompute: |
JobCompute |
|
| dataRefreshIntervalInHours |
integer |
||
| datasource | UserComputeDatasource: |
UserComputeDatasource |
|
| jobId |
string |
||
| target | TargetIndex: |
TargetIndex |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 200 OK | IngestionJob: |
成功 |
| Other Status Codes |
发生错误。 |
安全性
api-key
API 密钥身份验证
类型:
apiKey
在:
header
OAuth2Auth
OAuth2 身份验证
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/v2.0/authorize
作用域
| 名称 | 说明 |
|---|---|
| https://cognitiveservices.azure.com/.default |
示例
| Create a system-compute ingestion job |
| Create a user-compute ingestion job |
Create a system-compute ingestion job
示例请求
PUT {endpoint}/openai/ingestion/jobs/ingestion-job?api-version=2025-03-01-preview
{
"kind": "SystemCompute",
"searchServiceConnection": {
"kind": "EndpointWithManagedIdentity",
"endpoint": "https://aykame-dev-search.search.windows.net"
},
"datasource": {
"kind": "Storage",
"connection": {
"kind": "EndpointWithManagedIdentity",
"endpoint": "https://mystorage.blob.core.windows.net/",
"resourceId": "/subscriptions/1234567-abcd-1234-5678-1234abcd/resourceGroups/my-resource/providers/Microsoft.Storage/storageAccounts/mystorage"
},
"containerName": "container",
"chunking": {
"maxChunkSizeInTokens": 2048
},
"embeddings": [
{
"connection": {
"kind": "RelativeConnection"
},
"deploymentName": "Ada"
}
]
},
"dataRefreshIntervalInHours": 24,
"completionAction": "keepAllAssets"
}
示例响应
operation-location: https://aoairesource.openai.azure.com/openai/ingestion/jobs/ingestion-job/runs/72a2792ef7d24ba7b82c7fe4a37e379f?api-version=2025-03-01-preview
{
"kind": "SystemCompute",
"jobId": "ingestion-job",
"searchServiceConnection": {
"kind": "EndpointWithManagedIdentity",
"endpoint": "https://aykame-dev-search.search.windows.net"
},
"datasource": {
"kind": "Storage",
"connection": {
"kind": "EndpointWithManagedIdentity",
"endpoint": "https://mystorage.blob.core.windows.net/",
"resourceId": "/subscriptions/1234567-abcd-1234-5678-1234abcd/resourceGroups/my-resource/providers/Microsoft.Storage/storageAccounts/mystorage"
},
"containerName": "container",
"chunking": {
"maxChunkSizeInTokens": 2048
},
"embeddings": [
{
"connection": {
"kind": "RelativeConnection"
},
"deploymentName": "Ada"
}
]
},
"dataRefreshIntervalInHours": 24,
"completionAction": "keepAllAssets"
}
Create a user-compute ingestion job
示例请求
PUT {endpoint}/openai/ingestion/jobs/ingestion-job?api-version=2025-03-01-preview
{
"kind": "UserCompute",
"workspaceId": "/subscriptions/f375b912-331c-4fc5-8e9f-2d7205e3e036/resourceGroups/adrama-copilot-demo/providers/Microsoft.MachineLearningServices/workspaces/adrama-rag-dev",
"compute": {
"kind": "ServerlessCompute"
},
"target": {
"kind": "AzureAISearch",
"connectionId": "/subscriptions/f375b912-331c-4fc5-8e9f-2d7205e3e036/resourceGroups/adrama-copilot-demo/providers/Microsoft.MachineLearningServices/workspaces/adrama-rag-dev/connections/search-connection"
},
"datasource": {
"kind": "Dataset",
"datasetId": "azureml://locations/centraluseuap/workspaces/83317fe6-efa6-4e4a-b020-d0edd11ec382/data/PlainText/versions/1",
"datasetType": "uri_folder"
}
}
示例响应
operation-location: https://aoairesource.openai.azure.com/openai/ingestion/jobs/ingestion-job/runs/72a2792ef7d24ba7b82c7fe4a37e379f?api-version=2025-03-01-preview
{
"kind": "UserCompute",
"jobId": "ingestion-job",
"workspaceId": "/subscriptions/f375b912-331c-4fc5-8e9f-2d7205e3e036/resourceGroups/adrama-copilot-demo/providers/Microsoft.MachineLearningServices/workspaces/adrama-rag-dev",
"compute": {
"kind": "ServerlessCompute"
},
"target": {
"kind": "AzureAISearch",
"connectionId": "/subscriptions/f375b912-331c-4fc5-8e9f-2d7205e3e036/resourceGroups/adrama-copilot-demo/providers/Microsoft.MachineLearningServices/workspaces/adrama-rag-dev/connections/search-connection"
},
"datasource": {
"kind": "Dataset",
"datasetId": "azureml://locations/centraluseuap/workspaces/83317fe6-efa6-4e4a-b020-d0edd11ec382/data/PlainText/versions/1",
"datasetType": "uri_folder"
}
}
定义
| 名称 | 说明 |
|---|---|
|
Azure |
Azure AI 搜索索引。 |
|
Chunking |
ChunkingSettings |
|
Compute |
计算类型。 |
|
Connection |
连接字符串连接。 |
|
Connection |
连接类型。 |
|
Cosmos |
CosmosDB 索引。 |
|
Crawling |
CrawlingSettings |
|
Custom |
自定义计算。 |
|
Deployment |
相对部署连接。 |
|
Endpoint |
终结点密钥连接。 |
|
Endpoint |
终结点托管标识连接。 |
| Error |
错误 |
|
Error |
错误代码 |
|
Error |
错误响应 |
|
Generic |
ConnectionEmbeddingSettings |
|
Ingestion |
完成作。 |
|
Ingestion |
|
|
Ingestion |
IngestionJobType |
|
Ingestion |
|
|
Inner |
InnerError |
|
Inner |
InnerErrorCode |
|
Pinecone |
Pinecone 索引。 |
|
Serverless |
无服务器计算。 |
|
System |
数据源类型。 |
|
System |
SystemComputeStorage |
|
System |
SystemComputeUrl |
|
Target |
目标类型。 |
|
User |
UserComputeStorage |
|
User |
数据源类型。 |
|
User |
UserComputeUrl |
|
Workspace |
AML 工作区连接。 |
|
Workspace |
WorkspaceConnectionEmbeddingSettings |
AzureAISearchIndex
Azure AI 搜索索引。
| 名称 | 类型 | 说明 |
|---|---|---|
| connectionId |
string |
指向 Azure AI 搜索索引的连接 ID。 |
| kind |
string:
Azure |
目标类型。 |
ChunkingSettings
ChunkingSettings
| 名称 | 类型 | 说明 |
|---|---|---|
| maxChunkSizeInTokens |
integer |
ComputeType
计算类型。
| 值 | 说明 |
|---|---|
| ServerlessCompute |
无服务器用户计算。 |
| CustomCompute |
自定义用户计算。 |
ConnectionStringConnection
连接字符串连接。
| 名称 | 类型 | 说明 |
|---|---|---|
| connectionString |
string |
连接字符串 |
| kind |
string:
Connection |
连接类型。 |
ConnectionType
连接类型。
| 值 | 说明 |
|---|---|
| EndpointWithKey |
终结点和密钥连接。 |
| ConnectionString |
连接字符串。 |
| EndpointWithManagedIdentity |
终结点和托管标识。 |
| WorkspaceConnection |
AML 工作区连接。 |
| RelativeConnection |
相对部署 |
CosmosDBIndex
CosmosDB 索引。
| 名称 | 类型 | 说明 |
|---|---|---|
| collectionName |
string |
cosmos DB 集合的名称。 |
| connectionId |
string |
指向 cosmos DB 的连接 ID。 |
| databaseName |
string |
cosmos DB 数据库的名称。 |
| kind |
string:
CosmosDB |
目标类型。 |
CrawlingSettings
CrawlingSettings
| 名称 | 类型 | 说明 |
|---|---|---|
| maxCrawlDepth |
integer |
|
| maxCrawlTimeInMins |
integer |
|
| maxDownloadTimeInMins |
integer |
|
| maxFileSize |
integer |
|
| maxFiles |
integer |
|
| maxRedirects |
integer |
CustomCompute
自定义计算。
| 名称 | 类型 | 说明 |
|---|---|---|
| computeId |
string |
自定义计算的 ID |
| kind | string: |
计算类型。 |
DeploymentConnection
相对部署连接。
| 名称 | 类型 | 说明 |
|---|---|---|
| kind |
string:
Relative |
连接类型。 |
EndpointKeyConnection
终结点密钥连接。
| 名称 | 类型 | 说明 |
|---|---|---|
| endpoint |
string |
端点 |
| key |
string |
密钥 |
| kind |
string:
Endpoint |
连接类型。 |
EndpointMIConnection
终结点托管标识连接。
| 名称 | 类型 | 说明 |
|---|---|---|
| endpoint |
string |
端点 |
| kind |
string:
Endpoint |
连接类型。 |
| resourceId |
string |
资源 ID |
Error
错误
| 名称 | 类型 | 说明 |
|---|---|---|
| code |
错误代码 |
|
| details |
Error[] |
错误详细信息(如果可用)。 |
| innererror |
InnerError |
|
| message |
string minLength: 1 |
此错误的消息。 |
| target |
string |
发生错误的位置(如果可用)。 |
ErrorCode
错误代码
| 值 | 说明 |
|---|---|
| conflict |
请求的作与当前资源状态冲突。 |
| invalidPayload |
此作的请求数据无效。 |
| forbidden |
当前用户/API 密钥禁止此作。 |
| notFound |
找不到资源。 |
| unexpectedEntityState |
无法以当前资源的状态执行该作。 |
| itemDoesAlreadyExist |
该项已存在。 |
| serviceUnavailable |
该服务当前不可用。 |
| internalFailure |
内部错误。 请重试。 |
| quotaExceeded |
超出配额。 |
| jsonlValidationFailed |
jsonl 数据的验证失败。 |
| fileImportFailed |
导入文件失败。 |
| tooManyRequests |
请求过多。 请稍后重试 |
| unauthorized |
当前用户/API 密钥未获得作的授权。 |
| contentFilter |
由于我们的安全系统,映像生成失败。 |
ErrorResponse
错误响应
| 名称 | 类型 | 说明 |
|---|---|---|
| error |
错误 |
GenericEmbeddingSettings
ConnectionEmbeddingSettings
| 名称 | 类型 | 说明 |
|---|---|---|
| connection | BaseConnection: |
BaseConnection |
| deploymentName |
string |
|
| modelName |
string |
IngestionJobCompletionAction
完成作。
| 值 | 说明 |
|---|---|
| cleanUpTempAssets |
清理在引入过程中创建的中间资产。 |
| keepAllAssets |
不会清理引入过程中创建的任何中间资产。 |
IngestionJobSystemCompute
| 名称 | 类型 | 说明 |
|---|---|---|
| completionAction |
完成作。 |
|
| dataRefreshIntervalInHours |
integer |
|
| datasource | SystemComputeDatasource: |
SystemComputeDatasource |
| jobId |
string |
|
| kind |
string:
System |
IngestionJobType |
| searchServiceConnection | BaseConnection: |
BaseConnection |
IngestionJobType
IngestionJobType
| 值 | 说明 |
|---|---|
| SystemCompute |
在服务拥有的资源上运行的作业。 |
| UserCompute |
在用户拥有的工作区上运行的作业。 |
IngestionJobUserCompute
| 名称 | 类型 | 说明 |
|---|---|---|
| compute | JobCompute: |
JobCompute |
| dataRefreshIntervalInHours |
integer |
|
| datasource | UserComputeDatasource: |
UserComputeDatasource |
| jobId |
string |
|
| kind |
string:
User |
IngestionJobType |
| target | TargetIndex: |
TargetIndex |
| workspaceId |
string |
InnerError
InnerError
| 名称 | 类型 | 说明 |
|---|---|---|
| code |
InnerErrorCode |
|
| innererror |
InnerError |
InnerErrorCode
InnerErrorCode
| 值 | 说明 |
|---|---|
| invalidPayload |
此作的请求数据无效。 |
PineconeIndex
Pinecone 索引。
| 名称 | 类型 | 说明 |
|---|---|---|
| connectionId |
string |
指向 pinecone 的连接 ID。 |
| kind |
string:
Pinecone |
目标类型。 |
ServerlessCompute
无服务器计算。
| 名称 | 类型 | 说明 |
|---|---|---|
| instanceCount |
integer |
要运行作业的实例计数。 |
| kind | string: |
计算类型。 |
| sku |
string |
SKU 级别 |
SystemComputeDatasourceType
数据源类型。
| 值 | 说明 |
|---|---|
| Storage |
Azure 存储帐户。 |
| Urls |
URL。 |
SystemComputeStorage
SystemComputeStorage
| 名称 | 类型 | 说明 |
|---|---|---|
| chunking |
ChunkingSettings |
|
| connection | BaseConnection: |
BaseConnection |
| containerName |
string |
容器名称 |
| embeddings |
ConnectionEmbeddingSettings |
|
| kind |
string:
Storage |
数据源类型。 |
SystemComputeUrl
SystemComputeUrl
| 名称 | 类型 | 说明 |
|---|---|---|
| chunking |
ChunkingSettings |
|
| connection | BaseConnection: |
BaseConnection |
| containerName |
string |
容器名称 |
| crawling |
CrawlingSettings |
|
| embeddings |
ConnectionEmbeddingSettings |
|
| kind |
string:
Urls |
数据源类型。 |
| urls |
string[] |
TargetType
目标类型。
| 值 | 说明 |
|---|---|
| AzureAISearch |
Azure AI 搜索索引。 |
| CosmosDB |
CosmosDB 索引。 |
| Pinecone |
Pinecone 索引。 |
UserComputeDataset
UserComputeStorage
| 名称 | 类型 | 说明 |
|---|---|---|
| chunking |
ChunkingSettings |
|
| datasetId |
string |
|
| datasetType |
string |
|
| embeddings |
WorkspaceConnectionEmbeddingSettings |
|
| kind |
string:
Dataset |
数据源类型。 |
UserComputeDatasourceType
数据源类型。
| 值 | 说明 |
|---|---|
| Dataset |
工作区数据集。 |
| Urls |
URL。 |
UserComputeUrl
UserComputeUrl
| 名称 | 类型 | 说明 |
|---|---|---|
| chunking |
ChunkingSettings |
|
| crawling |
CrawlingSettings |
|
| embeddings |
WorkspaceConnectionEmbeddingSettings |
|
| kind |
string:
Urls |
数据源类型。 |
| urls |
string[] |
WorkspaceConnection
AML 工作区连接。
| 名称 | 类型 | 说明 |
|---|---|---|
| connectionId |
string |
ConnectionId |
| kind | string: |
连接类型。 |
WorkspaceConnectionEmbeddingSettings
WorkspaceConnectionEmbeddingSettings
| 名称 | 类型 | 说明 |
|---|---|---|
| connectionId |
string |
|
| deploymentName |
string |
|
| modelName |
string |