From b7edb8c2dca56bfe02339ba59696a9acf2030f81 Mon Sep 17 00:00:00 2001 From: e-pettersson-ericsson <38855976+e-pettersson-ericsson@users.noreply.github.com> Date: Thu, 2 Jan 2020 14:54:29 +0100 Subject: [PATCH] Update subscription API documentation (#418) Add missing API description in table. Rearranged order of GET and POST operations. Add info on mongodb database. --- wiki/configuration.md | 2 ++ wiki/subscription-API.md | 57 ++++++++++++++++++++-------------------- 2 files changed, 31 insertions(+), 28 deletions(-) diff --git a/wiki/configuration.md b/wiki/configuration.md index 2b60d1417..f5bea5b96 100644 --- a/wiki/configuration.md +++ b/wiki/configuration.md @@ -173,6 +173,8 @@ If encryption of the MongoDB password is desired there is information [here](con * spring.data.mongodb.uri * spring.data.mongodb.database +The second property **spring.data.mongodb.database** defines a name for the database. + ## RabbitMQ You can configure the RabbitMQ settings using the rabbitmq.* properties. diff --git a/wiki/subscription-API.md b/wiki/subscription-API.md index a65b529ad..9e83e2aa6 100644 --- a/wiki/subscription-API.md +++ b/wiki/subscription-API.md @@ -2,40 +2,14 @@ |Method|Endpoint |Authentication| |------|----------------------------------------|--------------| -|POST |/subscriptions |yes | |GET |/subscriptions |no | |GET |/subscriptions/\ |no | +|GET |/subscriptions?subscriptionNames=\ |no | +|POST |/subscriptions |yes | |PUT |/subscriptions |yes | |DELETE|/subscriptions |yes | |DELETE|/subscriptions/\ |yes | -## Create Subscriptions - -Takes one or several subscriptions in a JSON array as input. If LDAP is -activated, the username of the person registering this subscription is -included when saving the subscription in the database. The subscription -name needs to be unique. - - POST /subscriptions - -### Curl Command Example - - curl -X POST -H "Content-type: application/json" --data @ http://:8090/subscriptions - -Eiffel Intelligence takes a JSON list of one or several subscription objects. -Example of a subscription array input: - - [ - { - ..Subscription 1.. - }, - { - ..Subscription 2.. - } - ] - - Guidelines for writing requirements and conditions for creating subscriptions can be found [here](subscriptions.md#writing-requirements-and-conditions) - ## Get All subscriptions Retrieves all the subscriptions @@ -66,6 +40,33 @@ Curl command example curl -X GET -H "Content-type: application/json" http://:8090/subscriptions/ +## Create Subscriptions + +Takes one or several subscriptions in a JSON array as input. If LDAP is +activated, the username of the person registering this subscription is +included when saving the subscription in the database. The subscription +name needs to be unique. + + POST /subscriptions + +### Curl Command Example + + curl -X POST -H "Content-type: application/json" --data @ http://:8090/subscriptions + +Eiffel Intelligence takes a JSON list of one or several subscription objects. +Example of a subscription array input: + + [ + { + ..Subscription 1.. + }, + { + ..Subscription 2.. + } + ] + + Guidelines for writing requirements and conditions for creating subscriptions can be found [here](subscriptions.md#writing-requirements-and-conditions) + ## Update Subscriptions Modify existing Subscriptions based on subscriptionName. Multiple subscriptions