-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.json
1 lines (1 loc) · 20 KB
/
schema.json
1
{"swagger": "2.0", "info": {"title": "Aurora API", "description": "API for Aurora", "contact": {"email": "archive@rockarch.org"}, "license": {"name": "MIT License"}, "version": "v1"}, "host": "web:8000", "schemes": ["http"], "basePath": "/api", "consumes": ["application/json"], "produces": ["application/json"], "securityDefinitions": {"Basic": {"type": "basic"}}, "security": [{"Basic": []}], "paths": {"/accessions/": {"get": {"operationId": "accessions_list", "description": "Endpoint for Accessions", "parameters": [{"name": "page", "in": "query", "description": "A page number within the paginated result set.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri"}, "previous": {"type": "string", "format": "uri"}, "results": {"type": "array", "items": {"$ref": "#/definitions/AccessionList"}}}}}}, "tags": ["accessions"]}, "parameters": []}, "/accessions/{id}/": {"get": {"operationId": "accessions_read", "description": "Endpoint for Accessions", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Accession"}}}, "tags": ["accessions"]}, "put": {"operationId": "accessions_update", "description": "Endpoint for Accessions", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/Accession"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Accession"}}}, "tags": ["accessions"]}, "patch": {"operationId": "accessions_partial_update", "description": "Endpoint for Accessions", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/Accession"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Accession"}}}, "tags": ["accessions"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/bagit_profiles/": {"get": {"operationId": "bagit_profiles_list", "description": "Endpoint for BagIt profiles", "parameters": [{"name": "page", "in": "query", "description": "A page number within the paginated result set.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri"}, "previous": {"type": "string", "format": "uri"}, "results": {"type": "array", "items": {"$ref": "#/definitions/BagItProfileList"}}}}}}, "tags": ["bagit_profiles"]}, "parameters": []}, "/bagit_profiles/{id}/": {"get": {"operationId": "bagit_profiles_read", "description": "Endpoint for BagIt profiles", "parameters": [], "responses": {"200": {"description": "", "schema": {"type": "string"}}}, "tags": ["bagit_profiles"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this bag it profile.", "required": true, "type": "integer"}]}, "/events/": {"get": {"operationId": "events_list", "description": "Endpoint for events", "parameters": [{"name": "page", "in": "query", "description": "A page number within the paginated result set.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri"}, "previous": {"type": "string", "format": "uri"}, "results": {"type": "array", "items": {"$ref": "#/definitions/BAGLog"}}}}}}, "tags": ["events"]}, "parameters": []}, "/events/{id}/": {"get": {"operationId": "events_read", "description": "Endpoint for events", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/BAGLog"}}}, "tags": ["events"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/get-token/": {"post": {"operationId": "get-token_create", "summary": "API View that receives a POST with a user's username and password.", "description": "Returns a JSON Web Token that can be used for authenticated requests.", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/JSONWebToken"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/JSONWebToken"}}}, "tags": ["get-token"]}, "parameters": []}, "/orgs/": {"get": {"operationId": "orgs_list", "description": "Endpoint for organizations", "parameters": [{"name": "page", "in": "query", "description": "A page number within the paginated result set.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri"}, "previous": {"type": "string", "format": "uri"}, "results": {"type": "array", "items": {"$ref": "#/definitions/Organization"}}}}}}, "tags": ["orgs"]}, "parameters": []}, "/orgs/{id}/": {"get": {"operationId": "orgs_read", "description": "Endpoint for organizations", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Organization"}}}, "tags": ["orgs"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/orgs/{id}/bagit_profiles/": {"get": {"operationId": "orgs_bagit_profiles", "description": "Endpoint for organizations", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Organization"}}}, "tags": ["orgs"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/orgs/{id}/bagit_profiles/{number}/": {"get": {"operationId": "orgs_bagit_profiles_detail", "description": "Endpoint for organizations", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Organization"}}}, "tags": ["orgs"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}, {"name": "number", "in": "path", "required": true, "type": "string"}]}, "/orgs/{id}/rights_statements/": {"get": {"operationId": "orgs_rights_statements", "description": "Endpoint for organizations", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Organization"}}}, "tags": ["orgs"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/transfers/": {"get": {"operationId": "transfers_list", "description": "Endpoint for transfers", "parameters": [{"name": "page", "in": "query", "description": "A page number within the paginated result set.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri"}, "previous": {"type": "string", "format": "uri"}, "results": {"type": "array", "items": {"$ref": "#/definitions/ArchivesList"}}}}}}, "tags": ["transfers"]}, "parameters": []}, "/transfers/{id}/": {"get": {"operationId": "transfers_read", "description": "Endpoint for transfers", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Archives"}}}, "tags": ["transfers"]}, "put": {"operationId": "transfers_update", "description": "Endpoint for transfers", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/Archives"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Archives"}}}, "tags": ["transfers"]}, "patch": {"operationId": "transfers_partial_update", "description": "Endpoint for transfers", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/Archives"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Archives"}}}, "tags": ["transfers"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/users/": {"get": {"operationId": "users_list", "description": "", "parameters": [{"name": "page", "in": "query", "description": "A page number within the paginated result set.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri"}, "previous": {"type": "string", "format": "uri"}, "results": {"type": "array", "items": {"$ref": "#/definitions/User"}}}}}}, "tags": ["users"]}, "parameters": []}, "/users/current/": {"get": {"operationId": "users_current", "description": "", "parameters": [{"name": "page", "in": "query", "description": "A page number within the paginated result set.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri"}, "previous": {"type": "string", "format": "uri"}, "results": {"type": "array", "items": {"$ref": "#/definitions/User"}}}}}}, "tags": ["users"]}, "parameters": []}, "/users/{id}/": {"get": {"operationId": "users_read", "description": "", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/User"}}}, "tags": ["users"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}}, "definitions": {"AccessionList": {"required": ["title"], "type": "object", "properties": {"url": {"title": "Url", "type": "string", "format": "uri", "readOnly": true}, "title": {"title": "Title", "type": "string", "maxLength": 256, "minLength": 1}, "accession_number": {"title": "Accession number", "type": "string", "maxLength": 10, "x-nullable": true}, "created": {"title": "Created", "type": "string", "format": "date-time", "readOnly": true}, "last_modified": {"title": "Last modified", "type": "string", "format": "date-time", "readOnly": true}}}, "RecordCreators": {"required": ["name", "type"], "type": "object", "properties": {"name": {"title": "Name", "type": "string", "maxLength": 100, "minLength": 1}, "type": {"title": "Type", "type": "string", "enum": ["family", "organization", "person"]}}}, "ArchivesList": {"type": "object", "properties": {"url": {"title": "Url", "type": "string", "format": "uri", "readOnly": true}, "identifier": {"title": "Identifier", "type": "string", "readOnly": true}, "created_time": {"title": "Created time", "type": "string", "format": "date-time", "readOnly": true}, "modified_time": {"title": "Modified time", "type": "string", "format": "date-time", "readOnly": true}}}, "RightsStatementRightsGranted": {"required": ["act", "restriction"], "type": "object", "properties": {"act": {"title": "Act", "type": "string", "enum": ["publish", "disseminate", "replicate", "migrate", "modify", "use", "delete"]}, "start_date": {"title": "Start date", "type": "string", "format": "date", "x-nullable": true}, "end_date": {"title": "End date", "type": "string", "readOnly": true}, "note": {"title": "Note", "type": "string", "readOnly": true}, "restriction": {"title": "Restriction", "type": "string", "enum": ["allow", "disallow", "conditional"]}}}, "RightsStatement": {"required": ["rights_granted"], "type": "object", "properties": {"rights_basis": {"title": "Rights basis", "type": "string", "readOnly": true}, "determination_date": {"title": "Determination date", "type": "string", "readOnly": true}, "jurisdiction": {"title": "Jurisdiction", "type": "string", "readOnly": true}, "start_date": {"title": "Start date", "type": "string", "readOnly": true}, "end_date": {"title": "End date", "type": "string", "readOnly": true}, "note": {"title": "Note", "type": "string", "readOnly": true}, "status": {"title": "Status", "type": "string", "readOnly": true}, "terms": {"title": "Terms", "type": "string", "readOnly": true}, "citation": {"title": "Citation", "type": "string", "readOnly": true}, "other_rights_basis": {"title": "Other rights basis", "type": "string", "readOnly": true}, "rights_granted": {"type": "array", "items": {"$ref": "#/definitions/RightsStatementRightsGranted"}}}}, "Accession": {"required": ["creators", "transfers", "rights_statements", "title", "start_date", "end_date", "extent_files", "extent_size", "description", "access_restrictions", "use_restrictions", "resource", "acquisition_type"], "type": "object", "properties": {"url": {"title": "Url", "type": "string", "format": "uri", "readOnly": true}, "creators": {"type": "array", "items": {"$ref": "#/definitions/RecordCreators"}}, "transfers": {"type": "array", "items": {"$ref": "#/definitions/ArchivesList"}}, "organization": {"title": "Organization", "type": "string", "readOnly": true}, "rights_statements": {"type": "array", "items": {"$ref": "#/definitions/RightsStatement"}}, "language": {"title": "Language", "type": "string", "readOnly": true}, "title": {"title": "Title", "type": "string", "maxLength": 256, "minLength": 1}, "accession_number": {"title": "Accession number", "type": "string", "maxLength": 10, "x-nullable": true}, "accession_date": {"title": "Accession date", "type": "string", "format": "date-time", "readOnly": true}, "start_date": {"title": "Start date", "type": "string", "format": "date-time"}, "end_date": {"title": "End date", "type": "string", "format": "date-time"}, "extent_files": {"title": "Extent files", "type": "integer", "maximum": 4294967295, "minimum": 0}, "extent_size": {"title": "Extent size", "type": "integer", "maximum": 4294967295, "minimum": 0}, "description": {"title": "Description", "type": "string", "minLength": 1}, "access_restrictions": {"title": "Access restrictions", "type": "string", "minLength": 1}, "use_restrictions": {"title": "Use restrictions", "type": "string", "minLength": 1}, "resource": {"title": "Resource", "type": "string", "maxLength": 255, "minLength": 1}, "acquisition_type": {"title": "Acquisition type", "type": "string", "maxLength": 200, "minLength": 1}, "appraisal_note": {"title": "Appraisal note", "type": "string", "x-nullable": true}, "created": {"title": "Created", "type": "string", "format": "date-time", "readOnly": true}, "last_modified": {"title": "Last modified", "type": "string", "format": "date-time", "readOnly": true}, "process_status": {"title": "Process status", "type": "integer", "enum": [10, 20], "x-nullable": true}}}, "BagItProfileList": {"required": ["applies_to_organization"], "type": "object", "properties": {"url": {"title": "Url", "type": "string", "format": "uri", "readOnly": true}, "external_description": {"title": "External description", "type": "string"}, "version": {"title": "Version", "type": "string", "format": "decimal"}, "applies_to_organization": {"title": "Applies to organization", "type": "string", "format": "uri"}}}, "BAGLogResult": {"title": "Result", "type": "object", "properties": {"name": {"title": "Name", "type": "string", "readOnly": true}}}, "BAGLog": {"required": ["summary", "result"], "type": "object", "properties": {"url": {"title": "Url", "type": "string", "format": "uri", "readOnly": true}, "type": {"title": "Type", "type": "string", "readOnly": true}, "summary": {"title": "Summary", "type": "string", "minLength": 1}, "object": {"title": "Object", "type": "string", "format": "uri", "readOnly": true}, "result": {"$ref": "#/definitions/BAGLogResult"}, "endTime": {"title": "Endtime", "type": "string", "readOnly": true}}}, "JSONWebToken": {"required": ["username", "password"], "type": "object", "properties": {"username": {"title": "Username", "type": "string", "minLength": 1}, "password": {"title": "Password", "type": "string", "minLength": 1}}}, "Organization": {"required": ["name"], "type": "object", "properties": {"url": {"title": "Url", "type": "string", "format": "uri", "readOnly": true}, "id": {"title": "ID", "type": "integer", "readOnly": true}, "is_active": {"title": "Is active", "type": "boolean"}, "name": {"title": "Name", "type": "string", "maxLength": 60, "minLength": 1}, "machine_name": {"title": "Machine name", "type": "string", "maxLength": 30, "minLength": 1}, "acquisition_type": {"title": "Acquisition type", "type": "string", "enum": ["donation", "deposit", "transfer"], "x-nullable": true}, "bagit_profiles": {"title": "Bagit profiles", "type": "string", "format": "uri", "readOnly": true}, "rights_statements": {"title": "Rights statements", "type": "string", "format": "uri", "readOnly": true}}}, "BagInfoMetadata": {"title": "Metadata", "required": ["title", "record_creators", "internal_sender_description", "date_start", "date_end", "record_type", "bag_count", "bag_group_identifier", "payload_oxum", "bagit_profile_identifier", "bagging_date"], "type": "object", "properties": {"source_organization": {"title": "Source organization", "type": "string", "readOnly": true}, "title": {"title": "Title", "type": "string", "maxLength": 256, "minLength": 1}, "record_creators": {"type": "array", "items": {"$ref": "#/definitions/RecordCreators"}}, "internal_sender_description": {"title": "Internal sender description", "type": "string", "minLength": 1}, "date_start": {"title": "Date start", "type": "string", "format": "date-time"}, "date_end": {"title": "Date end", "type": "string", "format": "date-time"}, "record_type": {"title": "Record type", "type": "string", "maxLength": 256, "minLength": 1}, "language": {"type": "array", "items": {"type": "string"}, "readOnly": true, "uniqueItems": true}, "bag_count": {"title": "Bag count", "type": "string", "maxLength": 10, "minLength": 1}, "bag_group_identifier": {"title": "Bag group identifier", "type": "string", "maxLength": 256, "minLength": 1}, "payload_oxum": {"title": "Payload oxum", "type": "string", "maxLength": 20, "minLength": 1}, "bagit_profile_identifier": {"title": "Bagit profile identifier", "type": "string", "format": "uri", "maxLength": 200, "minLength": 1}, "bagging_date": {"title": "Bagging date", "type": "string", "format": "date-time"}}}, "Archives": {"required": ["organization", "bag_it_name"], "type": "object", "properties": {"url": {"title": "Url", "type": "string", "format": "uri", "readOnly": true}, "identifier": {"title": "Identifier", "type": "string", "readOnly": true}, "organization": {"title": "Organization", "type": "string", "format": "uri"}, "bag_it_name": {"title": "Bag it name", "type": "string", "maxLength": 60, "minLength": 1}, "process_status": {"title": "Process status", "type": "integer", "enum": [10, 20, 30, 40, 60, 70, 80, 85, 90]}, "file_size": {"title": "File size", "type": "string", "readOnly": true}, "file_type": {"title": "File type", "type": "string", "readOnly": true}, "appraisal_note": {"title": "Appraisal note", "type": "string", "x-nullable": true}, "additional_error_info": {"title": "Additional error info", "type": "string", "maxLength": 255, "x-nullable": true}, "metadata": {"$ref": "#/definitions/BagInfoMetadata"}, "rights_statements": {"type": "array", "items": {"$ref": "#/definitions/RightsStatement"}, "readOnly": true}, "events": {"type": "array", "items": {"$ref": "#/definitions/BAGLog"}, "readOnly": true}, "archivesspace_identifier": {"title": "Archivesspace identifier", "type": "string", "maxLength": 255, "x-nullable": true}, "archivesspace_parent_identifier": {"title": "Archivesspace parent identifier", "type": "string", "maxLength": 255, "x-nullable": true}, "created_time": {"title": "Created time", "type": "string", "format": "date-time", "readOnly": true}, "modified_time": {"title": "Modified time", "type": "string", "format": "date-time", "readOnly": true}}}, "User": {"required": ["username", "email"], "type": "object", "properties": {"url": {"title": "Url", "type": "string", "format": "uri", "readOnly": true}, "username": {"title": "Username", "description": "Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.", "type": "string", "pattern": "^[\\w.@+-]+$", "maxLength": 150, "minLength": 1}, "email": {"title": "Email address", "type": "string", "format": "email", "maxLength": 254, "minLength": 1}, "is_staff": {"title": "Staff status", "description": "Designates whether the user can log into this admin site.", "type": "boolean"}, "is_active": {"title": "Active", "description": "Designates whether this user should be treated as active. Unselect this instead of deleting accounts.", "type": "boolean"}, "date_joined": {"title": "Date joined", "type": "string", "format": "date-time"}, "organization": {"title": "Organization", "type": "string", "format": "uri", "x-nullable": true}}}}}