CentraSite Documentation : Working with REST-based APIs : Modeling a RESTful API : Configuring the Global Details of a REST API : Before You Begin
Before You Begin
When you configure the global details for an API, keep the following points in mind:
*A base URL is the core design element that serves as the only way to access the identified API.
CentraSite allows you to configure multiple base URL paths for the API. For example, you can configure a sandbox URL for testing purposes, and a production URL for accessing real-world data.
For our sample Phone Store API, here are the sandbox and production base URLs:
Sandbox URL
https://www.sandbox.phonestore.com/api/v2
Production URL
https://www.phonestore.com/api/v2
For example, a base URL for our sample Phone Store API would look like:
https://www.phonestore.in/api/v2
A complete URL is formed by combining the resource path with the base URL.
For example, here is the URL you would use in a request to get the list of phones:
GET https://www.phonestore.in/api/v2/phones
Or, retrieve a phone with product code is 412456
GET https://www.phonestore.in/api/v2/phones/phone-412456
Where,
GET - HTTP request method
https://www.phonestore.in/api/v2 - URL
phones - resource URI
*412456 - path parameterAn API parameter is an expression that represents a value that the client passes to the API specified in the client call. Here, the parameters are specified at the API level. Since these are defined at the API level, the parameters will be available for all child resources and methods below the API in the hierarchy.
Copyright © Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback