An Network Connection API allows you to set up and retrieve network connection information.
Retrieve a list of NetworkConnections.
Parameters
Property | Type | Required | Example |
---|---|---|---|
pageNumber | number | 1 |
const networkConnections = await Xedi.NetworkConnections.list();
{"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"}]}
Retrieve a Network Connection by Id.
Property | Type | Required | Example |
---|---|---|---|
id | Xuid | 'af6d8dfc-88b5-41f6-bbf5-825130390d64' |
const networkConnection = await Xedi.NetworkConnections.get('af6d8dfc-88b5-41f6-bbf5-825130390d64');
{"_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 a new Network Connection
Property | Type | Required | Example |
---|---|---|---|
partnership_id | string | 'hsahdhasd-88b5-41f6-bbf5-432423432re' | |
to_mailbox | string | 'ddasdasd-88b5-41f6-bbf5-far3q42444' | |
from_mailbox | string | 'sfafafasd-88b5-41f6-bbf5-432432432' | |
network_status | Xuid | 'pending' | |
connection_type | Xuid | 'FTP' |
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"});
{"_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 an existing Network Connection
Property | Type | Required | Example |
---|---|---|---|
id | Xuid | 'af6d8dfc-88b5-41f6-bbf5-825130390d64' | |
partnership_id | string | 'hsahdhasd-88b5-41f6-bbf5-432423432re' | |
to_mailbox | string | 'ddasdasd-88b5-41f6-bbf5-far3q42444' | |
from_mailbox | string | 'sfafafasd-88b5-41f6-bbf5-432432432' | |
network_status | Xuid | 'pending' | |
connection_type | Xuid | 'FTP' |
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",});
{"_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 a Network Connection. Response contains a deleted_at flag which signifies it has been deleted.
Property | Type | Required | Example |
---|---|---|---|
id | Xuid | '3n1jnj13-88b5-41f6-bbf5-m31kmk31mk1m31' |
const networkConnection = await Xedi.NetworkConnections.delete('3n1jnj13-88b5-41f6-bbf5-m31kmk31mk1m31');
{"_id": "3n1jnj13-88b5-41f6-bbf5-m31kmk31mk1m31"}