# Rights and Roles

## grants-list

<span style="font-family: arial,helvetica,sans-serif; font-size: small;">**Requires:**</span>

<table border="1" id="bkmrk-domain-full-qualifie" style="width: 594px;"><tbody><tr><td>*<span style="font-family: arial,helvetica,sans-serif; font-size: small;">domain</span>*

</td><td><span style="font-family: arial,helvetica,sans-serif; font-size: small;">Full qualified domain name</span>

</td></tr></tbody></table>

**<span style="font-size: small;">Accepts:</span>**

<table border="1" id="bkmrk-showkey-show-invitat" style="width: 594px;"><tbody><tr><td>*<span style="font-size: small;">showkey</span>*</td><td><span style="font-size: small;">Show invitation access key</span></td></tr></tbody></table>

<span style="font-family: arial,helvetica,sans-serif; font-size: small;">Get a list of active and pending grants. </span>

<span style="font-family: arial,helvetica,sans-serif; font-size: small;">Returns lines in the following format (space-separated): </span>

```
invitation <nr> <scope> <key> domain <domain-name> <role> - - - <invitee-email> <nick-name> grant <nr> <scope> domain <domain-name> <role> <inviter-username> <invitee-username> <invitee-userid> <invitee-email> <nick-name> 
```

<span style="font-family: arial,helvetica,sans-serif; font-size: small;"> </span><span style="font-family: arial,helvetica,sans-serif; font-size: small;">**Where**: </span>

<table border="1" id="bkmrk-%3Cnr%3E-record-number-%3C" style="width: 623px; height: 176px;"><tbody><tr><td>&lt;nr&gt;</td><td>record number</td></tr><tr><td>&lt;scope&gt; </td><td>Grant/Invite id (used to uniquely identify records for revocation)</td></tr><tr><td>&lt;key&gt;</td><td>Invitation access key, present only when "showkey" is non-zero; it has meaning only for pending invitations, and always is "-" for grants</td></tr><tr><td>&lt;domain-name&gt;</td><td>domain name (identical to domain in request)</td></tr><tr><td>&lt;role&gt;</td><td>one of @admin/@billing/@tech/@creator</td></tr><tr><td><span style="font-family: arial,helvetica,sans-serif; font-size: small;">&lt;inviter-username&gt;</span></td><td>y<span style="font-family: arial,helvetica,sans-serif; font-size: small;">our username</span> (owner of the domain)</td></tr><tr><td><span style="font-family: arial,helvetica,sans-serif; font-size: small;">&lt;invitee-username&gt;</span></td><td>u<span style="font-family: arial,helvetica,sans-serif; font-size: small;">sername of invited user</span></td></tr><tr><td><span style="font-family: arial,helvetica,sans-serif; font-size: small;">&lt;invitee-userid&gt;   
</span></td><td>\[leave empty\] u<span style="font-family: arial,helvetica,sans-serif; font-size: small;">ser-ID of invited user </span> </td></tr><tr><td><span style="font-family: arial,helvetica,sans-serif; font-size: small;">&lt;nick-name&gt;</span></td><td><span style="font-family: arial,helvetica,sans-serif; font-size: small;">name or comment you want to assign to this role</span></td></tr></tbody></table>

## grants-invite

<span style="font-family: arial,helvetica,sans-serif; font-size: small;">**Request parameters:**</span>

<table border="1" id="bkmrk-name-value-mandatory" style="width: 549px; height: 128px;"><tbody><tr><th scope="col" style="text-align: left;"><span style="font-family: arial,helvetica,sans-serif; font-size: small;">name</span></th><th scope="col" style="text-align: left;"><span style="font-family: arial,helvetica,sans-serif; font-size: small;">value</span></th><th scope="col"><span style="font-family: arial,helvetica,sans-serif; font-size: small;">mandatory</span>

</th></tr><tr><td>*<span style="font-family: arial,helvetica,sans-serif; font-size: small;">domain</span>*</td><td><span style="font-family: arial,helvetica,sans-serif; font-size: small;">Full qualified domain name</span></td><td><span style="font-family: arial,helvetica,sans-serif; font-size: small;"> yes</span>

</td></tr><tr><td><span style="font-family: arial,helvetica,sans-serif; font-size: small;">*email*  
</span></td><td><span style="font-family: arial,helvetica,sans-serif; font-size: small;">Email of user to be invited to accept a role for 'domain'  
</span>

</td><td><span style="font-family: arial,helvetica,sans-serif; font-size: small;"> yes</span>

</td></tr><tr><td>*<span style="font-size: small;"><span style="font-family: arial,helvetica,sans-serif;">role</span></span>*</td><td><span style="font-family: arial,helvetica,sans-serif; font-size: small;">Role offered (@admin/@billing/@tech/@creator)</span>

</td><td><span style="font-family: arial,helvetica,sans-serif; font-size: small;"> yes</span>

</td></tr><tr><td>*<span style="font-family: arial,helvetica,sans-serif; font-size: small;">client-uid </span>*

</td><td><span style="font-family: arial,helvetica,sans-serif; font-size: small;">receiving Joker.com user id as shown on Joker.com - also conforms to reseller-id </span>

</td><td> <span style="font-family: arial,helvetica,sans-serif; font-size: small;">no</span>

</td></tr><tr><td><span style="font-size: small;"><span style="font-family: arial,helvetica,sans-serif;">*nick-name*</span></span></td><td><span style="font-family: arial,helvetica,sans-serif; font-size: small;">Name or comment for this role/grant for later identification (defaults to email)</span>

</td><td><span style="font-family: arial,helvetica,sans-serif; font-size: small;"> no</span>

</td></tr></tbody></table>

<span style="font-family: arial,helvetica,sans-serif; font-size: small;">With this request you can assign 'Roles' (permissions) of domains to other Joker.com users. The special role "creator" is an equivalent to an **internal transfer** of that domain to another Joker.com user. In this case, the domain is **assigned** to the receiving account's portfolio, including all rights and permissions on this domain.</span>

<span style="font-family: arial,helvetica,sans-serif; font-size: small;">There are two variants to use this functionality: If the **client-uid** (**Joker.com user account id**) is given, and the client-uid **matches** the **associated user's email address** in our system, the role is **applied immediately** - there will be no request for confirmation on the receiver's side. In case the client-uid is not given, but only the email address, the transaction has to be acknowledged by the receiving user. For this, he will get an email ('invitation'), containing a link and a key. Either the link has to be clicked, or the key has to be applied using Joker.com (=&gt; Transfer). This can also be used for **users which do not yet have a Joker.com account**.</span>

<span style="font-family: arial,helvetica,sans-serif; font-size: small;">Returns status only (ok or not). Email is sent if request was succesfull.</span>

## grants-revoke

<span style="font-family: arial,helvetica,sans-serif; font-size: small;">**Requires:**</span>

<table border="1" id="bkmrk-domain-full-qualifie-1" style="width: 607px;"><tbody><tr><td>*<span style="font-family: arial,helvetica,sans-serif; font-size: small;">domain</span>*</td><td><span style="font-family: arial,helvetica,sans-serif; font-size: small;">full qualified domain name</span></td></tr><tr><td>*<span style="font-family: arial,helvetica,sans-serif; font-size: small;">role</span>*

</td><td><span style="font-family: arial,helvetica,sans-serif; font-size: small;">Role to be revoked from domain </span><span style="font-family: arial,helvetica,sans-serif; font-size: small;">(@admin/@billing/@tech/@creator)</span>

</td></tr><tr><td>*<span style="font-size: small;"><span style="font-family: arial,helvetica,sans-serif;">scope</span></span>*</td><td><span style="font-family: arial,helvetica,sans-serif; font-size: small;">identifier from 'grants-list' request  
</span>

</td></tr><tr><td>*<span style="font-size: small;"><span style="font-family: arial,helvetica,sans-serif;">type</span></span>*

</td><td><span style="font-family: arial,helvetica,sans-serif; font-size: small;">type of the record to revoke - "grant" or "invitation"</span>

</td></tr></tbody></table>

<span style="font-family: arial,helvetica,sans-serif; font-size: small;">Deletes an issued grant (permission) of a domain, or a pending invitation for a grant.   
</span>

<span style="font-family: arial,helvetica,sans-serif; font-size: small;">Returns status only (ok or not). Email is sent if request was succesfull.</span>