https://github.com/ccsdforge/episciences-api
An API for Episciences, an overlay journal platform software
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.0%) to scientific vocabulary
Repository
An API for Episciences, an overlay journal platform software
Basic Info
Statistics
- Stars: 3
- Watchers: 7
- Forks: 0
- Open Issues: 37
- Releases: 1
Metadata Files
README.md
episciences-api
About Episciences REST API
The Episciences REST API can be used with authentication and authorisation.
Authentication is reserved exclusively for users of one of the Episciences journals, so, it is vital to recover your API password - once you have logged on to the journal site - via My space > Reset my API password.
Get the authentication token with a POST request
The API is called up securely via a JWT token, which can be retrieved via "/api/login" endpoint:
NOTE:
About "code": you have to use only the journal's code (e.g. "code": "epijinfo").
curl -X 'POST' \
'https://api-preprod.episciences.org/api/login' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"username": "login",
"password": "api pwd",
"code": "journal’s code (e.g. epijinfo)"
}'
Response type:
{"token":"eyJ0eXAiOiJKV1….", refresh_token":"3ff818151dd…"}
The token expires after one hour. The refresh_token expires after one month.
It is possible to generate a new token without asking the user to enter these identifiers via "api/token/refresh":
curl -X 'POST' \
'https://api-preprod.episciences.org/api/token/refresh' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"refresh_token": "3ff818151dd…"
}'
To check that you're connected and as an example of how to use it:
curl -X 'GET' \
'https://api-preprod.episciences.org/api/me' \
-H 'accept: application/ld+json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1….'
To explore the available endpoints: https://api-preprod.episciences.org/api
Testing the API Manually
- Expand /api/login, click the Try it out button and enter your account information.
- Next, press the execute button, it will respond with a failed or passed result.
- In this case, we get the passed result response, with response code 200.
- Take the token string and put it in Authorize.
- After the authorization step, we are now ready to test the API
Development Setup
This section covers setting up the Episciences API for local development using Docker.
Prerequisites
Before starting, ensure you have the following installed:
- Docker and Docker Compose - Install Docker
- Git - For cloning the repository
- OpenSSL - For SSL certificate generation (automatically checked by Makefile)
Quick Start
Clone the repository:
bash git clone <repository-url> cd episciences-apiStart the development environment:
bash make docker-upThis command will:- Automatically generate SSL certificates for HTTPS development
- Start all required containers (PHP-FPM, Apache, MySQL)
- Set up the complete development environment
Add the local domain to your hosts file:
bash echo "127.0.0.1 api-dev.episciences.org" | sudo tee -a /etc/hostsAccess the application:
- API Documentation: https://api-dev.episciences.org:8443/api/docs
- Interactive API Explorer: https://api-dev.episciences.org:8443/api
- Main Application: https://api-dev.episciences.org:8443/
Development Environment
Available Make Commands
Run make help to see all available commands. Key commands for development:
```bash
Environment Management
make docker-up # Start all containers (auto-generates SSL certificates) make docker-down # Stop all containers make docker-restart # Restart all containers make docker-status # Check container status make docker-logs # Follow container logs
Development Tools
make docker-shell # Enter PHP container for debugging make docker-mysql # Access MySQL database make docker-test # Run PHPUnit tests in container
SSL Certificate Management
make ssl-certs # Generate SSL certificates manually make ssl-clean # Remove SSL certificates ```
HTTPS Development Setup
The development environment uses HTTPS with a local domain for production-like conditions:
- Domain:
api-dev.episciences.org - HTTPS Port:
8443 - HTTP Port:
8080(redirects to HTTPS)
Important: You'll see a browser security warning because we use self-signed certificates for development. This is normal - click "Advanced" → "Proceed to api-dev.episciences.org" to continue.
SSL Certificate Management
SSL certificates are automatically generated when you run make docker-up. Key points:
- Certificates are not committed to the repository for security
- Each developer generates their own certificates locally
- Certificates are valid for 1 year and include proper server authentication extensions
- Use
make ssl-clean ssl-certsto regenerate certificates if needed
Testing & Development Workflow
Running Tests
```bash
Run tests in Docker container (recommended)
make docker-test
Run tests locally (requires local PHP 8.2+ setup)
make test make test-unit # Unit tests only make test-coverage # Tests with coverage report ```
Database Access
```bash
Access MySQL via container
make docker-mysql
Or connect with external tools using:
Host: localhost
Port: 3306
User: root
Password: root
Database: episciences
```
Development URLs
- API Documentation: https://api-dev.episciences.org:8443/api/docs
- OpenAPI Spec: https://api-dev.episciences.org:8443/api/docs.json
- Symfony Profiler: https://api-dev.episciences.org:8443/_profiler
Troubleshooting
Common Issues:
"Connection refused" error: Check if containers are running with
make docker-status"SSL certificate error": This is expected for self-signed certificates - proceed past the browser warning
"Port already in use": Stop existing containers with
make docker-downor check for conflicting services on ports 8080, 8443, 3306Permission issues: Ensure Docker has proper permissions and your user is in the docker group
SSL certificate issues: Regenerate certificates with
make ssl-clean ssl-certs
Getting Help:
- Run
make helpto see all available commands - Check container logs with
make docker-logs - Verify setup with
make check-prereqs
Owner
- Name: CCSD
- Login: CCSDForge
- Kind: organization
- Email: ccsd-tech@ccsd.cnrs.fr
- Location: France
- Website: https://www.ccsd.cnrs.fr/
- Twitter: ccsd_fr
- Repositories: 7
- Profile: https://github.com/CCSDForge
Centre pour la Communication Scientifique Directe
GitHub Events
Total
- Issues event: 4
- Delete event: 32
- Issue comment event: 27
- Push event: 208
- Pull request review event: 5
- Pull request event: 67
- Create event: 35
Last Year
- Issues event: 4
- Delete event: 32
- Issue comment event: 27
- Push event: 208
- Pull request review event: 5
- Pull request event: 67
- Create event: 35
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 7
- Total pull requests: 65
- Average time to close issues: 4 months
- Average time to close pull requests: 3 months
- Total issue authors: 3
- Total pull request authors: 4
- Average comments per issue: 0.57
- Average comments per pull request: 0.14
- Merged pull requests: 15
- Bot issues: 1
- Bot pull requests: 55
Past Year
- Issues: 1
- Pull requests: 36
- Average time to close issues: N/A
- Average time to close pull requests: 13 days
- Issue authors: 1
- Pull request authors: 4
- Average comments per issue: 0.0
- Average comments per pull request: 0.06
- Merged pull requests: 10
- Bot issues: 0
- Bot pull requests: 26
Top Authors
Issue Authors
- TobiasKappe (4)
- rtournoy (2)
- renovate[bot] (1)
Pull Request Authors
- renovate[bot] (47)
- Clairevitsing (9)
- dependabot[bot] (8)
- devletech (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- @babel/core ^7.17.0 development
- @babel/preset-env ^7.16.0 development
- @hotwired/stimulus ^3.0.0 development
- @symfony/stimulus-bridge ^3.2.0 development
- @symfony/webpack-encore ^4.0.0 development
- core-js ^3.23.0 development
- regenerator-runtime ^0.13.9 development
- webpack ^5.76.0 development
- webpack-cli ^4.10.0 development
- webpack-notifier ^1.15.0 development
- 667 dependencies
- doctrine/doctrine-fixtures-bundle ^3.4 development
- roave/security-advisories dev-latest development
- symfony/maker-bundle ^1.48 development
- symfony/phpunit-bridge ^6.2 development
- symfony/stopwatch ^6.2 development
- symfony/web-profiler-bundle ^6.2 development
- api-platform/core ^3.1
- beberlei/doctrineextensions ^1.3
- composer/package-versions-deprecated 1.11.99.1
- doctrine/annotations ^2.0
- doctrine/doctrine-bundle ^2.8
- doctrine/doctrine-migrations-bundle ^3.2
- doctrine/orm ^2.14
- ext-ctype *
- ext-iconv *
- ext-json *
- gesdinet/jwt-refresh-token-bundle ^1.1
- lexik/jwt-authentication-bundle ^2.17
- nelmio/cors-bundle ^2.2
- php ^8.2
- phpdocumentor/reflection-docblock ^5.3
- phpstan/phpdoc-parser ^1.16
- symfony/asset ^6.2
- symfony/console ^6.2
- symfony/dotenv ^6.2
- symfony/expression-language ^6.2
- symfony/flex ^2
- symfony/framework-bundle ^6.2
- symfony/monolog-bundle ^3.6
- symfony/property-access ^6.2
- symfony/property-info ^6.2
- symfony/proxy-manager-bridge ^6.2
- symfony/requirements-checker ^2.0
- symfony/runtime ^6.2
- symfony/security-bundle ^6.2
- symfony/serializer ^6.2
- symfony/twig-bundle ^6.2
- symfony/validator ^6.2
- symfony/webpack-encore-bundle ^1.16
- symfony/yaml ^6.2
- doctrine/data-fixtures 1.7.0 development
- doctrine/doctrine-fixtures-bundle 3.5.1 development
- nikic/php-parser v4.17.1 development
- roave/security-advisories dev-latest development
- symfony/maker-bundle v1.51.1 development
- symfony/phpunit-bridge v6.3.8 development
- symfony/process v6.3.4 development
- symfony/web-profiler-bundle v6.3.8 development
- api-platform/core v3.2.6
- beberlei/doctrineextensions v1.3.0
- composer/package-versions-deprecated 1.11.99.1
- doctrine/annotations 2.0.1
- doctrine/cache 2.2.0
- doctrine/collections 2.1.4
- doctrine/common 3.4.3
- doctrine/dbal 3.7.2
- doctrine/deprecations 1.1.2
- doctrine/doctrine-bundle 2.11.1
- doctrine/doctrine-migrations-bundle 3.3.0
- doctrine/event-manager 2.0.0
- doctrine/inflector 2.0.8
- doctrine/instantiator 2.0.0
- doctrine/lexer 2.1.0
- doctrine/migrations 3.7.1
- doctrine/orm 2.17.1
- doctrine/persistence 3.2.0
- doctrine/sql-formatter 1.1.3
- friendsofphp/proxy-manager-lts v1.0.16
- gesdinet/jwt-refresh-token-bundle v1.2.0
- laminas/laminas-code 4.13.0
- lcobucci/clock 3.2.0
- lcobucci/jwt 5.2.0
- lexik/jwt-authentication-bundle v2.19.1
- monolog/monolog 3.5.0
- namshi/jose 7.2.3
- nelmio/cors-bundle 2.3.1
- phpdocumentor/reflection-common 2.2.0
- phpdocumentor/reflection-docblock 5.3.0
- phpdocumentor/type-resolver 1.7.3
- phpstan/phpdoc-parser 1.24.3
- psr/cache 3.0.0
- psr/clock 1.0.0
- psr/container 2.0.2
- psr/event-dispatcher 1.0.0
- psr/link 2.0.1
- psr/log 3.0.0
- symfony/asset v6.3.8
- symfony/cache v6.3.8
- symfony/cache-contracts v3.4.0
- symfony/clock v6.3.4
- symfony/config v6.3.8
- symfony/console v6.3.8
- symfony/dependency-injection v6.3.8
- symfony/deprecation-contracts v3.4.0
- symfony/doctrine-bridge v6.3.8
- symfony/dotenv v6.3.7
- symfony/error-handler v6.3.5
- symfony/event-dispatcher v6.3.2
- symfony/event-dispatcher-contracts v3.4.0
- symfony/expression-language v6.3.0
- symfony/filesystem v6.3.1
- symfony/finder v6.3.5
- symfony/flex v2.4.1
- symfony/framework-bundle v6.3.8
- symfony/http-foundation v6.3.8
- symfony/http-kernel v6.3.8
- symfony/monolog-bridge v6.3.8
- symfony/monolog-bundle v3.10.0
- symfony/password-hasher v6.3.8
- symfony/polyfill-intl-grapheme v1.28.0
- symfony/polyfill-intl-normalizer v1.28.0
- symfony/polyfill-mbstring v1.28.0
- symfony/polyfill-php56 v1.20.0
- symfony/polyfill-php83 v1.28.0
- symfony/property-access v6.3.2
- symfony/property-info v6.3.0
- symfony/proxy-manager-bridge v6.3.0
- symfony/requirements-checker v2.0.1
- symfony/routing v6.3.5
- symfony/runtime v6.3.2
- symfony/security-bundle v6.3.8
- symfony/security-core v6.3.7
- symfony/security-csrf v6.3.2
- symfony/security-http v6.3.8
- symfony/serializer v6.3.8
- symfony/service-contracts v3.4.0
- symfony/stopwatch v6.3.0
- symfony/string v6.3.8
- symfony/translation-contracts v3.4.0
- symfony/twig-bridge v6.3.8
- symfony/twig-bundle v6.3.8
- symfony/validator v6.3.8
- symfony/var-dumper v6.3.8
- symfony/var-exporter v6.3.6
- symfony/web-link v6.3.0
- symfony/webpack-encore-bundle v1.17.2
- symfony/yaml v6.3.8
- twig/twig v3.8.0
- webmozart/assert 1.11.0
- willdurand/negotiation 3.1.0