homelab/docs/How-to/LLDAP_Graphql.md
2024-01-09 18:58:54 +01:00

735 B

LLDAP Graphql query

URL: /api/graphql/playground

set HTTP HEADER { "Authorization": "Bearer token"}

Get User

{
  user(userId: "admin"){
    id
    attributes {name,value}
    groups{id}
  }
}

updateUserAttribute

mutation { updateUser(
  				user:{
            id:"admin"
            insertAttributes:{
              name:"toto"
            	value:"test"
            }
          }
					){
		  	ok
  }
}

add User attribute


mutation { addUserAttribute(
    name:"toto"
    attributeType:STRING
    isList:true
    isVisible:true
    isEditable:true){
        ok
  }
}

delete user attribute

mutation {
  deleteUserAttribute(name: "toto") {
    ok
  }
}