REST API Endpoint to generate SAS token for Edge Devices in Azure IoTHub - azure-iot-hub

What is REST API endpoint for the following command ?
az iot hub generate-sas-token -n myIoTHub -d myDevice --du 630720

There is no REST API endpoint for that command. It's a computation that you can implement yourself, it's described here and comes with sample code.
The command you referenced does it this way

Related

How to curl the microservice hosted on apigee wiht mTLS enabled?

Recently we split a big monolithic enterprise application in a bunch of microservices in CloudFoundry. Just one of them is on the apigee proxy and communicates with a service exposed externally. Now i have a requirement to invoke the service using curl command with Autosys. How do i call the mtls enabled apigee microservice with Curl command?
In postman, i will pass key & secret and get the bearer token and then call the microservice, then it works fine. Everytime, the bearer token will change atleast for few hours. How do i deal this level of authentication with curl command? Any advise on this use case of calling mTLS enabled apigee hosted microservice from curl command?

Authenticate Import Update REST API to upload new updates into Azure IoT Hub

I have a IoT Hub and Device Update Service configured.
Now my requirement is to upload the files from Blob container to IoT Hub Updates. This I need to do with REST API. I had the below API.
POST https://XXXXXXXXXX.api.adu.microsoft.com/deviceupdate/XXXXXXXXX/v2/updates?action=import
But, I don't understand on how to authenticate this POST request.
I see some documentation that we need to use TENANT ID and CLIENT ID for authentication. But I dont have anything in my hand right now. How to get this ?
So, Kindly provide me the best solution to use this API and Authenticate it.
In order to use this API you will need to authenticate as mentioned in the Security Section here: https://learn.microsoft.com/en-us/rest/api/deviceupdate/2020-09-01/updates/import-update
azure_auth_implicit, azure_auth_code , azure_auth_application or azure_auth_password
Read how to Register your client application with Azure AD here.
Most Azure services (such as Azure Resource Manager providers and the classic deployment model) require your client code to authenticate with valid credentials before you can call the service's API. Authentication is coordinated between the various actors by Azure AD, and provides your client with an access token as proof of the authentication.

How do I extract the token of a Google Service Account?

I'm using Fuel library on Android Studio to connect a mobile app to Dialogflow and develop a chatbot. I only need the access token.
To follow the steps of using Dialogflow API v2, I read this web page:
https://dialogflow.com/docs/reference/v2-auth-setup
Do you know what command is equivalent to "$(gcloud auth print-access-token)"?
You'll need to generate a service account key file, as specified in the doc page. You can use this key file to authenticate using the Dialogflow Java client, according to these instructions.

Unable to consume REST API in WSO2 API Store

Have installed the API Manager 1.10.0 on a single machine and got everything running. Created and published API containing Openstack's Keystone URL. However when i try to consume API via API console in API store i get the MANAGEMENT CONSOLE as i response.
Have looked at the curl sent and the IP is not right.
Curl request from API Console
Keystone API URLs
Why am i not able to use the API? Why is the Production endpoint in the API overview not used? (it works perfectly fine with a REST Client or even with the same Curl request once i change to IP)
When we construct API endpoint URLs we will use following properties defined in API Manager configuration file(api-manager.xml). If you haven't changed anything there then default ports(8280/8243) will appear there. If you can please try this with private browsing window with https session.
And if you replace curl with IP and correct port 8280, 8243 then did it worked as expected?
<GatewayEndpoint>http://${carbon.local.ip}:${http.nio.port},https://${carbon.local.ip}:${https.nio.port}</GatewayEndpoint>
Thanks
sanjeewa.

WSO2 API Manager Admin Service : how to create application

i'm trying to create an application with the Admin Services from a webservice. So i called the admin Service "IdentityApplicationManagementService" and i use the function "createApplication".
To test it, i used SoapUI and it worked fine. I can see the App from the management console in the "Service provider" section. But when i log in the API Store as admin (for example), i can't see the application created.. So i can't subscribe any API with it.
So does somebody know how to make the application created visible on the Store ?
Apps created via admin services will not be available in store side. If you need to create applications using a REST service, you can use store api explained in this documentation. It will be available in the API store.
Login to Store :
curl -X POST -c cookies http://localhost:9763/store/site/blocks/user/login/ajax/login.jag -d 'action=login&username=admin&password=admin'
Create and application via store api. :
curl -X POST -b cookies http://localhost:9763/store/site/blocks/application/application-add/ajax/application-add.jag -d 'action=addApplication&application=NewApp1&tier=Unlimited&description=&callbackUrl='