Bug Report - PUT {{baseUrl}}/projects/:projectId "description" is not working as expected

Steps to reproduce

  1. Create a project in awork
  2. Add a Description
  3. Update the awork Project via the API (PUT), e.g. with a new name

See:

Unter Request
This endpoint expects an object.
description > string or null > Optional

and Loom: Fehler beim Aktualisieren eines Projekts über die API 🐛 | Loom

Actual result

  1. If no „description“ attribute is provided, the API sets the Project description to „null“ (String)
  2. If „description“ attribute is provided as null, the API sets the Project description to „null“ (String)

Expected result

  1. If no „description“ attribute is sent, the awork project description remains as it is.

Hi @sd1 ,

we only have put endpoints. And put endpoints require by specification to sent the whole object and not just a subset of properties. So if you leave those properties out we set them to null or the default value of the property.

I hope that helps.

Best

Nils

Hey @Nils dann habt ihr wohl einen PUTCH Endpoint, die anderen Werte werden ja auch nicht überschrieben;)

Gibt es ein PATCH endpoint oder müssen wir vor dem Update die Daten erst mit GET abrufen?

Das kann eigentlich nicht sein. Welcher Wert wird nicht überschrieben? Kannst du mir zufällig die Trace-Id aus dem Responds header geben?

Klar, gerne:

trace-id
ef2e3779773080529fe6d0edb07966bf

Nur um komplett zu sein: Eure Documentation beschreibt einen PATCH endpoint, anders kann ich „Optional“ nicht lesen. Ich denke dass ist auch das, was euere Kunden brauchen. Alternativ muss ich vor jedem PUT ein GET machen…

Sehe ich etwas anders. :wink: Es ist optional, weil du es auf null setzen kannst und das Feld nicht ein Pflichtfeld ist. Ich habe gerade geschaut in dem trace werden alle Felder auf null gesetzt und der Name auf den gesendeten wert.

Genau - man muss vor jedem PUT ein GET machen. Das gilt aktuell für alle unsere Endpoints.

Viele Grüße

Nils