createOrganizationRoleWithHttpInfo method
Future<Response>
createOrganizationRoleWithHttpInfo(
- CreateOrganizationRoleRequest createOrganizationRoleRequest
Create an organization role
Creates a new organization role with the given name and permissions for an instance. The key must be unique for the instance and start with the 'org:' prefix, followed by lowercase alphanumeric characters and underscores only. You can optionally provide a description for the role and specify whether it should be included in the initial role set. Organization roles support permissions that can be assigned to control access within the organization.
Note: This method returns the HTTP Response.
Parameters:
- CreateOrganizationRoleRequest createOrganizationRoleRequest (required):
Implementation
Future<http.Response> createOrganizationRoleWithHttpInfo(
CreateOrganizationRoleRequest createOrganizationRoleRequest,
) async {
// ignore: prefer_const_declarations
final path = r'/organization_roles';
// ignore: prefer_final_locals
Object? postBody = createOrganizationRoleRequest;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}