I am trying to embed uploading Open API Spec to developer portal into my CI process. I heard a way using management API, but I couldn’t find how to upload them using not URL but the file.
The API I am using is
https://:host/v1/organizations/:org/apimodels/:model/revisions
I heard there are query parameter such as action & format. But when I used format=swagger and ran cURL command as below.
curl -k -X POST -H “Authorization: Basic XXXXXXXXX=” -H “Content-Type:text/plain” -d “@swagger.json” “https://api.enterprise.apigee.com/v1/organizations/kunitomo/apimodels/github/revisions?action=import&format=swagger” -v
I received an error message
“Unable to retrieve details from the swagger URL provided. Please check the swagger URL.”
so I am guessing query parameter “format=swagger” can only be used for URL. So my question is that how do you upload Open API Spec from file?