Let me show an example of how we can identify version of vRA through API
Request
As a first step we need to fetch the authentication token
API:
POST {{vraurl}}/csp/gateway/am/api/login?{{access_token}}
Headers:
Content-Type: application/json
Body:
{
"username": "{{username}}",
"password": "{{password}}"
}
Tests:
var data=JSON.parse(responseBody);
postman.setEnvironmentVariable("access_token", data.cspAuthToken);
Params
{{access_token}}
Response
{
"cspAuthToken": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjMxMzk2MzUxOTA5ODI4MzAxNjUifQ.eyJpc3MiOiJDTj1QcmVsdWRlIElkZW50aXR5IFNlcnZpY2UsT1U9Q01CVSxPPVZNd2FyZSxMPVNvZmlhLFNUPVNvZmlhLEM9QkciLCJpYXQiOjE2NDkyNDg0ODEsImV4cCI6MTY0OTI3NzI4MSwianRpIjoiNWI0OGFjMmUtMTExMi00YTZmLWJmZmUtYzc2OThiOTY2MDJiIiwiY29udGV4dCI6Ilt7XCJtdGRcIjpcInVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMDphYzpjbGFzc2VzOlBhc3N3b3JkUHJvdGVjdGVkVHJhbnNwb3J0XCIsXCJpYXRcIjoxNjQ5MjQ4NDgxLFwiaWRcIjoxNX1dIiwiYXpwIjoicHJlbHVkZS11c2VyLWVsa2xpOVRSWUYiLCJzdWIiOiJjYXAub3JnOjkxZmIyM2ZkLTZjZTEtNGY2OS1hNTU2LWNlMmNlZmZiZWY0YSIsImRvbWFpbiI6ImNhcC5vcmciLCJ1c2VybmFtZSI6ImFydW4iLCJwZXJtcyI6WyJjc3A6b3JnX293bmVyIiwiZXh0ZXJuYWwvNTZiOTZjNDAtMjMxNC00MGI5LTk4YWUtZDM3M2M4NTk4ZjEwL29yY2hlc3RyYXRpb246YWRtaW4iLCJleHRlcm5hbC8zMzFmMDQwZC01NzNlLTQ1ODQtOGRmZi1mZmQ3MGFlMDE1MmIvQ29kZVN0cmVhbTphZG1pbmlzdHJhdG9yIiwiZXh0ZXJuYWwvZTJmMjA3N2ItNjE1Yy00YmY1LTg1MjQtMTIwMGRlMzEzZjQzL2NhdGFsb2c6YWRtaW4iLCJleHRlcm5hbC8yN2RjZmI0My1iODBlLTQzYWItODVhMi05ODBiNzliOWYyNzcvbWlncmF0aW9uOmFkbWluIiwiZXh0ZXJuYWwvYjgwMDJkZTAtMWI2MS00NWMwLWI4NGItMjdlZTc4ZTVmOTAyL3NhbHRzdGFjazphZG1pbiIsImV4dGVybmFsLzI3ZGNmYjQzLWI4MGUtNDNhYi04NWEyLTk4MGI3OWI5ZjI3Ny9hdXRvbWF0aW9uc2VydmljZTpjbG91ZF9hZG1pbiJdLCJjb250ZXh0X25hbWUiOiJjMmVhZTY3YS1mZjZkLTRkYWUtOWZkMy02NTk0MzUyYTFmOGEiLCJhY2N0IjoiYXJ1biJ9.uGIvog_oQ_cl-LeP9h_NcuBUmlqJDmFRkKxfU7YZXaRhlmJW9HC6ycTGjKW8yNJ83v6HMAEMz2PiVNgT09JMUHysrzQJUGnkcBGYnwD1T5SfvVvsFNsjdvq1vZ4tDc_wnZuX_VnHrgRP9QpMvNrU0KXvRNb23tAdfx8bVuvDCpmNQ3jUQZDpS5gvIqw3jS-vLhzAO-Mo0gE4am9h-zHvNg_UKyrfz2gMpWdyKYPw4ARHS8CDFuFcKimakPdbzE1AWeTtVWXfZwbNgaoQ-oGqw2N4MgQSy4Ov6oi6mPfz5YY1hGkwKEM5z8sX25VZC7lxwIRkkoLLmo9Yckic0v0vvQ"
}
Once we execute you would be fetching an authentication token. Replace the variables with appropriate values
Request
Create an API to fetch version
API:
GET {{vraurl}}/config.json
Authorization:
{{access_token}}
Response
{
"applicationVersion": "dlJlYWxpemUgQXV0b21hdGlvbiA4LjcuMC4yMTE2OSAoMTk1MDg1MDUpCg==",
"vac": {
"tableName": "symphony_tango_ui",
"collectorId": "vRA_ui.8_7",
"endpointEnv": "production"
},
"disableTelemetry": true,
"disablePendo": true,
"cloudFront": false,
"deployment": "onprem",
"featureFlags": {
"ENABLE_SEGMENT_IO": false,
"ENABLE_REQUEST_FORM_CUSTOMIZATION": true,
"ADMIN_MENU_ENABLED": true,
"DISABLE_WORKFLOW_ENUMERATION": true,
"ENABLE_MIGRATION": true,
"ENABLE_STANDALONE_ASSESSMENT": false,
"ENABLE_V2T_MIGRATION": true,
"QUICKSTART_TILE_ENABLED": true
}
}
We will now use the applicationVersion base64 value , decode it to get version of vRealize Automation
Login into https://www.base64decode.org/
Copy the string from the previous step
dlJlYWxpemUgQXV0b21hdGlvbiA4LjcuMC4yMTE2OSAoMTk1MDg1MDUpCg==
Comments