Resources are the "base class" of all nearly all objects accessed through the REST API. All resources have the following fields:

  • name - name of the resource, which is required
  • description - optional description of resource
  • tags - optional arbitrary metadata to associate with a resource. A JSON blob.
  • is_core - a boolean that determines whether the resource is a "core" resource (more later).

As such, these fields can always be specifying when creating a Resource of any type (usually).

Permissioning

Every Resource has a fine-grained permission system. When a user creates a reason, they are given 4 permissions on that resource:

  • READ - read the resource
  • WRITE - edit the resource
  • DELETE - delete the resource
  • GRANT - grant permissions to other users

In this way, Resources can be shared.

Core Resources

Core Resources are Resources that are available to every user on the platform. These are resources that are usually created and administered by the Mira admins. Behind the scenes, the permissioning system is circumvented for read-only requests on core resources, which allows speedy access for platform-wide objects such as markets, block groups, default segments, etc.

❗️

Don't Create Core Resources

It is currently possible for non-admin users to create core resources, thereby making it possible to accidentally share resources with other users. This will be going away in future versions of the API for normal users. In the meantime, don't create core resources.