---
updatedAt: 2026-05-11T15:59:58.000Z
agentTools:
  siteIndex: https://techdocs.akamai.com/llms.txt
  projectIndex: https://techdocs.akamai.com/powershell/llms.txt
---

# Endpoint version from file

Set-APIEndpointVersionFromFile

## Synopsis

Edit an endpoint from an API definition file.

## Syntax

```powershell Name & attributes (Default)
Set-APIEndpointVersionFromFile -APIEndpointName <String> -VersionNumber <String> -ImportFileFormat <String> -ImportFileSource <String> [-ImportURL <String>] [-ImportFileContent <String>] [-Root <String>] -ContractID <String> -GroupID <Int32> [-EdgeRCFile <String>] [-Section <String>] [-AccountSwitchKey <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
```
```powershell Name & body
Set-APIEndpointVersionFromFile -APIEndpointName <String> -VersionNumber <String> -Body <Object> [-EdgeRCFile <String>] [-Section <String>] [-AccountSwitchKey <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
```
```powershell ID & body
Set-APIEndpointVersionFromFile -APIEndpointID <Int32> -VersionNumber <String> -Body <Object> [-EdgeRCFile <String>] [-Section <String>] [-AccountSwitchKey <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
```
```powershell ID & attributes
Set-APIEndpointVersionFromFile -APIEndpointID <Int32> -VersionNumber <String> -ImportFileFormat <String> -ImportFileSource <String> [-ImportURL <String>] [-ImportFileContent <String>] [-Root <String>] -ContractID <String> -GroupID <Int32> [-EdgeRCFile <String>] [-Section <String>] [-AccountSwitchKey <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
```

## Description

Imports an API definition file with the endpoint's details by its name or ID and version number.

The `-VersionNumber` parameter is an integer or the word `latest`.

## Parameters

<table>
  <tbody>
    <tr>
      <td class="ps-td"><code>&#8209;APIEndpointID</code><br/><span style="color: red; padding-left: 11px; font-size: 13px;"><em>Conditionally required</em></span></td> 
      <td class="ps-tableinner">
        <div class="ps-metadata">
          <span class="ps-param-metadata">Int32</span>
          <span class="ps-param-metadata">Parameter sets: <code>ID & body</code>, <code>ID & attributes</code></span>
          <span class="ps-param-metadata">Pipeline input: False</span>
        </div>
        <div>
          <p>The endpoint's ID.</p>
        </div>
      </td>
    </tr>
    <tr>
      <td class="ps-td"><code>&#8209;APIEndpointName</code><br/><span style="color: red; padding-left: 11px; font-size: 13px;"><em>Conditionally required</em></span></td> 
      <td class="ps-tableinner">
        <div class="ps-metadata">
          <span class="ps-param-metadata">String</span>
          <span class="ps-param-metadata">Parameter sets: <code>Name & body</code>, <code>Name & attributes</code></span>
          <span class="ps-param-metadata">Pipeline input: False</span>
        </div>
        <div>
          <p>The endpoint's name.</p>
        </div>
      </td>
    </tr>
    <tr>
      <td class="ps-td"><code>&#8209;AccountSwitchKey</code></td> 
      <td class="ps-tableinner">
        <div class="ps-metadata">
          <span class="ps-param-metadata">String</span>
          <span class="ps-param-metadata">Pipeline input: False</span>
        </div>
        <div>
          <p>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 <a href="https://techdocs.akamai.com/powershell/docs/get-accountswitchkey">Get-AccountSwitchKey</a>.</p>
        </div>
      </td>
    </tr>
    <tr>
      <td class="ps-td"><code>&#8209;Body</code><br/><span style="color: red; padding-left: 11px; font-size: 13px;"><em>Conditionally required</em></span></td> 
      <td class="ps-tableinner">
        <div class="ps-metadata">
          <span class="ps-param-metadata">Object</span>
          <span class="ps-param-metadata">Parameter sets: <code>ID & body</code>, <code>Name & body</code></span>
          <span class="ps-param-metadata">Pipeline input: ByValue</span>
        </div>
        <div>
          <p>A request body, either as a <code>PSCustomObject</code> or a string. This parameter supports pipelining.</p>
        </div>
      </td>
    </tr>
    <tr>
      <td class="ps-td"><code>&#8209;ContractID</code><br/><span style="color: red; padding-left: 11px; font-size: 13px;"><em>Conditionally required</em></span></td> 
      <td class="ps-tableinner">
        <div class="ps-metadata">
          <span class="ps-param-metadata">String</span>
          <span class="ps-param-metadata">Parameter sets: <code>ID & attributes</code>, <code>Name & attributes</code></span>
          <span class="ps-param-metadata">Pipeline input: False</span>
        </div>
        <div>
          <p>Filters endpoints to a specific contract. You need to specify this along with a <code>-GroupID</code>.</p>
        </div>
      </td>
    </tr>
    <tr>
      <td class="ps-td"><code>&#8209;EdgeRCFile</code></td> 
      <td class="ps-tableinner">
        <div class="ps-metadata">
          <span class="ps-param-metadata">String</span>
          <span class="ps-param-metadata">Pipeline input: False</span>
        </div>
        <div>
          <p>Your EdgeGrid resource file to authenticate your command. Defaults to <code>~/.edgerc</code>.</p>
        </div>
      </td>
    </tr>
    <tr>
      <td class="ps-td"><code>&#8209;GroupID</code><br/><span style="color: red; padding-left: 11px; font-size: 13px;"><em>Conditionally required</em></span></td> 
      <td class="ps-tableinner">
        <div class="ps-metadata">
          <span class="ps-param-metadata">Int32</span>
          <span class="ps-param-metadata">Parameter sets: <code>ID & attributes</code>, <code>Name & attributes</code></span>
          <span class="ps-param-metadata">Pipeline input: False</span>
        </div>
        <div>
          <p>Filters endpoints to a specific group. You need to specify this along with a <code>-ContractID</code>.</p>
        </div>
      </td>
    </tr>
    <tr>
      <td class="ps-td"><code>&#8209;ImportFileContent</code></td> 
      <td class="ps-tableinner">
        <div class="ps-metadata">
          <span class="ps-param-metadata">String</span>
          <span class="ps-param-metadata">Parameter sets: <code>ID & attributes</code>, <code>Name & attributes</code></span>
          <span class="ps-param-metadata">Pipeline input: False</span>
        </div>
        <div>
          <p>The content of the API definition file encoded in Base64. Specify this only if you set the corresponding ImportFileSource to <code>BODY_BASE64</code>.</p>
        </div>
      </td>
    </tr>
    <tr>
      <td class="ps-td"><code>&#8209;ImportFileFormat</code><br/><span style="color: red; padding-left: 11px; font-size: 13px;"><em>Conditionally required</em></span></td> 
      <td class="ps-tableinner">
        <div class="ps-metadata">
          <span class="ps-param-metadata">String</span>
          <span class="ps-param-metadata">Accepted values: <code>swagger</code>, <code>raml</code></span>
          <span class="ps-param-metadata">Parameter sets: <code>ID & attributes</code>, <code>Name & attributes</code></span>
          <span class="ps-param-metadata">Pipeline input: False</span>
        </div>
        <div>
          <p>The format of the API definition file, either <code>raml</code> or <code>swagger</code>. You can import RAML 0.8 files and Swagger 2.0 or 3.0 files.</p>
        </div>
      </td>
    </tr>
    <tr>
      <td class="ps-td"><code>&#8209;ImportFileSource</code><br/><span style="color: red; padding-left: 11px; font-size: 13px;"><em>Conditionally required</em></span></td> 
      <td class="ps-tableinner">
        <div class="ps-metadata">
          <span class="ps-param-metadata">String</span>
          <span class="ps-param-metadata">Accepted values: <code>URL</code>, <code>BODY_BASE64</code></span>
          <span class="ps-param-metadata">Parameter sets: <code>ID & attributes</code>, <code>Name & attributes</code></span>
          <span class="ps-param-metadata">Pipeline input: False</span>
        </div>
        <div>
          <p>The location of the API definition file, either <code>URL</code> if you store the file on the web, or <code>BODY_BASE64</code> if you encode the file contents in the request body.</p>
        </div>
      </td>
    </tr>
    <tr>
      <td class="ps-td"><code>&#8209;ImportURL</code></td> 
      <td class="ps-tableinner">
        <div class="ps-metadata">
          <span class="ps-param-metadata">String</span>
          <span class="ps-param-metadata">Parameter sets: <code>ID & attributes</code>, <code>Name & attributes</code></span>
          <span class="ps-param-metadata">Pipeline input: False</span>
        </div>
        <div>
          <p>The URL from which to get the API definition file. Specify this only if you set the corresponding <code>-ImportFileSource</code> parameter to <code>URL</code>.</p>
        </div>
      </td>
    </tr>
    <tr>
      <td class="ps-td"><code>&#8209;Root</code></td> 
      <td class="ps-tableinner">
        <div class="ps-metadata">
          <span class="ps-param-metadata">String</span>
          <span class="ps-param-metadata">Parameter sets: <code>ID & attributes</code>, <code>Name & attributes</code></span>
          <span class="ps-param-metadata">Pipeline input: False</span>
        </div>
        <div>
          <p>If the import file located at the ImportURL is a ZIP archive, this identifies the API definition's filename within the archive.</p>
        </div>
      </td>
    </tr>
    <tr>
      <td class="ps-td"><code>&#8209;Section</code></td> 
      <td class="ps-tableinner">
        <div class="ps-metadata">
          <span class="ps-param-metadata">String</span>
          <span class="ps-param-metadata">Pipeline input: False</span>
        </div>
        <div>
          <p>The section name in your EdgeGrid resource file to retrieve authentication credentials from. Defaults to <code>default</code>.</p>
        </div>
      </td>
    </tr>
    <tr>
      <td class="ps-td"><code>&#8209;VersionNumber</code><br/><span style="color: red; padding-left: 11px; font-size: 13px;"><em>Required</em></span></td> 
      <td class="ps-tableinner">
        <div class="ps-metadata">
          <span class="ps-param-metadata">String</span>
          <span class="ps-param-metadata">Pipeline input: False</span>
        </div>
        <div>
          <p>The endpoint version's number. Can be an integer or 'latest'.</p>
        </div>
      </td>
    </tr>
  </tbody>
</table>

## Related Links

* [User Guide: Overview](https://techdocs.akamai.com/powershell/docs/overview)
* [API Reference](https://techdocs.akamai.com/api-definitions/reference/post-endpoint-version-file)

# Sibling pages

* [Category](https://techdocs.akamai.com/powershell/docs/set-apicategory.md)
* [Endpoint version](https://techdocs.akamai.com/powershell/docs/set-apiendpointversion.md)
* [Endpoint version cache](https://techdocs.akamai.com/powershell/docs/set-apiendpointversioncache.md)
* [Endpoint version CORS](https://techdocs.akamai.com/powershell/docs/set-apiendpointversioncors.md)
* [Endpoint version error responses](https://techdocs.akamai.com/powershell/docs/set-apiendpointversionerrorresponses.md)
* [Endpoint version error response type](https://techdocs.akamai.com/powershell/docs/set-apiendpointversionerrorresponsetype.md)
* [Endpoint version GraphQL](https://techdocs.akamai.com/powershell/docs/set-apiendpointversiongraphql.md)
* [Endpoint version GZIP](https://techdocs.akamai.com/powershell/docs/set-apiendpointversiongzip.md)
* [Endpoint version JWT](https://techdocs.akamai.com/powershell/docs/set-apiendpointversionjwt.md)
* [Endpoint version PII](https://techdocs.akamai.com/powershell/docs/set-apiendpointversionpii.md)
* [Endpoint version privacy](https://techdocs.akamai.com/powershell/docs/set-apiendpointversionprivacy.md)
* [Endpoint version PII status](https://techdocs.akamai.com/powershell/docs/set-apiendpointversionpiistatus.md)
* [Endpoint version PII settings](https://techdocs.akamai.com/powershell/docs/set-apiendpointversionpiisettings.md)
* [Endpoint version resource](https://techdocs.akamai.com/powershell/docs/set-apiendpointversionresource.md)
* [Endpoint version resource operation](https://techdocs.akamai.com/powershell/docs/set-apiendpointversionresourceoperation.md)
* [Endpoint version routing](https://techdocs.akamai.com/powershell/docs/set-apiendpointversionrouting.md)