tesserae / apitess

Tesserae API
0 stars 4 forks source link

Ingestion via the API #36

Closed nOkuda closed 4 years ago

nOkuda commented 4 years ago

For #32.

POSTing to the /texts/ endpoint continues to be accessible only through an API server running in admin mode.

POSTing to the /texts/ endpoint now requires specification of a "metadata" field (which corresponds to the database entry of a Text) and a "file_contents" field (which should have the contents of a .tess file).

Text entities now have "ingestion_status" and "ingestion_msg" fields that indicate ingestion status for the Text. Successful ingestion will set "ingestion_status" to "Done". Failed ingestion will set "ingestion_status" to "Failed", and failure information can be found in "ingestion_msg".

The endpoint will not check for duplicates, so it is the user's responsibility to ensure that the text they are adding is not already in the database.