Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jhu-library-applications/levy-api
Scripts to get and update Drupal 8 website's metadata.
https://github.com/jhu-library-applications/levy-api
drupal8 json-api metadata
Last synced: 7 days ago
JSON representation
Scripts to get and update Drupal 8 website's metadata.
- Host: GitHub
- URL: https://github.com/jhu-library-applications/levy-api
- Owner: jhu-library-applications
- Created: 2021-12-02T14:42:56.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-01-29T16:10:32.000Z (10 months ago)
- Last Synced: 2024-10-12T02:20:57.728Z (about 1 month ago)
- Topics: drupal8, json-api, metadata
- Language: Python
- Homepage:
- Size: 2.55 MB
- Stars: 0
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Levy Sheet Music Drupal Sites
Test Instance: https://levy-test.mse.jhu.edu (Can only access while on VPN)
Production Instance: https://levysheetmusic.mse.jhu.edu/
## Drupal settings required for these scripts
Install [JSON:API module](https://www.drupal.org/docs/core-modules-and-themes/core-modules/jsonapi-module/api-overview)
- Go to www.example.edu/admin/modules, navigate to Web Services, and check `JSON:API`
- Got to www.example.edu/admin/config/services/jsonapi and click "Accept all JSON:API create, read, update, and delete operations."Install [Paragraph Type Permissions sub-module](https://www.drupal.org/project/paragraphs)
- Go to www.example.edu/admin/modules, navigate to Paragraphs, and check `Paragraphs Type Permissions`
- Go to www.example.edu/admin/people/permissions, navigate to Paragraph Type Permissions, and check View Content for the paragraph types to change.## Authentication
In your /post and /get folders, please create a `secrets.py` and `secretsProd.py` files that contains the following information. For `secrets.py`, the baseURL should correspond to the URL of the test/stage site. For `secretsProd.py` the baseURL should correspond to the URL of the production (official) site. This information will be used in the scripts that require authentication to post to Drupal.
```python
username='username'
password='password'
baseURL='https://example.com/'
```In order to ensure that these files are not uploaded to GitHub, add `secrets.py` and `secretsProd.py` to a `.gitignore` file in your /post and /get folders.
```python
# Local
secrets.py
secretsProd.py
```## Wiki
Please see the [wiki](https://github.com/mjanowiecki/levy-api/wiki) for instructions and more information about the API.