Skip to content

Network Connections

Introduction

An Network Connection API allows you to set up and retrieve network connection information.

Usage

list

Retrieve a list of NetworkConnections.

Parameters

PropertyTypeRequiredExample
pageNumbernumber1

Usage

const networkConnections = await Xedi.NetworkConnections.list();

Response

{
"current_page": 1,
"data": [
{
"_id": "af6d8dfc-88b5-41f6-bbf5-825130390d64",
"partnership_id": "af6d8dfc-88b5-41f6-bbf5-825130390d64",
"from_mailbox": "cefda3331-ds33-41f6-bbf5-825130390d64",
"to_mailbox" : "e939d2d7-1376-4ecb-bff4-e32356e3ae78",
"network_status": "PENDING",
"connection_type": "FTP",
"created_at": "2020-05-11 10:27:03",
"updated_at": "2020-05-11 10:27:03"
},
{
"_id": "4asda4sda-88b5-41f6-bbf5-j43423432432j",
"partnership_id": "af6d8dfc-88b5-41f6-bbf5-825130390d64",
"from_mailbox": "cefda3331-ds33-41f6-bbf5-825130390d64",
"to_mailbox" : "e939d2d7-1376-4ecb-bff4-e32356e3ae78",
"network_status": "inactive",
"connection_type": "FTP",
"created_at": "2020-05-11 10:27:03",
"updated_at": "2020-05-11 10:27:03"
}
]
}

get

Retrieve a Network Connection by Id.

Parameters

PropertyTypeRequiredExample
idXuid'af6d8dfc-88b5-41f6-bbf5-825130390d64'

Usage

const networkConnection = await Xedi.NetworkConnections.get('af6d8dfc-88b5-41f6-bbf5-825130390d64');

Response

{
"_id": "af6d8dfc-88b5-41f6-bbf5-825130390d64",
"partnership_id": "af6d8dfc-88b5-41f6-bbf5-825130390d64",
"from_mailbox": "cefda3331-ds33-41f6-bbf5-825130390d64",
"to_mailbox" : "e939d2d7-1376-4ecb-bff4-e32356e3ae78",
"network_status": "PENDING",
"connection_type": "FTP",
"created_at": "2020-05-11 10:27:03",
"updated_at": "2020-05-11 10:27:03"
}

Create

Create a new Network Connection

Parameters

PropertyTypeRequiredExample
partnership_idstring'hsahdhasd-88b5-41f6-bbf5-432423432re'
to_mailboxstring'ddasdasd-88b5-41f6-bbf5-far3q42444'
from_mailboxstring'sfafafasd-88b5-41f6-bbf5-432432432'
network_statusXuid'pending'
connection_typeXuid'FTP'

Usage

const networkConnection = await Xedi.NetworkConnections.create(
{
"partnership_id": "af6d8dfc-88b5-41f6-bbf5-825130390d64",
"from_mailbox": "cefda3331-ds33-41f6-bbf5-825130390d64",
"to_mailbox" : "e939d2d7-1376-4ecb-bff4-e32356e3ae78",
"network_status": "PENDING",
"connection_type": "FTP"
}
);

Response

{
"_id": "af6d8dfc-88b5-41f6-bbf5-825130390d64",
"partnership_id": "af6d8dfc-88b5-41f6-bbf5-825130390d64",
"from_mailbox": "cefda3331-ds33-41f6-bbf5-825130390d64",
"to_mailbox" : "e939d2d7-1376-4ecb-bff4-e32356e3ae78",
"network_status": "PENDING",
"connection_type": "FTP",
"created_at": "2020-05-11 10:27:03",
"updated_at": "2020-05-11 10:27:03"
}

Update

Update an existing Network Connection

Parameters

PropertyTypeRequiredExample
idXuid'af6d8dfc-88b5-41f6-bbf5-825130390d64'
partnership_idstring'hsahdhasd-88b5-41f6-bbf5-432423432re'
to_mailboxstring'ddasdasd-88b5-41f6-bbf5-far3q42444'
from_mailboxstring'sfafafasd-88b5-41f6-bbf5-432432432'
network_statusXuid'pending'
connection_typeXuid'FTP'

Usage

const networkConnections = await Xedi.NetworkConnections.update(
{
"_id": "af6d8dfc-88b5-41f6-bbf5-825130390d64",
"partnership_id": "af6d8dfc-88b5-41f6-bbf5-825130390d64",
"from_mailbox": "cefda3331-ds33-41f6-bbf5-825130390d64",
"to_mailbox" : "e939d2d7-1376-4ecb-bff4-e32356e3ae78",
"network_status": "INACTIVE",
"connection_type": "FTP",
}
);

Response

{
"_id": "af6d8dfc-88b5-41f6-bbf5-825130390d64",
"partnership_id": "af6d8dfc-88b5-41f6-bbf5-825130390d64",
"from_mailbox": "cefda3331-ds33-41f6-bbf5-825130390d64",
"to_mailbox" : "e939d2d7-1376-4ecb-bff4-e32356e3ae78",
"network_status": "INACTIVE",
"connection_type": "FTP",
"created_at": "2020-05-11 10:27:03",
"updated_at": "2020-05-11 10:27:03"
}

Delete

Delete a Network Connection. Response contains a deleted_at flag which signifies it has been deleted.

Parameters

PropertyTypeRequiredExample
idXuid'3n1jnj13-88b5-41f6-bbf5-m31kmk31mk1m31'

Usage

const networkConnection = await Xedi.NetworkConnections.delete('3n1jnj13-88b5-41f6-bbf5-m31kmk31mk1m31');

Response

{
"_id": "3n1jnj13-88b5-41f6-bbf5-m31kmk31mk1m31"
}