Skip to content

HTTP PUT throws 404 #40

@danielporta

Description

@danielporta

What?

Performing an update of a non existing resource via PUT throws 404.

How?

Instead (for the same reasons as in #39), it could be created (returning 201) if the identifier in the path matches the one in the body. Otherwise return 400. In that case, PUT is kind of a CreateOrUpdate method.

In the Submodel API, PutFileByPath also follows a CreateOrUpdate style. If the File element value is empty, the "attachment" is created. However, returning 204 instead of 201 seams reasonable.

For PutSubmodelElementByPath, the proposed behavior should probably only be possible if the path segments match up to the last segments taking into account #32 and #33.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions