And I have asked you about the yaml files issue also for publishing a product by bypassing.
If possible please guide me in that as well.
Original Message:
Sent: Wed June 07, 2023 04:40 AM
From: Nick Cawood
Subject: Trying to supersede a product using REST APIs of API Connect
Agreed Chris.
@Stefen Salvatore here is the body for the Supersede (and Replace) calls:
--data-raw '{"product_url":"https://api-connect-mgmt.ibm.com/api/catalogs{catalog-id}products/{staged-product-id}","plans":[{"source":"default-plan","target":"default-plan"}]}'
the plan listed is an example as is the URL-hostname in the product_url.
As Chris suggested, I used the APIM UI to extract the detail, see my blog for more details on that process https://community.ibm.com/community/user/integration/blogs/nick-cawood/2023/02/22/some-advice-about-using-the-api-connect-v10-apic-t?CommunityKey=2106cca0-a9f9-45c6-9b28-01a28f4ce947
------------------------------
Nick Cawood
API Connect Consultant
IBM Hybrid Cloud Integration Expert Labs
IBM UK Ltd
https://www.linkedin.com/in/nickcawood/
Original Message:
Sent: Wed June 07, 2023 01:43 AM
From: Chris Dudley
Subject: Trying to supersede a product using REST APIs of API Connect
I'm afraid the body payloads aren't very well documented. It's a known issue that hopefully will get sorted soon.
In the meantime the easiest way to get an example is to use the api manager ui to perform the same operation and check your browser debugger for what was sent, then replicate that payload manually.
Not ideal but effective.
------------------------------
Chris Dudley
Original Message:
Sent: Tue June 06, 2023 08:54 AM
From: Vyasavardhan Ramagiri
Subject: Trying to supersede a product using REST APIs of API Connect
Hi @Steve Linn
I am working on REST MANAGEMENT APIs in API Connect but when I want to supersede a product then I am getting an error.
and I am not aware of the body to be passed to it.
I am taking references from API Explorer (ibmcloud.com).
Since the request body is optional in the above link I have not sent it but then it is throwing the following error.
Error:
{
"status": 400,
"message": [
"Error validating the request body against definition '#/components/schemas/ProductPlanMapping'"
],
"errors": [
"(Request) must be object (line: 0, column: 0)"
]
}
So, what request body should I send to achieve my requirement?
Thanks in advance!
------------------------------
Stefen Salvatore
------------------------------