Invites a user to assume a specified role on a specified project.

Endpoint

GET http(s)://hostname/api/user/invite

Request Parameters

Header field
Type Value
X-Api-Key
string Required. A valid access token from a registered MT-EQuAl account. The access token must have been issued on behalf of the current user.

Request data Type Value
id string Required. The project id.

username string Required. The user's username.

role string Required. The role the user must assume on the specified project.

Response

On success, the HTTP status code in the response header is 200 (OK) and the response is structured in JSON as follow:

{
	"header": {
		"date": "Date and time of the response generation process",
		"description": "Description of the invoked method or error message",
		"status": "status/error code",
        "message": "sending email notification"
	},
	"result": {
		"role": "The user's role within the specified project",
		"role_status": "The status of the role",
		"user": "The user id",
	}
}

Example

curl -X GET "https://hostname/api/user/invite?id=1&username=ellen&role=evaluator" -H "X-Api-Key: {user access token}"
{
	"header": {
		"date": "Wednesday, 2016-06-08 12:00:44 Europe\/Paris",
		"description": "Invites a user to assume a specified role on a specified project.",
		"status": "200",
        "message": "The email has been sent to ellen"
    },
	"result": {
		"role": "evaluator",
		"role_status": "pending",
		"user": 3,
	}
}