-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Frédérique Chambinaud
committed
Feb 7, 2024
1 parent
5d217b8
commit 15ae8c8
Showing
33 changed files
with
1,113 additions
and
880 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
--- | ||
title: Using the API | ||
--- | ||
|
||
## Using the API | ||
|
||
eCorpus provides a two-part API: | ||
|
||
- webDAV on `/scenes/**` to access scene files. | ||
- REST on `/api/v1/**` for administrative management. | ||
|
||
### Authentication | ||
|
||
For command-line authentication, use an `Authorization` header with the value `Basic <base64(username:password)>`. | ||
|
||
Header encoding is handled automatically by most utilities. Example with curl: | ||
|
||
```bash | ||
curl -XGET -u "<username>:<password>" https://ecorpus.holusion.com/[...] | ||
``` | ||
|
||
### API webDAV | ||
|
||
File organization: | ||
|
||
``` | ||
├── foo/ | ||
│ ├── scene.svx.json | ||
│ ├── scene-image-thumb.jpg | ||
│ ├── models/ | ||
│ │ └── foo.glb | ||
│ └── articles/ | ||
│ └── foo-FR.html | ||
└── bar/ | ||
├── scene.svx.json | ||
├── scene-image-thumb.jpg | ||
├── models/ | ||
│ └── bar.glb | ||
└── articles/ | ||
└── bar-FR.html | ||
``` | ||
|
||
So to retrieve a: | ||
|
||
```bash | ||
curl -XGET -u "<username>:<password>" https://ecorpus.holusion.com//scenes/foo/models/foo.glb | ||
``` | ||
|
||
Les verbes `GET` `PUT` `MOVE` `COPY` `DELETE` `MKCOL` et `PROPFIND` sont supportés, avec un comportement se conformant généralement à la [spécification](http://www.webdav.org/specs/rfc4918.html){:target="_blank"}. | ||
|
||
|
||
### API REST | ||
|
||
The REST API can be accessed at `/api/v1/`. It uses standard HTTP verbs. | ||
|
||
See the [route reference](/en/doc/references/api) for details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,33 @@ | ||
--- | ||
title: Importing and exporting data | ||
title: Managing your data | ||
--- | ||
|
||
# Managing your eCorpus data | ||
## Managing your data | ||
|
||
Data interoperability is one of the core features of eCorpus. | ||
|
||
It's simplest expression is that one can easily download some or all data from an instance and import it into another one. | ||
|
||
It's useful for backup purposes but can also be leveraged as a way to reuse scenes from one institution to another. | ||
|
||
## Exporting data from your eCorpus instance | ||
### Exporting data from your eCorpus instance | ||
|
||
### Using the interface | ||
#### Using the interface | ||
|
||
Navigate to the **collection** page of your eCorpus instance. Select the scenes you wish to export and click on the **Download as Zip** button. | ||
|
||
### Using the API | ||
#### Using the API | ||
|
||
```bash | ||
curl -XGET https://${HOSTNAME}/api/v1/scenes?name=${NAME}&format=zip | ||
``` | ||
You can add as many `name="..."` parameters as you want to the query string. | ||
You can add as many `name="..."` parameters as you need, separated by `&` characters. | ||
|
||
## Importing data into your eCorpus instance | ||
### Importing data into your eCorpus instance | ||
|
||
### Using the API | ||
#### Using the API | ||
|
||
```bash | ||
curl -XPOST https://${HOSTNAME}/api/v1/scenes --data-binary "@${ZIP_FILE}" | jq . | ||
``` | ||
The request returns a (potentially very large) JSON object describing the result. You can filter only failure by running `jq .fail` or if you don't have `jq` installed you can skip it and use the `curl -s --fail -o /dev/null -w "%{http_code}"` | ||
The request returns a (potentially very large) JSON object describing the result. You can filter only failure by running `jq .fail` or if you don't have `jq` installed you can skip it and use the `curl -s --fail -o /dev/null -w "%{http_code}"`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
title: Voyager Story interface | ||
--- | ||
|
||
<section class="fer-gauche"> | ||
<h2 id="ligne-jaune-h2-doc">Voyager Story interface</h2> | ||
<h3 id="ligne-jaune-h3-doc">Edit your scene</h3> | ||
<div> | ||
<ul> | ||
<li>{% include button.html name="pose" icon="move" %} Position and resize the model.</li> | ||
<li>{% include button.html name="capture" icon="camera" %} Take screenshots and save the state of the scene.</li> | ||
<li>{% include button.html name="derivatives" icon="hierarchy" %} Manage derivatives (different levels of detail).</li> | ||
<li>{% include button.html name="annotations" icon="comment" %} Create and edit annotations.</li> | ||
<li>{% include button.html name="articles" icon="file" %} Create and edit articles.</li> | ||
<li>{% include button.html name="visites" icon="globe" %} Create and edit guided tours.</li> | ||
<li>{% include button.html name="audio" icon="audio" %} Add and organize audio.</li> | ||
<li>{% include button.html name="parametres" icon="eye" %} Edit scene settings.</li> | ||
</ul> | ||
<h3 id="ligne-jaune-h3-doc">Explore the scene</h3> | ||
<ul> | ||
<li>{% include button.html icon="globe" %} Display tours.</li> | ||
<li>{% include button.html icon="file" %} Display articles.</li> | ||
<li>{% include button.html icon="comment" %} Display annotations.</li> | ||
<li>{% include button.html icon="share" %} Share the scene.</li> | ||
<li>{% include button.html icon="expand" %} Fullscreen mode.</li> | ||
<li>{% include button.html icon="tools" %} Tools and settings.</li> | ||
</ul> | ||
</div> | ||
|
||
<!-- <h3 id="ligne-jaune-h3-doc">Créer une scène pas à pas</h3> --> | ||
|
||
</section> |
Oops, something went wrong.