CentraSite Documentation : Working with REST-based APIs : Managing RESTful APIs : Changing a REST API : Editing the Details of Resources and Methods
Editing the Details of Resources and Methods
You use the Resources and Methods profile of an API to view, modify, and delete its 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  icon in the Resources and Methods profile.
To edit the details of resources and methods
1. Display the details page for the REST API that you want to modify. If you need procedures for this step, see Viewing the Details of a REST API.
2. In the actions bar for the API, click Edit  icon.
3. Navigate to Advanced Information > Resource and Methods profile. Add or modify the resource level and method level details, 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. Mouse hover the resource name, and click Edit.
b. In the Edit Resource dialog, modify the details, as needed:
Field
Description
Name
Mandatory. The name of the resource.
Resource Path
Mandatory. The resource URL.
Description
Optional. Additional comments or descriptive information about the resource.
Schema
Optional. The XML Schema Definition (XSD) file for selected API.
Note:  
If you have an API that uses XML as content, then you can optionally upload an XML schema document.
Documents
Optional. External documents that provide additional information about the resource.
Parameters
Optional. One or more request parameters at the resource level.
Modify an Existing Parameter
i. Mouse hover the parameter name, and click Edit .
ii. In the Edit Parameter dialog, modify the details, as needed.
iii. Click OK.
iv. Repeat for each parameter that you want to modify.
Delete an Existing Parameter
i. Mouse hover the parameter name, and click Delete .
ii. Repeat for each parameter that you want to delete.
Add a New Parameter
i. Click the Add Parameter link.
ii. In the Add Parameter dialog, specify the details, as needed.
iii. Click OK.
iv. Repeat for each parameter that you want to add.
For a complete description of how to set up the request parameters, see Configuring REST Parameters.
5. To modify the method details, do the following:
a. Mouse hover the method name, and click Edit .
b. 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
i. Mouse hover the parameter name, and click Edit .
ii. In the Edit Parameter dialog, modify the details, as needed.
iii. Click OK.
iv. Repeat for each parameter that you want to modify.
Delete an Existing Parameter
i. Mouse hover the parameter name, and click Delete .
ii. Repeat for each parameter that you want to delete.
Add a New Parameter
i. Click the Add Parameter link.
ii. In the Add Parameter dialog, specify the details, as needed.
iii. Click OK.
iv. Repeat for each parameter that you want to add.
For a complete description of how to set up the request parameters, see Configuring REST Parameters.
HTTP Status Codes
Optional. One or more HTTP response status codes that indicate the success or failures of an invocation.
Modify an Existing Status Code
i. Mouse hover the status code row, and click Edit .
ii. In the Edit Status Code dialog, modify the details, as needed.
iii. Click OK.
iv. Repeat for each status code that you want to modify.
Delete an Existing Status Code
i. Mouse hover the status code row, and click Delete .
ii. Repeat for each status code that you want to delete.
Add a New Status Code
i. Click the Add Status Code link.
ii. In the Add Status Code dialog, specify the details, as needed.
iii. Click OK.
iv. Repeat for each status code that you want to add.
For a complete description of how to set up the status code, see Configuring HTTP Status Codes.
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
i. Mouse hover the sample row, and click Edit .
ii. In the Edit Sample Request and Response dialog, modify the details, as needed.
iii. Click OK.
iv. Repeat for each sample that you want to modify.
Delete an Existing Sample
i. Mouse hover the sample row, and click Delete .
ii. Repeat for each sample that you want to delete.
Add a New Sample
i. Click the Add Request and Response link.
ii. In the Add Sample Request and Response dialog, specify the details, as needed.
iii. Click OK.
iv. Repeat for each sample that you want to add.
For a complete description of how to expose request headers and response messages, see Configuring Sample Request and Response Messages.
6. If you edited any of the details on the Resources and Methods profile, click Save to save the updated API.
Copyright © Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback