Skip to content

Commit af65424

Browse files
committed
moved curl commands to betetest section
1 parent 3277043 commit af65424

2 files changed

Lines changed: 64 additions & 65 deletions

File tree

5.2curlcommands.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -852,31 +852,6 @@ curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin
852852
}'
853853
```
854854

855-
### CDI Previewer
856-
857-
```bash
858-
curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin/externalTools -d \
859-
'{
860-
"displayName":"View CDI Metadata",
861-
"description":"View DDI Cross-Domain Integration (CDI) metadata file using SHACL shapes.",
862-
"toolName":"cdiPreviewer",
863-
"scope":"file",
864-
"types":["preview"],
865-
"toolUrl":"https://gdcc.github.io/dataverse-previewers/previewers/betatest/CdiPreview.html",
866-
"toolParameters": {
867-
"queryParameters":[
868-
{"fileid":"{fileId}"},
869-
{"siteUrl":"{siteUrl}"},
870-
{"key":"{apiToken}"},
871-
{"datasetid":"{datasetId}"},
872-
{"datasetversion":"{datasetVersion}"},
873-
{"locale":"{localeCode}"}
874-
]
875-
},
876-
"contentType":"application/ld+json; profile=\"http://www.w3.org/ns/json-ld#flattened http://www.w3.org/ns/json-ld#compacted https://ddialliance.org/specification/ddi-cdi/1.0\""
877-
}'
878-
```
879-
880855
### 3D model Previewer using X_ITE X3D
881856

882857
__Note:__ There are many mimetypes that can be rendered as 3D models. The following example is for X3D files. You can add more mimetypes by adding more entries to the "contentType" field.
@@ -1045,3 +1020,28 @@ curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin
10451020
## Beta Versions:
10461021

10471022
As updates and additions are made, they will be added to a /betatest sub-folder which will make them accessible to users via github.io without affecting people who are using the latest numbered release (e.g. v1.5). When previewers in the betatest branch are included in the next release (e.g. v1.6), sites may wish to change their registration of the tools to use the stable version as the betatest version may continue to receive changes.
1023+
1024+
### CDI Previewer
1025+
1026+
```bash
1027+
curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin/externalTools -d \
1028+
'{
1029+
"displayName":"View CDI Metadata",
1030+
"description":"View DDI Cross-Domain Integration (CDI) metadata file using SHACL shapes.",
1031+
"toolName":"cdiPreviewer",
1032+
"scope":"file",
1033+
"types":["preview"],
1034+
"toolUrl":"https://gdcc.github.io/dataverse-previewers/previewers/betatest/CdiPreview.html",
1035+
"toolParameters": {
1036+
"queryParameters":[
1037+
{"fileid":"{fileId}"},
1038+
{"siteUrl":"{siteUrl}"},
1039+
{"key":"{apiToken}"},
1040+
{"datasetid":"{datasetId}"},
1041+
{"datasetversion":"{datasetVersion}"},
1042+
{"locale":"{localeCode}"}
1043+
]
1044+
},
1045+
"contentType":"application/ld+json; profile=\"http://www.w3.org/ns/json-ld#flattened http://www.w3.org/ns/json-ld#compacted https://ddialliance.org/specification/ddi-cdi/1.0\""
1046+
}'
1047+
```

6.1curlcommands.md

Lines changed: 39 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1495,17 +1495,19 @@ curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin
14951495
}'
14961496
```
14971497

1498-
### CDI Previewer
1498+
### 3D model Previewer using X_ITE X3D
1499+
1500+
__Note:__ There are many mimetypes that can be rendered as 3D models. The following example is for X3D files. You can add more mimetypes by adding more entries to the "contentType" field.
14991501

15001502
```bash
15011503
curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin/externalTools -d \
15021504
'{
1503-
"displayName":"View CDI Metadata",
1504-
"description":"View DDI Cross-Domain Integration (CDI) metadata file using SHACL shapes.",
1505-
"toolName":"cdiPreviewer",
1505+
"displayName":"Read 3D model",
1506+
"description":"Read the 3D model file using X3D from X_ITE.",
1507+
"toolName":"3D model Previewer",
15061508
"scope":"file",
15071509
"types":["preview"],
1508-
"toolUrl":"https://gdcc.github.io/dataverse-previewers/previewers/betatest/CdiPreview.html",
1510+
"toolUrl":"https://gdcc.github.io/dataverse-previewers/previewers/v1.5/X3DPreview.html",
15091511
"toolParameters": {
15101512
"queryParameters":[
15111513
{"fileid":"{fileId}"},
@@ -1515,7 +1517,7 @@ curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin
15151517
{"locale":"{localeCode}"}
15161518
]
15171519
},
1518-
"contentType":"application/ld+json; profile=\"http://www.w3.org/ns/json-ld#flattened http://www.w3.org/ns/json-ld#compacted https://ddialliance.org/specification/ddi-cdi/1.0\"",
1520+
"contentType":"model/x3d+xml",
15191521
"allowedApiCalls": [
15201522
{
15211523
"name": "retrieveFileContents",
@@ -1539,9 +1541,7 @@ curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin
15391541
}'
15401542
```
15411543

1542-
### 3D model Previewer using X_ITE X3D
1543-
1544-
__Note:__ There are many mimetypes that can be rendered as 3D models. The following example is for X3D files. You can add more mimetypes by adding more entries to the "contentType" field.
1544+
More types for 3D models that X_ITE can load below.
15451545

15461546
```bash
15471547
curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin/externalTools -d \
@@ -1561,7 +1561,7 @@ curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin
15611561
{"locale":"{localeCode}"}
15621562
]
15631563
},
1564-
"contentType":"model/x3d+xml",
1564+
"contentType":"model/vrml",
15651565
"allowedApiCalls": [
15661566
{
15671567
"name": "retrieveFileContents",
@@ -1585,8 +1585,6 @@ curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin
15851585
}'
15861586
```
15871587

1588-
More types for 3D models that X_ITE can load below.
1589-
15901588
```bash
15911589
curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin/externalTools -d \
15921590
'{
@@ -1605,7 +1603,7 @@ curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin
16051603
{"locale":"{localeCode}"}
16061604
]
16071605
},
1608-
"contentType":"model/vrml",
1606+
"contentType":"model/gltf-binary",
16091607
"allowedApiCalls": [
16101608
{
16111609
"name": "retrieveFileContents",
@@ -1647,7 +1645,7 @@ curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin
16471645
{"locale":"{localeCode}"}
16481646
]
16491647
},
1650-
"contentType":"model/gltf-binary",
1648+
"contentType":"model/obj",
16511649
"allowedApiCalls": [
16521650
{
16531651
"name": "retrieveFileContents",
@@ -1689,7 +1687,7 @@ curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin
16891687
{"locale":"{localeCode}"}
16901688
]
16911689
},
1692-
"contentType":"model/obj",
1690+
"contentType":"model/stl",
16931691
"allowedApiCalls": [
16941692
{
16951693
"name": "retrieveFileContents",
@@ -1731,7 +1729,7 @@ curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin
17311729
{"locale":"{localeCode}"}
17321730
]
17331731
},
1734-
"contentType":"model/stl",
1732+
"contentType":"model/x-ply",
17351733
"allowedApiCalls": [
17361734
{
17371735
"name": "retrieveFileContents",
@@ -1754,16 +1752,21 @@ curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin
17541752
]
17551753
}'
17561754
```
1755+
### Smithsonian Voyager 3D model Previewer
1756+
1757+
__Note:__ Voyager supports multiple formats. Only *.glb (model/gltf-binary) is currently supported by the Previewer.
1758+
Also note that with current styling the Voyager app fills the window when launched as a separate page, so the usual
1759+
preview header/footer information doesn't show (and therefore isn't even requested from Dataverse).
17571760

17581761
```bash
17591762
curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin/externalTools -d \
17601763
'{
1761-
"displayName":"Read 3D model",
1762-
"description":"Read the 3D model file using X3D from X_ITE.",
1763-
"toolName":"3D model Previewer",
1764+
"displayName":"View 3D model",
1765+
"description":"Explore the 3D model file using Voyager.",
1766+
"toolName":"voyagerPreviewer",
17641767
"scope":"file",
17651768
"types":["preview"],
1766-
"toolUrl":"https://gdcc.github.io/dataverse-previewers/previewers/v1.5/X3DPreview.html",
1769+
"toolUrl":"https://gdcc.github.io/dataverse-previewers/previewers/v1.5/VoyagerPreview.html",
17671770
"toolParameters": {
17681771
"queryParameters":[
17691772
{"fileid":"{fileId}"},
@@ -1773,20 +1776,14 @@ curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin
17731776
{"locale":"{localeCode}"}
17741777
]
17751778
},
1776-
"contentType":"model/x-ply",
1779+
"contentType":"model/gltf-binary",
17771780
"allowedApiCalls": [
17781781
{
17791782
"name": "retrieveFileContents",
17801783
"httpMethod": "GET",
17811784
"urlTemplate": "/api/v1/access/datafile/{fileId}?gbrecs=true",
17821785
"timeOut": 3600
17831786
},
1784-
{
1785-
"name": "downloadFile",
1786-
"httpMethod": "GET",
1787-
"urlTemplate": "/api/v1/access/datafile/{fileId}?gbrecs=false",
1788-
"timeOut": 3600
1789-
},
17901787
{
17911788
"name": "getDatasetVersionMetadata",
17921789
"httpMethod": "GET",
@@ -1796,21 +1793,21 @@ curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin
17961793
]
17971794
}'
17981795
```
1799-
### Smithsonian Voyager 3D model Previewer
18001796

1801-
__Note:__ Voyager supports multiple formats. Only *.glb (model/gltf-binary) is currently supported by the Previewer.
1802-
Also note that with current styling the Voyager app fills the window when launched as a separate page, so the usual
1803-
preview header/footer information doesn't show (and therefore isn't even requested from Dataverse).
1797+
## Beta Versions:
1798+
As updates and additions are made, they will be added to a /betatest sub-folder which will make them accessible to users via github.io without affecting people who are using the latest numbered release (e.g. v1.5). When previewers in the betatest branch are included in the next release (e.g. v1.6), sites may wish to change their registration of the tools to use the stable version as the betatest version may continue to receive changes.
1799+
1800+
### CDI Previewer
18041801

18051802
```bash
18061803
curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin/externalTools -d \
18071804
'{
1808-
"displayName":"View 3D model",
1809-
"description":"Explore the 3D model file using Voyager.",
1810-
"toolName":"voyagerPreviewer",
1805+
"displayName":"View CDI Metadata",
1806+
"description":"View DDI Cross-Domain Integration (CDI) metadata file using SHACL shapes.",
1807+
"toolName":"cdiPreviewer",
18111808
"scope":"file",
18121809
"types":["preview"],
1813-
"toolUrl":"https://gdcc.github.io/dataverse-previewers/previewers/v1.5/VoyagerPreview.html",
1810+
"toolUrl":"https://gdcc.github.io/dataverse-previewers/previewers/betatest/CdiPreview.html",
18141811
"toolParameters": {
18151812
"queryParameters":[
18161813
{"fileid":"{fileId}"},
@@ -1820,14 +1817,20 @@ curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin
18201817
{"locale":"{localeCode}"}
18211818
]
18221819
},
1823-
"contentType":"model/gltf-binary",
1820+
"contentType":"application/ld+json; profile=\"http://www.w3.org/ns/json-ld#flattened http://www.w3.org/ns/json-ld#compacted https://ddialliance.org/specification/ddi-cdi/1.0\"",
18241821
"allowedApiCalls": [
18251822
{
18261823
"name": "retrieveFileContents",
18271824
"httpMethod": "GET",
18281825
"urlTemplate": "/api/v1/access/datafile/{fileId}?gbrecs=true",
18291826
"timeOut": 3600
18301827
},
1828+
{
1829+
"name": "downloadFile",
1830+
"httpMethod": "GET",
1831+
"urlTemplate": "/api/v1/access/datafile/{fileId}?gbrecs=false",
1832+
"timeOut": 3600
1833+
},
18311834
{
18321835
"name": "getDatasetVersionMetadata",
18331836
"httpMethod": "GET",
@@ -1837,7 +1840,3 @@ curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin
18371840
]
18381841
}'
18391842
```
1840-
1841-
## Beta Versions:
1842-
As updates and additions are made, they will be added to a /betatest sub-folder which will make them accessible to users via github.io without affecting people who are using the latest numbered release (e.g. v1.5). When previewers in the betatest branch are included in the next release (e.g. v1.6), sites may wish to change their registration of the tools to use the stable version as the betatest version may continue to receive changes.
1843-

0 commit comments

Comments
 (0)