Cable API Calls
Read Call
Reading Data
In an effort to make the PCR-360 API more flexible, PCR has made the decision to no longer create individual endpoints for all the different data types. Instead, PCR is encouraging Users to use the SQL endpoint with a structured SELECT statement to retrieve exactly the data you want. Please see the SQL End Point documentation for more information.
Example SELECT query for retrieving related Cable records:
SELECT * FROM CABLES;
Lists
When doing an INSERT or UPDATE for Cable records, it is sometimes necessary to provide values that exist elsewhere in the system. The LIST method can help to retrieve available options for these values.
Below is how to make a LIST request:
GET http://DOMAIN/api/API_KEY/cable.OUTPUT?LIST=LISTTYPE
Searchable
If a LISTTYPE is designated as searchable in the table below, adding the "SEARCH" param will return values that contain the provided value.
GET http://DOMAIN/api/API_KEY/cable.OUTPUT?LIST=LISTTYPE&SEARCH=test
Parameter | Replace With |
---|---|
LISTTYPE | The type of List to be retrieved. Types can be found below. |
List Types
Type | Description | Extra Parameters* | Results |
---|---|---|---|
PATH_STATUS | Retrieve Path Statuses | Path Status Results |
*Extra Parameters can be appended to the URL in standard Query String fashion.
Write Call
Cable Paths can be easily updated or added to a Service or Location. If multiple Cable Paths need to be added or updated, then a separate POST request will need to be made for each Path.
Below is the proper format for making a separate request.
Note: "type=PATHS" is Required to indicate that this will process a Cable Path record. This can be added as a POST parameter or within the URI as shown below.
Cable Paths End point
http://DOMAIN/api/API_KEY/cable.OUTPUT
Using POST Calls To configure the number of Pages/Results returned by the API (this is most useful for the SQL Endpoint), you can send these as additional Parameter's in the Body. Parameter Default Description limit 20 Number of listings to show. page 1 Page number to show.Data Type Interger Interger
UDF parameters are all lower case when processed by PCR-360. Since Organizations can create their own UDF fields, the generic use of IDENTIFIER is used as a placeholder for actual UDF Identifiers.
Available Fields
Field | Required | Data Type | Options | Default | Notes |
---|---|---|---|---|---|
recid | yes* | Integer | The RECID of the Cable Path. *Required only if attempting an UPDATE. | ||
service | yes* | Integer | RECID of the Service to assign to the Cable Path. *Either a Service OR Location is Required, but not both. | ||
location | yes* | Integer | RECID of the Location to assign to the Cable Path. *Either a Service OR Location is Required, but not both. | ||
status | yes | Integer | Status of the Cable Path. | ||
type | yes* | String | "type=PATHS" is Required to indicate that this will process a Cable Path record. This can be added as a POST parameter or within the URI as shown below. |
Sample Request
Call:
POST DOMAIN/KEY/cable.json
Headers:
Key | Value |
---|---|
Content-Type | application/json |
Pcr-Html-Encoded | TRUE |
Body:
Key | Value |
---|---|
service | 5437 |
status | wired |
Results
Cable Path Legs
Cable Path Legs can be easily updated or added. If multiple Cable Path Legs need to be added or updated, then separate POST requests will need to be made for each Path Leg.
Below is the proper format for making a separate request.
Note: "type=PATH_LEGS" is required to indicate that this is to process a Cable Path Leg record. This can be added as POST parameter or within the URI as shown below.
Cable Path Legs End point
http://DOMAIN/api/API_KEY/cable.OUTPUT
Available Fields
Field | Required | Data Type | Options | Default | Notes |
---|---|---|---|---|---|
recid | yes* | Integer | *Required only if attempting an UPDATE. RECID column from PATH_LEGS table. | ||
from_equipment | no | Integer | RECID of the Equipment that the Path Leg is coming from. | ||
from_ppl | no | Integer | RECID of the Port/Pin/Len that the Path Leg is coming from. | ||
cable | no | Integer | RECID of the Cable that the Path Leg is associated with. | ||
pair_strand | yes* | Integer | RECID of the Pair/Strand that the Path Leg belongs to. *Required if Cable is provided. | ||
to_equipment | no | Integer | RECID of the Equipment that the Path Leg ends at. | ||
to_ppl | no | Integer | RECID of the Port/Pin/Len that the Path Leg ends at. | ||
instance | yes | Integer | Instance number of the Path Leg. | ||
path | yes | Integer | RECID of the Path that the Path Leg belongs on. | ||
backbone_service | no | Integer | RECID of the Backbone Service. | ||
location | yes* | Integer | RECID of the Location of the Path Leg. *Required if the Service that this Path Leg's belongs to is multi-location Service. | ||
type | yes* | String | "type=PATH_LEGS" is required to indicate that this is to process a Cable Path Leg record |
Sample Request
Call:
POST DOMAIN/KEY/cable.json
Headers:
Key | Value |
---|---|
Content-Type | application/json |
Pcr-Html-Encoded | TRUE |
Body:
Key | Value |
---|---|
cable | 58337 |
pair_strand | 71 |
instance | 1 |
path | 927 |
Results
Locating Cable Data
Within PCR-360, these menu options lists a variety of Grids that can be used to help locate any of the required fields.
All grids have the option to show the ROW ID column, which is also the RECID for that particular record.