In the examples we discuss here, we use an API named PhoneVerify
FindFeeds, which is based on the online search functionality provided by YouTube (http://www.youtube.com). We use http://gdata.youtube.com/feeds/api/standardfeeds as the Production Url/Endpoint.
|<Enabled>||True/False||Used to enable/disable sending CORS headers from the Gateway. By default, CORS is enabled (True). This is needed for Swagger to function properly.|
|<Access-Control-Allow-Origin>||HTTP and HTTPS Store Address. Change the Host and Port for correct values of your store.E.g.||For example, ||The value of the |
Header values you need to pass when invoking the API. For example, ex:
|Default values are sufficient for Swagger to function.|
|<Access-Control-Allow-Methods>||GET, POST, PUT, DELETE, OPTIONS||Methods required to be supported from the Swagger client.|
- Log in to API Publisher Web interface (https://localhost:9443/publisher), and go to Add API page. Create new API with following information.
- Name: FindFeedsPhoneVerify
- Context: /feedsphoneverify
- Version: 1.0.0
- Appropriate image as the thumbnail
- Endpoint: http://gdata.youtube.com/feeds/api/standardfeeds
- Tiers: Tier: Gold, Silver, Bronze (select all 3 – this field supports multiple values)
- Business owner: Bruce Wayne
- Business owner e-mail: email@example.com
- Technical owner: Peter Parker
- Technical owner e-mail: firstname.lastname@example.orgTransports: HTTP/HTTPS
- Production Endpoint: http://ws.cdyne.com/phoneverify/phoneverify.asmx
- Define API resources for the operations you need to perform.
Specify None as the Auth Type of OPTIONS
For each resource that has HTTP verbs requiring Authentication (i.e., Auth Type is not NONE), enable OPTIONS with None Auth type. For example, as the following screen shot shows, resources with
/feedsphoneverify/1.0.0URL Pattern has HTTP verbs with Auth Type as
Application & Application User. Therefore, we must give None as the Auth Type of OPTIONS. This is to support CORS between the API Store and Gateway. But, if no authentication is needed for any of the HTTP verbs, you don't have to specify None Auth type to OPTIONS.
Publish the API to the API Store.