Skip to content

Commit

Permalink
Update subscription API documentation (#418)
Browse files Browse the repository at this point in the history
Add missing API description in table. Rearranged order of GET and POST operations. Add info on mongodb database.
  • Loading branch information
e-pettersson-ericsson authored Jan 2, 2020
1 parent ca327a8 commit b7edb8c
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 28 deletions.
2 changes: 2 additions & 0 deletions wiki/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
57 changes: 29 additions & 28 deletions wiki/subscription-API.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,14 @@

|Method|Endpoint |Authentication|
|------|----------------------------------------|--------------|
|POST |/subscriptions |yes |
|GET |/subscriptions |no |
|GET |/subscriptions/\<name\> |no |
|GET |/subscriptions?subscriptionNames=\<name\> |no |
|POST |/subscriptions |yes |
|PUT |/subscriptions |yes |
|DELETE|/subscriptions |yes |
|DELETE|/subscriptions/\<name\> |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 @<path to file> http://<host>: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
Expand Down Expand Up @@ -66,6 +40,33 @@ Curl command example

curl -X GET -H "Content-type: application/json" http://<host>:8090/subscriptions/<name>

## 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 @<path to file> http://<host>: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
Expand Down

0 comments on commit b7edb8c

Please sign in to comment.