- 15.5
Description
The CircuitSize endpoint provides the API consumer with access to methods pertaining to circuit sizes. The endpoint allows consumers to create and retreive circuit size information.
Methods
| URL | base/Circuits/CircuitSize/Specification |
|---|---|
| Action | GET |
| Description | Returns a data dictionary that details the available web service methods related to the CircuitSize controller. |
| Parameters | None |
| Returns | A JSON object with method descriptions |
| Sample Return Object | |
[
{
"HttpAction": "Get",
"MethodName": "GetAllCircuitSizes",
"Description": "Returns the records for all Circuit Sizes.",
"Path": "
|
|
| URL | base/Circuits/CircuitSize/AddCircuitSize | ||
|---|---|---|---|
| Action | POST | ||
| Description | Returns the CircuitSize object just added to the M4 database. | ||
| Parameters | |||
| Name | Required? | Type | Description |
| Type | No | String | The type of the Circuit Size. |
| Rate | No | String | The rate of the Circuit Size. |
| Channels | No | Integer | Quantity of channels for the Circuit Size. |
| WireSize | No | Integer | Size of the Circuit Size. |
| Color | No | Integer | The ID of the color for the Circuit Size. |
| Sample JSON Package | |||
{
"Type": "Fast Circuit",
"Rate": "Fast",
"Channels": 88,
"WireSize": 12,
"Color": 1
}
|
|||
| Returns | A JSON Circuit data object | ||
| Sample Return Object | |||
{
"Type": "FastCircuit",
"Rate": "fast",
"Channels": 88,
"WireSize": 1,
"Color": 1,
"ID": 37
}
|
|||
| Business Rules | |||
Any violations of these business rules result in an appropriate error message being returned to the API consumer.
|
|||
| URL | base/Circuits/CircuitSize/GetCircuitSize/ID | ||
|---|---|---|---|
| Action | GET | ||
| Description | Returns a CircuitSize 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 size in the M4 database. |
| Returns | A JSON CircuitSize data object | ||
| Sample Return Object | |||
{
"Type": "DS0",
"Rate": "64 Kbps",
"Channels": 1,
"WireSize": 1,
"Color": 0,
"ID": 1
}
|
|||
| URL | base/Circuits/CircuitSize/GetAllCircuitSizes | ||
|---|---|---|---|
| Action | GET | ||
| Description | Returns all CircuitSize objects in the M4 database. | ||
| Parameters | |||
| Name | Required? | Type | Description |
| Returns | A JSON collection of CircuitSize data objects | ||
| Sample Return Object | |||
[
{
"Type": "DS0",
"Rate": "64 Kbps",
"Channels": 1,
"WireSize": 1,
"Color": 0,
"ID": 1
},
{
"Type": "DS1",
"Rate": "1.544 Mbps",
"Channels": 24,
"WireSize": 0,
"Color": 0,
"ID": 2
}
]
|
|||
| URL | base/Circuits/CircuitSize/GetCircuitSizesByTypeAndRate | ||
|---|---|---|---|
| Action | POST | ||
| Description | Returns the CircuitSize object just added to the M4 database. | ||
| Parameters | |||
| Name | Required? | Type | Description |
| Type | Yes | String | The type of the Circuit Size. |
| Rate | Yes | String | The rate of the Circuit Size. |
| Sample JSON Package | |||
{
"Type": "Fast Circuit",
"Rate": "Fast"
}
|
|||
| Returns | A JSON Circuit data object | ||
| Sample Return Object | |||
[{
"Type": "FastCircuit",
"Rate": "fast",
"Channels": 88,
"WireSize": 1,
"Color": 1,
"ID": 37
},{
"Type": "FastCircuit",
"Rate": "fast",
"Channels": 22,
"WireSize": 3,
"Color": 8,
"ID": 342
}]
|
|||
| Business Rules | |||
Any violations of these business rules result in an appropriate error message being returned to the API consumer.
|
|||