Pandora (1.0.0)
Download OpenAPI specification:Download
API documentation for Pandora - REST API starter kit powered by Laravel, OpenAPI, Sanctum.
Signup a user
Signup a user.
Request Body schema: application/json
name required | string |
email required | string <email> |
password required | string |
password_confirmation required | string |
Responses
Request samples
- Payload
Content type
application/json
{- "name": "John Doe",
- "email": "john@example.com",
- "password": "123456",
- "password_confirmation": "123456"
}
Response samples
- 201
- 422
Content type
application/json
{- "user": {
- "id": 1,
- "name": "John Doe",
- "email": "john@example.com",
- "created_at": "2022-08-27T16:14:46.000000Z"
}, - "token": {
- "access_token": "6|JeXDJdhmaQN4Nl3T3DaD9sE20PoPrdUx15W0m2eA",
- "type": "bearer"
}
}
Login a user
Login a user.
Request Body schema: application/json
email required | string <email> |
password required | string |
Responses
Request samples
- Payload
Content type
application/json
{- "email": "john@example.com",
- "password": "123456"
}
Response samples
- 200
- 401
- 422
Content type
application/json
{- "user": {
- "id": 1,
- "name": "John Doe",
- "email": "john@example.com",
- "created_at": "2022-08-27T16:14:46.000000Z"
}, - "token": {
- "access_token": "6|JeXDJdhmaQN4Nl3T3DaD9sE20PoPrdUx15W0m2eA",
- "type": "bearer"
}
}
Login an admin
Login an admin.
Request Body schema: application/json
email required | string <email> |
password required | string |
Responses
Request samples
- Payload
Content type
application/json
{- "email": "root@admin.com",
- "password": "123456"
}
Response samples
- 200
- 401
- 422
Content type
application/json
{- "admin": {
- "id": 1,
- "name": "Admin",
- "email": "root@admin.com",
- "created_at": "2022-08-27T16:14:46.000000Z"
}, - "token": {
- "access_token": "6|JeXDJdhmaQN4Nl3T3DaD9sE20PoPrdUx15W0m2eA",
- "type": "bearer"
}
}
Response samples
- 200
Content type
application/json
{- "id": 1,
- "name": "John Doe",
- "email": "john@example.com",
- "created_at": "2022-08-27T16:14:46.000000Z"
}
Response samples
- 200
Content type
application/json
{- "id": 1,
- "name": "Admin",
- "email": "root@admin.com",
- "created_at": "2022-08-27T16:14:46.000000Z"
}