Which endpoint to use to retrieve end device metadata such as name in TheThingsStack? - lora

I'm attempting to use The Things Stack's API to retrieve end devices' names, but I'm getting HTTP status code 404.
According to the EndDeviceRegistry documentation the endpoint to use is:
When invoking that endpoint it is not found:
But if I use the AsEndDeviceRegistry, that endpoint works fine:
What am I missing here?

Related

How can I resolve this Talend API error: IllegalArgumentException: URI is not absolute?

I'm using the tRESTClient object in Talend Open Studio for ESB - Version: 8.0.1.
This REST is doing a POST (I'm trying to write data into an API). The link I'm using is an https link that I've tested using Postman. There is also a header api-key, in Talend, I have that x-api-key setup as a query parameter.
When I run the job, I get the error: IllegalArgumentException: URI is not absolute
I tried adding a tSetProxy object, but it didn't fix the error (I used the https defaults on the set proxy object). How can I resolve this error?

azure api management error 500

I configured an Api using API management service in Azure, all the endpoints are working fine, I defined some rules into the inbound policies, the last one is a set backend service rule. the objective of this rule is redirect the request to a diferent endpoint based on certain conditions. The problem is as follow: If i test the api endpoint inside the Azure,using the the Test option provided by API managemen service all the proceess works fine, i can see into the trace and check how the Api Management service recieve the request, check the conditions definen into the inbound policy and finally change the backend url to the right endpoint. If test outside the Azure, for example using postman, the API management service response an 500 error, the description of the error is: Expression value is invalid. Value is not a valid absolute URL. () Section : (inbound) Source : (set-backend-service)
I found the issue and the solution. The problem was generated in the policies configuration. For some reason the base tag in the backend policy was deleted. Putting back the base tag all the endpoints works fine.

Accessing FMCSA QCMobile API

I'm building a web application that needs to search the QCMobile API using the URL endpoint their documentation provided.
API URL
The path for all API resources must start with: https://mobile.fmcsa.dot.gov/qc/services/ The following are the Endpoints
EndPoint Name Query Parameters Example
/carriers/docketNumber/:docketNumber/ /carriers/docketNumber/1515?webKey=jk+k...
My URL is:
https://mobile.fmcsa.dot.gov/qc/services/carriers/docketNumber/402573?webKey=1a7649929fa2....
But I get this json response:
{"links":[],"content":"There is no resource for path /qc/services/carriers/docketNumber/402573"}
Any help would be greatly appreciated.
Kevin
It could be that the endpoint name listed on the specs page isn't correct for docketNumber. I tried your link with my webkey and it didn't work for me either. I replaced "docketNumber" with "docket-number" and I got a complete response.
https://mobile.fmcsa.dot.gov/qc/services/carriers/docket-number/402573.xml?webKey=xxxxx

Invoking wso2greg Artifcat Rest API via wso2api manager is not working - any ideas to fix

UPDATED QUESTION to clarify more.
I have two servers : wso2greg containing custom artefacts and wso2am (api manager).
The gouvernance register is intended to be used internally (intranet) and some of it's feature are intended to be exposed externally and acceded via it's rest API.
In order to manage wso2greg API accesss, we used an wso2am (api manager) server, where we did define an API that act as a proxy for the wso2greg API.
In our experiments, we found the strange behaviour described below :
Successfully direct calling wso2greg artefact rest api (the exact url is
https://localhost:9443/resource/1.0.0/artifact/_system/governance/myartifact/art1 and i'm following the documentation of this REST API from here https://docs.wso2.com/display/Governance520/Resources+with+REST+API ) using postman. The API reacts as described in the documentation.
Error 500, reported on wso2greg server, when calling the same REST API, but via API manager (using publisher application).
So as a summary :
Directly calling wso2greg rest API woks fine and a got results back
Adding this working API, in wso2am and than calling it gives always error 500.
As extra information:
Tested with other wso2greg REST API , such as "rating" or "comments" and I was able to call it successfully either directly or throw Api manager.
Tried to get information related to default wso2greg artifacts such as restservice, but i got exactly the same pb when (error 500) interagting with API manager.
Working with the last version of both products : wso2greg version 5.2.0 and wso2am version 1.10.0
Please advice, or clarify how could i debug this internal error in wso2greg.
Regards,
I hope your not using G-Reg + APIM feature installed version. I presume your using separate G-reg 5.2.0 and APIM x.x.x. Since your using the second option you can't use G-Reg REST API with APIM, therefore you have to use APIM REST API instead.
Get an API
Description: Get details of a specific API.
URI: http://localhost:9763/publisher/site/blocks/listing/ajax/item-list.jag
URI Parameters: action=getAPI&name=xxx&version=xxx&provider=xxx
HTTP Methods: POST
Example:
curl -X POST -b cookies http://localhost:9763/publisher/site/blocks/listing/ajax/item-list.jag -d "action=getAPI&name=PhoneVerification&version=1.0.0&provider=admin"
Please follow this link to see all the api usage.
Thanks #thusharaK for providing help.
The solution was to add Message Mediation Policies which forces json header on output.
Now i got my correct response from API manager (in fact, i got a binary response in test console and a json response in postman) .

Instagram API Returning Invalid Format for Callback_Url Error

I'm using the Instagram API.
I'm trying a simple post for a subscription request, and I keep getting
"Invalid format for 'callback_url'. URL must start with http:// or
https://".
It clearly starts with that.
I can't find anyone online that's running into this same problem.
Tried the post with a clear callback url:
http://api.instagram.com/v1/subscriptions/?client_id={client_id}&client_secret={secret}&object=tag&aspect=media&object_id=skateboarding&callback_url=http://skateparkoftampa.com/spot/instagram_callback.aspx
And with an HTML encoded callback URL:
http://api.instagram.com/v1/subscriptions/?client_id={client_id}&client_secret={secret}&object=tag&aspect=media&object_id=skateboarding&callback_url=http%3A%2F%2Fskateparkoftampa.com%2Fspot%2Finstagram_callback.aspx
Also tried it with both GET and POST, also by letting the API console create the request by simply filling in the parameters fields, etc. I feel like I'm missing something really obvious or something, but I'm stuck. Any ideas?
As sais on Endpoints page:
All endpoints are only accessible via https
You should use your own CLIENT-ID and SECRET-ID and callback url (so don't use API console).
Your callback url may be without https.
Just use link with https:
https://api.instagram.com/v1/subscriptions/
Try examples from this page
You should use POST request to subscribe and unsubscribe, and GET to get list of subscriptions. Please, read documentation accurately.