API (1.0.0)

Download OpenAPI specification:Download

CRUD

Upload an image to the server.

This endpoint allows you to upload an image to the server's image directory.

Request Body schema: application/x-www-form-urlencoded
image
image

The image to be replaced (required).

business_type
string

Rent or sell (required).

category
string

The category of the image (optional).

number
string

The number of the image (optional).

title
string

The title of the image (optional).

name
string

The name of the image (optional).

content
string

The content of the image (optional).

price
string

The price of the image (optional).

status
string

The status of the image (optional).

Responses

Search images by keyword (title or name) in MongoDB.

This endpoint allows you to search for images by specifying keywords for the title or name in the query parameters.

query Parameters
title
any

Keyword to search for in image titles.

name
any

Keyword to search for in image names.

business_type
any

Rent or sell (required).

number
any

The number of the image (optional).

page_number
any

Current page number, start from 1. Default is 1.

page_size
any

Page size. Default is 25.

exactly_match
any

When exact_match is set to true, only return exact matches. Default is false.

is_random
any

When is_random is set to true, return random matches. Default is false.

Responses

Response samples

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

Delete an image by its name.

This endpoint allows you to delete an image from the server's image directory.

path Parameters
image_id
required
string

Responses

Get an image by its name.

This endpoint allows you to retrieve an image from the server's image directory.

path Parameters
image_name
required
string

The name of the image to be retrieved.

Responses

Replace an image by its name.

This endpoint allows you to replace an existing image in the server's image directory.
Note: If you want to update information only and not the image itself, do not include the 'image' parameter in the request.

path Parameters
image_id
required
string

The id of the image to be replaced.

Request Body schema: application/x-www-form-urlencoded
image
image

The image to be replaced (optional).

business_type
string

Rent or sell (required).

category
string

The category of the image (optional).

number
string

The number of the image (optional).

title
string

The title of the image (optional).

name
string

The name of the image (optional).

content
string

The content of the image (optional).

price
string

The price of the image (optional).

status
string

The status of the image (optional).

Responses

healthCheck

This is a simple health check API

Responses