Edpub 1735 consolidate upload endpoints#328
Merged
camposeddie merged 6 commits intodevelopfrom Jan 16, 2026
Merged
Conversation
11 tasks
…b-api into EDPUB-1735-Consolidate-upload-endpoints
camposeddie
approved these changes
Jan 16, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Consolidates the 4 upload endpoints (getPostUrl, getGroupUploadUrl, getAttachmentUploadUrl, & getUploadStepUrl) to a single getURL endpoint.
Linked JIRA Task or Github Issue
JIRA Task: EDPUB-1735
Types of changes
What types of changes does your code introduce to Earthdata Pub (EDPub)?
Put an
xin the boxes that applyChecklist
Put an
xin the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.Validation Steps
This will help us get a jump start on validating your PR by describing the steps to replicate
and validate the expected behavior. (For an example of good validation instructions, check out Bryan's Bouncy Ball PR.)
Test the
/api/data/upload/form/getUrlendpoint${submissionId}/${fileCategory}/${user}/${fileName}Test the
/api/data/upload/group/getUrlendpointgroup/${groupShortName}/${prefix}/${fileName}Test the
/api/data/upload/attachment/getUrlendpointdrafts/${conversationId}/${user}/${fileName}Test the
/api/data/upload/step/getUrlendpoint${uploadDestination}/${submissionId}/${fileCategory}/${user}/${fileName}Note on local testing instead
USE_CUE_UPLOAD=falseas an environment variable (CUE upload setting doesn't work locally)/api/data/upload/{type}/getUrlendpointFurther comments
The goal of this ticket was code de-duplication. My initial hope was to get all the backend code into a single function. In practice that seemed less maintainable as each type of upload has different parameters and needs to perform different permission checks. I went with a structure where we have a singe endpoint and a main function that relies on the various key generation methods (which were the heart of the previous endpoints) to do the validation and produce the required key.
I also went ahead and added some parameter validation steps that were missing from the original endpoints that were identified in the API verification work.