Zensus

Name

lookup names.

Get names

GET /zensus/names

Get a single name

GET /zensus/names/:id

--

Add a name

POST /zensus/names

Input:
appellation_parts_attributes array with hashes of type (Descriptor, Forename, Surname, Prefix, Suffix, Birthname), body (string), optional position (integer) and preferred either true or false.
language string the language the name is wirtten in.
period string the period in which the name was used. cf 'nBab', 'nAss', 'kass' or 'current'.
trans string (optional). Possible values are: '', 'Transcription' or 'Transliteration'.
agent_id integer the identifier of the assigned agent for that name.

Example:

{
  "appellation_parts_attributes": [
    {
      "type": "Descriptor", 
      "body": "Nebukadnezar",
      "position": 1,
      "preferred": true
    }
  ],
  "language": "de",
  "period": "nBab",
  "trans": nil,
  "agent_id": nil
}

--

curl -i -H "Content-Type: application/json" -H "Authorization: Bearer " -X POST -d '{"appellation_parts_attributes": [{"type": "Descriptor", "body": "Hammurapi", "preferred": true}], "language": "de", "period": "aBab"}' http://localhost:3000/api/zensus/names