All URIs are relative to http://localhost
| Method | HTTP request | Description |
|---|---|---|
| HardwareGet | Get /api/2.29/hardware | List hardware component information |
| HardwarePatch | Patch /api/2.29/hardware | Modify visual identification |
HardwareGetResponse HardwareGet(ctx).Authorization(authorization).XRequestID(xRequestID).Filter(filter).Limit(limit).Names(names).Offset(offset).Sort(sort).TotalItemCount(totalItemCount).Execute()
List hardware component information
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/PureStorage-OpenConnect/go-pure-client/flasharray/FA_2_29"
)
func main() {
configuration, err := openapiclient.NewConfigurationBuilder(server.URL).
APIToken(apiToken).
Build()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when creating api client configuration: %v\n", err)
}
apiClient, err := openapiclient.NewClient(configuration)
if err != nil {
fmt.Fprintf(os.Stderr, "Error when creating api client: %v\n", err)
}
req := apiClient.HardwareAPI.HardwareGet(context.Background())
// Set request parameters ...
resp, r, err := req.Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `HardwareAPI.HardwareGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `HardwareGet`: HardwareGetResponse
fmt.Fprintf(os.Stdout, "Response from `HardwareAPI.HardwareGet`: %v\n", resp)
}Other parameters are passed through a pointer to a apiHardwareGetRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| authorization | string | Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) | |
| xRequestID | string | Supplied by client during request or generated by server. | |
| filter | string | Narrows down the results to only the response objects that satisfy the filter criteria. | |
| limit | int32 | Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. | |
| names | []string | Performs the operation on the unique name specified. Enter multiple names in comma-separated format. For example, `name01,name02`. | |
| offset | int32 | The starting position based on the results of the query in relation to the full set of response objects returned. | |
| sort | []string | Returns the response objects in the order specified. Set `sort` to the name in the response by which to sort. Sorting can be performed on any of the names in the response, and the objects can be sorted in ascending or descending order. By default, the response objects are sorted in ascending order. To sort in descending order, append the minus sign (`-`) to the name. A single request can be sorted on multiple objects. For example, you can sort all volumes from largest to smallest volume size, and then sort volumes of the same size in ascending order by volume name. To sort on multiple names, list the names as comma-separated values. | |
| totalItemCount | bool | If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. |
Authorization is handled by the Authenticator specified in the configuration and data are filled automatically. Use param authorization only when you need to override this behaviour.
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
HardwareResponse HardwarePatch(ctx).Hardware(hardware).Authorization(authorization).XRequestID(xRequestID).Names(names).Execute()
Modify visual identification
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/PureStorage-OpenConnect/go-pure-client/flasharray/FA_2_29"
)
func main() {
configuration, err := openapiclient.NewConfigurationBuilder(server.URL).
APIToken(apiToken).
Build()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when creating api client configuration: %v\n", err)
}
apiClient, err := openapiclient.NewClient(configuration)
if err != nil {
fmt.Fprintf(os.Stderr, "Error when creating api client: %v\n", err)
}
req := apiClient.HardwareAPI.HardwarePatch(context.Background())
// Set request parameters ...
resp, r, err := req.Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `HardwareAPI.HardwarePatch``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `HardwarePatch`: HardwareResponse
fmt.Fprintf(os.Stdout, "Response from `HardwareAPI.HardwarePatch`: %v\n", resp)
}Other parameters are passed through a pointer to a apiHardwarePatchRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| hardware | HardwarePatch | ||
| authorization | string | Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) | |
| xRequestID | string | Supplied by client during request or generated by server. | |
| names | []string | Performs the operation on the unique name specified. Enter multiple names in comma-separated format. For example, `name01,name02`. |
Authorization is handled by the Authenticator specified in the configuration and data are filled automatically. Use param authorization only when you need to override this behaviour.
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]