CentraSite Documentation : Working with REST-based APIs : Importing a RESTful API to CentraSite : Importing RAML Files : Importing a REST API Using RAML File
Importing a REST API Using RAML File
Before you begin, you must have the RAML file that you want to import.
To import a new REST API with RAML definition
1. In the activity bar, click Create Asset. This opens the Create Asset wizard.
2. In the Basic Information profile, enter the following information in the fields provided:
In this field...
Do the following...
Name
Optional. Enter a name for the new REST API.
This name must be NCName-conformant, meaning that:
*The name must begin with a letter or the underscore character (_).
*The remainder of the name can contain any combination of letters, digits, or the following characters: . - _ (such as, period, dash, or underscore). It can also contain combining characters and extender characters (for example, diacriticals).
*The name cannot contain any spaces.
*Furthermore, if the REST API name contains any non-conformant character, upon publishing the virtual copy of this REST API to any gateway, the non-conformant character is simply replaced with the underscore character (_) in Mediator. However, in CentraSite the REST API name defined by you is displayed.
For more information about the NCName type, see http://www.w3.org/TR/xmlschema-2/#NCName
Note:  
The API name does not need to be unique. However, to reduce ambiguity, we recommend that you adopt appropriate naming conventions to ensure that API is distinctly named within an organization.
If you have not specified a Name for the REST API, CentraSite automatically maps this field with the API Title property, which is defined in the RAML specification.
Type
Choose REST Service asset type.
Organization
Select the organization in which the new API will be created. (The drop-down list displays the list of organizations in which you are permitted to create APIs.)
Version
Optional. Specify a version identifier for the new API.
If you have not specified a Version for the REST API, CentraSite automatically maps this field with the API Version property, which is defined in the RAML specification.
Description
Optional. Enter a description for the new API.
Note:  
This is the description information that users will see when they view instances of this type in the user interface, therefore, the description should be meaningful.
If you have not specified a Description for the REST API, CentraSite automatically maps this field with the Description property, which is defined in the RAML specification.
Import From Specification File
Choose RAML-0.8 as the specification file type.
URL or File
Specify whether the input file will be read from your local file system (the File option) or from a URL-addressable location on the network (the URL option).
If the file you are importing resides on the network, specify its URL.
If the file resides in your local file system, specify the file name. You can use the Browse button to navigate to the required folder.
3. Expand the Advanced Settings node. Enter the following information:
In this field...
Do the following...
Credentials
If you have specified a URL and the site you want to access via the URL requires user authentication, enter a username and password for authentication at the URL site.
Resolution
Specifies how an already existing imported/included file is handled.
Note:  
Currently, CentraSite does not support this option for a REST API with RAML specification.
4. Click Next.
You will not be allowed to move to the next screen unless all of its required parameters have been set.
5. After you specify the value for all of the required attributes, click the Save icon to save the REST API with RAML definition.
6. Review the import log that CentraSite generates for the import process. If errors occur while reading and processing the file, they will be reported in this log.
7. Configure the API's extended attributes as described in Changing a REST API.
Tip:  
If you had previously imported a RAML file that has an associated schema file, and you now re-import just the schema file with modifications, your browser might not display the updated contents of the schema file. This can happen if the browser cache is not being updated automatically. To rectify the problem, you can change your browser settings so that pages are always updated on every visit.
Copyright © 2005-2015 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback