Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API v2 note create #717

Open
8 tasks done
c8y3 opened this issue Feb 11, 2025 · 1 comment · Fixed by #718
Open
8 tasks done

API v2 note create #717

c8y3 opened this issue Feb 11, 2025 · 1 comment · Fixed by #718
Assignees
Labels
enhancement New feature or request

Comments

@c8y3
Copy link
Contributor

c8y3 commented Feb 11, 2025

Implement endpoint POST /api/v2/cases/{case_identifier}/notes to create a note.

  • return 201 in case of success
  • if the case is not found, return 404
  • if the directory does not exist, return 400
  • create method in the business layer
  • check returned object is uniform with other endpoints
  • deprecate POST /case/notes/add
  • openapi: document endpoint
  • openapi: deprecate POST /case/notes/add
@c8y3 c8y3 added the enhancement New feature or request label Feb 11, 2025
@c8y3 c8y3 self-assigned this Feb 11, 2025
@c8y3
Copy link
Contributor Author

c8y3 commented Feb 11, 2025

  • add:
        if not cases_exists(case_identifier):
            return response_api_not_found()
    
  • document 404 return, when case is not found
  • document and test field modification_history in Note
    modification_history:
      type: object
    ...
    modification_history:
      '1711563261.268616':
        user: administrator
        user_id: 1
        action: created note
    
  • if the directory belongs to another case, return 400

@c8y3 c8y3 linked a pull request Feb 12, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant