orgsSSORoles := client .OrgsSSORoles ()
OrgsSSORoles
Create Org SSO Role
CreateOrgSsoRole (
ctx context .Context ,
orgId uuid .UUID ,
body * models .SsoRoleOrg ) (
models .ApiResponse [models .SsoRoleOrg ],
error )
Parameter
Type
Tags
Description
orgId
uuid.UUID
Template, Required
-
body
*models.SsoRoleOrg
Body, Optional
Request Body
models.SsoRoleOrg
ctx := context .Background ()
orgId := uuid .MustParse ("000000ab-00ab-00ab-00ab-0000000000ab" )
body := models.SsoRoleOrg {
Name : "string" ,
Privileges : []models.PrivilegeOrg {
models.PrivilegeOrg {
Role : models .PrivilegeOrgRoleEnum ("admin" ),
Scope : models .PrivilegeOrgScopeEnum ("org" ),
SiteId : models .ToPointer (uuid .MustParse ("b069b358-4c97-5319-1f8c-7c5ca64d6ab1" )),
AdditionalProperties : map [string ]interface {}{
"msp_id" : interface {}("b069b358-4c97-5319-1f8c-7c5ca64d6ab1" ),
"msp_name" : interface {}("string" ),
"name" : interface {}("string" ),
"org_name" : interface {}("string" ),
"orggroup_ids" : interface {}("b069b358-4c97-5319-1f8c-7c5ca64d6ab1" ),
"sitegroup_ids" : interface {}("b069b358-4c97-5319-1f8c-7c5ca64d6ab1" ),
},
},
},
}
apiResponse , err := orgsSSORoles .CreateOrgSsoRole (ctx , orgId , & body )
if err != nil {
log .Fatalln (err )
} else {
// Printing the result and response
fmt .Println (apiResponse .Data )
fmt .Println (apiResponse .Response .StatusCode )
}
Example Response (as JSON)
{
"created_time" : 0 ,
"id" : " b069b358-4c97-5319-1f8c-7c5ca64d6ab1" ,
"modified_time" : 0 ,
"msp_id" : " b069b358-4c97-5319-1f8c-7c5ca64d6ab1" ,
"name" : " string" ,
"org_id" : " b069b358-4c97-5319-1f8c-7c5ca64d6ab1" ,
"privileges" : [
{
"role" : " admin" ,
"scope" : " sitegroup" ,
"sitegroup_id" : " 6f4bf402-45f9-2a56-6c8b-7f83d3bc98e9"
}
],
"site_id" : " b069b358-4c97-5319-1f8c-7c5ca64d6ab1"
}
Delete Org SSO Role
DeleteOrgSsoRole (
ctx context .Context ,
orgId uuid .UUID ,
ssoroleId uuid .UUID ) (
http .Response ,
error )
Parameter
Type
Tags
Description
orgId
uuid.UUID
Template, Required
-
ssoroleId
uuid.UUID
Template, Required
-
``
ctx := context .Background ()
orgId := uuid .MustParse ("000000ab-00ab-00ab-00ab-0000000000ab" )
ssoroleId := uuid .MustParse ("000000ab-00ab-00ab-00ab-0000000000ab" )
resp , err := orgsSSORoles .DeleteOrgSsoRole (ctx , orgId , ssoroleId )
if err != nil {
log .Fatalln (err )
} else {
fmt .Println (resp .StatusCode )
}
Get Org SSO Role Details
GetOrgSsoRole (
ctx context .Context ,
orgId uuid .UUID ,
ssoroleId uuid .UUID ) (
models .ApiResponse [models .SsoRoleOrg ],
error )
Parameter
Type
Tags
Description
orgId
uuid.UUID
Template, Required
-
ssoroleId
uuid.UUID
Template, Required
-
models.SsoRoleOrg
ctx := context .Background ()
orgId := uuid .MustParse ("000000ab-00ab-00ab-00ab-0000000000ab" )
ssoroleId := uuid .MustParse ("000000ab-00ab-00ab-00ab-0000000000ab" )
apiResponse , err := orgsSSORoles .GetOrgSsoRole (ctx , orgId , ssoroleId )
if err != nil {
log .Fatalln (err )
} else {
// Printing the result and response
fmt .Println (apiResponse .Data )
fmt .Println (apiResponse .Response .StatusCode )
}
Example Response (as JSON)
{
"created_time" : 0 ,
"id" : " b069b358-4c97-5319-1f8c-7c5ca64d6ab1" ,
"modified_time" : 0 ,
"msp_id" : " b069b358-4c97-5319-1f8c-7c5ca64d6ab1" ,
"name" : " string" ,
"org_id" : " b069b358-4c97-5319-1f8c-7c5ca64d6ab1" ,
"privileges" : [
{
"role" : " admin" ,
"scope" : " sitegroup" ,
"sitegroup_id" : " 6f4bf402-45f9-2a56-6c8b-7f83d3bc98e9"
}
],
"site_id" : " b069b358-4c97-5319-1f8c-7c5ca64d6ab1"
}
Get List of Org SSO Roles
ListOrgSsoRoles (
ctx context .Context ,
orgId uuid .UUID ,
limit * int ,
page * int ) (
models.ApiResponse [[]models.SsoRoleOrg ],
error )
Parameter
Type
Tags
Description
orgId
uuid.UUID
Template, Required
-
limit
*int
Query, Optional
Default : 100
Constraints : >= 0
page
*int
Query, Optional
Default : 1
Constraints : >= 1
[]models.SsoRoleOrg
ctx := context .Background ()
orgId := uuid .MustParse ("000000ab-00ab-00ab-00ab-0000000000ab" )
limit := 100
page := 1
apiResponse , err := orgsSSORoles .ListOrgSsoRoles (ctx , orgId , & limit , & page )
if err != nil {
log .Fatalln (err )
} else {
// Printing the result and response
fmt .Println (apiResponse .Data )
fmt .Println (apiResponse .Response .StatusCode )
}
Update Org SSO Role
UpdateOrgSsoRole (
ctx context .Context ,
orgId uuid .UUID ,
ssoroleId uuid .UUID ,
body * models .SsoRoleOrg ) (
models .ApiResponse [models .SsoRoleOrg ],
error )
Parameter
Type
Tags
Description
orgId
uuid.UUID
Template, Required
-
ssoroleId
uuid.UUID
Template, Required
-
body
*models.SsoRoleOrg
Body, Optional
Request Body
models.SsoRoleOrg
ctx := context .Background ()
orgId := uuid .MustParse ("000000ab-00ab-00ab-00ab-0000000000ab" )
ssoroleId := uuid .MustParse ("000000ab-00ab-00ab-00ab-0000000000ab" )
body := models.SsoRoleOrg {
Name : "string" ,
Privileges : []models.PrivilegeOrg {
models.PrivilegeOrg {
Role : models .PrivilegeOrgRoleEnum ("admin" ),
Scope : models .PrivilegeOrgScopeEnum ("org" ),
SiteId : models .ToPointer (uuid .MustParse ("b069b358-4c97-5319-1f8c-7c5ca64d6ab1" )),
AdditionalProperties : map [string ]interface {}{
"msp_id" : interface {}("b069b358-4c97-5319-1f8c-7c5ca64d6ab1" ),
"msp_name" : interface {}("string" ),
"name" : interface {}("string" ),
"org_name" : interface {}("string" ),
"orggroup_ids" : interface {}("b069b358-4c97-5319-1f8c-7c5ca64d6ab1" ),
"sitegroup_ids" : interface {}("b069b358-4c97-5319-1f8c-7c5ca64d6ab1" ),
},
},
},
}
apiResponse , err := orgsSSORoles .UpdateOrgSsoRole (ctx , orgId , ssoroleId , & body )
if err != nil {
log .Fatalln (err )
} else {
// Printing the result and response
fmt .Println (apiResponse .Data )
fmt .Println (apiResponse .Response .StatusCode )
}
Example Response (as JSON)
{
"created_time" : 0 ,
"id" : " b069b358-4c97-5319-1f8c-7c5ca64d6ab1" ,
"modified_time" : 0 ,
"msp_id" : " b069b358-4c97-5319-1f8c-7c5ca64d6ab1" ,
"name" : " string" ,
"org_id" : " b069b358-4c97-5319-1f8c-7c5ca64d6ab1" ,
"privileges" : [
{
"role" : " admin" ,
"scope" : " sitegroup" ,
"sitegroup_id" : " 6f4bf402-45f9-2a56-6c8b-7f83d3bc98e9"
}
],
"site_id" : " b069b358-4c97-5319-1f8c-7c5ca64d6ab1"
}