AttributeTransaction Resource

API for RP Attribute Management transactions, where an RP can administrate attributes for a user, iff the RP owns the actual attribute scheme

POST /attribute/v1.0/{application}/{userId}

Modify attribute RP API

Request Parameters
name type description
application path application requesting the attribute change
userId path of the user (as presented to application when logging in to application, not the global diglias user id)
Request Body
media type data type description
application/json RpAttributeManagementTransaction (JSON) The actual request in json format. The object must hold an action and a list of attributes to be modified according to action.

action

Either ADD or REMOVE

attributes

Array of attributes where each attribute must include:
  • name - Name of attribute
  • value - Value of attribute
Currently, specifying two attribute entries with the same name is not permitted.

Example

 {
     "action": "ADD",
     "attributes": [
         {
             "name": "acmeId","value": "234654-2455423"
         },
         {
             "name": "acmeMeta","value": "VALUE"
         }
     ]
 }
 
 
application/json RpAttributeManagementTransaction (JSON)

Example

Request
POST /attribute/v1.0/{application}/{userId}
Content-Type: application/json

                
{
  "action" : "REMOVE",
  "attributes" : [ {
    "value" : "...",
    "id" : "...",
    "name" : "..."
  }, {
    "value" : "...",
    "id" : "...",
    "name" : "..."
  } ]
}
                
              
Response
HTTP/1.1 201 Created