-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ResponseOps] [Cases] Attach file to case API (#198377)
Fixes #22832 ## Summary This PR adds the possibility of adding Files/Attachments to Case in Kibana via an API call. ### How to test The new API URL is `https://localhost:5601/api/cases/<CASE_ID>/files`. You can either use postman or curl to test. 1. Start by creating a case. 2. Call the new API ``` curl --location 'https://localhost:5601/api/cases/<CASE_ID>/files' \ --header 'kbn-xsrf: true' \ --header 'Authorization: Basic ZWxhc3RpYzpjaGFuZ2VtZQ==' \ --form 'filename="Notice"' \ --form 'mimeType="text/plain"' \ --form 'file=@"<FULL_PATH_TO_THE_FILE_YOU_WANT_TO_UPLOAD>"' ``` <img width="1090" alt="Screenshot 2024-10-30 at 15 41 26" src="https://github.com/user-attachments/assets/b018f92d-2603-4bf1-ac12-f01452f35303"> 3. Confirm the user action was created. <img width="383" alt="Screenshot 2024-10-30 at 15 48 45" src="https://github.com/user-attachments/assets/04952b8f-e8fb-4f19-a72f-54030f496fe9"> 4. Confirm the file exists in the case and: - it can be downloaded as expected. - it can be previewed as expected(not every MIME type allows this). ### Release Notes Files can now be attached to cases directly via API. --------- Co-authored-by: kibanamachine <[email protected]> Co-authored-by: lcawl <[email protected]>
- Loading branch information
1 parent
20953fc
commit e2702ff
Showing
29 changed files
with
1,254 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.