Shared Resource Groups
Shared Resource Groups are a specialized "resource" sharing mechanism, in other words, it allows accounts to donate their CSP Campaigns to other accounts (only campaigns at the moment).
This allows the "donee" account to utilize these resources as if they were their own, however the "donee" account can neither remove or change the donated records.
Schema
A Shared Resource Group
Type Object
| Name | Type | Description |
|---|---|---|
id |
String(format:uuid) | Desc. id |
inserted_at |
String(format:date-time) | An ISO8601 formatted timestamp |
name |
String | The display name of the resource group |
notes |
String | Desc. notes |
updated_at |
String(format:date-time) | An ISO8601 formatted timestamp |
Desc. id
A Universally unique identifier, which identifies the resource
Desc. notes
Any additional notes about the shared resource group.
Example
{
"id": "c6be45e4-b7dd-412c-96c4-777e83fb9c48",
"inserted_at": "2021-08-13T04:08:44.762841Z",
"name": "ACME Corp Shared Resources",
"notes": "",
"updated_at": "2021-08-13T04:08:44.762841Z"
}
Summary
API
List Shared Resource Groups
GET /api/v1/shared_resource_groups HTTP/1.1
Retrieve a list of shared resource groups assigned to the parent account
Query Parameters
| Name | Type | Description |
|---|---|---|
| first | Integer | Query Desc. first |
| last | Integer | Query Desc. last |
| after | String | Query Desc. after |
| before | String | Query Desc. before |
Query Desc. first
The number of items to return starting from the 'after' cursor
Query Desc. last
The number of items to return behind the 'before' cursor
Query Desc. after
The cursor representing the starting point of a 'first' based paging
Query Desc. before
The cursor representing the starting point of a 'last' based paging
Request
GET /api/v1/shared_resource_groups HTTP/1.1
Accept: application/json
Response 200
application/json
HTTP/1.1 200
Content-Type: application/json
Content-Length: 666
{
"count": 1,
"page_info": {
"first": "string",
"has_next_page": true,
"has_previous_page": true,
"last": "string"
},
"results": [
{
"associations": {
"account": {
"id": "c6be45e4-b7dd-412c-96c4-777e83fb9c48"
},
"donee": {
"id": "c6be45e4-b7dd-412c-96c4-777e83fb9c48"
}
},
"data": {
"id": "c6be45e4-b7dd-412c-96c4-777e83fb9c48",
"inserted_at": "2021-08-13T04:08:44.762841Z",
"name": "ACME Corp Shared Resources",
"notes": "",
"updated_at": "2021-08-13T04:08:44.762841Z"
},
"type": "shared_resource_group"
}
]
}
Response 403
application/json
HTTP/1.1 403
Content-Type: application/json
Content-Length: 312
{
"errors": [
{
"code": "access_denied.no_scope",
"detail": "No scope available to user role",
"params": {
"action": "index",
"level": "guest",
"resource": "resource"
},
"sub_code": "none",
"title": "Access Denied, no scope available"
}
]
}
Get Shared Resource Group
GET /api/v1/shared_resource_groups/{id} HTTP/1.1
Lookup a shared resource group by ID
Path Parameters
| Name | Type | Description |
|---|---|---|
| id | String(format:uuid)! | User ID |
Request
GET /api/v1/shared_resource_groups/{id} HTTP/1.1
Accept: application/json
Response 200
application/json
HTTP/1.1 200
Content-Type: application/json
Content-Length: 433
{
"associations": {
"account": {
"id": "c6be45e4-b7dd-412c-96c4-777e83fb9c48"
},
"donee": {
"id": "c6be45e4-b7dd-412c-96c4-777e83fb9c48"
}
},
"data": {
"id": "c6be45e4-b7dd-412c-96c4-777e83fb9c48",
"inserted_at": "2021-08-13T04:08:44.762841Z",
"name": "ACME Corp Shared Resources",
"notes": "",
"updated_at": "2021-08-13T04:08:44.762841Z"
},
"type": "shared_resource_group"
}
Response 403
application/json
HTTP/1.1 403
Content-Type: application/json
Content-Length: 312
{
"errors": [
{
"code": "access_denied.no_scope",
"detail": "No scope available to user role",
"params": {
"action": "index",
"level": "guest",
"resource": "resource"
},
"sub_code": "none",
"title": "Access Denied, no scope available"
}
]
}
Response 404
application/json
HTTP/1.1 404
Content-Type: application/json
Content-Length: 314
{
"errors": [
{
"code": "not_found",
"detail": "The specified resource could not be found",
"params": {
"resource": {
"id": "3fbb573a-6049-44a0-a12c-d3a1ffae0b69",
"type": "user"
}
},
"sub_code": "none",
"title": "Not Found"
}
]
}
Shared Resource Groups - Notes
At the moment, the client is not able to create or delete shared resource groups, since this is a very specific binding between different accounts they must be setup by a system administrator.