Namirasoft Access API V1

Namira Software Corporation Access API Version 1 (1.4.7)

Install


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

npm i -g namirasoft-access-api-v1

Copied!

Commands


Healthz

Get

Returns the application health status

ns-access healthz get

Copied!

Value

List

Returns the value list of a given table and column

ns-access value list {table} {column}

Copied!

PermissionCategory

List

Returns the permission category list

ns-access permissioncategory list {filters} {page} {size}

Copied!

Get

Returns a permission category by id.

ns-access permissioncategory get {id}

Copied!

Create

Creates a new permission category

ns-access permissioncategory create

Copied!

--entity_id (String)

--category_id (String)

Delete

Deletes a permission category by an id.

ns-access permissioncategory delete {id}

Copied!

PermissionField

List

Returns the permission field list

ns-access permissionfield list {filters} {page} {size}

Copied!

Get

Returns a permission field by id.

ns-access permissionfield get {id}

Copied!

Create

Creates a new permission field

ns-access permissionfield create

Copied!

--entity_id (String)

--field_id (String)

--value (String)

--description (String)

Update

Updates a permission field by an id

ns-access permissionfield update {id}

Copied!

--entity_id (String)

--field_id (String)

--value (String)

--description (String)

Delete

Deletes a permission field by an id.

ns-access permissionfield delete {id}

Copied!

PermissionTag

List

Returns the permission tag list

ns-access permissiontag list {filters} {page} {size}

Copied!

Get

Returns a permission tag by id.

ns-access permissiontag get {id}

Copied!

Create

Creates a new permission tag

ns-access permissiontag create

Copied!

--entity_id (String)

--name (String)

--value (String)

--description (String)

Update

Updates a permission tag by an id

ns-access permissiontag update {id}

Copied!

--entity_id (String)

--name (String)

--value (String)

--description (String)

Delete

Deletes a permission tag by an id.

ns-access permissiontag delete {id}

Copied!

Permission

List

Returns the permission list

ns-access permission list {filters} {page} {size}

Copied!

ListOutgoing

Returns the outgoing permission list

ns-access permission listoutgoing {filters} {page} {size}

Copied!

ListIncoming

Returns the incoming permission list

ns-access permission listincoming {filters} {page} {size}

Copied!

Get

Returns a permission by an id

ns-access permission get {id}

Copied!

GetIncoming

Returns an incoming permission by an id

ns-access permission getincoming {id}

Copied!

GetOutgoing

Returns an outgoing permission by an id

ns-access permission getoutgoing {id}

Copied!

Create

Creates a new permission

ns-access permission create

Copied!

--to_user_id (String)

--firstName (String)

--lastName (String)

--email (String)

--default (Boolean)

Update

Updates a permission by an id

ns-access permission update {id}

Copied!

--to_user_id (String)

--firstName (String)

--lastName (String)

--email (String)

--default (Boolean)

Delete

Deletes a permission by an id

ns-access permission delete {id}

Copied!

PolicyCategory

List

Returns the policy category list

ns-access policycategory list {filters} {page} {size}

Copied!

Get

Returns a policy category by id.

ns-access policycategory get {id}

Copied!

Create

Creates a new policy category

ns-access policycategory create

Copied!

--entity_id (String)

--category_id (String)

Delete

Deletes a policy category by an id.

ns-access policycategory delete {id}

Copied!

PolicyField

List

Returns the policy field list

ns-access policyfield list {filters} {page} {size}

Copied!

Get

Returns a policy field by id.

ns-access policyfield get {id}

Copied!

Create

Creates a new policy field

ns-access policyfield create

Copied!

--entity_id (String)

--field_id (String)

--value (String)

--description (String)

Update

Updates a policy field by an id

ns-access policyfield update {id}

Copied!

--entity_id (String)

--field_id (String)

--value (String)

--description (String)

Delete

Deletes a policy field by an id.

ns-access policyfield delete {id}

Copied!

PolicyTag

List

Returns the policy tag list

ns-access policytag list {filters} {page} {size}

Copied!

Get

Returns a policy tag by id.

ns-access policytag get {id}

Copied!

Create

Creates a new policy tag

ns-access policytag create

Copied!

--entity_id (String)

--name (String)

--value (String)

--description (String)

Update

Updates a policy tag by an id

ns-access policytag update {id}

Copied!

--entity_id (String)

--name (String)

--value (String)

--description (String)

Delete

Deletes a policy tag by an id.

ns-access policytag delete {id}

Copied!

Policy

List

Returns the policy list

ns-access policy list {filters} {page} {size}

Copied!

ListIncoming

Returns the incoming policy list

ns-access policy listincoming {filters} {page} {size}

Copied!

Get

Returns a policy by an id

ns-access policy get {id}

Copied!

GetIncoming

Returns an incoming policy by an id

ns-access policy getincoming {id}

Copied!

Create

Creates a new policy

ns-access policy create

Copied!

--product_id (String)

--name (String)

--entity (String)

--actions (String)

--resources (String)

--allow (Boolean)

--description (String)

Update

Updates a policy by an id

ns-access policy update {id}

Copied!

--product_id (String)

--name (String)

--entity (String)

--actions (String)

--resources (String)

--allow (Boolean)

--description (String)

Delete

Deletes a policy by an id

ns-access policy delete {id}

Copied!

RoleCategory

List

Returns the role category list

ns-access rolecategory list {filters} {page} {size}

Copied!

Get

Returns a role category by id.

ns-access rolecategory get {id}

Copied!

Create

Creates a new role category

ns-access rolecategory create

Copied!

--entity_id (String)

--category_id (String)

Delete

Deletes a role category by an id.

ns-access rolecategory delete {id}

Copied!

RoleField

List

Returns the role field list

ns-access rolefield list {filters} {page} {size}

Copied!

Get

Returns a role field by id.

ns-access rolefield get {id}

Copied!

Create

Creates a new role field

ns-access rolefield create

Copied!

--entity_id (String)

--field_id (String)

--value (String)

--description (String)

Update

Updates a role field by an id

ns-access rolefield update {id}

Copied!

--entity_id (String)

--field_id (String)

--value (String)

--description (String)

Delete

Deletes a role field by an id.

ns-access rolefield delete {id}

Copied!

RoleTag

List

Returns the role tag list

ns-access roletag list {filters} {page} {size}

Copied!

Get

Returns a role tag by id.

ns-access roletag get {id}

Copied!

Create

Creates a new role tag

ns-access roletag create

Copied!

--entity_id (String)

--name (String)

--value (String)

--description (String)

Update

Updates a role tag by an id

ns-access roletag update {id}

Copied!

--entity_id (String)

--name (String)

--value (String)

--description (String)

Delete

Deletes a role tag by an id.

ns-access roletag delete {id}

Copied!

Role

List

Returns the role list

ns-access role list {filters} {page} {size}

Copied!

ListIncoming

Returns the incoming role list

ns-access role listincoming {filters} {page} {size}

Copied!

Get

Returns a role by an id

ns-access role get {id}

Copied!

GetIncoming

Returns an incoming role by an id

ns-access role getincoming {id}

Copied!

Create

Creates a new role

ns-access role create

Copied!

--name (String)

--description (String)

Update

Updates a role by an id

ns-access role update {id}

Copied!

--name (String)

--description (String)

Delete

Deletes a role by an id

ns-access role delete {id}

Copied!

Access

Get

Returns access of a user by an id

ns-access access get {user_id}

Copied!

SetOwner

Sets the owner id.

ns-access access setowner

Copied!

--owner_id (String)

Product

List

Returns the product list

ns-access product list {filters} {page} {size}

Copied!

Set

Sets all the required access of a product

ns-access product set {product_id}

Copied!
<@row_option>

@row_option_text

<@row_option@>

UserRole

Set

Sets a user role if not exists.

ns-access userrole set

Copied!

--user_id (String)

--role_id (String)

Schemas


PermissionCategory

{
  "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
    }
  }
}

EntityCategoryInput

{
  "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
    }
  }
}

PermissionField

{
  "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
    }
  }
}

EntityFieldInput

{
  "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
    }
  }
}

PermissionTag

{
  "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
    }
  }
}

EntityTagInput

{
  "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
    }
  }
}

Permission

{
  "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
    }
  }
}

PermissionInput

{
  "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
    }
  }
}

PolicyCategory

{
  "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
    }
  }
}

PolicyField

{
  "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
    }
  }
}

PolicyTag

{
  "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
    }
  }
}

Policy

{
  "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
    }
  }
}

PolicyInput

{
  "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
    }
  }
}

RoleCategory

{
  "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
    }
  }
}

RoleField

{
  "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
    }
  }
}

RoleTag

{
  "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
    }
  }
}

Role

{
  "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
    }
  }
}

RoleInput

{
  "name": "RoleInput",
  "type": "Object",
  "required": true,
  "fields": {
    "name": {
      "type": "String",
      "required": true,
      "allowEmpty": false
    },
    "description": {
      "type": "String",
      "required": true,
      "allowEmpty": false
    }
  }
}

Access

{
  "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
            }
          }
        }
      ]
    }
  }
}

Product

{
  "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
    }
  }
}

Enums

Namira Software Corporation

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