- 15.5
Description
The Circuit endpoint provides the API consumer with access to methods pertaining to circuits and related data objects. The endpoint allows consumers to create and update circuits, retreive circuit information, and link circuits to various other data objects.
Methods
- Specification
- AddCircuit
- UpdateCircuit
- DeleteCircuit
- GetCircuit
- GetCircuitByDescription
- GetCircuitsByTicketID
- GetSubCircuitsByID
- GetCircuitsByCustomerID
- GetCircuitsByCustomerNetworkID
- LinkCircuitToCustomerNetwork
- UnlinkCircuitFromCustomerNetwork
- LinkSubCircuit
- UnlinkSubCircuit
- LinkCircuitToCustomer
- UnlinkCircuitFromCustomer
- LinkCircuitToCircuit
- UnlinkCircuitFromCircuit
- GetLinkedCircuitsByCircuit
- GetCircuitsByEquipmentDescription
- GetEquipmentByCircuit
| URL | base/Circuits/Circuit/Specification |
|---|---|
| Action | GET |
| Description | Returns a data dictionary that details the available web service methods related to the Circuit controller. |
| Parameters | None |
| Returns | A JSON object with method descriptions |
| Sample Return Object | |
[
{
"HttpAction": "Get",
"MethodName": "GetCircuitByCircuitID",
"Description": "Returns the record for a single Circuit given the passed in ID value (see Path).",
"Path": "
|
|
| URL | base/Circuits/Circuit/AddCircuit | ||
|---|---|---|---|
| Action | POST | ||
| Description | Returns the Circuit object just added to the M4 database. | ||
| Parameters | |||
| Name | Required? | Type | Description |
| Description | Yes | String | The description of the circuit. Must be unique. |
| Billable | No | Boolean | Designates whether the circuit is billable. |
| Priority | No | Integer | The priority of the circuit (1-100). |
| Size | No | Integer | The ID corresponding to the CircuitSize entry. |
| Alias | No | String | The alias given to the circuit. |
| Status | No | Integer | The ID corresponding to the CircuitStatus entry. |
| Sample JSON Package | |||
{
"Description": "Circuit-2",
"Billable": false,
"Priority": 88,
"Size": 1,
"Alias": "VZN.842684.1667\\r\\nLVL3/324/016/DE",
"Status": 1
}
|
|||
| Returns | A JSON Circuit data object | ||
| Sample Return Object | |||
{
"Description": "Circuit123",
"Billable": false,
"Priority": 88,
"Size": 1,
"Alias": "Alias123",
"Status": 1,
"ID": 352200
}
|
|||
| Business Rules | |||
Any violations of these business rules result in an appropriate error message being returned to the API consumer.
|
|||
| URL | base/Circuits/Circuit/UpdateCircuit | ||
|---|---|---|---|
| Action | POST | ||
| Description | Returns the Circuit object just updated in the M4 database. | ||
| Parameters | |||
| Name | Required? | Type | Description |
| ID | Yes | Integer | The ID of the circuit in the M4 Database. |
| Description | Yes | String | The description of the circuit. Must be unique. |
| Billable | No | Boolean | Designates whether the circuit is billable. |
| Priority | No | Integer | The priority of the circuit (1-100). |
| Size | No | Integer | The ID corresponding to the CircuitSize entry. |
| Alias | No | String | The alias given to the circuit. |
| Status | No | Integer | The ID corresponding to the CircuitStatus entry. |
| Sample JSON Package | |||
{
"ID": 12345
"Description": "Sample comments or description",
"Billable": false,
"Priority": 50,
"Size": 123,
"Alias": "Sample alias",
"Status": 1
}
|
|||
| Returns | A JSON Circuit data object | ||
| Sample Return Object | |||
{
"Description": "Circuit123",
"Billable": false,
"Priority": 88,
"Size": 1,
"Alias": "Alias123",
"Status": 1,
"ID": 352200
}
|
|||
| Business Rules | |||
Any violations of these business rules result in an appropriate error message being returned to the API consumer.
|
|||
| URL | base/Circuits/Circuit/DeleteCircuit | ||
|---|---|---|---|
| Action | POST | ||
| Description | Returns the Circuit object just updated in the M4 database. | ||
| Parameters | |||
| Name | Required? | Type | Description |
| ID | Yes | Integer | The ID of the circuit in the M4 Database. |
| Sample JSON Package | |||
{
"ID": 12345
}
|
|||
| Returns | A JSON Circuit data object | ||
| Sample Return Object | |||
{
"Message": "The circuit with ID [12345] was deleted successfully."
}
|
|||
| Business Rules | |||
Any violations of these business rules result in an appropriate error message being returned to the API consumer.
|
|||
| URL | base/Circuits/Circuit/GetCircuit/ID | ||
|---|---|---|---|
| Action | GET | ||
| Description | Returns a Circuit object when given an ID of a valid circuit in the M4 database. | ||
| Parameters | |||
| Name | Required? | Type | Description |
| ID | Yes | Integer | An integer value representing the ID of a circuit in the M4 database. |
| Returns | A JSON Circuit data object | ||
| Sample Return Object | |||
{
"Description": "1st Fiberless Ring Circuit",
"Billable": false,
"Priority": 1,
"Size": 19,
"Alias": "",
"Status": null,
"ID": 3
}
|
|||
| URL | base/Circuits/Circuit/GetCircuitByDescription | ||
|---|---|---|---|
| Action | POST | ||
| Description | Returns a Circuit object when given a description of a valid circuit in the M4 database. | ||
| Parameters | |||
| Name | Required? | Type | Description |
| Description | Yes | String | A string value representing the description of a circuit in the M4 database. |
| Sample JSON Package | |||
{
"Description": "1st Fiberless Ring Circuit"
}
|
|||
| Returns | A JSON Circuit data object | ||
| Sample Return Object | |||
{
"Description": "1st Fiberless Ring Circuit",
"Billable": false,
"Priority": 1,
"Size": 19,
"Alias": "",
"Status": null,
"ID": 3
}
|
|||
| URL | base/Circuits/Circuit/GetCircuitsByTicketID/ID | ||
|---|---|---|---|
| Action | GET | ||
| Description | Returns a list of Circuit objects when given a ticketID is attached in the M4 database. | ||
| Parameters | |||
| Name | Required? | Type | Description |
| ID | Yes | Integer | A integer value representing the ticketID attached to a circuit in the M4 database. |
| Returns | A JSON collection of Circuit data objects | ||
| Sample Return Object | |||
[
{
"Description": "SyncTest",
"Billable": true,
"Priority": 1,
"Size": 8,
"Alias": "",
"Status": null,
"ID": 2
},
{
"Description": "1st Fiberless Ring Circuit",
"Billable": false,
"Priority": 1,
"Size": 19,
"Alias": "",
"Status": null,
"ID": 3
}
]
|
|||
| URL | base/Circuits/Circuit/GetSubCircuitsByID/ID | ||
|---|---|---|---|
| Action | GET | ||
| Description | Returns a list of SubCircuit IDs when given a circuitID is attached in the M4 database. | ||
| Parameters | |||
| Name | Required? | Type | Description |
| ID | Yes | Integer | A integer value representing the circuitID attached to a circuit in the M4 database. |
| Returns | A JSON object containing the CircuitID and a collection of SubCircuit IDs | ||
| Sample Return Object | |||
{
"CircuitID": 8,
"SubCircuits": {
"SubCircuitIDs": []
}
}
|
|||
| URL | base/Circuits/Circuit/GetCircuitsByCustomerID/ID | ||
|---|---|---|---|
| Action | GET | ||
| Description | Returns a list of Circuit objects when given a customerID is attached in the M4 database. | ||
| Parameters | |||
| Name | Required? | Type | Description |
| ID | Yes | Integer | A integer value representing the customerID attached to a circuit in the M4 database. |
| Returns | A JSON collection of Circuit data objects | ||
| Sample Return Object | |||
[
{
"Description": "SyncTest",
"Billable": true,
"Priority": 1,
"Size": 8,
"Alias": "",
"Status": null,
"ID": 2
},
{
"Description": "1st Fiberless Ring Circuit",
"Billable": false,
"Priority": 1,
"Size": 19,
"Alias": "",
"Status": null,
"ID": 3
}
]
|
|||
| URL | base/Circuits/Circuit/GetCircuitsByCustomerNetworkID/ID | ||
|---|---|---|---|
| Action | GET | ||
| Description | Returns a list of Circuit objects when given a customerNetworkID is attached in the M4 database. | ||
| Parameters | |||
| Name | Required? | Type | Description |
| ID | Yes | Integer | A integer value representing the customerNetworkID attached to a circuit in the M4 database. |
| Returns | A JSON collection of Circuit data objects | ||
| Sample Return Object | |||
[
{
"Description": "SyncTest",
"Billable": true,
"Priority": 1,
"Size": 8,
"Alias": "",
"Status": null,
"ID": 2
},
{
"Description": "1st Fiberless Ring Circuit",
"Billable": false,
"Priority": 1,
"Size": 19,
"Alias": "",
"Status": null,
"ID": 3
}
]
|
|||
| URL | base/Circuits/Circuit/LinkCircuitToCustomerNetwork | ||
|---|---|---|---|
| Action | POST | ||
| Description | Links a circuit to a customer network in the M4 database. | ||
| Parameters | |||
| Name | Required? | Type | Description |
| CircuitID | Yes | Integer | The ID of the circuit in the M4 Database. |
| CustomerNetworkID | Yes | Integer | The ID of the customer network in the M4 Database. |
| Sample JSON Package | |||
{
"CircuitID": 3,
"CustomerNetworkID": 1
}
|
|||
| Returns | A JSON response message. | ||
| Sample Return Object | |||
{
"CircuitID": 3,
"CustomerNetworkID": 1
}
|
|||
| Business Rules | |||
Any violations of these business rules result in an appropriate error message being returned to the API consumer.
|
|||
| URL | base/Circuits/Circuit/UnlinkCircuitFromCustomerNetwork | ||
|---|---|---|---|
| Action | POST | ||
| Description | Unlinks a circuit from a customer network in the M4 database. | ||
| Parameters | |||
| Name | Required? | Type | Description |
| CircuitID | Yes | Integer | The ID of the circuit in the M4 Database. |
| CustomerNetworkID | Yes | Integer | The ID of the customer network in the M4 Database. |
| Sample JSON Package | |||
{
"CircuitID": 3,
"CustomerNetworkID": 1
}
|
|||
| Returns | A JSON response message. | ||
| Sample Return Object | |||
{
"CircuitID": 3,
"CustomerNetworkID": 1
}
|
|||
| Business Rules | |||
Any violations of these business rules result in an appropriate error message being returned to the API consumer.
|
|||
| URL | base/Circuits/Circuit/LinkSubCircuit | ||
|---|---|---|---|
| Action | POST | ||
| Description | Links a circuit to a sub circuit in the M4 database. | ||
| Parameters | |||
| Name | Required? | Type | Description |
| ParentCircuitID | Yes | Integer | The ID of the parent circuit in the M4 Database. |
| SubCircuitID | Yes | Integer | The ID of the sub circuit in the M4 Database. |
| Sample JSON Package | |||
{
"ParentCircuitID": 8,
"SubCircuitID": 32
}
|
|||
| Returns | A JSON response message. | ||
| Sample Return Object | |||
{
"ParentCircuitID": 8,
"SubCircuitID": 32
}
|
|||
| Business Rules | |||
Any violations of these business rules result in an appropriate error message being returned to the API consumer.
|
|||
| URL | base/Circuits/Circuit/UnlinkSubCircuit | ||
|---|---|---|---|
| Action | POST | ||
| Description | Unlinks a circuit from a sub circuit in the M4 database. | ||
| Parameters | |||
| Name | Required? | Type | Description |
| ParentCircuitID | Yes | Integer | The ID of the parent circuit in the M4 Database. |
| SubCircuitID | Yes | Integer | The ID of the sub circuit in the M4 Database. |
| Sample JSON Package | |||
{
"ParentCircuitID": 8,
"SubCircuitID": 32
}
|
|||
| Returns | A JSON response message. | ||
| Sample Return Object | |||
{
"ParentCircuitID": 8,
"SubCircuitID": 32
}
|
|||
| Business Rules | |||
Any violations of these business rules result in an appropriate error message being returned to the API consumer.
|
|||
| URL | base/Circuits/Circuit/LinkCircuitToCustomer | ||
|---|---|---|---|
| Action | POST | ||
| Description | Links a circuit to a customer in the M4 database. | ||
| Parameters | |||
| Name | Required? | Type | Description |
| CircuitID | Yes | Integer | The ID of the circuit in the M4 Database. |
| CustomerID | Yes | Integer | The ID of the customer in the M4 Database. |
| Sample JSON Package | |||
{
"CircuitID": 3,
"CustomerID": 1
}
|
|||
| Returns | A JSON response message. | ||
| Sample Return Object | |||
{
"CircuitID": 3,
"CustomerID": 1
}
|
|||
| Business Rules | |||
Any violations of these business rules result in an appropriate error message being returned to the API consumer.
|
|||
| URL | base/Circuits/Circuit/UnlinkCircuitFromCustomer | ||
|---|---|---|---|
| Action | POST | ||
| Description | Unlinks a circuit from a customer in the M4 database. | ||
| Parameters | |||
| Name | Required? | Type | Description |
| CircuitID | Yes | Integer | The ID of the circuit in the M4 Database. |
| CustomerID | Yes | Integer | The ID of the customer in the M4 Database. |
| Sample JSON Package | |||
{
"CircuitID": 3,
"CustomerID": 1
}
|
|||
| Returns | A JSON response message. | ||
| Sample Return Object | |||
{
"CircuitID": 3,
"CustomerID": 1
}
|
|||
| Business Rules | |||
Any violations of these business rules result in an appropriate error message being returned to the API consumer.
|
|||
| URL | base/Circuits/Circuit/LinkCircuitToCircuit | ||
|---|---|---|---|
| Action | POST | ||
| Description | Links a circuit to another circuit in the M4 database. | ||
| Parameters | |||
| Name | Required? | Type | Description |
| CircuitID | Yes | Integer | The ID of a circuit in the M4 Database. |
| LinkedCircuitID | Yes | Integer | The ID of a circuit in the M4 Database. |
| Sample JSON Package | |||
{
"CircuitID": 8,
"LinkedCircuitID": 32
}
|
|||
| Returns | A JSON response message. | ||
| Sample Return Object | |||
{
"CircuitID": 8,
"LinkedCircuitID": 32
}
|
|||
| Business Rules | |||
Any violations of these business rules result in an appropriate error message being returned to the API consumer.
|
|||
| URL | base/Circuits/Circuit/UnlinkCircuitFromCircuit | ||
|---|---|---|---|
| Action | POST | ||
| Description | Unlinks a circuit from another circuit in the M4 database. | ||
| Parameters | |||
| Name | Required? | Type | Description |
| CircuitID | Yes | Integer | The ID of a circuit in the M4 Database. |
| LinkedCircuitID | Yes | Integer | The ID of a circuit in the M4 Database. |
| Sample JSON Package | |||
{
"CircuitID": 8,
"LinkedCircuitID": 32
}
|
|||
| Returns | A JSON response message. | ||
| Sample Return Object | |||
{
"CircuitID": 8,
"LinkedCircuitID": 32
}
|
|||
| Business Rules | |||
Any violations of these business rules result in an appropriate error message being returned to the API consumer.
|
|||
| URL | base/Circuits/Circuit/GetLinkedCircuitsByCircuit/CircuitID | ||
|---|---|---|---|
| Action | GET | ||
| Description | Returns a list of Circuit objects linked to a CircuitID in the M4 database. | ||
| Parameters | |||
| Name | Required? | Type | Description |
| CircuitID | Yes | Integer | A integer value representing the ID of a circuit in the M4 database. |
| Returns | A JSON collection of Circuit data objects | ||
| Sample Return Object | |||
[
{
"Description": "SyncTest",
"Billable": true,
"Priority": 1,
"Size": 8,
"Alias": "",
"Status": null,
"ID": 2
},
{
"Description": "1st Fiberless Ring Circuit",
"Billable": false,
"Priority": 1,
"Size": 19,
"Alias": "",
"Status": null,
"ID": 3
}
]
|
|||
| URL | base/Circuits/Circuit/GetCircuitsByEquipmentDescription | ||
|---|---|---|---|
| Action | POST | ||
| Description | Returns a Circuit object when given a description of a valid circuit in the M4 database. | ||
| Parameters | |||
| Name | Required? | Type | Description |
| Description | Yes | String | A string value representing the description of equipment in the M4 database. |
| Sample JSON Package | |||
{
"Description": "X-42 Card 17"
}
|
|||
| Returns | A JSON Circuit data object | ||
| Sample Return Object | |||
[{
"Description": "1st Fiberless Ring Circuit",
"Billable": false,
"Priority": 1,
"Size": 19,
"Alias": "",
"Status": null,
"ID": 3
},{
"Description": "21st Fiberless Ring Circuit",
"Billable": false,
"Priority": 1,
"Size": 19,
"Alias": "",
"Status": null,
"ID": 77
}]
|
|||
| URL | base/Circuits/Circuit/GetEquipmentByCircuit/CircuitID | ||
|---|---|---|---|
| Action | GET | ||
| Description | Returns a list of Network Equipment objects linked to a CircuitID in the M4 database. | ||
| Parameters | |||
| Name | Required? | Type | Description |
| CircuitID | Yes | Integer | A integer value representing the ID of a circuit in the M4 database. |
| Returns | A JSON collection of Network Equipment data objects | ||
| Sample Return Object | |||
[
{
"LinkTable": "Bay",
"LinkDBKey": 232,
"Description": "Sample Bay Description"
},
{
"LinkTable": "Card",
"LinkDBKey": 232,
"Description": "Sample Card Description"
},
{
"LinkTable": "Shelf",
"LinkDBKey": 230,
"Description": "Sample ShelfDescription"
},
]
|
|||