To use this cli, we need to first Install Nodejs, then run the following command.
npm i -g namirasoft-access-api-v1
Returns the application health status
ns-access healthz get
Returns the value list of a given table and column
ns-access value list {table} {column} {search} {field_id} {limit}
Returns the permission category list
ns-access permissioncategory list {filters} {page} {size} {sorts}
Returns a permission category by id.
ns-access permissioncategory get {id}
Creates a new permission category for an entity
ns-access permissioncategory create {entity_id}
--category_id (String)
Deletes a permission category by an id.
ns-access permissioncategory delete {entity_id} {id}
Returns the permission field list
ns-access permissionfield list {filters} {page} {size} {sorts}
Returns a permission field by id.
ns-access permissionfield get {id}
Creates a new permission field for an entity
ns-access permissionfield create {entity_id}
--field_id (String)
--value (Any)
Updates a permission field by an id for an entity
ns-access permissionfield update {entity_id} {id}
--field_id (String)
--value (Any)
Deletes a permission field by an id.
ns-access permissionfield delete {entity_id} {id}
Returns the permission tag list
ns-access permissiontag list {filters} {page} {size} {sorts}
Returns a permission tag by id.
ns-access permissiontag get {id}
Creates a new permission tag for an entity
ns-access permissiontag create {entity_id}
--name (String)
--value (String)
Updates a permission tag by an id for an entity
ns-access permissiontag update {entity_id} {id}
--name (String)
--value (String)
Deletes a permission tag by an id.
ns-access permissiontag delete {entity_id} {id}
Returns the permission list
ns-access permission list {filters} {page} {size} {sorts}
Returns the outgoing permission list
ns-access permission listoutgoing {filters} {page} {size} {sorts}
Returns the incoming permission list
ns-access permission listincoming {filters} {page} {size} {sorts}
Returns a permission by an id
ns-access permission get {id}
Returns an incoming permission by an id
ns-access permission getincoming {id}
Returns an outgoing permission by an id
ns-access permission getoutgoing {id}
Creates a new permission
ns-access permission create
--to_email (String)
--policies (Array)
--roles (Array)
--permission_category (Array)
--permission_field (Array)
--permission_tag (Array)
Updates a permission by an id
ns-access permission update {id}
--to_email (String)
--policies (Array)
--roles (Array)
--permission_category (Array)
--permission_field (Array)
--permission_tag (Array)
Deletes an outgoing permission by an id
ns-access permission deleteoutgoing {id}
Deletes an incoming permission by an id
ns-access permission deleteincoming {id}
Returns the policy category list
ns-access policycategory list {filters} {page} {size} {sorts}
Returns a policy category by id.
ns-access policycategory get {id}
Creates a new policy category for an entity
ns-access policycategory create {entity_id}
--category_id (String)
Deletes a policy category by an id.
ns-access policycategory delete {entity_id} {id}
Returns the policy field list
ns-access policyfield list {filters} {page} {size} {sorts}
Returns a policy field by id.
ns-access policyfield get {id}
Creates a new policy field for an entity
ns-access policyfield create {entity_id}
--field_id (String)
--value (Any)
Updates a policy field by an id for an entity
ns-access policyfield update {entity_id} {id}
--field_id (String)
--value (Any)
Deletes a policy field by an id.
ns-access policyfield delete {entity_id} {id}
Returns the policy tag list
ns-access policytag list {filters} {page} {size} {sorts}
Returns a policy tag by id.
ns-access policytag get {id}
Creates a new policy tag for an entity
ns-access policytag create {entity_id}
--name (String)
--value (String)
Updates a policy tag by an id for an entity
ns-access policytag update {entity_id} {id}
--name (String)
--value (String)
Deletes a policy tag by an id.
ns-access policytag delete {entity_id} {id}
Returns the policy list
ns-access policy list {filters} {page} {size} {sorts}
Returns the incoming policy list
ns-access policy listincoming {filters} {page} {size} {sorts}
Returns a policy by an id
ns-access policy get {id}
Returns an incoming policy by an id
ns-access policy getincoming {id}
Creates a new policy
ns-access policy create
--product_id (String)
--name (String)
--entity (String)
--actions (String)
--resources (String)
--allow (Boolean)
--description (String)
--policy_category (Array)
--policy_field (Array)
--policy_tag (Array)
Updates a policy by an id
ns-access policy update {id}
--product_id (String)
--name (String)
--entity (String)
--actions (String)
--resources (String)
--allow (Boolean)
--description (String)
--policy_category (Array)
--policy_field (Array)
--policy_tag (Array)
Deletes a policy by an id
ns-access policy delete {id}
Returns the role category list
ns-access rolecategory list {filters} {page} {size} {sorts}
Returns a role category by id.
ns-access rolecategory get {id}
Creates a new role category for an entity
ns-access rolecategory create {entity_id}
--category_id (String)
Deletes a role category by an id.
ns-access rolecategory delete {entity_id} {id}
Returns the role field list
ns-access rolefield list {filters} {page} {size} {sorts}
Returns a role field by id.
ns-access rolefield get {id}
Creates a new role field for an entity
ns-access rolefield create {entity_id}
--field_id (String)
--value (Any)
Updates a role field by an id for an entity
ns-access rolefield update {entity_id} {id}
--field_id (String)
--value (Any)
Deletes a role field by an id.
ns-access rolefield delete {entity_id} {id}
Returns the role tag list
ns-access roletag list {filters} {page} {size} {sorts}
Returns a role tag by id.
ns-access roletag get {id}
Creates a new role tag for an entity
ns-access roletag create {entity_id}
--name (String)
--value (String)
Updates a role tag by an id for an entity
ns-access roletag update {entity_id} {id}
--name (String)
--value (String)
Deletes a role tag by an id.
ns-access roletag delete {entity_id} {id}
Returns the role list
ns-access role list {filters} {page} {size} {sorts}
Returns the incoming role list
ns-access role listincoming {filters} {page} {size} {sorts}
Returns a role by an id
ns-access role get {id}
Returns an incoming role by an id
ns-access role getincoming {id}
Creates a new role
ns-access role create
--name (String)
--description (String)
--policies (Array)
--role_category (Array)
--role_field (Array)
--role_tag (Array)
Updates a role by an id
ns-access role update {id}
--name (String)
--description (String)
--policies (Array)
--role_category (Array)
--role_field (Array)
--role_tag (Array)
Deletes a role by an id
ns-access role delete {id}
Returns an access for a user_id
ns-access access _getfor {user_id} {owner_id}
Sets owner id.
ns-access access setowner
--owner_id (String)
Returns the product list
ns-access product list {filters} {page} {size} {sorts}
Returns a product by an id
ns-access product get {id}
Sets all the required access of a product
ns-access product _set {product_id}
@row_option_text
<@row_option@>Sets a user role if dose not exist.
ns-access userrole _set
--user_id (String)
--role_id (String)
{  "name": "PermissionCategory",  "type": "Object",  "required": true,  "fields": {    "id": {      "type": "Integer",      "required": true    },    "user_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "entity_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "category_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "created_at": {      "type": "DateTime",      "required": true    },    "updated_at": {      "type": "DateTime",      "required": true    }  }}
{  "name": "EntityCategoryInput",  "type": "Object",  "required": true,  "fields": {    "category_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    }  }}
{  "name": "PermissionField",  "type": "Object",  "required": true,  "fields": {    "id": {      "type": "Integer",      "required": true    },    "user_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "entity_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "field_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "value": {      "type": "Any",      "required": false    },    "created_at": {      "type": "DateTime",      "required": true    },    "updated_at": {      "type": "DateTime",      "required": true    }  }}
{  "name": "EntityFieldInput",  "type": "Object",  "required": true,  "fields": {    "field_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "value": {      "type": "Any",      "required": false    }  }}
{  "name": "PermissionTag",  "type": "Object",  "required": true,  "fields": {    "id": {      "type": "Integer",      "required": true    },    "user_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "entity_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "name": {      "type": "String",      "required": true,      "max": 255    },    "value": {      "type": "String",      "required": false    },    "created_at": {      "type": "DateTime",      "required": true    },    "updated_at": {      "type": "DateTime",      "required": true    }  }}
{  "name": "EntityTagInput",  "type": "Object",  "required": true,  "fields": {    "name": {      "type": "String",      "required": true,      "max": 255    },    "value": {      "type": "String",      "required": false    }  }}
{  "name": "Permission",  "type": "Object",  "required": true,  "fields": {    "id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "user_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "to_user_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "from_email": {      "type": "String",      "required": true    },    "from_first_name": {      "type": "String",      "required": true,      "max": 255    },    "from_last_name": {      "type": "String",      "required": true,      "max": 255    },    "to_email": {      "type": "String",      "required": true    },    "to_first_name": {      "type": "String",      "required": true,      "max": 255    },    "to_last_name": {      "type": "String",      "required": true,      "max": 255    },    "created_at": {      "type": "DateTime",      "required": true    },    "updated_at": {      "type": "DateTime",      "required": true    }  }}
{  "name": "PermissionFull",  "type": "Object",  "required": true,  "fields": {    "id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "user_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "to_user_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "from_email": {      "type": "String",      "required": true    },    "from_first_name": {      "type": "String",      "required": true,      "max": 255    },    "from_last_name": {      "type": "String",      "required": true,      "max": 255    },    "to_email": {      "type": "String",      "required": true    },    "to_first_name": {      "type": "String",      "required": true,      "max": 255    },    "to_last_name": {      "type": "String",      "required": true,      "max": 255    },    "created_at": {      "type": "DateTime",      "required": true    },    "updated_at": {      "type": "DateTime",      "required": true    },    "policies": {      "type": "Array",      "required": true,      "items": [        {          "type": "String",          "required": false        }      ]    },    "roles": {      "type": "Array",      "required": true,      "items": [        {          "type": "String",          "required": false        }      ]    },    "permission_category": {      "type": "Array",      "required": true,      "items": [        {          "name": "EntityCategoryInput",          "type": "Object",          "required": false,          "fields": {            "category_id": {              "type": "String",              "required": true,              "min": 20,              "max": 20            }          }        }      ]    },    "permission_field": {      "type": "Array",      "required": true,      "items": [        {          "name": "EntityFieldInput",          "type": "Object",          "required": false,          "fields": {            "field_id": {              "type": "String",              "required": true,              "min": 20,              "max": 20            },            "value": {              "type": "Any",              "required": false            }          }        }      ]    },    "permission_tag": {      "type": "Array",      "required": true,      "items": [        {          "name": "EntityTagInput",          "type": "Object",          "required": false,          "fields": {            "name": {              "type": "String",              "required": true,              "max": 255            },            "value": {              "type": "String",              "required": false            }          }        }      ]    }  }}
{  "name": "PermissionInput",  "type": "Object",  "required": true,  "fields": {    "to_email": {      "type": "String",      "required": true    },    "policies": {      "type": "Array",      "required": true,      "items": [        {          "type": "String",          "required": false        }      ]    },    "roles": {      "type": "Array",      "required": true,      "items": [        {          "type": "String",          "required": false        }      ]    },    "permission_category": {      "type": "Array",      "required": true,      "items": [        {          "name": "EntityCategoryInput",          "type": "Object",          "required": false,          "fields": {            "category_id": {              "type": "String",              "required": true,              "min": 20,              "max": 20            }          }        }      ]    },    "permission_field": {      "type": "Array",      "required": true,      "items": [        {          "name": "EntityFieldInput",          "type": "Object",          "required": false,          "fields": {            "field_id": {              "type": "String",              "required": true,              "min": 20,              "max": 20            },            "value": {              "type": "Any",              "required": false            }          }        }      ]    },    "permission_tag": {      "type": "Array",      "required": true,      "items": [        {          "name": "EntityTagInput",          "type": "Object",          "required": false,          "fields": {            "name": {              "type": "String",              "required": true,              "max": 255            },            "value": {              "type": "String",              "required": false            }          }        }      ]    }  }}
{  "name": "PolicyCategory",  "type": "Object",  "required": true,  "fields": {    "id": {      "type": "Integer",      "required": true    },    "user_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "entity_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "category_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "created_at": {      "type": "DateTime",      "required": true    },    "updated_at": {      "type": "DateTime",      "required": true    }  }}
{  "name": "PolicyField",  "type": "Object",  "required": true,  "fields": {    "id": {      "type": "Integer",      "required": true    },    "user_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "entity_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "field_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "value": {      "type": "Any",      "required": false    },    "created_at": {      "type": "DateTime",      "required": true    },    "updated_at": {      "type": "DateTime",      "required": true    }  }}
{  "name": "PolicyTag",  "type": "Object",  "required": true,  "fields": {    "id": {      "type": "Integer",      "required": true    },    "user_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "entity_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "name": {      "type": "String",      "required": true,      "max": 255    },    "value": {      "type": "String",      "required": false    },    "created_at": {      "type": "DateTime",      "required": true    },    "updated_at": {      "type": "DateTime",      "required": true    }  }}
{  "name": "Policy",  "type": "Object",  "required": true,  "fields": {    "id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "user_id": {      "type": "String",      "required": false,      "min": 20,      "max": 20    },    "product_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "name": {      "type": "String",      "required": true,      "max": 255    },    "entity": {      "type": "String",      "required": true,      "max": 255    },    "actions": {      "type": "String",      "required": true    },    "resources": {      "type": "String",      "required": true    },    "allow": {      "type": "Boolean",      "required": true    },    "description": {      "type": "String",      "required": false    },    "created_at": {      "type": "DateTime",      "required": true    },    "updated_at": {      "type": "DateTime",      "required": true    }  }}
{  "name": "PolicyFull",  "type": "Object",  "required": true,  "fields": {    "id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "user_id": {      "type": "String",      "required": false,      "min": 20,      "max": 20    },    "product_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "name": {      "type": "String",      "required": true,      "max": 255    },    "entity": {      "type": "String",      "required": true,      "max": 255    },    "actions": {      "type": "String",      "required": true    },    "resources": {      "type": "String",      "required": true    },    "allow": {      "type": "Boolean",      "required": true    },    "description": {      "type": "String",      "required": false    },    "created_at": {      "type": "DateTime",      "required": true    },    "updated_at": {      "type": "DateTime",      "required": true    },    "policy_category": {      "type": "Array",      "required": true,      "items": [        {          "name": "EntityCategoryInput",          "type": "Object",          "required": false,          "fields": {            "category_id": {              "type": "String",              "required": true,              "min": 20,              "max": 20            }          }        }      ]    },    "policy_field": {      "type": "Array",      "required": true,      "items": [        {          "name": "EntityFieldInput",          "type": "Object",          "required": false,          "fields": {            "field_id": {              "type": "String",              "required": true,              "min": 20,              "max": 20            },            "value": {              "type": "Any",              "required": false            }          }        }      ]    },    "policy_tag": {      "type": "Array",      "required": true,      "items": [        {          "name": "EntityTagInput",          "type": "Object",          "required": false,          "fields": {            "name": {              "type": "String",              "required": true,              "max": 255            },            "value": {              "type": "String",              "required": false            }          }        }      ]    }  }}
{  "name": "PolicyInput",  "type": "Object",  "required": true,  "fields": {    "product_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "name": {      "type": "String",      "required": true,      "max": 255    },    "entity": {      "type": "String",      "required": true,      "max": 255    },    "actions": {      "type": "String",      "required": true    },    "resources": {      "type": "String",      "required": true    },    "allow": {      "type": "Boolean",      "required": true    },    "description": {      "type": "String",      "required": false    },    "policy_category": {      "type": "Array",      "required": true,      "items": [        {          "name": "EntityCategoryInput",          "type": "Object",          "required": false,          "fields": {            "category_id": {              "type": "String",              "required": true,              "min": 20,              "max": 20            }          }        }      ]    },    "policy_field": {      "type": "Array",      "required": true,      "items": [        {          "name": "EntityFieldInput",          "type": "Object",          "required": false,          "fields": {            "field_id": {              "type": "String",              "required": true,              "min": 20,              "max": 20            },            "value": {              "type": "Any",              "required": false            }          }        }      ]    },    "policy_tag": {      "type": "Array",      "required": true,      "items": [        {          "name": "EntityTagInput",          "type": "Object",          "required": false,          "fields": {            "name": {              "type": "String",              "required": true,              "max": 255            },            "value": {              "type": "String",              "required": false            }          }        }      ]    }  }}
{  "name": "RoleCategory",  "type": "Object",  "required": true,  "fields": {    "id": {      "type": "Integer",      "required": true    },    "user_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "entity_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "category_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "created_at": {      "type": "DateTime",      "required": true    },    "updated_at": {      "type": "DateTime",      "required": true    }  }}
{  "name": "RoleField",  "type": "Object",  "required": true,  "fields": {    "id": {      "type": "Integer",      "required": true    },    "user_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "entity_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "field_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "value": {      "type": "Any",      "required": false    },    "created_at": {      "type": "DateTime",      "required": true    },    "updated_at": {      "type": "DateTime",      "required": true    }  }}
{  "name": "RoleTag",  "type": "Object",  "required": true,  "fields": {    "id": {      "type": "Integer",      "required": true    },    "user_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "entity_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "name": {      "type": "String",      "required": true,      "max": 255    },    "value": {      "type": "String",      "required": false    },    "created_at": {      "type": "DateTime",      "required": true    },    "updated_at": {      "type": "DateTime",      "required": true    }  }}
{  "name": "Role",  "type": "Object",  "required": true,  "fields": {    "id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "user_id": {      "type": "String",      "required": false,      "min": 20,      "max": 20    },    "name": {      "type": "String",      "required": true,      "max": 255    },    "description": {      "type": "String",      "required": false    },    "created_at": {      "type": "DateTime",      "required": true    },    "updated_at": {      "type": "DateTime",      "required": true    }  }}
{  "name": "RoleFull",  "type": "Object",  "required": true,  "fields": {    "id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "user_id": {      "type": "String",      "required": false,      "min": 20,      "max": 20    },    "name": {      "type": "String",      "required": true,      "max": 255    },    "description": {      "type": "String",      "required": false    },    "created_at": {      "type": "DateTime",      "required": true    },    "updated_at": {      "type": "DateTime",      "required": true    },    "policies": {      "type": "Array",      "required": true,      "items": [        {          "type": "String",          "required": false        }      ]    },    "role_category": {      "type": "Array",      "required": true,      "items": [        {          "name": "EntityCategoryInput",          "type": "Object",          "required": false,          "fields": {            "category_id": {              "type": "String",              "required": true,              "min": 20,              "max": 20            }          }        }      ]    },    "role_field": {      "type": "Array",      "required": true,      "items": [        {          "name": "EntityFieldInput",          "type": "Object",          "required": false,          "fields": {            "field_id": {              "type": "String",              "required": true,              "min": 20,              "max": 20            },            "value": {              "type": "Any",              "required": false            }          }        }      ]    },    "role_tag": {      "type": "Array",      "required": true,      "items": [        {          "name": "EntityTagInput",          "type": "Object",          "required": false,          "fields": {            "name": {              "type": "String",              "required": true,              "max": 255            },            "value": {              "type": "String",              "required": false            }          }        }      ]    }  }}
{  "name": "RoleInput",  "type": "Object",  "required": true,  "fields": {    "name": {      "type": "String",      "required": true,      "max": 255    },    "description": {      "type": "String",      "required": false    },    "policies": {      "type": "Array",      "required": true,      "items": [        {          "type": "String",          "required": false        }      ]    },    "role_category": {      "type": "Array",      "required": true,      "items": [        {          "name": "EntityCategoryInput",          "type": "Object",          "required": false,          "fields": {            "category_id": {              "type": "String",              "required": true,              "min": 20,              "max": 20            }          }        }      ]    },    "role_field": {      "type": "Array",      "required": true,      "items": [        {          "name": "EntityFieldInput",          "type": "Object",          "required": false,          "fields": {            "field_id": {              "type": "String",              "required": true,              "min": 20,              "max": 20            },            "value": {              "type": "Any",              "required": false            }          }        }      ]    },    "role_tag": {      "type": "Array",      "required": true,      "items": [        {          "name": "EntityTagInput",          "type": "Object",          "required": false,          "fields": {            "name": {              "type": "String",              "required": true,              "max": 255            },            "value": {              "type": "String",              "required": false            }          }        }      ]    }  }}
{  "name": "Access",  "type": "Object",  "required": true,  "fields": {    "user_id": {      "type": "String",      "required": true    },    "owner_id": {      "type": "String",      "required": true    },    "policies": {      "type": "Array",      "required": true,      "items": [        {          "name": "Policy",          "type": "Object",          "required": true,          "fields": {            "id": {              "type": "String",              "required": true,              "min": 20,              "max": 20            },            "user_id": {              "type": "String",              "required": false,              "min": 20,              "max": 20            },            "product_id": {              "type": "String",              "required": true,              "min": 20,              "max": 20            },            "name": {              "type": "String",              "required": true,              "max": 255            },            "entity": {              "type": "String",              "required": true,              "max": 255            },            "actions": {              "type": "String",              "required": true            },            "resources": {              "type": "String",              "required": true            },            "allow": {              "type": "Boolean",              "required": true            },            "description": {              "type": "String",              "required": false            },            "created_at": {              "type": "DateTime",              "required": true            },            "updated_at": {              "type": "DateTime",              "required": true            }          }        }      ]    }  }}
{  "name": "Product",  "type": "Object",  "required": true,  "fields": {    "id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "name": {      "type": "String",      "required": true,      "max": 255    },    "access": {      "type": "Any",      "required": true    },    "created_at": {      "type": "DateTime",      "required": true    },    "updated_at": {      "type": "DateTime",      "required": true    }  }}
©Copyright 2010 to 2025 Namira Software Corporation. All rights reserved.