74 lines
1.3 KiB
HTTP
74 lines
1.3 KiB
HTTP
###
|
|
#Get all secrets
|
|
GET http://localhost:8080/api/secrets
|
|
Accept: application/json
|
|
|
|
###
|
|
# Create new secret
|
|
POST http://localhost:8080/api/secrets
|
|
Content-Type: application/json
|
|
|
|
{
|
|
"email": "hans.muster@bbw.ch",
|
|
"content": {
|
|
"kindid": 3,
|
|
"kind": "note",
|
|
"title": "Spaphira",
|
|
"content": "Saphira roch an dem kleinen Erdling."
|
|
},
|
|
"encryptPassword": "xxxyyy"
|
|
}
|
|
|
|
###
|
|
#Post to get secrets with userid 1 and encryptpassword
|
|
POST http://localhost:8080/api/secrets/byuserid
|
|
Content-Type: application/json
|
|
|
|
{
|
|
"userId": 1,
|
|
"encryptPassword": "xxxyyy"
|
|
}
|
|
|
|
###
|
|
#Post to get secrets with email and encryptpassword
|
|
POST http://localhost:8080/api/secrets/byemail
|
|
Content-Type: application/json
|
|
|
|
{
|
|
"email": "hans.muster@bbw.ch",
|
|
"encryptPassword": "xxxyyy"
|
|
}
|
|
|
|
###
|
|
# Update secret with id 3
|
|
PUT http://localhost:8080/api/secrets/3
|
|
Content-Type: application/json
|
|
|
|
{
|
|
"userId": 1,
|
|
"content": {
|
|
"kindid": 3,
|
|
"kind": "note",
|
|
"title": "Red drageon",
|
|
"content": "Er war gewaltig und rot."
|
|
},
|
|
"encryptPassword": "xxxyyy"
|
|
}
|
|
|
|
###
|
|
#Delete secret with id 3
|
|
DELETE http://localhost:8080/api/secrets/3
|
|
Accept: application/json
|
|
|
|
|
|
###
|
|
#Delete secret with id 4
|
|
DELETE http://localhost:8080/api/secrets/4
|
|
Accept: application/json
|
|
|
|
###
|
|
#Delete secret with id 5
|
|
DELETE http://localhost:8080/api/secrets/5
|
|
Accept: application/json
|
|
|