Cisco Unity Express -- Operations and Privileges REST PI Service Operation

From DocWiki

Revision as of 01:35, 3 May 2010 by Mnapalan (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Main page: Cisco Unity Express -- REST PI Service Operations

Previous page: Cisco Unity Express -- Mailbox REST PI Service Operation

Next page: Cisco Unity Express -- Applications REST PI Service Operation


Search the Cisco Unity Express documentation on the DocWiki:

Loading




Contents

Operations and Privileges

Classes

Figure 7: Privilege and Operation

CUE80 Privilege and Operation.jpg


Privilege
Class Name

Privilege

Extends From

ManagedBaseElement

Description

Represent privileges which could be assigned to groups.

XML Namespace

http://privilege.model.rest.aesop.cisco.com

Field Name Type Constraints Comments

name

String

Required for create Length 0 - 31

Label used to identify and configure privilege.

description

String

Length 0-59

Description for the privilege.

operations

Operation (collection)

minOccurs="0" maxOccurs="unbounded"

Collection of operations associated with the privilege.


Operation
Class Name

Operation

Extends From

ManagedBaseElement

Description

Represent operations which could be assigned to a Privilege.

XML Namespace

http://privilege.model.rest.aesop.cisco.com

Field Name Type Constraints Comments

name

String

Length 0 -15

Label used to identify the privilege.

description

String

Length 0-59

Description for the privilege.


Resources

Resource URI Operation Input Return Value

/privileges

GET (read all privileges)

BaseElementList containing "Privilege" objects (includes Operations for each Privilege).

POST (create a privilege)

Privilege (including operations for the privilege)

/privileges/{privilegeName}

GET (read a privilege)

Privilege (includes Operations for the privilege)

PUT (update privilege)

Privilege (including operations for the privilege)

DELETE (delete privilege)

/operations

GET (read all Operations)

BaseElementList containing "Operation" objects

/operations/{operationName}

GET (read an Operation)

Operation


Privilege Examples

Create Privilege

Create a privilege named "privilge.xyz".

  • Data for the new privilege is read from local file ./data/create_xyz.xml.
  • Notice that operations to be assigned to the privilege can be referenced either by resource URI or operation name.
$ cat data/create_xyz.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<privilege>
    <description>Description for test privilege</description>
    <name>privilege.xyz</name>
    <operations>
         <resourceURI>/operations/call.control</resourceURI>
    </operations>
    <operations>
         <name>group.configuration</name>
    </operations>
</privilege>
$ curl -i -X POST -H 'Authorization: Basic Y2lzY286Y2lzY28=' -H 'Content-type: 
application/xml' -d @./data/create_xyz.xml 
http://172.27.104.144/rest/privileges 
HTTP/1.1 201 Created
Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=BD5415DC8B97F994A09CC80902262670; Path=/rest
PI-Version: 8.0.0.150
Location: http://172.27.104.144/rest/privileges/privileges/privilege.xyz 
Content-Type: text/plain
Transfer-Encoding: chunked
Date: Mon, 07 Dec 2009 08:03:16 GMT

Created - /privileges/privilege.xyz

Rating: 0.0/5 (0 votes cast)

Personal tools