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

Problem: can't create default locations #37

Closed
sevein opened this issue Jul 25, 2018 · 2 comments
Closed

Problem: can't create default locations #37

sevein opened this issue Jul 25, 2018 · 2 comments
Milestone

Comments

@sevein
Copy link
Contributor

sevein commented Jul 25, 2018

I can't create a location (e.g. TS) via the API and make it the default location.

The existing endpoint is documented here: https://wiki.archivematica.org/Storage_Service_API#Create_new_location.

I want to add a new parameter default (boolean). When defined and its value is true I want the location to be created and be the default.

@sevein sevein added Status: in progress Issue that is currently being worked on. Jisc RDSS labels Jul 25, 2018
@sevein sevein added this to the 1.8.0 milestone Jul 25, 2018
@sevein sevein self-assigned this Jul 25, 2018
@sevein sevein added Status: review The issue's code has been merged and is ready for testing/review. and removed Status: in progress Issue that is currently being worked on. labels Jul 25, 2018
@sevein sevein removed their assignment Jul 30, 2018
@sevein
Copy link
Contributor Author

sevein commented Jul 30, 2018

For QA, use the examples shared in artefactual/archivematica-storage-service#367 and artefactual/archivematica-storage-service#368 in order to create locations via the API from the command line interface. The only difference would be to add the default attribute as described in this issue, e.g.:

curl -s -d '{
    "default": true,
    "pipeline": ["/api/v2/pipeline/90707555-244f-47af-8271-66496a6a965b/"],
    "purpose": "TS",
    "relative_path": "automated-workflow/foo/bar",
    "description": "automated workflow",
    "space": "/api/v2/space/141593ff-2a27-44a1-9de1-917573fa0f4a/"
}' \
    -X POST \
    -H "Authorization: ApiKey test:test" \
    -H "Content-Type: application/json" \
        "http://127.0.0.1:62081/api/v2/location/" | \
            jq -r ".resource_uri"

Then confirm that the new location is the default TS location (you can do that from the web interface).

@joel-simpson
Copy link
Member

I tested creating locations of several types (backlog, transfer source, AIP Storage). I also created the actual directories and then using those locations (e.g. to start a transfer, and to store an AIP).
I tested setting locations with default = true and default = false.
All worked as expected.

Note on documention - I updated the wiki with the new Default parameter.
https://wiki.archivematica.org/Storage_Service_API#Create_new_location
I think the SS documentation on locations could be improved (the screen shot is old and doesn't show the default column).

@joel-simpson joel-simpson added Status: verified and removed Status: review The issue's code has been merged and is ready for testing/review. labels Jul 31, 2018
@sromkey sromkey closed this as completed Nov 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants