Thingsboard - - get a list of devices linked to an Assets - thingsboard

How to get a list of devices linked to an Asset through REST API?.
Swagger APIs
Thanks.

It should be right there in the Swagger API?
https://cloud.thingsboard.io/swagger-ui.html#!/entity-relation-controller/findInfoByToUsingGET
You provide inputs for the toTarget, and it returns all entities related to that target. Then, just filter the result for:
from.entityType === "DEVICE"

Related

Getting file version from TFS rest API Get Item

I am pulling a file from on premise TFS source control using the Rest API. I can't find on premise specific documentation, but it seems to be very close to version 4.1 of the Azure Get Item call. According to this documentaiton, it should return a TfvcItem object which has a lot of metadata including the version. However, when I make the call it only returns the file contents (the content field of the documentation's TfvcItem).
How do I get the current version of the file?
I need the version when I check itin with create changeset. I don't need it for any other reason, so if you know another way to check in an edited file that would help.
Instead of using Get Item API, some related REST APIs are not documented. For these REST APIs we can use tools such as Fiddler or directly press F12 - network in Chrome to track them.
You should use below API to fetch latest changeset version of a file:
post https://dev.azure.com/{organizationname}/{Projectname}/_api/_versioncontrol/history?__v=5
For body:
{"repositoryId":"","searchCriteria":"{\"itemPath\":\"$/MyFirstProject/Main/1.txt\",\"itemVersion\":\"T\",\"top\":50}"}
itemPath is your server path of the file.
From the response, you will get the version info such as "version": "139", instead of the file content.
Not sure your detail version of TFS, I was using Azure DevOps Service for an example. There maybe some difference for different TFS version. You could track the detail API on your own side.
More detail info kindly take a look at this question: VSTS Release API Documentation
Had the same issue. You can get item metadata by specifying "scopePath" URI parameter, instead of "path". Microsoft example in API documentation seems incorrect, as it indeed returns only item content: https://learn.microsoft.com/en-us/rest/api/azure/devops/tfvc/items/get?view=azure-devops-rest-6.0#get-item-metadata-and/or-content-for-a-single-item.

Not able to change API Name in swagger

We are using swagger for one of our java rest services , but I am not able to change the API name for those. I tried changing the api names by different ways, but still it is displaying in different format while accessing the swagger-ui.
For eg: if my API name is EmployeeApiService , in swagger-ui, it is displaying as employee-api-service.
Please find the details :
Maven Dependencies: springfox-swagger2 and springfox-swaagger-ui with both as version 2.7.0
Ways I tried:
1). By giving #API annotation with tags i.e.
#Api(value="EmployeeApiService", tags={EmployeeApi})
2). By giving #SwaggerDefinition .
In both cases, the api name is not getting changed in swagger UI.
Please help.

Asana API retrieve project owner, status and deadline

Is there a way using the Asana api to retrieve the project owner, project status, project description and project deadline?
I checked the API docs and could not find anything, so I am assuming the answer is no (but confirmation is much appreciated).
https://asana.com/developers/api-reference/projects#sections
If there is not a way of doing this via the API, does anyone have any hacks on how to do this using something like Selenium or another tool?
Much appreciated.
Project overview attributes are accessible attributes on project objects in the API.
current_status is the latest status update for the project including the color and text associated.
owner the current project owner.
due_date the current project due date.

Rally api to get data for Release Burnup

I need rally api to get data for Release Burnup, to display chart in iOS. I tried rally rest api, but i'm having a trouble to figure out how it works. Can anyone help me? Here is the link for https://rally1.rallydev.com/slm/doc/webservice/ where you can get more info.
See Developer Portal here for links to API toolkits and for javascript AppSDK2. There is no toolkit specific for iOS. A built-in ReleaseBurnup served by a first generation analytics service can be displayed via AppSDK2rc3 StandardReport component. This is the same report that used to be available in AppSDK1, so for the supported config parameters see this page.
End up using look back apis, worked for me.

get asana project id

I am trying to find out how to get the workspace and project id's from the main web app. I cant seem to find them anywhere.
I am attempting to write a VB.Net app and am trying to get some info out of the API other than 400 Bad request. If I had these id's I might be able to get further
I put app.asana.com/api/1.0/workspaces into a browser (after I had logged into Asana) and it gave me all of my workspace ID's.
The Project ID is most easily found in the URL of your project when using the web interface: https://app.asana.com/0/{PROJECT_ID}/.... It works with API calls such as pointing your browser to https://app.asana.com/api/1.0/projects/{PROJECT_ID}/tasks?assignee=me

Resources