---
title: "List Resources"
method: GET
path: "/v2/schema/{proj_id}/{env_id}/resources"
tags: ["Resources"]
---

# List Resources

`GET /v2/schema/{proj_id}/{env_id}/resources`

Lists all the resources defined in your schema.

## Path parameters

- `proj_id` string, required — Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").
- `env_id` string, required — Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").

## Query parameters

- `include_built_in` boolean — Whether to include or exclude built-in resources, default is False
- `include_total_count` boolean — Include total count in response
- `page` integer — Page number of the results to fetch, starting at 1.
- `per_page` integer — The number of results per page (max 100).
- `search` string — Text search for the object name or key

## Response `200`

Successful Response

- union
  - PaginatedResultResourceRead
    - `data` ResourceRead[], required — List of Resources
      - `key` string, required — A URL-friendly name of the resource (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the resource.
      - `id` string, uuid, required — Unique id of the resource
      - `organization_id` string, uuid, required — Unique id of the organization that the resource belongs to.
      - `project_id` string, uuid, required — Unique id of the project that the resource belongs to.
      - `environment_id` string, uuid, required — Unique id of the environment that the resource belongs to.
      - `created_at` string, date-time, required — Date and time when the resource was created (ISO_8601 format).
      - `updated_at` string, date-time, required — Date and time when the resource was last updated/modified (ISO_8601 format).
      - `name` string, required — The name of the resource
      - `urn` string — The [URN](https://en.wikipedia.org/wiki/Uniform_Resource_Name) (Uniform Resource Name) of the resource
      - `description` string — An optional longer description of what this resource respresents in your system
      - `actions` object — A actions definition block, typically contained within a resource type definition block. The actions represents the ways you can interact with a protected resource.
      - `type_attributes` object — optional dictionary of key-value pairs that can be used to store arbitrary metadata about this resource. This metadata can be used to filter resource using query parameters with attr_ prefix
      - `attributes` object — Attributes that each resource of this type defines, and can be used in your ABAC policies.
      - `roles` object — Roles defined on this resource. The key is the role name, and the value contains the role properties such as granted permissions, etc.
      - `relations` object — A relations definition block, typically contained within a resource type definition block. The relations represents the ways you can interact with a protected resource.
      - `v1compat_path` string
      - `v1compat_type` string
      - `v1compat_name` string
      - `action_groups` object
    - `total_count` integer, required
    - `page_count` integer
  - ResourceRead[]
    - `key` string, required — A URL-friendly name of the resource (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the resource.
    - `id` string, uuid, required — Unique id of the resource
    - `organization_id` string, uuid, required — Unique id of the organization that the resource belongs to.
    - `project_id` string, uuid, required — Unique id of the project that the resource belongs to.
    - `environment_id` string, uuid, required — Unique id of the environment that the resource belongs to.
    - `created_at` string, date-time, required — Date and time when the resource was created (ISO_8601 format).
    - `updated_at` string, date-time, required — Date and time when the resource was last updated/modified (ISO_8601 format).
    - `name` string, required — The name of the resource
    - `urn` string — The [URN](https://en.wikipedia.org/wiki/Uniform_Resource_Name) (Uniform Resource Name) of the resource
    - `description` string — An optional longer description of what this resource respresents in your system
    - `actions` object — A actions definition block, typically contained within a resource type definition block. The actions represents the ways you can interact with a protected resource.
    - `type_attributes` object — optional dictionary of key-value pairs that can be used to store arbitrary metadata about this resource. This metadata can be used to filter resource using query parameters with attr_ prefix
    - `attributes` object — Attributes that each resource of this type defines, and can be used in your ABAC policies.
    - `roles` object — Roles defined on this resource. The key is the role name, and the value contains the role properties such as granted permissions, etc.
    - `relations` object — A relations definition block, typically contained within a resource type definition block. The relations represents the ways you can interact with a protected resource.
    - `v1compat_path` string
    - `v1compat_type` string
    - `v1compat_name` string
    - `action_groups` object

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/permit/apis/permit-io-api.md) · [All operations](https://skmtc.net/permit/apis/permit-io-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/permit/permit-io-api/versions/dd6be355a62e/schema)
