Closed mb-wali closed 3 years ago
Implement a Generator (AuthenticatedUser), which will be used to create records - can_create
can_create
Access Token
curl -k -XPOST -H "Authorization: Bearer <your token>" -H "Content-Type: application/json" https://127.0.0.1:5000/api/records -d '{ "access": { "access_right": "open", "files": false, "owned_by": [1], "metadata": false, "embargo_date": "2021-02-15" }, "metadata": { "creators": [ { "name": "Marcus Junius Brutus", "type": "personal", "given_name": "Marcus", "family_name": "Brutus", "identifiers": { "orcid": "0000-0002-1825-0097" }, "affiliations": [ { "name": "Entity One", "identifiers": { "ror": "02ex6cf31" } } ] } ], "description": "A story about how permissions work.", "rights": [ { "rights": "Berkeley Software Distribution 3", "uri": "https://opensource.org/licenses/BSD-3-Clause", "identifier": "BSD-3", "scheme": "BSD-3" } ], "publication_date": "2020-08-31", "resource_type": { "type": "image", "subtype": "image-photo" }, "title": "A permission story", "version": "v0.0.1" } }'
curl -k -XPOST -H "Authorization: Bearer <your token>" -H "Content-Type: application/json" https://127.0.0.1:5000/api/records/47887-4d639/draft/actions/publish
AuthenticatedUser Generator
AIM
Implement a Generator (AuthenticatedUser), which will be used to create records -
can_create
Create a new record with
Access Token
Publish the record