/generate-random-number

This endpoint is used to generate a random number within a specified range. The user can define the minimum and maximum values for the range, and the endpoint will return a random number within that range.

HTTP Method

GET

Query Parameters

  • min: (Optional) The minimum value of the range. Default is 1.
  • max: (Optional) The maximum value of the range. Default is 999999.

Request Format

To use this endpoint, make a GET request to the following URL, specifying the min and max values as query parameters:

https://node.nodetrigger.com/generate-random-number?min=<min_value>&max=<max_value>

Example Request

Example 1: Generate a random number between 1 and 100

GET https://node.nodetrigger.com/generate-random-number?min=1&max=100

Example 2: Generate a random number between 50 and 500

GET https://node.nodetrigger.com/generate-random-number?min=50&max=500

Response Format

The response will be a JSON object containing the generated random number.

Example Response

{
    "random_number": 123
}

In this example, the endpoint has returned the number 123, which is a random number within the specified range.