Avantation REST Template (1.0)

Download OpenAPI specification:Download

TODO: Add Description

Authentication

JWT

You can create a JSON Web Token (JWT) during auth. Usage format: Bearer <JWT>

Security scheme type: API Key
header parameter name: Authorization

Auth

Login

Request Body schema: application/json
email
string
password
string

Responses

200

OK

default

Unexpected error

post /login
http://demo.avantation.in/api/v1/login

Request samples

application/json
Copy
Expand all Collapse all
{
  • "email": "demo@avantation.in",
  • "password": "EC84D5D857ABE"
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "message": "Welcome to demo of todo application.",
  • "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImRlbW9AYXZhbnRhdGlvbi5pbiIsImlhdCI6MTU1MTYyMDQ0Mn0.E6SPoRRF3lbPtyzkcLdwSQqVCMUM72-kGOdLoTlw2L4"
}

Todo

Create new todo

Authorizations:
Request Body schema: application/json
todo
string
completed
boolean

Responses

201

Created

default

Unexpected error

post /todos
http://demo.avantation.in/api/v1/todos

Request samples

application/json
Copy
Expand all Collapse all
{
  • "todo": "Hello Wolrd",
  • "completed": false
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "todo": "Hello Wolrd",
  • "completed": false,
  • "id": 1
}

(QUERY) Retrieve Todo based on Id

Authorizations:
query Parameters
id_like
required
string

Responses

200

OK

default

Unexpected error

get /todos
http://demo.avantation.in/api/v1/todos

Request samples

Copy
curl --request GET \
  --url 'https://demo.avantation.in/api/v1/todos?id_like=1' \
  --header 'authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImRlbW9AdGVzdGluZy5jb20iLCJpYXQiOjE1NDQ4NjQwNjZ9.w2cc4F0EY3I3xMAJWHLPZoxD4231MBAfInzPhwA-jZU'

Response samples

application/json
Copy
Expand all Collapse all
[
  • {
    }
]

(PATH) Retrieve Todo based on Id

Authorizations:
path Parameters
id
required
string

Responses

200

OK

default

Unexpected error

get /todos/{id}
http://demo.avantation.in/api/v1/todos/{id}

Request samples

Copy
curl --request GET \
  --url https://demo.avantation.in/api/v1/todos/1 \
  --header 'authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImRlbW9AdGVzdGluZy5jb20iLCJpYXQiOjE1NDQ4NjQwNjZ9.w2cc4F0EY3I3xMAJWHLPZoxD4231MBAfInzPhwA-jZU'

Response samples

application/json
Copy
Expand all Collapse all
{
  • "todo": "Hello Wolrd",
  • "completed": false,
  • "id": 1
}

Update Todo Based on Id

Authorizations:
path Parameters
id
required
string
Request Body schema: application/json
todo
string
completed
boolean

Responses

200

OK

default

Unexpected error

put /todos/{id}
http://demo.avantation.in/api/v1/todos/{id}

Request samples

application/json
Copy
Expand all Collapse all
{
  • "todo": "Hello world",
  • "completed": true
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "todo": "Hello world",
  • "completed": true,
  • "id": 1
}

Delete Todo based on Id

Authorizations:
path Parameters
id
required
string

Responses

200

OK

default

Unexpected error

delete /todos/{id}
http://demo.avantation.in/api/v1/todos/{id}

Request samples

Copy
curl --request DELETE \
  --url https://demo.avantation.in/api/v1/todos/1 \
  --header 'authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImRlbW9AdGVzdGluZy5jb20iLCJpYXQiOjE1NDQ4NjQwNjZ9.w2cc4F0EY3I3xMAJWHLPZoxD4231MBAfInzPhwA-jZU'

Response samples

application/json
Copy
Expand all Collapse all
{ }