Does anyone know if it's possible to get an Acumatica OData endpoint to return JSON instead of Atom?
By default, it looks to me like the format is Atom:
But this seems to indicate that JSON might be a possible alternative:
https://www.odata.org/documentation/odata-version-2-0/json-format/
There are two options available:
Use Format System Query Option (just add $format=json to the query string)
If you're doing an integration, you can also request the JSON format using Accept HTTP Header (see this article for more details).
Related
Right now I have an endpoint that servers a file to the user (json, csv, excel or pdf).
My question here is, which type of route should I use to serve it, path variables or query parameters (considering best practices and for developer comprehension):
baseURl/api/v1/resource/xlsx
or
baseURl/api/v1/resource?format=xlsx
Thank you in advance.
So long as you are consistent with the production rules of the http URI scheme, any spelling conventions you choose are fine.
Choosing spellings that match the capabilities of URI templates will make it easier to construct/deconstruct resource identifiers in a "common URI space", which is often convenient both for clients and servers.
Using path segments vs query is purely trade offs. Using application/x-www-form-urlencoded key value pairs in the query part mean that you can implement your URI template as an HTML form. Using path segments means that you can use dot segments to describe other identifiers in the common URI space.
If you don't care about either of those, it just comes down to which spellings you like best in an access log, or in your documents, or in a browser history, or when you paste them into an email message, or ....
It is best practice to use headers for HTTP to show what format the client can understand. You should use a get route and include the Accept header for the format.
Header key: Accept
Header Value: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept
HTML Input="file" Accept Attribute File Type (CSV)
I have stored JSON data in SharePoint online list multi line and text column. I need to update that column in Power Apps form.
Can anyone help me for how to parse / stringfy the JSON data in Power Apps without using Flow?
Thanks & Regards,
Meet
You can use Power Automate to parse JSON string to Object. Action is named "Parse JSON".
Serializing from Object to string is possible using JSON function in PowerApps:
https://learn.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-json
unfortunately you will have to use Power Automte/flow for converting string to Json. Out of box canvas App does not have any method to convert string to json. The closet you can get is JSON function.
Here is nice article of Power Apps (canvas App) with power automate to convert string to JSON
You can actually use MatchAll() to do much of the parsing. Issue is getting the correct RegEx string (in PowerApps format) to do so.
Today Microsoft has provided the function to parse the JSON inside the powerapps itself. It is an experimental feature for now. You can learn more from here:
https://powerapps.microsoft.com/en-us/blog/power-fx-introducing-parsejson/
Power Apps now supports experimental ParseJSON function which might be helpful to you.
Check below links for detailed information:
Power Fx: Introducing ParseJSON
ParseJSON function in Power Apps (experimental)
I am trying to integrate django-rest-swagger==2.1.1 to existing project which has function based views.
In order to add missing paramaters to function based views, I am using this solution:
Solution by daimon
I specify required parameters in yaml, which shows the field in swagger UI too. Now inside my view request.POST['key'] gives None. But request.body contains the required parameter. How should I modify the swagger settings so that view becomes able to access data with request.POST['key'].
I have already tried solution but it didnt work for me.
The issue is actually with your parser, you ll have to mention parser classes in your settings.py priority wise, as mentioned by marcgibbon himself here:
Click to see
According to this API documentation, you can request various MAPI properties from the message. I need to get other MIME parts of a message, specifically the message/delivery-status part.
Are there any extended properties that can get me this information? I've tried a few, but none seem to really give me what I need. It looks like this would, but I can't seem to get that to work with the API.
First - it looks like I could get the information I am after with the PR_SUPPLEMENTARY_INFO_W tag.
Unfortunately, it looks like the API currently does not support some MAPI tags. For example, PR_SUPPLEMENTARY_INFO_W seems to be accepted, but there is no SingleValueExtendedProperty in what is returned. Maybe this will change once the API is out of beta.
I am trying to add a custom format for HAL (hypertext application language). I have my custom format handler created, I followed along with the ServiceStack v-card example, and all is working fine there and I was able to register it with ServiceStack.
The problem is that in my custom format I am trying to specify a content-type of "hal+json"
When I make a GET request to my service, and specify the format like so:
'http://mylocalserver:555555/items?format=hal+json'
ServiceStack defaults back to using just Json. I have tried changing the content type to something different like "halj" and ServiceStack formats requests that use "?format=halj" using my custom formatter fine.
I pulled down the source for ServiceStack and found that any request that comes in it checks the query string for a format, and if the format evens contains "json" it will default to the Json formatter.
Is there any way around this? I have been trying to find some documentation about how to override this behavior.
Unfortunately + is a special variable on a url. Try Url encoding it, e.g:
http://mylocalserver:555555/items?format=hal%2Bjson