Fudo Products API (1.0.0)

Download OpenAPI specification:

License: MIT

A simple REST API for managing products with JWT authentication

User authentication

Authenticate a user and receive a JWT token

Request Body schema: application/json
required
username
required
string

The username for authentication

password
required
string <password>

The password for authentication

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  • "expires_in": 3600
}

Get all products

Retrieve a list of all products

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{
  • "products": [
    ]
}

Create a new product

Create a new product (asynchronous operation)

Authorizations:
BearerAuth
Request Body schema: application/json
required
name
required
string non-empty

The name of the product

Responses

Request samples

Content type
application/json
{
  • "name": "Awesome Widget"
}

Response samples

Content type
application/json
{
  • "id": "123e4567-e89b-12d3-a456-426614174000",
  • "message": "Product creation started. It will be available in 5 seconds.",
  • "status": "pending"
}

Get OpenAPI specification

Returns the OpenAPI specification for this API

Responses

Response samples

Content type
application/json
{
  • "error": "File not found"
}

Get authors information

Returns information about the API authors

Responses

Response samples

Content type
application/json
{
  • "error": "File not found"
}