Create a new role in NetApp Console local deployment
POST /roles
Creates a new role.
Request Body
Indicates the desired values for the role to be created.
| Name | Type | Required | Description |
|---|---|---|---|
category |
string |
False |
Specifies the classification of the role.
|
description |
string |
False |
JSON string containing the description of the role. Defined values are: * Minimum length: 1 * Maximum length: 254 * This string is internally validated to prevent XSS, Unicode, directory traversal, and SQL-injection attacks. |
isAgentRole |
string |
False |
Specifies if the role can be used for a Agent. Defined values are:
|
isServiceAccountRole |
string |
False |
Specifies if the role can be used for a Service Account. Defined values are:
|
isSystem |
string |
False |
Specifies if an object is system generated. Defined values are:
|
isUserRole |
string |
False |
Specifies if the role can be used for a User. Defined values are:
|
metadata |
False |
Metadata associated with the resource. |
|
name |
string |
True |
JSON string containing a name for the role. Defined values are:
|
roles |
array[string] |
False |
Array containing the UUIDs of child roles. Each UUID in the array represents a role that is a child of the aggregate (parent) role. |
tags |
array[tags] |
False |
JSON array of tags (name/value pairs). |
type |
string |
True |
Media type of the resource. Defined values are:
|
version |
string |
True |
Version of the resource. Defined values are:
|
Example request
{
"description": "This role have alpha & beta permissions for NetApp Sales Territory",
"name": "Super admin",
"roles": [
"33475e47-e975-48db-936d-73c53d96450b",
"04779339-9192-462c-88ee-8df050ef06c8"
],
"type": "application/vnd.netapp.bxp.role",
"version": "1.0"
}
Response
Status: 201, Returns the newly created role in the JSON response body.
| Name | Type | Required | Description |
|---|---|---|---|
category |
string |
False |
Specifies the classification of the role.
|
description |
string |
False |
JSON string containing the description of the role. Defined values are: * Minimum length: 1 * Maximum length: 254 * This string is internally validated to prevent XSS, Unicode, directory traversal, and SQL-injection attacks. |
id |
string |
True |
Globally unique identifier of the resource. Defined values are:
|
isAgentRole |
string |
False |
Specifies if the role can be used for an agent. Defined values are:
|
isServiceAccountRole |
string |
False |
Specifies if the role can be used for a service account. Defined values are:
|
isSystem |
string |
False |
Specifies if an object is system generated. Defined values are:
|
isUserRole |
string |
False |
Specifies if the role can be used for a user. Defined values are:
|
links |
array[type_bxp_link] |
False |
Array of link relationships associated with the resource or collection. |
metadata |
True |
Metadata associated with the resource. |
|
name |
string |
True |
JSON string containing a name for the role. Defined values are:
|
roleInternalName |
string |
False |
JSON string containing an internal name for the role used by the UI to validate role name changes. Value is the same as internalName in the private field. Defined values are:
|
roles |
array[string] |
False |
Array containing the UUIDs of child roles. Each UUID in the array represents a role that is a child of the aggregate (parent) role. |
tags |
array[tags] |
True |
JSON array of tags (name/value pairs). |
type |
string |
True |
Media type of the resource. Defined values are:
|
version |
string |
True |
Version of the resource. Defined values are:
|
Example response
{
"description": "This role have alpha & beta permissions for NetApp Sales Territory",
"id": "666a3f38-d4fa-5b62-a391-a69029758d32",
"metadata": {
"createdBy": "8f84cf09-8036-51e4-b579-bd30cb07b269",
"creationTimestamp": "2022-10-06T20:58:16.305662Z",
"labels": [],
"modificationTimestamp": "2022-10-06T20:58:16.305662Z",
"modifiedBy": "8f84cf09-8036-51e4-b579-bd30cb07b269"
},
"name": "StorageAdmin",
"type": "application/vnd.netapp.bxp.role",
"version": "1.0"
}
Error
Status: 400, Bad request
| Name | Type | Required | Description |
|---|---|---|---|
correlationId |
string |
False |
Internal UUID representing the request or trace ID related. |
detail |
string |
False |
Details about the problem. |
invalidParams |
array[invalidParams] |
False |
List of invalid parameters. |
status |
string |
True |
HTTP error code related to the problem. |
title |
string |
True |
Title description of the problem. |
type |
string |
True |
Content-type of the object. |
Example error response
{
"detail": "The supplied query parameters are invalid.",
"status": "400",
"title": "Invalid query parameters",
"type": "https://bluexp.netapp.io/problems/1"
}
Error
Status: 401, Unauthorized
| Name | Type | Required | Description |
|---|---|---|---|
correlationId |
string |
False |
Internal UUID representing the request or trace ID related. |
detail |
string |
False |
Details about the problem. |
invalidParams |
array[invalidParams] |
False |
List of invalid parameters. |
status |
string |
True |
HTTP error code related to the problem. |
title |
string |
True |
Title description of the problem. |
type |
string |
True |
Content-type of the object. |
Example error response
{
"detail": "The request is missing the required bearer token.",
"status": "401",
"title": "Missing bearer token",
"type": "https://bluexp.netapp.io/problems/1"
}
Error
Status: 403, Forbidden
| Name | Type | Required | Description |
|---|---|---|---|
correlationId |
string |
False |
Internal UUID representing the request or trace ID related. |
detail |
string |
False |
Details about the problem. |
invalidParams |
array[invalidParams] |
False |
List of invalid parameters. |
status |
string |
True |
HTTP error code related to the problem. |
title |
string |
True |
Title description of the problem. |
type |
string |
True |
Content-type of the object. |
Example error response
{
"detail": "The requested operation isn't permitted.",
"status": "403",
"title": "Operation not permitted",
"type": "https://bluexp.netapp.io/problems/11"
}
Error
Status: 404, Not found
| Name | Type | Required | Description |
|---|---|---|---|
correlationId |
string |
False |
Internal UUID representing the request or trace ID related. |
detail |
string |
False |
Details about the problem. |
invalidParams |
array[invalidParams] |
False |
List of invalid parameters. |
status |
string |
True |
HTTP error code related to the problem. |
title |
string |
True |
Title description of the problem. |
type |
string |
True |
Content-type of the object. |
Example error response
{
"detail": "The collection specified in the request URI wasn't found.",
"status": "404",
"title": "Collection not found",
"type": "https://bluexp.netapp.io/problems/2"
}
Error
Status: 409, Conflict
| Name | Type | Required | Description |
|---|---|---|---|
correlationId |
string |
False |
Internal UUID representing the request or trace ID related. |
detail |
string |
False |
Details about the problem. |
invalidParams |
array[invalidParams] |
False |
List of invalid parameters. |
status |
string |
True |
HTTP error code related to the problem. |
title |
string |
True |
Title description of the problem. |
type |
string |
True |
Content-type of the object. |
Example error response
{
"detail": "The request body JSON contains a field that conflicts with an idempotent value.",
"status": "409",
"title": "JSON resource conflict",
"type": "https://bluexp.netapp.io/problems/10"
}
Definitions
See Definitions
type_bxp_label
Name/value pair.
| Name | Type | Required | Description |
|---|---|---|---|
name |
string |
True |
Name of the label. |
value |
string |
True |
Value of the label. |
type_bxp_metadata
Metadata associated with the resource.
| Name | Type | Required | Description |
|---|---|---|---|
createdBy |
string |
False |
UUID of the user who created the resource. |
creationTimestamp |
string |
False |
Resource creation date. |
labels |
array[type_bxp_label] |
False |
Array of name/value pairs representing additional information for the resource. |
modificationTimestamp |
string |
False |
Resource modification date. |
modifiedBy |
string |
False |
UUID of the user who modified the resource. |
accept-post
Provides details about which media types are accepted when creating a resource.
accept-put
Indicates details about what media types are accepted when updating a resource.
hints
Provides details about how a link can be interacted with, such as allowed methods, required permissions, and accepted media types for create/update operations.
| Name | Type | Required | Description |
|---|---|---|---|
accept-post |
False |
Provides details about which media types are accepted when creating a resource. |
|
accept-put |
False |
Indicates details about what media types are accepted when updating a resource. |
|
allow |
array[string] |
False |
An array of methods that can be used to interact with the link target. Defined values for collections: "POST" - Indicates if new resources can be created in the collection. Defined values for resources: "PUT" - Indicates if the resource can be modified "DELETE" - Indicates if the resource can be deleted |
permissions |
array[string] |
False |
List of the permissions required to use the link. |
status |
string |
False |
Indicates if the target of the link is deprecated. Defined values are: "deprecated" |
targetSchema
Link to a JSON schema that can be used to validate the target of the link (response body).
The preferred format is a $ref link to an external schema.
This field is optional and should only be included when there is a known schema for the target of the href.
See https://json-schema.org/draft/2019-09/json-schema-hypermedia.html#rfc.section.9.2 for more details.
type_bxp_link
Link relationship
| Name | Type | Required | Description |
|---|---|---|---|
hints |
False |
Provides details about how a link can be interacted with, such as allowed methods, required permissions, and accepted media types for create/update operations. |
|
href |
string |
True |
String describing a relative URI. |
rel |
string |
True |
The type of relationship for the link. Values are defined in the IANA Link Relationships registry, or an extension relationship type as specified in section 2.1.2 of RFC 8288. |
targetSchema |
False |
Link to a JSON schema that can be used to validate the target of the link (response body). The preferred format is a $ref link to an external schema. This field is optional and should only be included when there is a known schema for the target of the href. See https://json-schema.org/draft/2019-09/json-schema-hypermedia.html#rfc.section.9.2 for more details. |
|
title |
string |
False |
Label of a link such that it can be used as a human-readable identifier (e.g., a menu entry). Minimum length: 0 Maximum length: 1023 |
type |
string |
False |
The media type of the target of the href. This field is optional and should be included when there is a known media type for the target of the href. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link for more details. |
invalidParams
| Name | Type | Required | Description |
|---|---|---|---|
name |
string |
True |
Name of the invalid parameter. |
reason |
string |
True |
Reason why the parameter is invalid. |