Home > SQL Developer Concepts and ... > RESTful Services Administra...
You can use SQL Developer to create, maintain, and use RESTful services. See the following topics for more information:
Representational State Transfer (REST) is a style of software architecture for distributed hypermedia systems such as the World Wide Web. A service is described as RESTful when it conforms to the tenets of REST. A RESTful service has the following characteristics:
Data is modeled as a set of resources. Resources are identified by URIs
A small, uniform set of operations are used to manipulate resources (for example, GET, POST, PUT, DELETE).
A resource can have multiple representations (for example, a blog might have an HTML representation and a RSS representation).
Services are stateless; and because it is likely that the client will want to access related resources, these should be identified in the representation returned, typically by providing hypertext links.
The following are some major terms related to RESTful services:
RESTful service: An HTTP web service that conforms to the tenets of the RESTful architectural style described in About RESTful Services.
Resource module: An organizational unit that is used to group related resource templates.
Resource template: An individual RESTful service that is able to service requests for some set of URIs (Universal Resource Indicators). The set of URIs is defined by the URI Template of the Resource Template
URI template: A simple grammar that defines the specific patterns of URIs that a given resource template can handle. For example, the pattern employees/{id}
will match any URI whose path begins with employees/
, such as employees/2560
.
Resource handler: Provides the logic required to service a specific HTTP method for a specific resource template. For example, the logic of the GET HTTP method for the preceding resource template might be:
select empno, ename, dept from emp where empno = :id
HTTP operation: HTTP (HyperText Transport Protocol) defines standard methods that can be performed on resources: GET (retrieve the resource contents), POST (store a new resource), PUT (update an existing resource), and DELETE (remove a resource).
For you to use the RESTful Services features in SQL Developer, the following must be installed:
Oracle Application Express (Release 4.2.2 or later)
Application Express must be installed and configured with a user assigned to a workspace. For information about creating and managing workspaces, see Oracle Application Express Administration Guide.
Oracle Application Express Listener (Release 2.0.3 or later)
Application Express Listener must be installed, configured, and running. You must also specify the roles in the Listener configuration file by adding properties to the defaults.xml
configuration file to give all users the RESTful Services
privilege, and all developers and administrators the OAuth2 Client Developer
and SQL Developer
roles. For example:
<entry key="apex.security.user.roles">RESTful Services</entry> <entry key="apex.security.developer.roles">OAuth2 Client Developer, SQL Developer</entry>
For more information, see Oracle Application Express Listener Installation and Developer Guide.
You must also connect to the SYS account (AS SYSDBA) and execute the following statements:
grant insert, delete on APEX_040200.wwv_flow_rt$privilege_groups to APEX_LISTENER; alter session set current_schema = APEX_LISTENER; create or replace synonym wwv_flow_rt$privilege_groups for APEX_040200.wwv_flow_rt$privilege_groups;
The RESTful Services administration pane (click View, then RESTful Services) enables you to:
Connect to REST, retrieve the resource templates, and load the resource templates
Create, edit, and delete resource templates, and save the results on the server
Export resource templates to a SQL format
Provide user privileges to access the resource templates
The RESTful Services pane has icons for the following operations:
New RESTful Services: Creates a new RESTful Services administration which contains the resource modules and privileges.
Retrieve RESTful Services: Downloads the resource modules and privileges from the user's workspace. (Enabled if you are connected to a RESTful Services connection.)
Validate RESTful Services: Performs validation of all the resource modules' templates and handlers; displays any warning and error messages. (Enabled if the navigator tree contains at least one module or one privilege.)
Connect: Lets you select a RESTful Services connection or to create a new RESTful Services connection.
You can right-click on the RESTful Services node to perform the operations with associated icons, plus the following operations:
Connect: Connects to the user's workspace in Application Express based on user's credentials.
Disconnect: Disconnects from the user's workspace.
New RESTful Services: Creates a new RESTful Services administration which contains the resource modules and privileges.
Retrieve RESTful Services: Downloads the resource modules and privileges from the user's workspace. (Enabled if you are connected to a RESTful Services connection.)
Open File: Opens a .zip file that contains the resource modules and privileges, and loads them into RESTful Services Administration.
Save As: Creates a .zip file that contains the resource modules and privileges. (Enabled if the navigator tree contains at least one module or one privilege.)
Related Topics