Skip to content
This repository has been archived by the owner on Jun 15, 2021. It is now read-only.

Voyant API

sgsinclair edited this page Mar 5, 2014 · 2 revisions

Storing and retrieving string resources

This uses the StoredResource tool. Because these calls work outside of a corpus, we need to add runWithoutCorpus=true (at least for now).

You can verify if a string has already been stored (which avoids resending data). If the resource does not exist, the id value of the returned object will be empty.

tool=StoredResource&runWithoutCorpus=true&verifyResourceId=[id]

You can store a resource and have Trombone provide a generated ID. The id of the returned object will contain the new resource ID.

tool=StoredResource&runWithoutCorpus=true&storeResource=[resource]

You can store a resource and provide your own ID, but note that great care should be taken to ensure that you really are using a unique ID, one generated as a GUID or as something like an MD5 of a string. The id of the return object will be set to the specified ID.

tool=StoredResource&runWithoutCorpus=true&storeResource=[resource]&resourceId=[id]

You can retrieve a resource with a provided ID:

tool=StoredResource&runWithoutCorpus=true&retrieveResourceId=[id]

Clone this wiki locally