├── .github ├── ISSUE_TEMPLATE │ └── request-contract-modifications.md ├── disabled-workflows │ └── pull_request_opened.yml └── workflows │ ├── issue_opened.yml │ ├── label_merge_conflicts.yml │ ├── port_merged_pull_request.yml │ └── pull_request_opened.yml ├── .gitignore ├── README.md ├── actuator.md ├── authentication.md ├── authorizations.md ├── bitstreamformats.md ├── bitstreams.md ├── browses.md ├── bulkaccessconditionoptions.md ├── bundles.md ├── captcha.md ├── claimedtasks.md ├── collections.md ├── communities.md ├── configuration.md ├── contentreport-filteredcollections.md ├── contentreport-filtereditems.md ├── correctiontypes.md ├── csrf-tokens.md ├── duplicates.md ├── endpoints.md ├── entitytypes.md ├── epersongroups.md ├── epersonregistrations.md ├── epersons.md ├── external-authority-sources.md ├── features.md ├── feedbacks.md ├── harvestermetadata.md ├── identifiers.md ├── item-requests.md ├── itemfilters.md ├── items.md ├── itemtemplates.md ├── ldnmessages.md ├── ldnservices.md ├── metadata-patch.md ├── metadata-suggestions.md ├── metadatafields.md ├── metadataschemas.md ├── orcidhistories.md ├── orcidqueues.md ├── patch.md ├── pooltasks.md ├── processes-endpoint.md ├── profiles.md ├── projections.md ├── qualityassuranceevents.md ├── qualityassurancesources.md ├── qualityassurancetopics.md ├── relationships.md ├── relationshiptypes.md ├── resourcepolicies.md ├── scripts-endpoint.md ├── scripts ├── bulk-access-control.md ├── curate.md ├── export.md ├── filter-media.md ├── harvest.md ├── import.md ├── index-discovery.md ├── index.md ├── metadata-deletion.md ├── metadata-export-search.md ├── metadata-export.md ├── metadata-import.md ├── orcid-bulk-push.md ├── process-cleaner.md ├── retry-tracker.md ├── solr-database-resync.md └── subscription-send.md ├── search-endpoint.md ├── search-rels.md ├── signposting.md ├── statistics-reports.md ├── statistics-viewevents.md ├── submission.md ├── submissionaccessoptions.md ├── submissioncclicenses.md ├── submissioncoarnotifyconfigs.md ├── submissiondefinitions.md ├── submissionforms.md ├── submissionsection-types.md ├── submissionsections.md ├── submissionuploads.md ├── subscriptions.md ├── suggestions.md ├── suggestionsources.md ├── suggestiontargets.md ├── supervisionorders.md ├── systemwidealerts.md ├── versionhistories.md ├── versions.md ├── vocabularies.md ├── vocabularyEntryDetails.md ├── workflowactions.md ├── workflowdefinitions.md ├── workflowitems.md ├── workflowsteps.md ├── workspaceitem-data-access.md ├── workspaceitem-data-cclicense.md ├── workspaceitem-data-coarnotify.md ├── workspaceitem-data-duplicates.md ├── workspaceitem-data-identifiers.md ├── workspaceitem-data-license.md ├── workspaceitem-data-metadata.md ├── workspaceitem-data-sherpa-policy.md ├── workspaceitem-data-upload.md └── workspaceitems.md /.github/ISSUE_TEMPLATE/request-contract-modifications.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Request Contract Modifications 3 | about: Create an issue to help us improve this contract 4 | title: '' 5 | labels: enhancement, needs triage 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Please describe your request** 11 | A clear and concise description of the modifications you are recommending. Please provide links to the current Contract where applicable, or links to the demo REST API for undocumented responses. 12 | -------------------------------------------------------------------------------- /.github/disabled-workflows/pull_request_opened.yml: -------------------------------------------------------------------------------- 1 | # This workflow runs whenever a new pull request is created 2 | # TEMPORARILY DISABLED. Unfortunately this doesn't work for PRs created from forked repositories (which is how we tend to create PRs). 3 | # There is no known workaround yet. See https://github.community/t/how-to-use-github-token-for-prs-from-forks/16818 4 | name: Pull Request opened 5 | 6 | # Only run for newly opened PRs against the "main" branch 7 | on: 8 | pull_request: 9 | types: [opened] 10 | branches: 11 | - main 12 | 13 | jobs: 14 | automation: 15 | runs-on: ubuntu-latest 16 | steps: 17 | # Assign the PR to whomever created it. This is useful for visualizing assignments on project boards 18 | # See https://github.com/marketplace/actions/pull-request-assigner 19 | - name: Assign PR to creator 20 | uses: thomaseizinger/assign-pr-creator-action@v1.0.0 21 | # Note, this authentication token is created automatically 22 | # See: https://docs.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token 23 | with: 24 | repo-token: ${{ secrets.GITHUB_TOKEN }} 25 | # Ignore errors. It is possible the PR was created by someone who cannot be assigned 26 | continue-on-error: true 27 | -------------------------------------------------------------------------------- /.github/workflows/issue_opened.yml: -------------------------------------------------------------------------------- 1 | # This workflow runs whenever a new issue is created 2 | name: Issue opened 3 | 4 | on: 5 | issues: 6 | types: [opened] 7 | 8 | permissions: {} 9 | jobs: 10 | automation: 11 | runs-on: ubuntu-latest 12 | steps: 13 | # Add the new issue to a project board, if it needs triage 14 | # See https://github.com/actions/add-to-project 15 | - name: Add issue to triage board 16 | # Only add to project board if issue is flagged as "needs triage" or has no labels 17 | # NOTE: By default we flag new issues as "needs triage" in our issue template 18 | if: (contains(github.event.issue.labels.*.name, 'needs triage') || join(github.event.issue.labels.*.name) == '') 19 | uses: actions/add-to-project@v0.5.0 20 | # Note, the authentication token below is an ORG level Secret. 21 | # It must be created/recreated manually via a personal access token with admin:org, project, public_repo permissions 22 | # See: https://docs.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token#permissions-for-the-github_token 23 | # This is necessary because the "DSpace Backlog" project is an org level project (i.e. not repo specific) 24 | with: 25 | github-token: ${{ secrets.TRIAGE_PROJECT_TOKEN }} 26 | project-url: https://github.com/orgs/DSpace/projects/24 27 | -------------------------------------------------------------------------------- /.github/workflows/label_merge_conflicts.yml: -------------------------------------------------------------------------------- 1 | # This workflow checks open PRs for merge conflicts and labels them when conflicts are found 2 | name: Check for merge conflicts 3 | 4 | # Run this for all pushes (i.e. merges) to 'main' or maintenance branches 5 | on: 6 | push: 7 | branches: 8 | - main 9 | - 'dspace-**' 10 | # So that the `conflict_label_name` is removed if conflicts are resolved, 11 | # we allow this to run for `pull_request_target` so that github secrets are available. 12 | pull_request_target: 13 | types: [ synchronize ] 14 | 15 | permissions: {} 16 | 17 | jobs: 18 | triage: 19 | # Ensure this job never runs on forked repos. It's only executed for 'DSpace/RestContract' 20 | if: github.repository == 'dspace/restcontract' 21 | runs-on: ubuntu-latest 22 | permissions: 23 | pull-requests: write 24 | steps: 25 | # See: https://github.com/prince-chrismc/label-merge-conflicts-action 26 | - name: Auto-label PRs with merge conflicts 27 | uses: prince-chrismc/label-merge-conflicts-action@v3 28 | # Ignore any failures -- may occur (randomly?) for older, outdated PRs. 29 | continue-on-error: true 30 | # Add "merge conflict" label if a merge conflict is detected. Remove it when resolved. 31 | # Note, the authentication token is created automatically 32 | # See: https://docs.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token 33 | with: 34 | conflict_label_name: 'merge conflict' 35 | github_token: ${{ secrets.GITHUB_TOKEN }} 36 | conflict_comment: | 37 | Hi @${author}, 38 | Conflicts have been detected against the base branch. 39 | Please [resolve these conflicts](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/about-merge-conflicts) as soon as you can. Thanks! -------------------------------------------------------------------------------- /.github/workflows/port_merged_pull_request.yml: -------------------------------------------------------------------------------- 1 | # This workflow will attempt to port a merged pull request to 2 | # the branch specified in a "port to" label (if exists) 3 | name: Port merged Pull Request 4 | 5 | # Only run for merged PRs against the "main" or maintenance branches 6 | # We allow this to run for `pull_request_target` so that github secrets are available 7 | # (This is required when the PR comes from a forked repo) 8 | on: 9 | pull_request_target: 10 | types: [ closed ] 11 | branches: 12 | - main 13 | - 'dspace-**' 14 | 15 | permissions: 16 | contents: write # so action can add comments 17 | pull-requests: write # so action can create pull requests 18 | 19 | jobs: 20 | port_pr: 21 | runs-on: ubuntu-latest 22 | # Don't run on closed *unmerged* pull requests 23 | if: github.event.pull_request.merged 24 | steps: 25 | # Checkout code 26 | - uses: actions/checkout@v4 27 | # Port PR to other branch (ONLY if labeled with "port to") 28 | # See https://github.com/korthout/backport-action 29 | - name: Create backport pull requests 30 | uses: korthout/backport-action@v2 31 | with: 32 | # Trigger based on a "port to [branch]" label on PR 33 | # (This label must specify the branch name to port to) 34 | label_pattern: '^port to ([^ ]+)$' 35 | # Title to add to the (newly created) port PR 36 | pull_title: '[Port ${target_branch}] ${pull_title}' 37 | # Description to add to the (newly created) port PR 38 | pull_description: 'Port of #${pull_number} by @${pull_author} to `${target_branch}`.' 39 | # Copy all labels from original PR to (newly created) port PR 40 | # NOTE: The labels matching 'label_pattern' are automatically excluded 41 | copy_labels_pattern: '.*' 42 | # Skip any merge commits in the ported PR. This means only non-merge commits are cherry-picked to the new PR 43 | merge_commits: 'skip' 44 | # Use a personal access token (PAT) to create PR as 'dspace-bot' user. 45 | # A PAT is required in order for the new PR to trigger its own actions (for CI checks) 46 | github_token: ${{ secrets.PR_PORT_TOKEN }} -------------------------------------------------------------------------------- /.github/workflows/pull_request_opened.yml: -------------------------------------------------------------------------------- 1 | # This workflow runs whenever a new pull request is created 2 | name: Pull Request opened 3 | 4 | # Only run for newly opened PRs against the "main" or maintenance branches 5 | # We allow this to run for `pull_request_target` so that github secrets are available 6 | # (This is required to assign a PR back to the creator when the PR comes from a forked repo) 7 | on: 8 | pull_request_target: 9 | types: [ opened ] 10 | branches: 11 | - main 12 | - 'dspace-**' 13 | 14 | permissions: 15 | pull-requests: write 16 | 17 | jobs: 18 | automation: 19 | runs-on: ubuntu-latest 20 | steps: 21 | # Assign the PR to whomever created it. This is useful for visualizing assignments on project boards 22 | # See https://github.com/toshimaru/auto-author-assign 23 | - name: Assign PR to creator 24 | uses: toshimaru/auto-author-assign@v2.0.1 25 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | ## Ignore project files created by Eclipse 3 | .settings/ 4 | .project 5 | .classpath 6 | -------------------------------------------------------------------------------- /actuator.md: -------------------------------------------------------------------------------- 1 | # Actuator 2 | Actuator endpoints let you monitor and interact with DSpace. By default the following endpoints are enabled: 3 | 4 | **/actuator/info**: Displays arbitrary application info. Only administrators can access this endpoint. 5 | To modify the data exposed by the info endpoint, you can add properties with info prefix to the actuator.cfg configuration file. 6 | 7 | **/actuator/health**: Shows application health information. The status is calculated based on the aggregation of the status of the configured components; only the administrator can see the detail of the components. 8 | To see the status of a single component, contact the endpoint /actuator/health/{component}. 9 | The statuses that the application can have are: 10 | * UP: the application is up and running without issues. 11 | * UP_WITH_ISSUES: the application is up and running non-blocking issues. 12 | * OUT_OF_SERVICE: the application has critical issues. 13 | * DOWN: the application has fatal issues. 14 | 15 | For more information on how to configure the previously described endpoints and how to enable others, see [here](https://docs.spring.io/spring-boot/docs/current/reference/html/actuator.html#actuator.enabling). 16 | -------------------------------------------------------------------------------- /bitstreamformats.md: -------------------------------------------------------------------------------- 1 | # Bitstream Formats Endpoints 2 | [Back to the list of all defined endpoints](endpoints.md) 3 | 4 | ## Main Endpoint 5 | **GET /api/core/bitstreamformats** 6 | 7 | Provide access to the bitstream formats defined in the registry (DBMS based). It returns the list of existent metadata fields. 8 | 9 | Example: 10 | 11 | **POST /api/core/bitstreamformats** 12 | 13 | Create a new bitstream format in the registry (DBMS based). Requires an admin account 14 | 15 | The JSON should be similar to: 16 | ```json 17 | { 18 | "shortDescription": "XML", 19 | "description": "Extensible Markup Language", 20 | "mimetype": "text/xml", 21 | "supportLevel": "KNOWN", 22 | "internal": false, 23 | "extensions": [ 24 | "xml" 25 | ], 26 | "type": "bitstreamformat" 27 | } 28 | ``` 29 | 30 | Status codes: 31 | * 201 Created - if the operation succeed 32 | * 400 Bad request - if the supportLevel is invalid. The valid values are https://github.com/DSpace/DSpace/blob/master/dspace-api/src/main/java/org/dspace/content/BitstreamFormat.java#L94 33 | * 401 Unauthorized - if you are not authenticated 34 | * 403 Forbidden - if you are not logged in with sufficient permissions 35 | 36 | ## Single Bitstream Format 37 | **GET /api/core/bitstreamformats/<:id>** 38 | 39 | Provide detailed information about a specific bitstream format. The JSON response document is as follow 40 | ```json 41 | { 42 | "id": 5, 43 | "shortDescription": "XML", 44 | "description": "Extensible Markup Language", 45 | "mimetype": "text/xml", 46 | "supportLevel": "KNOWN", 47 | "internal": false, 48 | "extensions": [ 49 | "xml" 50 | ], 51 | "type": "bitstreamformat", 52 | "_links": { 53 | "self": { 54 | "href": "https://dspace7-internal.atmire.com/rest/api/core/bitstreamformats/5" 55 | } 56 | } 57 | } 58 | ``` 59 | 60 | Exposed links: 61 | * self 62 | 63 | **PUT /api/core/bitstreamformats/<:id>** 64 | 65 | Updates a specific bitstream format. Requires an admin account. The JSON should be similar to: 66 | ```json 67 | { 68 | "id": 6, 69 | "shortDescription": "Text", 70 | "description": "Plain Text", 71 | "mimetype": "text/plain", 72 | "supportLevel": "KNOWN", 73 | "internal": false, 74 | "extensions": [ 75 | "txt", 76 | "asc" 77 | ], 78 | "type": "bitstreamformat" 79 | } 80 | 81 | ``` 82 | 83 | Status codes: 84 | * 200 Created - if the operation succeed 85 | * 400 Bad request - if the supportLevel is invalid. The valid values are https://github.com/DSpace/DSpace/blob/master/dspace-api/src/main/java/org/dspace/content/BitstreamFormat.java#L94 86 | * 401 Unauthorized - if you are not authenticated 87 | * 403 Forbidden - if you are not logged in with sufficient permissions 88 | * 404 Not found - if the bitstream format doesn't exist 89 | 90 | **DELETE /api/core/bitstreamformats/<:id>** 91 | 92 | Deletes a specific bitstream format. Requires an admin account. No JSON details are required. 93 | 94 | Status codes: 95 | * 204 No content - if the operation succeed 96 | * 401 Unauthorized - if you are not authenticated 97 | * 403 Forbidden - if you are not logged in with sufficient permissions 98 | * 404 Not found - if the bitstream format doesn't exist (or was already deleted) 99 | -------------------------------------------------------------------------------- /bulkaccessconditionoptions.md: -------------------------------------------------------------------------------- 1 | # BulkAccessConditionOptions Endpoints 2 | [Back to the list of all defined endpoints](endpoints.md) 3 | 4 | ## Main Endpoint 5 | **/api/config/bulkaccessconditionoptions** 6 | 7 | Provide access to the existent configurations for the bulk access control management. It returns the list of existent BulkAccessConfig. 8 | The BulkAccessConfig aggregates in a single place the configuration needed to the access section of the bulk access control management at the item and bitstream level. 9 | 10 | Please note that currently only a single repository wide configuration is supported and it is configured in the backend `/config/spring/api/access-conditions.xml` file, so this endpoint will list a single configuration. 11 | 12 | Status codes: 13 | * 200 OK - if the operation succeed 14 | * 401 Unauthorized - if you are not authenticated 15 | * 403 Forbidden - if you are not logged in with sufficient permissions. This endpoint is only accessible ot user that has administrative priviled over at least one community, collection or item limited to the resources that they admin. 16 | 17 | ## Single bulkaccessconditionoptions-Form 18 | **/api/config/bulkaccessconditionoptions/<:config-name>** 19 | 20 | *:config-name* the bulk access control management configuration name to retrieve 21 | 22 | Please note that currently only a single repository wide configuration is supported and it is named `default` 23 | 24 | Provide detailed information about a specific input-form. The JSON response document is as follows: 25 | ```json 26 | { 27 | "id": "default", 28 | "itemAccessConditionOptions": [ 29 | { 30 | "name": "openaccess" 31 | }, 32 | { 33 | "name": "administrator" 34 | }, 35 | { 36 | "name": "embargo", 37 | "hasStartDate": true, 38 | "maxStartDate": "2018-06-24T00:40:54.970+0000" 39 | }, 40 | { 41 | "name": "lease", 42 | "hasEndDate": true, 43 | "maxEndDate": "2017-12-24T00:40:54.970+0000" 44 | } 45 | ], 46 | "bitstreamAccessConditionOptions": [ 47 | { 48 | "name": "openaccess" 49 | }, 50 | { 51 | "name": "administrator" 52 | }, 53 | { 54 | "name": "embargo", 55 | "hasStartDate": true, 56 | "maxStartDate": "2018-06-24T00:40:54.970+0000" 57 | }, 58 | { 59 | "name": "lease", 60 | "hasEndDate": true, 61 | "maxEndDate": "2017-12-24T00:40:54.970+0000" 62 | } 63 | ] 64 | } 65 | ``` 66 | 67 | The attributes of the objects in the **itemAccessConditionOptions** and **bitstreamAccessConditionOptions** arrays are as follow: 68 | * The *name* attribute is an identifier that can be used by the REST client (the UI) to present the different options to the user, maybe translating it in an human readable format using i18n, and by the backend to create the ResourcePolicy to apply to the accessed item using and validating the additional inputs provided by the user where required. 69 | * If there is a *hasStartDate* attribute and it is true, the access condition to be applied requires to specify a startDate that must be less or equal than the value of the *maxStartDate* attribute (if null any date is acceptable) 70 | * If there is a *hasEndDate* attribute and it is true, the access condition to be applied requires to specify an endDate that must be less or equal than the value of the *maxEndDate* attribute (if null any date is acceptable). If a startDate is supplied the endDate must be greater than the startDate 71 | 72 | Obviously, **itemAccessConditionOptions** provides the list of options acceptable at the item level whereas **bitstreamAccessConditionOptions** provides the list of options suitable at the bitstream level 73 | 74 | Status codes: 75 | * 200 OK - if the operation succeed 76 | * 401 Unauthorized - if you are not authenticated 77 | * 403 Forbidden - if you are not logged in with sufficient permissions. This endpoint is only accessible ot user that has administrative priviled over at least one community, collection or item limited to the resources that they admin. 78 | * 404 Not Found - if you request any configuration other than `default` 79 | -------------------------------------------------------------------------------- /captcha.md: -------------------------------------------------------------------------------- 1 | # Captcha Endpoints 2 | [Back to the list of all defined endpoints](endpoints.md) 3 | 4 | ## Main Endpoint 5 | **/api/captcha** 6 | 7 | Not allowed. At this time, only the `challenge` endpoint is available. 8 | 9 | ## Retrieve a challenge from the (ALTCHA) captcha service 10 | **/api/captcha/challenge** 11 | 12 | If the captcha provider is enabled and configured to be 'altcha', this endpoint will return a challenge for the browser to complete as proof-of-work. 13 | 14 | This is not an addressable HATEOAS object, or endpoint, but rather a JSON object that is meant to be consumed and processed in the browser. 15 | 16 | The JSON body will contain the algorithm, salt, signature, and challenge. An example is below: 17 | 18 | ```json 19 | { 20 | "algorithm": "SHA-25", 21 | "salt": "dcf5eba26e", 22 | "challenge": "0d8dd34089fdd610bd9a8857ea1fa4a5f9fe4b53f5df0c4e1eff6dc987c4d2bf", 23 | "signature": "dfe4ec56f3d61e3a021b1c3b3ea4c7d6aea9812ab719ffe130fd386ce0b4158c" 24 | } 25 | ``` 26 | 27 | An example curl call: 28 | ``` 29 | curl -i https://demo.dspace.org/server/api/captcha/challenge 30 | ``` 31 | 32 | For more information about ALTCHA challenge creation, see: https://altcha.org/api/operations/createchallenge/ 33 | 34 | The final result of the work is not submitted to this endpoint, but instead included with form data submitted in the captcha-protected form, for final verification and validation. 35 | 36 | This endpoint does not relate to Google ReCaptcha, which calls 3rd party services directly from the frontend for captcha validation) 37 | 38 | Return codes: 39 | 200 OK - if the operation succeeded and the JSON body is returned 40 | 400 Bad Request - if the captcha provider is not enabled or configured to be 'altcha', or the algorithm is not supported 41 | 500 Internal Server Error - if the challenge or hmac hash cannot be calculated -------------------------------------------------------------------------------- /configuration.md: -------------------------------------------------------------------------------- 1 | # Configuration properties 2 | 3 | ## Main Endpoint 4 | **/api/config/properties** 5 | 6 | As we don't have yet an use case to iterate over all the configuration properties the main endpoint is not implemented and a 405 error code is returned according to our [general error response codes](README.md#Error codes). 7 | 8 | ## Single property 9 | **/api/config/properties/<:property>** 10 | 11 | This endpoint provides functionality to retrieve certain (configurable) configuration properties. 12 | The DSpace server will have a whitelist of properties that can be retrieved by this endpoint. 13 | 14 | 15 | ```json 16 | { 17 | "name": "google.analytics.key", 18 | "values": [ 19 | "UA-XXXXXX-X" 20 | ] 21 | } 22 | ``` 23 | 24 | * 200 OK - if the operation succeed 25 | * 404 Not found - if the property doesn't exist or isn't configured to be retrieved -------------------------------------------------------------------------------- /contentreport-filtereditems.md: -------------------------------------------------------------------------------- 1 | # Metadata query (aka Filtered Items) report 2 | [Back to the list of all defined endpoints](endpoints.md) 3 | 4 | This endpoint provides a custom query API to select items from existing collections, 5 | according to given Boolean and metadata filters. 6 | 7 | NOTE: This is currently a beta feature. 8 | 9 | 10 | **GET /api/contentreport/filtereditems** 11 | 12 | The report parameters are described [below](#report-parameterization). 13 | 14 | Additionally, a `pageNumber` parameter is available to retrieve results starting at a given page 15 | (according to `pageLimit`, the maximum number of items per page). Page numbering starts at 0. 16 | 17 | All parameters except `pageNumber` and `pageLimit` are repeatable. Multiple values can be expressed either 18 | by repeating the corresponding parameter, e.g.: 19 | ``` 20 | ?filters=is_discoverable&filters=has_multiple_originals&filters=has_pdf_original 21 | ``` 22 | 23 | of by using a comma-separated value, e.g.: 24 | 25 | ``` 26 | ?filters=is_discoverable,has_multiple_originals,has_pdf_original 27 | ``` 28 | 29 | except the `queryPredicates` parameter, which supports only parameter repetition for multiple values 30 | to avoid any ambiguities in case a predicate values contains commas. 31 | 32 | Please see [below](#report-parameterization) for parameterization details. 33 | 34 | ## Report contents 35 | 36 | An example JSON response document to `/api/contentreport/filtereditems` (metadata removed for brevity): 37 | ```json 38 | { 39 | "id": "filtereditems", 40 | "items": [ 41 | { 42 | "id": "07e388ff-f22b-4d4f-8275-acab5c3edacc", 43 | "uuid": "07e388ff-f22b-4d4f-8275-acab5c3edacc", 44 | "name": "Enhancing the lubricity of an environmentally friendly Swedish diesel fuel MK1", 45 | "handle": "20.500.11794/42", 46 | "metadata": { 47 | "dc.contributor.author": [ 48 | { 49 | "value": "Smith, John", 50 | "language": null, 51 | "authority": "6eee383a-f126-4705-9ffb-b4aa4832070e", 52 | "confidence": 600, 53 | "place": 0 54 | } 55 | ], 56 | "dc.publisher": [ 57 | { 58 | "value": "Elsevier", 59 | "language": "fr_CA", 60 | "authority": null, 61 | "confidence": -1, 62 | "place": 0 63 | } 64 | ], 65 | }, 66 | "inArchive": true, 67 | "discoverable": true, 68 | "withdrawn": false, 69 | "lastModified": "2015-11-23T17:30:21.463+00:00", 70 | "entityType": "Publication", 71 | "owningCollection": { 72 | "id": "d98a828c-45c2-43d9-9861-6b9800bf14f5", 73 | "uuid": "d98a828c-45c2-43d9-9861-6b9800bf14f5", 74 | "name": "Articles publiés dans des revues avec comité de lecture", 75 | "handle": "100/1", 76 | "metadata": { 77 | "dc.identifier.uri": [ 78 | { 79 | "value": "http://localhost:4000/handle/100/1", 80 | "language": null, 81 | "authority": null, 82 | "confidence": -1, 83 | "place": 0 84 | } 85 | ], 86 | "dspace.entity.type": [ 87 | { 88 | "value": "Publication", 89 | "language": null, 90 | "authority": null, 91 | "confidence": -1, 92 | "place": 0 93 | } 94 | ] 95 | }, 96 | "type": "collection" 97 | }, 98 | "type": "item" 99 | }, 100 | { 101 | ... 102 | } 103 | ], 104 | "itemCount": 40, 105 | "type": "filtereditemsreport", 106 | "_links": { 107 | "self": { 108 | "href": "http://localhost:8080/dspace-server/api/contentreport/filtereditems" 109 | } 110 | } 111 | } 112 | ``` 113 | 114 | ## Report parameterization 115 | 116 | The parameters are specified as follows: 117 | 118 | * `collections`: The collection UUIDs where to search items. If none are provided, the whole repository is searched. 119 | * `presetQuery`: This parameter is not used on the REST API side. It defines a predefined set of query predicates 120 | defined in the Angular layer. 121 | * `queryPredicates`: Predicates used to filter matching items. They can be predefined (see `presetQuery` above) 122 | or defined specifically by the user. As mentioned above, they are the only parameter that cannot be repeated 123 | using comma-separated values. 124 | * `pageLimit`: Maximum number of items per page. 125 | * `filters`: Supplementary filters, these are the same as those available in the Filtered Collections report. 126 | Please see [/api/contentreport/filteredcollections](contentreport-filteredcollections.md#available-filters) for details. 127 | * `additionalFields`: Fields to add to the basic report for each item included in the report. 128 | 129 | The _basic report_ mentioned above includes, for each item: 130 | 131 | * Sequential number (order of appearance in the report) 132 | * UUID 133 | * Parent collection 134 | * Handle 135 | * Title 136 | 137 | Possible response status: 138 | 139 | * 200 OK - The specific report data was found, and the data has been properly returned. 140 | * 403 Forbidden - In case of unauthorized user session. 141 | -------------------------------------------------------------------------------- /correctiontypes.md: -------------------------------------------------------------------------------- 1 | # Correction Type Endpoints 2 | [Back to the list of all defined endpoints](endpoints.md) 3 | 4 | This endpoint contains the various types of corrections that authorized DSpace Users can suggest via the Quality Assurance Framework. The DSpace Users Corrections are indeed one of the possible [Quality Assurence Source](qualityassurancesources.md). 5 | 6 | ## Main Endpoint 7 | **/api/config/correctiontypes** 8 | 9 | ```json 10 | { 11 | "_embedded": { 12 | "correctiontypes": [ 13 | { 14 | "id" : "request-withdrawn", 15 | "topic" : "WITHDRAWN", 16 | "creationForm" : "provideReason", 17 | "type" : "correctiontype", 18 | "_links" : { 19 | "self" : { 20 | "href" : "http://localhost/api/config/correctiontypes/request-withdrawn" 21 | } 22 | } 23 | }, 24 | { 25 | "id" : "request-reinstate", 26 | "topic" : "REINSTATE", 27 | "creationForm" : "provideReason", 28 | "type" : "correctiontype", 29 | "_links" : { 30 | "self" : { 31 | "href" : "http://localhost/api/config/correctiontypes/request-reinstate" 32 | } 33 | } 34 | } 35 | ] 36 | }, 37 | "_links": { 38 | "self": { 39 | "href": "https://api7.dspace.org/server/api/config/correctiontypes" 40 | } 41 | }, 42 | "page": { 43 | "size": 20, 44 | "totalElements": 2, 45 | "totalPages": 1, 46 | "number": 0 47 | } 48 | ``` 49 | List all the available correction types in the system. The correction types are defined via the spring file `config/spring/api/correction-types.xml` 50 | 51 | A sample can be found at https://demo.dspace.org/server/#/server/api/config/correctiontypes 52 | 53 | Attributes 54 | * the *id* attribute is the correction type primary key 55 | * the *topic* attribute is the id of the [quality assurance topic](qualityassurancetopics.md) that would be created from such correction type 56 | * the *creationForm* attribute is used to specify the type of inputs eventually requested to create a [quality assurance event](qualityassuranceevents.md) from this correction type. If null no input is needed. The *provideReason* sample expect a textual description to be provided to create the quality assurance event. 57 | 58 | Return codes: 59 | * 200 OK - if the operation succeed 60 | * 401 Unauthorized - if you are not authenticated 61 | 62 | ## Single Correction Type 63 | **/api/config/correctiontypes/<:id>** 64 | 65 | ```json 66 | { 67 | "id" : "request-withdrawn", 68 | "topic" : "/REQUEST/WITHDRAWN", 69 | "creationForm" : "requestWithdrawn", 70 | "type" : "correctiontype", 71 | "_links" : { 72 | "self" : { 73 | "href" : "http://localhost/api/config/correctiontypes/request-withdrawn" 74 | } 75 | } 76 | } 77 | ``` 78 | 79 | Status codes: 80 | * 200 OK - if the operation succeed 81 | * 401 Unauthorized - if you are not authenticated 82 | * 404 Not found - if no correction type exists with such id 83 | 84 | ## Search methods 85 | ### findByItem 86 | **/api/config/correctiontypes/search/findByItem?uuid=<:itemUUID>** 87 | 88 | This search method will return only the correction types that can be used by the current user on the specified item. So it would provide a subset of the correction types filtering out both correction types that make no sense for the specified item than correction types that are not allowed to the current user. 89 | Out of box a 90 | 91 | Parameters: 92 | * The `uuid` uuid of the item 93 | 94 | A sample search would be `/server/api/config/correctiontypes/search/findByItem?uuid=f1ba2a86-2f67-4e36-b572-c7956cb0fa32' 95 | 96 | Assuming that the sample `config/spring/api/correction-types.xml` data model has been loaded, it would respond with 97 | 98 | ```json 99 | { 100 | "_embedded" : { 101 | "correctiontypes" : [ 102 | { 103 | "id" : "request-withdrawn", 104 | "topic" : "/REQUEST/WITHDRAWN", 105 | "creationForm" : "requestWithdrawn", 106 | "type" : "correctiontype", 107 | "_links" : { 108 | "self" : { 109 | "href" : "http://localhost/api/config/correctiontypes/request-withdrawn" 110 | } 111 | } 112 | ] 113 | }, 114 | "_links" : { 115 | "self" : { 116 | "href" : "http://localhost/api/config/correctiontypes/search/findByItem?uuid=3825e2b4-8791-4bf6-b1ea-a56d74c5a54f" 117 | } 118 | }, 119 | "page" : { 120 | "size" : 20, 121 | "totalElements" : 1, 122 | "totalPages" : 1, 123 | "number" : 0 124 | } 125 | } 126 | ``` 127 | 128 | Return codes: 129 | * 200 OK - if the operation succeed 130 | * 400 Bad Request - if the uuid parameter is missing or is not an UUID 131 | * 401 Unauthorized - if you are not authenticated or if there are insufficient permissions on provided item 132 | * 422 Unprocessable Entity - if the Item of provided uuid not found -------------------------------------------------------------------------------- /duplicates.md: -------------------------------------------------------------------------------- 1 | # Duplicate detection endpoint 2 | [Back to the list of all defined endpoints](endpoints.md) 3 | 4 | ## Main Endpoint 5 | **/api/submission/duplicates** 6 | 7 | Provide access to basic duplicate detection services. These services use Solr and the levenshtein distance operator 8 | to detect potential duplicates of a given item, useful during submission and workflow review. 9 | 10 | See `dspace/config/modules/duplicate-detection.cfg` for configuration properties and examples. 11 | 12 | ## Single duplicate 13 | 14 | Not implemented. (a duplicate only makes sense in the context of a search by item) 15 | 16 | ## All duplicates 17 | 18 | Not implemented. (a duplicate only makes sense in the context of a search by item) 19 | 20 | ## Search 21 | 22 | **GET /api/submission/duplicates/search/findByItem?uuid=<:uuid>** 23 | 24 | Provides a list of items that may be duplicates, if this feature is enabled, given the uuid as a parameter. 25 | 26 | Note that although this appears in the submission category, the item UUID can also be an archived item. 27 | Currently, the only frontend use of this feature is in workspace and workflow, so it is categorised as such. 28 | 29 | Each potential duplicate has the following attributes: 30 | 31 | * title: The item title 32 | * uuid: The item UUID 33 | * owningCollectionName: Name of the owning collection, if present 34 | * workspaceItemId: Integer ID of the workspace item, if present 35 | * workflowItemId: Integer ID of the workflow item, if present 36 | * metadata: A list of metadata values copied from the item, as per configuration 37 | * type: The value is always DUPLICATE. This is the 'type' category used for serialization/deserialization. 38 | 39 | Example 40 | 41 | ```json 42 | { 43 | "potentialDuplicates": [ 44 | { 45 | "title": "Example Item", 46 | "uuid": "5ca83276-f003-460d-98b6-dd3c30708749", 47 | "owningCollectionName": "Publishers", 48 | "workspaceItemId": null, 49 | "workflowItemId": null, 50 | "metadata": { 51 | "dc.title": [ 52 | { 53 | "value": "Example Item", 54 | "language": null, 55 | "authority": null, 56 | "confidence": -1, 57 | "place": 0 58 | } 59 | ], 60 | "dspace.entity.type": [ 61 | { 62 | "value": "Publication", 63 | "language": null, 64 | "authority": null, 65 | "confidence": -1, 66 | "place": 0 67 | } 68 | ] 69 | }, 70 | "type": "DUPLICATE" 71 | }, { 72 | "title": "Example Itom", 73 | "uuid": "32f8f6e4-c79e-4322-aae7-07ee535f70a6", 74 | "owningCollectionName": null, 75 | "workspaceItemId": 51, 76 | "workflowItemId": null, 77 | "metadata": { 78 | "dc.title": [{ 79 | "value": "Example Itom", 80 | "language": null, 81 | "authority": null, 82 | "confidence": -1, 83 | "place": 0 84 | }] 85 | }, 86 | "type": "DUPLICATE" 87 | }, { 88 | "title": "Exaple Item", 89 | "uuid": "0647ff45-48f5-4c1b-b6d7-f5dbbc160856", 90 | "owningCollectionName": null, 91 | "workspaceItemId": 52, 92 | "workflowItemId": null, 93 | "metadata": { 94 | "dc.title": [{ 95 | "value": "Exaple Item", 96 | "language": null, 97 | "authority": null, 98 | "confidence": -1, 99 | "place": 0 100 | }] 101 | }, 102 | "type": "DUPLICATE" 103 | }] 104 | } 105 | ``` -------------------------------------------------------------------------------- /endpoints.md: -------------------------------------------------------------------------------- 1 | # Endpoints 2 | [REST Overview Documentation](README.md) 3 | 4 | ## Available Endpoints 5 | * /api/core/sites 6 | * [/api/core/communities](communities.md) 7 | * [/api/core/collections](collections.md) 8 | * [/api/core/items](items.md) 9 | * [/api/core/itemtemplates](itemtemplates.md) 10 | * [/api/core/bitstreams](bitstreams.md) 11 | * [/api/core/bitstreamformats](bitstreamformats.md) 12 | * [/api/core/bundles](bundles.md) 13 | * [/api/core/metadatafields](metadatafields.md) 14 | * [/api/core/metadataschemas](metadataschemas.md) 15 | * [/api/core/epersons](epersons.md) 16 | * [/api/eperson/orcidqueues](orcidqueues.md) 17 | * [/api/eperson/orcidhistories](orcidhistories.md) 18 | * [/api/eperson/profiles](profiles.md) 19 | * [/api/core/groups](epersongroups.md) 20 | * [/api/core/{model}/search](search-rels.md) 21 | * [/api/authn/login](authentication.md#Login) 22 | * [/api/authn/logout](authentication.md#Logout) 23 | * [/api/authn/status](authentication.md#Status) 24 | * [/api/captcha/challenge](captcha.md) 25 | * [/api/config/harvestermetadata](harvestermetadata.md) 26 | * [/api/config/submissiondefinitions](submissiondefinitions.md) 27 | * [/api/config/submissionsections](submissionsections.md) 28 | * [/api/config/submissionforms](submissionforms.md) 29 | * [/api/config/submissionuploads](submissionuploads.md) 30 | * [/api/config/submissionaccessoptions](submissionaccessoptions.md) 31 | * [/api/config/workflowdefinitions](workflowdefinitions.md) 32 | * [/api/config/workflowsteps](workflowsteps.md) 33 | * [/api/discover/browses](browses.md) 34 | * [/api/discover/search](search-endpoint.md) 35 | * [/api/pid](identifiers.md) 36 | * [/api/submission/workspaceitems](workspaceitems.md) 37 | * [/api/submission/vocabularies](vocabularies.md) 38 | * [/api/submission/vocabularyEntryDetails](vocabularyEntryDetails.md) 39 | * [/api/system/systemwidealerts](systemwidealerts.md) 40 | * [/api/versioning/versions](versions.md) 41 | * [/api/versioning/versionhistories](versionhistories.md) 42 | * [/api/workflow/workflowitems](workflowitems.md) 43 | * [/api/workflow/pooltasks](pooltasks.md) 44 | * [/api/workflow/claimedtasks](claimedtasks.md) 45 | * [/api/tools/feedbacks](feedbacks.md) 46 | * [/api/integration/qualityassurancesources](qualityassurancesources.md) 47 | * [/api/integration/qualityassurancetopics](qualityassurancetopics.md) 48 | * [/api/integration/qualityassuranceevents](qualityassuranceevents.md) 49 | * [/api/integration/suggestions](suggestions.md) 50 | * [/api/integration/suggestionsources](suggestionsources.md) 51 | * [/api/integration/suggestiontargets](suggestiontargets.md) 52 | * [/api/submission/duplicates](duplicates.md) 53 | * [/api/security/csrf](csrf-tokens.md) (added in DS8) 54 | 55 | ## Endpoints Under Development/Discussion 56 | * [/api/authz/resourcepolicies](resourcepolicies.md) 57 | * [/api/config/bulkaccessconditionoptions](bulkaccessconditionoptions.md) 58 | * [/api/authz/authorizations](authorizations.md) 59 | * [/api/authz/features](features.md) 60 | * [/api/statistics](statistics.md) 61 | * [/api/tools/itemrequests](item-requests.md) 62 | * [/api/contentreport/filteredcollections](contentreport-filteredcollections.md) 63 | * [/api/contentreport/filtereditems](contentreport-filtereditems.md) 64 | 65 | ## Actuator endpoints 66 | The following endpoints are implemented using [Spring Boot Actuator](https://docs.spring.io/spring-boot/docs/current/reference/html/actuator.html#actuator.enabling) and are enabled by default: 67 | * /actuator/info 68 | * /actuator/health 69 | 70 | For more details see the [/actuator endpoint](actuator.md) 71 | 72 | ## Other Endpoints (raw list) 73 | * /api/authorize/(dso) 74 | * /api/curate 75 | * /api/export 76 | * /api/app/bulkmetadataedit 77 | * /api/statistics/(dso) 78 | * /api/configuration 79 | * return relevant configuration values to the client 80 | * DSpace version 81 | * Root url 82 | * Site name 83 | * Contact info 84 | * Root handle 85 | * Supported themes 86 | * Default language 87 | * Languages supported 88 | * question, how will we mark / designate the values that are safe to expose? 89 | * /api/feature 90 | * return the status of features that are enabled for a site 91 | * statistics viewing 92 | * return the status of features that are enabled for authorized users 93 | * item versioning 94 | 95 | ## Other Endpoints not under /api context 96 | 97 | * /oai 98 | * endpoint for OAI-PMH data provider (if enabled) 99 | * /opensearch 100 | * endpoint for opensearch service 101 | * [/signposting](signposting.md) 102 | * endpoint returning information for linkset (signposting) 103 | * /sword 104 | * endpoint for sword (if enabled) 105 | * /sword2 106 | * endpoint for sword2 (if enabled) 107 | 108 | -------------------------------------------------------------------------------- /entitytypes.md: -------------------------------------------------------------------------------- 1 | # Entity Type Endpoints 2 | [Back to the list of all defined endpoints](endpoints.md) 3 | 4 | This endpoint contains the various types of entities (publication, person, journal, …) and links to the types of 5 | relationships each of these entities may have. 6 | Entities are Items with a valid value in the `dspace.entity.type` 7 | 8 | ## Main Endpoint 9 | **/api/core/entitytypes** 10 | 11 | A sample can be found at https://demo.dspace.org/server/#https://demo.dspace.org/server/api/core/entitytypes 12 | 13 | ```json 14 | { 15 | "_embedded": { 16 | "entitytypes": [ 17 | { 18 | "id": 1, 19 | "label": "Publication", 20 | "type": "entitytype", 21 | "_links": { 22 | "self": { 23 | "href": "https://demo.dspace.org/server/api/core/entitytypes/1" 24 | }, 25 | "relationshiptypes": { 26 | "href": "https://demo.dspace.org/server/api/core/entitytypes/1/relationshiptypes" 27 | } 28 | } 29 | }, 30 | { 31 | "id": 2, 32 | "label": "Person", 33 | "type": "entitytype", 34 | "_links": { 35 | "self": { 36 | "href": "https://demo.dspace.org/server/api/core/entitytypes/2" 37 | }, 38 | "relationshiptypes": { 39 | "href": "https://demo.dspace.org/server/api/core/entitytypes/2/relationshiptypes" 40 | } 41 | } 42 | } 43 | ] 44 | }, 45 | "_links": { 46 | "self": { 47 | "href": "https://demo.dspace.org/server/api/core/entitytypes" 48 | } 49 | }, 50 | "page": { 51 | "size": 20, 52 | "totalElements": 2, 53 | "totalPages": 1, 54 | "number": 0 55 | } 56 | } 57 | ``` 58 | 59 | ## Single Entity Type 60 | **/api/core/entitytypes/<:id>** 61 | 62 | A sample can be found at https://demo.dspace.org/server/#https://demo.dspace.org/server/api/core/entitytypes/1 63 | 64 | ```json 65 | { 66 | "id": 1, 67 | "label": "Publication", 68 | "type": "entitytype", 69 | "_links": { 70 | "self": { 71 | "href": "https://demo.dspace.org/server/api/core/entitytypes/1" 72 | }, 73 | "relationshiptypes": { 74 | "href": "https://demo.dspace.org/server/api/core/entitytypes/1/relationshiptypes" 75 | } 76 | } 77 | } 78 | ``` 79 | 80 | It contains a HAL link to the Relationship Types for the current Entity Type (not embedded) 81 | 82 | ## Relationship Types for the current Entity Type 83 | **/api/core/entitytypes/<:id>/relationshiptypes** 84 | 85 | A sample can be found at https://demo.dspace.org/server/#https://demo.dspace.org/server/api/core/entitytypes/1/relationshiptypes 86 | It embeds the [relationshiptypes](relationshiptypes.md) which are linked to the given entity type (either on the left or right side) 87 | 88 | ## Get Entity type from label 89 | **/api/core/entitytypes/label/<:entity-type-label>** 90 | 91 | A sample request would be https://demo.dspace.org/server/#/server/api/core/entitytypes/label/Person 92 | The entity-type-label is mandatory 93 | 94 | There's always at most one entity type per label. 95 | 96 | It would respond with: 97 | * The single entity type if there's a match 98 | * 404 if the entity type doesn't exist 99 | 100 | ### Search methods 101 | #### findAllByAuthorizedCollection 102 | **/api/core/entitytypes/search/findAllByAuthorizedCollection** 103 | 104 | The supported parameters are: 105 | * page, size [see pagination](README.md#Pagination) 106 | It returns a list of entity types for which there is at least one collection in which the user is authorized to submit 107 | 108 | Return codes: 109 | * 200 OK - if the operation succeed 110 | 111 | #### findAllByAuthorizedExternalSource 112 | **/api/core/entitytypes/search/findAllByAuthorizedExternalSource** 113 | 114 | The supported parameters are: 115 | * page, size [see pagination](README.md#Pagination) 116 | It returns a list of entity types for which there is at least one collection in which the user is authorized to submit supported by at least one external data source provider 117 | 118 | Return codes: 119 | * 200 OK - if the operation succeed 120 | -------------------------------------------------------------------------------- /features.md: -------------------------------------------------------------------------------- 1 | # Features Endpoints 2 | [Back to the list of all defined endpoints](endpoints.md) 3 | 4 | A feature is the representation of a business goal used in the [Authorization endpoint](authorizations.md) to declare what an user can do on a specific object. 5 | 6 | ## Main Endpoint 7 | **/api/authz/features** 8 | 9 | List all the available features in the system. Access is restricted to system administrators. 10 | 11 | Parameters: 12 | * page, size [see pagination](README.md#Pagination) 13 | 14 | Return codes: 15 | * 200 OK - if the operation succeed 16 | * 401 Unauthorized - if you are not authenticated 17 | * 403 Forbidden - if you are not logged in with sufficient permissions. Only system administrators can access 18 | 19 | ## Single Feature 20 | **/api/authz/features/<:string>** 21 | 22 | Provide detailed information about a specific feature. Access is restricted to system administrators. The JSON response document is as follow 23 | 24 | ```json 25 | { 26 | "id": "withdrawItem", 27 | "description": "The feature allows to withdrawn an item from the repository without deleting it. The restoreItem feature allow to undo the process", 28 | "resourcetypes": [ 29 | "core.item" 30 | ], 31 | "type": "feature" 32 | } 33 | ``` 34 | 35 | Attributes 36 | * id: the id of the feature is an unique shortname 37 | * description: an human readable description of the feature purpose 38 | * resourcetypes: an array of types of objects where this feature apply in the form of category.model as used in the REST API. Please note that the model is in its singular form (i.e. core.item, core.site, submission.workspaceitem, etc.) 39 | 40 | Return codes: 41 | * 200 OK - if the operation succeed 42 | * 401 Unauthorized - if you are not authenticated 43 | * 403 Forbidden - if you are not logged in with sufficient permissions. Only system administrators can access 44 | * 404 Not found - if the feature doesn't exist 45 | 46 | ### Search methods 47 | #### resourcetype 48 | **/api/authz/features/search/resourcetype?type=<:string>** 49 | 50 | The supported parameters are: 51 | * page, size [see pagination](README.md#Pagination) 52 | * type: in the form of category.model as used in the REST API. Please note that the model is in its singular form (i.e. core.item, core.site, submission.workspaceitem, etc.) 53 | 54 | It returns the list of features that apply to the specified type. 55 | 56 | Return codes: 57 | * 200 OK - if the operation succeed 58 | * 400 Bad Request - if the type parameter is missing or invalid 59 | * 401 Unauthorized - if you are not authenticated 60 | * 403 Forbidden - if you are not logged in with sufficient permissions. Only system administrators can access -------------------------------------------------------------------------------- /feedbacks.md: -------------------------------------------------------------------------------- 1 | # Feedbacks Endpoints 2 | [Back to the list of all defined endpoints](endpoints.md) 3 | 4 | The /api/tools/feedbacks endpoints are used to send feedback (via email) to DSpace's configured 'feedback.recipient'. 5 | At this time submitted feedbacks are not visible or accessible via the REST API. 6 | 7 | ## Main Endpoint 8 | **/api/tools/feedbacks** 9 | 10 | As we don't have yet an use case to iterate over all the existent feedbacks the main endpoint is not implemented and a 405 error code is returned according to our [general error response codes](README.md#Error codes). 11 | 12 | ## Single Feedback 13 | **/api/tools/feedbacks/<:id>** 14 | 15 | As we don't have yet an use case to get a single feedback the main endpoint is not implemented and a 405 error code is returned according to our [general error response codes](README.md#Error codes). 16 | 17 | ## Creating a feedback 18 | **POST /api/tools/feedbacks** 19 | 20 | Request body: 21 | ```json 22 | { 23 | "e-mail": "myemail@test.com", 24 | "message": "DSpace is the best!", 25 | "page": "/home" 26 | } 27 | ``` 28 | 29 | The json body must be valid that mean 30 | - e-mail must be provided 31 | - message must be provided 32 | 33 | Return codes: 34 | * 201 Created - if the operation succeed 35 | * 400 Bad Request - if some of the fields e-mail or message is missing 36 | * 404 Not found - if the property 'feedback.recipient' is not configured 37 | -------------------------------------------------------------------------------- /harvestermetadata.md: -------------------------------------------------------------------------------- 1 | # Harvesting metadata configuration Endpoints 2 | [Back to the list of all defined endpoints](endpoints.md) 3 | 4 | ## Main Endpoint 5 | **/api/config/harvestermetadata** 6 | 7 | Provide access to the list of harvesting metadata configurations (config based). 8 | 9 | Example: 10 | 11 | 12 | A sample json response: 13 | 14 | ```json 15 | { 16 | "configs": [ 17 | { 18 | "id": "dc", 19 | "label": "Simple Dublin Core", 20 | "nameSpace": "http://www.openarchives.org/OAI/2.0/oai_dc/" 21 | }, 22 | { 23 | "id": "qdc", 24 | "label": "Qualified Dublin Core", 25 | "nameSpace": "http://purl.org/dc/terms/" 26 | }, 27 | { 28 | "id": "dim", 29 | "label": "DSpace Intermediate Metadata", 30 | "nameSpace": "http://www.dspace.org/xmlns/dspace/dim" 31 | } 32 | ], 33 | "_links": { 34 | "self": { 35 | "href": "https://demo.dspace.org/server/api/config/harvestermetadata" 36 | } 37 | } 38 | } 39 | ``` 40 | -------------------------------------------------------------------------------- /identifiers.md: -------------------------------------------------------------------------------- 1 | # Identifier endpoints 2 | [Back to the list of all defined endpoints](endpoints.md) 3 | 4 | ## Main Endpoint 5 | **GET /api/pid/identifiers** 6 | 7 | * GET method not implemented. To fetch an identifier for an item, see [the Items endpoint](items.md). 8 | 9 | **POST /api/pid/identifiers?type=<:identifier_type>** 10 | Creates or registers a new identifier for this item. A 'type' parameter is required to indicate which sort of 11 | identifier to create, eg. doi, handle, or other supported identifier types. 12 | Currently, only DOI registration is supported with this method. 13 | 14 | The item to be identified must be supplied as URI in the request body using the text/uri-list content-type. 15 | 16 | This operation would typically be used to mint and queue a DOI for registration for an item that is already archived. 17 | 18 | ``` 19 | # Example curl command to mint or register a new identifiers 20 | curl -i -X POST "http://localhost:8080/rest/api/identifiers?type=doi" 21 | -H "Content-Type:text/uri-list" 22 | -d "http://localhost:8080/rest/api/core/items/5ad50035-ca22-4a4d-84ca-d5132f34f588" 23 | ``` 24 | 25 | On success, the identifier resource is returned as a response. 26 | ```json 27 | { 28 | "value" : "https://doi.org/10.33515/dspace-61", 29 | "identifierType" : "doi", 30 | "identifierStatus" : "TO_BE_REGISTERED", 31 | "type" : "identifier" 32 | } 33 | ``` 34 | 35 | Return codes: 36 | * 201 Created - if the operation succeeds 37 | * 400 Bad Request - if the item id param is missing or invalid (not an uuid), or if the type param is missing or invalid, or if the DOI is already registered 38 | * 401 Unauthorized - if you are not authenticated and versioning is not public 39 | * 403 Forbidden - if you are not logged in with sufficient permissions and versioning is not public 40 | * 404 Not found - if the item doesn't exist 41 | 42 | ## Get identifiers for item 43 | **GET /api/pid/identifiers/search/findByItem?uuid=<:uuid> 44 | 45 | Return an array of identifiers associated with the given item. 46 | ```json 47 | { 48 | "_embedded": { 49 | "identifiers": [ 50 | { 51 | "id": null, 52 | "value": "https://doi.org/10.33515/dspace-68", 53 | "identifierType": "doi", 54 | "identifierStatus": "TO_BE_REGISTERED", 55 | "type": "identifier", 56 | "_links": { 57 | "self": { 58 | "href": "http://localhost:8080/server/api/ppid/identifiers" 59 | } 60 | } 61 | }, 62 | { 63 | "id": null, 64 | "value": "http://localhost:4000/handle/123456789/375", 65 | "identifierType": "handle", 66 | "identifierStatus": null, 67 | "type": "identifier", 68 | "_links": { 69 | "self": { 70 | "href": "http://localhost:8080/server/api/ppid/identifiers" 71 | } 72 | } 73 | } 74 | ] 75 | }, 76 | "_links": { 77 | "self": { 78 | "href": "http://localhost:8080/server/api/pid/identifiers/search/findByItem?uuid=71d45ca4-3a50-40d3-b35a-b17cccac3575" 79 | } 80 | }, 81 | "page": { 82 | "size": 20, 83 | "totalElements": 2, 84 | "totalPages": 1, 85 | "number": 0 86 | } 87 | } 88 | ``` 89 | 90 | ## Find DSO by identifier endpoint 91 | **GET /api/pid/find?id=<:identifier>** 92 | 93 | Resolve a given <:identifier> string to a DSpace Object and redirect the request to the endpoint for that resource. 94 | The identifier string should be a handle or DOI. 95 | 96 | Returns: 97 | 98 | **302** redirect to the object on success 99 | 100 | **404** not found if the object cannot be found 101 | 102 | **501** not implemented if the identifier is not resolvable -------------------------------------------------------------------------------- /item-requests.md: -------------------------------------------------------------------------------- 1 | # Item Request Endpoints 2 | [Back to the list of all defined endpoints](endpoints.md) 3 | 4 | This supports the Request a Copy feature. 5 | 6 | ## Main Endpoint 7 | **/api/tools/itemrequests** 8 | 9 | Provide access to requests. It returns the list of existing requests avoiding to expose token to not admin users. **NOT IMPLEMENTED** 10 | 11 | Example: to be provided 12 | 13 | ## Single Request 14 | **/api/tools/itemrequests/<:token>** 15 | 16 | Provide detailed information about a specific request. The JSON response document will resemble this: 17 | ```json 18 | { 19 | "id":1, 20 | "decisionDate":null, 21 | "expires":null, 22 | "requestDate":"2021-09-17T14:55:50.089+00:00", 23 | "token":"c19e820ea0b270f0ec98323864dcc8b8", 24 | "acceptRequest":false, 25 | "allfiles":false, 26 | "type":"itemrequest", 27 | "bitstreamId":"dca2dadb-7028-40a9-ab39-1a47726df7ef", 28 | "itemId":"71d9fb0c-cc36-41c1-b1d3-63887b414fca", 29 | "requestEmail":"jsmith@example.com", 30 | "requestMessage":"Please send me a copy of this.", 31 | "requestName":"John Smith", 32 | "_links":{ 33 | "bitstream":{ 34 | "href":"https://demo.dspace.org/server/api/tools/itemrequests/1/bitstream" 35 | }, 36 | "item":{ 37 | "href":"https://demo.dspace.org/server/api/tools/itemrequests/1/item" 38 | }, 39 | "self":{ 40 | "href":"https://demo.dspace.org/server/api/tools/itemrequests/1" 41 | } 42 | } 43 | } 44 | ``` 45 | 46 | Item properties: 47 | 48 | * type: always "itemrequest". READ-ONLY 49 | * id: internal unique identifier of the request. READ-ONLY 50 | * itemId: UUID of the requested Item. 51 | * bitstreamId: UUID of the requested bitstream. 52 | * allfiles: true if the request is for all bitstreams of the item. 53 | * requestEmail: email address of the person requesting the files. 54 | * requestName: Human-readable name of the person requesting the files. 55 | * requestMessage: arbitrary message provided by the person requesting the files. 56 | * requestDate: date that the request was recorded. READ-ONLY. 57 | * expires: date on which the request is considered expired. 58 | * acceptRequest: true if the request has been granted. 59 | * decisionDate: date that the request was granted or denied. READ-ONLY. 60 | * token: opaque string which uniquely identifies this request. READ-ONLY 61 | 62 | Exposed links: 63 | 64 | * item: the item requested 65 | * bitstream: the bitstream requested 66 | 67 | Return codes: 68 | 69 | * 200 OK - if the operation succeeded 70 | * 404 NOT FOUND - if the token is unknown (no such request exists) 71 | 72 | ## Creating a Request 73 | **POST /api/tools/itemrequests** 74 | 75 | Anyone may create an item request. The Content-Type is JSON. Example: 76 | ```json 77 | { 78 | "itemId": "71d9fb0c-cc36-41c1-b1d3-63887b414fca", 79 | "allfiles": false, 80 | "bitstreamId": "dca2dadb-7028-40a9-ab39-1a47726df7ef", 81 | "requestEmail": "jqpublic@example.com", 82 | "requestName": "John Q. Public", 83 | "requestMessage": "Please send this to me." 84 | } 85 | ``` 86 | `bitstreamId` is ignored and may be omitted if `allfiles` is `false`. `requestMessage` is optional. `requestEmail` and `requestName` are ignored and may be omitted if the session is authenticated -- these fields will be filled from the session user's EPerson. If the session is anonymous then `requestEmail` is required. `bitstreamId` is required if `allfiles` is false. `itemId` is always required. 87 | 88 | The response is empty, generated token should not be exposed. 89 | 90 | An appropriate person will be notified that the request has been filed. 91 | 92 | Return codes: 93 | 94 | * 201 CREATED - if the operation succeeded 95 | * 401 UNAUTHORIZED - if anonymous requests are disabled and the session is unauthenticated 96 | * 422 UNPROCESSABLE ENTITY - if the POSTed document could not be interpreted, the Item or Bitstream could not be found, or required fields are missing 97 | 98 | ## Accepting / Denying a Request 99 | **PUT /api/tools/itemrequests/<:token>** 100 | 101 | Anyone may accept or deny a request. Access is controlled by keeping the token confidential. The Content-Type is JSON. Example: 102 | ```json 103 | { 104 | "acceptRequest": true, 105 | "subject": "Request copy of document", 106 | "responseMessage": "Approved. Documents attached.", 107 | "suggestOpenAccess": "false" 108 | } 109 | ``` 110 | `acceptRequest` is required to set the status of a request. `responseMessage`, `subject` and `suggestOpenAccess` are not part of the request and are not stored. Other fields will be ignored -- requests are not updatable. 111 | 112 | Additional Fields: 113 | 114 | * responseMessage: included in the body of the message sent to the requester. OPTIONAL. 115 | * subject: a subject line for the response message. OPTIONAL. 116 | * suggestOpenAccess: if `true`, trigger a message to repository administrators suggesting that access to the requested object(s) be opened. OPTIONAL. 117 | 118 | Return codes: 119 | 120 | * 200 OK - if the operation succeeded 121 | * 401 UNAUTHORIZED - if the current session is anonymous 122 | * 403 FORBIDDEN - if the current session is not authenticated to one of the configured approvers 123 | * 422 UNPROCESSABLE ENTITY - if the request could not be found or `acceptRequest` was not specified. 124 | 125 | ## Linked entities 126 | ### item entries 127 | **/api/tools/itemrequests/<:id>/item ** 128 | ### bitstream entries 129 | **/api/tools/itemrequests/<:id>/bitstream ** 130 | -------------------------------------------------------------------------------- /itemtemplates.md: -------------------------------------------------------------------------------- 1 | # Collection Item Template Endpoints 2 | [Back to the list of all defined endpoints](endpoints.md) 3 | 4 | ## Main Endpoint 5 | **/api/core/itemtemplates** 6 | 7 | _Unsupported._ No list of all item templates is supported 8 | 9 | ## Single Item template 10 | **/api/core/itemtemplates/<:uuid>** 11 | 12 | Provide detailed information about a specific item. The JSON response document is as follow 13 | ```json 14 | { 15 | "uuid": "1911e8a4-6939-490c-b58b-a5d70f8d91fb", 16 | "name": null, 17 | "handle": null, 18 | "metadata": { 19 | "dc.type": [ 20 | { 21 | "value": "Journal Article", 22 | "language": "en", 23 | "authority": null, 24 | "confidence": -1, 25 | "place": 0 26 | } 27 | ] 28 | }, 29 | "inArchive": false, 30 | "discoverable": false, 31 | "withdrawn": false, 32 | "lastModified": "2019-06-24T00:40:54.970+0000", 33 | "type": "item" 34 | } 35 | ``` 36 | 37 | ## Creating an item template 38 | **POST /api/core/collections/<:uuid>/itemtemplate** 39 | 40 | See the [collection endpoint](collections.md#create-item-template) for details 41 | 42 | ## Updating item template metadata 43 | **PATCH /api/core/itemtemplates/<:uuid>** 44 | 45 | Item metadata can be modified as described in [Modifying metadata via Patch](metadata-patch.md). 46 | 47 | No other properties can be modified 48 | 49 | #### Delete Item template 50 | **DELETE /api/core/itemtemplates/<:uuid>** 51 | 52 | A collection's item template can be deleted, automatically ensuring the relationship between the collection and the item template is removed as well. 53 | 54 | Curl example: 55 | ``` 56 | curl 'https://demo.dspace.org/server/api/core/itemtemplates/34d343c5-feb7-4a54-b07f-20a92debe061' \ 57 | -XDELETE \ 58 | -H 'Authorization: Bearer eyJhbGciOiJI...' 59 | ``` 60 | 61 | * The item template is determined using the ID in the URL 62 | 63 | Status codes: 64 | * 204 No content - if the operation succeed 65 | * 401 Unauthorized - if you are not authenticated 66 | * 403 Forbidden - if you are not logged in with sufficient permissions 67 | * 404 Not found - if the item template doesn't exist 68 | -------------------------------------------------------------------------------- /ldnmessages.md: -------------------------------------------------------------------------------- 1 | # LDN Messages Endpoints 2 | [Back to the list of all defined endpoints](endpoints.md) 3 | 4 | ## Main Endpoint 5 | **/api/ldn/ldnmessages** 6 | 7 | Provide access to the ldn messages. List all the LDN messages 8 | 9 | A sample can be found at https://api7.dspace.org/server/#/server/api/ldn/ldnmessages 10 | 11 | Return codes: 12 | * 200 OK - if the operation succeed 13 | * 401 Unauthorized - if you are not authenticated 14 | * 403 Forbidden - if you are not logged in with sufficient permissions. Only system administrators can access 15 | 16 | ## Single LDN Message 17 | **/api/ldn/ldnmessages/<:id>** 18 | 19 | ```json 20 | { 21 | "id" : "urn:uuid:94ecae35-dcfd-4182-8550-22c7164fe23f", 22 | "notificationId" : "urn:uuid:94ecae35-dcfd-4182-8550-22c7164fe23f", 23 | "queueStatus" : 1, 24 | "queueStatusLabel" : "QUEUE_STATUS_QUEUED", 25 | "context" : "7d95587b-8e26-4302-9911-3e0f40fc6e4b", 26 | "object" : "7d95587b-8e26-4302-9911-3e0f40fc6e4b", 27 | "target" : null, 28 | "origin" : 1, 29 | "inReplyTo" : null, 30 | "activityStreamType" : "Announce", 31 | "coarNotifyType" : "coar-notify:EndorsementAction", 32 | "queueAttempts" : 0, 33 | "queueLastStartTime" : null, 34 | "queueTimeout" : "2024-01-03T10:56:41.737+00:00", 35 | "notificationType" : "Incoming", 36 | "type" : "message", 37 | "_links" : { 38 | "self" : { 39 | "href" : "http://localhost/api/ldn/messages/urn:uuid:94ecae35-dcfd-4182-8550-22c7164fe23f" 40 | } 41 | } 42 | } 43 | ``` 44 | 45 | Status codes: 46 | * 200 OK - if the operation succeed 47 | * 401 Unauthorized - if you are not authenticated 48 | * 403 Forbidden - if you are not logged in with sufficient permissions. Only system administrators can access 49 | * 404 Not found - if no LDN Message exists with such id 50 | 51 | ## Creating a new LDN Message 52 | **POST /api/ldn/ldnmessages** 53 | 54 | Creation of LDN Message is not supported via Endpoint 55 | 56 | Status codes: 57 | * 405 Method Not Allowed 58 | 59 | ## PATCH 60 | 61 | Patch of LDN Message is not supported via Endpoint 62 | 63 | Status codes: 64 | * 405 Method Not Allowed 65 | 66 | ## DELETE 67 | 68 | Deletion of LDN Message is not supported via Endpoint 69 | 70 | Status codes: 71 | * 405 Method Not Allowed 72 | 73 | ## enqueueRetry 74 | **POST /api/ldn/ldnmessages/<:id>/enqueueretry** 75 | 76 | this endpoint is responsible for requesting a reprocessing of LDN Message 77 | by changing `queueStatusLabel` to be "QUEUE_STATUS_QUEUED_FOR_RETRY" 78 | ```json 79 | { 80 | "id" : "urn:uuid:94ecae35-dcfd-4182-8550-22c7164fe23f", 81 | "notificationId" : "urn:uuid:94ecae35-dcfd-4182-8550-22c7164fe23f", 82 | "queueStatus" : 7, 83 | "queueStatusLabel" : "QUEUE_STATUS_QUEUED_FOR_RETRY", 84 | "context" : "c433ac1a-949a-4435-bf3d-181dcaac1c56", 85 | "object" : "c433ac1a-949a-4435-bf3d-181dcaac1c56", 86 | "target" : null, 87 | "origin" : 1, 88 | "inReplyTo" : null, 89 | "activityStreamType" : "Announce", 90 | "coarNotifyType" : "coar-notify:EndorsementAction", 91 | "queueAttempts" : 0, 92 | "queueLastStartTime" : null, 93 | "queueTimeout" : 1704281265044, 94 | "notificationType" : "Incoming", 95 | "type" : "message" 96 | } 97 | ``` 98 | 99 | Status codes: 100 | * 200 OK - if the operation succeed 101 | * 401 Unauthorized - if you are not authenticated 102 | * 403 Forbidden - if you are not logged in with sufficient permissions. Only system administrators can access 103 | * 404 Not found - if no LDN Message exists with such id 104 | -------------------------------------------------------------------------------- /metadatafields.md: -------------------------------------------------------------------------------- 1 | # Metadata Fields Endpoints 2 | [Back to the list of all defined endpoints](endpoints.md) 3 | 4 | ## Main Endpoint 5 | **/api/core/metadatafields** 6 | 7 | Provide access to the metadata fields defined in the registry (DBMS based). It returns the list of existent metadata fields. 8 | 9 | Example: 10 | 11 | ## Single Metadata Field 12 | **/api/core/metadatafields/<:id>** 13 | 14 | Provide detailed information about a specific metadata field. The JSON response document is as follows 15 | ```json 16 | { 17 | "id": 8, 18 | "element": "contributor", 19 | "qualifier": "advisor", 20 | "scopeNote": "Use primarily for thesis advisor.", 21 | "type": "metadatafield" 22 | } 23 | ``` 24 | 25 | Exposed links: 26 | * schema: the metadata schema to which the item belongs 27 | 28 | ## Linked entities 29 | ### Schema 30 | **/api/core/metadatafields/<:id>/schema** 31 | 32 | Example: 33 | 34 | It returns the metadata schema which the metadata field belongs. See the Metadata Schema endpoint for more info](metadataschemas.md#Single Metadata Schema) 35 | 36 | 37 | ### Search methods 38 | #### bySchema 39 | **/api/core/metadatafields/search/bySchema?schema=<:prefix>** 40 | 41 | Example: 42 | 43 | The supported parameters are: 44 | * **(mandatory)** schema, the prefix of the metadata schema (i.e. "dc", "dcterms", "eperson, etc.) 45 | * page, size [see pagination](README.md#Pagination) 46 | 47 | Return codes: 48 | * 200 OK - if the operation succeed 49 | 50 | #### byFieldName 51 | **/api/core/metadatafields/search/byFieldName** 52 | 53 | This endpoint supports the parameters (any combination of parameters is allowed): 54 | * schema, an exact match of the prefix of the metadata schema (e.g. "dc", "dcterms", "eperson") 55 | * element, an exact match of the field's element (e.g. "contributor", "title") 56 | * qualifier, an exact match of the field's qualifier (e.g. "author", "alternative") 57 | * query, part of the fully qualified field, should start with the start of the schema, element or qualifier (e.g. "dc.ti", "contributor", "auth", "contributor.ot") 58 | * exactName, The exact fully qualified field, should use the syntax schema.element.qualifier or schema.element if no qualifier exists (e.g. "dc.title", "dc.contributor.author"). It will only return one value if there's an exact match 59 | * page, size [see pagination](README.md#Pagination) 60 | 61 | Examples: 62 | * /api/core/metadatafields/search/byFieldName?schema=dc&query=author 63 | * /api/core/metadatafields/search/byFieldName?query=id&qualifier=uri 64 | 65 | Return codes: 66 | * 200 OK - if the operation succeed 67 | 68 | ## Creating a Metadata Field 69 | 70 | **POST /api/core/metadatafields?schemaId=<:schemaId>** 71 | 72 | To create a metadata field, perform a post with the JSON below when logged in as admin. 73 | 74 | ```json 75 | { 76 | "element": "contributor", 77 | "qualifier": "tester", 78 | "scopeNote": "An agent which provided illustrations for the resource" 79 | } 80 | ``` 81 | 82 | Return codes: 83 | * **201 Created** - if the operation succeed 84 | * **400 Bad Request** - if the body of the request can't be parsed (for example because of a missing field) 85 | * **401 Unauthorized** - if you are not authenticated 86 | * **403 Forbidden** - if you are not logged in with sufficient permissions 87 | * **422 Unprocessable Entity** - if the request is well-formed, but is invalid based on the given data. 88 | * If the schema ID does not exist 89 | * If you attempt to create a field with an empty `element` or if it contains dots, commas or spaces or if it's longer than 64 characters. 90 | * If you attempt to create a field with a `qualifier` contains dots, commas or spaces or if it's longer than 64 characters. 91 | 92 | ## Updating a Metadata Field 93 | 94 | **PUT /api/core/metadatafields/<:id>** 95 | 96 | To update the `scopeNote` of a specific metadata field, when the update is completed the updated object will be returned. The JSON to update can be found below. 97 | ```json 98 | { 99 | "id": 7, 100 | "element": "contributor", 101 | "qualifier": "tester", 102 | "scopeNote": null 103 | } 104 | ``` 105 | 106 | Return codes: 107 | * **200 OK** - if the operation succeed 108 | * **400 Bad Request** - if the body of the request can't be parsed (for example because of a missing field) 109 | * **401 Unauthorized** - if you are not authenticated 110 | * **403 Forbidden** - if you are not logged in with sufficient permissions 111 | * **404 Not found** - if the metadata field doesn't exist 112 | * **422 Unprocessable Entity** - if the request is well-formed, but is invalid based on the given data. 113 | * If you attempt to update the `element`. 114 | * If you attempt to update the `qualifier`. 115 | 116 | ## Deleting a Metadata Field 117 | 118 | **DELETE /api/core/metadatafields/<:id>** 119 | 120 | Delete a metadata field. 121 | 122 | * 204 No content - if the operation succeed 123 | * 401 Unauthorized - if you are not authenticated 124 | * 403 Forbidden - if you are not logged in with sufficient permissions 125 | * 404 Not found - if the metadata field doesn't exist (or was already deleted) 126 | -------------------------------------------------------------------------------- /metadataschemas.md: -------------------------------------------------------------------------------- 1 | # Metadata Schemas Endpoints 2 | [Back to the list of all defined endpoints](endpoints.md) 3 | 4 | ## Main Endpoint 5 | **/api/core/metadataschemas** 6 | 7 | Provide access to the metadata schemas defined in the registry (DBMS based). It returns the list of existent metadata schemas. 8 | 9 | Example: 10 | 11 | ## Single Metadata Schema 12 | **/api/core/metadataschemas/<:id>** 13 | 14 | Provide detailed information about a specific metadata schema. The JSON response document is as follow 15 | ```json 16 | { 17 | "id": 1, 18 | "prefix": "dc", 19 | "namespace": "http://dublincore.org/documents/dcmi-terms/", 20 | "type": "metadataschema", 21 | "_links": { 22 | "self": { 23 | "href": "https://demo.dspace.org/server/api/core/metadataschemas/1" 24 | } 25 | } 26 | } 27 | ``` 28 | 29 | Exposed links: none 30 | 31 | Return codes: 32 | * **200 OK** - if the operation succeed 33 | * **404 Not Found** - if the metadata schema doesn't exist 34 | 35 | ## Creating a Metadata Schema 36 | 37 | **POST /api/core/metadataschemas** 38 | 39 | To create a metadata schema, perform a post with the JSON below when logged in as admin. 40 | 41 | ```json 42 | { 43 | "prefix": "example", 44 | "namespace": "http://dublincore.org/documents/example/" 45 | } 46 | ``` 47 | 48 | Return codes: 49 | * **201 Created** - if the operation succeed 50 | * **400 Bad Request** - if the body of the request can't be parsed (for example because of a missing field) 51 | * **401 Unauthorized** - if you are not authenticated 52 | * **403 Forbidden** - if you are not logged in with sufficient permissions 53 | * **422 Unprocessable Entity** - if the request is well-formed, but is invalid based on the given data. 54 | * If you attempt to create a schema with an empty `prefix` or if it contains dots, commas or spaces or if it's longer than 32 characters. 55 | * If you attempt to create a schema with an empty `namespace`. 56 | 57 | ## Updating a Metadata Schema 58 | 59 | **PUT /api/core/metadataschemas/<:id>** 60 | 61 | Provide updated information about a specific metadata schema, when the update is completed the updated object will be returned. The JSON to update can be found below. 62 | ```json 63 | { 64 | "id": 7, 65 | "prefix": "example", 66 | "namespace": "http://dublincore.org/documents/exampleUpdated/" 67 | } 68 | ``` 69 | 70 | Return codes: 71 | * **200 OK** - if the operation succeed 72 | * **400 Bad Request** - if the body of the request can't be parsed (for example because of a missing field) 73 | * **401 Unauthorized** - if you are not authenticated 74 | * **403 Forbidden** - if you are not logged in with sufficient permissions 75 | * **422 Unprocessable Entity** - if the request is well-formed, but is invalid based on the given data. 76 | * If you attempt to update the `prefix`. 77 | * If you attempt to update the `namespace` with an empty `namespace`. 78 | 79 | ## Deleting a Metadata Schema 80 | 81 | **DELETE /api/core/metadataschemas/<:id>** 82 | 83 | Delete a metadata schema. 84 | 85 | * 204 No content - if the operation succeed 86 | * 401 Unauthorized - if you are not authenticated 87 | * 403 Forbidden - if you are not logged in with sufficient permissions 88 | * 404 Not found - if the metadata schema doesn't exist (or was already deleted) 89 | -------------------------------------------------------------------------------- /orcidhistories.md: -------------------------------------------------------------------------------- 1 | # ORCID History Endpoints 2 | [Back to the list of all defined endpoints](endpoints.md) 3 | 4 | These endpoints allow you to manipulate the Orcid History records associated with a specific profile. 5 | Only the EPerson who is the owner of the Profile Item can access them. 6 | 7 | An Orcid History records is created starting from the processing of an Orcid Queue record, 8 | an operation that involves an attempt to synchronize the entity with the ORCID registry. 9 | 10 | These endpoints are only available when orcid.sychronization-enabled=true. 11 | 12 | ## Single ORCID History entry 13 | **GET /api/eperson/orcidhistories/<:id>** 14 | 15 | Provide detailed information about a specific ORCID history entry. The JSON response document is as follow 16 | ```json 17 | { 18 | "id": 20, 19 | "profileItemId": "87d24f06-0ca5-4abe-84f9-bfd36a8236d8", 20 | "entityId": "66e0d773-ddeb-4b6b-bcac-ced2ae67141c", 21 | "status": "201", 22 | "putCode": "123456", 23 | "responseMessage": "...", 24 | "timestamp": "2014-01-01T23:28:56.782Z", 25 | "type": "orcidhistory", 26 | "_links": { 27 | "self": { 28 | "href": "**/api/eperson/orcidhistories/20" 29 | } 30 | } 31 | } 32 | ``` 33 | 34 | Return codes: 35 | * 200 OK - if the operation succeed 36 | * 401 Unauthorized - if you are not authenticated 37 | * 403 Forbidden - if you are not logged in with sufficient permissions (only the owner of the profile is allowed) 38 | * 404 Not found - if an ORCID queue entry with the given id doesn't exist 39 | 40 | The `profileItemId` attribute represent the id of the researcher profile item that is associated with the the entity item with id `entityId`; the entity is the item that should be sent to the ORCID register. The `putCode` attribute, if presente, represent the unique code that ORCID registry associate to the stored entity. The `status` attribute is the response status of the related call to ORCID to send the entity. The `responseMessage` is the complete response body coming from the ORCID api when the call to send the entity is made. The `lastAttempt` and the `sucessAttempt` are two timestamps that represent respectively the last attempt to send the entity info to ORCID and the last moment in which that send was successful. 41 | 42 | ## Send to ORCID registry 43 | **POST /api/eperson/orcidhistories** 44 | 45 | To send an ORCID queue entry to the ORCID api and create a record into the ORCID history a reference of an ORCID queue record must be posted to the ORCID history resource endpoint (/api/eperson/orcidhistories). The ORCID queue record must be supplied as URI in the request body using the text/uri-list content-type. 46 | 47 | An optional query param named `forceAddition` with value true or false could be provided to force the send of a new resource to the ORCID api without an update of an existing resource even if for the provided ORCID queue record there is a putCode. 48 | 49 | Return codes: 50 | * 201 OK - if the operation succeed and the orcid history record is created 51 | * 401 Unauthorized - if you are not authenticated 52 | * 403 Forbidden - if you are not logged in with sufficient permissions (only the owner of the profile is allowed) 53 | * 404 Not found - if no ORCID queue entry exists related to the fiven URI 54 | * 422 Unprocessable entity - if the ORCID object to synchronize with ORCID registry is not valid 55 | 56 | An example curl call: 57 | ``` 58 | curl -i -X POST https://demo.dspace.org/server/api/eperson/orcidhistories \ 59 | -H "Content-Type:text/uri-list" \ 60 | --data "https://demo.dspace.org/server/api/eperson/orcidqueues/10" 61 | ``` 62 | -------------------------------------------------------------------------------- /orcidqueues.md: -------------------------------------------------------------------------------- 1 | # ORCID Queue Endpoints 2 | [Back to the list of all defined endpoints](endpoints.md) 3 | 4 | These endpoints allow to handle the Orcid Queue records associated with a specific profile. 5 | Only the EPerson who is the owner of the Profile Item can access them. 6 | 7 | When these records are processed lead to the creation of Orcid History records 8 | (see [orcid history contract](orcidhistories.md) for more details). 9 | 10 | These endpoints are only available when orcid.sychronization-enabled=true. 11 | 12 | ## Single ORCID Queue entry 13 | **GET /api/eperson/orcidqueues/<:id>** 14 | 15 | Provide detailed information about a specific ORCID queue entry. The JSON response document is as follow 16 | ```json 17 | { 18 | "id": 73, 19 | "profileItemId": "87d24f06-0ca5-4abe-84f9-bfd36a8236d8", 20 | "entityId": "66e0d773-ddeb-4b6b-bcac-ced2ae67141c", 21 | "description": "My Publication", 22 | "recordType": "Publication", 23 | "operation": "INSERT", 24 | "type": "orcidqueue", 25 | "_links": { 26 | "self": { 27 | "href": "**/api/eperson/orcidqueues/73" 28 | } 29 | } 30 | } 31 | ``` 32 | 33 | Return codes: 34 | * 200 OK - if the operation succeed 35 | * 401 Unauthorized - if you are not authenticated 36 | * 403 Forbidden - if you are not logged in with sufficient permissions (only the owner of the profile is allowed) 37 | * 404 Not found - if an ORCID queue entry with the given id doesn't exist 38 | 39 | The `profileItemId` attribute represent the id of the researcher profile item that is associated with the the entity item with id `entityId` that should be sent to the ORCID register. 40 | 41 | ## Search ORCID Queue entries by profileItem id 42 | **GET /api/eperson/orcidqueues/search/findByProfileItem?profileItemId=<:item-uuid>** 43 | 44 | Provide detailed information about all the ORCID queue entries related to the profileItem with the given uuid. The JSON response document is as follow 45 | ```json 46 | { 47 | "_embedded": { 48 | "orcidQueues": [ 49 | { 50 | "id": 68, 51 | "profileItemId": "87d24f06-0ca5-4abe-84f9-bfd36a8236d8", 52 | "entityId": "3eed1cf2-552d-491a-9a1f-ef941a0cafcd", 53 | "description": "ABC-54321", 54 | "recordType": "Project", 55 | "operation": "UPDATE", 56 | "type": "orcidQueue", 57 | "_links": { 58 | "self": { 59 | "href": "**/api/eperson/orcidqueues/68" 60 | } 61 | } 62 | }, 63 | { 64 | "id": 73, 65 | "profileItemId": "87d24f06-0ca5-4abe-84f9-bfd36a8236d8", 66 | "entityId": "66e0d773-ddeb-4b6b-bcac-ced2ae67141c", 67 | "description": "My Publication", 68 | "recordType": "Publication", 69 | "operation": "DELETE", 70 | "type": "orcidQueue", 71 | "_links": { 72 | "self": { 73 | "href": "**/api/eperson/orcidqueues/73" 74 | } 75 | } 76 | } 77 | ] 78 | }, 79 | "_links": { 80 | "self": { 81 | "href": "http://localhost:8080/server/api/eperson/orcidQueues/search/findByProfileItem" 82 | } 83 | }, 84 | "page": { 85 | "size": 20, 86 | "totalElements": 2, 87 | "totalPages": 1, 88 | "number": 0 89 | } 90 | } 91 | ``` 92 | 93 | Return codes: 94 | * 200 OK - if the operation succeed 95 | * 401 Unauthorized - if you are not authenticated 96 | * 403 Forbidden - if you are not logged in with sufficient permissions (only the owner of the profile is allowed) 97 | 98 | ## Delete an ORCID Queue entry 99 | **DELETE /api/eperson/orcidqueues/<:id>** 100 | 101 | Delete a single ORCID queue entry by id. The provided response has no content. 102 | 103 | Return codes: 104 | * 204 No content - if the operation succeed 105 | * 401 Unauthorized - if you are not authenticated 106 | * 403 Forbidden - if you are not logged in with sufficient permissions (only the owner of the profile is allowed) 107 | -------------------------------------------------------------------------------- /patch.md: -------------------------------------------------------------------------------- 1 | # General rules for the Patch operation 2 | [Back to the index](README.md) 3 | 4 | The PATCH method expects a JSON body according to the [JSON Patch specification RFC6902](https://tools.ietf.org/html/rfc6902) 5 | 6 | Each successful Patch operation will return a **HTTP 200 CODE** with the new state of the patched resource as body similar to what is returned for a GET request. 7 | 8 | ### Add 9 | The add operation is expected to be supported by all the endpoints that implement the Patch method for all the json path not flagged as **READ-ONLY**. 10 | 11 | Please note that according to the [JSON Patch specification RFC6902](https://tools.ietf.org/html/rfc6902) a subsequent add operation on an already set attribute have the effect to replace the previous value. 12 | 13 | This use of the add operation to replace a value could be counter intuitive but it is done according to the [RFC section 4.1](https://tools.ietf.org/html/rfc6902#section-4.1) 14 | > If the target location specifies an object member that does exist, that member's value is replaced. 15 | 16 | ### Remove 17 | The remove operation is expected to be supported by all the endpoints that implement the Patch method for all the json path not flagged as **READ-ONLY**. 18 | Support for remove operation is expected to be provided also to the array index path level for each attribute or list where position is meaningful. This include for instance the metadata values or the uploaded bitstreams so that an author or a bitstream can be removed individually. 19 | The path specified will be nullified deleting all the children objects if any. 20 | 21 | ### Replace 22 | The replace operation is expected to be supported by all the endpoints that implement the Patch method for all the json path not flagged as **READ-ONLY**. 23 | 24 | The replace operation allows to replace *existent* information with new one. Attempt to use the replace operation without a previous value will return an error. See the [general errors on PATCH requests section](patch.md#error-codes) 25 | 26 | ### Move 27 | The move operation should be supported on array attributes or linked list where the position is meaningful. This include for instance the metadata values so that authors can be reordered or the list of bitstreams. 28 | 29 | ### Test & copy 30 | No plan to implement the test and copy operations at the current stage 31 | 32 | ## Error codes 33 | * **405 Method Not Allowed** - if the PATCH method is not implemented 34 | * **415 Unsupported Media Type** - if the PATCH method is called without the JSON Patch Media Type that is application/json-patch+json 35 | * **400 Bad Request** - Malformed patch document (taken from rfc5789#section-2.2) - When the server determines that the patch document provided by the client is not properly formatted, it SHOULD return a 400 (Bad Request) response. The definition of badly formatted depends on the patch document chosen. 36 | * **422 Unprocessable Entity** - Unprocessable request: Can be specified with a 422 (Unprocessable Entity) response ([RFC4918], Section 11.2) when the server understands the patch document and the syntax of the patch document appears to be valid, but the server is incapable of processing the request. This might include attempts to modify a resource in a way that would cause the resource to become invalid; A response json object should be returned with more details about the exception t.b.d (i.e. the idx of the patch operation that fail, detail about the failure on execution such as wrong idx in an array path, unsupported patch operation, etc.) 37 | 38 | -------------------------------------------------------------------------------- /pooltasks.md: -------------------------------------------------------------------------------- 1 | # Pool Tasks Endpoints 2 | [Back to the list of all defined endpoints](endpoints.md) 3 | 4 | ## Main Endpoint 5 | **/api/workflow/pooltasks** 6 | 7 | Not allowed. Only subset of pool tasks can be retrieved using specific filters see below 8 | 9 | ## Single Pool Task 10 | **/api/workflow/pooltasks/<:id>** 11 | 12 | Provide details about a specific task in the pool. The JSON response document is as follow 13 | 14 | ```json 15 | { 16 | "id": 1, 17 | "step": "editstep", 18 | "action": "claimaction", 19 | "type": "pooltask" 20 | } 21 | ``` 22 | 23 | Exposed links: 24 | * step: the workflow step 25 | * action: the workflow action 26 | * workflowitem: the workflowitem underlying the task 27 | * eperson: the eperson that can claim the task 28 | * group: the group that can claim the task 29 | 30 | ### Linked entities 31 | #### workflowitem 32 | **/api/workflow/pooltasks/<:id>/workflowitem** (READ-ONLY) 33 | 34 | It returns the underlying workflowitem holds by the task. See the [workflowitem endpoint for more info](workflowitems.md). This is a **read-only** endpoint, once the task is created the backend workflowitem cannot be changed. 35 | 36 | #### eperson 37 | **/api/workflow/pooltasks/<:id>/eperson** (READ-ONLY) 38 | 39 | It returns the eperson that can claim the task. See the [eperson endpoint for more info](epersons.md). This is a **read-only** endpoint, once the task is created the backend eperson cannot be changed. 40 | 41 | #### group 42 | **/api/workflow/pooltasks/<:id>/group** (READ-ONLY) 43 | 44 | It returns the group of epersons that can claim the task. See the [group endpoint for more info](epersongroups.md). This is a **read-only** endpoint, once the task is created the backend group cannot be changed. 45 | 46 | #### workflow step 47 | **/api/workflow/pooltasks/<:id>/step** (READ-ONLY) 48 | 49 | It returns the workflow step currently assigned to the task. 50 | See the [workflow steps](workflowsteps.md) endpoint for more info. 51 | This is a **read-only** endpoint 52 | 53 | #### workflow action 54 | **/api/workflow/pooltasks/<:id>/action** (READ-ONLY) 55 | 56 | It returns the workflow action currently assigned to the task. 57 | See the [workflow actions](workflowactions.md) endpoint for more info. 58 | This is a **read-only** endpoint. 59 | 60 | ### Search methods 61 | #### findByUser 62 | **/api/workflow/workflowitems/search/findByUser?uuid=<:user-uuid>** 63 | 64 | It returns the tasks available for the specified user 65 | 66 | #### findAllByItem 67 | **/api/workflow/pooltasks/search/findAllByItem?uuid=<:item-uuid>** 68 | Accessible only by Admin 69 | It returns all the pool tasks related to the specified item 70 | 71 | The supported parameters are: 72 | * page, size [see pagination](README.md#Pagination) 73 | * uuid: mandatory, the uuid of the item object 74 | 75 | Return codes: 76 | * 200 OK - if the operation succeed. This include the case of no matching tasks where a 0-size page json representation is returned. 77 | * 400 Bad Request - if the uuid parameter is missing or invalid 78 | * 401 Unauthorized - if you are not authenticated 79 | * 403 Forbidden - if you are not logged in with sufficient permissions. Only users with ADMIN right can use the endpoint 80 | * 422 Unprocessable Entity - if the provided uuid cannot be resolved to an item regardless to the item status 81 | 82 | #### findByItem 83 | **/api/workflow/pooltasks/search/findByItem?uuid=<:item-uuid>** 84 | It returns, if any, the single pooltask related to the specified item 85 | 86 | The supported parameters are: 87 | * page, size [see pagination](README.md#Pagination) 88 | * uuid: mandatory, the uuid of the item object 89 | 90 | Return codes: 91 | * 200 OK - if the operation succeed 92 | * 204 No Content - if there is no pool task for the specified item and the current user 93 | * 400 Bad Request - if the uuid parameter is missing or invalid 94 | * 401 Unauthorized - if you are not authenticated 95 | * 422 Unprocessable Entity - if the provided uuid cannot be resolved to an item regardless to the item status 96 | 97 | ## POST Method (collection level) 98 | The creation of pool tasks is managed by the underline workflow system. No methods are exposed to manually trigger such creation to avoid workflow hjack and inconsistency. 99 | 100 | ## POST Method (single resource level) 101 | Not allowed. To claim a pool task, please POST against the [claimed tasks](claimedtasks.md#post-method) endpoint. 102 | 103 | ## DELETE Method 104 | Not allowed. To reset a workflow it is possible to issue a DELETE against the [workflowitem endpoint](workflowitem.md) 105 | 106 | ## Multipart POST Method 107 | Not allowed 108 | -------------------------------------------------------------------------------- /projections.md: -------------------------------------------------------------------------------- 1 | # Projections 2 | [REST Overview Documentation](README.md) 3 | 4 | All `GET` requests returning a HAL document support an optional *projection* argument, specifying the name 5 | of an alternative representation of the requested resource. 6 | 7 | Projections may add to, modify, or omit information from the default representation of a resource. 8 | 9 | When fulfilling a request, the active projection is applied to the primary resource being requested 10 | as well as any embedded resources. 11 | 12 | ## Standard Projections 13 | 14 | There are two standard projections available in all DSpace 7+ instances: 15 | 16 | ### Default Projection 17 | 18 | The _default_ projection makes no changes to the normal representation of the resource and **excludes all 19 | subresource embeds**, omitting altogether the `_embedded` section of the HAL representation. 20 | 21 | This is the implicit projection for all individual resource endpoints, such as `/api/core/items/<:uuid>`, 22 | if no projection is specified. 23 | 24 | ### Full Projection (`?projection=full`) 25 | 26 | The _full_ projection includes all linked subresources also embedded in the response. 27 | 28 | Since embeds may include other embedded resources, it is important to limit the number of embed levels 29 | alloweds. Thus, only two levels of embeds will be returned at maximum when the _full_ projection is requested. 30 | 31 | ## Custom Projections 32 | 33 | Developers and integrators may extend the available projections for use with a DSpace instance by adding 34 | a new uniquely-named `Projection` as a Java Spring `@Component`, and ensuring it is deployed (e.g. as a jar) 35 | within the DSpace server webapp. 36 | 37 | Upon successful component discovery, the projection will automatically become available for use with all 38 | REST API endpoints using the same syntax as the standard projections (`?projection=name`). 39 | 40 | See [the Projection javadocs](https://github.com/DSpace/DSpace/blob/master/dspace-server-webapp/src/main/java/org/dspace/app/rest/projection/Projection.java) 41 | for more information. 42 | 43 | ## Specify Embed requests 44 | 45 | All `GET` requests returning a HAL document support an optional *embed* argument, specifying the link path 46 | of information to be embedded. 47 | 48 | Embeds can only add information from the default representation of a resource. 49 | 50 | When fulfilling a request, the active embed is applied to the primary resource being requested 51 | as well as any embedded resources. 52 | 53 | All linked resources which allow embeds can be retrieved using the *embed* argument, they don't have to be configured 54 | 55 | ### Basic embeds 56 | 57 | The most basic usage is to specify one level of embeds. 58 | This will allow `core/items/<:uuid>?embed=bundles&embed=owningCollection` to embed the bundles and the owningCollection of the item. 59 | 60 | The embed parameters only apply to the current resource. 61 | When using `/api/core/communities/<:uuid>?embed=subcommunities&embed=collections`, it embeds the collections and subcommunities of the current community. 62 | It won't embed the collections and subcommunities of subcommunities. 63 | 64 | The supported syntax is `core/items/{uuid}?embed=bundles&embed=owningCollection` or `core/items/{uuid}?embed=bundles,owningCollection` 65 | 66 | ### Multi-level embeds 67 | 68 | In case there's a use case to embed sub-resources of a sub-resource, multi-level embeds can be used. 69 | 70 | This will allow `/server/api/core/items/<:uuid>?embed=owningCollection/mappedItems/bundles/bitstreams&embed=owningCollection/logo`. 71 | That request will embed: 72 | * The item's owningCollection 73 | * The mappedItems of the item's owningCollection 74 | * The bundles of the mappedItems 75 | * The bitstreams of the bundles of the mappedItems 76 | * The logo of the item's owningCollection 77 | 78 | This will **not** embed: 79 | * The bundles of the main item 80 | * The item's mappedCollections 81 | * The owning collection of the mappedItems 82 | * … 83 | 84 | The path specified in the embed parameters will be traversed. 85 | 86 | It is possible the path contains the same link name multiple times. 87 | The request `/api/core/communities/<:uuid>?embed=subcommunities/subcommunities&embed=collections` will embed: 88 | * The community's subcommunities 89 | * The subcommunities of the subcommunities 90 | * The community's collections 91 | 92 | The request `/api/core/communities/<:uuid>?embed=subcommunities/subcommunities&embed=subcommunities/collections&embed=collections` will embed: 93 | * The community's subcommunities 94 | * The subcommunities of the subcommunities 95 | * The collections of the subcommunities 96 | * The community's collections 97 | -------------------------------------------------------------------------------- /qualityassurancesources.md: -------------------------------------------------------------------------------- 1 | ## Main Endpoint 2 | **GET /api/integration/qualityassurancesources** 3 | 4 | Provide access to the Quality Assurance sources. It returns the list of the Quality Assurance sources. 5 | 6 | ```json 7 | [ 8 | 9 | { 10 | id: "openaire", 11 | type: "qualityassurancesource", 12 | totalEvents: "33" 13 | }, 14 | { 15 | id: "another-source", 16 | type: "qualityassurancesource", 17 | lastEvent: "2020/10/09 10:11 UTC", 18 | totalEvents: "21" 19 | }, 20 | ... 21 | ] 22 | ``` 23 | Attributes: 24 | * lastEvent: the date of the last update from the specific Quality Assurance source 25 | * totalEvents: the total number of quality assurance events provided by the Quality Assurance source 26 | * id: is the identifier to use in GET Single Source. It can be composed of a source alias followed by colon : and the target uuid when the qa source data are focused on a specific item 27 | 28 | Return codes: 29 | * 200 OK - if the operation succeed 30 | * 401 Unauthorized - if you are not authenticated 31 | * 403 Forbidden - if you are not logged in with sufficient permissions, only system administrators can access 32 | 33 | ## GET Single Source 34 | **GET /api/integration/qualityassurancesources/<:qualityassurancesource-id>** 35 | ​ 36 | Provide detailed information about a specific Quality Assurance source. The JSON response document is as follow 37 | ​ 38 | ```json 39 | { 40 | id: "openaire", 41 | type: "qualityassurancesource", 42 | totalEvents: "33" 43 | } 44 | ``` 45 | ​ 46 | Return codes: 47 | * 200 OK - if the operation succeed 48 | * 401 Unauthorized - if you are not authenticated 49 | * 403 Forbidden - if you are not logged in with sufficient permissions, only system administrators can access 50 | * 404 Not found - if the source doesn't exist 51 | 52 | ## Search methods 53 | ### Get qualityassurancesources by a given target 54 | **/api/integration/qualityassurancesources/search/byTarget** 55 | 56 | It returns the list of qa sources that have events related to the specific target. 57 | 58 | ```json 59 | ... 60 | _embedded: { 61 | qualityassurancesources: 62 | [ 63 | 64 | { 65 | id: "openaire:", 66 | type: "qualityassurancesource", 67 | totalEvents: "3" 68 | }, 69 | { 70 | id: "coar-notify:", 71 | type: "qualityassurancesource", 72 | totalEvents: "2" 73 | }, 74 | ... 75 | ] 76 | } 77 | ``` 78 | 79 | The supported parameters are: 80 | * page, size [see pagination](README.md#Pagination) 81 | * source: mandatory, the name associated with a specific source 82 | 83 | Return codes: 84 | * 200 OK - if the operation succeed 85 | * 400 Bad Request - if the topic parameter is missing or invalid 86 | * 401 Unauthorized - if you are not authenticated 87 | * 403 Forbidden - if you are not logged in with sufficient permissions, only system administrators can access 88 | 89 | 90 | -------------------------------------------------------------------------------- /qualityassurancetopics.md: -------------------------------------------------------------------------------- 1 | ## Main Endpoint 2 | Provide access to the Quality Assurance topics. A topic represents a specific type of event (such as a missing abstract can be). 3 | 4 | **GET /api/integration/qualityassurancetopics** 5 | This method is not implemented as we haven't a use case that require to iterate over all the qa topics regardless of their source. Please use the search/bySource method instead. 6 | 7 | 8 | ```json 9 | { 10 | key: "ENRICH!MORE!PID", 11 | lastEvent: "2020/10/09 10:11 UTC", 12 | totalEvents: "33" 13 | }, 14 | { 15 | key: "ENRICH!MISSING!ABSTRACT", 16 | lastEvent: "2020/10/09 10:11 UTC", 17 | totalEvents: "21" 18 | }, 19 | ... 20 | ] 21 | ``` 22 | Attributes: 23 | * key: the name of the topic to display on the frontend user interface 24 | * lastEvent: the date of the last update from Quality Assurance Broker 25 | * totalEvents: the total number of quality assurance events provided by Quality Assurance Broker for this topic 26 | 27 | 28 | Return codes: 29 | * 200 OK - if the operation succeed 30 | * 401 Unauthorized - if you are not authenticated 31 | * 403 Forbidden - if you are not logged in with sufficient permissions, only system administrators can access 32 | 33 | ## GET Single Topic 34 | **GET /api/integration/qualityassurancetopics/<:qualityassurancetopic-id>** 35 | ​ 36 | Provide detailed information about a specific Quality Assurance Broker topic. The JSON response document is as follow 37 | ​ 38 | ```json 39 | 40 | { 41 | id: "openaire:ENRICH!MORE!PID", 42 | type: "qualityassurancetopic", 43 | name: "ENRICH/MORE/PID", 44 | lastEvent: "2020/10/09 10:11 UTC", 45 | totalEvents: 33 46 | } 47 | ``` 48 | 49 | Return codes: 50 | * 200 OK - if the operation succeed 51 | * 401 Unauthorized - if you are not authenticated 52 | * 403 Forbidden - if you are not logged in with sufficient permissions, only system administrators can access 53 | * 404 Not found - if the topic doesn't exist 54 | 55 | ## Search methods 56 | ### Get qualityassurancetopics by a given source 57 | **/api/integration/qualityassurancetopics/search/bySource** 58 | 59 | It returns the list of qa topics from a specific source. Provide paginated list of the qa topics available. 60 | 61 | ```json 62 | ... 63 | _embedded: { 64 | qualityassurancetopics: 65 | [ 66 | 67 | { 68 | id: "openaire:ENRICH!MORE!PID", 69 | type: "qualityassurancetopic", 70 | name: "ENRICH/MORE/PID", 71 | lastEvent: "2020/10/09 10:11 UTC", 72 | totalSuggestions: "33" 73 | }, 74 | { 75 | id: "openaire:ENRICH!MISSING!ABSTRACT", 76 | type: "qualityassurancetopic", 77 | name: "ENRICH/MISSING/ABSTRACT", 78 | lastEvent: "2020/10/09 10:11 UTC", 79 | totalSuggestions: "21" 80 | }, 81 | ... 82 | ] 83 | } 84 | ``` 85 | 86 | The supported parameters are: 87 | * page, size [see pagination](README.md#Pagination) 88 | * source: mandatory, the name associated with a specific source 89 | 90 | Return codes: 91 | * 200 OK - if the operation succeed 92 | * 400 Bad Request - if the topic parameter is missing or invalid 93 | * 401 Unauthorized - if you are not authenticated 94 | * 403 Forbidden - if you are not logged in with sufficient permissions, only system administrators can access 95 | 96 | 97 | ### Get qualityassurancetopics by a given target 98 | **GET /api/integration/qualityassurancetopics/search/byTarget?target=:item-uuid&source=:source-id** 99 | 100 | It returns the list of qa topics (from a specific source) to a specific targeted item. 101 | 102 | Return codes: 103 | * 200 OK - if the operation succeed 104 | * 400 Bad Request - if the target or the source parameters are missing or invalid (the target is not an uuid) 105 | * 401 Unauthorized - if you are not authenticated 106 | * 403 Forbidden - if you are not logged in with sufficient permissions, only system administrators can access 107 | -------------------------------------------------------------------------------- /relationshiptypes.md: -------------------------------------------------------------------------------- 1 | # Relationship Type Endpoints 2 | [Back to the list of all defined endpoints](endpoints.md) 3 | 4 | This endpoint contains the various types of relationships. 5 | A sample is a relation between a publication and a person with type isAuthorOfPublication 6 | A HAL link to the item types is embedded as well 7 | 8 | ## Main Endpoint 9 | **/api/core/relationshiptypes** 10 | 11 | A sample can be found at https://demo.dspace.org/#https://demo.dspace.org/server/api/core/relationshiptypes 12 | 13 | ## Single Relationship Type 14 | **/api/core/relationshiptypes/<:id>** 15 | 16 | A sample can be found at https://demo.dspace.org/#https://demo.dspace.org/server/api/core/relationshiptypes/1 17 | 18 | ```json 19 | { 20 | "id": 1, 21 | "leftwardType": "isAuthorOfPublication", 22 | "rightwardType": "isPublicationOfAuthor", 23 | "leftMinCardinality": 0, 24 | "leftMaxCardinality": null, 25 | "rightMinCardinality": 0, 26 | "rightMaxCardinality": null, 27 | "type": "relationshiptype", 28 | "_links": { 29 | "leftType": { 30 | "href": "https://demo.dspace.org/server/api/core/entitytypes/1" 31 | }, 32 | "rightType": { 33 | "href": "https://demo.dspace.org/server/api/core/entitytypes/2" 34 | }, 35 | "self": { 36 | "href": "https://demo.dspace.org/server/api/core/relationshiptypes/1" 37 | } 38 | }, 39 | "_embedded": { 40 | "leftType": { 41 | "id": 1, 42 | "label": "Publication", 43 | "type": "entitytype", 44 | "_links": { 45 | "self": { 46 | "href": "https://demo.dspace.org/server/api/core/entitytypes/1" 47 | }, 48 | "relationshiptypes": { 49 | "href": "https://demo.dspace.org/server/api/core/entitytypes/1/relationshiptypes" 50 | } 51 | } 52 | }, 53 | "rightType": { 54 | "id": 2, 55 | "label": "Person", 56 | "type": "entitytype", 57 | "_links": { 58 | "self": { 59 | "href": "https://demo.dspace.org/server/api/core/entitytypes/2" 60 | }, 61 | "relationshiptypes": { 62 | "href": "https://demo.dspace.org/server/api/core/entitytypes/2/relationshiptypes" 63 | } 64 | } 65 | } 66 | } 67 | } 68 | ``` 69 | 70 | The 2 [item types](itemtypes.md) are embedded 71 | 72 | ## Search methods 73 | 74 | ### Relationship types containing an entity type 75 | **/api/core/relationshiptypes/search/byEntityType?type=<:entity-type-label>** 76 | 77 | Parameters: 78 | * The `type` should be the entity type label from the [entity types endpoint](entitytypes.md). It is mandatory. It can occur on either the left or right hand side 79 | 80 | A sample search would be `/server/api/core/relationshiptypes/search/byEntityType?type=Publication' 81 | 82 | Assuming that the sample `config/entities/relationship-types.xml` data model has been loaded, it would respond with 83 | 84 | ```json 85 | { 86 | "_embedded": { 87 | "relationshiptypes": [ 88 | { // it is between Person and Publication 89 | "id": 10, 90 | "leftwardType": "isAuthorOfPublication", 91 | "rightwardType": "isPublicationOfAuthor", 92 | "copyToLeft": false, 93 | "copyToRight": false, 94 | "leftMinCardinality": 0, 95 | "leftMaxCardinality": null, 96 | "rightMinCardinality": 0, 97 | "rightMaxCardinality": null, 98 | "type": "relationshiptype" 99 | }, 100 | { 101 | "id": 1, 102 | "leftwardType": "isProjectOfPublication", 103 | "rightwardType": "isPublicationOfProject", 104 | "copyToLeft": false, 105 | "copyToRight": false, 106 | "leftMinCardinality": 0, 107 | "leftMaxCardinality": null, 108 | "rightMinCardinality": 0, 109 | "rightMaxCardinality": null, 110 | "type": "relationshiptype" 111 | }, 112 | { 113 | "id": 7, 114 | "leftwardType": "isOrgUnitOfPublication", 115 | "rightwardType": "isPublicationOfOrgUnit", 116 | "copyToLeft": false, 117 | "copyToRight": false, 118 | "leftMinCardinality": 0, 119 | "leftMaxCardinality": null, 120 | "rightMinCardinality": 0, 121 | "rightMaxCardinality": null, 122 | "type": "relationshiptype" 123 | }, 124 | { // this is a different relationshipttype than the one with id 10 125 | // as it is about Publication and OrgUnit 126 | "id": 17, 127 | "leftwardType": "isAuthorOfPublication", 128 | "rightwardType": "isPublicationOfAuthor", 129 | "copyToLeft": false, 130 | "copyToRight": false, 131 | "leftMinCardinality": 0, 132 | "leftMaxCardinality": null, 133 | "rightMinCardinality": 0, 134 | "rightMaxCardinality": null, 135 | "type": "relationshiptype" 136 | }, 137 | { 138 | "id": 18, 139 | "leftwardType": "isPublicationOfJournalIssue", 140 | "rightwardType": "isJournalIssueOfPublication", 141 | "copyToLeft": false, 142 | "copyToRight": false, 143 | "leftMinCardinality": 0, 144 | "leftMaxCardinality": null, 145 | "rightMinCardinality": 0, 146 | "rightMaxCardinality": null, 147 | "type": "relationshiptype" 148 | } 149 | ] 150 | } 151 | } 152 | ``` 153 | comments inside the above json are only included for clarity but are not part of the real response. 154 | 155 | Return codes: 156 | * 200 OK - if the operation succeed. This include the case of no matching relationship where a 0-size page json representation is returned. 157 | * 400 Bad Request - if the type parameter is missing or invalid 158 | -------------------------------------------------------------------------------- /scripts/curate.md: -------------------------------------------------------------------------------- 1 | # curate script 2 | [Back to the script index](index.md) 3 | 4 | * [curate script](#curate-script) 5 | * [What it does?](#what-it-does) 6 | * [Who can use it?](#who-can-use-it) 7 | * [When we use it?](#when-we-use-it) 8 | * [How it Works?](#how-it-works) 9 | * [Parameters](#parameters) 10 | * [Conclusion/QuickGuide:](#conclusionquickguide) 11 | 12 | 13 | ## What it does? 14 | 15 | The curate script allows you to select specific curation tasks to perform, and provides options for reporting and 16 | queueing tasks. 17 | 18 | For more information, see the [Curation System documentation](https://wiki.lyrasis.org/display/DSDOC7x/Curation+System) 19 | 20 | ## Who can use it? 21 | 22 | This script can be used by any user that has administrative privileges over at least one community, collection or item limited to the resources that they admin. 23 | 24 | ## When we use it? 25 | 26 | The curate script is used to perform curation tasks on items, collections, communities or the entire DSpace repository. Curation 27 | tasks can be used to ensure that items meet certain quality standards, such as having required metadata or valid links. 28 | 29 | ## How it Works? 30 | 31 | The curate script works by running curation tasks on items, collections, or the entire repository. Curation tasks are 32 | specified using the **-t** or **-T** parameter, and can be configured using the **-p** parameter. The **-i** parameter 33 | specifies the object to perform the task on, or "all" to perform the task on the entire repository. Curation tasks are 34 | executed in a transaction scope, which can be specified using the **-s** parameter. The **-q** parameter can be used to 35 | add tasks to a task queue for later processing, while the **-r** parameter can be used to generate a report on the 36 | results of the curation task. 37 | 38 | ## Parameters 39 | 40 | | Parameter | Description | 41 | |----------------------------------|-------------------------------------------------------------------------------------------------------------------------------| 42 | | `-t`,
`--task ` | The curation task name. Valid options include: `noop`, `profileformats`, `requiredmetadata`, `checklinks`, and `registerdoi`. | 43 | | `-T`,
`--taskfile ` | The file containing curation task names. | 44 | | `-i`,
`--id ` | The ID (handle) of the object to perform the task on, or `all` to perform on the entire repository. | 45 | | `-p`,
`--parameter ` | A task parameter in the format `NAME=VALUE`. | 46 | | `-q`,
`--queue ` | The name of the task queue to process. | 47 | | `-r`,
`--reporter ` | The relative or absolute path to the desired report file. Use `-` to report to console. If absent, no reporting. | 48 | | `-s`,
`--scope ` | The transaction scope to impose. Use `object`, `curation`, or `open`. If absent, `open` applies. | 49 | | `-v`,
`--verbose` | Report activity to standard output. | 50 | | `-h`,
`--help` | Display help information. | 51 | 52 | ## Conclusion/QuickGuide: 53 | 54 | The curate script is a powerful tool for performing various curation tasks on objects in DSpace. By specifying the 55 | appropriate task name and parameters, users can perform a wide range of curation tasks on items in the repository. If 56 | you're looking to automate curation tasks in DSpace, the curate script is definitely worth investigating. 57 | -------------------------------------------------------------------------------- /scripts/filter-media.md: -------------------------------------------------------------------------------- 1 | # filter-media script 2 | [Back to the script index](index.md) 3 | 4 | * [filter-media script](#filter-media-script) 5 | * [What it does?](#what-it-does) 6 | * [Who can use it?](#who-can-use-it) 7 | * [When we use it?](#when-we-use-it) 8 | * [How it Works?](#how-it-works) 9 | * [Parameters](#parameters) 10 | * [Conclusion/QuickGuide:](#conclusionquickguide) 11 | 12 | ## What it does? 13 | 14 | This script processes bitstreams (files) that are added to DSpace. It can perform various actions on files, which include extracting full text from files (to allow for searching within files) and creation of file thumbnails. 15 | 16 | For more information, 17 | see the [Media Filter documentation](https://wiki.lyrasis.org/display/DSDOC7x/Mediafilters+for+Transforming+DSpace+Content) 18 | 19 | ## Who can use it? 20 | 21 | This script can be used only by repository administrators. 22 | 23 | ## When we use it? 24 | 25 | The Filter-Media script is used to extract full text from documents and create thumbnails in DSpace. 26 | 27 | 28 | ## How it Works? 29 | 30 | The filter-media script processes bitstreams (files) that are added to DSpace, performing various activities on those files. For instance, by default, it will extract the full text from files to make them full text searchable. It will also create thumbnails. 31 | 32 | The script can be run with a variety of parameters to control which bitstreams are processed and which Media Filter plugins are used. 33 | 34 | By default, the script will process all bitstreams in DSpace and run all Media Filter plugins listed in the 'filter.plugins' configuration property in dspace.cfg. 35 | 36 | 37 | ## Parameters 38 | 39 | | Parameter | Description | 40 | |-----------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| 41 | | `-v`,
`--verbose` | Print all extracted text and other details to STDOUT. | 42 | | `-q`,
`--quiet` | Do not print anything except in the event of errors. | 43 | | `-f`,
`--force` | Force all bitstreams to be processed. | 44 | | `-i`,
`--identifier ` | ONLY process bitstreams belonging to the specified identifier. | 45 | | `-m`,
`--maximum ` | Process no more than the specified number of items. | 46 | | `-p`,
`--plugins ` | ONLY run the specified Media Filter plugin(s) listed from 'filter.plugins' in dspace.cfg. Separate multiple plugins with a comma (,) (e.g. MediaFilterManager -p "Word Text Extractor","PDF Text Extractor"). | 47 | | `-s`,
`--skip ` | SKIP the bitstreams belonging to the specified identifier. Separate multiple identifiers with a comma (,) (e.g. MediaFilterManager -s 123456789/34,123456789/323). | 48 | | `-h`,
`--help` | Display help information for the script. | 49 | 50 | ## Conclusion/QuickGuide: 51 | 52 | The filter-media script is a powerful tool for extracting full text and creating thumbnails in DSpace. By default, the 53 | script will process all bitstreams in DSpace and run all available Media Filter plugins. However, by using the available 54 | parameters, you can customize the script to process only specific bitstreams or to use only certain Media Filter 55 | plugins. This can help to optimize the performance of the script and ensure that the desired output is generated. 56 | -------------------------------------------------------------------------------- /scripts/harvest.md: -------------------------------------------------------------------------------- 1 | # harvest script 2 | [Back to the script index](index.md) 3 | 4 | * [harvest script](#harvest-script) 5 | * [What it does?](#what-it-does) 6 | * [Who can use it?](#who-can-use-it) 7 | * [When we use it?](#when-we-use-it) 8 | * [How it Works?](#how-it-works) 9 | * [Parameters:](#parameters) 10 | * [Conclusion/QuickGuide:](#conclusionquickguide) 11 | 12 | ## What it does? 13 | 14 | With this script, you can configure a collection to harvest its items from an external OAI-PMH instance. You can specify whether to harvest metadata only, or files as well (for external sites that support harvesting files). 15 | 16 | For more information, see the [OAI documentation](https://wiki.lyrasis.org/display/DSDOC7x/OAI) 17 | 18 | ## Who can use it? 19 | 20 | This script can be used only by repository administrators. 21 | 22 | ## When we use it? 23 | 24 | The script can be used to set up configurations related to a collection for harvesting its items, 25 | run the harvest procedure, or manage the status of 26 | harvested collections. 27 | 28 | The harvest script can also be used to reset the status of harvested collections, purge collections, and re-import all 29 | items in a collection. 30 | 31 | ## How it Works? 32 | 33 | The harvest script uses the OAI-PMH protocol to harvest metadata from external collections and import it into DSpace. 34 | 35 | When a collection is set up for harvesting, the script establishes a connection with the specified OAI-PMH server and 36 | imports metadata for the specified set ID and metadata format. The harvested metadata is then imported into DSpace, and 37 | items are created or updated as necessary. 38 | 39 | ## Parameters: 40 | 41 | | Parameter | Description | 42 | |----------------------------------------|--------------------------------------------------------------------------------------------------------------------| 43 | | `-p`,
`--purge` | Deletes all items in the collection. | 44 | | `-r`,
`--run` | Runs the standard harvest procedure. | 45 | | `-g`,
`--ping` | Tests the OAI server and sets it up for harvesting. | 46 | | `-s`,
`--setup` | Sets the collection up for harvesting. | 47 | | `-S`,
`--start` | Starts the harvest loop. | 48 | | `-R`,
`--reset` | Resets harvest status on all collections. | 49 | | `-P`,
`--purgeCollections` | Purges all harvestable collections. | 50 | | `-o`,
`--reimport` | ReImports all items in the collection. This is equivalent to using `-p` and then `-r`. | 51 | | `-c`,
`--collection ` | The harvesting collection (handle or ID). | 52 | | `-t`,
`--type ` | The type of harvesting (0 for none). | 53 | | `-a`,
`--address ` | The address of the OAI-PMH server. | 54 | | `-i`,
`--oai_set_id ` | The ID of the OAI-PMH set representing the harvested collection. | 55 | | `-m`,
`--metadata_format ` | The name of the desired metadata format for harvesting. This is resolved to namespace and crosswalk in dspace.cfg. | 56 | | `-h`,
`--help` | Shows help information. | 57 | 58 | ## Conclusion/QuickGuide: 59 | 60 | The harvest script is a useful tool for managing the OAI-PMH harvesting of external collections in DSpace. It provides a 61 | range of options for setting up collections, running the harvest procedure, and managing harvested collections. If you 62 | need to import metadata from external collections into DSpace, the Harvest script may be a helpful tool to use. 63 | -------------------------------------------------------------------------------- /scripts/import.md: -------------------------------------------------------------------------------- 1 | # import script 2 | [Back to the script index](index.md) 3 | 4 | * [import script](#import-script) 5 | * [What it does?](#what-it-does) 6 | * [Who can use it?](#who-can-use-it) 7 | * [When we use it?](#when-we-use-it) 8 | * [How it Works?](#how-it-works) 9 | * [Parameters](#parameters) 10 | * [Conclusion/QuickGuide](#conclusionquickguide) 11 | 12 | ## What it does? 13 | 14 | This script imports items or collections from Simple Archive Format (SAF). 15 | 16 | See [what is SAF](./export.md#what-is-saf)? For more information about the SAF export format. 17 | 18 | It takes several parameters to customize the import, such as the action to perform, the zip file to import, the 19 | destination collection, whether to send the submission through the collection's workflow, and whether to validate the 20 | import. 21 | 22 | ## Who can use it? 23 | 24 | This script can be used only by repository administrators. 25 | 26 | ## When we use it? 27 | 28 | The import script is used to import items into DSpace from a zip file in SAF 29 | format. The script provides a variety of parameters to control how the import is executed, including options to add, 30 | replace, or delete items, map items using a mapfile, send submissions through a collection's workflow, and more. 31 | 32 | ## How it Works? 33 | 34 | The import script reads a zip file in SAF format and extracts the items contained within. The script then 35 | processes the items according to the parameters provided by the user, such as adding them to a collection, replacing 36 | them in a mapfile, or deleting them. 37 | 38 | ## Parameters 39 | 40 | The script takes the following parameters: 41 | 42 | | Parameter | Description | 43 | |----------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| 44 | | `-a`,
`--add` | This parameter specifies that items in the SAF should be added to DSpace. | 45 | | `-r`,
`--replace` | This parameter specifies that items in the SAF should replace items in the mapfile in DSpace. | 46 | | `-d`,
`--delete` | This parameter specifies that items listed in the mapfile should be deleted from DSpace. | 47 | | `-z`,
`--zip` | This parameter specifies the name of the zip file containing the SAF. | 48 | | `-c`,
`--collection` | This parameter specifies the destination collection(s) in DSpace where the items will be added, replaced, or deleted. It can be either the Handle or database ID of the collection(s). | 49 | | `-m`,
`--mapfile` | This parameter specifies the name of the mapfile that maps items in the SAF to items in DSpace. | 50 | | `-w`,
`--workflow` | This parameter specifies whether to send the submission through the destination collection's workflow. If specified, the submission will be sent through the workflow. | 51 | | `-n`,
`--notify` | This parameter specifies whether to send notification emails when sending submissions through the workflow. If specified, notification emails will be sent. | 52 | | `-v`,
`--validate` | This parameter specifies whether to do a test run and not actually import items. If specified, the import will be validated. | 53 | | `-x`,
`--exclude-bitstreams` | This parameter specifies whether to exclude content bitstreams from the import. If specified, bitstreams will not be loaded or expected. Optional. | 54 | | `-p`,
`--template` | This parameter specifies whether to apply a template to the items being imported. If specified, a template will be applied. | 55 | | `-R`,
`--resume` | This parameter specifies whether to resume a failed import and add only. If specified, the import will resume from where it failed. | 56 | | `-q`,
`--quiet` | This parameter specifies whether to suppress metadata display. If specified, metadata will not be displayed. | 57 | | `-h`,
`--help` | This parameter displays help information for the script. | 58 | 59 | The mapfile parameter allows users to map items to existing items in the DSpace repository. This can be useful for 60 | replacing or updating existing items, or for creating relationships between items. 61 | 62 | The workflow parameter allows users to send items through a collection's workflow. This can be useful for ensuring that 63 | items meet certain criteria or are reviewed before being added to the repository. 64 | 65 | ## Conclusion/QuickGuide 66 | 67 | The import script is a powerful tool for importing items into DSpace from a zip file in SAF format. The 68 | script provides a wide range of parameters to control how the import is executed, and can be used to add, replace, or 69 | delete items, map items using a mapfile, send submissions through a collection's workflow, and more. 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /scripts/index-discovery.md: -------------------------------------------------------------------------------- 1 | # index-discovery script 2 | [Back to the script index](index.md) 3 | 4 | * [index-discovery script](#index-discovery-script) 5 | * [What it does?](#what-it-does) 6 | * [Who can use it?](#who-can-use-it) 7 | * [When we use it?](#when-we-use-it) 8 | * [How it Works?](#how-it-works) 9 | * [Parameters:](#parameters) 10 | * [Conclusion/QuickGuide:](#conclusionquickguide) 11 | 12 | ## What it does? 13 | 14 | The index-discovery script interacts with the Discovery Solr search index in DSpace. Depending on the parameters passed, 15 | the script adds, removes, updates, or rebuilds the search index. 16 | 17 | For more information regarding the Discovery infrastructure, see the [DSpace Documentation](https://wiki.lyrasis.org/display/DSDOC7x/Discovery). 18 | 19 | ## Who can use it? 20 | 21 | This script can be used only by repository administrators. 22 | 23 | ## When we use it? 24 | 25 | The index-discovery script is used to update the Discovery Solr search index in DSpace. The script allows for adding, 26 | removing, updating, and rebuilding the search index. 27 | 28 | ## How it Works? 29 | 30 | The index-discovery script updates the Discovery Solr search index in DSpace. The script queries the DSpace database to 31 | identify the items, collections, or communities that need to be added, updated, or removed from the index, and then 32 | performs the corresponding operations on the index. 33 | 34 | ## Parameters: 35 | 36 | The following parameters are available for the index-discovery script: 37 | 38 | | Parameter | Description | 39 | |-------------------------------|---------------------------------------------------------------------------------------------| 40 | | `-r`,
`--remove ` | Remove an item, collection, or community from the index based on its handle. | 41 | | `-i`,
`--index ` | Add or update an item, collection, or community based on its handle or UUID. | 42 | | `-c`,
`--clean` | Clean the existing index, removing any documents that no longer exist in the database. | 43 | | `-d`,
`--delete` | Delete all records from the existing index. | 44 | | `-b`,
`--build` | (Re)build the index, wiping out the current one if it exists. | 45 | | `-s`,
`--spellchecker` | Rebuild the spellchecker. This option can be combined with `-b` and `-f`. | 46 | | `-f`,
`--force` | If updating the existing index, force each handle to be reIndexed even if it is up-to-date. | 47 | | `-h`,
`--help` | Print the help message. | 48 | 49 | The clean, delete, and rebuild options are used to manage the existing index. The clean option removes any documents 50 | from the index that no longer exist in the database. The delete option deletes all records from the existing index. The 51 | rebuild option wipes out the current index and rebuilds it from scratch. 52 | 53 | The spellchecker option is used to rebuild the spellchecker for the index. This can be useful if you have made changes 54 | to the index that affect the spellchecking functionality. 55 | 56 | ## Conclusion/QuickGuide: 57 | 58 | The index-discovery script is a powerful tool for managing the Discovery Solr search index in DSpace. With this script, 59 | you can add, update, or remove items, collections, or communities from the index, as well as clean, delete, or rebuild 60 | the index from scratch. By using the various options available in the script, you can keep your Discovery Solr search 61 | index up-to-date and ensure that your users are able to find the content they need in DSpace. 62 | -------------------------------------------------------------------------------- /scripts/index.md: -------------------------------------------------------------------------------- 1 | # Available scripts index 2 | 3 | ## Scripts and processes endpoints 4 | This index contains a list of all the provided scripts in DSpace REST API contract, 5 | to learn more about the scripts and processes endpoints; check the following documentation: 6 | 7 | * [Processes](../processes-endpoint.md) 8 | 9 | * [Scripts](../scripts-endpoint.md) 10 | 11 | ## List of available scripts 12 | 13 | * [curate script](./curate.md) 14 | 15 | * [export script](./export.md) 16 | 17 | * [filter-media script](./filter-media.md) 18 | 19 | * [harvest script](./harvest.md) 20 | 21 | * [import script](./import.md) 22 | 23 | * [index-discovery script](./index-discovery.md) 24 | 25 | * [metadata-deletion script](./metadata-deletion.md) 26 | 27 | * [metadata-export script](./metadata-export.md) 28 | 29 | * [metadata-export-Search script](./metadata-export-search.md) 30 | 31 | * [metadata-import script](./metadata-import.md) 32 | 33 | * [orcid-bulk-push script](./orcid-bulk-push.md) 34 | 35 | * [process-cleaner script](./process-cleaner.md) 36 | 37 | * [retry-tracker script](./retry-tracker.md) 38 | 39 | * [solr-database-resync script](./solr-database-resync.md) 40 | 41 | * [subscription-send script](./subscription-send.md) 42 | 43 | -------------------------------------------------------------------------------- /scripts/metadata-deletion.md: -------------------------------------------------------------------------------- 1 | # metadata-deletion script 2 | [Back to the script index](index.md) 3 | 4 | * [metadata-deletion script](#metadata-deletion-script) 5 | * [What it does?](#what-it-does) 6 | * [Who can use it?](#who-can-use-it) 7 | * [When we use it?](#when-we-use-it) 8 | * [How it Works?](#how-it-works) 9 | * [Parameters](#parameters) 10 | * [Conclusion/QuickGuide:](#conclusionquickguide) 11 | 12 | ## What it does? 13 | 14 | The metadata-deletion script is designed to remove all values of a specified metadata field from each item in DSpace. 15 | 16 | ## Who can use it? 17 | 18 | This script can be used only by repository administrators. 19 | 20 | ## When we use it? 21 | 22 | The metadata-deletion script is useful when you need to remove a specific metadata field from all items in DSpace. 23 | 24 | ## How it Works? 25 | 26 | The metadata-deletion script works by querying the DSpace database to identify all items that contain the specified 27 | metadata field, and then deleting all values of that field from each item. This process can take some time depending on 28 | the size of your DSpace repository and the number of items that contain the specified metadata field. 29 | 30 | It's important to note that the metadata-deletion script will permanently delete all values of the specified metadata 31 | field from all items in DSpace. This action cannot be undone, so use this script with caution. 32 | 33 | ## Parameters 34 | 35 | | Parameter | Description | 36 | |---------------------------------|------------------------------------------------| 37 | | `-m`,
`--metadata ` | The metadata field name. | 38 | | `-l`,
`--list` | Lists the metadata fields that can be deleted. | 39 | 40 | ## Conclusion/QuickGuide: 41 | 42 | The metadata-deletion script is a powerful tool for removing a specific metadata field from all items in DSpace. Before 43 | using this script, make sure you have a backup of your DSpace repository in case you need to restore any deleted 44 | metadata values. 45 | -------------------------------------------------------------------------------- /scripts/metadata-export-search.md: -------------------------------------------------------------------------------- 1 | # metadata-export-search Script 2 | [Back to the script index](index.md) 3 | 4 | * [metadata-export-search Script](#metadata-export-search-script) 5 | * [What it does?](#what-it-does) 6 | * [Who can use it?](#who-can-use-it) 7 | * [When we use it?](#when-we-use-it) 8 | * [How it Works?](#how-it-works) 9 | * [Parameters](#parameters) 10 | * [Conclusion/QuickGuide:](#conclusionquickguide) 11 | 12 | ## What it does? 13 | 14 | The metadata-export-search script exports metadata from a discovery search in DSpace in CSV format. 15 | 16 | For more information, 17 | see the [Batch Metadata Editing documentation](https://wiki.lyrasis.org/display/DSDOC7x/Batch+Metadata+Editing) 18 | 19 | ## Who can use it? 20 | 21 | This script can be used only by repository administrators. 22 | 23 | ## When we use it? 24 | 25 | The metadata-export-search script is used to export metadata from a discovery search in DSpace. This script can be 26 | useful for creating reports or generating metadata exports based on specific search criteria. 27 | 28 | This export can also be used as a starting point 29 | to perform offline bulk changes to the record via the [Batch Metadata Editing feature](https://wiki.lyrasis.org/display/DSDOC7x/Batch+Metadata+Editing) 30 | 31 | ## How it Works? 32 | 33 | The script works by using the DSpace Discovery search API to execute a search based on the specified search string and 34 | search parameters. It then exports metadata from the search results using CSV format, which 35 | is a standard format for exporting metadata from DSpace. 36 | 37 | ## Parameters 38 | 39 | | Parameter | Description | 40 | |------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| 41 | | `-q`,
`--query` | The discovery search string to be used to match records. Not URL encoded. | 42 | | `-s`,
`--scope` | UUID of a specific DSpace container (site, community, or collection) to which the search has to be limited. | 43 | | `-c`,
`--configuration` | The name of a Discovery configuration that should be used by this search. | 44 | | `-f`,
`--filter` | Advanced search filter that has to be used to filter the result set, with syntax `<:filter-name>,<:filter-operator>=<:filter-value>`. Not URL encoded. For example `author,authority=5df05073-3be7-410d-8166-e254369e4166` or `title,contains=sample text`. | 45 | | `-h`,
`--help` | Display help information. | 46 | 47 | ## Conclusion/QuickGuide: 48 | 49 | The metadata-export-search script is a useful tool for exporting metadata from a discovery search in DSpace. By 50 | specifying the search string and search parameters, users can export metadata from a specific subset of records that 51 | match their search criteria. The script uses the CSV format, which is a standard format for 52 | exporting metadata from DSpace, making it easy to import the metadata into other systems or analyze the metadata using 53 | other tools. 54 | -------------------------------------------------------------------------------- /scripts/metadata-export.md: -------------------------------------------------------------------------------- 1 | # metadata-export script 2 | [Back to the script index](index.md) 3 | 4 | * [metadata-export script](#metadata-export-script) 5 | * [What it does?](#what-it-does) 6 | * [Who can use it?](#who-can-use-it) 7 | * [When we use it?](#when-we-use-it) 8 | * [How it Works?](#how-it-works) 9 | * [Parameters](#parameters) 10 | * [Conclusion/QuickGuide:](#conclusionquickguide) 11 | 12 | ## What it does? 13 | 14 | The metadata-export script exports the metadata for a specific item, collection, or community in CSV format. 15 | 16 | For more information, 17 | see the [Batch Metadata Editing documentation](https://wiki.lyrasis.org/display/DSDOC7x/Batch+Metadata+Editing) 18 | 19 | ## Who can use it? 20 | 21 | This script can be used only by repository administrators. 22 | 23 | ## When we use it? 24 | 25 | The metadata-export script is used to export metadata for batch editing in DSpace. Users can export metadata for 26 | specific items, collections, or communities, and then modify the metadata in a spreadsheet or text editor. Once the 27 | metadata has been edited, it can be re-imported using the Metadata-Import script. 28 | 29 | ## How it Works? 30 | 31 | The metadata-export script queries the DSpace database to retrieve metadata for the specified item, collection, or 32 | community. The metadata is then exported to a file in CSV (comma-separated values) format. By default, the exported 33 | metadata only includes fields that are normally edited by users, such as titles, authors, and dates. If the `-a` 34 | or `--all` parameter is used, all metadata fields will be included in the export, including fields that are not normally 35 | changed, such as provenance. 36 | 37 | ## Parameters 38 | 39 | The following table summarizes the available parameters for the metadata-export script: 40 | 41 | | Parameter | Description | 42 | |---------------------------|--------------------------------------------------------------------------------| 43 | | `-i`,
`--id ` | The ID or handle of the item, collection, or community to export metadata for. | 44 | | `-a`,
`--all` | Include all metadata fields that are not normally changed (e.g. provenance). | 45 | | `-h`,
`--help` | Display help information. | 46 | 47 | ## Conclusion/QuickGuide: 48 | 49 | The metadata-export script is a useful tool for batch editing metadata in DSpace. By exporting metadata to a spreadsheet 50 | or text editor, users can make changes to multiple items, collections, or communities at once. Once the metadata has 51 | been modified, it can be re-imported using the Metadata-Import script. 52 | -------------------------------------------------------------------------------- /scripts/metadata-import.md: -------------------------------------------------------------------------------- 1 | # metadata-import script 2 | [Back to the script index](index.md) 3 | 4 | * [metadata-import script](#metadata-import-script) 5 | * [What it does?](#what-it-does) 6 | * [Who can use it?](#who-can-use-it) 7 | * [When we use it?](#when-we-use-it) 8 | * [How it Works?](#how-it-works) 9 | * [Parameters](#parameters) 10 | * [Conclusion/QuickGuide:](#conclusionquickguide) 11 | 12 | ## What it does? 13 | 14 | The metadata-import script is designed to import metadata from a CSV file after batch editing in DSpace. 15 | 16 | For more information, 17 | see the [Batch Metadata Editing documentation](https://wiki.lyrasis.org/display/DSDOC7x/Batch+Metadata+Editing) 18 | 19 | ## Who can use it? 20 | 21 | This script can be used only by repository administrators. 22 | 23 | ## When we use it? 24 | 25 | This script is useful when making large-scale changes to items in DSpace, allowing for easy updating of metadata in 26 | bulk. 27 | 28 | 29 | 30 | ## How it Works? 31 | 32 | The metadata-import script reads a CSV file containing metadata to import, and updates the relevant items in DSpace with 33 | the new metadata. This can be useful after batch editing a large number of items. 34 | 35 | ## Parameters 36 | 37 | | Parameter | Description | 38 | |---------------------|------------------------------------------------------------------------------| 39 | | `-f ` | Source file. Specifies the CSV file containing the metadata to import. | 40 | | `-s` | Silent operation. Doesn't request confirmation of changes. Use with caution. | 41 | | `-w` | Workflow. When adding new items, use collection workflow. | 42 | | `-n` | Notify. When adding new items using a workflow, send notification emails. | 43 | | `-v` | Validate only. Just validate the CSV, don't run the import. | 44 | | `-t` | Template. When adding new items, use the collection template (if it exists). | 45 | | `-h`,
`--help` | Print the help message. | 46 | 47 | ## Conclusion/QuickGuide: 48 | 49 | The metadata-import script is a useful tool for importing metadata after batch editing in DSpace. When running the 50 | script, be sure to use caution when running in silent mode, and always validate CSV files before importing metadata into 51 | DSpace. With this guide, you should now be able to use the script effectively by specifying any relevant parameters. 52 | -------------------------------------------------------------------------------- /scripts/orcid-bulk-push.md: -------------------------------------------------------------------------------- 1 | # ORCID-bulk-push script 2 | [Back to the script index](index.md) 3 | 4 | * [ORCID-bulk-push script](#orcid-bulk-push-script) 5 | * [What it does?](#what-it-does) 6 | * [Who can use it?](#who-can-use-it) 7 | * [When we use it?](#when-we-use-it) 8 | * [How it Works?](#how-it-works) 9 | * [Parameters](#parameters) 10 | * [Conclusion/QuickGuide](#conclusionquickguide) 11 | 12 | ## What it does? 13 | 14 | The ORCID-bulk-push script is used to perform a bulk synchronization of all the ORCID entities that are placed in the 15 | ORCID queue. This script is specifically designed to work with ORCID integration in DSpace. 16 | 17 | For more information, 18 | see the [ORCID Integration documentation](https://wiki.lyrasis.org/display/DSDOC7x/ORCID+Integration) 19 | 20 | ## Who can use it? 21 | 22 | This script can be used only by repository administrators. 23 | 24 | ## When we use it? 25 | 26 | This script can be useful if you want to ensure that all the entities in the queue are synchronized, even if there have 27 | been synchronization failures in the past. 28 | 29 | ## How it Works? 30 | 31 | The ORCID-bulk-push script works by querying the DSpace database to identify all the ORCID entities that are placed in 32 | the ORCID queue. It then attempts to synchronize these entities with ORCID. If an entity fails to synchronize, the 33 | script will retry the synchronization up to a maximum number of attempts. By default, the maximum number of attempts is 34 | set to 10. However, this can be changed in the ORCID configuration file. 35 | 36 | If the `-f` option is used, the script will force the synchronization, even if the maximum attempts have been reached. 37 | 38 | ## Parameters 39 | 40 | The following parameters are available for the ORCID-bulk-push script: 41 | 42 | | Parameter | Description | 43 | |----------------------|-----------------------------------------------------------| 44 | | `-f`,
`--force` | Force the synchronization, ignoring the maximum attempts. | 45 | 46 | ## Conclusion/QuickGuide 47 | 48 | In conclusion, the ORCID-bulk-push script is a useful tool for performing a bulk synchronization of all the ORCID 49 | entities in the queue. By synchronizing these entities, you can ensure that the data in DSpace is up-to-date with ORCID. 50 | If you encounter synchronization failures, the script will automatically retry the synchronization up to a maximum 51 | number of attempts. If you want to ensure that all the entities in the queue are synchronized, even if there have been 52 | synchronization failures in the past, you can use the `-f` option to force the synchronization. 53 | -------------------------------------------------------------------------------- /scripts/process-cleaner.md: -------------------------------------------------------------------------------- 1 | # process-cleaner script 2 | [Back to the script index](index.md) 3 | 4 | * [process-cleaner script](#process-cleaner-script) 5 | * [What it does?](#what-it-does) 6 | * [Who can use it?](#who-can-use-it) 7 | * [When we use it?](#when-we-use-it) 8 | * [How it Works?](#how-it-works) 9 | * [Parameters](#parameters) 10 | * [Conclusion/QuickGuide:](#conclusionquickguide) 11 | 12 | ## What it does? 13 | 14 | The process-cleaner script is designed to clean up old processes in DSpace by removing processes in a specified state 15 | (RUNNING, FAILED, or COMPLETED). 16 | 17 | ## Who can use it? 18 | 19 | This script can be used only by repository administrators. 20 | 21 | ## When we use it? 22 | 23 | This script is useful for cleaning up old processes that are no longer needed and taking up resources on the server. 24 | Over time, these processes can accumulate, and the process-cleaner script can be used to remove them. 25 | 26 | ## How it Works? 27 | 28 | The process-cleaner script queries the DSpace database to identify processes in the specified state (RUNNING, FAILED, or 29 | COMPLETED). It then removes those processes from the database. By default, the process-cleaner script deletes all 30 | processes in the COMPLETED state. The `-r` and `-f` options can be used to delete processes in the RUNNING and FAILED 31 | states, respectively. 32 | 33 | ## Parameters 34 | 35 | This script has the following parameters: 36 | 37 | | Parameter | Description | 38 | |----------------------------|----------------------------------------------------------------------------------| 39 | | - `-h`,
`--help` | Print the help message. | 40 | | - `-r`,
`--running` | Delete the process with RUNNING status. | 41 | | - `-f`,
`--failed` | Delete the process with FAILED status. | 42 | | - `-c`,
`--completed` | Delete the process with COMPLETED status (default if no statuses are specified). | 43 | 44 | ## Conclusion/QuickGuide: 45 | 46 | In conclusion, the process-cleaner script is a useful tool for cleaning up old processes in DSpace. By removing old 47 | processes, you can free up resources on the server and ensure that the system is running efficiently. To use the script, 48 | specify the desired process state to remove. 49 | -------------------------------------------------------------------------------- /scripts/retry-tracker.md: -------------------------------------------------------------------------------- 1 | # retry-tracker script 2 | [Back to the script index](index.md) 3 | 4 | * [retry-tracker script](#retry-tracker-script) 5 | * [What it does?](#what-it-does) 6 | * [Who can use it?](#who-can-use-it) 7 | * [When we use it?](#when-we-use-it) 8 | * [How it Works?](#how-it-works) 9 | * [Parameters](#parameters) 10 | * [Conclusion/QuickGuide:](#conclusionquickguide) 11 | 12 | ## What it does? 13 | 14 | The retry-tracker script is used to retry failed commits to the OpenURLTracker in DSpace. The OpenURLTracker is used to 15 | track requests made to external systems, such as DOI lookup services, and store metadata about those requests in the 16 | DSpace database. 17 | 18 | Also note 19 | that this script is useful 20 | in [exchanging usage statistics information with IRUS](https://wiki.lyrasis.org/display/DSDOC7x/Exchange+usage+statistics+with+IRUS). 21 | 22 | ## Who can use it? 23 | 24 | This script can be used only by repository administrators. 25 | 26 | ## When we use it? 27 | 28 | When occasionally, these requests may fail due to network or service issues, and the retry-tracker script can be used to 29 | retry those failed requests. 30 | 31 | ## How it Works? 32 | 33 | The retry-tracker script queries the DSpace database to identify URLs that have been marked as failed in the 34 | OpenURLTracker table. It then attempts to resend those failed requests. This can be useful in situations where requests 35 | fail due to temporary network or service issues. 36 | 37 | The `-a` option can be used to add a new URL to the OpenURLTracker table for testing purposes. This is useful for 38 | testing the Retry-Tracker script without waiting for a real request to fail. 39 | 40 | ## Parameters 41 | 42 | The following parameters are available for the Retry-Tracker script: 43 | 44 | | Parameter | Description | 45 | |---------------------|:----------------------------------------------------------------------------------------------------------------------------------------------| 46 | | `-a ` | Add a new "failed" row to the table with a URL (test purposes only). | 47 | | `-r` | Retry sending requests to all URLs stored in the table with failed requests. This includes the URL that can be added through the `-a` option. | 48 | | `-h`,
`--help` | Print the help message. | 49 | 50 | ## Conclusion/QuickGuide: 51 | 52 | The retry-tracker script is a helpful tool for retrying failed requests to external systems in DSpace. It can help 53 | ensure that important requests are not lost due to temporary network or service issues. If you experience frequent 54 | issues with failed requests, the Retry-Tracker script may be a useful tool to add to your DSpace workflow. 55 | -------------------------------------------------------------------------------- /scripts/solr-database-resync.md: -------------------------------------------------------------------------------- 1 | # solr-database-resync script 2 | [Back to the script index](index.md) 3 | 4 | * [solr-database-resync script](#solr-database-resync-script) 5 | * [What it does?](#what-it-does) 6 | * [Who can use it?](#who-can-use-it) 7 | * [When we use it?](#when-we-use-it) 8 | * [How it Works?](#how-it-works) 9 | * [Parameters](#parameters) 10 | * [Conclusion/QuickGuide:](#conclusionquickguide) 11 | 12 | ## What it does? 13 | 14 | This script updates the database status of items in Solr. 15 | 16 | ## Who can use it? 17 | 18 | This script can be used only by repository administrators. 19 | 20 | ## When we use it? 21 | 22 | The script is typically used when there is a mismatch between the database and the Solr index, which can happen if 23 | changes are made to the database outside of DSpace, or if there are errors during indexing. The status in the Solr index 24 | may become out of sync with the status in the database, causing issues with search results. 25 | 26 | ## How it Works? 27 | 28 | When an item is added to DSpace, its metadata is stored in the database, and an index is created in Solr. The solr index 29 | includes a "status" field, which indicates whether the item is "in archive", "withdrawn", or "discoverable". If changes 30 | are made to the database outside of DSpace, or if there are errors during indexing, the status in the Solr index may 31 | become out of sync with the status in the database. 32 | 33 | The solr-database-resync script updates the database status of items in Solr based on the current index state. The 34 | script retrieves all items from the Solr index, along with their status. It then queries the database to retrieve the 35 | current status of each item and updates the status in the database if necessary. Finally, it triggers a reindex of each 36 | item to ensure that the Solr index is updated with the correct status. 37 | 38 | ## Parameters 39 | 40 | The script takes no parameters. 41 | 42 | | Parameter | Description | 43 | |--------------|-------------| 44 | | no parameter | | 45 | 46 | ## Conclusion/QuickGuide: 47 | 48 | The solr-database-resync script is a powerful tool for ensuring that the database and Solr index are in sync. However, 49 | it should be used with caution and only when necessary as it can modify the database status of a large number of items. 50 | It is recommended to back up your database before running this script in case any issues arise. If you encounter issues 51 | with search results or item statuses, this script may be a helpful tool to help diagnose and resolve the issue. 52 | -------------------------------------------------------------------------------- /scripts/subscription-send.md: -------------------------------------------------------------------------------- 1 | # subscription-send script 2 | [Back to the script index](index.md) 3 | 4 | * [subscription-send script](#subscription-send-script) 5 | * [What it does?](#what-it-does) 6 | * [Who can use it?](#who-can-use-it) 7 | * [When we use it?](#when-we-use-it) 8 | * [How it Works?](#how-it-works) 9 | * [Parameters](#parameters) 10 | * [Conclusion/QuickGuide:](#conclusionquickguide) 11 | 12 | ## What it does? 13 | 14 | The subscription-send script is designed to send email notifications related to subscriptions in DSpace. Users can 15 | subscribe to specific communities, collections, or items. 16 | 17 | For more information, 18 | see the [Email Subscription documentation](https://wiki.lyrasis.org/display/DSDOC7x/Email+Subscriptions) 19 | 20 | ## Who can use it? 21 | 22 | This script can be used only by repository administrators. 23 | 24 | ## When we use it? 25 | 26 | The subscription-send script is used to send periodic email updates based on the user's subscription frequency. 27 | 28 | ## How it Works? 29 | 30 | The subscription-send script runs periodically (e.g., daily) on the DSpace server, 31 | and sends email notifications to users 32 | who have subscribed to specific communities, collections, or items. 33 | The script queries the DSpace database to identify 34 | users who have subscribed to specific items, and then generates an email notification for each subscription. 35 | 36 | The script's frequency parameter specifies how often email notifications should be sent. For example, if the frequency 37 | is set to "W" (week), email notifications will be sent once per week to users who have subscribed to items. 38 | 39 | ## Parameters 40 | 41 | The subscription-send script has the following parameter: 42 | 43 | | Parameter | Description | 44 | |----------------------------------|-------------------------------------------------------------------------------------| 45 | | `-f`,
`--frequency ` | The subscription frequency. Valid values include: D (day), W (week), and M (month). | 46 | 47 | ## Conclusion/QuickGuide: 48 | 49 | In conclusion, the subscription-send script is a useful tool for sending email notifications to DSpace users who have 50 | subscribed to specific items. By default, the script runs daily, but the frequency can be adjusted to match the needs of 51 | your institution. If you have issues with users not receiving email notifications for their subscriptions, the 52 | subscription-send script may be a helpful tool to diagnose and resolve the issue. 53 | -------------------------------------------------------------------------------- /search-rels.md: -------------------------------------------------------------------------------- 1 | # Search methods on collection endpoints 2 | [REST Overview Documentation](README.md) 3 | 4 | Individual collection endpoints (e.g. `/api/core/{model}`) may expose search methods (`/api/core/{model}/search`) to return specific subsets of resources. This allows for filtering of the collection (group of resources) to only return specific resources that match the search requirements. Some examples include a search endpoint for only returning top-level Communities (e.g. `/api/core/communities/search/top`) or a search endpoint for only returning WorkspaceItems from a specific Submitter (e.g. `/api/submission/workspaceitems/search/findBySubmitter?uuid=<:submitter-uuid>`). 5 | 6 | Search endpoints on a collection of resources should act as follows: 7 | * All available search methods (for the given resource) should be exposed under `/api/core/{model}/search`. The result should be a HAL document. 8 | * Individual search methods should be exposed under `/api/core/{model}/search/{method-name}` 9 | 10 | **Please note that the [Discovery search](search-endpoint.md) is a completely separate topic** 11 | 12 | ## Endpoints that have Search methods 13 | * [/api/core/communities](communities.md) 14 | * [/api/core/metadatafields/](metadatafields.md) 15 | * [/api/config/submissiondefinitions](submissiondefinitions.md) 16 | * [/api/submission/workspaceitems](workspaceitems.md) 17 | * [/api/workflow/claimedtasks](claimedtasks.md) 18 | * [/api/workflow/pooltasks](pooltasks.md) 19 | * [/api/workflow/workflowitems](workflowitems.md) 20 | -------------------------------------------------------------------------------- /statistics-viewevents.md: -------------------------------------------------------------------------------- 1 | # Collecting user interactions 2 | [Back to the list of all defined endpoints](endpoints.md) 3 | 4 | ## View events endpoint 5 | **POST /api/statistics/viewevents** 6 | 7 | To track a page view, make an HTTP POST request to this endpoint. 8 | 9 | The sections below describe the parameters for a page view event. All other information about the interaction can be derived from the request itself. 10 | 11 | ### Required Parameters 12 | - `targetId`: The id of the object the user viewed 13 | - `targetType`: The type of the object the user viewed 14 | 15 | ### Optional Parameters 16 | - `referrer`: The referrer of the object the user viewed. When this value is not present, it will be derived from the request instead. 17 | 18 | ### Status codes: 19 | 20 | - `201` Created: if the operation succeeded 21 | - `400` Bad request: if any of the parameters are missing or invalid. 22 | - `422` Unprocessable Entity: if the parameters don't refer to a valid object. 23 | 24 | ### Example item page view: 25 | 26 | ```json 27 | { 28 | "targetId": "43f9bb3e-f90d-458f-9858-7e4589481d18", 29 | "targetType": "item", 30 | "referrer": "https://demo7.dspace.org/search" 31 | } 32 | ``` 33 | 34 | 35 | ## Search events Endpoint 36 | **POST /api/statistics/searchevents** 37 | 38 | To track a search, make an HTTP POST request to this endpoint. 39 | 40 | The sections below describe the parameters for a search event. All other information about the interaction can be derived from the request itself. 41 | 42 | ### Required Parameters 43 | - `query`: The discovery search string. 44 | - `page`: An object that describes the pagination status. For more information take a look at the [pagination documentation](README.md#Pagination). 45 | - `sort`: An object that describes the sort status. For more information take a look at the [pagination documentation](README.md#Pagination). 46 | 47 | ### Optional Parameters 48 | - `dsoType`: Limits the search to a specific DSpace Object type. Possible values: 49 | - `all` 50 | - `item` 51 | - `community` 52 | - `collection` 53 | - `scope`: The UUID of a specific DSpace container (site, community or collection) to which the search has to be limited. 54 | - `configuration`: The name of a Discovery configuration that was used by the search. 55 | - `appliedFilters`: An array of search filters used to filter the result set. For more information take a look at the [search documentation](search-endpoint.md#matching-dspace-objects-search-results). 56 | 57 | ### Status codes: 58 | 59 | - `201` Created: if the operation succeeded 60 | - `400` Bad request: if any of the required parameters are missing, or any parameters are invalid. 61 | 62 | ### Example search: 63 | 64 | ```json 65 | { 66 | "query": "Lorem ipsum", 67 | "scope": "a3e80c6d-a83f-4c35-9f27-8718598c6c17", 68 | "configuration": "default", 69 | "appliedFilters": [ 70 | { 71 | "filter" : "title", 72 | "operator" : "notcontains", 73 | "value" : "dolor sit", 74 | "label" : "dolor sit" 75 | }, 76 | { 77 | "filter" : "author", 78 | "operator" : "authority", 79 | "value" : "9zvxzdm4qru17or5a83wfgac", 80 | "label" : "Amet, Consectetur" 81 | } 82 | ], 83 | "sort" : { 84 | "by" : "dc.date.issued", 85 | "order" : "asc" 86 | }, 87 | "page": { 88 | "size": 5, 89 | "totalElements": 14, 90 | "totalPages": 3, 91 | "number": 0 92 | } 93 | } 94 | ``` 95 | 96 | ## Downloads and workflow 97 | 98 | Statistics for file downloads are being generated by REST directly. The actual download is always known in REST, while the UI is not involved if the file download originated from e.g. a direct link from google. 99 | 100 | Workflow action statistics are also already being generated by the internal workflow directly. 101 | -------------------------------------------------------------------------------- /submission.md: -------------------------------------------------------------------------------- 1 | # Submission / Deposit 2 | [REST Overview Documentation](README.md) 3 | 4 | One of the most used features in DSpace is the submission/workflow process. 5 | 6 | Because of its configurability, many different REST endpoints are used during this process. 7 | This page helps provide an overview of how to submit a new Item into DSpace. 8 | 9 | **NOTE: All the activities below require authentication and a valid CSRF token.** 10 | * Don't forget to include the "Authorization" header in every request! See [Authentication](authentication.md). 11 | * Don't forget to include the CSRF token in every request! See [CSRF Tokens](csrf-tokens.md). 12 | 13 | ## Starting a Submission 14 | 15 | In DSpace, a submission is started by creating a WorkspaceItem. The WorkspaceItem acts as an "in progress" submission object. 16 | 17 | To create a WorkspaceItem, just `POST` to [/api/submission/workspaceitems](workspaceitems.md), passing in an owning Collection UUID (as every Item must belong to a Collection) 18 | ``` 19 | POST /api/submission/workspaceitems?owningCollection=<:collection-uuid> 20 | ``` 21 | This POST would create an empty WorkspaceItem by default. 22 | 23 | Alternatively, you can create a WorkspaceItem by uploading a file via a Multipart POST, 24 | or passing an [external entry value](external-authority-sources.md) whose metadata should be imported. 25 | For more information, see "Multipart POST Method" in the [/api/submission/workspaceitems](workspaceitems.md) documentation. 26 | 27 | ## Modifying the Submission 28 | 29 | Once a submission is created (see above), the response will provide a new [/api/submission/workspaceitems](workspaceitems.md) resource. 30 | This is the WorkspaceItem object you created. 31 | 32 | It is **important** to keep the `id` of the WorkspaceItem, as this is necessary to update it or access it again. 33 | For example, using the `id`, you can load up the current state of your WorkspaceItem 34 | ``` 35 | GET /api/submission/workspaceitems/<:id> 36 | ``` 37 | 38 | In the response, you'll see a list of `sections` which are available to complete for this WorkspaceItem. 39 | These `sections` correspond to [/api/config/submissionsections](submissionsections.md). 40 | Each section name is also its `id`, so you can use the section name to get more information via the 41 | that endpoint, e.g. 42 | ``` 43 | # Get info about the "traditionalpageone" section 44 | GET /api/config/submissionsections/traditionalpageone 45 | ``` 46 | The `sectionType` returned in the response will tell you the type of section. This is important 47 | in understanding how to interact with this section. 48 | 49 | Each `sectionType` is separately described below, including notes on how to edit the section 50 | * ["submission-form" section type](workspaceitem-data-metadata.md) - Used to enter metadata 51 | * ["upload" section type](workspaceitem-data-upload.md) - Used to upload files 52 | * ["access" section type](workspaceitem-data-access.md) - Used to edit access rights / embargo 53 | * ["license" section type](workspaceitem-data-license.md) - Used to sign off on the required license agreement 54 | * ["cclicense" section type](workspaceitem-data-cclicense.md) - Use to optionally apply a Creative Commons license 55 | 56 | ## Completing the Submission / Starting Workflow 57 | 58 | In order to complete a submission, it MUST be sent into approval workflow. This is done by `POST`ing an existing 59 | WorkspaceItem to the WorkflowItem endpoint. 60 | 61 | See the "POST Method" of [/api/workflow/workflowitems](workflowitems.md) for examples. 62 | 63 | In DSpace, approval workflow is configured per Collection, and is not enabled by default. 64 | * If the Collection has no approval workflow configured (default), then the Item will become available immediately. 65 | The final Item's UUID will be the same as it was in the WorkspaceItem (i.e. the `uuid` returned via 66 | `/api/submission/workspaceitems/<:id>/item`) 67 | * If the Collection has an approval workflow configured, then a WorkflowItem will be returned. Its `id` can be used 68 | to access the WorkflowItem via `/api/workflow/workflowitems/<:id>`. 69 | -------------------------------------------------------------------------------- /submissionaccessoptions.md: -------------------------------------------------------------------------------- 1 | # SubmissionAccessOptions Endpoints 2 | [Back to the list of all defined endpoints](endpoints.md) 3 | 4 | ## Main Endpoint 5 | **/api/config/submissionaccessoptions** 6 | 7 | Provide access to the existent configurations for the submission access. It returns the list of existent SubmissionAccessConfig. 8 | The SubmissionAccessConfig aggregates in a single place the configuration needed to the access section. 9 | 10 | ## Single Submission-Form 11 | **/api/config/submissionaccessoptions/<:config-name>** 12 | 13 | *:config-name* the access configuration name to retrieve 14 | 15 | Provide detailed information about a specific input-form. The JSON response document is as follows: 16 | ```json 17 | { 18 | "id": "default", 19 | "canChangeDiscoverable": true, 20 | "accessConditionOptions": [ 21 | { 22 | "name": "openaccess" 23 | }, 24 | { 25 | "name": "administrator" 26 | }, 27 | { 28 | "name": "embargo", 29 | "hasStartDate": true, 30 | "maxStartDate": "2018-06-24T00:40:54.970+0000" 31 | }, 32 | { 33 | "name": "lease", 34 | "hasEndDate": true, 35 | "maxEndDate": "2017-12-24T00:40:54.970+0000" 36 | } 37 | ] 38 | } 39 | 40 | ``` 41 | The **canChangeDiscoverable** flag indicates whether or not the user has the opportunity to indicate that the current item must be findable via search or browse. 42 | 43 | The attributes of the objects in the **accessConditionOptions** arrays are as follow: 44 | * The *name* attribute is an identifier that can be used by the REST client (the UI) to present the different options to the user, maybe translating it in an human readable format using i18n, and by the backend to create the ResourcePolicy to apply to the accessed item using and validating the additional inputs provided by the user where required. 45 | * If there is a *hasStartDate* attribute and it is true, the access condition to be applied requires to specify a startDate that must be less or equal than the value of the *maxStartDate* attribute (if null any date is acceptable) 46 | * If there is a *hasEndDate* attribute and it is true, the access condition to be applied requires to specify an endDate that must be less or equal than the value of the *maxEndDate* attribute (if null any date is acceptable). If a startDate is supplied the endDate must be greater than the startDate 47 | 48 | A null value for the accessConditionOptions attribute means that the access step doesn't allow the user to set a policy for the item. The item will get only the policies inherited from the collection. 49 | -------------------------------------------------------------------------------- /submissioncclicenses.md: -------------------------------------------------------------------------------- 1 | # Submission CC Licenses Endpoints 2 | [Back to the list of all defined endpoints](endpoints.md) 3 | 4 | The proposed structure is derived from the configuration options already available in DSpace 6 and below. 5 | In the first implementation, a single configuration named *default* is expected as these configurations were set at the site level. 6 | Introducing an endpoint to manage a collection of configurations we open the door to future extension where different setups can be used for different kind of submissions (theses, technical reports, journal articles, etc.) 7 | 8 | ## Main Endpoint 9 | **/api/config/submissioncclicenses** 10 | 11 | Provide access to the potential licenses for the CC license. It returns the list of configured CC licenses. 12 | 13 | This will correspond to e.g. https://api.creativecommons.org/rest/1.5/ filtered to only include the licenses which are configured for this repository 14 | 15 | ```json 16 | { 17 | "_embedded": { 18 | "submissioncclicenses": [ 19 | { 20 | "id": "publicdomain", 21 | "name": "Public Domain", 22 | "type": "submissioncclicenses", 23 | "fields": [] 24 | }, 25 | { 26 | "id": "mark", 27 | "name": "Public Domain Mark", 28 | "type": "submissioncclicenses", 29 | "fields": [] 30 | } 31 | ] 32 | }, 33 | "page": { 34 | "size": 20, 35 | "totalElements": 2, 36 | "totalPages": 1, 37 | "number": 0 38 | } 39 | } 40 | ``` 41 | 42 | ## Single CC License 43 | **/api/config/submissioncclicenses/<:license-name>** 44 | 45 | Provide detailed information about a specific license. Some licenses are basic, e.g. zero retrieved from https://api.creativecommons.org/rest/1.5/license/zero 46 | ```json 47 | { 48 | "id": "publicdomain", 49 | "name": "CC0", 50 | "type": "submissioncclicenses", 51 | "fields": [], 52 | "_links" : { 53 | "self" : { 54 | "href" : "/api/config/submissioncclicenses/publicdomain" 55 | } 56 | } 57 | } 58 | ``` 59 | 60 | Some licenses contain questions, e.g. standard retrieved from https://api.creativecommons.org/rest/1.5/license/standard 61 | ```json 62 | { 63 | "id": "standard", 64 | "name": "CC0", 65 | "type": "submissioncclicenses", 66 | "fields": [ 67 | { 68 | "id": "commercial", 69 | "label": "Allow commercial uses of your work?", 70 | "description": "The licensor permits others to copy, distribute and transmit the work. In return, licensees may not use the work for commercial purposes — unless they get the licensor's permission.", 71 | "values": [ 72 | { 73 | "id": "y", 74 | "label": "Yes", 75 | "description": "The licensor permits others to copy, distribute, display, and perform the work, including for commercial purposes." 76 | }, 77 | { 78 | "id": "n", 79 | "label": "No", 80 | "description": "The licensor permits others to copy, distribute, display, and perform the work for non-commercial purposes only." 81 | } 82 | ] 83 | }, 84 | { 85 | "id": "derivatives", 86 | "label": "Allow modifications of your work?", 87 | "description": "The licensor permits others to copy, distribute and transmit only unaltered copies of the work — not derivative works based on it.", 88 | "values": [ 89 | { 90 | "id": "y", 91 | "label": "Yes", 92 | "description": "The licensor permits others to copy, distribute, display and perform the work, as well as make derivative works based on it." 93 | }, 94 | { 95 | "id": "sa", 96 | "label": "ShareAlike", 97 | "description": "The licensor permits others to distribute derivative works only under the same license or one compatible with the one that governs the licensor's work." 98 | }, 99 | { 100 | "id": "n", 101 | "label": "No", 102 | "description": "The licensor permits others to copy, distribute and transmit only unaltered copies of the work — not derivative works based on it." 103 | } 104 | ] 105 | } 106 | ], 107 | "_links" : { 108 | "self" : { 109 | "href" : "/api/config/submissioncclicenses/standard" 110 | } 111 | } 112 | } 113 | ``` 114 | 115 | The fields are questions to be answered when assigning the license 116 | 117 | ## Search CC License 118 | **/api/config/submissioncclicenseurls/search/rightsByQuestions** 119 | 120 | This endpoint is used to obtain the final CC License URI after (optionally) providing answers for the given license. 121 | The URI may differ depending on the answers that are provided, and answers are only required if the given license requires them. 122 | To use this endpoint, you must first request information about a specific license using the `/api/config/submissioncclicenses/<:license-name>` endpoint above. 123 | 124 | Parameters: 125 | * license: the ID of the license. This identifier must be a license returned from the `/api/config/submissioncclicenses` endpoint (e.g. standard, publicdomain, …) 126 | * answer_X: List of answers. X must be a valid field ID returned from `/api/config/submissioncclicenses/<:license-name>`, and the answer value must be a valid value ID for that field. (e.g. answer_commercial=y&answer_derivatives=sa) 127 | 128 | If the combination of the license and the answers is valid, it will return the license URI. 129 | 130 | ```json 131 | { 132 | "url": "http://creativecommons.org/licenses/by-sa/3.0/us/", 133 | "type": "submissioncclicenseUrl", 134 | "_links": { 135 | "self": { 136 | "href": "https://dspace7-internal.atmire.com/server/api/config/submissioncclicenses/search/rightsByQuestions?license=standard&answer_commercial=y&answer_derivatives=sa" 137 | } 138 | } 139 | } 140 | ``` 141 | 142 | Response codes: 143 | * 200 OK - if the operation succeeded 144 | * 400 Bad Request - If the answers provided aren't valid or if a required answer is missing 145 | * 401 Unauthorized - if you are not logged in 146 | * 404 Not found - if the provided license isn't valid 147 | -------------------------------------------------------------------------------- /submissioncoarnotifyconfigs.md: -------------------------------------------------------------------------------- 1 | # Submission COAR Notify Endpoints 2 | [Back to the list of all defined endpoints](endpoints.md) 3 | 4 | Provide access to the existing configurations for the submission COAR Notify panel. 5 | The SubmissionCOARNotifyConfig list which request patterns can be selected during the submission. 6 | 7 | In the first implementation, a single configuration named *coarnotify* is expected as these configurations were set at the site level. 8 | Introducing an endpoint to manage a collection of configurations we open the door to future extension where different setups can be used for different kind of submissions (theses, technical reports, journal articles, etc.) 9 | 10 | ## Main Endpoint 11 | **/api/config/submissioncoarnotifyconfigs** 12 | 13 | Returns the list of configured COAR notify patterns to be offered during the submission. 14 | 15 | ```json 16 | { 17 | "_embedded" : { 18 | "submissioncoarnotifyconfigs" : [ { 19 | "id" : "coarnotify", 20 | "patterns" : [ { 21 | "pattern" : "request-review", 22 | "multipleRequest" : true 23 | }, { 24 | "pattern" : "request-endorsement", 25 | "multipleRequest" : true 26 | }, { 27 | "pattern" : "request-ingest", 28 | "multipleRequest" : false 29 | } ], 30 | "type" : "submissioncoarnotifyconfig", 31 | "_links" : { 32 | "self" : { 33 | "href" : "http://localhost/api/config/submissioncoarnotifyconfigs/coarnotify" 34 | } 35 | } 36 | } ] 37 | }, 38 | "_links" : { 39 | "self" : { 40 | "href" : "http://localhost/api/config/submissioncoarnotifyconfigs" 41 | } 42 | }, 43 | "page" : { 44 | "size" : 20, 45 | "totalElements" : 1, 46 | "totalPages" : 1, 47 | "number" : 0 48 | } 49 | } 50 | ``` 51 | 52 | Status codes: 53 | * 200 OK - if the operation succeeded 54 | * 401 Unauthorized - if you are not authenticated. The endpoint is restricted to authenticated users 55 | 56 | 57 | ## Single COAR notify 58 | **/api/config/submissioncoarnotifyconfigs/<:coarnotify-name>** 59 | 60 | *:coarnotify-name* is initially hard-coded to *coarnotify* 61 | 62 | Provide detailed information about a specific COAR notify. 63 | ```json 64 | { 65 | "id" : "coarnotify", 66 | "patterns" : [ { 67 | "pattern" : "request-review", 68 | "multipleRequest" : true 69 | }, { 70 | "pattern" : "request-endorsement", 71 | "multipleRequest" : true 72 | }, { 73 | "pattern" : "request-ingest", 74 | "multipleRequest" : false 75 | } ], 76 | "type" : "submissioncoarnotifyconfig", 77 | "_links" : { 78 | "self" : { 79 | "href" : "http://localhost/api/config/submissioncoarnotifyconfigs/coarnotify" 80 | } 81 | } 82 | } 83 | ``` 84 | 85 | Status codes: 86 | * 200 OK - if the operation succeeded 87 | * 401 Unauthorized - if you are not authenticated. The endpoint is restricted to authenticated users 88 | * 404 Not found - if the requested submission COAR Notify Config doesn't exist -------------------------------------------------------------------------------- /submissiondefinitions.md: -------------------------------------------------------------------------------- 1 | # Submission-Definitions Endpoints 2 | [Back to the list of all defined endpoints](endpoints.md) 3 | 4 | A submission-definition is defined globally or per collection. It defines an overall submission process, consisting of a series of "sections" (previously than DSpace 7 known as Steps). 5 | 6 | ## Main Endpoint 7 | **/api/config/submissiondefinitions** 8 | 9 | Provide access to the configured submission definitions. It returns the list of existent submission-definitions. 10 | 11 | Example: to be provided 12 | 13 | ## Single Submission-Definition 14 | **/api/config/submissiondefinitions/<:definition-name>** 15 | 16 | Provide detailed information about a specific submission-definition. The JSON response document is as follow 17 | ```json 18 | { 19 | "name": "traditional", 20 | "isDefault": true, 21 | "type": "submission-definition" 22 | } 23 | 24 | ``` 25 | 26 | Exposed links: 27 | * collections: list of collections that explicitly use such submission-definition 28 | * sections: list of submission-section included in this definition 29 | 30 | ### Search methods 31 | #### findByCollection 32 | **/api/config/submissiondefinitions/search/findByCollection?uuid=<:collection-uuid>** 33 | 34 | It returns the submission definition that apply to a specific collection eventually fallback to the default configuration 35 | 36 | ### Linked entities 37 | #### collections 38 | **/api/config/submissiondefinitions/<:definition-name>/collections** 39 | 40 | It returns the list of collection that make an explicit use of the submission-definition. If a collection doesn't specify the submission-definition to be used the default mapping apply but this collection is not included in the list returned by this method 41 | 42 | #### sections 43 | **/api/config/submissiondefinitions/<:definition-name>/sections** 44 | 45 | It returns the list of submission-sections used in the submission-definition, see [submissionsections.md](submissionsections.md#Single Submission-Section) 46 | -------------------------------------------------------------------------------- /submissionsection-types.md: -------------------------------------------------------------------------------- 1 | # Submission Section Types 2 | [Submission-Sections Endpoints](submissionsections.md) 3 | 4 | The following table summarize for each sectionType available out-of-box in DSpace 7 the endpoint used to retrieve the extra configuration where needed and the link to the documentation about the data representation returned in the workspaceitem 5 | 6 | sectionType | configuration endpoint | data representation 7 | ------------ | ------------- | ------------- 8 | collection | n/a | ```json { collection: 'uuid-of-the-collection'}``` 9 | submission-form | [/config/submissionforms](submissionforms.md) | [example](workspaceitem-data-metadata.md) 10 | upload | [/config/submissionuploads](submissionuploads.md) | [example](workspaceitem-data-upload.md) 11 | license | [it is retrieved from the collection following the *license* link](collections.md#License) | [example](workspaceitem-data-license.md) 12 | cclicense | [/config/submissioncclicenses](submissioncclicenses.md) | [example](workspaceitem-data-cclicense.md) 13 | access | [/config/submissionaccessoptions](submissionaccessoptions.md) | [example](workspaceitem-data-access.md) 14 | sherpaPolicies | n/a | [example](workspaceitem-data-sherpa-policy.md) 15 | identifiers | n/a | [example](workspaceitem-data-identifiers.md) 16 | duplicates | n/a | [example](workspaceitem-data-duplicates.md) 17 | 18 | n/a --> not applicable. The sectionType doesn't require/support any extra configuration -------------------------------------------------------------------------------- /submissionsections.md: -------------------------------------------------------------------------------- 1 | # Submission-Sections Endpoints 2 | [Back to the list of all defined endpoints](endpoints.md) 3 | 4 | A submission-section represents a single section in the submission process. Depending on its type, it may include a configurable input form (if type='submission-form'). However, not all sections are currently configurable, and other types of steps include file upload, embargo/access rights, creative commons licensing, etc. 5 | A list of the [available sectionType is provided here](submissionsection-types.md) 6 | 7 | ## Main Endpoint 8 | **/api/config/submissionsections** 9 | 10 | Provide access to the configured submission sections. It returns the list of existent submission-sections. 11 | 12 | Example: to be provided 13 | 14 | ## Single Submission-Definition 15 | **/api/config/submissionsections/<:section-name>** 16 | 17 | Provide detailed information about a specific submission-section. The JSON response document is as follow 18 | ```json 19 | { 20 | id: "id-of-the-submission-form-page", 21 | header: "First page", 22 | mandatory: true, 23 | sectionType: "submission-form", 24 | scope: null, 25 | type: "submissionsection", 26 | _links: { 27 | "config" : "/config/submissionforms/<:id-of-the-submission-form-page>" 28 | } 29 | } 30 | ``` 31 | 32 | * the *header* attribute is the label or the i18n key to use to present the section to the user 33 | * the *mandatory* attribute defines if the section MUST be used by each submission. Otherwise, the user is allowed to enable/disable the section interacting with the workspaceitem 34 | * the *scope* attribute can be null or one of the values: workflow or submission. A value other than *null* mean that the section will be only available during the specified phase 35 | * the *sectionType* attribute defines the kind of section that the UI will need to use to interact with the data. See the [documentation about the available values for sectionType provided here](submissionsection-types.md) 36 | 37 | 38 | ## Linked Entities 39 | ### config 40 | 41 | It returns the endpoint to use to access a detailed, sectionType dependent, configuration to be used in the panel. Such as the list of fields to include in a form based panel, the upload and access condition options for an upload panel, etc. 42 | See the [documentation about the available values for sectionType provided here](submissionsection-types.md) -------------------------------------------------------------------------------- /submissionuploads.md: -------------------------------------------------------------------------------- 1 | # SubmissionUploads Endpoints 2 | [Back to the list of all defined endpoints](endpoints.md) 3 | 4 | The proposed structure is derived from the configuration options already available in DSpace 6 and below. In the first implementation, a single configuration named *default* is expected as these configurations were set at the site level. Introducing an endpoint to manage a collection of configurations we open the door to future extension where different setups can be used for different kind of submissions (theses, technical reports, journal articles, etc.) 5 | 6 | ## Main Endpoint 7 | **/api/config/submissionuploads** 8 | 9 | Provide access to the existent configurations for the submission upload. It returns the list of existent SubmissionUploadConfig. 10 | The SubmissionUploadConfig aggregates in a single place the configuration needed to the upload section such as the max allowed size for the files, the access condition options, etc. 11 | 12 | Example: to be provided 13 | 14 | ## Single Submission-Form 15 | **/api/config/submissionuploads/<:upload-name>** 16 | 17 | *:upload-name* is initially hard-coded to *default* 18 | 19 | Provide detailed information about a specific input-form. The JSON response document is as follows: 20 | ```json 21 | { 22 | "id": "default", 23 | "required": true, 24 | "max-size": 536870912, 25 | "accessConditionOptions": [ 26 | { 27 | "name": "openaccess" 28 | }, 29 | { 30 | "name": "administrator" 31 | }, 32 | { 33 | "name": "embargo", 34 | "hasStartDate": true, 35 | "maxStartDate": "2018-06-24T00:40:54.970+0000" 36 | }, 37 | { 38 | "name": "lease", 39 | "hasEndDate": true, 40 | "maxEndDate": "2017-12-24T00:40:54.970+0000" 41 | } 42 | ] 43 | } 44 | 45 | ``` 46 | The attributes of the objects in the accessConditionOptions arrays are as follow: 47 | * The *name* attribute is an identifier that can be used by the REST client (the UI) to present the different options to the user, maybe translating it in an human readable format using i18n, and by the backend to create the ResourcePolicy to apply to the uploaded file using and validating the additional inputs provided by the user where required. 48 | * If there is a *hasStartDate* attribute and it is true, the access condition to be applied requires to specify a startDate that must be less or equal than the value of the *maxStartDate* attribute (if null any date is acceptable) 49 | * If there is a *hasEndDate* attribute and it is true, the access condition to be applied requires to specify an endDate that must be less or equal than the value of the *maxEndDate* attribute (if null any date is acceptable). If a startDate is supplied the endDate must be greater than the startDate 50 | 51 | A null value for the accessConditionOptions attribute means that the upload step doesn't allow the user to set a policy for the file. The file will get only the policies inherited from the collection. 52 | 53 | Exposed links: 54 | * metadata: it is a link to the submission-form to use for the files metadata 55 | 56 | ### Linked entities 57 | #### metadata 58 | **/api/config/submissionuploads/:upload-name/metadata** 59 | The [submission-form](submissionforms.md) used for the metadata of the files 60 | -------------------------------------------------------------------------------- /suggestionsources.md: -------------------------------------------------------------------------------- 1 | # Suggestion Sources Endpoints 2 | [Back to the list of all defined endpoints](endpoints.md) 3 | 4 | ## Main Endpoint 5 | **/api/integration/suggestionsources** 6 | 7 | It returns a paginated list of suggestion sources. All the sources are returned regardless to the existence or less of suggestions. This endpoint is reserved to administrators 8 | 9 | ### single entry 10 | **GET api/integration/suggestionsources/<:source-key>** 11 | 12 | It returns the data from a specific source. This endpoint is reserved to administrators 13 | 14 | sample for a source /api/integration/suggestionsources/reciter 15 | ```json 16 | { 17 | "id": "reciter", 18 | "total": 2, 19 | "type": "suggestionsource", 20 | "_links": { 21 | "self": { 22 | "href": "https://dspace7.4science.cloud/server/api/integration/suggestionsources/reciter" 23 | } 24 | } 25 | } 26 | ``` 27 | 28 | Attributes 29 | * the *id* attribute is the key that identify the source 30 | * the *total* attribute is the number of target with suggestions. It can be 0 if there are no target with suggestions 31 | 32 | Exposed links: 33 | 34 | 35 | Status codes: 36 | * 200 Ok - if the operation succeed 37 | * 401 Unauthorized - if you are not authenticated 38 | * 403 Forbidden - if you are not logged in with sufficient permissions 39 | * 404 Not found - if the source doesn't exist or is not active in the system (when 403 doesn't apply) 40 | -------------------------------------------------------------------------------- /supervisionorders.md: -------------------------------------------------------------------------------- 1 | # Supervision Orders Endpoints 2 | [Back to the list of all defined endpoints](endpoints.md) 3 | 4 | This endpoint is used to create, handle and find supervision orders. 5 | 6 | ## Main Endpoint 7 | **/api/core/supervisionorders** 8 | 9 | Provides paginated information about all supervision orders defined in the system. See next paragraph for details about how supervision orders information is displayed. 10 | 11 | ## Single Supervision Order 12 | **/api/core/supervisionorders/<:id>** 13 | 14 | Provides information about a single supervision order defined into the system 15 | 16 | ```json 17 | { 18 | "id": 42, 19 | "_links": { 20 | "item": { 21 | "href": "https://demo.dspace.org/server/api/core/items/092b59e8-8159-4e70-98b5-93ec60bd3431" 22 | }, 23 | "group": { 24 | "href": "https://demo.dspace.org/server/api/eperson/groups/4ebb837c-c2ae-4928-9bb1-6f51df4eeb60" 25 | } 26 | } 27 | ``` 28 | Supervision order properties: 29 | * id: the identifier assigned to the supervision order 30 | 31 | Exposed links: 32 | * item: the item on which this supervision order is defined 33 | * group: the group that can supervise the item 34 | 35 | Status codes: 36 | * 200 OK - if the item is found and it is visible to the current user. 37 | * 401 Unauthorized - if you are not authenticated. 38 | * 403 Forbidden - if you are not logged in with sufficient permissions (Administrators). 39 | * 404 Not found - if the supervision order doesn't exist 40 | 41 | 42 | ## Search methods 43 | 44 | ### Find by Item 45 | **/api/core/supervisionorders/search/byItem?uuid=<:item-uuid1>** 46 | 47 | This method returns a list of supervision orders defined for an item whose uuid is passed as parameter to the query 48 | 49 | The supported parameters are: 50 | * uuid: mandatory. The uuid of the item for which supervision order must be found 51 | 52 | 53 | Return codes: 54 | * 200 OK - if the operation succeed. Including the case where item exists but does not have any supervision order defined. 55 | * 400 Bad Request - if uuid parameter is missing or syntactically invalid (not an uuid) 56 | * 404 Not found - if no items are found for the uuid.. 57 | 58 | ## Creating a supervision order 59 | 60 | **POST /api/core/supervisionorders?uuid=<:item uuid>&group=<:group uuid>&type=<:type>** 61 | 62 | The supported parameters are: 63 | * uuid: mandatory. The uuid of the item for which supervision order must be created 64 | * group: mandatory. The uuid of the group whose members will be supervisors 65 | * type: mandatory. The type of permissions to be granted to above group's members: 66 | * NONE: no grants 67 | * EDITOR: READ and WRITE permissions will be added to item and its bitstreams 68 | * OBSERVER: READ permissions will be added to item and its bitstreams 69 | 70 | A sample CURL command would be: 71 | ``` 72 | curl -i -X POST 'https://demo.dspace.org/server/api/core/supervisionorders?uuid=&group=&type=NONE' -H 'Authorization: Bearer eyJrasdfw…' 73 | ``` 74 | 75 | * 201 Created - if the operation succeed 76 | * 401 Unauthorized - if you are not authenticated 77 | * 400 Bad Request - if both or one among the uuid or group parameter is missing or syntactically invalid (not an uuid), or if they resolve to an unexpected DSpace Object type. 78 | * 403 Forbidden - if you are not logged in with sufficient permissions (Administrator) 79 | * 422 Unprocessable Entity - if one among item or group does not exist, if a supervision order for the same group already exists, or if the item referenced by uuid is not an inprogress submission. A Supervision order can be created only when the item is in the submission or workflow process 80 | 81 | 82 | ## Deleting a supervision order 83 | 84 | **DELETE /api/core/supervisionorders/<:id>** 85 | 86 | Delete a supervision order. 87 | 88 | A sample CURL command would be: 89 | ``` 90 | curl -D - -XDELETE 'https://demo.dspace.org/server/api/core/supervisionorders/42' -H 'Authorization: Bearer eyJhafsdf…' 91 | ``` 92 | 93 | Return codes: 94 | * 204 No content - if the operation succeed 95 | * 401 Unauthorized - if you are not authenticated 96 | * 403 Forbidden - if you are not logged in with sufficient permissions (Administrator) 97 | * 404 Not found - if the supervision order doesn't exist 98 | -------------------------------------------------------------------------------- /systemwidealerts.md: -------------------------------------------------------------------------------- 1 | # System-wide alerts 2 | [Back to the list of all defined endpoints](endpoints.md) 3 | 4 | This endpoint exposes system-wide alerts to be shown as banners in the frontend. 5 | Only administrators are allowed to create and edit these alerts, while all other users can view them. 6 | Alerts are only shown to regular users when set to "active"; only administrators can see inactive alerts. 7 | 8 | This feature will be expanded in the future 9 | * DSpace currently only supports a single system-wide alert, but the endpoints are designed to accomodate multiple alerts 10 | * Alerts can specify whether/how user sessions should be restricted while the alert is active, but this is a placeholder as session control has not been implemented yet. 11 | 12 | ## Retrieve all active alerts 13 | **GET /api/system/systemwidealerts/search/active** 14 | Returns all currently active alerts; used to determine which alerts to show in the UI. 15 | This is the only endpoint non-admin users ever need to interact with. 16 | 17 | Status codes: 18 | * 200 OK - if the operation succeeded 19 | 20 | 21 | ## Retrieve a specific alert 22 | **GET /api/system/systemwidealerts/<:alert-id>** 23 | This endpoint returns a single system-wide alert by its integer identifier. 24 | If the alert in question is inactive, it will only be exposed to admin users. 25 | For other users it will appear as if no alert exists for the given identifier. 26 | 27 | Example response: 28 | ```json 29 | { 30 | "alertId" : 1, 31 | "message" : "This message will show up in the banner", 32 | "allowSessions" : "all", 33 | "countdownTo" : "2023-04-05T00:00:00.000+00:00", 34 | "active" : true, 35 | "type" : "systemwidealert", 36 | "_links" : { 37 | "self" : { 38 | "href" : "http://localhost:8080/server/api/system/systemwidealerts/1" 39 | } 40 | } 41 | } 42 | ``` 43 | 44 | Status codes: 45 | * 200 OK - if the operation succeeded 46 | * 404 Unauthorized - if the requested alert is inactive and the user is not an admin 47 | 48 | 49 | ## Retrieve all alerts 50 | **GET /api/system/systemwidealerts** 51 | This endpoint returns a list of all system-wide alerts. 52 | Inactive alerts are included 53 | 54 | Status codes: 55 | * 200 OK - if the operation succeeded 56 | * 401 Unauthorized - if not logged in 57 | * 403 Forbidden - if logged in as a non-admin user 58 | 59 | 60 | ## Create a new alert 61 | **POST /api/system/systemwidealerts** 62 | This endpoint allows administrators to create a new system-wide alert. 63 | 64 | Example request: 65 | ```json 66 | { 67 | "message": "Alert message to show in the banner", 68 | "allowSessions": "admin", 69 | "countdownTo": "2023-04-05T00:00:00.000Z", 70 | "active": true 71 | } 72 | ``` 73 | 74 | The value of `countdownTo` must be a UTC datetime string. 75 | 76 | The possible values for `allowSessions` are 77 | * "all": allow all sessions 78 | * "current": allow current sessions only (admins will still be allowed to log in) 79 | * "admin": allow admin sessions only (other users will be logged out) 80 | 81 | Status codes: 82 | * 201 Created - if the operation succeeded 83 | * 400 Bad request - if a system-wide alert already exists in the database 84 | * 401 Unauthorized - if not logged in 85 | * 403 Forbidden - if logged in as a non-admin user 86 | * 422 Unprocessable Entity - if the request body cannot be parsed 87 | 88 | 89 | ## Modify an existing alert 90 | **PUT /api/system/systemwidealerts/<:alert-id>** 91 | This endpoint allows administrators to edit an existing system-wide alert. 92 | 93 | Example request: 94 | ```json 95 | { 96 | "message": "Another message", 97 | "allowSessions": "all", 98 | "countdownTo": "2024-05-06T00:00:00.000Z", 99 | "active": true 100 | } 101 | ``` 102 | 103 | The value of `countdownTo` must be a UTC datetime string. 104 | 105 | The possible values for `allowSessions` are 106 | * "all": allow all sessions 107 | * "current": allow current sessions only (admins will still be allowed to log in) 108 | * "admin": allow admin sessions only (other users will be logged out) 109 | 110 | Status codes: 111 | * 200 OK - if the operation succeeded 112 | * 401 Unauthorized - if not logged in 113 | * 403 Forbidden - if logged in as a non-admin user 114 | * 404 Not found - if no alert exists for the requested identifier 115 | * 422 Unprocessable entity - if the request body cannot be parsed 116 | -------------------------------------------------------------------------------- /versionhistories.md: -------------------------------------------------------------------------------- 1 | # Version history endpoints 2 | 3 | [Back to the list of all defined endpoints](endpoints.md) 4 | 5 | This endpoint represents the version history that group all related versions. 6 | 7 | Whether version history information is accessible depends on versioning.item.history.view.admin configuration 8 | If this is set to true, the version history can only be retrieved if the user is a community, collection or repository administrator, otherwise the version histories are public. 9 | Please note that the security of the version history is in no way related to any of the items that belong to it. 10 | It is eventually possible to retrieve an history containing only not accessible items. As the version history neither the single version expose any sensitive information this pose no security risks. 11 | 12 | ## Main Endpoint 13 | **/api/versioning/versionhistories** 14 | 15 | _Unsupported._ Version histories can only be navigated starting from a specific version item or accessed directly by id 16 | 17 | Status codes: 18 | * 405 Method Not Allowed 19 | 20 | ## Get version history 21 | 22 | **GET /api/versioning/versionhistories/<:versionHistoryId>** 23 | 24 | Provide information about for a version history id. 25 | 26 | ```json 27 | { 28 | "id": "1", 29 | "draftVersion": false, 30 | "type": "versionhistory", 31 | "_links": { 32 | "self": { 33 | "href": "https://demo7.dspace.org/server/api/versioning/versionhistories/1" 34 | }, 35 | "versions": { 36 | "href": "https://demo7.dspace.org/server/api/versioning/versionhistories/1/versions" 37 | }, 38 | "draftVersion": { 39 | "href": "https://demo7.dspace.org/server/api/versioning/versionhistories/1/draftVersion" 40 | } 41 | } 42 | } 43 | ``` 44 | Attributes: 45 | - draftVersion: true, if the most recent version is associated to an item still in progress (workspace or workflow), false otherwise. This attribute is only visible to users allowed to create a new version in the history, see [Create version endpoint](versions.md#Create version) 46 | 47 | Status codes: 48 | * 200 OK - if the version history exists and is accessible by the current user 49 | * 401 Unauthorized - if you are not authenticated and versioning is not public 50 | * 403 Forbidden - if you are not logged in with sufficient permissions and versioning is not public 51 | * 404 Not found - if you have the permission to review the version history and it doesn't exist 52 | 53 | ## Linked entities 54 | 55 | ### Versions 56 | 57 | **GET /api/versioning/versionhistories/<:versionHistoryId>/versions** 58 | 59 | Retrieve a pageable list of versions for the provided version history identifier. 60 | The versions are ordered by version number descending and attributes are secured as described in the [get single version endpoint](versions.md#get-single-version). 61 | Only versions related to archived or withdrawn items are return, the most recent version will be excluded from this list if it is not yet archived. 62 | 63 | ```json 64 | { 65 | "_embedded": { 66 | "versions": [ 67 | { 68 | "id": "102", 69 | "version": "2", 70 | "type": "version", 71 | "created": "2019-10-31T09:44:46.617", 72 | "summary": "Author order" 73 | }, 74 | { 75 | "id": "101", 76 | "version": "1", 77 | "type": "version", 78 | "created": "2015-11-03T09:44:46.617", 79 | "summary": "Fixing some typos in the abstract" 80 | } 81 | ], 82 | "_links": { 83 | "self": { 84 | "href": "https://demo7.dspace.org/server/api/versioning/versions/search/findByHistory?historyId=1" 85 | } 86 | }, 87 | "page": { 88 | "size": 20, 89 | "totalElements": 2, 90 | "totalPages": 1, 91 | "number": 0 92 | } 93 | } 94 | } 95 | ``` 96 | 97 | Return codes: 98 | * 200 OK - if the operation succeeds 99 | * 401 Unauthorized - if you are not authenticated and versioning is not public 100 | * 403 Forbidden - if you are not logged in with sufficient permissions and versioning is not public 101 | 102 | ### draftVersion 103 | 104 | **GET /api/versioning/versionhistories/<:versionHistoryId>/draftVersion** 105 | 106 | If the latest version is not yet archived, provide access to the workspaceitem or workflowitem associated with it. 107 | The link will respect the security defined in the workspaceitem or workflowitem endpoint so it could be not visible to user otherwise allowed to create a new version in the history. 108 | For this scenario the `draftVersion` flag allows the UI to turn off the "create new version" button. 109 | Due to the restriction applied to this flag anonymous users will be unable to discover that a new version is currently under review. 110 | -------------------------------------------------------------------------------- /workflowactions.md: -------------------------------------------------------------------------------- 1 | # Workflow Actions Endpoints 2 | [Back to the list of all defined endpoints](endpoints.md) 3 | 4 | A workflow action represents a single action in the reviewing process, e.g. the accept/reject action. 5 | 6 | All endpoints mentioned here require authentication, but no specific permissions. 7 | 8 | ## Main Endpoint 9 | **/api/config/workflowactions** 10 | 11 | The main endpoint is not implemented and a 405 error code is returned according to our [general error response codes](README.md#Error codes). 12 | 13 | ## Single Workflow Action Definition 14 | **/api/config/workflowactions/<:action-name>** 15 | 16 | Provide detailed information about a specific workflow action. An example JSON response document: 17 | ```json 18 | { 19 | "id": "editaction", 20 | "advanced": "false", 21 | "options": [ 22 | "approve", 23 | "reject", 24 | "edit_metadata" 25 | ], 26 | "type": "workflowaction" 27 | } 28 | ``` 29 | 30 | The **options** property contains the list of actions the user is authorized to perform in this step: 31 | * The **edit_metadata** option implies the user can use the PATCH on the workflow item's submission sections to edit the metadata. 32 | * Other options are considered to be command options sent to REST using a [POST to the claimed task](claimedtasks.md#post-method-single-resource-level) 33 | 34 | The **advanced** property on a workflow step is `false` by default. 35 | When it's true (when `advancedOptions` is not empty), the action has more advanced behavior than simple buttons. 36 | When this advanced action/option requires additional info about what to do from the rest, this will be put in `advancedInfo` 37 | For new advanced steps this will require you to create an implementation of `ActionAdvancedInfo`, with corresponding REST & Angular classes. 38 | 39 | Some samples are (see json of them below): 40 | * `assign_eperson` will show an EPerson lookup on a workflow task page 41 | * `rating` will show an option to enter a score on a workflow task page 42 | 43 | Although `edit_metadata` is also advanced button with custom behavior, in the sense that the 'Edit' option/button in the second step of the regular workflow, will also open into a separate page, where you can edit the workflow item submission metadata fields (copy of submission form), a page which was already implemented before introduction of advanced workflow steps. The current implementation deviates too much to fit in this framework. In general we'll assume that an advanced workflow step will result in a page containing a simple metadata overview of the workflow item, preceded by a section containing the advanced workflow step actions, as supported/configured by the info in `advancedOptions`. 44 | 45 | The **advancedOptions** property contains the list of actions which need the advanced functionality. 46 | 47 | In some cases, the options may need extra info. The **advancedInfo** property contains that info, for the actions which require the extra details 48 | These are added to rest via `ActionAdvancedInfo` and can be configured in `workflow-actions.xml` 49 | ``` 50 | 51 | 52 | 53 | 54 | ``` 55 | 56 | Sample for selecting reviewer(s) who will perform a subsequent step: 57 | ```json 58 | { 59 | "id": "selectrevieweraction", 60 | "advanced": "true", 61 | "options": [ 62 | "submit_select_reviewer" 63 | ], 64 | "advancedOptions": [ 65 | "submit_select_reviewer" 66 | ], 67 | "advancedInfo": [ 68 | { 69 | "group": "617cf46b-535c-42d5-9d22-327ce2eff6dc", 70 | "type": "action_info_submit_select_reviewer", 71 | "id": "b1d44ec2815cb282fd41146aab44967b" 72 | } 73 | ], 74 | "type": "workflowaction" 75 | } 76 | ``` 77 | 78 | To perform the action with selected reviewer(s) will be done by a request of the form (at least one eperson required): 79 | ``` 80 | POST /server/api/workflow/claimedtasks/{id} 81 | with form data 82 | submit_select_reviewer=true&eperson={reviewerEPersonId1}&eperson={reviewerEPersonId2} 83 | ``` 84 | 85 | Sample for entering a review with a score: 86 | ```json 87 | { 88 | "id": "scorereviewaction", 89 | "advanced": "true", 90 | "options": [ 91 | "submit_score" 92 | ], 93 | "advancedOptions": [ 94 | "submit_score" 95 | ], 96 | "advancedInfo": [ 97 | { 98 | "descriptionRequired": "true", 99 | "maxValue": "5", 100 | "type": "action_info_submit_score", 101 | "id": "c969a40a9ebd3d08e210a5e59a4f4e0e" 102 | } 103 | ], 104 | "type": "workflowaction" 105 | } 106 | ``` 107 | 108 | To perform the action with selected reviewer(s) will be done by a request of the form (description optional): 109 | ``` 110 | POST /server/api/workflow/claimedtasks/{id} 111 | with form data 112 | rating=true&score={scoreGivenValue}&description={reviewEntered} 113 | ``` 114 | -------------------------------------------------------------------------------- /workflowdefinitions.md: -------------------------------------------------------------------------------- 1 | # Workflow Definitions Endpoints 2 | [Back to the list of all defined endpoints](endpoints.md) 3 | 4 | A workflow definition is defined globally or per collection. 5 | It defines the list of steps to use in the workflow per collection, and the default steps. 6 | 7 | All endpoints mentioned here require authentication, but no specific permissions. 8 | 9 | ## Main Endpoint 10 | **/api/config/workflowdefinitions** 11 | 12 | Provide access to the configured workflow definitions. It returns the list of configured workflow-definitions. 13 | 14 | ## Single Workflow Definition 15 | **/api/config/workflowdefinitions/<:definition-name>** 16 | 17 | Provide detailed information about a specific workflow definition. The JSON response document is as follows: 18 | ```json 19 | { 20 | "name": "default", 21 | "isDefault": true, 22 | "type": "workflow-definition" 23 | } 24 | ``` 25 | 26 | Exposed links: 27 | * collections: list of collections that explicitly use such workflow-definition 28 | * steps: list of workflow steps included in this definition 29 | 30 | ### Search methods 31 | #### findByCollection 32 | **/api/config/workflowdefinitions/search/findByCollection?uuid=<:collection-uuid>** 33 | 34 | It returns the workflow definition that applies to a specific collection eventually fallback to the default configuration. 35 | 36 | ### Linked entities 37 | #### collections 38 | **/api/config/workflowdefinitions/<:definition-name>/collections** 39 | 40 | It returns the list of collections that make an explicit use of the workflow-definition. 41 | If a collection doesn't specify the workflow-definition to be used, the default mapping applies, but this collection is not included in the list returned by this method. 42 | 43 | #### steps 44 | **/api/config/workflowdefinitions/<:definition-name>/steps** 45 | 46 | It returns the list of workflow-steps used in the workflow-definition. See [workflowsteps.md](workflowsteps.md). 47 | -------------------------------------------------------------------------------- /workflowsteps.md: -------------------------------------------------------------------------------- 1 | # Workflow Steps Endpoints 2 | [Back to the list of all defined endpoints](endpoints.md) 3 | 4 | A workflow step represents a single step in the reviewing process, e.g. the accept/reject step. 5 | 6 | All endpoints mentioned here require authentication, but no specific permissions. 7 | 8 | ## Main Endpoint 9 | **/api/config/workflowsteps** 10 | 11 | The main endpoint is not implemented and a 405 error code is returned according to our [general error response codes](README.md#Error-codes). 12 | 13 | ## Single Workflow Step Definition 14 | **/api/config/workflowsteps/<:step-name>** 15 | 16 | Provide detailed information about a specific workflow step. An example JSON response document: 17 | ```json 18 | { 19 | "id": "editstep", 20 | "type": "workflowstep", 21 | "_links": { 22 | "workflowactions": { 23 | "href": "https://demo.dspace.org/server/api/config/workflowsteps/<:step-name>/workflowactions" 24 | } 25 | }, 26 | "_embedded": { 27 | "workflowactions": 28 | [ 29 | { 30 | "id": "editaction", 31 | "options": [ 32 | "approve", 33 | "reject", 34 | "edit_metadata" 35 | ], 36 | "type": "workflowaction" 37 | } 38 | ] 39 | } 40 | } 41 | ``` 42 | 43 | It includes the list of workflow actions used in the workflow step. See [Workflow Actions Endpoints](workflowactions.md) for more details 44 | -------------------------------------------------------------------------------- /workspaceitem-data-cclicense.md: -------------------------------------------------------------------------------- 1 | # WorkspaceItem data of CC License sectionType 2 | [Back to the definition of the workspaceitems endpoint](workspaceitems.md) 3 | 4 | The section data represents the data about the CC license 5 | 6 | ```json 7 | { 8 | "uri": "http://creativecommons.org/licenses/by-nc-sa/3.0/us/", 9 | "rights": "Attribution-NonCommercial-ShareAlike 3.0 United States", 10 | "file": 11 | { 12 | "uuid": "1ce6db0e-662f-4a13-ba87-c371ad664b14", 13 | "name": "license_rdf", 14 | "handle": null, 15 | "metadata": { 16 | "dc.title": [ 17 | { 18 | "value": "license_rdf", 19 | "language": null, 20 | "authority": null, 21 | "confidence": -1, 22 | "place": 0 23 | } 24 | ] 25 | }, 26 | "sizeBytes": 1012, 27 | "checkSum": { 28 | "checkSumAlgorithm": "MD5", 29 | "value": "59a4cfd819ce67ba7252efc52d1eb99b" 30 | }, 31 | "sequenceId": 1, 32 | "type": "bitstream" 33 | } 34 | } 35 | ``` 36 | 37 | The following attributes can be defined: 38 | * uri: the URI of the CC License, typically stored in dc.rights.uri, null is no license is granted 39 | * rights: the rights name of the CC License, typically stored in dc.rights, null is no license is granted 40 | * file: the bitstream containing the license, null is no license is granted 41 | 42 | ## Patch operations 43 | The PATCH method expects a JSON body according to the [JSON Patch specification RFC6902](https://tools.ietf.org/html/rfc6902) 44 | 45 | Each successful Patch operation will return a HTTP 200 CODE with the new workspaceitem as body 46 | 47 | ### Add 48 | To accept a CC license the client must send a JSON Patch ADD operation of the uri retrieved from the [Search CC License](submissioncclicenses.md#search-cc-license) 49 | 50 | ```json 51 | [ 52 | { 53 | "op": "add", 54 | "path": "/sections/<:name-of-the-form>/uri", 55 | "value": "http://creativecommons.org/licenses/by-nc-sa/3.0/us/" 56 | } 57 | ] 58 | ``` 59 | 60 | The dc.rights, dc.rights.uri and RDF bitstream will be retrieved from e.g. https://api.creativecommons.org/rest/1.5/details?license-uri=http://creativecommons.org/licenses/by-nc-sa/3.0/ 61 | 62 | Please note that according to the [JSON Patch specification RFC6902](https://tools.ietf.org/html/rfc6902) a subsequent add operation on the `/sections/<:name-of-the-form>/uri` will have the effect to replace the previous granted license with a new one. 63 | In this case a new CC license will be added to the item and the previous license deleted. 64 | 65 | This use of the add operation to replace the license could be counter intuitive but it is done according to the [RFC section 4.1](https://tools.ietf.org/html/rfc6902#section-4.1) 66 | > If the target location specifies an object member that does exist, that member's value is replaced. 67 | 68 | ### Remove 69 | It is possible to remove a previously granted CC license 70 | `curl --data '{[ { "op": "remove", "path": "/sections/<:name-of-the-form>/uri"}]' -X PATCH ${dspace7-url}/api/submission/workspaceitems/1` 71 | -------------------------------------------------------------------------------- /workspaceitem-data-coarnotify.md: -------------------------------------------------------------------------------- 1 | # WorkspaceItem data of COAR Notify sectionType 2 | [Back to the definition of the workspaceitems endpoint](workspaceitems.md) 3 | 4 | The section data represents the data about the selected COAR Notify patterns to request 5 | 6 | ```json 7 | [ 8 | { 9 | "endorsement": [ 1, 2, 3 ], 10 | "review": [ 6 ] 11 | } 12 | ] 13 | ``` 14 | 15 | the attributes represent the pattern that will be requested to the selected service(s), the value of each attribute is the array of the id of the selected services. 16 | The above example shows a submission where three services (id 1, 2, 3) were selected to request an endorsement and one service (id 6) has been selected to request a review. 17 | 18 | ## Patch operations 19 | The PATCH method expects a JSON body according to the [JSON Patch specification RFC6902](https://tools.ietf.org/html/rfc6902) 20 | 21 | Each successful Patch operation will return a HTTP 200 CODE with the updated workspaceitem as body. 22 | 23 | If the requested path doesn't match a valid pattern for the current configuration or a specified service id doesn't exist 422 Unprocessable Entity will be returned. 24 | 25 | ### Add 26 | To specify which services request for a specific pattern 27 | 28 | ```json 29 | [ 30 | { 31 | "op": "add", 32 | "path": "/sections/coarnotify/review/-", 33 | "value": [1, 2, 6] 34 | } 35 | ] 36 | ``` 37 | 38 | ### Replace 39 | To replace the 2nd previous selected service for the endorsement pattern 40 | 41 | ```json 42 | [ 43 | { 44 | "op": "replace", 45 | "path": "/sections/coarnotify/endorsement/1", 46 | "value": 4 47 | } 48 | ] 49 | ``` 50 | 51 | Please note that the number in the path (/1) represent the idx of the previous selected services, the number in the value represent the id of the new selected service. The above path applied to the initial sample 52 | ```json 53 | [ 54 | { 55 | "endorsement": [ 1, 2, 3 ], 56 | "review": [ 6 ] 57 | } 58 | ] 59 | ``` 60 | 61 | will modify the section data as follow 62 | 63 | ```json 64 | [ 65 | { 66 | "endorsement": [ 1, 4, 3 ], 67 | "review": [ 6 ] 68 | } 69 | ] 70 | ``` 71 | 72 | ### Remove 73 | It is possible to remove a previously selected service for a specific pattern (review) 74 | `curl --data '{[ { "op": "remove", "path": "/sections/coarnotify/endorsement/0"}]' -X PATCH ${dspace7-url}/api/submission/workspaceitems/1` 75 | 76 | The result applied to the previous example will be 77 | 78 | ```json 79 | [ 80 | { 81 | "endorsement": [4, 3 ], 82 | "review": [ 6 ] 83 | } 84 | ] 85 | ``` -------------------------------------------------------------------------------- /workspaceitem-data-duplicates.md: -------------------------------------------------------------------------------- 1 | # WorkspaceItem data of identifiers sectionType 2 | [Back to the definition of the workspaceitems endpoint](workspaceitems.md) 3 | 4 | This section data represent a list of potential duplicates associated for this workspace item. 5 | 6 | It is a JSON object with the following structure (matches the response from the [duplicate search endpoint](duplicates.md)) : 7 | 8 | ```json 9 | { 10 | "potentialDuplicates": [ 11 | { 12 | "title": "Example Item", 13 | "uuid": "5ca83276-f003-460d-98b6-dd3c30708749", 14 | "owningCollectionName": "Publishers", 15 | "workspaceItemId": null, 16 | "workflowItemId": null, 17 | "metadata": { 18 | "dc.title": [ 19 | { 20 | "value": "Example Item", 21 | "language": null, 22 | "authority": null, 23 | "confidence": -1, 24 | "place": 0 25 | } 26 | ], 27 | "dspace.entity.type": [ 28 | { 29 | "value": "Publication", 30 | "language": null, 31 | "authority": null, 32 | "confidence": -1, 33 | "place": 0 34 | } 35 | ] 36 | }, 37 | "type": "DUPLICATE" 38 | }, { 39 | "title": "Example Itom", 40 | "uuid": "32f8f6e4-c79e-4322-aae7-07ee535f70a6", 41 | "owningCollectionName": null, 42 | "workspaceItemId": 51, 43 | "workflowItemId": null, 44 | "metadata": { 45 | "dc.title": [{ 46 | "value": "Example Itom", 47 | "language": null, 48 | "authority": null, 49 | "confidence": -1, 50 | "place": 0 51 | }] 52 | }, 53 | "type": "DUPLICATE" 54 | }, { 55 | "title": "Exaple Item", 56 | "uuid": "0647ff45-48f5-4c1b-b6d7-f5dbbc160856", 57 | "owningCollectionName": null, 58 | "workspaceItemId": 52, 59 | "workflowItemId": null, 60 | "metadata": { 61 | "dc.title": [{ 62 | "value": "Exaple Item", 63 | "language": null, 64 | "authority": null, 65 | "confidence": -1, 66 | "place": 0 67 | }] 68 | }, 69 | "type": "DUPLICATE" 70 | }] 71 | } 72 | ``` 73 | The potential duplicates listed in the section have all been detected by a special Solr search that compares the 74 | levenshtein edit distance between the in-progress item title and other item titles (normalised). 75 | 76 | Each potential duplicate has the following attributes: 77 | 78 | * title: The item title 79 | * uuid: The item UUID 80 | * owningCollectionName: Name of the owning collection, if present 81 | * workspaceItemId: Integer ID of the workspace item, if present 82 | * workflowItemId: Integer ID of the workflow item, if present 83 | * metadata: A list of metadata values copied from the item, as per configuration 84 | * type: The value is always DUPLICATE. This is the 'type' category used for serialization/deserialization. 85 | 86 | See `dspace/config/modules/duplicate-detection.cfg` for configuration properties. 87 | 88 | ## Patch operations 89 | There are no PATCH methods implemented for this section. 90 | -------------------------------------------------------------------------------- /workspaceitem-data-identifiers.md: -------------------------------------------------------------------------------- 1 | # WorkspaceItem data of identifiers sectionType 2 | [Back to the definition of the workspaceitems endpoint](workspaceitems.md) 3 | 4 | This section data represent the identifiers associated for this workspace item. 5 | 6 | It is a JSON object with the following structure (matches the response from the [item identifier link](items.md#Get and create item identifiers)) : 7 | 8 | ```json 9 | { 10 | "identifiers": { 11 | "identifiers": [ 12 | { 13 | "value": "https://doi.org/10.33515/dspace-54", 14 | "identifierType": "doi", 15 | "identifierStatus": "PENDING", 16 | "type": "identifier" 17 | }, 18 | { 19 | "value": "http://localhost:4000/handle/123456789/420", 20 | "identifierType": "handle", 21 | "identifierStatus": null, 22 | "type": "identifier" 23 | } 24 | ], 25 | "displayTypes": [ 26 | "handle", 27 | "doi" 28 | ] 29 | } 30 | } 31 | ``` 32 | Each identifier has the following attributes: 33 | * value: The actual identifier string, eg. https://doi.org/2312/23123.22 34 | * identifierType: The type or schema of identifier, eg, 'doi' or 'handle' 35 | * identifierStatus: The status of an identifier, if relevant (some identifier types require values to be locally minted and then reserved or registered with an upstream provider) 36 | * type: The type of resource, to help preserve context in the user interface 37 | 38 | Currently, the supported item types are 'doi' and 'handle' 39 | 40 | ## Patch operations 41 | There are no PATCH methods implemented for this section, it simply retrieves and reports identifiers currently assigned to the workspace item. 42 | -------------------------------------------------------------------------------- /workspaceitem-data-license.md: -------------------------------------------------------------------------------- 1 | # WorkspaceItem data of license sectionType 2 | [Back to the definition of the workspaceitems endpoint](workspaceitems.md) 3 | 4 | The section data represent the data about the granted deposit license 5 | 6 | ```json 7 | { 8 | "granted": true, 9 | "url": "https://demo.dspace.org/server/api/core/bitstreams/004a297e-fd06-4662-ae51-73e4b7c165c8/content", 10 | "acceptanceDate": "2017-11-20T10:32:42Z" 11 | } 12 | ``` 13 | 14 | * granted: true or false 15 | * url (**READ-ONLY**): the URL where the granted license is visible 16 | * acceptanceDate (**READ-ONLY**): the timestamp of the acceptance as recorded in the dcterms:dataAccepted metadata of the license bitstream. For license granted before than DSpace7 the acceptanceDate will be *null* 17 | 18 | ## Patch operations 19 | The PATCH method expects a JSON body according to the [JSON Patch specification RFC6902](https://tools.ietf.org/html/rfc6902) 20 | 21 | Each successful Patch operation will return a HTTP 200 CODE with the new workspaceitem as body 22 | 23 | ### Add 24 | To accept a license the client must send a JSON Patch ADD operation to the *granted* path as follow 25 | 26 | `curl --data '{[ { "op": "add", "path": "/sections/<:name-of-the-form>/granted", "value": true}]}' -X PATCH ${dspace7-url}/api/submission/workspaceitems/<:id>` 27 | 28 | for example, starting with the following document 29 | ```json 30 | { 31 | id: 1, 32 | type: "workspaceitem", 33 | sections: 34 | { 35 | "traditional-page1": 36 | { 37 | "dc.title" : [{value: "Sample Submission Item", language: "en"}], 38 | "dc.contributor.author" : [ 39 | {value: "Bollini, Andrea", authority: "rp00001", confidence: 600} 40 | ] 41 | }, 42 | "license": 43 | { 44 | "granted": false, 45 | "url": null, 46 | "acceptanceDate": null 47 | } 48 | ... 49 | }, 50 | ... 51 | } 52 | ``` 53 | 54 | the following request 55 | `curl --data '{[ { "op": "add", "path": "/sections/license/acceptanceDate", "value": "2017-11-20T10:32:42Z"}]}' -X PATCH ${dspace7-url}/api/submission/workspaceitems/1` 56 | 57 | will result in 58 | ```json 59 | { 60 | id: 1, 61 | type: "workspaceitem", 62 | sections: 63 | { 64 | "traditional-page1": 65 | { 66 | "dc.title" : [{value: "Sample Submission Item", language: "en"}], 67 | "dc.contributor.author" : [ 68 | {value: "Bollini, Andrea", authority: "rp00001", confidence: 600} 69 | ] 70 | }, 71 | "license": 72 | { 73 | "granted": true, 74 | "url": "https://demo.dspace.org/server/api/core/bitstreams/004a297e-fd06-4662-ae51-73e4b7c165c8/content", 75 | "acceptanceDate": "2017-11-20T10:32:42Z" 76 | } 77 | ... 78 | }, 79 | ... 80 | } 81 | ``` 82 | 83 | Please note that according to the [JSON Patch specification RFC6902](https://tools.ietf.org/html/rfc6902) a subsequent add operation on the granted will have the effect to replace the previous granted license with a new one. 84 | In this case a new bitstream license will be added to the item and the previous license deleted, this mean that the *url* and *acceptedDate* attributes will change accordly. 85 | 86 | It is also possible to send a PATH add operation using *false* as value to reject / remove a license. 87 | 88 | This use of the add operation to replace the license could be counter intuitive but it is done according to the [RFC section 4.1](https://tools.ietf.org/html/rfc6902#section-4.1) 89 | > If the target location specifies an object member that does exist, that member's value is replaced. 90 | 91 | ### Replace 92 | To accept or reject a license the client can also send a JSON Patch REPLACE operation to the *granted* path as follow 93 | 94 | `curl --data '{[ { "op": "add", "path": "/sections/<:name-of-the-form>/granted", "value": true}]}' -X PATCH ${dspace7-url}/api/submission/workspaceitems/<:id>` 95 | 96 | `curl --data '{[ { "op": "add", "path": "/sections/<:name-of-the-form>/granted", "value": false}]}' -X PATCH ${dspace7-url}/api/submission/workspaceitems/<:id>` 97 | 98 | ### Remove 99 | It is possible to remove a previous grant license 100 | `curl --data '{[ { "op": "remove", "path": "/sections/license/granted"}]' -X PATCH ${dspace7-url}/api/submission/workspaceitems/1` 101 | 102 | trasforming 103 | ```json 104 | { 105 | id: 1, 106 | type: "workspaceitem", 107 | sections: 108 | { 109 | "traditional-page1": 110 | { 111 | "dc.title" : [{value: "Sample Submission Item", language: "en"}], 112 | "dc.contributor.author" : [ 113 | {value: "Bollini, Andrea", authority: "rp00001", confidence: 600} 114 | ] 115 | }, 116 | "license": 117 | { 118 | "granted": true, 119 | "url": "https://demo.dspace.org/server/api/core/bitstreams/004a297e-fd06-4662-ae51-73e4b7c165c8/content", 120 | "acceptanceDate": "2017-11-20T10:32:42Z" 121 | } 122 | ... 123 | }, 124 | ... 125 | } 126 | ``` 127 | 128 | back in 129 | ```json 130 | { 131 | id: 1, 132 | type: "workspaceitem", 133 | sections: 134 | { 135 | "traditional-page1": 136 | { 137 | "dc.title" : [{value: "Sample Submission Item", language: "en"}], 138 | "dc.contributor.author" : [ 139 | {value: "Bollini, Andrea", authority: "rp00001", confidence: 600} 140 | ] 141 | }, 142 | "license": 143 | { 144 | "granted": false, 145 | "url": null, 146 | "acceptanceDate": null 147 | } 148 | ... 149 | }, 150 | ... 151 | } 152 | ``` 153 | 154 | ### Move, Test & copy 155 | No plan to implement the move, test and copy operations at the current stage --------------------------------------------------------------------------------