Entities

Edit an entity

Name, kind, reference set (replaced) and traits (merged), the app's own save. A rename recomputes search over every photo it is tagged on. Somebody else's id is a 404. Free.

patch/v1/entities/{id}

Request

  • Base URL: https://nanostudiopro.com/api
  • URL: https://nanostudiopro.com/api/v1/entities/{id}
  • Auth: HTTP bearer

Request body

namestring
kind'character' | 'prop' | 'location' | 'look' | 'skin'
traitsobject

MERGED onto what is there: bio field by field (null clears one; a prop or a place has description and notes), voice, font, specs and slot each whole.

Example request

{
  "name": "Nano",
  "refs": [
    {
      "role": "front"
    }
  ],
  "traits": {
    "bio": {
      "description": "A girl who follows music into the woods"
    }
  }
}

Response

The entity as saved

idstring
namestring
slugstring
kind'character' | 'prop' | 'location' | 'look' | 'skin'
parent_idstring nullable

A look's character; null for every other kind.

photo_countinteger

Distinct scans this entity is tagged on — what the app calls photos. OPTIONAL because it is a list-only field: GET /v1/entities/{id} leaves the key out rather than returning a zero, since there facets[].count is the number that matters and recounting would cost the detail view a query it never asked for.

created_atstring date-time

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.