MarketplaceOrdering.Agreements icon

MarketplaceOrdering.Agreements

REST API for MarketplaceOrdering Agreements

COMMUNITYBEARER0 INSTALLS
OpenAPI Specificationv3.0
{
  "swagger": "2.0",
  "schemes": [
    "https"
  ],
  "host": "management.azure.com",
  "info": {
    "description": "REST API for MarketplaceOrdering Agreements.",
    "title": "MarketplaceOrdering.Agreements",
    "version": "2015-06-01",
    "x-apisguru-categories": [
      "cloud"
    ],
    "x-logo": {
      "url": "https://api.apis.guru/v2/cache/logo/https_assets.onestore.ms_cdnfiles_onestorerolling-1606-01000_shell_v3_images_logo_microsoft.png"
    },
    "x-origin": [
      {
        "format": "swagger",
        "url": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/marketplaceordering/resource-manager/Microsoft.MarketplaceOrdering/stable/2015-06-01/Agreements.json",
        "version": "2.0"
      }
    ],
    "x-providerName": "azure.com",
    "x-serviceName": "marketplaceordering-Agreements",
    "x-tags": [
      "Azure",
      "Microsoft"
    ]
  },
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "securityDefinitions": {
    "azure_auth": {
      "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
      "description": "Azure Active Directory OAuth2 Flow.",
      "flow": "implicit",
      "scopes": {
        "user_impersonation": "impersonate your user account"
      },
      "type": "oauth2"
    }
  },
  "security": [
    {
      "azure_auth": [
        "user_impersonation"
      ]
    }
  ],
  "parameters": {
    "ApiVersionParameter": {
      "description": "The API version to use for the request.",
      "in": "query",
      "name": "api-version",
      "required": true,
      "type": "string"
    },
    "OfferTypeParameter": {
      "description": "Offer Type, currently only virtualmachine type is supported.",
      "enum": [
        "virtualmachine"
      ],
      "in": "path",
      "name": "offerType",
      "required": true,
      "type": "string",
      "x-ms-enum": {
        "modelAsString": true,
        "name": "OfferType"
      },
      "x-ms-parameter-location": "method"
    },
    "OffersParameter": {
      "description": "Offer identifier string of image being deployed.",
      "in": "path",
      "name": "offerId",
      "required": true,
      "type": "string",
      "x-ms-parameter-location": "method"
    },
    "PlansParameter": {
      "description": "Plan identifier string of image being deployed.",
      "in": "path",
      "name": "planId",
      "required": true,
      "type": "string",
      "x-ms-parameter-location": "method"
    },
    "PublishersParameter": {
      "description": "Publisher identifier string of image being deployed.",
      "in": "path",
      "name": "publisherId",
      "required": true,
      "type": "string",
      "x-ms-parameter-location": "method"
    },
    "SubscriptionIdParameter": {
      "description": "The subscription ID that identifies an Azure subscription.",
      "in": "path",
      "name": "subscriptionId",
      "required": true,
      "type": "string"
    }
  },
  "paths": {
    "/providers/Microsoft.MarketplaceOrdering/operations": {
      "get": {
        "description": "Lists all of the available Microsoft.MarketplaceOrdering REST API operations.",
        "operationId": "Operations_List",
        "parameters": [
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "OK. The request has succeeded.",
            "schema": {
              "$ref": "#/definitions/OperationListResult"
            }
          },
          "default": {
            "description": "Microsoft.MarketplaceOrdering error response describing why the operation failed.",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        },
        "tags": [
          "Operations"
        ],
        "x-ms-pageable": {
          "nextLinkName": "nextLink"
        }
      }
    },
    "/subscriptions/{subscriptionId}/providers/Microsoft.MarketplaceOrdering/agreements": {
      "get": {
        "description": "List marketplace agreements in the subscription.",
        "operationId": "MarketplaceAgreements_List",
        "parameters": [
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Terms returned successfully",
            "schema": {
              "items": {
                "$ref": "#/definitions/AgreementTerms"
              },
              "type": "array"
            }
          }
        },
        "x-ms-examples": {
          "SetMarketplaceTerms": {
            "parameters": {
              "api-version": "2016-04-01",
              "subscriptionId": "subid"
            },
            "responses": {
              "200": {
                "body": [
                  {
                    "id": "id",
                    "name": "planid",
                    "properties": {
                      "accepted": true,
                      "licenseTextLink": "test.licenseLink",
                      "plan": "planid",
                      "privacyPolicyLink": "test.privacyPolicyLink",
                      "product": "offid",
                      "publisher": "pubid",
                      "retrieveDatetime": "2017-08-15T11:33:07.12132Z",
                      "signature": "ASDFSDAFWEFASDGWERLWER"
                    },
                    "type": "Microsoft.MarketplaceOrdering/offertypes"
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/providers/Microsoft.MarketplaceOrdering/agreements/{publisherId}/offers/{offerId}/plans/{planId}": {
      "get": {
        "description": "Get marketplace agreement.",
        "operationId": "MarketplaceAgreements_GetAgreement",
        "parameters": [
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          },
          {
            "$ref": "#/parameters/PublishersParameter"
          },
          {
            "$ref": "#/parameters/OffersParameter"
          },
          {
            "$ref": "#/parameters/PlansParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Terms returned successfully",
            "schema": {
              "$ref": "#/definitions/AgreementTerms"
            }
          }
        },
        "x-ms-examples": {
          "SetMarketplaceTerms": {
            "parameters": {
              "api-version": "2016-04-01",
              "offerId": "offid",
              "planId": "planid",
              "publisherId": "pubid",
              "subscriptionId": "subid"
            },
            "responses": {
              "200": {
                "body": {
                  "id": "id",
                  "name": "planid",
                  "properties": {
                    "accepted": true,
                    "licenseTextLink": "test.licenseLink",
                    "plan": "planid",
                    "privacyPolicyLink": "test.privacyPolicyLink",
                    "product": "offid",
                    "publisher": "pubid",
                    "retrieveDatetime": "2017-08-15T11:33:07.12132Z",
                    "signature": "ASDFSDAFWEFASDGWERLWER"
                  },
                  "type": "Microsoft.MarketplaceOrdering/offertypes"
                }
              }
            }
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/providers/Microsoft.MarketplaceOrdering/agreements/{publisherId}/offers/{offerId}/plans/{planId}/cancel": {
      "post": {
        "description": "Cancel marketplace terms.",
        "operationId": "MarketplaceAgreements_Cancel",
        "parameters": [
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          },
          {
            "$ref": "#/parameters/PublishersParameter"
          },
          {
            "$ref": "#/parameters/OffersParameter"
          },
          {
            "$ref": "#/parameters/PlansParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "OK. The request was successfully processed and the terms were rejected.",
            "schema": {
              "$ref": "#/definitions/AgreementTerms"
            }
          },
          "default": {
            "description": "Microsoft.MarketplaceOrdering error response describing why the operation failed.",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        },
        "x-ms-examples": {
          "SetMarketplaceTerms": {
            "parameters": {
              "api-version": "2016-04-01",
              "offerId": "offid",
              "planId": "planid",
              "publisherId": "pubid",
              "subscriptionId": "subid"
            },
            "responses": {
              "200": {
                "body": {
                  "id": "id",
                  "name": "planid",
                  "properties": {
                    "accepted": false,
                    "licenseTextLink": "test.licenseLink",
                    "plan": "planid",
                    "privacyPolicyLink": "test.privacyPolicyLink",
                    "product": "offid",
                    "publisher": "pubid",
                    "retrieveDatetime": "2017-08-15T11:33:07.12132Z",
                    "signature": "ASDFSDAFWEFASDGWERLWER"
                  },
                  "type": "Microsoft.MarketplaceOrdering/offertypes"
                }
              }
            }
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/providers/Microsoft.MarketplaceOrdering/agreements/{publisherId}/offers/{offerId}/plans/{planId}/sign": {
      "post": {
        "description": "Sign marketplace terms.",
        "operationId": "MarketplaceAgreements_Sign",
        "parameters": [
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          },
          {
            "$ref": "#/parameters/PublishersParameter"
          },
          {
            "$ref": "#/parameters/OffersParameter"
          },
          {
            "$ref": "#/parameters/PlansParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "OK. The request was successfully processed and the terms were accepted.",
            "schema": {
              "$ref": "#/definitions/AgreementTerms"
            }
          },
          "default": {
            "description": "Microsoft.MarketplaceOrdering error response describing why the operation failed.",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        },
        "x-ms-examples": {
          "SetMarketplaceTerms": {
            "parameters": {
              "api-version": "2016-04-01",
              "offerId": "offid",
              "planId": "planid",
              "publisherId": "pubid",
              "subscriptionId": "subid"
            },
            "responses": {
              "200": {
                "body": {
                  "id": "id",
                  "name": "planid",
                  "properties": {
                    "accepted": true,
                    "licenseTextLink": "test.licenseLink",
                    "plan": "planid",
                    "privacyPolicyLink": "test.privacyPolicyLink",
                    "product": "offid",
                    "publisher": "pubid",
                    "retrieveDatetime": "2017-08-15T11:33:07.12132Z",
                    "signature": "ASDFSDAFWEFASDGWERLWER"
                  },
                  "type": "Microsoft.MarketplaceOrdering/offertypes"
                }
              }
            }
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/providers/Microsoft.MarketplaceOrdering/offerTypes/{offerType}/publishers/{publisherId}/offers/{offerId}/plans/{planId}/agreements/current": {
      "get": {
        "description": "Get marketplace terms.",
        "operationId": "MarketplaceAgreements_Get",
        "parameters": [
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          },
          {
            "$ref": "#/parameters/OfferTypeParameter"
          },
          {
            "$ref": "#/parameters/PublishersParameter"
          },
          {
            "$ref": "#/parameters/OffersParameter"
          },
          {
            "$ref": "#/parameters/PlansParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Terms returned successfully",
            "schema": {
              "$ref": "#/definitions/AgreementTerms"
            }
          }
        },
        "x-ms-examples": {
          "GetMarketplaceTerms": {
            "parameters": {
              "api-version": "2016-04-01",
              "offerId": "offid",
              "offerType": "virtualmachine",
              "planId": "planid",
              "publisherId": "pubid",
              "subscriptionId": "subid"
            },
            "responses": {
              "200": {
                "body": {
                  "id": "id",
                  "name": "planid",
                  "properties": {
                    "accepted": true,
                    "licenseTextLink": "test.licenseLink",
                    "plan": "planid",
                    "privacyPolicyLink": "test.privacyPolicyLink",
                    "product": "offid",
                    "publisher": "pubid",
                    "retrieveDatetime": "2017-08-15T11:33:07.12132Z",
                    "signature": "ASDFSDAFWEFASDGWERLWER"
                  },
                  "type": "Microsoft.MarketplaceOrdering/offertypes"
                }
              }
            }
          }
        }
      },
      "put": {
        "description": "Save marketplace terms.",
        "operationId": "MarketplaceAgreements_Create",
        "parameters": [
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/parameters/OfferTypeParameter"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          },
          {
            "$ref": "#/parameters/PublishersParameter"
          },
          {
            "$ref": "#/parameters/OffersParameter"
          },
          {
            "$ref": "#/parameters/PlansParameter"
          },
          {
            "description": "Parameters supplied to the Create Marketplace Terms operation.",
            "in": "body",
            "name": "parameters",
            "required": true,
            "schema": {
              "$ref": "#/definitions/AgreementTerms"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK. The request was successfully processed and the terms were accepted or acceptance revoked as per the request body.",
            "schema": {
              "$ref": "#/definitions/AgreementTerms"
            }
          },
          "default": {
            "description": "Microsoft.MarketplaceOrdering error response describing why the operation failed.",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        },
        "x-ms-examples": {
          "SetMarketplaceTerms": {
            "parameters": {
              "api-version": "2016-04-01",
              "offerId": "offid",
              "offerType": "virtualmachine",
              "parameters": {
                "id": "id",
                "name": "planid",
                "properties": {
                  "accepted": false,
                  "licenseTextLink": "test.licenseLink",
                  "plan": "planid",
                  "privacyPolicyLink": "test.privacyPolicyLink",
                  "product": "offid",
                  "publisher": "pubid",
                  "retrieveDatetime": "2017-08-15T11:33:07.12132Z",
                  "signature": "ASDFSDAFWEFASDGWERLWER"
                },
                "type": "Microsoft.MarketplaceOrdering/offertypes"
              },
              "planId": "planid",
              "publisherId": "pubid",
              "subscriptionId": "subid"
            },
            "responses": {
              "200": {
                "body": {
                  "id": "id",
                  "name": "planid",
                  "properties": {
                    "accepted": true,
                    "licenseTextLink": "test.licenseLink",
                    "plan": "planid",
                    "privacyPolicyLink": "test.privacyPolicyLink",
                    "product": "offid",
                    "publisher": "pubid",
                    "retrieveDatetime": "2017-08-15T11:33:07.12132Z",
                    "signature": "ASDFSDAFWEFASDGWERLWER"
                  },
                  "type": "Microsoft.MarketplaceOrdering/offertypes"
                },
                "description": "OK. The request was successfully processed and the terms were accepted or acceptance revoked as per the request body."
              }
            }
          }
        }
      }
    }
  },
  "definitions": {
    "AgreementProperties": {
      "description": "Agreement Terms definition",
      "properties": {
        "accepted": {
          "description": "If any version of the terms have been accepted, otherwise false.",
          "type": "boolean"
        },
        "licenseTextLink": {
          "description": "Link to HTML with Microsoft and Publisher terms.",
          "type": "string"
        },
        "plan": {
          "description": "Plan identifier string of image being deployed.",
          "type": "string"
        },
        "privacyPolicyLink": {
          "description": "Link to the privacy policy of the publisher.",
          "type": "string"
        },
        "product": {
          "description": "Offer identifier string of image being deployed.",
          "type": "string"
        },
        "publisher": {
          "description": "Publisher identifier string of image being deployed.",
          "type": "string"
        },
        "retrieveDatetime": {
          "description": "Date and time in UTC of when the terms were accepted. This is empty if Accepted is false.",
          "format": "date-time",
          "type": "string"
        },
        "signature": {
          "description": "Terms signature.",
          "type": "string"
        }
      }
    },
    "AgreementTerms": {
      "allOf": [
        {
          "$ref": "#/definitions/Resource"
        }
      ],
      "description": "Terms properties for provided Publisher/Offer/Plan tuple",
      "properties": {
        "properties": {
          "$ref": "#/definitions/AgreementProperties",
          "description": "Represents the properties of the resource.",
          "x-ms-client-flatten": true
        }
      }
    },
    "ErrorResponse": {
      "description": "Error response indicates Microsoft.MarketplaceOrdering service is not able to process the incoming request. The reason is provided in the error message.",
      "properties": {
        "error": {
          "description": "The details of the error.",
          "properties": {
            "code": {
              "description": "Error code.",
              "readOnly": true,
              "type": "string"
            },
            "message": {
              "description": "Error message indicating why the operation failed.",
              "readOnly": true,
              "type": "string"
            }
          }
        }
      },
      "type": "object"
    },
    "Operation": {
      "description": "Microsoft.MarketplaceOrdering REST API operation",
      "properties": {
        "display": {
          "description": "The object that represents the operation.",
          "properties": {
            "operation": {
              "description": "Operation type: Get Agreement, Sign Agreement, Cancel Agreement etc.",
              "type": "string"
            },
            "provider": {
              "description": "Service provider: Microsoft.MarketplaceOrdering",
              "type": "string"
            },
            "resource": {
              "description": "Resource on which the operation is performed: Agreement, virtualmachine, etc.",
              "type": "string"
            }
          }
        },
        "name": {
          "description": "Operation name: {provider}/{resource}/{operation}",
          "type": "string"
        }
      },
      "type": "object"
    },
    "OperationListResult": {
      "description": "Result of the request to list MarketplaceOrdering operations. It contains a list of operations and a URL link to get the next set of results.",
      "properties": {
        "nextLink": {
          "description": "URL to get the next set of operation list results if there are any.",
          "readOnly": true,
          "type": "string"
        },
        "value": {
          "description": "List of Microsoft.MarketplaceOrdering operations supported by the Microsoft.MarketplaceOrdering resource provider.",
          "items": {
            "$ref": "#/definitions/Operation"
          },
          "type": "array"
        }
      }
    },
    "Resource": {
      "description": "ARM resource.",
      "properties": {
        "id": {
          "description": "Resource ID.",
          "readOnly": true,
          "type": "string"
        },
        "name": {
          "description": "Resource name.",
          "readOnly": true,
          "type": "string"
        },
        "type": {
          "description": "Resource type.",
          "readOnly": true,
          "type": "string"
        }
      },
      "x-ms-azure-resource": true
    }
  }
}