NetworkSetStatus
Sets the operational status of a network (e.g., Active, Suspended, Terminated).
:::caution Established API The SOAP API is in maintenance mode. For new integrations use the REST equivalent. :::
Method Signature
bool NetworkSetStatus(string SessionID, int NetworkID, Status Status)
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
SessionID | string | Yes | Active session token from Login() with NetOps or higher authority |
NetworkID | int | Yes | Numeric identifier of the network to update |
Status | Status | Yes | The new status to apply to the network |
Response
Returns true if the status was successfully updated, or false if the operation failed.
<!-- Example response XML -->
<NetworkSetStatusResult>true</NetworkSetStatusResult>
ENUMs
Status
See Status enum for all possible values.
| Value | Description |
|---|---|
Development | Network is in setup/development mode |
Active | Network is live and processing EDI |
Preproduction | Network is in testing/staging mode |
Suspended | Network is temporarily disabled |
Terminated | Network is permanently closed |
Code Examples
- C#
- Java
- Node.js
- Python
// .NET 10 — dotnet-svcutil generated proxy
// Suspend a network temporarily — requires elevated authority
bool success = await client.NetworkSetStatusAsync(
sessionID,
networkId: 42,
status: Status.Suspended);
if (success)
Console.WriteLine("Network status updated to Suspended.");
else
Console.WriteLine("Status update failed — check authority level.");
// Reactivate later
success = await client.NetworkSetStatusAsync(sessionID, networkId: 42, status: Status.Active);
// JAX-WS generated client
// wsimport -s src https://os.ecgrid.io/v4.1/prod/ECGridOS.asmx?WSDL
ECGridOS service = new ECGridOS();
ECGridOSPortType port = service.getECGridOSPort();
var result = port.NetworkSetStatus(sessionID /*, additional params */);
System.out.println(result);
// npm install soap
import soap from 'soap';
const WSDL = 'https://os.ecgrid.io/v4.1/prod/ECGridOS.asmx?WSDL';
const client = await soap.createClientAsync(WSDL);
const [result] = await client.NetworkSetStatusAsync({
SessionID: sessionId,
// additional params
});
console.log(result);
# pip install zeep
from zeep import Client
WSDL = 'https://os.ecgrid.io/v4.1/prod/ECGridOS.asmx?WSDL'
client = Client(WSDL)
result = client.service.NetworkSetStatus(
SessionID=session_id,
# additional params
)
print(result)
REST Equivalent
See Update Network — PUT /v2/networks (include a status field in the request body).