1"use strict";(globalThis.webpackChunkicehrm_docs=globalThis.webpackChunkicehrm_docs||[]).push([[6759],{6318(e,s,n){n.r(s),n.d(s,{assets:()=>d,contentTitle:()=>c,default:()=>h,frontMatter:()=>o,metadata:()=>r,toc:()=>a});const r=JSON.parse('{"id":"api-docs/directory","title":"Directory API","description":"Endpoints for the staff directory.","source":"@site/docs/api-docs/directory.md","sourceDirName":"api-docs","slug":"/api-docs/directory","permalink":"/docs/api-docs/directory","draft":false,"unlisted":false,"tags":[],"version":"current","sidebarPosition":15,"frontMatter":{"sidebar_position":15},"sidebar":"tutorialSidebar","previous":{"title":"Tasks API","permalink":"/docs/api-docs/tasks"},"next":{"title":"Insights API","permalink":"/docs/api-docs/insights"}}');var t=n(4848),i=n(8453);const o={sidebar_position:15},c="Directory API",d={},a=[{value:"Get Staff List",id:"get-staff-list",level:2},{value:"Search Staff Directory",id:"search-staff-directory",level:2},{value:"Get Random Staff Members",id:"get-random-staff-members",level:2},{value:"Related Topics",id:"related-topics",level:2}];function l(e){const s={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.header,{children:(0,t.jsx)(s.h1,{id:"directory-api",children:"Directory API"})}),"\n",(0,t.jsx)(s.p,{children:"Endpoints for the staff directory."}),"\n",(0,t.jsx)(s.h2,{id:"get-staff-list",children:"Get Staff List"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{children:"GET /staff\n"})}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.strong,{children:"Response:"})," ",(0,t.jsx)(s.code,{children:"200 OK"})," with list of staff members."]}),"\n",(0,t.jsx)(s.h2,{id:"search-staff-directory",children:"Search Staff Directory"}),"\n",(0,t.jsx)(s.p,{children:"Searches and filters the staff directory with pagination."}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{children:"POST /staff-directory\n"})}),"\n",(0,t.jsx)(s.p,{children:(0,t.jsx)(s.strong,{children:"Request Body:"})}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-json",children:'{\n "search": "John",\n "department": 2,\n "job_title": 5,\n "page": 1,\n "limit": 20\n}\n'})}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.strong,{children:"Response:"})," ",(0,t.jsx)(s.code,{children:"200 OK"})," with the filtered staff list."]}),"\n",(0,t.jsx)(s.h2,{id:"get-random-staff-members",children:"Get Random Staff Members"}),"\n",(0,t.jsx)(s.p,{children:"Returns a random sample of staff members."}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{children:"POST /staff-random\n"})}),"\n",(0,t.jsx)(s.p,{children:(0,t.jsx)(s.strong,{children:"Request Body:"})}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-json",children:'{\n "limit": 5\n}\n'})}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.strong,{children:"Response:"})," ",(0,t.jsx)(s.code,{children:"200 OK"})]}),"\n",(0,t.jsx)(s.h2,{id:"related-topics",children:"Related Topics"}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsx)(s.li,{children:(0,t.jsx)(s.a,{href:"/docs/api-docs/employees",children:"Employees API"})}),"\n",(0,t.jsx)(s.li,{children:(0,t.jsx)(s.a,{href:"/docs/api-docs/teams",children:"Teams API"})}),"\n"]})]})}function h(e={}){const{wrapper:s}={...(0,i.R)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(l,{...e})}):l(e)}},8453(e,s,n){n.d(s,{R:()=>o,x:()=>c});var r=n(6540);const t={},i=r.createContext(t);function o(e){const s=r.useContext(i);return r.useMemo(function(){return"function"==typeof e?e(s):{...s,...e}},[s,e])}function c(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:o(e.components),r.createElement(i.Provider,{value:s},e.children)}}}]);
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.