Overview of the ACT Example and Summary of Tasks

In this use case, you create a REST-based client application that helps the members of an actors’ guild called ACT manage and schedule their plays for the year. As part of this on-line system, members need to:

Search for plays by their ID number (GET).
Update author information (PUT).
Create new plays (POST).
Delete plays.

This tutorial guide helps you:

Create play data in a CSV (comma-separated values) file
Create the TDV SQL procedures that read, update, insert and delete data
Understand how to create a REST client

TDV Studio deploys REST services to the TDV Web Service.

This tutorial pays special attention to the mapping of procedures to HTTP methods, and the construction of the necessary paths and arguments that make up the REST API for the sample application.

Note: This application is only an example of how you can set up a REST framework. The REST infrastructure in TDV is flexible and does not enforce any specific mapping or operation URL PATH structure.

The base URL for REST services in TDV always includes the following derived components.

Protocol

Hostname

port

dataformat

WebContainerNameSpace

HTTP

localhost

9400

XML

ACTdata

HTTPS

localhost

9402

JSON

ACTdata

The basic required Studio tasks to set up REST

1. Create procedures in Studio for the REST client actions.
2. Publish the procedures and supporting resources to the Web service.
3. Create links between HTTP verbs within Studio and the Web service.

Each of the following verbs is associated with one or more of the procedures defined in Studio. After defining the procedures, you can publish them to the Web service and bind them to a verb. This tutorial focuses on the following procedure and verb associations.

HTTP Verb

SQLScript Procedure

GET

playdataByID

POST

insertPlaydata

DELETE

deletePlaydata

4. Map the REST client application to the URL from the Studio Web service.