counter
get
Retrieve the current counter
del
Reset the counter to 0
post
Increment the counter
post
Decrement the counter
post
Double the counter
extension 1
put
Set the counter to a specific value via a query parameter
extension 2
get
Retrieve the current counter for the provided counter name
del
Reset the counter for the provided name to 0
post
Increment the counter for the provided name
post
Decrement the counter for the provided name
post
Double the counter for the provided name
API docs by Redocly
Counter API
(0.0.1)
Download OpenAPI specification:
Download
counter
Retrieve the current counter
Responses
200
OK
get
/counter
http://localhost:3030
/counter
Response samples
200
Content type
application/json
Copy
{
"counter"
:
0
}
Reset the counter to 0
Responses
200
OK
delete
/counter
http://localhost:3030
/counter
Response samples
200
Content type
application/json
Copy
{
"counter"
:
0
}
Increment the counter
Responses
201
OK
post
/counter/increment
http://localhost:3030
/counter/increment
Response samples
201
Content type
application/json
Copy
{
"counter"
:
0
}
Decrement the counter
Responses
201
OK
post
/counter/decrement
http://localhost:3030
/counter/decrement
Response samples
201
Content type
application/json
Copy
{
"counter"
:
0
}
Double the counter
Responses
201
OK
post
/counter/double
http://localhost:3030
/counter/double
Response samples
201
Content type
application/json
Copy
{
"counter"
:
0
}
extension 1
Set the counter to a specific value via a query parameter
query Parameters
value
integer
The value to set the counter to
Responses
201
OK
put
/counter?value={number}
http://localhost:3030
/counter?value={number}
Response samples
201
Content type
application/json
Copy
{
"counter"
:
0
}
extension 2
Retrieve the current counter for the provided counter name
Responses
200
OK
get
/counter/{name}
http://localhost:3030
/counter/{name}
Response samples
200
Content type
application/json
Copy
{
"counter"
:
0
}
Reset the counter for the provided name to 0
Responses
200
OK
delete
/counter/{name}
http://localhost:3030
/counter/{name}
Response samples
200
Content type
application/json
Copy
{
"counter"
:
0
}
Increment the counter for the provided name
Responses
201
OK
post
/counter/{name}/increment
http://localhost:3030
/counter/{name}/increment
Response samples
201
Content type
application/json
Copy
{
"counter"
:
0
}
Decrement the counter for the provided name
Responses
201
OK
post
/counter/{name}/decrement
http://localhost:3030
/counter/{name}/decrement
Response samples
201
Content type
application/json
Copy
{
"counter"
:
0
}
Double the counter for the provided name
Responses
201
OK
post
/counter/{name}/double
http://localhost:3030
/counter/{name}/double
Response samples
201
Content type
application/json
Copy
{
"counter"
:
0
}