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}
Returns the permission category list
ns-access permissioncategory list {filters} {page} {size}
Returns a permission category by id.
ns-access permissioncategory get {id}
Creates a new permission category
ns-access permissioncategory create
--entity_id (String)
--category_id (String)
Deletes a permission category by an id.
ns-access permissioncategory delete {id}
Returns the permission field list
ns-access permissionfield list {filters} {page} {size}
Returns a permission field by id.
ns-access permissionfield get {id}
Creates a new permission field
ns-access permissionfield create
--entity_id (String)
--field_id (String)
--value (String)
--description (String)
Updates a permission field by an id
ns-access permissionfield update {id}
--entity_id (String)
--field_id (String)
--value (String)
--description (String)
Deletes a permission field by an id.
ns-access permissionfield delete {id}
Returns the permission tag list
ns-access permissiontag list {filters} {page} {size}
Returns a permission tag by id.
ns-access permissiontag get {id}
Creates a new permission tag
ns-access permissiontag create
--entity_id (String)
--name (String)
--value (String)
--description (String)
Updates a permission tag by an id
ns-access permissiontag update {id}
--entity_id (String)
--name (String)
--value (String)
--description (String)
Deletes a permission tag by an id.
ns-access permissiontag delete {id}
Returns the permission list
ns-access permission list {filters} {page} {size}
Returns the outgoing permission list
ns-access permission listoutgoing {filters} {page} {size}
Returns the incoming permission list
ns-access permission listincoming {filters} {page} {size}
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_user_id (String)
--firstName (String)
--lastName (String)
--email (String)
--default (Boolean)
Updates a permission by an id
ns-access permission update {id}
--to_user_id (String)
--firstName (String)
--lastName (String)
--email (String)
--default (Boolean)
Deletes a permission by an id
ns-access permission delete {id}
Returns the policy category list
ns-access policycategory list {filters} {page} {size}
Returns a policy category by id.
ns-access policycategory get {id}
Creates a new policy category
ns-access policycategory create
--entity_id (String)
--category_id (String)
Deletes a policy category by an id.
ns-access policycategory delete {id}
Returns the policy field list
ns-access policyfield list {filters} {page} {size}
Returns a policy field by id.
ns-access policyfield get {id}
Creates a new policy field
ns-access policyfield create
--entity_id (String)
--field_id (String)
--value (String)
--description (String)
Updates a policy field by an id
ns-access policyfield update {id}
--entity_id (String)
--field_id (String)
--value (String)
--description (String)
Deletes a policy field by an id.
ns-access policyfield delete {id}
Returns the policy tag list
ns-access policytag list {filters} {page} {size}
Returns a policy tag by id.
ns-access policytag get {id}
Creates a new policy tag
ns-access policytag create
--entity_id (String)
--name (String)
--value (String)
--description (String)
Updates a policy tag by an id
ns-access policytag update {id}
--entity_id (String)
--name (String)
--value (String)
--description (String)
Deletes a policy tag by an id.
ns-access policytag delete {id}
Returns the policy list
ns-access policy list {filters} {page} {size}
Returns the incoming policy list
ns-access policy listincoming {filters} {page} {size}
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)
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)
Deletes a policy by an id
ns-access policy delete {id}
Returns the role category list
ns-access rolecategory list {filters} {page} {size}
Returns a role category by id.
ns-access rolecategory get {id}
Creates a new role category
ns-access rolecategory create
--entity_id (String)
--category_id (String)
Deletes a role category by an id.
ns-access rolecategory delete {id}
Returns the role field list
ns-access rolefield list {filters} {page} {size}
Returns a role field by id.
ns-access rolefield get {id}
Creates a new role field
ns-access rolefield create
--entity_id (String)
--field_id (String)
--value (String)
--description (String)
Updates a role field by an id
ns-access rolefield update {id}
--entity_id (String)
--field_id (String)
--value (String)
--description (String)
Deletes a role field by an id.
ns-access rolefield delete {id}
Returns the role tag list
ns-access roletag list {filters} {page} {size}
Returns a role tag by id.
ns-access roletag get {id}
Creates a new role tag
ns-access roletag create
--entity_id (String)
--name (String)
--value (String)
--description (String)
Updates a role tag by an id
ns-access roletag update {id}
--entity_id (String)
--name (String)
--value (String)
--description (String)
Deletes a role tag by an id.
ns-access roletag delete {id}
Returns the role list
ns-access role list {filters} {page} {size}
Returns the incoming role list
ns-access role listincoming {filters} {page} {size}
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)
Updates a role by an id
ns-access role update {id}
--name (String)
--description (String)
Deletes a role by an id
ns-access role delete {id}
Returns access of a user by an id
ns-access access get {user_id}
Sets the owner id.
ns-access access setowner
--owner_id (String)
Returns the product list
ns-access product list {filters} {page} {size}
Sets all the required access of a product
ns-access product set {product_id}
@row_option_text
<@row_option@>Sets a user role if not exists.
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,      "allowEmpty": false    },    "entity_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20,      "allowEmpty": false    },    "category_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20,      "allowEmpty": false    },    "createdAt": {      "type": "DateTime",      "required": true    },    "updatedAt": {      "type": "DateTime",      "required": true    }  }}
{  "name": "EntityCategoryInput",  "type": "Object",  "required": true,  "fields": {    "entity_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20,      "allowEmpty": false    },    "category_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20,      "allowEmpty": false    }  }}
{  "name": "PermissionField",  "type": "Object",  "required": true,  "fields": {    "id": {      "type": "Integer",      "required": true    },    "user_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20,      "allowEmpty": false    },    "entity_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20,      "allowEmpty": false    },    "field_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20,      "allowEmpty": false    },    "value": {      "type": "String",      "required": true,      "allowEmpty": false    },    "description": {      "type": "String",      "required": false,      "allowEmpty": true    },    "createdAt": {      "type": "DateTime",      "required": true    },    "updatedAt": {      "type": "DateTime",      "required": true    }  }}
{  "name": "EntityFieldInput",  "type": "Object",  "required": true,  "fields": {    "entity_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20,      "allowEmpty": false    },    "field_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20,      "allowEmpty": false    },    "value": {      "type": "String",      "required": true,      "allowEmpty": false    },    "description": {      "type": "String",      "required": false,      "allowEmpty": true    }  }}
{  "name": "PermissionTag",  "type": "Object",  "required": true,  "fields": {    "id": {      "type": "Integer",      "required": true    },    "user_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20,      "allowEmpty": false    },    "entity_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20,      "allowEmpty": false    },    "name": {      "type": "String",      "required": true,      "allowEmpty": false    },    "value": {      "type": "String",      "required": true,      "allowEmpty": false    },    "description": {      "type": "String",      "required": false,      "allowEmpty": true    },    "createdAt": {      "type": "DateTime",      "required": true    },    "updatedAt": {      "type": "DateTime",      "required": true    }  }}
{  "name": "EntityTagInput",  "type": "Object",  "required": true,  "fields": {    "entity_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20,      "allowEmpty": false    },    "name": {      "type": "String",      "required": true,      "allowEmpty": false    },    "value": {      "type": "String",      "required": true,      "allowEmpty": false    },    "description": {      "type": "String",      "required": false,      "allowEmpty": true    }  }}
{  "name": "Permission",  "type": "Object",  "required": true,  "fields": {    "id": {      "type": "String",      "required": true,      "min": 20,      "max": 20,      "allowEmpty": false    },    "user_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20,      "allowEmpty": false    },    "to_user_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20,      "allowEmpty": false    },    "firstName": {      "type": "String",      "required": true,      "allowEmpty": false    },    "lastName": {      "type": "String",      "required": true,      "allowEmpty": false    },    "email": {      "type": "String",      "required": true,      "allowEmpty": false    },    "default": {      "type": "Boolean",      "required": true    },    "createdAt": {      "type": "DateTime",      "required": true    },    "updatedAt": {      "type": "DateTime",      "required": true    }  }}
{  "name": "PermissionInput",  "type": "Object",  "required": true,  "fields": {    "to_user_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20,      "allowEmpty": false    },    "firstName": {      "type": "String",      "required": true,      "allowEmpty": false    },    "lastName": {      "type": "String",      "required": true,      "allowEmpty": false    },    "email": {      "type": "String",      "required": true,      "allowEmpty": false    },    "default": {      "type": "Boolean",      "required": true    }  }}
{  "name": "PolicyCategory",  "type": "Object",  "required": true,  "fields": {    "id": {      "type": "Integer",      "required": true    },    "user_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20,      "allowEmpty": false    },    "entity_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20,      "allowEmpty": false    },    "category_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20,      "allowEmpty": false    },    "createdAt": {      "type": "DateTime",      "required": true    },    "updatedAt": {      "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,      "allowEmpty": false    },    "entity_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20,      "allowEmpty": false    },    "field_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20,      "allowEmpty": false    },    "value": {      "type": "String",      "required": true,      "allowEmpty": false    },    "description": {      "type": "String",      "required": false,      "allowEmpty": true    },    "createdAt": {      "type": "DateTime",      "required": true    },    "updatedAt": {      "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,      "allowEmpty": false    },    "entity_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20,      "allowEmpty": false    },    "name": {      "type": "String",      "required": true,      "allowEmpty": false    },    "value": {      "type": "String",      "required": true,      "allowEmpty": false    },    "description": {      "type": "String",      "required": false,      "allowEmpty": true    },    "createdAt": {      "type": "DateTime",      "required": true    },    "updatedAt": {      "type": "DateTime",      "required": true    }  }}
{  "name": "Policy",  "type": "Object",  "required": true,  "fields": {    "id": {      "type": "String",      "required": true,      "min": 20,      "max": 20,      "allowEmpty": false    },    "user_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20,      "allowEmpty": false    },    "product_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20,      "allowEmpty": false    },    "name": {      "type": "String",      "required": true,      "allowEmpty": false    },    "entity": {      "type": "String",      "required": true,      "allowEmpty": false    },    "actions": {      "type": "String",      "required": true,      "allowEmpty": false    },    "resources": {      "type": "String",      "required": true,      "allowEmpty": false    },    "allow": {      "type": "Boolean",      "required": true    },    "description": {      "type": "String",      "required": true,      "allowEmpty": false    },    "createdAt": {      "type": "DateTime",      "required": true    },    "updatedAt": {      "type": "DateTime",      "required": true    }  }}
{  "name": "PolicyInput",  "type": "Object",  "required": true,  "fields": {    "product_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20,      "allowEmpty": false    },    "name": {      "type": "String",      "required": true,      "allowEmpty": false    },    "entity": {      "type": "String",      "required": true,      "allowEmpty": false    },    "actions": {      "type": "String",      "required": true,      "allowEmpty": false    },    "resources": {      "type": "String",      "required": true,      "allowEmpty": false    },    "allow": {      "type": "Boolean",      "required": true    },    "description": {      "type": "String",      "required": true,      "allowEmpty": false    }  }}
{  "name": "RoleCategory",  "type": "Object",  "required": true,  "fields": {    "id": {      "type": "Integer",      "required": true    },    "user_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20,      "allowEmpty": false    },    "entity_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20,      "allowEmpty": false    },    "category_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20,      "allowEmpty": false    },    "createdAt": {      "type": "DateTime",      "required": true    },    "updatedAt": {      "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,      "allowEmpty": false    },    "entity_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20,      "allowEmpty": false    },    "field_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20,      "allowEmpty": false    },    "value": {      "type": "String",      "required": true,      "allowEmpty": false    },    "description": {      "type": "String",      "required": false,      "allowEmpty": true    },    "createdAt": {      "type": "DateTime",      "required": true    },    "updatedAt": {      "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,      "allowEmpty": false    },    "entity_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20,      "allowEmpty": false    },    "name": {      "type": "String",      "required": true,      "allowEmpty": false    },    "value": {      "type": "String",      "required": true,      "allowEmpty": false    },    "description": {      "type": "String",      "required": false,      "allowEmpty": true    },    "createdAt": {      "type": "DateTime",      "required": true    },    "updatedAt": {      "type": "DateTime",      "required": true    }  }}
{  "name": "Role",  "type": "Object",  "required": true,  "fields": {    "id": {      "type": "String",      "required": true,      "min": 20,      "max": 20,      "allowEmpty": false    },    "user_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20,      "allowEmpty": false    },    "name": {      "type": "String",      "required": true,      "allowEmpty": false    },    "description": {      "type": "String",      "required": true,      "allowEmpty": false    },    "createdAt": {      "type": "DateTime",      "required": true    },    "updatedAt": {      "type": "DateTime",      "required": true    }  }}
{  "name": "RoleInput",  "type": "Object",  "required": true,  "fields": {    "name": {      "type": "String",      "required": true,      "allowEmpty": false    },    "description": {      "type": "String",      "required": true,      "allowEmpty": false    }  }}
{  "name": "Access",  "type": "Object",  "required": true,  "fields": {    "user_id": {      "type": "String",      "required": true,      "allowEmpty": false    },    "owner_id": {      "type": "String",      "required": true,      "allowEmpty": false    },    "policies": {      "type": "Array",      "required": true,      "items": [        {          "name": "Policy",          "type": "Object",          "required": true,          "fields": {            "id": {              "type": "String",              "required": true,              "min": 20,              "max": 20,              "allowEmpty": false            },            "user_id": {              "type": "String",              "required": true,              "min": 20,              "max": 20,              "allowEmpty": false            },            "product_id": {              "type": "String",              "required": true,              "min": 20,              "max": 20,              "allowEmpty": false            },            "name": {              "type": "String",              "required": true,              "allowEmpty": false            },            "entity": {              "type": "String",              "required": true,              "allowEmpty": false            },            "actions": {              "type": "String",              "required": true,              "allowEmpty": false            },            "resources": {              "type": "String",              "required": true,              "allowEmpty": false            },            "allow": {              "type": "Boolean",              "required": true            },            "description": {              "type": "String",              "required": true,              "allowEmpty": false            },            "createdAt": {              "type": "DateTime",              "required": true            },            "updatedAt": {              "type": "DateTime",              "required": true            }          }        }      ]    }  }}
{  "name": "Product",  "type": "Object",  "required": true,  "fields": {    "id": {      "type": "String",      "required": true,      "min": 20,      "max": 20,      "allowEmpty": false    },    "name": {      "type": "String",      "required": true,      "allowEmpty": false    },    "access": {      "type": "Any",      "required": true    },    "createdAt": {      "type": "DateTime",      "required": true    },    "updatedAt": {      "type": "DateTime",      "required": true    }  }}
©Copyright 2010 to 2024 Namira Software Corporation. All rights reserved.