Skip to main content
A newer release of this product is available.

Adds users to a UNIX group and SVM

Contributors

POST /name-services/unix-groups/{svm.uuid}/{unix_group.name}/users

Introduced In: 9.9

Adds users to the specified UNIX group and SVM.

Important notes

  • Multiple users can be added in a single call using the "records" parameter.

  • "records" parameter must not be specified when "name" parameter is specified.

  • Specified users are appended to the existing list of users.

  • Duplicate users are ignored.

  • vserver services name-service unix-group adduser

  • vserver services name-service unix-group addusers

Parameters

Name Type In Required Description

unix_group.name

string

path

True

UNIX group name.

return_records

boolean

query

False

The default is false. If set to true, the records are returned.

  • Default value:

svm.uuid

string

path

True

UUID of the SVM to which this object belongs.

Request Body

Name Type Description

_links

_links

name

string

UNIX user who belongs to the specified UNIX group and the SVM.

records

array[records]

An array of UNIX users specified to add multiple users to a UNIX group in a single API call. Not allowed when the name property is used.

skip_name_validation

boolean

Indicates whether or not the validation for the specified UNIX user names is disabled.

svm

svm

unix_group

unix_group

Example request
{
  "_links": {
    "self": {
      "href": "/api/resourcelink"
    }
  },
  "name": "string",
  "records": [
    {
      "name": "string"
    }
  ],
  "svm": {
    "_links": {
      "self": {
        "href": "/api/resourcelink"
      }
    },
    "name": "svm1",
    "uuid": "02c9e252-41be-11e9-81d5-00a0986138f7"
  },
  "unix_group": {
    "name": "string"
  }
}

Response

Status: 201, Created

Error

Status: Default

ONTAP Error Response Codes

Error Code Description

262179

Invalid arguments in records.

3276897

The specified UNIX group does not exist in the SVM.

3277025

Maximum supported limit of UNIX group membership count reached.

3277051

Invalid characters in user name. Valid characters are 0-9, A-Z, a-z, ".", "_" and "-". Names cannot start with "-".

23724066

User name too long. Maximum supported length is 64 characters.

23724142

"records" field must not be specified when a single user is added.

23724143

SVM UUID, UNIX group name and skip-name-validation are invalid fields for "records" parameter.

Name Type Description

error

error

Example error
{
  "error": {
    "arguments": [
      {
        "code": "string",
        "message": "string"
      }
    ],
    "code": "4",
    "message": "entry doesn't exist",
    "target": "uuid"
  }
}

Definitions

See Definitions

href

Name Type Description

href

string

Name Type Description

self

href

records

Name Type Description

name

string

UNIX user who belongs to the specified UNIX group and the SVM.

svm

Name Type Description

_links

_links

name

string

The name of the SVM.

uuid

string

The unique identifier of the SVM.

unix_group

Name Type Description

name

string

UNIX group name.

unix_group_users

Name Type Description

_links

_links

name

string

UNIX user who belongs to the specified UNIX group and the SVM.

records

array[records]

An array of UNIX users specified to add multiple users to a UNIX group in a single API call. Not allowed when the name property is used.

skip_name_validation

boolean

Indicates whether or not the validation for the specified UNIX user names is disabled.

svm

svm

unix_group

unix_group

error_arguments

Name Type Description

code

string

Argument code

message

string

Message argument

error

Name Type Description

arguments

array[error_arguments]

Message arguments

code

string

Error code

message

string

Error message

target

string

The target parameter that caused the error.