Skip to main content
Uma versão mais recente deste produto está disponível.
O português é fornecido por meio de tradução automática para sua conveniência. O inglês precede o português em caso de inconsistências.

Create a new group for a user

Colaboradores

POST /accounts/{account_id}/core/v1/users/{user_id}/groups

Indicates the desired values for the Group API resource to be created.

Parameters

Name Type In Required Description

account_id

string

path

True

ID of the containing account resource

  • example: {{.Account}}

user_id

string

path

True

ID of the containing user resource

Request Body

Indicates the desired values for the Group API resource to be created.

Name Type Required Description

type

string

True

Media type of the resource. Defined values are:

  • "application/astra-group"

version

string

True

Version of the resource. Defined values are:

  • "1.0"

  • "1.1"

name

string

False

The name of the group resource. If not specified on create, the value will be set to

  • first Common Name (CN) Relative Distinguished Names (RDN) if found in the authID,

  • authID, otherwise. If not specified on update, the value will be preserved without modification. Defined values are:

  • Minimum length: 1

  • Maximum length: 2048

authProvider

string

True

The authentication provider for the group resource. Defined values are:

  • "ldap"

authID

string

True

The Distinguished Name (DN) for an LDAP group. Defined values are:

  • Minimum length: 1

  • Maximum length: 2048

metadata

type_astra_metadata_update

False

Client and service-specified metadata associated with the resource. Defined values are:

  • Conforms to the Astra Metadata Schema If not specified on create, a metadata object will be created with no labels. If not specified on update, the metadata object's labels, creationTimestamp and createdBy, will be preserved without modification.

Example request
{
  "type": "application/astra-group",
  "version": "1.1",
  "name": "engineering-group",
  "authProvider": "ldap",
  "authID": "CN=Engineering,CN=Groups,DC=example,DC=com"
}

Response

Status: 201, Returns the newly created group resource in the JSON response body.
Name Type Required Description

type

string

True

Media type of the resource. Defined values are:

  • "application/astra-group"

version

string

True

Version of the resource. Defined values are:

  • "1.0"

  • "1.1"

id

string

True

Globally unique identifier of the resource. Defined values are:

  • Conforms to the UUIDv4 Schema

name

string

True

The name of the group resource. If not specified on create, the value will be set to

  • first Common Name (CN) Relative Distinguished Names (RDN) if found in the authID,

  • authID, otherwise. If not specified on update, the value will be preserved without modification. Defined values are:

  • Minimum length: 1

  • Maximum length: 2048

authProvider

string

True

The authentication provider for the group resource. Defined values are:

  • "ldap"

authID

string

True

The Distinguished Name (DN) for an LDAP group. Defined values are:

  • Minimum length: 1

  • Maximum length: 2048

metadata

type_astra_metadata_update

True

Client and service-specified metadata associated with the resource. Defined values are:

  • Conforms to the Astra Metadata Schema If not specified on create, a metadata object will be created with no labels. If not specified on update, the metadata object's labels, creationTimestamp and createdBy, will be preserved without modification.

Example response
{
  "type": "application/astra-group",
  "version": "1.1",
  "id": "77754011-b93f-515e-a145-5a343aecdece",
  "name": "engineering-group",
  "authProvider": "ldap",
  "authID": "CN=Engineering,CN=Groups,DC=example,DC=com",
  "metadata": {
    "labels": [],
    "creationTimestamp": "2022-10-06T20:58:16.305662Z",
    "modificationTimestamp": "2022-10-06T20:58:16.305662Z",
    "createdBy": "8f84cf09-8036-51e4-b579-bd30cb07b269"
  }
}

Response

Status: 409, Conflict
Name Type Required Description

type

string

True

title

string

True

detail

string

True

status

string

True

correlationID

string

False

invalidFields

array[invalidFields]

False

List of invalid request body fields

Example response
{
  "type": "https://astra.netapp.io/problems/10",
  "title": "JSON resource conflict",
  "detail": "The request body JSON contains a field that conflicts with an idempotent value.",
  "status": "409"
}

Response

Status: 403, Forbidden
Name Type Required Description

type

string

True

title

string

True

detail

string

True

status

string

True

correlationID

string

False

Example response
{
  "type": "https://astra.netapp.io/problems/14",
  "title": "Unauthorized access",
  "detail": "The user isn't enabled.",
  "status": "403"
}

Response

Status: 406, Not acceptable
Name Type Required Description

type

string

True

title

string

True

detail

string

True

status

string

True

correlationID

string

False

Example response
{
  "type": "https://astra.netapp.io/problems/32",
  "title": "Unsupported content type",
  "detail": "The response can't be returned in the requested format.",
  "status": "406"
}

Response

Status: 500, Internal server error
Name Type Required Description

type

string

True

title

string

True

detail

string

True

status

string

True

correlationID

string

False

Example response
{
  "type": "https://astra.netapp.io/problems/34",
  "title": "Internal server error",
  "detail": "The server was unable to process this request.",
  "status": "500"
}

Error

Status: 400, Bad request
Name Type Required Description

type

string

True

title

string

True

detail

string

True

status

string

True

correlationID

string

False

invalidParams

array[invalidParams]

False

List of invalid query parameters

Example error response
{
  "type": "https://astra.netapp.io/problems/7",
  "title": "Invalid JSON payload",
  "detail": "The request body is not valid JSON.",
  "status": "400"
}

Definitions

See Definitions

type_astra_label

Name Type Required Description

name

string

True

value

string

True

type_astra_metadata_update

Client and service-specified metadata associated with the resource. Defined values are:

  • Conforms to the Astra Metadata Schema If not specified on create, a metadata object will be created with no labels. If not specified on update, the metadata object's labels, creationTimestamp and createdBy, will be preserved without modification.

Name Type Required Description

labels

array[type_astra_label]

False

creationTimestamp

string

False

modificationTimestamp

string

False

createdBy

string

False

modifiedBy

string

False

invalidParams

Name Type Required Description

name

string

True

Name of the invalid query parameter

reason

string

True

Reason why the query parameter is invalid

invalidFields

Name Type Required Description

name

string

True

Name of the invalid request body field

reason

string

True

Reason why the request body field is invalid

Close
Try it out

Sign in with your NetApp Cloud Central credentials.

Try this API

Parameters

Headers

Body

Code

Response