Altinn / Altinn/app-lib-dotnet
API: Return created data elements in http response to PUT data requests
- Dominant language
- C#
- Stars
- 8
- Forks
- 27
- Avg merge
- 1h 21m
- Merged PRs (30d)
- 7
Description
### Description
With the new DataWriteProcessor interface, changes to data elements can trigger creation of new data elements, like subforms. However, data elements created this way do not return anything to the client. This has the unfortunate consequence of the newly created data element being unknown by the client. One has to make an extra GET request to get list of data elements and find the new element that way.
**Current workflow**
1. Create new instance
2. Update data model (new data element is created by the server here)
3. GET instances/partyId/instanceId and find the dataElementId for the new data element
4. Update new data element with values
**Desired workflow**
1. Create new instance
2. Update data model, receive dataElementId of new data element
3. Update new data element with values
### Additional Information
_No response_
Contributor guide
Research direction
Start by tracing the DataWriteProcessor handling for PUT data requests and follow how the HTTP response is assembled. Confirm the response path for changes that create new data elements, then verify that the new dataElementId is returned so the client can update it without an extra GET request.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100