graphql介面測試記錄
阿新 • • 發佈:2021-10-09
Register an account:
https://devportal.prometheanproduct.com/ 點選 Create a myPromethean accountHow to get the idToken from devui
- Accesshttps://devui.prometheanproduct.com/
- Input login email and password then click 'LOGIN TO MANGO'
- Open the Chrome Dev Tool (F12), and switch 'Console' Tab
- In the console, Enter 'JSON.parse(localStorage.getItem('promethean:jwt')).AuthenticationResult.IdToken' , then you can gen the idToken.
5. Take the Authorization to this location and you can get
dev | local debug (default port is 4000, you can change it in the serverless command) | Comment | |
---|---|---|---|
mdm-portal | https://devapi.prometheanproduct.com/mdm-portal/graphql | http://127.0.0.1:4000/graphql |
|
configuration | https://devapi.prometheanproduct.com/configuration/graphql | http://127.0.0.1:4000/graphql | |
integration | https://devapi.prometheanproduct.com/integration/graphql | This is Platform's project |
local debug/dev | |
---|---|
mdm-portal | bv6d45mobai6lk31l9sw6s9argxn42x0x35j7jlt |
configuration | bv6d45mobai6lk31l9sw6s9argxn42x0x35j7jlt |
integration | y14v59tlgyczjp3encuc07ca6pnj4msj94mj53pp |
Note: For other environment, you can login to the Panel Management, then get the x-api-key from Chrome dev tool.
HTTP header |
---|
{ "Authorization":"Bearer XXX", "x-api-key": "bv6d45mobai6lk31l9sw6s9argxn42x0x35j7jlt", "x-auth-organization-id": "60b63190-0832-88c0-d843-a6cda5c4eda9" } |
Note: XXX is the idToken which can get from section 1
Request Body |
---|
query Panels($searchPanelsInput: ISearchPanelsInput) { Panels(searchPanelsInput: $searchPanelsInput) { panels { name serialNumber model mainboardFirmware updateAvailable tagCount tags status connectivityTimestamp __typename } totalCount __typename } } |
Note:Please set the '
Refer this document
https://shimo.im/docs/TryYYtyj6xGhy3K8
介面測試地址:https://devapi.prometheanproduct.com/mdm-portal/graphql
宣告 歡迎轉載,但請保留文章原始出處:) 部落格園:https://www.cnblogs.com/chenxiaomeng/ 如出現轉載未宣告 將追究法律責任~謝謝合作