Skip to content

Latest commit

 

History

History
61 lines (39 loc) · 1.36 KB

File metadata and controls

61 lines (39 loc) · 1.36 KB

role_create

.. function:: POST /orgs/{oid}/roles

Summary

  • Method: POST
  • Response Code: 201
  • Response Formats: application/xml application/json
  • Since: UForge 3.2

Create a new role in an organization. A role contains one or more entitlements which determine the access rights to various features.

Please refer to :ref:`role-object` for a complete list of all the role attributes.

Security Summary

  • Requires Authentication: true
  • Entitlements Required: org_administrate

URI Parameters

HTTP Request Body Parameters

A :ref:`role-object` object

Example Request

curl "https://uforge.example.com/api/orgs/{oid}/roles" -X POST \
-u USER_LOGIN:PASSWORD -H "Accept: application/xml"-H "Content-type: application/xml" --data-binary "@representation.xml"

Example of representation.xml content (the request body):

<ns0:role xmlns:ns0="http://www.usharesoft.com/uforge">
        <name>Example Role</name>
</ns0:role>
.. seealso::

         * :ref:`entitlement-object`
         * :ref:`entitlement-getAll`
         * :ref:`role-object`
         * :ref:`role-delete`
         * :ref:`role-getAll`
         * :ref:`role-update`