mirror of
https://github.com/paralus/paralus.git
synced 2026-03-06 02:50:20 +00:00
137 lines
3.1 KiB
ReStructuredText
137 lines
3.1 KiB
ReStructuredText
:host = http://localhost:11000
|
|
:partner = 439fd1c6-e947-4dad-a9e9-ca1f50898f85
|
|
:org = 960bb196-76b2-430a-a72e-88d8362c07c3
|
|
:group = my-group
|
|
:role = my-role
|
|
:groupid = 99f4ea22-089c-4016-a1f9-e8b156d34cf5
|
|
:roleid = 3de58ba8-a42f-49bb-b8bd-052363123fdc
|
|
:userid = 8f35abd7-0c8c-4770-a2c7-430f79bb5eb7
|
|
:projectid = c61ec2fe-543c-4e10-a1b6-c53c43fb9ca4
|
|
|
|
## Users
|
|
|
|
# Create user
|
|
POST :host/auth/v3/partner/:partner/organization/:org/users
|
|
{"spec": {"username": "updatduser@notaprovider.com", "firstName": "John", "lastName": "Doe"}}
|
|
|
|
# Create user with roles
|
|
POST :host/auth/v3/partner/:partner/organization/:org/users
|
|
Content-Type: application/yaml
|
|
|
|
spec:
|
|
username: tany@notarvider.com
|
|
firstName: John
|
|
lastName: Doe
|
|
projectnamespaceroles:
|
|
- role: :roleid
|
|
namespace: 7
|
|
project: :projectid
|
|
- role: :roleid
|
|
namespace: 9
|
|
project: :projectid
|
|
|
|
# Create user with groups
|
|
POST :host/auth/v3/partner/:partner/organization/:org/users
|
|
Content-Type: application/yaml
|
|
|
|
spec:
|
|
username: aegy@notaprovider.com
|
|
firstName: John
|
|
lastName: Doe
|
|
groups:
|
|
- :groupid
|
|
|
|
# Get all users
|
|
GET :host/auth/v3/partner/:partner/organization/:org/users
|
|
|
|
# Get single user
|
|
GET :host/auth/v3/partner/:partner/organization/:org/user/:userid
|
|
|
|
# Update user info
|
|
PUT :host/auth/v3/partner/:partner/organization/:org/user/:userid
|
|
{"spec": {"username": "changedemail@notaprovider.com", "firstName": "John", "lastName": "Doe"}}
|
|
|
|
# Delete single user
|
|
DELETE :host/auth/v3/partner/:partner/organization/:org/user/:userid
|
|
|
|
|
|
## Groups
|
|
|
|
# Create group
|
|
POST :host/auth/v3/partner/:partner/organization/:org/groups
|
|
Content-Type: application/yaml
|
|
|
|
metadata:
|
|
name: :groupname
|
|
description: My first description
|
|
partner: :partner
|
|
organization: :org
|
|
spec:
|
|
type: simple
|
|
users:
|
|
- 8f35abd7-0c8c-4770-a2c7-430f79bb5eb7
|
|
projectnamespaceroles:
|
|
- role: :roleid
|
|
namespace: 7
|
|
project: :projectid
|
|
|
|
# Create group no namespace
|
|
POST :host/auth/v3/partner/:partner/organization/:org/groups
|
|
Content-Type: application/yaml
|
|
|
|
metadata:
|
|
name: :groupname
|
|
description: My first description
|
|
partner: :partner
|
|
organization: :org
|
|
spec:
|
|
type: simple
|
|
users:
|
|
- 8f35abd7-0c8c-4770-a2c7-430f79bb5eb7
|
|
projectnamespaceroles:
|
|
- role: :roleid
|
|
project: :projectid
|
|
|
|
# Create group no namespace and project
|
|
POST :host/auth/v3/partner/:partner/organization/:org/groups
|
|
Content-Type: application/yaml
|
|
|
|
metadata:
|
|
name: :groupname
|
|
description: My first description
|
|
partner: :partner
|
|
organization: :org
|
|
spec:
|
|
type: simple
|
|
users:
|
|
- 8f35abd7-0c8c-4770-a2c7-430f79bb5eb7
|
|
projectnamespaceroles:
|
|
- role: :roleid
|
|
|
|
# Get all groups
|
|
GET :host/auth/v3/partner/:partner/organization/:org/groups
|
|
|
|
# Get a group
|
|
GET :host/auth/v3/partner/:partner/organization/:org/group/:groupid
|
|
|
|
|
|
## Roles
|
|
|
|
# Create role
|
|
|
|
POST :host/auth/v3/partner/:partner/organization/:org/roles
|
|
Content-Type: application/yaml
|
|
|
|
metadata:
|
|
name: :role
|
|
description: My first role
|
|
partner: :partner
|
|
organization: :org
|
|
spec:
|
|
type: simple
|
|
|
|
# Get all roles
|
|
GET :host/auth/v3/partner/:partner/organization/:org/roles
|
|
|
|
# Get a role
|
|
GET :host/auth/v3/partner/:partner/organization/:org/role/:role |