Skip to content

Document qitem endpoint in openapi.yaml for editing quarantine mails#7047

Open
jonprocter wants to merge 1 commit intomailcow:stagingfrom
jonprocter:staging
Open

Document qitem endpoint in openapi.yaml for editing quarantine mails#7047
jonprocter wants to merge 1 commit intomailcow:stagingfrom
jonprocter:staging

Conversation

@jonprocter
Copy link

Added endpoint to edit quarantine items with actions to release or learn as ham. Functionality already existed but was undocumented.

Contribution Guidelines

What does this PR include?

Short Description

Just documented the already existing edit/qitem API endpoint. It supports release and release + learn ham, but wasn't documented in the yaml.

Affected Containers

N/A

Did you run tests?

Tested by discovering the API calls worked, and then documented.

What did you tested?

These API calls:

curl -X POST https://mail.mailcow.tld/api/v1/edit/qitem \
  -H "X-API-Key: api-key-string" \
  -H "Content-Type: application/json" \
  -d '{
    "items": [649, 650],
    "attr": {"action": "release"}
  }'
curl -X POST https://mail.mailcow.tld/api/v1/edit/qitem \
  -H "X-API-Key: api-key-string" \
  -H "Content-Type: application/json" \
  -d '{
  	"items": [700, 701], 
  	"attr": {"action": "learnham"}
  }'

What were the final results? (Awaited, got)

They worked, so added to openapi.yaml.

Added endpoint to edit quarantine items with actions to release or learn as ham. Functionality already existed but was undocumented.
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.

1 participant