Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Myaktion Boot
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Verteilte Systeme
Myaktion Boot
Commits
4af04e22
Commit
4af04e22
authored
3 years ago
by
Martin Schmollinger
Browse files
Options
Downloads
Patches
Plain Diff
Updated README.md for branch rest-api
parent
e461aa2d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+28
-0
28 additions, 0 deletions
README.md
with
28 additions
and
0 deletions
README.md
+
28
−
0
View file @
4af04e22
...
@@ -39,3 +39,31 @@ http://localhost:8080/h2-console.
...
@@ -39,3 +39,31 @@ http://localhost:8080/h2-console.
Look at the different levels of log messages (debug, trace, info etc.).
Look at the different levels of log messages (debug, trace, info etc.).
The level for the execution of the application is set in file application.properties. Change
The level for the execution of the application is set in file application.properties. Change
the setting to see effect on the log messages after restarting the application.
the setting to see effect on the log messages after restarting the application.
*
branch rest-api
Below you'll find how to use the API with curl
### curl commands
#### Get all campaigns
`curl localhost:8080/campaigns`
#### add new campaign
`curl -X POST -H 'Content-type:application/json' -d '{"name":"Trikots A-Jugend","donationMinimum":1.0,"targetAmount":1000.0,"account":{"iban":"DE4112312312312345","name":"Jogi Löw","nameOfBank":"KSK Freiburg"}}' localhost:8080/campaigns`
#### Get Campaign with id
`curl localhost:8080/campaigns/1`
#### Update Campaign
`curl -X PUT localhost:8080/campaigns/1 -H 'Content-type:application/json' -d '{"name":"Trikots B-Jugend","donationMinimum":1.0,"targetAmount":1000.0,"account":{"iban":"DE4112312312312345","name":"Jogi Löw","nameOfBank":"KSK Freiburg"}}'`
#### Delete Campaign with id
`curl -X DELETE localhost:8080/campaigns/1`
#### Add Donation to Campaign with id
`curl -H "Content-Type: application/json" -d '{"amount":20,"donorName":"Martin","receiptRequested":true,"status":"IN_PROCESS","account":{"name":"Martin","nameOfBank":"DKB Bank","iban":"DE41123456123456"}}' localhost:8080/campaignss/1/donations`
### Call Swagger-UI for more convenient testing the API
http://localhost:8080/swagger-ui.html
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment