Hi,
I created API proxy following this . Now I need to app a proxy endpoint to this API proxy. I couldn't find any documentation which I can use.
Does Apigee has one such management API?
Thanks,
Uday
Solved! Go to Solution.
You can. Here's an example.
curl -i -n -X POST -H content-type:application/json \ $mgmtserver/v1/o/$ORG/apis/$PROXYNAME/revisions/$REV/proxies -d '...'
The payload needs to be a proxyendpoint definition. Here's a dummy example, to give you an idea:
{ "connection" : { "basePath" : "/unique-basepath-here", "connectionType" : "httpConnection", "virtualHost" : [ "secure" ] }, "connectionType" : "httpConnection", "description" : "description here", "faultRules" : [ ], "flows" : [ ], "name" : "unique-endpoint-name-here", "postClientFlow" : { "name" : "PostClientFlow", "request" : { "children" : [ ] }, "response" : { "children" : [ ] } }, "postFlow" : { "name" : "PostFlow", "request" : { "children" : [ ] }, "response" : { "children" : [ ] } }, "preFlow" : { "name" : "PreFlow", "request" : { "children" : [ ] }, "response" : { "children" : [ { "Step" : { "name" : "AM-Response" } } ] } }, "routeRule" : [ { "empty" : true, "name" : "NoRouteRule" } ], "routeRuleNames" : [ "NoRouteRule" ], "type" : "Proxy" }
You can. Here's an example.
curl -i -n -X POST -H content-type:application/json \ $mgmtserver/v1/o/$ORG/apis/$PROXYNAME/revisions/$REV/proxies -d '...'
The payload needs to be a proxyendpoint definition. Here's a dummy example, to give you an idea:
{ "connection" : { "basePath" : "/unique-basepath-here", "connectionType" : "httpConnection", "virtualHost" : [ "secure" ] }, "connectionType" : "httpConnection", "description" : "description here", "faultRules" : [ ], "flows" : [ ], "name" : "unique-endpoint-name-here", "postClientFlow" : { "name" : "PostClientFlow", "request" : { "children" : [ ] }, "response" : { "children" : [ ] } }, "postFlow" : { "name" : "PostFlow", "request" : { "children" : [ ] }, "response" : { "children" : [ ] } }, "preFlow" : { "name" : "PreFlow", "request" : { "children" : [ ] }, "response" : { "children" : [ { "Step" : { "name" : "AM-Response" } } ] } }, "routeRule" : [ { "empty" : true, "name" : "NoRouteRule" } ], "routeRuleNames" : [ "NoRouteRule" ], "type" : "Proxy" }
could you please direct me to the link where it is documented? Also I was looking for api to create target endpoint which I failed to locate? Thanks for your help 🙂 @Dino-at-Google
I don't know if this is explicitly documented. It's discoverable if you explore the API by doing something like:
curl -X GET $mgmtserver/v1/o/$ORG/apis/$PROXYNAME curl -X GET $mgmtserver/v1/o/$ORG/apis/$PROXYNAME/revisions curl -X GET $mgmtserver/v1/o/$ORG/apis/$PROXYNAME/revisions/$REV curl -X GET $mgmtserver/v1/o/$ORG/apis/$PROXYNAME/revisions/$REV/proxies
...etc.
Thanks @Dino-at-Google 🙂
User | Count |
---|---|
7 | |
2 | |
2 | |
1 | |
1 |