Skip to content

fix: correct success status codes on Management Interface endpoints - #196

Merged
matlec merged 3 commits into
pre-draftfrom
fix/capabilities-http-status
Aug 24, 2026
Merged

fix: correct success status codes on Management Interface endpoints#196
matlec merged 3 commits into
pre-draftfrom
fix/capabilities-http-status

Conversation

@matlec

@matlec matlec commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Description

This is a spec hygiene fix.

The Device Capabilities endpoint documented 201 OK for every successful write. That reason phrase does not exist (201 is Created, 200 is OK), and a single 201 was used for both creating and updating a document. Per RFC 9110, 201 Created is correct only when a new resource is created. An update should return 200 OK. This meant a client updating an device that was already registered received 201, reporting a creation that never happened.

This PR aligns the Management Interface endpoints on a single convention: 201 Created on creation, 200 OK on update, 204 No Content on delete.

Issues Addressed

#195

Change Type

Please select the relevant options:

  • Fix (change that resolves an issue)
  • New enhancement (change that adds specification content)
  • Content edits (change that edits existing content)

Checklist

  • I have read the CONTRIBUTING document.
  • My changes adhere to the established patterns, and best practices.

This resolves #195.

Signed-off-by: Matthias Lechner <matlec.public@gmail.com>
@matlec
matlec requested a review from a team as a code owner July 21, 2026 07:23
@phil-abb
phil-abb self-requested a review July 21, 2026 10:20
@github-actions

This comment was marked as resolved.

Signed-off-by: Matthias Lechner <matlec.public@gmail.com>
@matlec
matlec force-pushed the fix/capabilities-http-status branch from df13590 to ac909c9 Compare July 23, 2026 06:19
@phil-abb

Copy link
Copy Markdown
Contributor

@matlec, for some reason, this PR is showing that you haven't signed off on it. Also, there is a merge conflict. Once these things are addressed we can merge it in.

@ajcraig
ajcraig requested review from ajcraig and removed request for ajcraig August 21, 2026 15:03
Signed-off-by: Matthias Lechner <matlec.public@gmail.com>
@matlec

matlec commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

@matlec, for some reason, this PR is showing that you haven't signed off on it. Also, there is a merge conflict. Once these things are addressed we can merge it in.

@phil-abb we can ignore the bot comment, I resolved this by force-pushing earlier. I merged pre-draft, ready to merge

@matlec
matlec merged commit b3747c4 into pre-draft Aug 24, 2026
13 checks passed
@matlec
matlec deleted the fix/capabilities-http-status branch August 24, 2026 12:51
matlec added a commit that referenced this pull request Aug 24, 2026
Adopt pre-draft's kind/apiVersion removal from API routes and payloads
(#189), the corrected success status codes (#196), the OCI compose
packaging (#200), and the typo fixes. Conflict resolutions:

- deployment-status.md: took pre-draft's 200/201 split for update vs
  create, kept our mTLS-era 400/403 descriptions and no 401 row.
- device-capabilities.md: took pre-draft's PUT-only route shape and
  200/201 split, kept our clientId-free paths (caller identity comes
  from the authenticated SPIFFE ID) and our 400/403/404 descriptions,
  updated the gateway examples to PUT accordingly.
- device-client-onboarding.md: kept our deletion; pre-draft's edits
  only touch the legacy onboarding API that MIAF replaces.
- workload-management-api: kept our paths without clientId and without
  the onboarding endpoints, dropped our POST operation in favor of
  pre-draft's PUT-only capabilities endpoint.

Doc generation, example validation, and mkdocs build introduce no new
warnings against the pre-merge tip.

Signed-off-by: Matthias Lechner <matlec.public@gmail.com>
vireshnavalli pushed a commit that referenced this pull request Aug 26, 2026
…196)

This resolves #195.

Signed-off-by: Matthias Lechner <matlec.public@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants