Skip to main content

Pandora (1.0.0)

Download OpenAPI specification:Download

Introduction

API documentation for Pandora - REST API starter kit powered by Laravel, OpenAPI, Sanctum.

auth

User authentication

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

Content type
application/json
{
  • "name": "John Doe",
  • "email": "john@example.com",
  • "password": "123456",
  • "password_confirmation": "123456"
}

Response samples

Content type
application/json
{
  • "user": {
    },
  • "token": {
    }
}

Login a user

Login a user.

Request Body schema: application/json
email
required
string <email>
password
required
string

Responses

Request samples

Content type
application/json
{
  • "email": "john@example.com",
  • "password": "123456"
}

Response samples

Content type
application/json
{
  • "user": {
    },
  • "token": {
    }
}

Logout a user

Logout a user.

Authorizations:
BearerToken

Responses

adminAuth

Admin authentication

Login an admin

Login an admin.

Request Body schema: application/json
email
required
string <email>
password
required
string

Responses

Request samples

Content type
application/json
{
  • "email": "root@admin.com",
  • "password": "123456"
}

Response samples

Content type
application/json
{
  • "admin": {},
  • "token": {
    }
}

Logout an admin

Logout an admin.

Authorizations:
BearerToken

Responses

profile

User profile

me

Get the authenticated user.

Authorizations:
BearerToken

Responses

Response samples

Content type
application/json
{
  • "id": 1,
  • "name": "John Doe",
  • "email": "john@example.com",
  • "created_at": "2022-08-27T16:14:46.000000Z"
}

adminProfile

Admin profile

me

Get the authenticated admin.

Authorizations:
BearerToken

Responses

Response samples

Content type
application/json
{}