I have been trying to read/write from/to a fusion table directly from my browser using different urls. For Reading a use "https://www.googleapis.com/fusiontables/v1/query?sql=SELECT * FROM WHERE ID = '1' &key=" This works well and i can read data in Json.
For inserting data i use "https://www.googleapis.com/fusiontables/v1/query?sql=INSERT INTO (ID, Adress) VALUES (1, 'Prästkragsvägen 33') &key=" In this case i get the following error:
"domain": "fusiontables",
"reason": "cannotWriteDataOnGetRequests",
"message": "The operation is not supported for GET requests. Please try again using POST."
"code": 501
The table is set to public. How should the url for an INSERT command look like?
Regards
Alfred
For inserts and updates into fusiontable you will need POST requests. Your browser's address bar only does get requests.
You could try console with jquery $.ajax or curl in a terminal
Related
I use graph api to create a message with attachment(s).
All runs fine but the server send back the complete message in response, including the attachments.
Is there a way to only get the message id in the response ?
I try with :
string webApiUrl = $"{_apiUrl}v1.0/users/{senderId}/messages?$select=id"
but I still get the whole message with 98ko of attachment.
You can do it using the prefer:return=minimal header in the request which will mean you will just get a 204 response. However the id of the item that was created will be returned in the location header (the response should really have the OData-EntityId if they are following the oData spec to the letter, also I'm not sure why it return the Outlook v2 location rather then the graph but the message Id is the same between them)
Looking to send an HTTP POST through Microsoft Flow/Power Automate to make a voice call in Twilio. I feel like I've tried every iteration possible, but keep getting the error 21201:
{
"code": 21201,
"message": "No 'To' number is specified",
"more_info": "https://www.twilio.com/docs/errors/21201",
"status": 400
}
Screenshot of Power Automate HTTP Action
I've seen other vids of people using Azure Functions with C# and it feels like I should be able to do what I need here...like, really close. But I'm not a dev, so maybe I'm way off. Would appreciate any direction on this.
Thanks!
The issue appears to be you are sending a content type of application/json where Twilio requires application/x-www-form-urlencoded
Creating or Updating Resources with the HTTP POST and PUT Methods
Also found this:
Custom connector action with x-www-form-urlencoded content-type
I have tried several attempts to upload a GeoJSON FeatureSet to the Azure Map Service REST API.
https://learn.microsoft.com/en-us/rest/api/maps/data/uploadpreview
The JSON I tried came from http://geojson.xyz/ - namely the "populated places simple" file, which you can download here:
https://d2ad6b4ur7yvpq.cloudfront.net/naturalearth-3.3.0/ne_50m_populated_places_simple.geojson
1,249 points, 175KB.
On POSTing to /mapData/upload I get a HTTP 200, and 'success' response message.
The response headers includes a location, which when I query I get a 200 back, with this error message in the body.
{
"error": {
"code": "400 BadRequest",
"message":
"Upload request failed.\nYour data has been removed " +
"as we encountered the following problems with it:\n" +
"System.Threading.Tasks.Task`1[System.String[]]"
}
}
Any ideas?
Richard, I wasn't able to repro your issue.
The file is indeed a valid GeoJSON file and I was able to successfully upload the file ne_50m_populated_places_simple.geojson(Downloaded from http://geojson.xyz/) using the Map Data Service Upload API
Please give it another try and feel free to let us know if you still see any issues.
The team is investigating, but they say this is often due to issues with the GeoJSON file. Try pasting your GeoJSON into this site: http://geojson.io/ If you see any red in the side panel, hover over it and it should provide some insights into the issue.
I have a zap that gets invoked by a URL sent to a user in an email. The user clicks on the url, that invokes the zap. The zap then does some work removing items from a google calendar. All that works perfectly. However, the user gets a JSON response like:
{ "status": "success", "attempt": "58f76ead-ffa8-4807-b4a4-9cb31537ace0", "id": "556d2bd7-e413-4fe0-9602-af4bfbba1f48", "request_id": "zjd5zKTwCgtdDYS0" }
I would prefer that the user got an HTML response. Is this a javascript/python coding issue? Is there some unusually named zapier function that does this already?
It's not possible to define the response content returned by requests made to a Zapier webhook URL. The response will always be a JSON response with basic status/meta data.
To get what you're looking for, you'd need to link your users to a webpage that will in turn make an HTTP request to Zapier when they visit.
I signed up for the yellow pages.com API program found here: https://publisher.yp.com/home.
I went to make a call like this and I am getting back JSON in the browser:
http://pubapi.atti.com/search-api/search/devapi/search?term=Jumbo+China+5&searchloc=6108+Falls+Of+Neuse+Rd+27609&format=json&key=ZZZZZZZZ
When I take the json results and put it into Json2CSharp, it renders fine. When I try and load it into a type provider:
type RestaurantListingJson = JsonProvider< #"http://pubapi.atti.com/search-api/search/devapi/search?term=Jumbo+China+5&searchloc=6108+Falls+Of+Neuse+Rd+27609&format=json&key=ZZZZZZZ">
I get a 400
Looking at fiddler, I see
"User agent is a required field"
Has anyone run into this before? How do I add a user agent to a type provider?
Thanks in advance
I have not created an account, so I could not try this - but if the error message says "user agent is a required field", then I guess that the service requires setting the User-Agent header of the HTTP request.
This is not supported in static parameters of the JsonProvider, so the best way to get this to work would be to download the sample JSON, save it to a local file (say yp.json) and then use that to create the type provider:
type Yp = JsonProvider<"yp.json">
To actually download some data (when you want to make a request), you can use Http.RequestString which takes headers - there you can specify any required headers including User-Agent:
let response =
Http.RequestString("http://httpbin.org/user-agent", headers=["user-agent", "test"])
Then you can load the data using Yp.Parse(response) (rather than using the Load method directly to request a URL which would not let you specify the header).
The latest version of F# Data now always sends user agent and accept headers, so this should now work directly:
type RestaurantListingJson = JsonProvider<"http://pubapi.atti.com/search-api/search/devapi/search?term=Jumbo+China+5&searchloc=6108+Falls+Of+Neuse+Rd+27609&format=json&key=ZZZZZZZ">