Send Requests
Use the following guidelines when sending requests using the IRT REST API.
URL Structure
Access the IRT REST resources using the following URL structure:
https://subdomain.domain.com:port/apps/studyname/api/sites/resource-path
Where:
-
subdomain.domain.com:port
– Host and port where IRT is running. -
studyname – Name of the study to connect.
-
resource-path
– Relative path that defines the resource. For a complete list of resources, see All REST Endpoints and sort by Path.
Supported Methods
You can perform basic create and update operations on the IRT instances using standard HTTP method requests, as summarized in the following table.
HTTP Method | Description |
HEAD |
Retrieve header information about a resource. |
POST |
Submits data to be processed to a specified resource. |
Media Types
The following media types are supported by the REST API:
-
application/json
-
application/xml
Supported Headers
The IRT REST API supports the following headers that may be passed in the header section of the HTTP request or response as needed.
Header | Description | Example |
Content-Type |
Media type of the body of the request. | Content-Type: application/json |
Authorization |
Basic authentication value. This header is common to all APIs and must be set for every request. | Add example |
Accept |
Is required and denotes the content type that is acceptable for a response. | Accept: application/xml |
Compression
Use compression on the IRT REST resource request and response for improved performance. To use compression, include one of the following HTTP headers in the request: Accept-Encoding
or Content-Encoding
.