PageSourceSearch

https://docs.lumyri.com/assets/js/aaa6ca71.daa4c043.js

js lumyri.com collected 2026-10-02 15:26:32 UTC 16,739 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunklumyri_document=self.webpackChunklumyri_document||[]).push([[7276],{3905:(e,n,t)=>{t.d(n,{Zo:()=>p,kt:()=>k});var a=t(7294);function l(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function r(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,a)}return t}function i(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?r(Object(t),!0).forEach((function(n){l(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):r(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function o(e,n){if(null==e)return{};var t,a,l=function(e,n){if(null==e)return{};var t,a,l={},r=Object.keys(e);for(a=0;a<r.length;a++)t=r[a],n.indexOf(t)>=0||(l[t]=e[t]);return l}(e,n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a<r.length;a++)t=r[a],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(l[t]=e[t])}return l}var u=a.createContext({}),s=function(e){var n=a.useContext(u),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},p=function(e){var n=s(e.components);return a.createElement(u.Provider,{value:n},e.children)},c="mdxType",m={inlineCode:"code",wrapper:function(e){var n=e.children;return a.createElement(a.Fragment,{},n)}},d=a.forwardRef((function(e,n){var t=e.components,l=e.mdxType,r=e.originalType,u=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),c=s(t),d=l,k=c["".concat(u,".").concat(d)]||c[d]||m[d]||r;return t?a.createElement(k,i(i({ref:n},p),{},{components:t})):a.createElement(k,i({ref:n},p))}));function k(e,n){var t=arguments,l=n&&n.mdxType;if("string"==typeof e||l){var r=t.length,i=new Array(r);i[0]=d;var o={};for(var u in n)hasOwnProperty.call(n,u)&&(o[u]=n[u]);o.originalType=e,o[c]="string"==typeof e?e:l,i[1]=o;for(var s=2;s<r;s++)i[s]=t[s];return a.createElement.apply(null,i)}return a.createElement.apply(null,t)}d.displayName="MDXCreateElement"},3094:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>u,contentTitle:()=>i,default:()=>m,frontMatter:()=>r,metadata:()=>o,toc:()=>s});var a=t(7462),l=(t(7294),t(3905));const r={title:"User Role",slug:"/api/user/user-role"},i="User roles",o={unversionedId:"APIs document/Users/roles",id:"APIs document/Users/roles",title:"User Role",description:"All APIs endpoints",source:"@site/docs/APIs document/Users/roles.md",sourceDirName:"APIs document/Users",slug:"/api/user/user-role",permalink:"/docs/api/user/user-role",draft:!1,tags:[],version:"current",frontMatter:{title:"User Role",slug:"/api/user/user-role"},sidebar:"tutorialSidebar",previous:{title:"Employee",permalink:"/docs/api/user/employee"},next:{title:"Users",permalink:"/docs/api/user/user"}},u={},s=[{value:"All APIs endpoints",id:"all-apis-endpoints",level:2},{value:"Create new role",id:"create-new-role",level:2},{value:"Get list of roles",id:"get-list-of-roles",level:2},{value:"Get role detail",id:"get-role-detail",level:2},{value:"Update role",id:"update-role",level:2},{value:"Delete role",id:"delete-role",level:2}],p={toc:s},c="wrapper";
1function m(e){let{components:n,...t}=e;return(0,l.kt)(c,(0,a.Z)({},p,t,{components:n,mdxType:"MDXLayout"}),(0,l.kt)("h1",{id:"user-roles"},"User roles"),(0,l.kt)("admonition",{type:"info"}),(0,l.kt)("h2",{id:"all-apis-endpoints"},"All APIs endpoints"),(0,l.kt)("p",null,(0,l.kt)("a",{parentName:"p",href:"#get-list-of-roles"},"[GET]/users/roles")),(0,l.kt)("p",null,(0,l.kt)("a",{parentName:"p",href:"#get-role-detail"},"[GET]/users/roles:id")),(0,l.kt)("p",null,(0,l.kt)("a",{parentName:"p",href:"#create-new-role"},"[POST]/users/roles")),(0,l.kt)("p",null,(0,l.kt)("a",{parentName:"p",href:"#update-role"},"[PUT]/users/roles:id")),(0,l.kt)("p",null,(0,l.kt)("a",{parentName:"p",href:"#delete-role"},"[DEL]/users/roles")),(0,l.kt)("h2",{id:"create-new-role"},"Create new role"),(0,l.kt)("p",null,"Parameter"),(0,l.kt)("blockquote",null,(0,l.kt)("ul",{parentName:"blockquote"},(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("p",{parentName:"li"},(0,l.kt)("strong",{parentName:"p"},"name"),": ",(0,l.kt)("em",{parentName:"p"},"require")),(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"description: role's name"))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("p",{parentName:"li"},(0,l.kt)("strong",{parentName:"p"},"description"),": ",(0,l.kt)("em",{parentName:"p"},"option"))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("p",{parentName:"li"},(0,l.kt)("strong",{parentName:"p"},"permission"),": ",(0,l.kt)("em",{parentName:"p"},"require")," have properties"),(0,l.kt)("p",{parentName:"li"},(0,l.kt)("strong",{parentName:"p"},"application"),":"),(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"agents: {all: boolean, view: boolean}"),(0,l.kt)("li",{parentName:"ul"},"customer: {all: boolean, view: boolean}"),(0,l.kt)("li",{parentName:"ul"},"labels: {all: boolean, view: boolean}"),(0,l.kt)("li",{parentName:"ul"},"live_map: {all: boolean, view: boolean}"),(0,l.kt)("li",{parentName:"ul"},"settings: {all: boolean, view: boolean}"),(0,l.kt)("li",{parentName:"ul"},"labels: {all: boolean, view: boolean}")),(0,l.kt)("p",{parentName:"li"},(0,l.kt)("strong",{parentName:"p"},"platform"),":"),(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"application: {all: boolean, view: boolean}"),(0,l.kt)("li",{parentName:"ul"},"admins: {all: boolean, view: boolean}"),(0,l.kt)("li",{parentName:"ul"},"roles: {all: boolean, view: boolean}"),(0,l.kt)("li",{parentName:"ul"},"billing: {all: boolean, view: boolean}"),(0,l.kt)("li",{parentName:"ul"},"administrators: {all: boolean, view: boolean}"))))),(0,l.kt)("p",null,"Request"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-bash"},'curl --location --request POST \'https://api.lumyri.com//users/roles\' \\\n--header \'Authorization: Bearer $ACCESS_TOKEN\' \\\n--header \'Content-Type: application/json\' \\\n--data-raw \'{\n  "name": "co-founder",\n  "description": "",\n  "permission": {\n    "platform": {\n      "applications": {\n        "all": true,\n        "view": true\n      },\n      "admins": {\n        "all": false,\n        "view": false\n      },\n      "roles": {\n        "all": true,\n        "view": true\n      },\n      "billing": {\n        "all": true,\n        "view": true\n      },\n      "administrators": {\n        "all": true,\n        "view": true\n      }\n    },\n    "application": {\n      "applications": [],\n      "tickets": {\n        "all": true,\n        "view": true\n      },\n      "agents": {\n        "all": true,\n        "view": true\n      },\n      "customers": {\n        "all": true,\n        "view": true\n      },\n      "live_map": {\n        "all": true,\n        "view": true\n      },\n      "labels": {\n        "all": true,\n        "view": true\n      },\n      "settings": {\n        "all": true,\n        "view": true\n      }\n    }\n  }\n}\'\n')),(0,l.kt)("p",null,"Response"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-json"},'{\n  "error": null,\n  "data": {\n    "id": "78370cd6-a3ec-47a3-a307-e8c3be231caf",\n    "name": "founder",\n    "description": "this this the most important member",\n    "category": "CUSTOM ROLE",\n    "company_id": "805afbb9-c721-4d1b-845b-aed6ec5a0cb2",\n    "permission": {\n      "platform": {\n        "applications": {\n          "all": true,\n          "view": true\n        },\n        "admins": {\n          "all": false,\n          "view": false\n        },\n        "roles": {\n          "all": true,\n          "view": true\n        },\n        "billing": {\n          "all": true,\n          "view": true\n        }\n      },\n      "application": {\n        "applications": [],\n        "tickets": {\n          "all": true,\n          "view": true\n        },\n        "agents": {\n          "all": true,\n          "view": true\n        },\n        "customers": {\n          "all": true,\n          "view": true\n        },\n        "live_map": {\n          "all": true,\n          "view": true\n        }
1,\n        "labels": {\n          "all": true,\n          "view": true\n        },\n        "settings": {\n          "all": true,\n          "view": true\n        }\n      }\n    },\n    "created_at": "2023-02-21T06:57:33.237516109Z",\n    "updated_at": "2023-02-21T06:57:33.237516109Z",\n    "deleted_at": null\n  }\n}\n')),(0,l.kt)("h2",{id:"get-list-of-roles"},"Get list of roles"),(0,l.kt)("p",null,"Parameters"),(0,l.kt)("blockquote",null,(0,l.kt)("ul",{parentName:"blockquote"},(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("strong",{parentName:"li"},"limit"),": ",(0,l.kt)("em",{parentName:"li"},"optional"),(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"description: limit number of customer per page for pagination"),(0,l.kt)("li",{parentName:"ul"},"default: 10"))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("strong",{parentName:"li"},"page"),": ",(0,l.kt)("em",{parentName:"li"},"optional"),(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"description:current page for pagination"),(0,l.kt)("li",{parentName:"ul"},"default: 1"))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("strong",{parentName:"li"},"order_by"),": ",(0,l.kt)("em",{parentName:"li"},"optional"),(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"description: sort by name or description by ASC/DECS"),(0,l.kt)("li",{parentName:"ul"},"default: asc"))))),(0,l.kt)("p",null,"Request"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-bash"},"curl --location --request GET 'https://api.lumyri.com/users/roles?page=1&limit=5' \\\n--header 'Authorization: Bearer $ACCESS_TOKEN' \\\n")),(0,l.kt)("p",null,"Response"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-json"},'{\n  "error": null,\n  "data": {\n    "total": 1,\n    "per_page": 5,\n    "current_page": 1,\n    "last_page": 1,\n    "data": [\n      {\n        "id": "78370cd6-a3ec-47a3-a307-e8c3be231caf",\n        "name": "founder",\n        "description": "this this the most important member",\n        "category": "CUSTOM ROLE",\n        "company_id": "805afbb9-c721-4d1b-845b-aed6ec5a0cb2",\n        "permission": {\n          "platform": {\n            "applications": {\n              "all": true,\n              "view": true\n            },\n            "admins": {\n              "all": false,\n              "view": false\n            },\n            "roles": {\n              "all": true,\n              "view": true\n            },\n            "billing": {\n              "all": true,\n              "view": true\n            }\n          },\n          "application": {\n            "applications": [],\n            "tickets": {\n              "all": true,\n              "view": true\n            },\n            "agents": {\n              "all": true,\n              "view": true\n            },\n            "customers": {\n              "all": true,\n              "view": true\n            },\n            "live_map": {\n              "all": true,\n              "view": true\n            },\n            "labels": {\n              "all": true,\n              "view": true\n            },\n            "settings": {\n              "all": true,\n              "view": true\n            }\n          }\n        },\n        "created_at": "2023-02-21T06:57:33.237516109Z",\n        "updated_at": "2023-02-21T06:57:33.237516109Z",\n        "deleted_at": null\n      }\n    ]\n  }\n}\n')),(0,l.kt)("h2",{id:"get-role-detail"},"Get role detail"),(0,l.kt)("p",null,"Request"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-bash"},"curl --location --request GET 'https://api.lumyri.com/users/roles/$ROLE_ID' \\\n--header 'Authorization: Bearer $ACCESS_TOKEN' \\\n")),(0,l.kt)("p",null,"Response"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-json"},'{\n  "error": null,\n  "data": {\n    "id": "78370cd6-a3ec-47a3-a307-e8c3be231caf",\n    "name": "founder",\n    "description": "this this the most important member",\n    "category": "CUSTOM ROLE",\n    "company_id": "805afbb9-c721-4d1b-845b-aed6ec5a0cb2",\n    "permission": {\n      "platform": {\n        "applications": {\n          "all": true,\n          "view": true\n        },\n        "admins": {\n          "all": false,\n          "view": false\n        },\n        "roles": {\n          "all": true,\n          "view": true\n        },\n        "billing": {\n          "all": true,\n          "view": true\n        }\n      },\n      "application": {\n        "applications": [],\n        "tickets": {\n          "all": true,\n          "view": true\n        },\n        "agents": {\n          "all": true,\n          "view": true\n        },\n        "customers": {\n          "all": true,\n          "view": true\n        },\n        "live_map": {\n          "all": true,\n          "view": true\n        }
1,\n        "labels": {\n          "all": true,\n          "view": true\n        },\n        "settings": {\n          "all": true,\n          "view": true\n        }\n      }\n    },\n    "created_at": "2023-02-21T06:57:33.237516109Z",\n    "updated_at": "2023-02-21T06:57:33.237516109Z",\n    "deleted_at": null\n  }\n}\n')),(0,l.kt)("h2",{id:"update-role"},"Update role"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-bash"},'curl --location -g --request PUT \'https://api.lumyri.com//users/roles/$ROLE_ID\' \\\n--header \'Authorization: Bearer $ACCESS_TOKEN\' \\\n--data-raw \'{\n  "name": "CEO",\n  "description": "",\n  "category": "CUSTOM ROLE",\n  "company_id": "7016b075-c743-489f-ac7a-e2290c765c64",\n  "permission": {\n    "platform": {\n      "applications": {\n        "all": true,\n        "view": true\n      },\n      "admins": {\n        "all": true,\n        "view": true\n      },\n      "roles": {\n        "all": true,\n        "view": true\n      },\n      "billing": {\n        "all": true,\n        "view": true\n      }\n    },\n    "application": {\n      "applications": [],\n      "tickets": {\n        "all": true,\n        "view": true\n      },\n      "agents": {\n        "all": true,\n        "view": true\n      },\n      "customers": {\n        "all": true,\n        "view": true\n      },\n      "live_map": {\n        "all": true,\n        "view": true\n      },\n      "labels": {\n        "all": true,\n        "view": true\n      },\n      "settings": {\n        "all": true,\n        "view": true\n      }\n    }\n  },\n  "created_at": "2023-02-21T06:46:02.916417Z",\n  "updated_at": "2023-02-21T06:46:02.916417Z",\n  "deleted_at": null\n}\'\n')),(0,l.kt)("p",null,"Response"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-json"},'{\n  "error": null,\n  "data": {\n    "id": "78370cd6-a3ec-47a3-a307-e8c3be231caf",\n    "name": "CEO",\n    "description": "",\n    "category": "CUSTOM ROLE",\n    "company_id": "805afbb9-c721-4d1b-845b-aed6ec5a0cb2",\n    "permission": {\n      "platform": {\n        "applications": {\n          "all": true,\n          "view": true\n        },\n        "admins": {\n          "all": true,\n          "view": true\n        },\n        "roles": {\n          "all": true,\n          "view": true\n        },\n        "billing": {\n          "all": true,\n          "view": true\n        }\n      },\n      "application": {\n        "applications": [],\n        "tickets": {\n          "all": true,\n          "view": true\n        },\n        "agents": {\n          "all": true,\n          "view": true\n        },\n        "customers": {\n          "all": true,\n          "view": true\n        },\n        "live_map": {\n          "all": true,\n          "view": true\n        },\n        "labels": {\n          "all": true,\n          "view": true\n        },\n        "settings": {\n          "all": true,\n          "view": true\n        }\n      }\n    },\n    "created_at": "2023-02-21T06:57:33.237516Z",\n    "updated_at": "2023-02-21T07:17:30.188295323Z",\n    "deleted_at": null\n  }\n}\n')),(0,l.kt)("h2",{id:"delete-role"},"Delete role"),(0,l.kt)("p",null,"Request"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-bash"},"curl --location --request DELETE 'localhost:9090/users/roles/$ROLE_ID' \\\n--header 'Authorization: Bearer $ACCESS_TOKEN'\n")),(0,l.kt)("p",null,"Response"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-json"},'{\n  "error": null,\n  "data": {\n    "message": "OK"\n  }\n}\n')))}m.isMDXComponent=!0}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.