knaw-huc / Dexter

MIT License
1 stars 0 forks source link

POST on /corpora and /sources should be able to support keywords, languages #11

Closed svandaalen closed 9 months ago

svandaalen commented 2 years ago

At the moment when you create a new source, you have to, conform to the REST standard, do three different POST's (four in case of corpus):

  1. POST to /corpora or /sources with the basic metadata: title, description, rights, access, parentId, location, earliest, latest, contributor, notes.
  2. POST to /corpora/{id}/keywords or /sources/{id}keywords to add the keywords to the corpus or source.
  3. POST to /corpora/{id}/languages or /sources/{id}/languages to add the languages to the corpus or source.
  4. In case of corpus: POST to /corpus/{id}/sources to add a source to a corpus.

For the frontend it would be easier if I can POST everything with one POST to /corpora or /sources.