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

First stab at creating admin endpoints in the API #955

Merged
merged 16 commits into from
Aug 2, 2024
Merged

Conversation

jbygdell
Copy link
Collaborator

@jbygdell jbygdell commented Jul 24, 2024

Background
For standalone setups, like the one used in GDI, there are a need to be able to take care of the administrative tasks without the need to have direct access to the MQ or the PostgreSQL database.

This PR begins the process of simplifying these administrative tasks.
The first goal is to be able to handle the ingestion process i.e. trigger the ingestion of a file, assign a stable ID to the file and in the end create a dataset from a set of stable IDs.

Description
First take on the admin API

  • Restricts endpoints to a set of whitelisted users
  • Triggers ingestion of a file
  • Assign accession ID to a file
  • Create a dataset from a set of accession IDs
  • Release the dataset

How to test

@jbygdell jbygdell added enhancement New feature or request go Pull requests that update Go code labels Jul 24, 2024
@jbygdell jbygdell requested a review from a team July 24, 2024 07:05
@jbygdell jbygdell self-assigned this Jul 24, 2024
@jbygdell jbygdell force-pushed the feature/admin-api-1 branch from 216e141 to 926abb6 Compare July 24, 2024 07:42
@jbygdell jbygdell mentioned this pull request Jul 24, 2024
@jbygdell jbygdell force-pushed the feature/admin-api-1 branch from 926abb6 to 59bf42a Compare July 29, 2024 08:29
@jbygdell jbygdell force-pushed the feature/admin-api-1 branch from 59bf42a to 5b9b7e7 Compare July 29, 2024 08:43
Copy link
Contributor

@MalinAhlberg MalinAhlberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Also very nice tests added 👌 .
I left some minor comments, I'm ready to approve when the comments in api_test.go have been fixed.

sda/cmd/api/api.md Show resolved Hide resolved
sda/cmd/api/api_test.go Outdated Show resolved Hide resolved
sda/cmd/api/api_test.go Outdated Show resolved Hide resolved
@jbygdell jbygdell requested review from a team and MalinAhlberg July 30, 2024 06:35
@jbygdell jbygdell requested a review from a team July 30, 2024 09:49
Copy link
Contributor

@aaperis aaperis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks really good :-)

@jbygdell jbygdell added this pull request to the merge queue Aug 2, 2024
Merged via the queue into main with commit f533e4c Aug 2, 2024
24 checks passed
@jbygdell jbygdell deleted the feature/admin-api-1 branch August 2, 2024 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request go Pull requests that update Go code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants