Create and activate a site

Because a subject is associated with a site, you must retrieve the siteId before saving subject data to a form. Make a POST request to create and activate a site.

Note:

  • To run these Oracle Clinical One Platform API calls, you need to include an authentication token. For instructions on how to generate your authentication token, see Get a token for authentication and Use the token to make an API request.
  • For every API call make sure you construct the URL using the correct server URL and path parameters values.

Step 1: Create the request payload file

The following JSON contains the code for adding a new site with an active status.

Create a JSON file called site.json and copy the following:

{
    "sdf":
    {
        "comment": "test",
        "name": "Automation Study Active",
        "reason": "test",
        "status": "Active",
        "studyOrgId": "DCS",
        "sdfType": "Site"
    },
    "sdfAddresses": [
    {
        "addressCity": "Boston",
        "addressCountry": "US",
        "addressPostalcode": "560068",
        "addressStateOrProvOrCounty": "Massachusetts",
        "addressStreet1": "456abc",
        "addressStreet2": null,
        "addressType": "Primary",
        "comment": "test",
        "email": "test@abc.com",
        "fax": "343",
        "phone": "1234567891",
        "reason": "test"
    }],
    "sdfPropertyList": [
    {
        "comment": "test",
        "propertyName": "studyVersion",
        "propertyValue": "1.0.0.1",
        "reason": "test"
    },
    {
        "comment": "test",
        "propertyName": "property",
        "propertyValue": "true",
        "reason": "test"
    }]
}

Step 2: Create site using payload file

Run the following cURL call to create a new site:

curl -X POST "https://tenant.clinicalone.oraclecloud.com/ec-site-svc/rest/v1/studies/{studyId}/{mode}/sdfs" -d "@site.json"

To make subsequent calls for this specific site, take note of its id value. In order to add a subject or save data to a form using Rest APIs you need the site ID.

For more information on how to build the payload request body and other parameters, see Create a site.

View all sites in a study and mode

Run the following cURL call to get a list of all sites:

curl -X GET "https://tenant.clinicalone.oraclecloud.com/ec-site-svc/rest/v1/studies/{studyId}/{mode}/sdfs/all"

If you want to make subsequent calls for a specific site, take note of the id associated with the site of your interest.

For more information on this API, like its parameters and response objects, see Get all sites by type.

Tip:

There are many different Clinical One APIs that could help you complete a particular task. Browse for these and other related APIs under the Tasks section of this guide. If you see any deprecated endpoint, look for its newest version.