API - Planyo Web Services - set_resource_admin

Estás aquí: Planyo » Ayuda » API » set_resource_admin

set_resource_admin

Description:

Use this function to set a new resource administrator. You cannot make into a resource admin a user who is a moderator or resource admin of another unrelated Planyo site.
If the user has been added by an admin / API call or is already a moderator or resource admin of the site, they will be automatically assigned as resource admin. Otherwise, a confirmation email will be sent to the user's email address and the user will be assigned as resource admin once they confirm the action. Check the status output field to find out if the assignment was immediate. Note that the user should have a login and password associated with their Planyo account.

Input:

user_id int required
ID of the user to be assigned as resource admin. The user needs to have a valid email address associated with their account.
resource_id int required
Resource ID for the new admin.
method string required
must be set to set_resource_admin
language string optional
by specifying a 2-letter (ISO 639-1) language code (all capital letters e.g. EN, DE, FR, ES, IT) you can change the language of the text values returned
api_key string required
your API key - Click here to get your key. If your API key uses a hash key, you must also include the parameters hash_key and hash_timestamp.

Output:

status string
If the moderator assignment was successful, this will be one of: ok meaning that the moderator role was assigned immediately, or pending if an email confirmation must be done

API playground:

Click here to test this function in the API playground.