Skip to content

Latest commit

 

History

History
76 lines (60 loc) · 1.45 KB

File metadata and controls

76 lines (60 loc) · 1.45 KB

Roles

Methods

XML Data Reference

JSON Data Reference

Index

  • GET /api/v1/roles.xml or .json returns a collection of roles.

Response:

<roles type="array">
  <role>
    <id type="integer">1</id>
    <name>Owner</name>
  </role>
  <role>
    <id type="integer">2</id>
    <name>Admin</name>
  </role>
  <role>
    <id type="integer">3</id>
    <name>Advanced</name>
  </role>
  <role>
    <id type="integer">4</id>
    <name>Basic</name>
  </role>
</roles>

Please note that the role element is skipped when part of the array.

{
  "role":[
    {
      "id":1,
      "name":"Owner"
    },
    {
      "id":2,
      "name":"Admin"
    },
    {
      "id":3,
      "name":"Advanced"
    },
    {
      "id":4,
      "name":"Basic"
    }
  ]
}

Show

  • GET /api/v1/roles/#{id}.xml or .json returns a single role.

Response:

XML Data Reference

JSON Data Reference