Jump to content

rshumsky

Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Reputation

1 Neutral
  1. Hello, @Dirkpitt! I’m not familiar with php but is it ok to use ‘ instead of “? Also, are you sure you need to pass “internal” flag? Are you trying to log in to KSC with internal user, not external one (AD, Windows user)?
  2. To close session you should close authenticated connection by calling socket destroy method. KSC keeps connection alive without direct command to close it.
  3. donkeykongjr, https://hostname:13299/api/v1.0/login creates an authenticated tls connection and requires to use it for further requests. Unfortunately, this might not work with standalone curl requests. In OpenAPI protocol description there is a note about it "Connection is established with the server and the client doesn't close it throughout the work with the server". You can create permanent TCP socket and use it.
  4. Hi, You can get root group id (KLADMSRV_GRP_ROOT) by calling HostGroup.GetStaticInfo() method. Pass this ID to HostGroup.GetSubgroups() to receive group tree and use group ids for filter in HostGroup.FindHosts(). Afterwards you can pass group id to wstrFilter for HostGroup.FindHosts(). For example you can get devices of root group with query -d '{wstrFilter: "(&(KLHST_WKS_GROUPID=your_KLADMSRV_GRP_ROOT))", vecFieldsToReturn: ["KLHST_WKS_HOSTNAME"], lMaxLifeTime: 60}' For FindGroups() in your example you should pass some wstrFilter. You can get more information of its syntax on "Search filter syntax" page in OpenAPI doc.
  5. donkeykongjr, Can you answer two more questions: Does this problem repeats in Postman while you not passing internal field? Do you escape double quotation marks inside curl Authorization header? I'm getting status 200 response on my query
  6. Hello, donkeykongjr! In KSC "internal" user means "created in KSC". Local admin user account is an external user (i.e. Windows account, AD-account). Try pass authorization header without internal flag. -H "Authorization: KSCBasic user="username", pass="password""
  7. Try not to pass X-KSC-VServer. This header required only for log in to KSC virtual server.
×
×
  • Create New...