Skip to content

Instantly share code, notes, and snippets.

@arsenvlad
Created September 10, 2020 03:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arsenvlad/dfe181c4de8ad168d9cf71dc55997c41 to your computer and use it in GitHub Desktop.
Save arsenvlad/dfe181c4de8ad168d9cf71dc55997c41 to your computer and use it in GitHub Desktop.
CppApiPostmanCollection.json
{
"info": {
"_postman_id": "e5378cf3-00bd-0947-92b8-da5e65026cbb",
"name": "CPP API",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Get token for https://cloudpartner.azure.com",
"event": [
{
"listen": "test",
"script": {
"id": "f15b7be5-f542-448f-abfc-26e01b666bdd",
"exec": [
"var jsonData = JSON.parse(responseBody);\r",
"postman.setEnvironmentVariable(\"CPPAPI_ACCESS_TOKEN\", jsonData.access_token)"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/x-www-form-urlencoded"
}
],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "grant_type",
"value": "client_credentials",
"type": "text"
},
{
"key": "client_id",
"value": "",
"type": "text"
},
{
"key": "client_secret",
"value": "",
"type": "text"
},
{
"key": "resource",
"value": "https://cloudpartner.azure.com",
"type": "text"
}
]
},
"url": {
"raw": "https://login.microsoftonline.com/5eee7612-8026-4f23-b139-71c04bfd9e64/oauth2/token",
"protocol": "https",
"host": [
"login",
"microsoftonline",
"com"
],
"path": [
"5eee7612-8026-4f23-b139-71c04bfd9e64",
"oauth2",
"token"
]
}
},
"response": []
},
{
"name": "Get Offers",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{CPPAPI_ACCESS_TOKEN}}",
"type": "string"
}
]
},
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json"
}
],
"url": {
"raw": "https://cloudpartner.azure.com/api/publishers/test_fta_titania1591733913737/offers?api-version=2017-10-31",
"protocol": "https",
"host": [
"cloudpartner",
"azure",
"com"
],
"path": [
"api",
"publishers",
"test_fta_titania1591733913737",
"offers"
],
"query": [
{
"key": "api-version",
"value": "2017-10-31"
}
]
}
},
"response": []
},
{
"name": "Get Specific Offer",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{CPPAPI_ACCESS_TOKEN}}",
"type": "string"
}
]
},
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json"
}
],
"url": {
"raw": "https://cloudpartner.azure.com/api/publishers/test_fta_titania1591733913737/offers/test_arsenv_vm01?api-version=2017-10-31",
"protocol": "https",
"host": [
"cloudpartner",
"azure",
"com"
],
"path": [
"api",
"publishers",
"test_fta_titania1591733913737",
"offers",
"test_arsenv_vm01"
],
"query": [
{
"key": "api-version",
"value": "2017-10-31"
}
]
}
},
"response": []
},
{
"name": "Get Offer Status",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{CPPAPI_ACCESS_TOKEN}}",
"type": "string"
}
]
},
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json"
}
],
"url": {
"raw": "https://cloudpartner.azure.com/api/publishers/test_fta_titania1591733913737/offers/test_arsenv_vm01/status?api-version=2017-10-31",
"protocol": "https",
"host": [
"cloudpartner",
"azure",
"com"
],
"path": [
"api",
"publishers",
"test_fta_titania1591733913737",
"offers",
"test_arsenv_vm01",
"status"
],
"query": [
{
"key": "api-version",
"value": "2017-10-31"
}
]
}
},
"response": []
},
{
"name": "Get Submissions",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{CPPAPI_ACCESS_TOKEN}}",
"type": "string"
}
]
},
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json"
}
],
"url": {
"raw": "https://cloudpartner.azure.com/api/publishers/test_fta_titania1591733913737/offers/test_arsenv_vm01/submissions?api-version=2017-10-31",
"protocol": "https",
"host": [
"cloudpartner",
"azure",
"com"
],
"path": [
"api",
"publishers",
"test_fta_titania1591733913737",
"offers",
"test_arsenv_vm01",
"submissions"
],
"query": [
{
"key": "api-version",
"value": "2017-10-31"
}
]
}
},
"response": []
},
{
"name": "Publish Offer",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{CPPAPI_ACCESS_TOKEN}}",
"type": "string"
}
]
},
"method": "POST",
"header": [
{
"key": "Accept",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{ \r\n\"metadata\": {\r\n \"notification-emails\": \"arsenv@microsoft.com\"\r\n }\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://cloudpartner.azure.com/api/publishers/test_fta_titania1591733913737/offers/test_arsenv_vm01/publish?api-version=2017-10-31",
"protocol": "https",
"host": [
"cloudpartner",
"azure",
"com"
],
"path": [
"api",
"publishers",
"test_fta_titania1591733913737",
"offers",
"test_arsenv_vm01",
"publish"
],
"query": [
{
"key": "api-version",
"value": "2017-10-31"
}
]
}
},
"response": []
},
{
"name": "Update Offer",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{CPPAPI_ACCESS_TOKEN}}",
"type": "string"
}
]
},
"method": "PUT",
"header": [
{
"key": "Accept",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\r\n \"offerTypeId\": \"microsoft-azure-virtualmachines\",\r\n \"publisherId\": \"test_fta_titania1591733913737\",\r\n \"status\": \"waitingForPublisherReview\",\r\n \"pcMigrationStatus\": \"migrated\",\r\n \"pcRedirectUri\": \"https://partner.microsoft.com/en-us/dashboard/commercial-marketplace/offers/ad5fce5a-c428-477e-b5ff-45d6a23b64c4/overview\",\r\n \"isvUpgradeRequest\": false,\r\n \"version\": 1000,\r\n \"id\": \"test_arsenv_vm01\",\r\n \"definition\": {\r\n \"displayText\": \"test_arsenv_vm01\",\r\n \"offer\": {\r\n \"microsoft-azure-marketplace.leadDestination\": \"Table\",\r\n \"microsoft-azure-marketplace.blobLeadConfiguration\": {},\r\n \"microsoft-azure-marketplace.crmLeadConfiguration\": {},\r\n \"microsoft-azure-marketplace.httpsEndpointLeadConfiguration\": {},\r\n \"microsoft-azure-marketplace.marketoLeadConfiguration\": {},\r\n \"microsoft-azure-marketplace.salesForceLeadConfiguration\": {},\r\n \"microsoft-azure-marketplace.tableLeadConfiguration\": {\r\n \"connectionString\": \"DefaultEndpointsProtocol=https;AccountName=ftaisvstorageeastus2;AccountKey=/6FRYOW5DUnaOUVCt0d1jMTBpMt9hyzT7E9BZpt6kU65xl7E/rXbNyMQ+bg+Q99JK9c1odT/VvYQbmI3yVVZQQ==;EndpointSuffix=core.windows.net\"\r\n },\r\n \"microsoft-azure-marketplace-testdrive.enabled\": true,\r\n \"microsoft-azure-marketplace.allowedSubscriptions\": [\r\n \"c9c8ae57-acdb-48a9-99f8-d57704f18dee\"\r\n ],\r\n \"microsoft-azure-marketplace-testdrive.appId\": null,\r\n \"microsoft-azure-marketplace-testdrive.appKey\": null,\r\n \"microsoft-azure-marketplace-testdrive.tenantId\": null,\r\n \"microsoft-azure-marketplace-testdrive.subscriptionId\": null,\r\n \"microsoft-azure-marketplace-testdrive.testDriveDuration\": \"2\",\r\n \"microsoft-azure-marketplace-testdrive.instances\": {\r\n \"warmInstancesPerRegion\": 1,\r\n \"regions\": [\r\n \"eastus\"\r\n ],\r\n \"hotInstancesPerRegion\": 1,\r\n \"coldInstancesPerRegion\": 1\r\n },\r\n \"microsoft-azure-marketplace-testdrive.deploymentArtifacts\": null,\r\n \"microsoft-azure-marketplace.useEnterpriseContract\": true,\r\n \"microsoft-azure-marketplace.termsOfUse\": \"\",\r\n \"microsoft-azure-marketplace.universalAmendmentTerms\": \"\",\r\n \"microsoft-azure-marketplace.customAmendments\": {},\r\n \"microsoft-azure-marketplace.categories\": [],\r\n \"microsoft-azure-marketplace.categoryMap\": [\r\n {\r\n \"categoryL1\": \"compute\",\r\n \"categoryL2-compute\": [\r\n \"application-infrastructure\"\r\n ]\r\n }\r\n ],\r\n \"microsoft-azure-marketplace.title\": \"test_arsenv_vm01\",\r\n \"microsoft-azure-marketplace.offerMarketingUrlIdentifier\": \"test-arsenv-vm01\",\r\n \"microsoft-azure-marketplace.summary\": \"test_arsenv_vm01 search results summary\",\r\n \"microsoft-azure-marketplace.longSummary\": \"test_arsenv_vm01 long summary\",\r\n \"microsoft-azure-marketplace.description\": \"test_arsenv_vm01 description\",\r\n \"microsoft-azure-marketplace.privacyURL\": \"https://www.microsoft.com/privacy\",\r\n \"microsoft-azure-marketplace.fairfaxSupportUrl\": \"\",\r\n \"microsoft-azure-marketplace.publicAzureSupportUrl\": \"\",\r\n \"microsoft-azure-marketplace.engineeringContactName\": \"Arsen Vladimirskiy\",\r\n \"microsoft-azure-marketplace.engineeringContactEmail\": \"arsenv@microsoft.com\",\r\n \"microsoft-azure-marketplace.engineeringContactPhone\": \"555-555-5555\",\r\n \"microsoft-azure-marketplace.supportContactName\": \"Arsen Vladimirskiy\",\r\n \"microsoft-azure-marketplace.supportContactEmail\": \"arsenv@microsoft.com\",\r\n \"microsoft-azure-marketplace.supportContactPhone\": \"555-555-5555\",\r\n \"microsoft-azure-marketplace.usefulLinks\": [\r\n {\r\n \"linkTitle\": \"Microsoft\",\r\n \"linkUrl\": \"https://www.microsoft.com/\"\r\n }\r\n ],\r\n \"microsoft-azure-marketplace.smallLogo\": \"https://gamesingestion3.blob.core.windows.net/69912f5a-302d-43c2-a381-7752ccbe9ca5/48x48.png?sv=2016-05-31&sr=c&si=69912f5a-302d-43c2-a381-7752ccbe9ca52020-7-10-00-07-57&sig=8NYsyVjwGjJNtzFY54aWhiFudQ4%2FkwIY7%2FNSYiEQ8VM%3D&se=2020-09-15T01%3A31%3A08Z&t=DCE\",\r\n \"microsoft-azure-marketplace.mediumLogo\": \"https://gamesingestion4.blob.core.windows.net/878a3657-995c-447f-991a-1d604c404dd8/90x90.png?sv=2016-05-31&sr=c&si=878a3657-995c-447f-991a-1d604c404dd82020-7-10-00-07-00&sig=kmYHRR1FWaIGw1A9tLafnmlkO%2FmUcCYP56M%2FRZoFj5w%3D&se=2020-09-15T01%3A31%3A08Z&t=DCE\",\r\n \"microsoft-azure-marketplace.largeLogo\": \"https://gamesingestion5.blob.core.windows.net/43068201-8769-4447-ba00-45233ae0b91f/216x216.png?sv=2016-05-31&sr=c&si=43068201-8769-4447-ba00-45233ae0b91f2020-7-10-00-07-03&sig=STH03DDx8bPN9Xf2OcmQvAvq%2F9gIekqI5zibyZU4dJE%3D&se=2022-07-29T16%3A10%3A42Z&t=DCE\",\r\n \"microsoft-azure-marketplace.wideLogo\": \"https://gamesingestion7.blob.core.windows.net/dc63eaf6-d191-4ef0-99cd-211e975bf5c3/255x115.png?sv=2016-05-31&sr=c&si=dc63eaf6-d191-4ef0-99cd-211e975bf5c32020-7-10-00-07-06&sig=FNQxH8BUdjWYdgWemejx%2BeM5thF0k1nBaRPJfEbr2p8%3D&se=2020-09-15T01%3A31%3A08Z&t=DCE\",\r\n \"microsoft-azure-marketplace.screenshots\": [\r\n {\r\n \"screenshotName\": \"Sample Image 1\",\r\n \"screenshotImage\": \"https://gamesingestion6.blob.core.windows.net/fcdf1aa4-975b-45eb-a631-d591bd91ad59/screenshot1_1280x720.png?sv=2016-05-31&sr=c&si=fcdf1aa4-975b-45eb-a631-d591bd91ad592020-7-10-00-07-13&sig=Cog1zxepVUP0nc4mwFKqPBn0pBXJGat201ZX4p8nhEU%3D&se=2020-09-15T01%3A31%3A08Z&t=DCE\"\r\n }\r\n ],\r\n \"microsoft-azure-marketplace.videos\": [],\r\n \"microsoft-azure-marketplace-testdrive.description\": null,\r\n \"microsoft-azure-marketplace-testdrive.accessInformation\": null,\r\n \"microsoft-azure-marketplace-testdrive.videos\": [],\r\n \"microsoft-azure-marketplace-testdrive.userManual\": \"\",\r\n \"microsoft-azure-virtualmachines.managerContactName\": \"\",\r\n \"microsoft-azure-virtualmachines.managerContactEmail\": \"\",\r\n \"microsoft-azure-virtualmachines.managerContactPhone\": \"\",\r\n \"microsoft-azure-virtualmachines.gtmMaterials\": \"\"\r\n },\r\n \"plans\": [\r\n {\r\n \"planId\": \"plan01\",\r\n \"microsoft-azure-virtualmachines.cloudAvailability\": [\r\n \"PublicAzure\"\r\n ],\r\n \"microsoft-azure-virtualmachines.certificationsFairfax\": [],\r\n \"microsoft-azure-virtualmachines.hideSKUForSolutionTemplate\": false,\r\n \"virtualMachinePricingV2\": {\r\n \"isByol\": true,\r\n \"freeTrialDurationInMonths\": 0\r\n },\r\n \"regions\": [\r\n \"AD\",\r\n \"AE\",\r\n \"AF\",\r\n \"AL\",\r\n \"AM\",\r\n \"AO\",\r\n \"AR\",\r\n \"AT\",\r\n \"AU\",\r\n \"AZ\",\r\n \"BA\",\r\n \"BB\",\r\n \"BD\",\r\n \"BE\",\r\n \"BG\",\r\n \"BH\",\r\n \"BM\",\r\n \"BN\",\r\n \"BO\",\r\n \"BR\",\r\n \"BW\",\r\n \"BY\",\r\n \"BZ\",\r\n \"CA\",\r\n \"CH\",\r\n \"CI\",\r\n \"CL\",\r\n \"CM\",\r\n \"CN\",\r\n \"CO\",\r\n \"CR\",\r\n \"CV\",\r\n \"CW\",\r\n \"CY\",\r\n \"CZ\",\r\n \"DE\",\r\n \"DK\",\r\n \"DO\",\r\n \"DZ\",\r\n \"EC\",\r\n \"EE\",\r\n \"EG\",\r\n \"ES\",\r\n \"ET\",\r\n \"FI\",\r\n \"FJ\",\r\n \"FO\",\r\n \"FR\",\r\n \"GB\",\r\n \"GE\",\r\n \"GH\",\r\n \"GR\",\r\n \"GT\",\r\n \"HK\",\r\n \"HN\",\r\n \"HR\",\r\n \"HU\",\r\n \"ID\",\r\n \"IE\",\r\n \"IL\",\r\n \"IN\",\r\n \"IQ\",\r\n \"IS\",\r\n \"IT\",\r\n \"JM\",\r\n \"JO\",\r\n \"JP\",\r\n \"KE\",\r\n \"KG\",\r\n \"KN\",\r\n \"KR\",\r\n \"KW\",\r\n \"KY\",\r\n \"KZ\",\r\n \"LB\",\r\n \"LI\",\r\n \"LK\",\r\n \"LT\",\r\n \"LU\",\r\n \"LV\",\r\n \"LY\",\r\n \"MA\",\r\n \"MC\",\r\n \"MD\",\r\n \"ME\",\r\n \"MK\",\r\n \"MN\",\r\n \"MO\",\r\n \"MT\",\r\n \"MU\",\r\n \"MX\",\r\n \"MY\",\r\n \"NA\",\r\n \"NG\",\r\n \"NI\",\r\n \"NL\",\r\n \"NO\",\r\n \"NP\",\r\n \"NZ\",\r\n \"OM\",\r\n \"PA\",\r\n \"PE\",\r\n \"PH\",\r\n \"PK\",\r\n \"PL\",\r\n \"PR\",\r\n \"PS\",\r\n \"PT\",\r\n \"PY\",\r\n \"QA\",\r\n \"RO\",\r\n \"RS\",\r\n \"RU\",\r\n \"RW\",\r\n \"SA\",\r\n \"SE\",\r\n \"SG\",\r\n \"SI\",\r\n \"SK\",\r\n \"SN\",\r\n \"SV\",\r\n \"TH\",\r\n \"TJ\",\r\n \"TM\",\r\n \"TN\",\r\n \"TR\",\r\n \"TT\",\r\n \"TW\",\r\n \"TZ\",\r\n \"UA\",\r\n \"UG\",\r\n \"US\",\r\n \"UY\",\r\n \"UZ\",\r\n \"VA\",\r\n \"VE\",\r\n \"VI\",\r\n \"VN\",\r\n \"YE\",\r\n \"ZA\",\r\n \"ZM\",\r\n \"ZW\"\r\n ],\r\n \"restrictedAudience\": {\r\n \"manualEntries\": [\r\n {\r\n \"id\": \"c9c8ae57-acdb-48a9-99f8-d57704f18dee\",\r\n \"description\": \"Arsen Internal\",\r\n \"type\": \"subscriptionId\"\r\n }\r\n ]\r\n },\r\n \"virtualMachinePricing\": {\r\n \"isByol\": true,\r\n \"freeTrialDurationInMonths\": 0\r\n },\r\n \"microsoft-azure-virtualmachines.openPorts\": [\r\n {\r\n \"portLabel\": \"SSH\",\r\n \"privatePort\": \"22\",\r\n \"protocol\": \"TCP\",\r\n \"publicPort\": \"22\"\r\n }\r\n ],\r\n \"microsoft-azure-virtualmachines.operatingSystemFamily\": \"Linux\",\r\n \"microsoft-azure-virtualmachines.operationSystem\": \"18.04-LTS\",\r\n \"microsoft-azure-virtualmachines.osType\": \"Ubuntu\",\r\n \"microsoft-azure-virtualmachines.recommendedVMSizes\": [\r\n \"ds2-standard-v2\",\r\n \"ds3-standard-v2\",\r\n \"ds4-standard-v2\"\r\n ],\r\n \"microsoft-azure-virtualmachines.supportsAcceleratedNetworking\": true,\r\n \"microsoft-azure-virtualmachines.allowOnlyManagedDiskDeployments\": true,\r\n \"microsoft-azure-virtualmachines.vmImages\": {\r\n \"1.0.0\": {\r\n \"osVhdUrl\": \"https://lustreimageswestus.blob.core.windows.net/vhds/userImageVMosDisk1.vhd?sv=2019-10-10&st=2020-09-09T01%3A18%3A00Z&se=2020-10-11T01%3A18%3A00Z&sr=c&sp=rl&sig=qvWpjowifwsifXin027WwBEFl8SgCtHcDmNY0zqqse8%3D\",\r\n \"lunVhdDetails\": []\r\n }\r\n },\r\n \"microsoft-azure-virtualmachines.skuTitle\": \"plan01\",\r\n \"microsoft-azure-virtualmachines.skuSummary\": \"plan01 summary\",\r\n \"microsoft-azure-virtualmachines.skuDescription\": \"plan01 description\"\r\n }\r\n ]\r\n },\r\n \"changedTime\": \"2020-09-10T01:45:01.4241782Z\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://cloudpartner.azure.com/api/publishers/test_fta_titania1591733913737/offers/test_arsenv_vm01?api-version=2017-10-31",
"protocol": "https",
"host": [
"cloudpartner",
"azure",
"com"
],
"path": [
"api",
"publishers",
"test_fta_titania1591733913737",
"offers",
"test_arsenv_vm01"
],
"query": [
{
"key": "api-version",
"value": "2017-10-31"
}
]
}
},
"response": []
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment