Skip to main content
Solved

Get all results from GI rest API using "PUT"

  • Oct 27, 2023 2:46 PM UTC
  • 8 replies
  • 334 views
  • Translate All

Driss
Jr Varsity III
Forum|alt.badge.img

Hey everyone

 

hope everything is good 

 

I’m trying to get all results from GI using “PUT” Method but i get only 1 result instated of all results that i have 

 

 

 

But here is my GI that i have in Acumatica

 

 

Best answer by Dmitrii Naumov

@Driss  make sure your GI is mapped to the endpoint properly. 

That is the header is mapped to the TopLevel entity and the results are mapped separately to the detail level entity under the TopLevel entity.

View original

8 replies

jinin
Pro I
Forum|alt.badge.img+12
  • Pro I
  • Oct 27, 2023 2:54 PM UTC

Hi @Driss 

Can you please share the endpoint URL and Request JSON?

Translate

Dmitrii Naumov
Community Manager
Forum|alt.badge.img+7
  • Community Manager
  • Answer
  • Oct 27, 2023 2:54 PM UTC

@Driss  make sure your GI is mapped to the endpoint properly. 

That is the header is mapped to the TopLevel entity and the results are mapped separately to the detail level entity under the TopLevel entity.

Translate

Driss
Jr Varsity III
Forum|alt.badge.img
  • Author
  • Jr Varsity III
  • Oct 27, 2023 2:59 PM UTC

@Dmitrii Naumov Hey Thanks for you answer i have created the endpoint like this 

 

 

Translate

Dmitrii Naumov
Community Manager
Forum|alt.badge.img+7

@Driss looks good. 

You should then call the Put with $expand=Results

Translate

Driss
Jr Varsity III
Forum|alt.badge.img
  • Author
  • Jr Varsity III
  • Oct 27, 2023 3:29 PM UTC

@Dmitrii Naumov  Hey Yeah i’ve added $expand=Results it throws 

"The given key was not present in the dictionary.",

 

I tried $expand=Result but still returning only one record 

 

 

Translate

Dmitrii Naumov
Community Manager
Forum|alt.badge.img+7

@Driss it in fact will return one top level record, but inside there will be an array of Result records.

Translate

Driss
Jr Varsity III
Forum|alt.badge.img
  • Author
  • Jr Varsity III
  • Oct 27, 2023 4:30 PM UTC

@Dmitrii Naumov Thanks, yeah it showing the array of result but it only one result on that array 

Translate

Driss
Jr Varsity III
Forum|alt.badge.img
  • Author
  • Jr Varsity III
  • Oct 27, 2023 5:43 PM UTC

@Dmitrii Naumov  The issue is fixed i was populating results for Top-level and detail that was the issue i only populate that in the details that fixed the issue

Translate