Now I wonder, what’s the difference between those ids?
On most of my test instances both ids share the same value, but some instances do not. And this is a problem, when it comes to updating a context configuration using this
@kkercz thanks for the response. It was not the same id (for PUT and GET) in my investigations.
I think the problem doesn’t occur all too often, as the id and the fieldContextId are the same on many instances. Could you explain what the fieldContextId is for?
I’ve also created a bugticket in the “Developer and Marketplace Support”. Is this the correct place?
Hi @ppasler,
I’m trying to reproduce your problem in my environment - unfortunately, without success. Could you give me an error message you are getting and your instance url? It will help me with further investigation.
The GET /rest/api/3/field/customfield_<ID>/context returns the ID that is fieldContextId. Then, you are trying to use this fieldContextId to save the new configuration in context. As you are using an incorrect ID (it should be a configuration ID), the API returns an error and works as expected.
You can later see in your request to GET /rest/api/3/app/field/customfield_<ID>/context/configuration that the configuration id is indeed 10383.
Another problem I can see here is that you are trying to create a new configuration using this API. Unfortunately, currently, it is not possible with this method. The PUT /rest/api/3/app/field/{fieldIdOrKey}/context/configuration updates only existing configurations.
We are going to extend this API and also allow the creation of a new configuration. I cannot commit to a date, but we will inform you when it’s ready within this thread.
thanks for the detailed answer.
I am not trying to create a new configuration, but update it. As I apparently using the wrong id it fails to do so. I will try to use the right one.