EndpointsDepartment Members

Department Members

Function-calling namespace: departmentMembers

  • Base URL: https://api.aivida.in
  • Engine endpoint: POST /api
  • Auth: Stack token middleware enabled in optional mode.
  • Send token in header: x-stack-access-token: <access_token> (or Authorization: Bearer <access_token>).
  • In optional mode: no token is allowed; invalid token is rejected with 401.

addMember

Source: backend/endpoints/department-members/add-member

Input Fields

FieldTypeRequiredConstraints
organizationIdstringYes-
departmentIdstringYes-
stackUserIdstringYes-
assignedBystringNo-

Example Request

curl -X POST https://api.aivida.in/api \
  -H "Content-Type: application/json" \
  -H "x-stack-access-token: <access_token_optional>" \
  -d '{
  "namespace": "departmentMembers",
  "apiName": "addMember",
  "data": {
    "organizationId": "org_123",
    "departmentId": "department_123",
    "stackUserId": "stackuser_123"
  }
}'

Example Response

{ "status": "ok", "data": {} }

countByDepartment

Source: backend/endpoints/department-members/count-by-department

Input Fields

FieldTypeRequiredConstraints
organizationIdstringYes-
departmentIdstringYes-

Example Request

curl -X POST https://api.aivida.in/api \
  -H "Content-Type: application/json" \
  -H "x-stack-access-token: <access_token_optional>" \
  -d '{
  "namespace": "departmentMembers",
  "apiName": "countByDepartment",
  "data": {
    "organizationId": "org_123",
    "departmentId": "department_123"
  }
}'

Example Response

{ "status": "ok", "data": {} }

countsByOrganization

Source: backend/endpoints/department-members/counts-by-organization

Input Fields

FieldTypeRequiredConstraints
organizationIdstringYes-

Example Request

curl -X POST https://api.aivida.in/api \
  -H "Content-Type: application/json" \
  -H "x-stack-access-token: <access_token_optional>" \
  -d '{
  "namespace": "departmentMembers",
  "apiName": "countsByOrganization",
  "data": {
    "organizationId": "org_123"
  }
}'

Example Response

{ "status": "ok", "data": {} }

create

Source: backend/endpoints/department-members/create

Input Fields

FieldTypeRequiredConstraints
departmentIdstringYes-
stackUserIdstringYes-
organizationIdstringYes-
assignedBystringNo-

Example Request

curl -X POST https://api.aivida.in/api \
  -H "Content-Type: application/json" \
  -H "x-stack-access-token: <access_token_optional>" \
  -d '{
  "namespace": "departmentMembers",
  "apiName": "create",
  "data": {
    "departmentId": "department_123",
    "stackUserId": "stackuser_123",
    "organizationId": "org_123"
  }
}'

Example Response

{ "status": "ok", "data": {} }

delete

Source: backend/endpoints/department-members/delete

Input Fields

FieldTypeRequiredConstraints
idstringYes-
organizationIdstringYes-

Example Request

curl -X POST https://api.aivida.in/api \
  -H "Content-Type: application/json" \
  -H "x-stack-access-token: <access_token_optional>" \
  -d '{
  "namespace": "departmentMembers",
  "apiName": "delete",
  "data": {
    "id": "id_123",
    "organizationId": "org_123"
  }
}'

Example Response

{ "status": "ok", "data": {} }

getAllMemberUserIds

Source: backend/endpoints/department-members/get-all-member-user-ids

Input Fields

FieldTypeRequiredConstraints
organizationIdstringYes-
departmentIdstringNo-

Example Request

curl -X POST https://api.aivida.in/api \
  -H "Content-Type: application/json" \
  -H "x-stack-access-token: <access_token_optional>" \
  -d '{
  "namespace": "departmentMembers",
  "apiName": "getAllMemberUserIds",
  "data": {
    "organizationId": "org_123"
  }
}'

Example Response

{ "status": "ok", "data": {} }

getById

Source: backend/endpoints/department-members/get-by-id

Input Fields

FieldTypeRequiredConstraints
idstringYes-
organizationIdstringYes-

Example Request

curl -X POST https://api.aivida.in/api \
  -H "Content-Type: application/json" \
  -H "x-stack-access-token: <access_token_optional>" \
  -d '{
  "namespace": "departmentMembers",
  "apiName": "getById",
  "data": {
    "id": "id_123",
    "organizationId": "org_123"
  }
}'

Example Response

{ "status": "ok", "data": {} }

listByDepartment

Source: backend/endpoints/department-members/list-by-department

Input Fields

FieldTypeRequiredConstraints
organizationIdstringYes-
departmentIdstringYes-

Example Request

curl -X POST https://api.aivida.in/api \
  -H "Content-Type: application/json" \
  -H "x-stack-access-token: <access_token_optional>" \
  -d '{
  "namespace": "departmentMembers",
  "apiName": "listByDepartment",
  "data": {
    "organizationId": "org_123",
    "departmentId": "department_123"
  }
}'

Example Response

{ "status": "ok", "data": {} }

listByOrganization

Source: backend/endpoints/department-members/list-by-organization

Input Fields

FieldTypeRequiredConstraints
organizationIdstringYes-
pageintegerNo-
pageSizeintegerNo-

Example Request

curl -X POST https://api.aivida.in/api \
  -H "Content-Type: application/json" \
  -H "x-stack-access-token: <access_token_optional>" \
  -d '{
  "namespace": "departmentMembers",
  "apiName": "listByOrganization",
  "data": {
    "organizationId": "org_123"
  }
}'

Example Response

{ "status": "ok", "data": {} }

removeMember

Source: backend/endpoints/department-members/remove-member

Input Fields

FieldTypeRequiredConstraints
organizationIdstringYes-
departmentIdstringYes-
stackUserIdstringYes-

Example Request

curl -X POST https://api.aivida.in/api \
  -H "Content-Type: application/json" \
  -H "x-stack-access-token: <access_token_optional>" \
  -d '{
  "namespace": "departmentMembers",
  "apiName": "removeMember",
  "data": {
    "organizationId": "org_123",
    "departmentId": "department_123",
    "stackUserId": "stackuser_123"
  }
}'

Example Response

{ "status": "ok", "data": {} }

update

Source: backend/endpoints/department-members/update

Input Fields

FieldTypeRequiredConstraints
idstringYes-
organizationIdstringYes-
departmentIdstringNonullable
stackUserIdstringNonullable
assignedBystringNonullable

Example Request

curl -X POST https://api.aivida.in/api \
  -H "Content-Type: application/json" \
  -H "x-stack-access-token: <access_token_optional>" \
  -d '{
  "namespace": "departmentMembers",
  "apiName": "update",
  "data": {
    "id": "id_123",
    "organizationId": "org_123"
  }
}'

Example Response

{ "status": "ok", "data": {} }