Netstorage request

Synopsis

Make a request to the Netstorage usage API.

Syntax

Invoke-NetstorageRequest [-Path] <String> [-Action] <String> [[-AdditionalOptions] <Hashtable>] [[-Body] <String>] [[-InputFile] <String>] [[-OutputFile] <String>] [[-Retry] <Int32>] [[-NSRCFile] <String>] [[-Section] <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]

Description

This function is an upgrade of the older Invoke-NSAPIRequest, which interfaces between Netstorage sub-module functions and the Netstorage usage API. Credentials are loaded from environment variables or a provided .nsrc file and requests are signed. This function uses Invoke-RestMethod at its core.

Parameters

‑Action
Required

The API endpoint's action type.

‑AdditionalOptions

A hashtable of additional options for a request.

‑Body

A request body, either as a PSCustomObject or a string.

‑InputFile

File to send with upload HTTP requests.

‑NSRCFile

NSRC file to update/create.

‑OutputFile

The file to write response data to.

‑Path
Required

Your request path.

‑Retry

The retry index. Used to determine whether a failed request should be retried.

‑Section

The section name in your EdgeGrid resource file to retrieve authentication credentials from. Defaults to default.

Related Links

User Guide: Overview