How to set an item class (@type) using the Rest API

This issue thread over at github was useful in finding out how to upload items via the Rest API.

I’m still stuck on how to set the class on a resource. Can anybody provide an example? I’ve tried reverse engineering it by creating items with a class but I can’t work it out.


Do you speak about RDF class (resource class) or about resource type?

The type of the resource is written first in URL. To read item #100:

To read media #101:

To set resource class, you need to know its Omeka ID then add this JSON-LD:

  "o:resource_class": {
    "o:id": 1