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

« Previous Version 3 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. Determine Post for Service endpoint

    1. Validate file and return statistics of the changes the the import would have made:

      1. https://xxx.studytrax.com/api/v1/customers/yyy/projects/zzz/subjects/import?analysisOnly=true

    2. Import the file:

      1. https://xxx.studytrax.com/api/v1/customers/yyy/projects/zzz/subjects/import

    3. Customize the URL

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

      2. Change "yyy" to the customer id

      3. Change "zzz" with the project id

    4. Enter the URL into the request URL field

  2. Add an Authentication token to the header

  3. Select Body

  4. Select the form-data option to allow both the file and JSON to be sent

  5. Add the file to the body as File Content

    1. In Postman, to add a file in the body section, hover over the field for Key

    2. A drop down will become visible

    3. Select File in the drop down

    4. Click Select Files and select the data file to import

  6. Add the JSON with the import options to the request body

    1. Enter the JSON in the Value field

      1. The options are the same as those on the subject data import page in the Studytrax application

      2. 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

      1. If the Content Type column is not displayed, click … and check the box for Content Type

      2. Start typing in the Content Type field and select application/json

  7. Post the request by clicking Send

    1. The result returned will be JSON that contains any errors or warnings and the statistics for the records modified, or, if the query string “analysisOnly=true” was added to the URL, the statistics represents records that would have been modified

  • No labels