- Community Home
- >
- Storage
- >
- HPE SimpliVity
- >
- Problem about testing Simplivity Token API
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-26-2020 08:34 PM
тАО10-26-2020 08:34 PM
Problem about testing Simplivity Token API
Hi
I use postman to test the simplivity token api but the server response the message as following:
{"jsonrpc":"2.0","id":null,"error":{"code":-32600,"message":"Invalid Request","data":"Received unexpected jsonNode grant_type"}}
How could it be resolved?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-27-2020 04:07 AM
тАО10-27-2020 04:07 AM
Re: Problem about testing Simplivity Token API
Can you post the API auth request ?
I work for HPE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-27-2020 06:31 AM
тАО10-27-2020 06:31 AM
Re: Problem about testing Simplivity Token API
Request URL: https://simplivity@{{OVC_IP}}/api/oauth/token
Method: POST
Headers: Accept and Content-Type are set as application/json
Body: raw request and use json data as below
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-05-2020 06:28 AM - edited тАО11-05-2020 06:31 AM
тАО11-05-2020 06:28 AM - edited тАО11-05-2020 06:31 AM
Re: Problem about testing Simplivity Token API
Here is an example of obtaining and using an access token:
Request an expiring token from the OVC at ip address xx.xx.xx.xx using username 'administrator@vsphere.local' and password 'MySecretPassword!':
curl -k https://simplivity@xx.xx.xx.xx/api/oauth/token -d grant_type=password -d username='administrator@vsphere.local' -d password='MySecretPassword!'
Results are displayed:
{"access_token":"42630e4f-211d-444c-b332-b4fcd0c979f1","token_type":"bearer","expires_in":86399,"scope":"read write","updated_at":1604506169367}
Use the returned access token "42630e4f-211d-444c-b332-b4fcd0c979f1" to request information from the OVC REST API:
curl -k -X GET -H "Authorization: Bearer 42630e4f-211d-444c-b332-b4fcd0c979f1" -H "Accept: application/json" "https://xx.xx.xx.xx/api/hosts?show_optional_fields=false&limit=500&offset=0&case=sensitive"
Results will be displayed.
I am an HPE employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-05-2020 06:28 AM
тАО11-05-2020 06:28 AM
Re: Problem about testing Simplivity Token API
Hi,
I see issues with the paswword characters, can you redeuce the complexity of password and check the API call.
I work for HPE