Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Permission Group Profile

CrookedNumber edited this page · 1 revision
Clone this wiki locally

Groups profile is a document type usually and often used for PMP's Role-based content rights management implementation. Note that a group is simply a collection of Users or any profile type (e.g. - Orgs) that extends the User profile. In and of itself, a group has no explicit relation to permissions. It can be used for any purpose.

Profile Definition

Canonical version of Groups profile definition must be retrieved at: http://api.pmp.io/profiles/group

It should look something like (please do not treat example here as reference, it may be outdated!):

{
  "version" : "1.0"
, "attributes" : {  
    "guid"        : "c4bd2aa2-c6f7-4eb3-a6ca-40dc7f46e1e4"
  , "title"       : "Group Profile"
  , "valid"       : { "from" : "2013-02-11T13:21:31.598Z"
                    , "to"   : "3013-02-11T13:21:31.598Z"}
  }
, "links" : {
    "profile"      : [ { "href" : "http://api.pmp.io/profiles/profile"
                       , "type" : "application/vnd.pmp.collection.doc+json" }]
  , "self"         : [ { "href" : "http://api.pmp.io/docs/c4bd2aa2-c6f7-4eb3-a6ca-40dc7f46e1e4"
                       , "type" : "application/vnd.pmp.collection.doc+json" }]
  , "documentation": [ { "href" : "https://github.com/publicmediaplatform/pmpdocs/wiki/Permission-Group-Profile"
                       , "type" : "text/html"}]
  , "alternate"    : [ { "href" : "http://api.pmp.io/profiles/group" 
                       , "type" : "application/vnd.pmp.collection.doc+json"}]
  , "edit-form"    : [ { "href" : "http://api.pmp.io/docs-validator", "type" :   "application/json"}]
  }  

}

Sample Document

{
  "version" : "1.0"
, "attributes" : {
    "title"         : "Irakli's Random Group of Orgs"
  , "guid"          : "dbe5a8c9-6e4d-4bc1-9973-01a8803bdc51"
  , "valid"         : { "from" : "2013-05-11T13:21:31.598Z"
                      , "to"   : "3013-05-11T13:21:31.598Z"}
  , "description"   : "This group is only for demonstration purposes"
  }

, "items" : [ 
    { "version" : "1.0"
    , "attributes" : {OBJECT}
    , "links" : {
                "profile"      : [ { "href" : "http://api.pmp.io/profiles/organization"
                                   , "type" : "application/vnd.pmp.collection.doc+json" }]
              , "self"         : [ {"href" : "http://api.pmp.io/docs/07f8198c-2a3f-42fa-86a7-482ea4034076"}]
              }
    }  
  , { "version" : "1.0"
    , "attributes" : {OBJECT}
    , "links" : {
                "profile"      : [ { "href" : "http://api.pmp.io/profiles/user"
                                   , "type" : "application/vnd.pmp.collection.doc+json" }]
              , "self"         : [ {"href" : "http://api.pmp.io/docs/4c2a33aa-9c66-40d2-b6a8-f243eb515100"}]
              }
    } 
  ]   

, "links" : {
            "profile"      : [ { "href" : "http://api.pmp.io/profiles/group"
                               , "type" : "application/vnd.pmp.collection.doc+json" }]
          , "self"         : [ {"href" : "http://api.pmp.io/docs/dbe5a8c9-6e4d-4bc1-9973-01a8803bdc51"}]
          , "author"       : [ {"href" : "http://api.pmp.io/users/irakli", "title": "Irakli gets vanity alias" }]
          , "edit-form"    : [ {"href" : "http://api.pmp.io/docs-validator", "type" :   "application/json"}]
          , "item"         : [
                      { "href" : "http://api.pmp.io/docs/07f8198c-2a3f-42fa-86a7-482ea4034076" }
                    , { "href" : "http://api.pmp.io/docs/4c2a33aa-9c66-40d2-b6a8-f243eb515100" }
                             ]
          }

, "error" : {OBJECT}
}

Document Semantics

Group profile is an extension of Collection.doc+JSON media type. It adds no extra semantics to the fields definition. As far as the "item" links go:

Permission Groups profile requires each item in the item links to point to a document of "user" profile or an extension of "user" profile (e.g. "organization" profile).

Something went wrong with that request. Please try again.