Namirasoft Quota API V1

Namira Software Corporation Quota API Version 1 (1.4.15)

Install


To use this cli, we need to first Install Nodejs, then run the following command.

npm i -g namirasoft-quota-api-v1

Copied!

Commands


Healthz

Get

Returns the application health status

ns-quota healthz get

Copied!

Metrics

Get

Returns the application metrics

ns-quota metrics get

Copied!

Value

List

Returns the value list of a given table and column

ns-quota value list {table} {column} {search} {field_id} {limit}

Copied!

Quota

_GetByFor

Returns the quota of a product_id and action_name for an user_id

ns-quota quota _getbyfor {user_id} {product_id} {action_id_name}

Copied!

GetBy

Returns the quota of a product_id and action_name for an user_id

ns-quota quota getby {product_id} {action_id_name}

Copied!

List

Returns the quota list

ns-quota quota list {filters} {page} {size} {sorts}

Copied!

Get

Returns a quota by an id

ns-quota quota get {id}

Copied!

Product

List

Returns the product list

ns-quota product list {filters} {page} {size} {sorts}

Copied!

Get

Returns a product by an id

ns-quota product get {id}

Copied!

Action

List

Returns the action list

ns-quota action list {filters} {page} {size} {sorts}

Copied!

Get

Returns an action by an id

ns-quota action get {id}

Copied!

Request

List

Returns the request list

ns-quota request list {filters} {page} {size} {sorts}

Copied!

Get

Returns a request by an id

ns-quota request get {id}

Copied!

Create

Creates a new request

ns-quota request create

Copied!

--product_id (String)

--action_id_name (String)

--new_value (Integer)

Update

Updates a request by an id

ns-quota request update {id}

Copied!

--product_id (String)

--action_id_name (String)

--new_value (Integer)

Delete

Deletes a request by an id

ns-quota request delete {id}

Copied!

Schemas


Quota

{
  "name": "Quota",
  "type": "Object",
  "required": true,
  "fields": {
    "id": {
      "type": "String",
      "required": true,
      "min": 20,
      "max": 20
    },
    "user_id": {
      "type": "String",
      "required": true,
      "min": 20,
      "max": 20
    },
    "product_id": {
      "type": "String",
      "required": true,
      "min": 20,
      "max": 20
    },
    "action_id": {
      "type": "String",
      "required": true,
      "min": 20,
      "max": 20
    },
    "name": {
      "type": "String",
      "required": true,
      "max": 255
    },
    "value": {
      "type": "Integer",
      "required": true
    },
    "created_at": {
      "type": "DateTime",
      "required": true
    },
    "updated_at": {
      "type": "DateTime",
      "required": true
    }
  }
}

Product

{
  "name": "Product",
  "type": "Object",
  "required": true,
  "fields": {
    "id": {
      "type": "String",
      "required": true,
      "min": 20,
      "max": 20
    },
    "name": {
      "type": "String",
      "required": true,
      "max": 255
    },
    "created_at": {
      "type": "DateTime",
      "required": true
    },
    "updated_at": {
      "type": "DateTime",
      "required": true
    }
  }
}

Action

{
  "name": "Action",
  "type": "Object",
  "required": true,
  "fields": {
    "id": {
      "type": "String",
      "required": true,
      "min": 20,
      "max": 20
    },
    "product_id": {
      "type": "String",
      "required": true,
      "min": 20,
      "max": 20
    },
    "name": {
      "type": "String",
      "required": true,
      "max": 255
    },
    "default": {
      "type": "Integer",
      "required": true
    },
    "created_at": {
      "type": "DateTime",
      "required": true
    },
    "updated_at": {
      "type": "DateTime",
      "required": true
    }
  }
}

Request

{
  "name": "Request",
  "type": "Object",
  "required": true,
  "fields": {
    "id": {
      "type": "String",
      "required": true,
      "min": 20,
      "max": 20
    },
    "user_id": {
      "type": "String",
      "required": true,
      "min": 20,
      "max": 20
    },
    "product_id": {
      "type": "String",
      "required": true,
      "min": 20,
      "max": 20
    },
    "action_id": {
      "type": "String",
      "required": true,
      "min": 20,
      "max": 20
    },
    "current_value": {
      "type": "Integer",
      "required": true
    },
    "new_value": {
      "type": "Integer",
      "required": true
    },
    "status": {
      "name": "RequestStatus",
      "type": "Enum",
      "required": true,
      "valids": [
        "Requested",
        "Approved",
        "Rejected"
      ]
    },
    "created_at": {
      "type": "DateTime",
      "required": true
    },
    "updated_at": {
      "type": "DateTime",
      "required": true
    }
  }
}

RequestInput

{
  "name": "RequestInput",
  "type": "Object",
  "required": true,
  "fields": {
    "product_id": {
      "type": "String",
      "required": true,
      "min": 20,
      "max": 20
    },
    "action_id_name": {
      "type": "String",
      "required": true,
      "min": 20,
      "max": 20
    },
    "new_value": {
      "type": "Integer",
      "required": true
    }
  }
}

Enums

RequestStatus

Requested

Approved

Rejected

Namira Software Corporation

©Copyright 2010 to 2025 Namira Software Corporation. All rights reserved.