Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

This service allows a file of subject data to be imported into a project. This is the same functionality as the Import Data page in Studytrax.

Roles Required: Project Management

  1. Service endpoint to Post to.

    1. https://xxx.studytrax.com/api/v1/customers/yyy/projects/zzz/subjects/import to import the file and https://xxx.studytrax.com/api/v1/customers/yyy/projects/zzz/subjects/import?analysisOnly=true to validate and return statistics of the changes the import would have made.

      1. Change "xxx" to the prefix of the server you are targeting (e.g., "my" if target is https://my.studtrax.com).

      2. Change "yyy" to the customer id.

      3. Change "zzz" with the project id.

  2. Add an authentication token to the header: Authentication

  3. Add the file and JSON with the import options to the request body.

    1. The context type needs to be set as “form-data” to allow both the file and JSON to be sent.

    2. Add the file to the body as File Content.

      1. In Postman, to add a file, in the body section, you need to hover over the field for “Key”. A pull down will become visible allowing you to select Text or File - select File.

    3. Add the options JSON to the body. The options are the same as those on the subject data import page in the Studytrax application.

      1. Example options JSON: {"addMedicationsToProject": false, "allowSubjectsToExist": false, "changeReason": "test reason", "includeDuplicateSubjectMedications": false, "performDetailedValidation": false, "treatBlankAsDelete": false}

      2. In Postman, the content type needs to be "application/json".

  • No labels