{ Community }
  • Academy
  • Docs
  • Developers
  • Resources
    • Community Articles
    • Apigee on GitHub
    • Code Samples
    • Videos & eBooks
    • Accelerator Methodology
  • Support
  • Ask a Question
  • Spaces
    • Product Announcements
    • General
    • Edge/API Management
    • Developer Portal (Drupal-based)
    • Developer Portal (Integrated)
    • API Design
    • APIM on Istio
    • Extensions
    • Business of APIs
    • Academy/Certification
    • Adapter for Envoy
    • Analytics
    • Events
    • Hybrid
    • Integration (AWS, PCF, Etc.)
    • Microgateway
    • Monetization
    • Private Cloud Deployment
    • 日本語コミュニティ
    • Insights
    • IoT Apigee Link
    • BaaS/Usergrid
    • BaaS Transition/Migration
    • Apigee-127
    • New Customers
    • Topics
    • Questions
    • Articles
    • Ideas
    • Leaderboard
    • Badges
  • Log in
  • Sign up

Get answers, ideas, and support from the Apigee Community

  • Home /
  • Private Cloud Deployment /
avatar image
2
Question by birute@google.com · Jun 23, 2015 at 07:32 PM · 10.1k Views api proxyPrivate Cloudjsonwadl

How to generate API-Proxy meta data in JSON/WADL format?

Use Case

We have few API proxies hosted in Private Cloud and require to generate proxy description of these existing apis in JSON/WADL ( or any other structure if these are not supported). Idea is to build simple documentation of existing APIs (Base url, Source names, supported HTTP VERB, Input and Output parameters).

Comment
Add comment
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Close

3 Answers

  • Sort: 
avatar image
3

Answer by gnanasekaran · Jun 23, 2015 at 11:28 PM

If you are looking to generate documentation and leverage apigee smartdocs, you could use this utility,

https://github.com/mukundha/apigee-api-model-generator

The documentation can be published in portal or consumed directly using the management server APIs

Comment
Add comment · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
2

Answer by Dino   · Jun 23, 2015 at 09:21 PM

There are tools for exporting the API PRoxy definition into various formats.

Certainly, JSON is easy to generate. For example, this command gets the definition of an API Proxy in JSON format:

curl -i -n https://api.enterprise.apigee.com/v1/o/ORGNAME/apis/APIPROXYNAME/revisions/2/proxies/default

the response looks like this:

{
  "connection" : {
    "basePath" : "/kvm2",
    "connectionType" : "httpConnection",
    "virtualHost" : [ "default" ]
  },
  "connectionType" : "httpConnection",
  "description" : "Default Proxy",
  "faultRules" : [ ],
  "flows" : [ {
    "condition" : "(proxy.pathsuffix MatchesPath \"/add\") and (request.verb = \"GET\")",
    "description" : "PUT one entry into a map",
    "name" : "put one token",
    "request" : {
      "children" : [ {
        "Step" : {
          "faultRules" : [ ],
          "name" : "KVM-PutToken"
        }
      }, {
        "Step" : {
          "faultRules" : [ ],
          "name" : "KVM-GetList"
        }
      } ]
    },
    "response" : {
      "children" : [ {
        "Step" : {
          "faultRules" : [ ],
          "name" : "AssignMessage-PutToken"
        }
      } ]
    }
  }, {
    "condition" : "(proxy.pathsuffix MatchesPath \"/list\") and (request.verb = \"GET\")",
    "name" : "get the KVM entry",
    "request" : {
      "children" : [ {
        "Step" : {
          "faultRules" : [ ],
          "name" : "KVM-GetList"
        }
      } ]
    },
    "response" : {
      "children" : [ {
        "Step" : {
          "faultRules" : [ ],
          "name" : "AssignMessage-GetList"
        }
      } ]
    }
  }, {
    "name" : "unknown request",
    "request" : {
      "children" : [ {
        "Step" : {
          "faultRules" : [ ],
          "name" : "RaiseFault-UnknownRequest"
        }
      } ]
    },
    "response" : {
      "children" : [ ]
    }
  } ],
  "name" : "default",
  "postFlow" : {
    "name" : "PostFlow",
    "request" : {
      "children" : [ ]
    },
    "response" : {
      "children" : [ {
        "Step" : {
          "faultRules" : [ ],
          "name" : "AssignMessage-CleanResponseHeaders"
        }
      } ]
    }
  },
  "preFlow" : {
    "name" : "PreFlow",
    "request" : {
      "children" : [ ]
    },
    "response" : {
      "children" : [ ]
    }
  },
  "routeRule" : [ {
    "empty" : true,
    "name" : "NoTargetRouteRule"
  } ],
  "routeRuleNames" : [ "NoTargetRouteRule" ],
  "type" : "Proxy"
}
 

As you can see, it's JSON, and it includes the basepath, the methods and resources, and so on. This could be mechanically transformed into other formats and layouts, of course.

HTH

Comment
Add comment · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
1

Answer by birute@google.com   · Jun 23, 2015 at 07:33 PM

This can be done manually only, there is no way to generate proxy description through some other process.

For manually creating proxy description of apis with the help of swagger:

https://github.com/swagger-api/swagger-spec/blob/master/versions/1.2.md

Comment
Add comment · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Follow this Question

Answers Answers and Comments

25 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Apiproxy is in missing deployment state 1 Answer

Is there a way to use LDAP authentication instead of Apigee's authentication so that all internal users don't have to register on the Dev Portal too ? 4 Answers

VirtualHost configuration with SSL enabled not working. 0 Answers

Apigee Edge - Outbound proxy setting - http.properties - Log File to debug incase of error ? 1 Answer

Issue [DEVSOL-2418] is merged on the Developer Services portal for Private Cloud 4.17.01 ? 1 Answer

  • Products
    • Edge - APIs
    • Insights - Big Data
    • Plans
  • Developers
    • Overview
    • Documentation
  • Resources
    • Overview
    • Blog
    • Apigee Institute
    • Academy
    • Documentation
  • Company
    • Overview
    • Press
    • Customers
    • Partners
    • Team
    • Events
    • Careers
    • Contact Us
  • Support
    • Support Overview
    • Documentation
    • Status
    • Edge Support Portal
    • Privacy Policy
    • Terms & Conditions
© 2021 Apigee Corp. All rights reserved. - Apigee Community Terms of Use - Powered by AnswerHub
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Create an article
  • Post an idea
  • Spaces
  • Product Announcements
  • General
  • Edge/API Management
  • Developer Portal (Drupal-based)
  • Developer Portal (Integrated)
  • API Design
  • APIM on Istio
  • Extensions
  • Business of APIs
  • Academy/Certification
  • Adapter for Envoy
  • Analytics
  • Events
  • Hybrid
  • Integration (AWS, PCF, Etc.)
  • Microgateway
  • Monetization
  • Private Cloud Deployment
  • 日本語コミュニティ
  • Insights
  • IoT Apigee Link
  • BaaS/Usergrid
  • BaaS Transition/Migration
  • Apigee-127
  • New Customers
  • Explore
  • Topics
  • Questions
  • Articles
  • Ideas
  • Badges