HPE Morpheus Enterprise Software
1856345 Members
8072 Online
104111 Solutions
New Discussion

Re: API Access

 
Not applicable

API Access

Hello Team,

How can I configure read-only API access for Bearer to retrieve a list of all instances, including information such as instance OS details and the instance owner’s email ID? The API key should have read-only access only. Please assist.

3 REPLIES 3
Ollie-Phillips
HPE Pro

Re: API Access

You could set everything to Read only to remove write access over API. Or, if you want to do it granularly set all access to None and start with Features > Provisioning > Instance - List with Read permission. I haven’t tested but that would be a good first step given the data you want.



I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
Not applicable

Re: API Access

Thanks I got it but now confusion is which access permissions i need to select in the role for my requirement and there are many. If you can guide me on that would be really helpful. I am on Morpheus version 6.0.5. Thanks in advance.

Ollie-Phillips
HPE Pro

Re: API Access

Create a service account with the role permssions needed, impersonate the user and grab their access token. The API honours the role permissions as shown below.

curl -k --request GET \ 
     --url https://morpheuslab/api/networks \
     --header 'accept: application/json' \
     --header 'authorization: Bearer 461d14a5-78xxxxxxxxxx5d218c44fb5'  
{"success":false,"msg":"You do not have permissions to access this api endpoint"}


I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo