Table of Contents |
---|
Introduction
...
Steps for Bulk importing
- Download the input CSV template file.
- Register your input file.
- Deploy the input file
- Upload the CSV file
- Create and run the import - job.
- Check status of the import- job .status
Download the
...
CSV template file
Attribute | Value |
---|---|
URL | http://<host>:<port>/openspecimen/rest/ng/import-jobs/input-file-template?schema=<schemaName> |
Method | GET |
Request Type | application/json |
Note |
---|
Replace <schemaName> with the schema name for the entity you wish to bulk import. (Find here the schema name to entity mapping) |
...
Upload the CSV file
Attribute | Value | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
URL | http://<host>:<port>/openspecimen/rest/ng/import-jobs/input-file | |||||||||
Method | POST | |||||||||
Request Type | form-data | |||||||||
Response |
|
...
Note |
---|
Note down the 'fileId' as this will be used in step #3 |
...
Create and run the import
...
job
Attribute | Value | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
URL | http://<host>:<port>/openspecimen/rest/ng/import-jobs | |||||||||
Method | POST | |||||||||
Request Type | application/json | |||||||||
Request |
|
...
Note |
---|
|
...
Check the job status
Attribute | Value |
---|---|
URL | http://<host>:<port>/openspecimen/rest/ng/import-jobs/{job-id} |
Method | GET |
Request Type | application/json |
Example of Bulk Importing CP(s) using API
...
Code | Applies to | Status Message |
---|---|---|
200 | All requests | Bulk Import request was successfully processed. |
401 | All requests | Authorisation failed, user doesn’t have the authority. |
500 | All requests | Internal server error, encountered server error while performing operations. |