Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Unable to create proxy via Management API with upload request.

I'm running the following curl request: 

curl --fail-with-body --request POST 'https://api.enterprise.apigee.com/v1/organizations/<REDACTED>-nonprod/apis/DataAPIProxy-TODDA?action=im
port' --header 'Authorization: Bearer <REDACTED>' --header Content-Type="multipart/form-data" --form 'file=@new-proxy.zip'

(Note RECACTED data has been removed for security purposes.  And I'm seeing the following error message:

 
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 17974 100 164 100 17810 300 32610 --:--:-- --:--:-- --:--:-- 32979{
"code" : "messaging.config.beans.ProtocolMissingInURL",
"message" : "Target Target default: Protocol is missing in /todd-sample-1-proxy",
"contexts" : [ ]
}
curl: (22) The requested URL returned error: 400

I'm thinking there is something wrong with one of the xml files in the zip file?  I downloaded the zip file and modified some of the xml but am not seeing a protocal element in any of the xml files.

Solved Solved
0 2 194
1 ACCEPTED SOLUTION

I'm thinking there is something wrong with one of the xml files in the zip file? I downloaded the zip file and modified some of the xml but am not seeing a protocal element in any of the xml files.

Yes, you're pretty close.

The error message is telling you that a protocol is missing, but it's not referring to a Protocol element. My interpretation of the error is:

  • The file you should look at is probably /apiproxy/targets/default.xml . The message says "Target default".
  • The element is probably URL. (This is a child of HTTPTargetEndpoint.)
  • the problem is the text within the URL element does not have http:// or https:// as a prefix. That's the protocol. I think a better word might be scheme.

One note - if you run your apiproxy through apigeelint, you should see a similar error, and it may be more clearly communicated.

Good luck!

View solution in original post

2 REPLIES 2

I'm thinking there is something wrong with one of the xml files in the zip file? I downloaded the zip file and modified some of the xml but am not seeing a protocal element in any of the xml files.

Yes, you're pretty close.

The error message is telling you that a protocol is missing, but it's not referring to a Protocol element. My interpretation of the error is:

  • The file you should look at is probably /apiproxy/targets/default.xml . The message says "Target default".
  • The element is probably URL. (This is a child of HTTPTargetEndpoint.)
  • the problem is the text within the URL element does not have http:// or https:// as a prefix. That's the protocol. I think a better word might be scheme.

One note - if you run your apiproxy through apigeelint, you should see a similar error, and it may be more clearly communicated.

Good luck!

Exactly as dchiesa1 described.  I had missed the https:// prefix.  Once added everything worked.  Thank you!