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

Use API to determine what JHF is installed

Hi

Is there an API call to identify what JHF is installed on a gateway.

I can get the version details using 'show-gateways-and-servers', but not what JHF is installed.

0 Kudos
2 Solutions

Accepted Solutions
Bob_Zimmerman
MVP Gold
MVP Gold

Not directly. You can use the API to try to run a command on the device via CPRID.

View solution in original post

Alex-
MVP Silver
MVP Silver

This is missing in both the Management API and the GAIA API.

A workaround is to use the GAIA API and the "run-script" endpoint which isn't that straightforward either.

But at least you can manage this via Web Services and JSON data manipulation.

Here's an example via mgmt_cli and text output.

  1. Send the "cpinfo -y FW1 | grep Take" command
  2. Receive a task-id
  3. Show the task-id, the output of the command will be displayed in Base 64 encoding
  4. Decode the output and interpret it further
#mgmt_cli run-script script 'cpinfo -y FW1 | grep Take' --version 1.8 --context gaia_api                
task-id: a3cc0a7c-525f-4235-8a82-6ec22ff289e5

#mgmt_cli show-task task-id "a3cc0a7c-525f-4235-8a82-6ec22ff289e5" --version 1.8 --context gaia_api
tasks:
- execution-time: '1.31'
  last-update-time:
    iso-8601: 2025-11-25T17:10+1.00.0
    posix: 1764087006.094337
  progress-description: succeeded
  progress-percentage: 100
  start-time:
    iso-8601: 2025-11-25T17:10+1.00.0
    posix: 1764087004.786555
  status: succeeded
  status-code: 200
  task-details:
  - error: ClRoaXMgaXMgQ2hlY2sgUG9pbnQgQ1BpbmZvIEJ1aWxkIDkxNDAwMDI1MCBmb3IgR0FJQQ==
    output: CUhPVEZJWF9SODJfSlVNQk9fSEZfTUFJTglUYWtlOiAgNDQ=
    return-value: 0
  task-id: a3cc0a7c-525f-4235-8a82-6ec22ff289e5
  task-name: /run-script
  time-spent-in-queue: '0.00'

# echo "CUhPVEZJWF9SODJfSlVNQk9fSEZfTUFJTglUYWtlOiAgNDQ=" | base64 -d
        HOTFIX_R82_JUMBO_HF_MAIN        Take:  44

 

 If the API team would include this in the "show-version" GAIA API endpoint, that would be great.

View solution in original post

4 Replies
Bob_Zimmerman
MVP Gold
MVP Gold

Not directly. You can use the API to try to run a command on the device via CPRID.

canuck
Explorer

Thanks for your response.

0 Kudos
Alex-
MVP Silver
MVP Silver

This is missing in both the Management API and the GAIA API.

A workaround is to use the GAIA API and the "run-script" endpoint which isn't that straightforward either.

But at least you can manage this via Web Services and JSON data manipulation.

Here's an example via mgmt_cli and text output.

  1. Send the "cpinfo -y FW1 | grep Take" command
  2. Receive a task-id
  3. Show the task-id, the output of the command will be displayed in Base 64 encoding
  4. Decode the output and interpret it further
#mgmt_cli run-script script 'cpinfo -y FW1 | grep Take' --version 1.8 --context gaia_api                
task-id: a3cc0a7c-525f-4235-8a82-6ec22ff289e5

#mgmt_cli show-task task-id "a3cc0a7c-525f-4235-8a82-6ec22ff289e5" --version 1.8 --context gaia_api
tasks:
- execution-time: '1.31'
  last-update-time:
    iso-8601: 2025-11-25T17:10+1.00.0
    posix: 1764087006.094337
  progress-description: succeeded
  progress-percentage: 100
  start-time:
    iso-8601: 2025-11-25T17:10+1.00.0
    posix: 1764087004.786555
  status: succeeded
  status-code: 200
  task-details:
  - error: ClRoaXMgaXMgQ2hlY2sgUG9pbnQgQ1BpbmZvIEJ1aWxkIDkxNDAwMDI1MCBmb3IgR0FJQQ==
    output: CUhPVEZJWF9SODJfSlVNQk9fSEZfTUFJTglUYWtlOiAgNDQ=
    return-value: 0
  task-id: a3cc0a7c-525f-4235-8a82-6ec22ff289e5
  task-name: /run-script
  time-spent-in-queue: '0.00'

# echo "CUhPVEZJWF9SODJfSlVNQk9fSEZfTUFJTglUYWtlOiAgNDQ=" | base64 -d
        HOTFIX_R82_JUMBO_HF_MAIN        Take:  44

 

 If the API team would include this in the "show-version" GAIA API endpoint, that would be great.

canuck
Explorer

Thanks for your response

0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events