Skip to main content
GET
/
cloud
/
v1
/
users
/
assignments
Python
import os
from gcore import Gcore

client = Gcore(
    api_key=os.environ.get("GCORE_API_KEY"),  # This is the default and can be omitted
)
page = client.cloud.users.role_assignments.list()
page = page.results[0]
print(page.id)
{
  "count": 1,
  "results": [
    {
      "assigned_by": 123,
      "client_id": 123,
      "created_at": "2023-11-07T05:31:56Z",
      "id": 123,
      "project_id": 123,
      "role": "ClientAdministrator",
      "updated_at": "2019-06-25T08:42:42Z",
      "user_id": 123
    }
  ]
}

Authorizations

Authorization
string
header
required

API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234$abcdef

Query Parameters

limit
integer
default:1000

Limit the number of returned items. Falls back to default of 1000 if not specified. Limited by max limit value of 1000 Limit the number of returned items. Falls back to default of 1000 if not specified. Limited by max limit value of 1000

Required range: x <= 1000
offset
integer
default:0

Offset value is used to exclude the first set of records from the result Offset value is used to exclude the first set of records from the result

Required range: x >= 0
project_id
integer

Project ID Project ID

user_id
integer

User ID for filtering User ID for filtering

Response

200 - application/json

OK

count
integer
required

Number of objects

Required range: x >= 0
results
Role assignments schema · object[]
required

Objects