How do I get the execution time for Apache drill using rest api? - apache-drill

I want to get the total query execution time for Apache drill using some rest API or if any other method is available.

You will find information regarding execution time in Profile.
To get the profiles of running and completed queries.
Make a GET request to http://drill_host:8047/profiles.json
To get the profile of the query that has the given queryid.
Make a GET request to http://drill_host:8047/profiles/{queryid}.json
Check Drill docs for more details.

Related

Large API call with no pagination

I need to retrieve data from an API source that has a massive amount of entries. (1800+) The problem is that the source has no pagination or way to group the entries. We are then saving the entries as post on the site and will run through a Cronjob daily.
Using curl_init() to retrieve the data from the API source. But the we keep getting a 503 error, timing out. When it works it retrieves the data as json saving important info with as metadata and the rest as json.
Is there a more reliable way to retrieve the data. On other sites I have worked on we have been able to programmatically run through an API per page in the backend.
You might try saving the JSON to a file first, then running the post creation on the JSON in the file vs. the direct cURL connection. I ran into similar issues in the past, even with an API that had pagination.

How to list all running workitems in Forge - Design Automation for Revit?

I would like to get running workitems to track progress of the posted workitems.
It is possible to get details to a given workitem by providing an ID, like this:
https://developer.api.autodesk.com/da/us-east/v3/workitems/{{workitemId}}
but I have posted multiple jobs, and using postman, only the last ID gets saved to an environment variable.
I tried getting the generic /workitems endpoints without query strings, but the result was that "The requested resource does not exist."
It would be nice to get a bit more documentation about the specific endpoints, I have read
The developers_guide
but could not find an answer.
I would expect a rest api to give back a list of workitems, just like it does it for activites or appbundles.
Design Automation doesn't have an API to list WorkItems. We only keep WorkItem's reports for 3 days.
You can use this API to get details of a given workitem by providing its id.

Youtube Data Api multiplies by 2 your queries

This is a question most suitable for Youtube API developers.
Having 2 queries performed to get the videoid and the title (first query)
https://www.googleapis.com/youtube/v3/search?safeSearch=moderate&order=relevance&part=snippet&q=".urlencode($q). "&maxResults=10&key=". $api;
and a second query to get the contentDetails to see if the video is licensed or not
https://www.googleapis.com/youtube/v3/videos?part=contentDetails&maxResults=10&id=".$vid."&key=". $api;
I was expecting the Google dashboard to show 2 queries, instead it shows a 4 queries.
I'd like a clue as to how google counts this searches. Anybody has checked this behaviour?
I want to clear something regarding your issue. If your API requests returns multiple pages of results, this will add to the query as stated from here.
Note: If your application calls a method, such as search.list, that
returns multiple pages of results, each request to retrieve an
additional page of results will incur the estimated quota cost.
It is due to requesting again a token for another result per page. You can also check the Youtube Quota Calculator documentation for more details.
If this is not the case, this can be a bug. You can try to log the issue here.

Query Environment hub records from salesforce API

I'm currently creating a chrome extension that will query EnvironmentHubMember records from our Salesforce org, however I'm currently getting this returned from the REST callout;
'"sObject type 'EnvironmentHubMember' is not supported."'
The endpoint I'm using is 'INSTANCENAME.COM/services/data/v20.0/query/?q=SELECT+Name+FROM+EnvironmentHubMember
I can't seem to find any specific settings to make this sObject available via an api call, has anybody been able to query these records from an external system before?
Thanks!
try using a later API version. The object itself was not available in version 20. The most recent version is 41.

Box Rest API: Getting user info after login

I know the steps to authenticate user and getting the user info after performing this call:
GET https://www.box.com/api/1.0/rest?action=get_auth_token&api_key={your api key}&ticket={your ticket}
But what I'm really looking for is to get user info after performing certain operation such as upload new file, in particular the user quota:
<space_amount>1234567</space_amount>
<space_used>1234</space_used>
Is there any way to get the latest user quota without calling the 'get_auth_token' again? As I understand it, 'get_auth_token' will generate new auth_token which I'd like to avoid.
There isn't yet a fully equivalent method in the v2 API. but you can utilize the get_account_info method from the v1 API to retrieve this information.