Skip to main content
Solved

Indicium Basic throws "Invalid key segment" on PATCH request to view


Jeroen de Klerk
Vanguard
Forum|alt.badge.img+2

Using Indicium Universal, I am trying to update two values through a view using a PATCH request. The view in question has two columns specified as PK and 3 additional mandatory columns, all of which are supplied in the request body.

 

However, every time I execute the request, I get a 500 Internal Server Error response, and in the Indicium logs the following exception;

System.ArgumentException: Invalid key segment

As far as I can tell, all mandatory fields and primary keys are present in the request body and I am confident the URL is not missing any required segments (https://<server>/indicium/<app_id>/<app_version>/<view>). I have also tried including all the columns of the view in the request body and only updating the values of the columns to be updated, but that also resulted in the exception.

 

Am I missing anything? I am not quite sure what else I could be doing wrong or what other issue there could be that could result in this exception.

 

Thank you in advance!

Best answer by Benjamin Westra

Hi Jeroen, thank you for posting your question. Have you tried to supply the correct filtering in the URI, and try to leave out the PK values in the message body. Let me know if this helps.
 

for reference : https://docs.thinkwisesoftware.com/docs/indicium/api 

View original
This topic has been closed for comments

Forum|alt.badge.img

Hi Jeroen, thank you for posting your question. Have you tried to supply the correct filtering in the URI, and try to leave out the PK values in the message body. Let me know if this helps.
 

for reference : https://docs.thinkwisesoftware.com/docs/indicium/api 


Jeroen de Klerk
Vanguard
Forum|alt.badge.img+2
Benjamin Westra wrote:

Hi Jeroen, thank you for posting your question. Have you tried to supply the correct filtering in the URI, and try to leave out the PK values in the message body. Let me know if this helps.
 

for reference : https://docs.thinkwisesoftware.com/docs/indicium/api 

Just tried this, this does give me a 204 No Content response, but it does not seem to actually change any values.

There is an instead of trigger on the view for updates, perhaps the actual error is in there, however updating the same values in the Windows GUI seems to work just fine.


Jeroen de Klerk
Vanguard
Forum|alt.badge.img+2

The problem has been found. The Indicium error occured because of an apparent improperly defined request.

After properly composing the request according to @Benjamin Westra's answer, a different fault altogether appeared, which is to be resolved in the instead of trigger.

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings