CustomerNetwork

  • 15.5
This article is may not be up to date with the latest stable release of M4.

Description

The CustomerNetwork endpoint provides the API consumer with access to methods pertaining to customer networks and related data objects. The endpoint allows consumers to create and update customer networks, retreive customer network information, and link customer networks to various other data objects.

Methods

URL base/Circuits/CustomerNetwork/Specification
Action GET
Description Returns a data dictionary that details the available web service methods related to the CustomerNetwork controller.
Parameters None
 Returns  A JSON object with method descriptions
Sample Return Object
[
 {
 "HttpAction": "Get",
 "MethodName": "GetCustomerNetworkByCustomerNetworkID",
 "Description": "Returns the record for a single Customer Network given the passed in ID value (see Path).",
 "Path": "/CustomerNetwork/GetCustomerNetworkByCustomerNetworkID/25032"
 },
 {
 "HttpAction": "Get",
 "MethodName": "GetCustomerNetworkByCustomerID",
 "Description": "Returns the record for one or more Customer Networks given the passed in Customer ID value (see Path).",
 "Path": "/CustomerNetwork/GetCustomerNetworkByCustomerID/25032"
 },
 {
 "HttpAction": "Get",
 "MethodName": "GetCustomerNetworkByDescription",
 "Description": "Returns the record for a single Customer Network given the passed in description value (see Path).",
 "Path": "/CustomerNetwork/GetCustomerNetworkByDescription/25032"
 },
 {
 "HttpAction": "Post",
 "MethodName": "AddCustomerNetwork",
 "Description": "",
 "Format": {
 "Description": "Sample comments or description",
 "Alias": "Sample alias",
 "CustomerID": 1
 }
 },
 {
 "HttpAction": "Post",
 "MethodName": "UpdateCustomerNetwork",
 "Description": "",
 "Format": {
 "ID": 45,
 "Description": "Sample comments or description",
 "Alias": "Sample alias",
 "CustomerID": 1
 }
 },
 {
 "HttpAction": "Post",
 "MethodName": "DeleteCustomerNetwork",
 "Description": "",
 "Format": {
 "ID": 45
 }
 }
]
URL base/Circuits/CustomerNetwork/AddCustomerNetwork
Action POST
Description Returns the CustomerNetwork object just added to the M4 database.
Parameters
Name Required? Type Description
Description Yes String The description of the customer network.
Alias No String Alias of the customer network.
CustomerID Yes Integer The ID corresponding to the Customer record.
Sample JSON Package
{
 "Description": "Sample comments or description",
 "Alias": "sample alias",
 "CustomerID": 50
 }
Returns A JSON CustomerNetwork data object
Sample Return Object
{
 "Description": "CN123",
 "Alias": "Alias123",
 "CustomerID": 191,
 "ID": 67
}
Business Rules
Any violations of these business rules result in an appropriate error message being returned to the API consumer.
  • CustomerID: This value must exist as an ID to the Customer object.
URL base/Circuits/CustomerNetwork/UpdateCustomerNetwork
Action POST
Description Returns the CustomerNetwork object just updated on the M4 database.
Parameters
Name Required? Type Description
Description Yes String The description of the customer network.
Alias No String Alias of the customer network.
CustomerID Yes Integer The ID corresponding to the Customer record.
ID Yes Integer The ID of the CustomerNetwork being updated
Sample JSON Package
{
 "HttpAction": "Post",
 "MethodName": "UpdateCustomerNetwork",
 "Description": "Updates a customer network given the passed in CustomerNetwork object",
 "Format": {
 "Description": "Sample comments or description",
 "Alias": "sample alias",
 "CustomerID": 50,
 "ID": 1234
 }
Returns A JSON CustomerNetwork data object
Sample Return Object
{
 "Description": "CN123",
 "Alias": "Alias123",
 "CustomerID": 191,
 "ID": 67
}
Business Rules
Any violations of these business rules result in an appropriate error message being returned to the API consumer.
  • CustomerID: This value must exist as an ID to the Customer object.
  • ID: This value must exist as an ID to the CustomerNetwork object.
URL base/Circuits/CustomerNetwork/DeleteCustomerNetwork
Action POST
Description Returns a response message indicating success or failure of deletion.
Parameters
Name Required? Type Description
ID Yes Integer The ID of the CustomerNetwork being deleted
Sample JSON Package
{
 "HttpAction": "Post",
 "MethodName": "DeleteCustomerNetwork",
 "Description": "Updates a customer network given the passed in CustomerNetwork object",
 "Format": {
 "ID": 1234
 }
Returns A JSON response message
Sample Return Object
{
 "Message": "The customer network with ID [33] was deleted successfully."
}
Business Rules
Any violations of these business rules result in an appropriate error message being returned to the API consumer.
  • ID: This value must exist as an ID to the CustomerNetwork object.
URL base/Circuits/CustomerNetwork/GetCustomerNetwork/ID
Action GET
Description Returns a CustomerNetwork object when given an ID of a valid customer network in the M4 database.
Parameters
Name Required? Type Description
ID Yes Integer An integer value representing the ID of a customer network in the M4 database.
Returns A JSON Customer Network data object
Sample Return Object
{
 "Description": "019e8b01-bd42-453f-b303-e13016a15915",
 "Alias": "",
 "CustomerID": 354564,
 "ID": 31
}
URL base/Circuits/CustomerNetwork/GetCustomerNetworkByCustomerID/ID
Action GET
Description Returns a collection of CustomerNetwork object(s) when given an ID of a valid customer network in the M4 database.
Parameters
Name Required? Type Description
CustomerID Yes Integer An integer value representing the ID of a customer in the M4 database.
Returns A JSON collection of Customer Network data objects
Sample Return Object
[
 {
 "Description": "d0e78f1e-c47a-4375-b902-fd4a1e2c325e",
 "Alias": "",
 "CustomerID": 354601,
 "ID": 65
 },
 {
 "Description": "72606ee7-eaa2-4c4e-a820-35e08f7553f4",
 "Alias": "",
 "CustomerID": 354601,
 "ID": 66
 }
]
URL base/Circuits/CustomerNetwork/GetCustomerNetworkByDescription
Action POST
Description Returns the first matching CustomerNetwork object when given a description of a valid customer network in the M4 database.
Parameters
Name Required? Type Description
Description Yes String A string value representing the description of a customer network in the M4 database.
Sample JSON Package
{
      "Description": "019e8b01-bd42-453f-b303-e13016a15915"
}
Returns A JSON Customer Network data object
Sample Return Object
{
 "Description": "019e8b01-bd42-453f-b303-e13016a15915",
 "Alias": "",
 "CustomerID": 354564,
 "ID": 31
}
URL base/Circuits/CustomerNetwork/GetCustomerNetworksByAlias
Action POST
Description Returns a CustomerNetwork object when given an alias of valid customer networks in the M4 database.
Parameters
Name Required? Type Description
Alias Yes String A string value representing the alias of one or more customer networks in the M4 database.
Sample JSON Package
{
      "Alias": "TestValue"
}
Returns A JSON Customer Network data object
Sample Return Object
[{
 "Description": "0198af22-bd42-afef-de1a-e33016a19525",
 "Alias": "TestValue",
 "CustomerID": 354564,
 "ID": 31
},{
 "Description": "019e8b01-bd42-453f-b303-e13016a15915",
 "Alias": "TestValue",
 "CustomerID": 445454,
 "ID": 36
}]
URL base/Circuits/CustomerNetwork/GetCustomerNetworksByDescription
Action POST
Description Returns all matching CustomerNetwork objects when given a description of a valid customer network in the M4 database.
Parameters
Name Required? Type Description
Description Yes String A string value representing the description of a customer network in the M4 database.
Sample JSON Package
{
      "Description": "019e8b01-bd42-453f-b303-e13016a15915"
}
Returns A JSON list of Customer Network data objects
[Sample Return Object
[
{
 "Description": "019e8b01-bd42-453f-b303-e13016a15915",
 "Alias": "",
 "CustomerID": 354564,
 "ID": 31
}
]

Was this article helpful?

Related Articles