-
Notifications
You must be signed in to change notification settings - Fork 5
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
high-level design for legacy project imports [MARXAN-1220] #1051
Merged
hotzevzl
merged 7 commits into
develop
from
docs/MARXAN-1220_legacy-project-import_development-plan
Jun 28, 2022
Merged
high-level design for legacy project imports [MARXAN-1220] #1051
hotzevzl
merged 7 commits into
develop
from
docs/MARXAN-1220_legacy-project-import_development-plan
Jun 28, 2022
Conversation
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
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
hotzevzl
commented
May 13, 2022
Comment on lines
+5
to
+47
## Workflow overview | ||
|
||
From an API consumer point of view, importing a legacy project is performed | ||
through three main steps and related endpoints. | ||
|
||
### Preparation of project import process | ||
|
||
`POST /api/v1/projects/import/legacy` | ||
|
||
This step will prepare an empty project shell, as well as an empty scenario | ||
shell, both of which will be populated later in the import process, unless | ||
errors are raised while validating user-uploaded data. | ||
|
||
The `projectId` of the project being created will be returned, so that the next | ||
steps can reference the project. | ||
|
||
### Data upload | ||
|
||
`POST /api/v1/projects/import/legacy/:projectId/data-file` | ||
|
||
API clients will need to use this endpoint to upload each of the files that | ||
users provide. | ||
|
||
Each upload will include the actual file alongside a small JSON metadata snippet | ||
through which the API is informed about which kind of file this is, alongside | ||
any other metadata needed to import it. | ||
|
||
A unique `dataFileId` is returned for each file uploaded successfully. | ||
|
||
As API clients send requests to this endpoint, the API keeps the uploaded files | ||
in a temporary storage area, from which they will be later read and processed. | ||
|
||
If a specific kind of file (for example, a planning grid shapefile) is uploaded | ||
more than once, any previously uploaded copy is discarded and replaced with the | ||
latest file uploaded. This would be sufficient if a user accidentally uploads | ||
the wrong file. | ||
|
||
In case an uploaded file needs to be fully removed from the set of uploaded | ||
files (for example, if a user accidentally uploads a `puvspr.dat` file _as if it | ||
was_ an `output.zip` file), a `DELETE` endpoint is provided, which can be used | ||
with the `dataFileId` returned on upload: | ||
|
||
`DELETE /api/v1/projects/import/legacy/:projectId/data-file/:dataFileId` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mbarrenechea does this workflow sound ok/complete from the point of view of the app?
de8bd9c
to
d874294
Compare
d874294
to
b6f39a3
Compare
b6f39a3
to
12519f8
Compare
Backport from version to be used in UI; clarify which combinations of inputs are not supported in the Marxan Cloud platform.
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.
No description provided.