Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Luis_Miguel_Mig
Advisor

gaia api

Hi,
I am having issues trying to set up the gaia api in one of my gateways running r80.40 take 120.

If I just run in the local gaia:

 

mgmt_cli login user me password secret --context gaia_api

or

mgmt_cli show hostname --context gaia_api


I get the following error:

    Couldn't connect to server
    If you need to use a proxy server, add the '--proxy' parameter

As far as I understand there is not limitation by ip. 

    add allowed-client host any-host

The api is up and I am testing with the admin user. I have even granted permission for the admin user but it seems like the admin user has not rights for api access


gaia_api access -u admin -e true

show rba user admin
User
admin
access-mechanism Web-UI
access-mechanism CLI
role adminRole

If I run it through web services I get the folling error:

 

{
  "code": "generic_err_command_not_found", 
  "errors": "Requested API command: [login] not found", 
  "message": "Command Not Found"
}

 

 

gaia_api status

API Status:
---------------------
Build: cp991255022
Uptime: 0:00:01.940264
Current Sessions: 0
Latest Version: 1.5

Processes:

Name State PID
---------------------------------
GAIA_API Started 30762
GAIA_API_DOCS Started 30761
APACHE Started 13593
CONFD Started 12535
CLISHD Started 12615
CELERY Started 30759
REDIS Started 30760

Port Details:
-------------------
APACHE Gaia Port: 443

--------------------------------------------
Overall API Status: Started
--------------------------------------------

Am I missing anything?

 

0 Kudos
4 Replies
Luis_Miguel_Mig
Advisor

I have tested with postman and it is okay  - sk143612

I wonder what is the problem with mgmt_cli

 

0 Kudos
Luis_Miguel_Mig
Advisor

My fault I was just running mgmt_cli from the data plane. It works well from the mgmt plane.

The only issue remaining is the interface commands only have access to the mgmt plane and not to the data plane which is usually where we would like to be able to make changes.

Luis_Miguel_Mig
Advisor

I came across the ansible agnostic cli_command. It is very useful and powerful.

https://docs.ansible.com/ansible/latest/collections/ansible/netcommon/cli_command_module.html

This is the list of supported platforms

https://docs.ansible.com/ansible/latest/network/user_guide/platform_index.html 

It would be great if ansible could add support to checkpoint gaia too.

0 Kudos
Luis_Miguel_Mig
Advisor

another suggestion to include in the gaia api/ansible collection -> securexl ddos

0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events