Name: hub-admin
Owner: NOMS Digital Studio
Description: REST microservice for the The Hub.
Created: 2016-12-22 14:27:47.0
Updated: 2017-09-06 14:10:23.0
Pushed: 2017-03-03 17:12:31.0
Size: 244
Language: Groovy
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
REST microservice for the The Hub.
This service is responsible for content metadata and media persistence.
Ministry of Justice. National Offender Management Service.
adlew clean build
adlew bootRun
POST /hub-admin/content-items Multipart form endpoint that takes a 'file' and some metadata.
Request:
onse:
Status: 201 Location: http://localhost:8080/hub-admin/content-items/7a2b215c-0e2d-4631-8f02-59e3a7c7539c
ent Items list endpoint
/hub-admin/content-items<?filter=[filter]>
er is an optional query parameter, it defaults to application/pdf if not sent.
rovide a filter that returns everything use '{}' for the filter value.
filter={ 'metadata.mediaType': 'image/jpg'}
ples
est:
Response:
Note: The metadata contents are arbitrary.
contentItems:" [
{
"id": "588b6821aba1db4eb9d87cb3",
"mediaUri": "aUri1",
"filename": "hub-admin-1-pixel.png",
"metadata": {
"title": "aTitle1",
"category": "aCategory1"
}
},
{
"id": "588b6821aba1db4eb9d87cb4",
"mediaUri": "aUri2",
"filename": "hub-admin-2-pixel.png",
"metadata": {
"title": "aTitle2",
"category": "aCategory2"
}
}
]
GET /hub-admin/health
e.g.
://localhost:8080/hub-admin/health
://hub-admin.herokuapp.com/hub-admin/health
ODB_CONNECTION_URI - The MongoDb connection string. Defaults to mongodb://localhost:27017
mongodb:foo:<key>==@bar.documents.azure.com:10250/?ssl=true
E_BLOB_STORE_CONNECTION_URI - The Azure blob store connection string.
DefaultEndpointsProtocol=http;AccountName=<account name>;AccountKey=<key>
E_BLOB_STORE_PUBLIC_URL_BASE - The base URL for items in the blob store.
https://<account name>.blob.core.windows.net
C_AUTH_USERNAME - basic auth username for the the service
user
C_AUTH_PASSWORD - basic auth password for the the service
password
All the above variable plus the following:
ICATION_URL - The transport, host, port and context path that the application is running on. Default to http://localhost:8080/hun-admin
https://hub-admin.herokuapp.com/hub-admin