Endpoint from file

New-APIEndpointFromFile

Synopsis

Register an endpoint from an API definition file.

Syntax

New-APIEndpointFromFile -ImportFileFormat <String> -ImportFileSource <String> [-ImportURL <String>] [-ImportFileContent <String>] [-Root <String>] -ContractID <String> -GroupID <Int32> [-EdgeRCFile <String>] [-Section <String>] [-AccountSwitchKey <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
New-APIEndpointFromFile -Body <Object> [-EdgeRCFile <String>] [-Section <String>] [-AccountSwitchKey <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]

Description

Imports an API definition file and creates a new endpoint based on the file content. Optionally, when running this operation, you can specify whether to exclude the request or response body specifications from what's imported.

Parameters

‑AccountSwitchKey

An account credential key that lets you move between accounts when using an API client enabled for multiple accounts. To find account switch keys, use Get-AccountSwitchKey.

‑Body
Conditionally required

A request body, either as a PSCustomObject or a string. This parameter supports pipelining.

‑ContractID
Conditionally required

Filters endpoints to a specific contract. You need to specify this along with a -GroupID.

‑EdgeRCFile

Your EdgeGrid resource file to authenticate your command. Defaults to ~/.edgerc.

‑GroupID
Conditionally required

Filters endpoints to a specific group. You need to specify this along with a -ContractID.

‑ImportFileContent

The content of the API definition file encoded in Base64. Specify this only if you set the corresponding ImportFileSource to BODY_BASE64.

‑ImportFileFormat
Conditionally required

The format of the API definition file, either raml or swagger. You can import RAML 0.8 files and Swagger 2.0 or 3.0 files.

‑ImportFileSource
Conditionally required

The location of the API definition file, either URL if you store the file on the web, or BODY_BASE64 if you encode the file contents in the request body.

‑ImportURL

The URL from which to get the API definition file. Specify this only if you set the corresponding -ImportFileSource parameter to URL.

‑Root

If the import file located at the ImportURL is a ZIP archive, this identifies the API definition's filename within the archive.

‑Section

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

Related Links