An open API service indexing awesome lists of open source software.

https://github.com/maayanlab/enrichmentapi


https://github.com/maayanlab/enrichmentapi

Last synced: 7 months ago
JSON representation

Awesome Lists containing this project

README

          

# API documentation

The API contains two main endpoints. One is for generation of new data called ```origin/api/v1/*``` and another endpoint is the primary access point to data queries ```api/v1/*```.

For a full documentation, please refer to the API documentation:
https://maayanlab.cloud/sigcom/data-api/swagger.html

# Adding data to Signature Commons

Signature Commons can load libraries from a cloud repository on startup if the environmental variable ``` S3_AUTOLOAD ``` is set to ``` 'true' ```.

#### Parameters


Name
Type
Description


api_key
string
Your own API public key


timestamp
integer
Current unix timestamp (GMT+0) in seconds


dev_hash
string

Calculate with timestamp and api_secret


Formula: md5(concatenate(<timestamp>, <api_secret>))

# Deploying to rancher or marathon

When launching SigCom it requires several environmental variabls.


Environmental Variable
Description

TOKEN'pass code needed for several API endpoints'
PREFIX'/sigcom/data-api'
JAVA_OPTS'-Xmx30G -XX:PermSize=13G -XX:MaxPermSize=13G -XX:+UseCompressedOops'
deployment'marathon_deployed'
AWS_ACCESS_KEY_ID'access key id'
AWS_SECRET_ACCESS_KEY'aws key with S3 credentials to upload new data to AWS bucket'
AWS_ENDPOINT_URL'http://s3.amazonaws.com'
AWS_BUCKET_PREFIX'sigcom/'
AWS_BUCKET'name of bucket'
S3_AUTOLOAD'true/false'

# Installation and docker packaging

## Build with Gradle
### Important tasks


Task Name
Description


war
Assembles the application WAR file and saves it in the /docker directory


tomcatRunWar
Starts a Tomcat instance and deploys the WAR to it


clean
Deletes the project build directory and files generated by tasks


test
Runs the unit tests using JUnit or TestNG


check
Aggregate task that performs verification tasks, such as running the tests


compileJava
Compiles production Java source files using the JDK compiler

### Running tasks

To run gradle task, enter
```text
./gradlew {task_name}
```

### Documentation

The Java Plugin documentation

The War Plugin documentation

The Tomcat Plugin documentation

### Testing locally
This will launch the enrichment API on the local machine and should be accessible through the localhost.
```text
./gradlew tomcatRunWar
```

### Stoping gradle process
Processes need to be stopped manually if timcatRunWar has previously been executed.
```text
./gradlew stop
```

### Docker-compose
Getting started with docker-compose

```bash
gradle war
docker-compose build
docker-compose up
```