Page tree
Skip to end of metadata
Go to start of metadata


Exporting from the termserver consists of posting a request together with some config information formatted as json and then a request to actually retrieve the file.

Export go to https://uat-ms-authoring.ihtsdotools.org/snowowl/snomed-ct/v2/#!/exports/beginExport

Using uat-ms-authoring as an example adjust to suit the instance you are actually using.

Or ssh onto the local instance and then post to the /snowowl/snomed-ct/v2/exports endpoint using json as below e.g. (using the example below)

curl --fail --verbose http://localhost:8080/snowowl/snomed-ct/v2/exports -u fakeU:fakePW -H "Content-Type: application/json" -X POST -d '{"branchPath": "MAIN/2017-07-31/SNOMEDCT-BE2/2017-10-24","moduleIds": ["11000172109"],"type": "SNAPSHOT"}'


where change fakeU and fakePW for a real snowowl user and passwrd.

JSON :

The full JSON config settings are shown below. Th system should be able to used the default settings set within the branch to determine any you have not set but the ones you will need include:
branchPath - fairly obvious. make sure this is the path you have versioned
moduleIds - especially is exporting from a managed service instance.
type: FULL DELTA or SNAPSHOT . If Delta then the transientEffectiveTime must be set.
Full list:

{
"moduleIds": {},
"branchPath": "",
"codeSystemShortName": "",
"namespaceId": "",
"extensionOnly": false,
"includeUnpublished": false,
"transientEffectiveTime": "",
"startEffectiveTime": "date-time",
"endEffectiveTime": "date-time",
"type": ""
}

As an example :

{
"branchPath": "MAIN/2017-07-31/SNOMEDCT-BE2/2017-10-24",
"moduleIds": ["11000172109"],
"type": "SNAPSHOT"
}


So with more config variables:


curl --fail --verbose http://localhost:8080/snowowl/snomed-ct/v2/exports -u fakeU:fakePW -H "Content-Type: application/json" -X POST -d '{"branchPath": "MAIN/2017-07-31/SNOMEDCT-BE2/2017-10-24","moduleIds": ["11000172109"],"codeSystemShortName": "SNOMEDCT-BE","namespaceId": "1000172","extensionOnly": true,"includeUnpublished": false,"type": "SNAPSHOT"}'


This will return with a uuid. Use this UUID to fetch the archive. Often if this is large then it can be useful to do this on the instance in question to avoid any problems with timeouts or files which are too large to web servers etc.

So imagining the uuid returned was "feaf59e4-361a-40b3-9e16-c97060e6cb54" then the command would be :

wget --user=fakeU --password=fakePW http://localhost:8080/snowowl/snomed-ct/v2/exports/feaf59e4-361a-40b3-9e16-c97060e6cb54/archive


or use: https://uat-ms-authoring.ihtsdotools.org/snowowl/snomed-ct/v2/#!/exports/getArchive

Using uat-ms-authoring as an example adjust to suit the instance you are actually using.


  • No labels