fbpx
POSThttps://api.spotinst.io/setup/accountUserMapping

Assign users to accounts in bulk. Only accounts under the creator’s own organization are allowed. Creator’s organization ID is taken from the personal token attached to the API call.

Attribute Type Description
mappings * Array<Object>

Mappings objects include user, accountID and role.

mappings.userEmail * String

Email of the user, used as a unique identifier.

Example: test@spotinst.com
mappings.accountIDs * String

Account for which to provide the specified user with the specified role.

Example: "act-123abc"
mappings.role * String

Role to associate with the user. Valid Values: editor | viewer

Request

Headers
{
  "Content-Type": "application/json", 
  "Authorization": "Bearer ${token}"
}
Body
Copied!
Downloaded!
{ 
	"mappings":[ 
		{ 
		"userEmail": "test@spotinst.ocom" ,
		"accountId": "act-123abc", 
		"role": "editor" 
		}, 
		{ 
		"userEmail": "test2@spotinst.com", 
		"accountId": "act-123abc", 
		"role": "viewer" 
		} 
	] 
}
Response

Headers
{ 
  "Content-Type": "application/json" 
} 
Body
Copied!
Downloaded!
{ 
    "request": { 
        "id": "64029a10-6846-4084-a407-e60a6ea15cff", 
        "url": "/accountUserMapping", 
        "method": "POST", 
        "timestamp": "2018-07-23T14:12:21.627Z" 
    }, 
    "response": { 
        "status": { 
            "code": 200, 
            "message": "OK" 
        } 
    } 
}