I saw this two request in the blog that seemed to be useful:
curl -v -k -X POST $mgmt-url/api/catalogs/{org}/{catalog}/publish -H 'Accept: application/json' -H "Authorization: Bearer $b" -H "content-type: multipart/form-data" -F "product=@theproduct_1.0.0.yaml;type=application/yaml" -F "openapi=@theapi_1.0.0.yaml;type=application/yaml"
curl -v -k -X POST $mgmt-url/api/catalogs/{org}/{catalog}/publish -H 'Accept: application/json' -H "Content-Type: multipart/form-data" -H "Authorization: Bearer $b" -F "product=@/directory/file/location/fromwsdlProduct_1.0.0.yaml;type=application/yaml" -F "openapi=@/directory/file/location/fromwsdlAPI_1.0.0.yaml;type=application/yaml" -F "wsdl=@/directory/file/location/Client-backend-system-WSDL.wsdl;type=application/wsdl"
I tried them, but the error persists. What I exactly need is to publish a product that already exists as draft. In this case, it creates and publishes directly from the request or from the file. Even filling out the product and the openapi with apparently correct data, I receive the same message: "When spaces are enabled for a catalog the product must be published to a space." Even if the catalog has no spaces enabled.
By the way, what is exactly the difference between publish the product-draft and publish the product? is it that with the draft you have the product done and you just publish it, while with the publish product you create everything from zero?
------------------------------
Jon Iturbe
------------------------------
Original Message:
Sent: Wed October 04, 2023 05:06 AM
From: Nick Cawood
Subject: Publish product from postman
Hi,
Is this blog helpful at all?
https://community.ibm.com/community/user/integration/blogs/nick-cawood/2023/02/23/api-connect-v10-provider-api-calls-api-lifecycle-c?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/
------------------------------