---
title: "POST /groups/{group_id}/resources/{resource_id}"
method: POST
path: "/groups/{group_id}/resources/{resource_id}"
tags: ["groups"]
---

# POST /groups/{group_id}/resources/{resource_id}

`POST /groups/{group_id}/resources/{resource_id}`

Adds a resource to a group.

## Path parameters

- `group_id` string, uuid, required
- `resource_id` string, uuid, required

## Query parameters

- `access_level_remote_id` string

## Request body

- object
  - `access_level_remote_id` string — The remote ID of the access level to grant to this user. If omitted, the default access level remote ID value (empty string) is used.
  - `duration_minutes` integer — The duration for which the resource can be accessed (in minutes). Use 0 to set to indefinite.

## Response `200`

The created `GroupResource` object.

- GroupResource — # GroupResource Object ### Description The `GroupResource` object is used to represent a relationship between a group and a resource.
  - `group_id` string, uuid, required — The ID of the group.
  - `resource_id` string, uuid, required — The ID of the resource.
  - `group_name` string — The name of the group
  - `resource_name` string — The name of the resource
  - `expiration_date` string, date-time, nullable — The day and time the group's access will expire.
  - `access_level` ResourceAccessLevel, required — # Access Level Object ### Description The `AccessLevel` object is used to represent the level of access that a principal has. The "default" access level is a `AccessLevel` object whose fields are all empty strings. ### Usage Example View the `AccessLevel` of a resource/user or resource/group pair to see the level of access granted to the resource.
    - `access_level_name` string, required — The human-readable name of the access level.
    - `access_level_remote_id` string, required — The machine-readable identifier of the access level.

---

[API](https://skmtc.net/opal/apis/opal-api.md) · [All operations](https://skmtc.net/opal/apis/opal-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/opal/opal-api/revisions/13b58df96d40/schema)
