共用方式為


擷取

注意

Cloud Partner 入口網站 API 已與整合,並將繼續在合作夥伴中心運作。 轉換引進了小型變更。 檢閱 Cloud Partner 入口網站 API 參考所列的變更,以確保您的程式代碼在轉換至合作夥伴中心後繼續運作。 CPP API 應該只用於轉換至合作夥伴中心之前已整合的現有產品:新產品應使用合作夥伴中心提交 API。

擷取供應專案上的所有作業,或取得指定 operationId 的特定作業。 用戶端可以使用查詢參數來篩選執行中的作業。

GET https://cloudpartner.azure.com/api/publishers/<publisherId>/offers/<offerId>/operations/<operationId>?api-version=2017-10-31

URI 參數

名稱 說明 資料類型
publisherId 發行者標識碼,例如 Contoso String
offerId 供應項目標識碼 String
operationId 可唯一識別供應項目上作業的 GUID。 operationId 可能會使用此 API 擷取,而且也會在回應的 HTTP 標頭中傳回任何長時間執行的作業,例如 發布供應專案 API。 Guid
api-version 最新版的 API Date
名稱
內容-類型 application/json
授權 Bearer YOUR_TOKEN

本文範例

回應

GET 作業

    [
        {
            "id": "5a63deb5-925b-4ee0-938b-7c86fbf287c5",
            "offerId": "56615b67-2185-49fe-80d2-c4ddf77bb2e8",
            "offerVersion": 1,
            "offerTypeId": "microsoft-azure-virtualmachines",
            "publisherId": "contoso",
            "submissionType": "publish",
            "submissionState": "running",
            "publishingVersion": 2,
            "slot": "staging",
            "version": 636576975611768314,
            "definition": {
                "metadata": {
                    "emails": "jdoe@contoso.com"
                }
            },
            "changedTime": "2018-03-26T21:46:01.179948Z"
        }
    ]

GET 作業

    [
        {
            "status" : "running",
            "messages" : [],
            "publishingVersion" : 2,
            "offerVersion" : 1,
            "cancellationRequestState": "canCancel",
            "steps": [
                        {
                            "estimatedTimeFrame": "< 15 min",
                            "id": "displaydummycertify",
                            "stepName": "Validate Pre-Requisites",
                            "description": "Offer settings provided are validated",
                            "status": "complete",
                            "messages": 
                            [
                                {
                                    "messageHtml": "Step completed.",
                                    "level": "information",
                                    "timestamp": "2017-03-28T19:50:36.500052Z"
                                }
                            ],
                            "progressPercentage": 100
                        },
                        {
                            "estimatedTimeFrame": "< 5 day",
                            "id": "displaycertify",
                            "stepName": "Certification",
                            "description": "Your offer is analyzed by our certification systems for issues.",
                            "status": "blocked",
                            "messages": 
                            [
                                {
                                    "messageHtml": "No virtual machine image was found for the plan contoso.",
                                    "level": "error",
                                    "timestamp": "2017-03-28T19:50:39.5506018Z"
                                },
                                {
                                    "messageHtml": "This step has not started yet.",
                                    "level": "information",
                                    "timestamp": "2017-03-28T19:50:39.5506018Z"
                                }
                            ],
                            "progressPercentage": 0
                        },
                        {
                            "estimatedTimeFrame": "< 1 day",
                            "id": "displayprovision",
                            "stepName": "Provisioning",
                            "description": "Your virtual machine is being replicated in our production systems.",
                            "status": "notStarted",
                            "messages": [],
                            "progressPercentage": 0
                        },
                        {
                            "estimatedTimeFrame": "< 1 hour",
                            "id": "displaypackage",
                            "stepName": "Packaging and Lead Generation Registration",
                            "description": "Your virtual machine is packaged for being shown to your customers. Additionally, we hookup our lead generation systems to send leads for your offer.",
                            "status": "notStarted",
                            "messages": [],
                            "progressPercentage": 0
                        },
                        {
                            "id": "publisher-signoff",
                            "stepName": "Publisher signoff",
                            "description": "Offer is available to preview. Ensure that everything looks good before making your offer live.",
                            "status": "notStarted",
                            "messages": [],
                            "progressPercentage": 0
                        },
                        {
                            "estimatedTimeFrame": "~2-5 days",
                            "id": "live",
                            "stepName": "Live",
                            "description": "Offer is publicly visible and is available for purchase.",
                            "status": "notStarted",
                            "messages": [],
                            "progressPercentage": 0
                        }
                    ],
                "previewLinks": [],
                "liveLinks": [],
            }
        }
    ]

回應本文屬性

名稱 說明
id 可唯一識別作業的 GUID
submissionType 識別要報告供應專案的作業類型,例如 Publish/GoLive
createdDateTime 建立作業的 UTC 日期時間
lastActionDateTime 上次更新在作業上完成的UTC日期時間
status 工作的狀態,可以是 not started | failed | | completedrunning。 一次只能有一個作業的狀態 running
error 失敗作業的錯誤訊息

回應步驟屬性

名稱 說明
estimatedTimeFrame 此作業的估計持續時間
id 步驟程式的唯一標識符
description 步驟的描述
stepName 步驟的易記名稱
status 步驟的狀態,任一 notStarted | running | failed | completed
messages 在步驟期間遇到的任何通知或警告。 字串陣列
progressPercentage 從 0 到 100 的整數,表示步驟的進展

回應狀態代碼

程式碼 說明
200 OK - 已成功處理要求,並傳回要求的作業。
400 Bad/Malformed request - 錯誤回應本文可能包含詳細資訊。
403 Forbidden - 客戶端無法存取指定的命名空間。
404 Not found - 指定的實體不存在。