YaST REST Service Documentation

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or (at your option) version 1.3; with the Invariant Section being this copyright notice and license. A copy of the license version 1.2 is included in the section entitled "GNU Free Documentation License".

Roles

Only authenticated users are allowed to access the API. Authentication is done by sending a Basic HTTP Authorization header.

Table of Contents

Overview

This module provides management of user roles through assignment of permissions to them.

PolicyKit Access Rights

The following PolicyKit permission is needed to perform configutation actions:

org.opensuse.yast.modules.yapi.roles.read

org.opensuse.yast.modules.yapi.roles.write

Role Management

GET /roles

Get the list of interfaces.

CURL example:

curl -u <user> -H "Accept: application/xml" https://<hostname>:4984/roles

Result: Example

GET /roles/<role_name>

Arguments:

Get the details of a role.

CURL example:

curl -u <user> -H "Accept: application/xml" https://<hostname>:4984/roles/bamboo

Result: Example

PUT /roles/<role_name>

Arguments:

Update an role specification, modify users or permissions

CURL example:

curl -u <user> -H "Accept: application/xml" -H "Content-Type: application/xml" --data @role_update.xml -X PUT https://<hostname>:4984/roles/bamboo

Body: Example

Result: Example

POST /roles

Create a new role with a custom name, users and permissions

CURL example:

curl -u <user> -X POST -H "Accept: application/xml" -H "Content-Type: application/xml" --data @role_create_request.xml https://<hostname>:4984/roles/bamboo

Body: Example

Result: Example

DELETE /roles/<role_name>

Arguments:

Remove existing role.

CURL example:

curl -u <user> -H "Accept: application/xml" -X DELETE https://<hostname>:4984/roles/bamboo