This repository has been archived by the owner on Apr 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Showing
2 changed files
with
69 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
title: Importing and exporting data | ||
--- | ||
|
||
# Managing your eCorpus 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 | ||
|
||
### 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 | ||
|
||
```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. | ||
|
||
## Importing data into your eCorpus instance | ||
|
||
### 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}"` |
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,36 @@ | ||
--- | ||
title: Importation et exportation de données | ||
--- | ||
|
||
# Gestion de vos données eCorpus | ||
|
||
L'interopérabilité des données est l'une des fonctionnalités clés d'eCorpus. | ||
|
||
Son expression la plus simple est que l'on peut facilement télécharger une partie ou la totalité des données d'une instance et les importer dans une autre. | ||
|
||
C'est utile à des fins de sauvegarde, mais peut également être utilisé comme moyen de réutiliser des scènes d'une organisation à une autre. | ||
|
||
## Extraire des données d'une instance eCorpus | ||
|
||
### Utilisation de l'interface | ||
|
||
Accédez à la page **collection** de votre instance eCorpus. Sélectionnez les scènes que vous souhaitez exporter et cliquez sur le bouton **Télécharger au format Zip**. | ||
|
||
|
||
### Utilisation de l'API | ||
|
||
```bash | ||
curl -XGET https://${HOSTNAME}/api/v1/scenes?name=${NAME}&format=zip | ||
``` | ||
Vous pouvez ajouter autant de paramètres `name="..."` que nécessaire, séparés par des caractères `&`. | ||
|
||
|
||
## Importer des données dans votre instance eCorpus | ||
|
||
### Utilisation de l'API | ||
|
||
```bash | ||
curl -XPOST https://${HOSTNAME}/api/v1/scenes --data-binary "@${ZIP_FILE}" | jq . | ||
``` | ||
|
||
Cette requête retourne une liste des changement effectués qui peut être assez longue. Vous pouvez filtrer les échecs en utilisant `jq .fail` ou si vous n'avez pas `jq` installé, vous pouvez utiliser curl en mode silencieux et inspecter uniquement le status de la réponse: `curl -s --fail -o /dev/null -w "%{http_code}"`. |