fbpx
GEThttps://api.spotinst.io/setup/accountUserMapping?userEmail={USER_EMAIL}

Get user’s account mapping

URL Parameters

Parameter Type Description
userEmail * String

Target user email address

Example: test@spotinst.com
Request

Headers
{
    "Content-Type": "application/json",
    "Authorization": "Bearer ${token}"
}
Response - 200

Headers
{
    "Content-Type": "application/json"
}
Body
Copied!
Downloaded!
{
    "request": {
        "id": "c420b3a0-b64d-4c7d-b609-1937bfb207e4",
        "url": "/accountUserMapping?userEmail=test@spotinst.com"",
        "method": "GET",
        "timestamp": "2018-09-12T13:18:19.186Z"
    },
    "response": {
        "status": {
            "code": 200,
            "message": "OK"
        },
        "kind": "spotinst:setup:accountUserMapping",
        "items": [
		{
       		"accountId": "act-1234592",
       		"role": "editor",
  		},
		{ 
       		"accountId": "act-1234593",
       		"role": "viewer",
  		}
		],      
        "count": 2
    }
}
Response - 400

Headers
{
    "Content-Type": "application/json"
}
Body
Copied!
Downloaded!
{
    "request": {
        "id": "c420b3a0-b64d-4c7d-b609-1937bfb207e5",
        "url": "/accountUserMapping?userEmail=test@spotinst.com"",
        "method": "GET",
        "timestamp": "2018-09-12T13:18:19.186Z"
    },
    "response": {
        "status": {
            "code": 400,
            "message": "Bad Request"
        },
        "errors": [
			{
       			"code": "USER_DOES_NOT_EXIST",
       			"message": "user does not exist",
  			}
		]                 
   	}
}