Hi Max,
I assume you're trying to create a Location via the storage service API.
The framework we're currently using (TastyPie) supports several endpoints by default to create/update/delete. It looks like for both Locations & Spaces, we only allow fetching data via the API, not creating new locations [1], since only GET is allowed on the list.
If you allow POST by adding 'post' to list_allowed_methods, it would take the same format as a location returns from a GET. Eg.
curl -v -X POST -H "Authorization:ApiKey test:95141fc645ed97a95893f1f865d24687f89a27ad" -H"content-type:application/json" -d'{"description":"Posted location", "purpose": "AS", "relative_path": "tmp", "space": "/api/v2/space/0353bd69-014e-4404-9728-3b4554a26cd0/", "pipeline": ["/api/v2/pipeline/31181a63-2d48-4c11-ab83-4d16aed88f9c/"]}' localhost:8000/api/v2/location/
However, that generates an error trying to associated the pipelines, so some additional work would have to be done to allow Locations to be created from the API. We're looking at switching to Django REST Framework in the future, as it's better maintained than TastyPie, which would likely solve that particular issue.
Hope that helps,
Holly Becker
Lead Archivematica Developer
[1]
https://github.com/artefactual/archivematica-storage-service/blob/stable/0.9.x/storage_service/locations/api/resources.py#L245-L246