memonic

Permissions Resource

The Permissions resource lists the permission levels of a user. It's purpose is to handle translations and make sure that future additions to the available permission flags are also reflected in 3rd party applications.

Resource URL: https://api.memonic.com/v2/users/{user_id}/permissions?apikey={yourkey}

MethodPurpose
GET Returns a list of permission levels.

GET

The GET method on the Permissions resource returns the possible permission flags for a user. These permissions can for example be used in the permission when creating an Item and will also be output as the permission field of Item responses

Response

Status codes

The following response status codes can be returned.

CodeReason
200 All good. Response body is enclosed.
401 Not logged in or invalid Authorization header.
404 The user was not found.

In case of a successful 200 response the following output is returned:

XML

<response>
  <link href="https://api.memonic.com/v2/permission/permissions.xml?apikey=yourkey" order="0" rel="self"/>
  <permissions>
    <child order="0">
      <id>private</id>
      <title>Private</title>
    </child>
    <child order="1">
      <id>public</id>
      <title>Public</title>
    </child>
    <child order="2">
      <id>friends</id>
      <title>Friends</title>
    </child>
  </permissions>
</response>

JSON

{
  "permissions": [
    {
      "id": "private", 
      "title": "Private"
    }, 
    {
      "id": "public", 
      "title": "Public"
    }, 
    {
      "id": "friends", 
      "title": "Friends"
    }
  ]
}

The title is internationalized.