You can retrieve the catalog version from the Puppet Server using the /puppet/v3/catalog API. The catalog version is included in the response under the version key when a catalog is successfully retrieved.
Here are the key details:
Request Parameters: The API supports GET and POST methods. The relevant URL for your request would typically include the node name for which you want the catalog:
GET /puppet/v3/catalog/:nodename?environment=:environmentIn your case, you are making a GET request with parameters such as facts_format and transaction_uuid. Ensure that the facts parameter contains serialized fact data as JSON, and it might need to be double-escaped due to containing characters like &.
Response: If the catalog is found, the response includes the catalog details in JSON. The version field in the response represents the catalog version:
{ "name": "elmo.mydomain.com", "version": 1377473054, "code_id": null, "catalog_uuid": "827a74c8-cf98-44da-9ff7-18c5e4bee41e", "catalog_format": 1, ... }Comparison: After fetching the version from the API response, you can compare it to the config field in the last_run_summary.yaml. The config value generally refers to the branch or commit from which the catalog was compiled.
Make sure your curl request correctly constructs the API call and encodes the required data parameters to ensure a proper response
----------------