Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
kektuto
Explorer

API Call show-users limit error

Hello

I'm using the Management API from Checkpoint to return me all users with a valid certificate.

I'm using the management api v2 Check Point - Management API reference and based on the description the default limit is set to 50 but can be expanded to 500. When I expand it to 300 I receive the error: Expecting value: line 1 column 1 (char 0)

I narrowed the error down to the api call wich indicates for me, that checkpoint is the problem.

 

Maybe some has run in the same issue as well?

this is the Request:

POST {{server}}/show-users
Content-Type: application/json
X-chkp-sid: {{session}}

{
  "details-level" : "full",
"show-certificates":"true",
"limit":"450 }

 

0 Kudos
4 Replies
Amir_Senn
Employee
Employee

Hi,

Did it work for you with SSH? Try this: "mgmt_cli show users limit 500 -r true show-certificates true details-level full"

Weird error. Maybe some character got added somehow? If the command I sent you works I would try to download API collection from here: https://community.checkpoint.com/t5/API-CLI-Discussion/postman-collection-R82/m-p/230257#M8805

Working with collection might decrease syntax issues if this is the case.

Kind regards, Amir Senn
(1)
the_rock
Legend
Legend

I just raun command @Amir_Senn provided in my lab mgmt and appears worked fine, see below.

Andy

[Expert@CP-MANAGEMENT:0]# mgmt_cli show users limit 500 -r true show-certificates true details-level full
objects:
- uid: "1e73730c-4cc0-4c5a-aef7-e2d40ecea781"
name: "andy"
type: "user"
domain:
uid: "41e821a0-3720-11e3-aa6e-0800200c9fde"
name: "SMC User"
domain-type: "domain"
certificates: []
expiration-date:
iso-8601: "2030-12-31T00:00-0500"
posix: 1924923600000
authentication-method: "check point password"
allowed-locations:
sources:
- "97aeb369-9aea-11d5-bd16-0090272ccb30"
destinations:
- "97aeb369-9aea-11d5-bd16-0090272ccb30"
encryption:
ike: true
shared-secret: false
public-key: true
from-hour: "00:00"
to-hour: "23:59"
connect-on-days:
- "Sunday"
- "Monday"
- "Tuesday"
- "Wednesday"
- "Thursday"
- "Friday"
- "Saturday"
connect-daily: true
comments: ""
color: "brown"
icon: "Objects/user"
tags: []
meta-info:
lock: "unlocked"
validation-state: "ok"
last-modify-time:
posix: 1731509298991
iso-8601: "2024-11-13T09:48-0500"
last-modifier: "admin"
creation-time:
posix: 1720143726113
iso-8601: "2024-07-04T21:42-0400"
creator: "admin"
read-only: false
available-actions:
edit: "true"
delete: "true"
clone: "true"
- uid: "2dce6a02-9d49-42a8-a9cb-2967e8aca93c"
name: "testuser"
type: "user"
domain:
uid: "41e821a0-3720-11e3-aa6e-0800200c9fde"
name: "SMC User"
domain-type: "domain"
certificates: []
expiration-date:
iso-8601: "2030-12-31T00:00-0500"
posix: 1924923600000
authentication-method: "check point password"
allowed-locations:
sources:
- "97aeb369-9aea-11d5-bd16-0090272ccb30"
destinations:
- "97aeb369-9aea-11d5-bd16-0090272ccb30"
encryption:
ike: true
shared-secret: false
public-key: true
from-hour: "00:00"
to-hour: "23:59"
connect-on-days:
- "Sunday"
- "Monday"
- "Tuesday"
- "Wednesday"
- "Thursday"
- "Friday"
- "Saturday"
connect-daily: true
comments: ""
color: "violet red"
icon: "Objects/user"
tags: []
meta-info:
lock: "unlocked"
validation-state: "ok"
last-modify-time:
posix: 1731509304504
iso-8601: "2024-11-13T09:48-0500"
last-modifier: "admin"
creation-time:
posix: 1725112471536
iso-8601: "2024-08-31T09:54-0400"
creator: "admin"
read-only: false
available-actions:
edit: "true"
delete: "true"
clone: "true"
from: 1
to: 2
total: 2

[Expert@CP-MANAGEMENT:0]#

0 Kudos
PhoneBoy
Admin
Admin

If you're doing this with full details and certificates, it's entirely possible the API server is running out of memory trying to fulfill your request, thus the strange error.
Recommend using a smaller limit and using multiple calls with the offset parameter in an iterative fashion to get all the results.
I suspect, if you report this issue to TAC, they will make a similar suggestion.

0 Kudos
HeikoAnkenbrand
Champion Champion
Champion

To resolve the "show-users limit error" in your API call use Pagination: If you need to retrieve more results than the maximum limit allows, implement pagination. Use the "offset" parameter to manage the starting point of your results and make multiple API calls to gather all the data you need.

➜ CCSM Elite, CCME, CCTE ➜ www.checkpoint.tips
0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events