Is there a way to retrieve Metabase Questions Table JSON output via API? - metabase

The Metabase (https://metabase.com/) Data Explorer web UI has the ability to create queries they call questions with various filters. The query results can be visualized in a variety of ways including a table and charts. The table results can also be downloaded as JSON. Is there a way to retrieve the JSON via the Metabase REST API?
I've tried a few of the endpoints in the Metabase API Reference with the ID in the URL of the Data Explorer without success.
API Reference: https://github.com/metabase/.../api-documentation.md

This can be done using the following endpoint where :card-id is the numeric "questionId" in the Data Explorer URL after /question/.
POST /api/card/:card-id/query/:export-format
As an example:
Web URL: https://metabase.example.com/question/1
API URL: https://metabase.example.com/api/card/1/query/json

Related

Is there an endpoint to batch get urn:li:digitalmediaAsset in the LinkedIn API?

We are doing a rest/posts?author={MY_ORG} request against the LinkedIn Api (version 202211). Some of the posts returned contain content referenced with urn:li:digitalmediaAsset for which we need the download URL.
When I encounter urn:li:image or urn:li:video I can do a BATCH get to fetch additional details about the assets. I'd like to do the same thing for urn:li:digitalmediaAsset. I haven't seen an endpoint for that - does it exist?
I understand, that I can use a projection here but, I'd like to align with the code that I have for images and videos if the endpoint exists. In other words, I am looking for an alternative to using projections.

How to link from browser to Paw.app?

I am using the Paw app for testing API calls to many different endpoints. We have our own admin web app where we can lookup endpoints that I want to test. Now I am copying the URL and pasting it into Paw and then copying the username or API key separately.
It would be awesome if I could add a custom "Open in Paw" link, that prefills the endpoint and auth details. Paw itself uses a "paw://" link for their new serial number registration.
Is it possible to use that schema to do this?
I could not found any documentation on this.
It is possible to use paw:// schema for the custom link.
It should start with either paw://current.document/open? or paw://new.document/open?
Then you can choose to open text or URL and give it a url-encoded value like text=curl%20-X%20%22GET%22%20%22https:%2F%2Fecho.paw.cloud%2F%22%20%5C%09-H%20%22Cookie:%20sessionid%3Dvr3qftico4qeri1l21mayf40axdyidlt%22
Then choose one of our importers from https://paw.cloud/extensions?extension_type=importer for importing the format of your text/url-resource and include the identifier in the link &importer=com.luckymarmot.PawExtensions.cURLImporter
So the full link can look like this paw://current.document/open?text=curl%20-X%20%22GET%22%20%22https:%2F%2Fecho.paw.cloud%2F%22%20%5C%09-H%20%22Cookie:%20sessionid%3Dvr3qftico4qeri1l21mayf40axdyidlt%22&importer=com.luckymarmot.PawExtensions.cURLImporter

How to make POST request using OAuth via Youtube API?

I am trying to get this thing to work for a couple days since it's my first time working with the OAuth system without any luck.
I have been experimenting here: https://developers.google.com/youtube/v3/docs/subscriptions/insert#try-it
With the following settings:
http://i.gyazo.com/5cd28f1194d5dfebee25d07bc0db965e.png
When I execute the code it successfully subscribes to the specified channelIdaccount with the authorized account.
I have tried to copy paste the shown POST URL into my browser without any luck. The plan was just to test it as I would like to implement this in PHP.
Now to my questions:
The {YOUR_API_KEY}, is this where I am supposed to type in the access token? If so, do I need the &mine=true tag at all?
I just realized that there are no ID's in the URL but there is an JSON-object in the request box example. Am I supposed to convert a string to JSON-object and pass it to the $fields= tag?

OpenLink Virtuoso - Uploading RDF file into a named graph via HTTP API

Relevant docs: http://virtuoso.openlinksw.com/dataspace/doc/dav/wiki/Main/VirtRDFInsert
I'm trying to upload an RDF file in Turtle format into Virtuoso with a named graph.
With Sesame/Fuseki/4Store this is a simple API call, but I gather from the docs that I have to upload the file into a user's DAV folder. I managed to do this by making a HTTP PUT request to /DAV/home/{user}/rdf_sink/{randomlygeneratedfilename}.ttl, however I can't seem to specify the name of the graph to upload the data into.
Any ideas?
HTTP PUT with the sparql-graph-crud-auth URL works, and has a graph-uri query parameter: http://virtuoso.openlinksw.com/dataspace/doc/dav/wiki/Main/VirtGraphProtocolCURLExamples

Sample rest url to retrieve content from alfresco

I want to retrieve content of sample.html inside catalog folder in alfresco using restful.
From alfresco document i got the following rest url to retrieve content of a document. But i dont know exactly what is property, stor_type, store_id,id and attach.
GET /alfresco/service/api/node/content{property}/{store_type}/{store_id}/{id}?a={attach?}
It would be grateful if someone explains me the above rest url properties and provide me a example.
The CMIS Web Scripts Reference and the Repository RESTful API Reference give a little more information (but no examples).
property is the property of the node to follow in order to obtain the content - this will default to cm:content so can generally be omitted
store_type will normally be "workspace" for live application data - see this forum discussion on store types etc
store_id will be "SpacesStore" for normal files - see this forum discussion on other stores
id is the unique identifier for the node (within a given store), e.g. 986b162e-0867-4a7b-9f4f-0e3837cdc97b
attach - if true, force download of content as attachment (defaults to false) - I think this is to trigger "Save as..." in a browser rather than directly streaming the content?
Example GET URL (untested - and of course you'd need to use a valid host, port and id)
http://my.example.com:8080/alfresco/service/api/node/content/workspace/SpacesStore/986b162e-0867-4a7b-9f4f-0e3837cdc97b
Together, the store_type, store_id and id form a NodeRef which uniquely identifies a node, e.g.
workspace://SpacesStore/f1a5e908-80cb-4c6e-b919-cc80fe53b835
There are a couple of examples (though not of this exact API call) on Jeff Potts' tutorial on Curl and web scripts.
If you want to download a file by name and path (without already knowing the node ID) then you will need to use another API, as the one you are using requires you to know the node ID.
This page mentions a direct download URL that accepts a path and filename, e.g.
/alfresco/download/direct?path=/Company%20Home/My%20Home%20Space/myimage.jpg
Depending on access controls, you may need to add the login ticket parameter to this URL, e.g. &alf_ticket=1234567890, where 1234567890 is the security ticket provided by the login URL.
Note: although I refer to the CMIS Web Scripts Reference above, see also this posting and Jira ticket that state that CMIS web script URLs are deprecated, i.e. ( /alfresco/service/cmis and /alfresco/cmis)

Resources