Import SNOMED CT
Let's import an RF2 archive using its SNAPSHOT content (see release types here) so that we can further explore the available SNOMED CT APIs. To start the import process, send the following request:
curl -v -u "test:test" http://localhost:8080/snowowl/snomedct/SNOMEDCT/import?type=snapshot\&createVersions=false \
-F file=@SnomedCT_InternationalRF2_PRODUCTION.zip
Curl will display the entire interaction between it and the server, including many request and response headers. We are interested in these two (response) rows in particular:
< HTTP/1.1 201 Created
< Location: http://localhost:8080/snowowl/snomedct/SNOMEDCT/import/107f6efa69886bfdd73db5586dcf0e15f738efed
The first one indicates that the file was uploaded successfully and a resource has been created to track the progress of the import job, while the second row indicates the location of this resource.
The process itself is asynchronous and its status can be checked by periodically sending a GET request to the location returned in the response header:
curl -u "test:test" http://localhost:8080/snowowl/snomedct/SNOMEDCT/import/107f6efa69886bfdd73db5586dcf0e15f738efed?pretty
The expected response while the import is running:
{
"id": "107f6efa69886bfdd73db5586dcf0e15f738efed",
"status": "RUNNING"
}
Upon completion, you should receive a different response that lists component identifiers visited during the import as well as any defects encountered in uploaded release files:
{
"id": "107f6efa69886bfdd73db5586dcf0e15f738efed",
"status": "FINISHED",
"response": {
"visitedComponents": [ ... ],
"defects": [ ],
"success": true
}
}
Last updated