Is there a way to get response in json format for Azure Storage Account Queue when Querying from Postman - azure-storage-queues

I created an Azure Storage Account and then a Queue Resource as follows.
And I have some messages inside of it as follows.
Now I am able to query with Postman as follows.
As you can see, the response is in xml. Is there a way I can get that in json format?
Changing that xml in the drop down to json is not helping me.

Unfortunately it is not possible to get the response in JSON format. Azure Storage Queue REST API only returns data in XML format at least as of version number 2020-10-02 (latest version at the time of providing this answer).

Related

Here Traffic information in the form of JOSN format

Is there any we can get the traffic information in the form of json data, because currently here api gives response in the form of png image which is difficult to process.
Below one is the traffic request of Here api
https://1.traffic.maps.ls.hereapi.com/maptile/2.1/traffictile/newest/normal.day/14/8683/5379/256/png8?apiKey=xxxx&min_traffic_congestion=heavy
Reference : https://developer.here.com/documentation/map-tile/dev_guide/topics/example-traffic.html
You can use Traffic Rest API and it returns data in XML or JSON. More details -> https://developer.here.com/documentation/traffic/dev_guide/topics_v6.1/resource-parameters-flow.html

Not Receiving Proper Subscription Messages from Pub/Sub

I am trying to retrieve subscription information from Google when I receive a Real Time Notification from Google Pub/Sub. Google Pub/Sub is sending me subscription token in this format:
{"message":{"data":"REALLY LONG STRING","messageId":"468103560112704","message_id":"468103560112704","publishTime":"2019-03-18T17:19:01.444Z","publish_time":"2019-03-18T17:19:01.444Z"},"subscription":"my/pubsub/subscriptions/path"}
I don't believe that this is the format that a subscription token is supposed to arrive in, and when I send it to Google to retrieve information using an HTTP GET command, I get nothing, no errors and no data. I think that it is just a generic message. I would think that I am doing everything right because I am actually getting messages when I expect to get them during testing, I just can't do anything useful with them. Any thoughts at all on how to get these converted to REAL messages???
This one took far to long to figure out, and the solution turned out to be quite simple. I was surprised that for two weeks, nobody at Google could find an answer to this question for me. It turns out that this is the correct format for the Pub/Sub message. The JSON message that I was receiving from PubSub was in a VERY different format from what I was expecting based on the Google Play documentation, and basically just had a "data" field that looked like a token, but it wasn't. I actually had to dive into the PubSub documentation deep and found an obscure note on the "data" field - it is a base64 encoded string. If you decode the "data" field, voila!, you get a JSON string containing the subscription purchaseToken that you need to query Google Play for subcription information.
So there is a JSON message INSIDE of this JSON message, but it is base64 encoded, and you just need to decode it to get to the expected treasure inside.

Consuming TFS Web Hooks (Post via HTTP)

Is there a specific request format that the webhooks have? I am using the Pull Request Updated event, and I am trying to deserialize into a class, but I do not know what fields I will need. Is there a class or example of the request content details for the different events?
As far as I know, there isn't a generic template for the HTTP post request/response from TFS.
The TFS HTTP post JSON request/response format is based on the specific action.
For example, for the web hooks whenever a work item is updated.If I update a description field, I am getting one format and if I add a child work item, I am getting another format.
However for the specific event, you can check the response format, then get the useful information which you needed.
Please refer to Send JSON representation to a service for more information.
And at the end of the Q&A part there is a sample JSON.

Salesforce ServiceM8 Integration

We had already integrated Salesforce and ServiceM8. We have been pushing a custom object into servicem8 and creating a job.
This was working well before but not for last few days. We get the below error while posting.
Error:
{"errorCode":400,"message":"Bad Request. No data received in POST"}
Can you please identify what does this mean?
NOTE: We have been sending this in JSON format. We tried with the example that ServiceM8 given in the API document. That itself didn't get posted now.
Please assist, if there is any changes in the serviceM8 api.
I am passing the content type through header. Please find the sample request and response below.
Request===System.HttpRequest[Endpoint=https://api.servicem8.com/api_1.0/job/0bd2a066-8ac8-4d0c-83db-2deb78973ceb.json, Method=POST]
JSON String==={"status":"Completed","purchase_order_number":null,"job_description":"","job_address":"test, test, test, test, test","customfield_strata_number":"Yes","customfield_service_sheet_url":"SS2000420","customfield_salesforce_id":"012038","customfield_purchase_order_number":null,"customfield_notes_to_service":null,"customfield_notes_from_previous_service":null,"customfield_message_to_technician":null,"customfield_booking_notes":null,"customfield_booked_with_customer":"Yes","company_uuid":"15792888-b2f4-4538-a325-c3a58defaddb","badges":"[\"64cb190d-6a08-4ce2-ab08-56d8999c8a8b\",\"2aec7e2e-7370-42d0-9ea2-f16a859a2d1b\",\"a225a59f-b21f-4ea1-bce7-5e28ff2bd89b\",\"e71de9ce-8207-4bdd-a178-f05f35c675cb\",\"62795263-6867-45d8-868f-ab8cfbcf897b\",\"08b0cfa0-2d9c-438e-b7b0-ba41a437607b\",]"}
Response:
VF_PAGE_MESSAGE|{"errorCode":400,"message":"Bad Request. No data received in POST"}

FineUploader: Harvest original last modified date when uploading to Amazon S3

I would like to send the last modified date of the uploaded file to the server. I have the javascroipt snippet to get that using FileApi ($(this).fineUploaderS3('getFile', id).lastModifiedDate). I would like to send this information when the uploadSuccess's endPoint is called, but I cannot find the callback which is right for me at Events | Fine Uploader documentation, and I cannot find the way I could inject the data.
These are submitted as POST parameters to my server when the upload finished to S3: key, uuid, name, bucket. I would like to inject the lastModified date here somehow.
Option 2:
Asking the Amazon S3 service about last modification date does not help directly, because the uploaded file has the current date, not the file's original date. It would be great if we could inject the information into the FineUploader->S3 communication in a way that S3 would use it for setting it's own last modified date for the uploaded file.
Other perspective I considered:
If I use onSubmit and setParams then I the Amazon S3 server will take it as 'x-amz-meta-lastModified'. The problem is that when I upload larger files (which is uploaded in chunks with an other dance) then I get signing error. ...<Code>SignatureDoesNotMatch</Code><Message>The request signature we calculated does not match the signature you provided. Check your key and signing method.</Message>....
EDIT
The Other perspective I considered works. The bottleneck was the name of the custom metadata chih I used at setParams. It cannot contain capital letters, otherwise the signing fails. I did not find any reference documentation for it. For one I checked Object Key and Metadata - Amazon Simple Storage Service. If someone could find me a reference I would include that here.
The original question (when and how to send last modified date to the server component) remains.
(Server is PHP.)
EDIT2
The Option 2 will not work, as far my research went the "Last Modified" entry cannot be manually altered at Amazon S3.
If the S3 API does not return the expected last modified date, you can check the value of the lastModifiedDate on the File object associated with the upload (provided the browser supports the file API) and send that value as a parameter to the upload success endpoint. See the documentation for the setUploadSuccessParams API method for more details.