Connectrix Brocade: REST API Scripts - GET command request difference in FOS v8.2.x and FOS v9.x
Summary: The "POST" command request works without any issues. However, Representational State Transfer Application Programming Interface Scripts execution for "GET" command request syntax varies in FOS v8.2.x and FOS v9.x. ...
This article applies to
This article does not apply to
This article is not tied to any specific product.
Not all product versions are identified in this article.
Symptoms
Issue while running the REST api-scripts that are running on SAN-Switches with FOS v8.2.x the command execution is successful.
Parent command:
Curl -X POST -H "Accept=\"application/yang-data+json\" Content-Type=\"'application/yang-data+json\" --user "user:password" -i https://switch/rest/login
Curl -X POST -H "Accept=\"application/yang-data+json\" Content-Type=\"'application/yang-data+json\" --user "user:password" -i https://switch/rest/login
From the response-header. The "Authorization" header can be extracted with no issue.
Post inheriting the "Authorization-header", the below command must be performed:
Curl -X GET -H "Accept=\"application/yang-data+json\" Content-Type=\"'application/yang-data+json\" Authorization=\"Custom_Basic 'Authorization-header from above'\" " -i https://switch/rest/running/fabric/fabric-switch
On FOS 9.1.x the above command execution fails with error:
The error message received is "HTTP/1.1 401 Unauthorized"
Cause
The cause of the issue is that the "GET" query for "fabric-switch" is not added in the "fabric" class of FOS v9.x command executions.
Resolution
FOS v8.2.x
In 8.2.3x the 'GET' query for 'fabric-switch' is in 'fabric' and brocade-fabric' classes so the query works for command:
"https://switch/rest/running/fabric/fabric-switch [switch]"
"https://switch/rest/running/brocade-fabric/fabric-switch [switch]"
"https://switch/rest/running/fabric/fabric-switch [switch]"
"https://switch/rest/running/brocade-fabric/fabric-switch [switch]"
FOS v9.x:
But in later releases from 9.x this is removed from 'fabric' class and is only included and available in the "brocade-fabric" class.
Hence the query as "https://switch/rest/running/ [switch]brocade-fabric/fabric-switch" works successfully.
Hence the query as "https://switch/rest/running/ [switch]brocade-fabric/fabric-switch" works successfully.
Additional Information
Feedback to Broadcom is given to add these details in the Broadcom REST API guides.
However, they have created customer level KB document FAQ-14293 for this change in behavior which is in progress.
However, they have created customer level KB document FAQ-14293 for this change in behavior which is in progress.
Affected Products
Connectrix B-Series Fabric OS 9.XProducts
Connectrix B-SeriesArticle Properties
Article Number: 000224736
Article Type: Solution
Last Modified: 03 May 2024
Version: 1
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.