次の方法で共有


操作の取得

手記

Cloud パートナー ポータル API は、パートナー センターと統合され、引き続き動作します。 この切り替えでは、小さな変更が発生します。 Cloud パートナー ポータル 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 など)
offerId オファー識別子
operationId オファーの操作を一意に識別する GUID。 operationId は、この API を使用して取得できます。また、発行オファー API など、実行時間の長い操作の応答の HTTP ヘッダーにも返されます。 Guid
api-version 最新バージョンの API 日付
名の 値の
Content-Type 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": [],
            }
        }
    ]

応答本文のプロパティ

名の 説明
身分証明書 操作を一意に識別する GUID
submissionType オファーに対して報告される操作の種類を識別します (例: Publish/GoLive
createdDateTime 操作が作成された UTC 日時
lastActionDateTime 操作で最後の更新が行われた UTC 日時
地位 操作の状態 (not started | running | failed | completed)。 一度に状態を running できる操作は 1 つだけです。
エラー 失敗した操作のエラー メッセージ

応答ステップのプロパティ

名の 説明
estimatedTimeFrame この操作の推定期間
身分証明書 ステップ プロセスの一意識別子
形容 手順の説明
stepName ステップのフレンドリ名
地位 ステップの状態 (notStarted | running | failed | completed
メッセージ 手順中に発生した通知または警告。 文字列の配列
progressPercentage ステップの進行を示す 0 ~ 100 の整数

応答状態コード

コード 説明
200 OK - 要求が正常に処理され、要求された操作が返されました。
400 Bad/Malformed request - エラー応答本文に詳細情報が含まれている場合があります。
403 Forbidden - クライアントは、指定された名前空間にアクセスできません。
404 Not found - 指定されたエンティティが存在しません。