Job Router Operations - Accept Job Offer
接受供應項目來處理作業,如果另一個代理程式已接受作業,則會傳回 409/Conflict。
POST {endpoint}/routing/workers/{workerId}/offers/{offerId}:accept?api-version=2023-11-01
URI 參數
名稱 | 位於 | 必要 | 類型 | Description |
---|---|---|---|---|
endpoint
|
path | True |
string |
通訊資源的 URI |
offer
|
path | True |
string |
供應項目的標識碼。 |
worker
|
path | True |
string |
背景工作角色的標識碼。 |
api-version
|
query | True |
string |
用於此作業的 API 版本。 |
回應
名稱 | 類型 | Description |
---|---|---|
200 OK |
要求已成功。 |
|
Other Status Codes |
未預期的錯誤回應。 Headers x-ms-error-code: string |
範例
Accepts an offer to work on a job
Sample Request
POST https://contoso.westus.communications.azure.com/routing/workers/DefaultWorker/offers/1d5896f3-8b54-40be-82d3-910323f5e2af:accept?api-version=2023-11-01
Sample Response
{
"assignmentId": "246d5a06-c04a-4b6b-8a34-02bbd9fdad68",
"jobId": "632f5345-220b-4e46-b31f-aeaf03cc2df9",
"workerId": "DefaultWorker"
}
定義
名稱 | Description |
---|---|
Accept |
回應,其中包含來自已接受供應專案之背景工作、作業和指派的標識碼。 |
Azure. |
錯誤物件。 |
Azure. |
包含錯誤詳細數據的回應。 |
Azure. |
物件,包含有關錯誤的更特定資訊。 根據 Microsoft One API 指導方針 - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses。 |
AcceptJobOfferResult
回應,其中包含來自已接受供應專案之背景工作、作業和指派的標識碼。
名稱 | 類型 | Description |
---|---|---|
assignmentId |
string |
指派已接受作業供應專案之背景工作的工作指派標識符。 |
jobId |
string |
指派之作業的標識碼。 |
workerId |
string |
已指派此工作的背景工作識別碼。 |
Azure.Core.Foundations.Error
錯誤物件。
名稱 | 類型 | Description |
---|---|---|
code |
string |
其中一組伺服器定義的錯誤碼。 |
details |
導致此錯誤之特定錯誤的詳細數據陣列。 |
|
innererror |
物件,包含比目前對象有關錯誤的更特定資訊。 |
|
message |
string |
人類看得懂的錯誤表示法。 |
target |
string |
錯誤的目標。 |
Azure.Core.Foundations.ErrorResponse
包含錯誤詳細數據的回應。
名稱 | 類型 | Description |
---|---|---|
error |
錯誤物件。 |
Azure.Core.Foundations.InnerError
物件,包含有關錯誤的更特定資訊。 根據 Microsoft One API 指導方針 - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses。
名稱 | 類型 | Description |
---|---|---|
code |
string |
其中一組伺服器定義的錯誤碼。 |
innererror |
內部錯誤。 |