Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
mojitocup
Explorer
Jump to solution

WEB-API issue

Hi,

 

We have Cloud-1 Solutions on AWS.

When i want to publish changes made with API, and I send API request to /publish i have 2 issues:

 

If i keep it empty, then i have response:

{ "code": "generic_err_invalid_syntax", "message": "Payload is empty" }

 

If i put current session {"uid":"<currentsession>"} i get:

{ "code": "not_implemented", "message": "Publishing other than current session is not implemented" }

 

But session is inputted correctly.

Please advice what to do and how to publish changes via API.

 

Thank you.

0 Kudos
1 Solution

Accepted Solutions
PhoneBoy
Admin
Admin

It's still not clear exactly how you are constructing the API call when it says "payload is empty."
Your publish API call:

  • Needs to have an empty body: { }
  • Should not include uid in the headers (what the "publishing other than current session not implemented" means)

See: https://sc1.checkpoint.com/documents/latest/APIs/index.html#web/publish~v1.9%20

View solution in original post

4 Replies
_Val_
Admin
Admin

Admin note: moved for an appropriate category. 

Please specify more details: SW and API versions in use, web tool used for API calls, and some actual examples. 

0 Kudos
mojitocup
Explorer

Hi,

 

i am using POSTMAN.

Just sending POST to this urls:

Login:

--header 'Content-Type: application/json' \
--data '{
"api-key""xxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}'

ALL GOOD!

Then do changes
 
--header 'Content-Type: application/json' \
--header 'X-chkp-sid: {{sid}}' \
--data-raw '{"name":"email@example.com"}'

ALL GOOD!


Then publish:

--header 'Content-Type: application/json' \
--header 'X-chkp-sid: {{sid}}' \
--data '{"uid":"xxxxxxxxxxxxxxxxxxxxxxxxxxxx"}'

{
    "code""not_implemented",
    "message""Publishing other than current session is not implemented"
}

IF i keep data/body empty or POST without data/body i get this:

{
    "code""generic_err_invalid_syntax",
    "message""Payload is empty"
}


IP Address: 100.64.0.2
Version: R80.40
OS: Gaia Kernel Version: 3.10
Up Time: 246 days and 13 hours

> show-api-versions

current-version: "1.9"

- "1.8.1"
- "1.9"

0 Kudos
PhoneBoy
Admin
Admin

It's still not clear exactly how you are constructing the API call when it says "payload is empty."
Your publish API call:

  • Needs to have an empty body: { }
  • Should not include uid in the headers (what the "publishing other than current session not implemented" means)

See: https://sc1.checkpoint.com/documents/latest/APIs/index.html#web/publish~v1.9%20

mojitocup
Explorer

Okay. found the issue. Dumb thing used 

--data '' as an empty raw data instead should use 
--data '{}' 

Thank you!
0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events