Skip to content

api auth entity add

Alban LEROUX edited this page Mar 10, 2012 · 1 revision

API

auth.entity.add

Add a new entity.

require admin on self grant access

NOTE:
self grant is not a real grant, it means that a authenticated user can act on its data.

Request example

Create a unique connection to the API for Jhon's Lightroom plugin.
By default a entity have no grants. Jhon can control finely what can do the lightroom plugin by adding the grants he wants.

GET http://example.com/api/get/auth.entity.add/json/?name=Lightroom+plugin&password=jhon
{
	"method"  : "auth.entity.add",
	"request" :
	{
		"name" : "Lightroom plugin",
		"user" : "jhon"
	}
}
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<xml>
	<method>auth.entity.add</method>
	<request>
		<name>Lightroom plugin</name>
		<user>jhon</user>
	</refresh>
</xml>

Response example

{
	"status"   : "valid",
	"response" :
	{
		"entity" : "fa10c4d7b02a13e27a2ae5a5bbe8130b"
    }
}
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<xml>
	<status>valid</status>
	<response>
		<entity>fa10c4d7b02a13e27a2ae5a5bbe8130b</entity>
	</response>
</xml>

Arguments

  • name: the entity name
  • user: the user identifier

Return value

  • entity: the entity identifier
Clone this wiki locally