Create a form

Make a POST request to create a form and add it to your study version.

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.
For the following API calls, you need the studyID and version. These values are retrieved as part of a previous task, see Create a study or Get study information.

Step 1: Create the request payload file

The JSON file below contains an example of a simple form with one text question asking for the subject initials.

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

"id": null,
"title": "Sample Form",
"refname": "FORM_01",
"source": {
    "formId": null,
    "studyId": "9AFDA8D726FE4A958AADF581BCA7BFF7",
    "studyTitle": "MyTestPillStudy",
    "versionStart": null,
    "rules": false
},
"items": [{
    "questionType": "text",
    "id": null,
    "formId": null,
    "formTitle": "Sample Form",
    "questionLabel": "Subject initials",
    "randomizationTag": null,
    "isStrataFactor": null,
    "isCohortFactor": null,
    "refname": "TEXT_01",
    "required": true,
    "dynamic": 0,
    "hidden": false,
    "readOnly": false,
    "ruleSet": {
        "logicalOperator": "NONE",
        "rules": [],
        "numberIndex": 1
    },
    "sdvRequired": "NOTSET",
    "sequence": null,
    "sasVariable": "TEXT_01",
    "sasLabel": "Subject initials",
    "labNormalsTag": null,
    "maxlength": 4000,
    "multiline": false

}],
"dynamic": 0,
"formType": "STANDARD_FORM"
}

For other types of questions you can add to your form see Question Type Reference.

Step 2: Create form using payload file

Run the following cURL call to create a new form using the request payload file.

curl -X POST "https://tenant.clinicalone.oraclecloud.com/ec-designer-svc/rest/v15.0/studies/{studyId}/versions/{version}/forms" -d "@SampleForm.json"

To make subsequent calls for this specific form, take note of its id value. In order to save data to this form using Rest APIs you will need the form ID as well as the items IDs. If you want to save data in a form using the Clinical One Platform APIs, see Add subjects and save data in a form.

For more information on how to build the payload request body see Add a form in a study version.

Tip:

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.