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

Feature: Add endpoint to trigger publish_targets in the Rest API #242

Closed
1 task done
kairoaraujo opened this issue Jan 28, 2023 · 0 comments · Fixed by #250
Closed
1 task done

Feature: Add endpoint to trigger publish_targets in the Rest API #242

kairoaraujo opened this issue Jan 28, 2023 · 0 comments · Fixed by #250
Assignees

Comments

@kairoaraujo
Copy link
Member

What do you want to share with us?

Add to Rest API an endpoint to trigger publish_targets.

Implementation suggestion

  • Add /api/v1/targets/publish with the method POST
  • It will send to broker a task with the action publish_targets and return ACCEPTED and the task id (follows the same task request for add targets

References

Code of Conduct

  • I agree to follow this project's Code of Conduct
@kairoaraujo kairoaraujo self-assigned this Feb 1, 2023
kairoaraujo pushed a commit to kairoaraujo/repository-service-tuf-api that referenced this issue Feb 1, 2023
It will send to broker a task with the action `publish_targets` and
return HTTP 202 and the task id (follows the same task request for
add targets).

Closes repository-service-tuf#242

Signed-off-by: Kairo de Araujo <kdearaujo@vmware.com>
MVrachev pushed a commit that referenced this issue Feb 6, 2023
* add API endpoint `/api/v1/targets/publish`

It will send to broker a task with the action `publish_targets` and
return HTTP 202 and the task id (follows the same task request for
add targets).

Closes #242

Signed-off-by: Kairo de Araujo <kdearaujo@vmware.com>

* revert `ReponseData` change for `targets`

`ResponseData.targets` doesn't need to be optional.

Signed-off-by: Kairo de Araujo <kdearaujo@vmware.com>

* Simplify the `apply_async` mock.

No need arguments in the lambda, it passes only kwargs.

Signed-off-by: Kairo de Araujo <kdearaujo@vmware.com>

* update documentation with `make docs`

- `swagger.json` updated.

Signed-off-by: Kairo de Araujo <kdearaujo@vmware.com>

---------

Signed-off-by: Kairo de Araujo <kdearaujo@vmware.com>
kairoaraujo added a commit that referenced this issue Mar 2, 2023
* add API endpoint `/api/v1/targets/publish`

It will send to broker a task with the action `publish_targets` and
return HTTP 202 and the task id (follows the same task request for
add targets).

Closes #242

Signed-off-by: Kairo de Araujo <kdearaujo@vmware.com>

* revert `ReponseData` change for `targets`

`ResponseData.targets` doesn't need to be optional.

Signed-off-by: Kairo de Araujo <kdearaujo@vmware.com>

* Simplify the `apply_async` mock.

No need arguments in the lambda, it passes only kwargs.

Signed-off-by: Kairo de Araujo <kdearaujo@vmware.com>

* update documentation with `make docs`

- `swagger.json` updated.

Signed-off-by: Kairo de Araujo <kdearaujo@vmware.com>

---------

Signed-off-by: Kairo de Araujo <kdearaujo@vmware.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 a pull request may close this issue.

1 participant