Forum Discussion
Api token
http://developer.fulcrumapp.com
10 Replies
- PhoenixkeFrequent Visitor
let
request = Json.Document(Web.Contents("insert_url_here",
[Headers=[#"Accept"="application/json", #"Content-Type"="application/json", #"X-ApiToken"="insert_apikey_here"],
Content=Text.ToBinary("{""insert_body_here""}"),
RelativePath = "insert_any_relative_path_here_or_ommit"]))[insert_any_json_response_you_want_to_capture_or_ommit]
in
requestAdding the Content into a blank query forces PBI to do a POST instead of the GET you can do.
- PhoenixkeFrequent Visitor
As an example the users.json endpoint with GET:
let
request = Json.Document(Web.Contents("insert_url_here",
[Headers=[#"Accept"="application/json", #"Content-Type"="application/json", #"X-ApiToken"="insert_apikey_here"],
RelativePath = "/api/v2/users.json"]))[user]
in
requestThis should return you a list of all 'user' records. I'm not sure if you need the ApiToken in this header or if you need the Authorization first and put that in.
- HASSANNAZEERFrequent Visitor
This works fine. But all are labeled as Request
possible to use jquery ?
cURL
curl --request GET 'https://api.fulcrumapp.com/api/v2/records.json?form_id=my-form-id' \ --header 'Accept: application/json' \ --header 'X-ApiToken: my-api-key'
jQuery
$.ajax({ type: "GET", url: "https://api.fulcrumapp.com/api/v2/records.json", data: { "form_id": "my-form-id" }, contentType: "application/json", dataType: "json", headers: { "X-ApiToken": "my-api-key" }, success: function (data) { // do something! console.log(data); } });
- CandynatorNew Member
Hi,
I just wonder how did you go with this last year? as I am trying to get data from fulcrum into a power BI to create live reports using API key.
Thanks