Entities
Find or create an entity
Find-or-create by kind and name, the app's own rule: the same name answers the same entity (200, created: false), a new one is 201. No kind means character; a look names its character in parent_id. refs and traits are then saved exactly as PATCH /v1/entities/{id} saves them — refs REPLACE the set, also on an entity the name found. A body they refuse is a 400, and an entity this call had just made is not left behind. Free.
post/v1/entities
Request
- Base URL: https://nanostudiopro.com/api
- URL: https://nanostudiopro.com/api/v1/entities
- Auth: HTTP bearer
Request body
Example request
{
"name": "Nano",
"refs": [
{
"role": "front"
}
],
"traits": {
"bio": {
"description": "A girl who follows music into the woods"
}
}
}Response
Found by name
Example response
{
"id": "cmod4q3op00011dod8a0omywd",
"name": "Pancho",
"slug": "pancho",
"photo_count": 12,
"bio": {
"born": "1983"
},
"specs": {
"fields": [
{
"key": "top_speed",
"label": "Top speed",
"value": "250 km/h"
}
]
}
}Changes
No recorded changes to this operation across all 2 revisions of this API.