{
"plans": [
{
"apis": [
{
"id": "db11427d-77f4-4de5-97f2-c6eda2e49798",
"url": "https://api.acme.com/api/catalogs/1839e350-9599-4db1-9262-eca5e2e688e0/bd97659c-2fe5-4257-9c04-97a54cc842d7/apis/db11427d-77f4-4de5-97f2-c6eda2e49798",
"name": "routes",
"title": "Routes",
"version": "1.0.0"
},
{
"id": "473d959e-3d87-4845-bc43-d07ca7d9c71e",
"url": "https://api.acme.com/api/catalogs/1839e350-9599-4db1-9262-eca5e2e688e0/bd97659c-2fe5-4257-9c04-97a54cc842d7/apis/473d959e-3d87-4845-bc43-d07ca7d9c71e",
"name": "trails",
"title": "Hiking Trails",
"version": "1.0.0"
},
{
"id": "cc1e1da0-d61a-42fc-98c1-c2cd9ba16dde",
"url": "https://api.acme.com/api/catalogs/1839e350-9599-4db1-9262-eca5e2e688e0/bd97659c-2fe5-4257-9c04-97a54cc842d7/apis/cc1e1da0-d61a-42fc-98c1-c2cd9ba16dde",
"name": "calculator",
"title": "Calculator",
"version": "1.0.0"
},
{
"id": "e71ad6e1-cb4a-48b0-8569-718930b68cc3",
"url": "https://api.acme.com/api/catalogs/1839e350-9599-4db1-9262-eca5e2e688e0/bd97659c-2fe5-4257-9c04-97a54cc842d7/apis/e71ad6e1-cb4a-48b0-8569-718930b68cc3",
"name": "shape",
"title": "Shape",
"version": "1.0.0"
}
],
"name": "bronze",
"title": "Bronze"
},
{
"apis": [
{
"id": "db11427d-77f4-4de5-97f2-c6eda2e49798",
"url": "https://api.acme.com/api/catalogs/1839e350-9599-4db1-9262-eca5e2e688e0/bd97659c-2fe5-4257-9c04-97a54cc842d7/apis/db11427d-77f4-4de5-97f2-c6eda2e49798",
"name": "routes",
"title": "Routes",
"version": "1.0.0"
},
{
"id": "473d959e-3d87-4845-bc43-d07ca7d9c71e",
"url": "https://api.acme.com/api/catalogs/1839e350-9599-4db1-9262-eca5e2e688e0/bd97659c-2fe5-4257-9c04-97a54cc842d7/apis/473d959e-3d87-4845-bc43-d07ca7d9c71e",
"name": "trails",
"title": "Hiking Trails",
"version": "1.0.0"
},
{
"id": "cc1e1da0-d61a-42fc-98c1-c2cd9ba16dde",
"url": "https://api.acme.com/api/catalogs/1839e350-9599-4db1-9262-eca5e2e688e0/bd97659c-2fe5-4257-9c04-97a54cc842d7/apis/cc1e1da0-d61a-42fc-98c1-c2cd9ba16dde",
"name": "calculator",
"title": "Calculator",
"version": "1.0.0"
},
{
"id": "e71ad6e1-cb4a-48b0-8569-718930b68cc3",
"url": "https://api.acme.com/api/catalogs/1839e350-9599-4db1-9262-eca5e2e688e0/bd97659c-2fe5-4257-9c04-97a54cc842d7/apis/e71ad6e1-cb4a-48b0-8569-718930b68cc3",
"name": "shape",
"title": "Shape",
"version": "1.0.0"
}
],
"name": "silver",
"title": "Silver"
},
{
"apis": [
{
"id": "db11427d-77f4-4de5-97f2-c6eda2e49798",
"url": "https://api.acme.com/api/catalogs/1839e350-9599-4db1-9262-eca5e2e688e0/bd97659c-2fe5-4257-9c04-97a54cc842d7/apis/db11427d-77f4-4de5-97f2-c6eda2e49798",
"name": "routes",
"title": "Routes",
"version": "1.0.0"
},
{
"id": "473d959e-3d87-4845-bc43-d07ca7d9c71e",
"url": "https://api.acme.com/api/catalogs/1839e350-9599-4db1-9262-eca5e2e688e0/bd97659c-2fe5-4257-9c04-97a54cc842d7/apis/473d959e-3d87-4845-bc43-d07ca7d9c71e",
"name": "trails",
"title": "Hiking Trails",
"version": "1.0.0"
},
{
"id": "cc1e1da0-d61a-42fc-98c1-c2cd9ba16dde",
"url": "https://api.acme.com/api/catalogs/1839e350-9599-4db1-9262-eca5e2e688e0/bd97659c-2fe5-4257-9c04-97a54cc842d7/apis/cc1e1da0-d61a-42fc-98c1-c2cd9ba16dde",
"name": "calculator",
"title": "Calculator",
"version": "1.0.0"
},
{
"id": "e71ad6e1-cb4a-48b0-8569-718930b68cc3",
"url": "https://api.acme.com/api/catalogs/1839e350-9599-4db1-9262-eca5e2e688e0/bd97659c-2fe5-4257-9c04-97a54cc842d7/apis/e71ad6e1-cb4a-48b0-8569-718930b68cc3",
"name": "shape",
"title": "Shape",
"version": "1.0.0"
}
],
"name": "gold",
"title": "Gold"
}
]
}
I also
wanted to retrieve plan details of product .we want to use those details in mapping file to replace or supersede the female probability calculator product.------------------------------
colleen camacho
------------------------------
Original Message:
Sent: Wed February 23, 2022 06:24 PM
From: SUMANTO Biswas
Subject: Command to get plan details of product
Hi -
By default `apic products:get` will download APIs, but you can get Plans via following apic command:
apic products:get --scope catalog -s <server> -o <org-name/id> -c <catalog-name/id> hybrid:1.0.0 --format json --output - --fields=plans
In above example, hybrid is name of Product, and 1.0.0 is it's version.
Example output:
{ "plans": [ { "apis": [ { "id": "db11427d-77f4-4de5-97f2-c6eda2e49798", "url": "https://api.acme.com/api/catalogs/1839e350-9599-4db1-9262-eca5e2e688e0/bd97659c-2fe5-4257-9c04-97a54cc842d7/apis/db11427d-77f4-4de5-97f2-c6eda2e49798", "name": "routes", "title": "Routes", "version": "1.0.0" }, { "id": "473d959e-3d87-4845-bc43-d07ca7d9c71e", "url": "https://api.acme.com/api/catalogs/1839e350-9599-4db1-9262-eca5e2e688e0/bd97659c-2fe5-4257-9c04-97a54cc842d7/apis/473d959e-3d87-4845-bc43-d07ca7d9c71e", "name": "trails", "title": "Hiking Trails", "version": "1.0.0" }, { "id": "cc1e1da0-d61a-42fc-98c1-c2cd9ba16dde", "url": "https://api.acme.com/api/catalogs/1839e350-9599-4db1-9262-eca5e2e688e0/bd97659c-2fe5-4257-9c04-97a54cc842d7/apis/cc1e1da0-d61a-42fc-98c1-c2cd9ba16dde", "name": "calculator", "title": "Calculator", "version": "1.0.0" }, { "id": "e71ad6e1-cb4a-48b0-8569-718930b68cc3", "url": "https://api.acme.com/api/catalogs/1839e350-9599-4db1-9262-eca5e2e688e0/bd97659c-2fe5-4257-9c04-97a54cc842d7/apis/e71ad6e1-cb4a-48b0-8569-718930b68cc3", "name": "shape", "title": "Shape", "version": "1.0.0" } ], "name": "bronze", "title": "Bronze" }, { "apis": [ { "id": "db11427d-77f4-4de5-97f2-c6eda2e49798", "url": "https://api.acme.com/api/catalogs/1839e350-9599-4db1-9262-eca5e2e688e0/bd97659c-2fe5-4257-9c04-97a54cc842d7/apis/db11427d-77f4-4de5-97f2-c6eda2e49798", "name": "routes", "title": "Routes", "version": "1.0.0" }, { "id": "473d959e-3d87-4845-bc43-d07ca7d9c71e", "url": "https://api.acme.com/api/catalogs/1839e350-9599-4db1-9262-eca5e2e688e0/bd97659c-2fe5-4257-9c04-97a54cc842d7/apis/473d959e-3d87-4845-bc43-d07ca7d9c71e", "name": "trails", "title": "Hiking Trails", "version": "1.0.0" }, { "id": "cc1e1da0-d61a-42fc-98c1-c2cd9ba16dde", "url": "https://api.acme.com/api/catalogs/1839e350-9599-4db1-9262-eca5e2e688e0/bd97659c-2fe5-4257-9c04-97a54cc842d7/apis/cc1e1da0-d61a-42fc-98c1-c2cd9ba16dde", "name": "calculator", "title": "Calculator", "version": "1.0.0" }, { "id": "e71ad6e1-cb4a-48b0-8569-718930b68cc3", "url": "https://api.acme.com/api/catalogs/1839e350-9599-4db1-9262-eca5e2e688e0/bd97659c-2fe5-4257-9c04-97a54cc842d7/apis/e71ad6e1-cb4a-48b0-8569-718930b68cc3", "name": "shape", "title": "Shape", "version": "1.0.0" } ], "name": "silver", "title": "Silver" }, { "apis": [ { "id": "db11427d-77f4-4de5-97f2-c6eda2e49798", "url": "https://api.acme.com/api/catalogs/1839e350-9599-4db1-9262-eca5e2e688e0/bd97659c-2fe5-4257-9c04-97a54cc842d7/apis/db11427d-77f4-4de5-97f2-c6eda2e49798", "name": "routes", "title": "Routes", "version": "1.0.0" }, { "id": "473d959e-3d87-4845-bc43-d07ca7d9c71e", "url": "https://api.acme.com/api/catalogs/1839e350-9599-4db1-9262-eca5e2e688e0/bd97659c-2fe5-4257-9c04-97a54cc842d7/apis/473d959e-3d87-4845-bc43-d07ca7d9c71e", "name": "trails", "title": "Hiking Trails", "version": "1.0.0" }, { "id": "cc1e1da0-d61a-42fc-98c1-c2cd9ba16dde", "url": "https://api.acme.com/api/catalogs/1839e350-9599-4db1-9262-eca5e2e688e0/bd97659c-2fe5-4257-9c04-97a54cc842d7/apis/cc1e1da0-d61a-42fc-98c1-c2cd9ba16dde", "name": "calculator", "title": "Calculator", "version": "1.0.0" }, { "id": "e71ad6e1-cb4a-48b0-8569-718930b68cc3", "url": "https://api.acme.com/api/catalogs/1839e350-9599-4db1-9262-eca5e2e688e0/bd97659c-2fe5-4257-9c04-97a54cc842d7/apis/e71ad6e1-cb4a-48b0-8569-718930b68cc3", "name": "shape", "title": "Shape", "version": "1.0.0" } ], "name": "gold", "title": "Gold" } ]}
You will that the Product has Gold (gold), Silver (silver), Bronze (bronze) plans, and it also lists APIs under each plan.
Regards,
Sumanto
------------------------------
SUMANTO Biswas
Original Message:
Sent: Tue February 22, 2022 01:25 PM
From: santhoshkumar surisetty
Subject: Command to get plan details of product
Hi ,
as part of ci/cd pipeline for v10 , we want to retrieve plan details of product .we want to use those details in mapping file to replace or supersede the product
apic products:replace climbon:1.0.1 PRODUCT_PLAN_MAPPING_FILE
mapping file content
===================
product_url: https:/server/api/catalogs/{id}/products/{id} plans: - source: {source_plan_name_1} target: {target_plan_name_1} - source: {source_plan_name_2} target: {target_plan_name_2} . . .
------------------------------
santhoshkumar surisetty
------------------------------