CMDBuild Forum

Reordering lookup values by REST

Hi,

I don’t have any problem with REST and creating/updating/deleting, but I do have a problem to reorder lookup values.

I have created a test lookup MyLookup with 5 values.

I tried the following (in python):

requests.post(url=‘http://localhost:8082/cmdbuild/services/rest/v3/lookup_types/MyLookup/values/order’, headers=self._headers, params={“lookupValueIds”: [4211807,4211805,4211803,4211801,4211799]}).text

Which resulted with:

{“success”:false,“messages”:[{“level”:“ERROR”,“show_user”:false,“message”:“org.cmdbuild.utils.ws3.utils.Ws3Exception: error processing request =< ws3rest:post:lookup_types/Županija/values/order >, caused by: org.cmdbuild.utils.ws3.utils.Ws3Exception: error processing request with handler = Ws3RequestMethodHanlder{service=org.cmdbuild.service.rest.v3.endpoint.LookupValueWs$$EnhancerBySpringCGLIB$$2b69744b, method=reorder}, caused by: org.cmdbuild.utils.ws3.utils.Ws3FrameworkException: error building method args for handler = Ws3RequestMethodHanlder{service=org.cmdbuild.service.rest.v3.endpoint.LookupValueWs$$EnhancerBySpringCGLIB$$2b69744b, method=reorder}, caused by: java.lang.IllegalArgumentException: missing required payload content”}]}

Why payload is missing?

Regards