RAD Server Endpoints

From RAD Studio
Jump to: navigation, search

Go Up to Using the RAD Server Management Console Application


The RAD Server Management Console application allows you to query your RAD Server REST APIs, see the JSON response, and test with different parameters and HTTP methods through an integrated REST Debugger.

Endpoints.png

Menu

Use the menu options of the Endpoints option in the RAD Server Management Console application to manage Requests:

Send Request(F9): Configures the Proxy Server if needed, defines the BaseURL and the Resource properties, and the TRESTRequest method. Click the Send Request button to execute TRESTRequest and show the response.
New Request: Resets the Request, Parameters, Authentication, and Connection page fields to their default values.
Load Request: Uses the TOpenDialog component to load the properties values for TRESTClient, TRESTRequest, or TRESTResponse from the file selected.
Save Request:-- Saves into a file the properties values of the TRESTClient, TRESTRequest, or TRESTResponse component.
Copy Components:-- Copies the TRESTClient, TRESTRequest, and TRESTResponse components to the clipboard. You can copy these components to the clipboard, and then paste them to the Form Designer.

Request

Use the Request section to specify the TRESTClient and the TRESTRequest properties.

Method

Lists the TRESTRequest methods, as follows:
POST--submits data to be processed to the TRESTRequest resource.
PUT--updates data for the TRESTRequest resource.
GET--requests data from the TRESTRequest resource.
DELETE--deletes the data from the TRESTRequest resource.
PATCH--patches the data on the TRESTRequest resource by updating only the pairs that are sent within that PATCH body.

Endpoint

Resource from the REST Debugger, gets auto filled with custom endpoints on RAD Server.

Content-Type

Specifies the ContentType property of the TRESTRequestParameterList.

  • application/atom+xml
  • application/json
  • application/vnd.embarcadero.firedac+json
  • application/xml
  • application/x-www-form-urlendcode
  • text/html

Request Parameters

Specifies the TRESTRequest parameters. There are different parameters types:
Header Parameters--have the form of key=value and will be embedded into the HTTP header of the request.
Post/Get Parameters--have the form of key=value. For HTTP post requests, the Post Parameters will be embedded into the request body. For HTTP get requests, the Get Parameters will be embedded into the URL as part of the query string.
Body Parameters--consist of only one value and are integrated in the TRESTRequest body.
URL Segment Parameters--have the form of key=value and their value is appended to the HTTP URL prior to the query string of the request. Multiple URL Segment Parameters are delimited by a backslash (\).
Cookie Parameters--have the form of key=value and will be sent as cookie-values.

Add

Adds a new parameter to the TRESTRequest Parameter List. Specify the parameter type using the Kind ComboBox, the parameter name in the Name TComboEdit, and the parameter value in the Value TEdit.

Edit

Edits a parameter from the TRESTRequest Parameter List. Change the type, name, or value of the parameter selected.

Delete

Deletes the parameter selected from the TRESTRequest Parameter List.

Custom body

Specifies the CustomBody property of the TRESTRequestParameterList.

Response

Headers

The response header contains pairs of (key=value) and has information such as date, size, and type of file that the server sends to the client, and also data about the server itself.

The HTTP header fields retrieved by the server differ from an API to another.

Item Description

ResponseHeader

Displays the Headers property of the TRESTResponse.

Body

The response holds all the returned data from the service. The data includes the HTTP status code, error messages (if these exist), and the returned JSON data.

The response data can be accessed using one of the properties: Content, JSONValue, or RAWbytes.

Item Description

LabelJSON

Specifies if:

  • the content has a JSON representation or not.
  • the JSON root element is an invalid one.

JSON Root Element

Represents the RootElement property of TRESTResponse. Insert the needed root element into JSON Root Element TClearingEdit.

ResponseBody

Displays all the returned data from the service, that are right after the header.

Apply

Limits the contents of the response body shown, based on the RootElement property.

Tabular Data

A JSON formed response of a service can be transformed into any TDataSet-descendant class with a dataset adapter.

Each JSON object will be a new record in the dataset. The properties of the JSON object(s) will typically form the columns of the dataset.

Item Description

StringGrid

Shows the response organized as a dataset.

See Also