CentraSite Documentation : Working with REST-based APIs : Managing RESTful APIs : Changing a REST API : Editing the Extended Details of a REST API
Editing the Extended Details of a REST API
You use the Resources and Methods profile of an API to view, modify, and delete its extended attributes - resources and methods. The content in this profile reflects the view selection that you make - resource-centric, or method-centric.
When you edit the details for an API, be aware that you will not be allowed to edit its resources and methods in the method-centric view.
If you have resources and methods defined for the API, you modify one or more of these entities by using the appropriate Edit the icon in the Resources and Methods profile.
To edit the details of resources and methods
1. Display the details page of the REST API (see Viewing the Details of a REST API for details).
2. In the actions bar for the API, click the Edit icon.
3. Select the Resource and Methods profile. Add or modify the REST details at the Resource level and Method level, as required.
*Resource level details include the basic information for a resource, and its request parameters.
*Method level details include the basic information for a method, its request parameters, content types, status codes, and HTTP messages that are available for the selected method.
4. To modify the resource details, do the following:
a. Move the cursor over the resource whose details you want to modify.
b. Click the Edit icon.
c. In the Edit Resource dialog, modify the details, as needed:
Field
Description
Name
Mandatory. The name of the resource.
Make sure the resource name you specify in this field is a valid value for NCName.
Resource Path
Mandatory. The resource URL.
Description
Optional. Additional comments or descriptive information about the resource.
Upload Schema
Optional. An XML schema for the API.
Note:  
If you have an API that uses XML as content, then you can optionally upload an XML schema document.
Upload Files
Optional. External files that provide additional information about the resource.
Parameters
Optional. One or more request parameters at the Resource level.
Modify an Existing Parameter
a. Move the cursor over the parameter whose details you want to modify.
b. Click the Edit icon.
c. In the Edit Parameter dialog, modify the details, as needed.
d. Click OK.
e. Repeat for each parameter that you want to modify.
Delete an Existing Parameter
a. Move the cursor over the parameter you want to delete.
b. Click the Delete icon.
c. Repeat for each parameter that you want to delete.
Add a New Parameter
a. Click the Add Parameter link.
b. In the Add Parameter dialog, specify the details, as needed.
c. Click OK.
d. Repeat for each parameter that you want to add.
For a complete description of how to set up the request parameters, see Adding Parameter to REST API.
5. To modify the method details, do the following:
a. Move the cursor over the method whose details you want to modify.
b. Click the Edit icon.
c. In the Edit Method dialog, modify the details as necessary:
Field
Description
Name
Mandatory. The name of the method.
Description
Optional. Additional comments or descriptive information about the method.
HTTP Method
The HTTP operation to perform on the resource.
Request Content-Type
The content format for request message.
Response Content-Type
The content format for response message.
Parameters
Optional. One or more request parameters at the Method level.
Modify an Existing Parameter
a. Move the cursor over the parameter whose details you want to modify.
b. Click the Edit icon.
c. In the Edit Parameter dialog, modify the details, as needed.
d. Click OK.
e. Repeat for each parameter that you want to modify.
Delete an Existing Parameter
a. Move the cursor over the parameter you want to delete.
b. Click the Delete icon.
c. Repeat for each parameter that you want to delete.
Add a New Parameter
a. Click the Add Parameter link.
b. In the Add Parameter dialog, specify the details, as needed.
c. Click OK.
d. Repeat for each parameter that you want to add.
For a complete description of how to set up the request parameters, see Adding Parameter to REST API.
Requests
Optional. One or more HTTP requests that indicate the operation to be performed with the addressed resource.
Modify an Existing Request
a. Move the cursor over the request whose details you want to modify.
b. Click the Edit icon.
c. In the Edit Request dialog, modify the details, as needed.
d. Click OK.
e. Repeat for each request that you want to modify.
Delete an Existing Request
a. Move the cursor over the request you want to delete.
b. Click the Delete icon.
c. Repeat for each request that you want to delete.
Add a New Request
a. Click the Add Request link.
b. In the Add Request dialog, specify the details, as needed.
c. Click OK.
d. Repeat for each request that you want to add.
For a complete description of how to set up the request, see Adding HTTP Request to REST API.
Responses
Optional. One or more HTTP responses that indicate the success or failure of a request invocation.
Modify an Existing Response
a. Move the cursor over the response whose details you want to modify.
b. Click the Edit icon.
c. In the Edit Response dialog, modify the details, as needed.
d. Click OK.
e. Repeat for each response that you want to modify.
Delete an Existing Response
a. Move the cursor over the response you want to delete.
b. Click the Delete icon.
c. Repeat for each response that you want to delete.
Add a New Response
a. Click the Add Response link.
b. In the Add Response dialog, specify the details, as needed.
c. Click OK.
d. Repeat for each response that you want to add.
For a complete description of how to set up the response messages, see Adding HTTP Response to REST API.
Sample Requests and Responses
Optional. One or more sample requests to the resources of the web application, and the corresponding sample responses from the application.
Modify an Existing Sample
a. Move the cursor over the sample whose details you want to modify.
b. Click the Edit icon.
c. In the Edit Sample Request and Response dialog, modify the details, as needed.
d. Click OK.
e. Repeat for each sample that you want to modify.
Delete an Existing Sample
a. Move the cursor over the sample you want to delete.
b. Click the Delete icon.
c. Repeat for each sample that you want to delete.
Add a New Sample
a. Click the Add Request and Response link.
b. In the Add Sample Request and Response dialog, specify the details, as needed.
c. Click OK.
d. Repeat for each sample that you want to add.
For a complete description of how to expose sample request and response messages, see Adding Request and Response Messages to REST API.
6. If you edited any of the details on the Resources and Methods profile, click the Save icon to save the changes.
Copyright © 2005-2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback