I am trying to use Graph Java sdk to search DriveItem similar to sample given here.(https://learn.microsoft.com/zh-tw/graph/api/search-query?view=graph-rest-beta&tabs=java). But gets error as "com.microsoft.graph.models.SearchHit declares multiple JSON fields named _id". Seen similar issue reported at class A declares multiple JSON fields. But here the classes are in graph sdk library. Detailed exception as below
at com.google.gson.Gson.getAdapter(Gson.java:458)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:117)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:166)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:102)
at com.google.gson.Gson.getAdapter(Gson.java:458)
at com.google.gson.Gson.fromJson(Gson.java:931)
at com.google.gson.Gson.fromJson(Gson.java:1003)
at com.google.gson.Gson.fromJson(Gson.java:975)
at com.microsoft.graph.serializer.DefaultSerializer.deserializeObject(DefaultSerializer.java:101)
Any suggestions?
Related
When invoking either
GET /solutions/bookingBusinesses/{id}/calendarView
or
GET /solutions/bookingBusinesses/{id}/appointments
the returned bookingAppointment object has an empty customer array. However the customers appear in the UI. Any idea why this may be the case?
Looks like a bug in Graph API.
According to the documentation the customers property is optional. Sometimes you have to specify optional property in $select statement.
GET solutions/bookingBusinesses/{id}/calendarView?start=2018-04-30T00:00:00Z&end=2018-05-10T00:00:00Z&$select=customers
Another option is trying beta version instead of v1.0
GET beta/solutions/bookingBusinesses/{id}/calendarView?start=2018-04-30T00:00:00Z&end=2018-05-10T00:00:00Z
I'm trying to use OpenAPI to fetch data from Acumatica.The filter is barcode in CROSS-REFERENCEEimage.
It's unable to fetch data(before change) because
"The parent value for a property access of a property 'AlternateID' is not a single value. Property access can only be applied to a single value."
I did some research and find a same question(OData $filter with items in a $expand).
I changed(after change) my request but still get
"exceptionMessage": "The method or operation is not implemented." error.
I really know nothing about OData and C#.I use JAVA/NODEJS to fetch data. Can someone give me any suggestion? Thanks a lot.
You can't do it this way.
Acumatica doesn't support filtration over the detail records.
Instead, you can create a new GI that will contain the information from the Inventory Item and corresponding Alternate IDs and request the records from that GI.
So I am aware of the fact that you can get the files in a repository by using
https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}
API.
The API also supports the q parameter where you can query the resulting json object based on various fields in it.
I wanted to know if one can use this query parameter to fetch the files based on certain extensions?
Like the JSON object also contains a field "mimetype" which defines the mime type of the files.
I did use the following API call
https://api.bitbucket.org/2.0/repositories/{workspace}/openapi/src/master/?max_depth=100&q=path+%7E+%22.js%22&pagelen=100
To fetch all the files which contain the string ".js" in the path parameter.
But while querying the mimetype parameter I was not able to do the same using
https://api.bitbucket.org/2.0/repositories/{workspace}/openapi/src/master/?max_depth=100&q=mimetype+%3D+%22application%2Fjavascript%22&pagelen=100
This call returned error.
Can anybody let me know how can you query based on mimetype or if possible fetch the files based on extension
Note: I know about the Code search API but that is not an option as it has large limitations.
The documentation for resourceVisualization resource type (Trending endpoint) says that one of the properties that gets returned as part of the object is type.
However, when I use Graph Explorer to test the endpoint I don't see this property. Is it going to be added soon?
We have that identified and we are working on updating the API schema to have that property available by the end of next week.
Mario
I have to show the response with same order as I have received from my backend team.
But the response sequence is getting changed on extracting the values from Dictionary and array.
Please check the attached screenshot and suggest .
On extracting , I am getting 7703 but I need 5599 for showing the same position as in my website and in my application
Dictionary is not an ordered collection. You should create custom model class and use array of models.
You can use famous third party https://github.com/jsonmodel/jsonmodel
for mapping json to array of models.
Or you can sort dictionary keys (dict.allKeys) or values (dict.allValues)