NAV Navigation
Shell HTTP JavaScript

VETRO FiberMap API v2.0.0

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

Welcome!

VETRO FiberMap® uses a RESTful API to interact with its underlying data structure. It utilizes standard HTTP requests and, whenever applicable, accepts application/json requests and responds with JSON objects.

OpenAPI

The API is built following the OpenAPI 3.0 specification. A yaml file describing the API can be downloaded here.

Making Requests

VETRO FiberMap uses HTTP requests and mostly adheres to the idea of RESTful verbs to send and retrieve data. Authentication and authorization for requests is handled via basic HTTP authentication using either login sessions or access tokens (See below).

GET or DELETE requests will usually include required data as parameters as part of the URL address. For example, retrieving information around a specific location may require the location's latitude and longitude, as in /api/layer/geometriesNear/-73.45/44.2341.

Optional parameters will usually use a querystring key/value parameter after the URL. For example, the previous request uses a default search radius of 50 meters, but you can change that value by include a query parameter, like this: /api/layer/geometriesNear/-73.45/44.2341?radius=100. All optional parameters are described in the documentation for each API endpoint.

All POST requests should use the header Content-type: application/json along with any required data using a raw JSON-formatted body. POST requests do not generally accept form style key-value requests.

Output Formats

Almost all APIs return JSON data, nearly always following this format:

{
  "success": true,
  "result": (data)
}

(data) will be whatever you're asking for: the identity of a object on your network, or a set of utility poles, for instance. It may be as simple as a boolean indicating whether an operation did what you asked.

Failures will normally respond with a non-200 error code, usually 400 for errors in the request, or 500 for internal issues.

Asynchronous Jobs

> POST /api/(async endpoint) HTTP/1.1
> Host: vetro.io
> Content-type: application/json
> Content-Length: 12345
...

Result:
{
  "success": true,
  "result": {
    "status": "started",
    "id": "status_id_uuid",
    "resultsURL": "/api/(async endpoint)/status/status_id_uuid",
  }
}

> GET /api/(async endpoint)/status/status_id_uuid

Result:
{
  "success": true,
  "result": {
    "status": "in progress",
    "detail": "Done with part X",
    "id": "status_id_uuid",
    "resultsURL": "/api/(async endpoint)/status/status_id_uuid",
  }
}

> GET /api/(async endpoint)/status/status_id_uuid

Result:
{
  "success": true,
  "result": {
    "status": "complete",
    "id": "status_id_uuid",
    "resultsURL": "/api/(async endpoint)/results/status_id_uuid",
  }
}

> GET /api/(async endpoint)/results/status_id_uuid

(Retrieves the results, whether a .zip file, .csv or anything else, depending on the endpoint!)

Certain endpoints refer to Asynchronous Jobs and do not return immediate results. These are generally used for long-running or complex requests that cannot be handled within the timeframe of a normal HTTP request.

Instead, VETRO FiberMap enables job-based requests that return an immediate "accepted" response that includes a status URL. That URL should be used to periodically check the runtime status of the asynchronous job - usually there will be "progress reports" along the way, explaining that the job is underway, waiting for some further processing, or complete.

Once complete, that status URL will return a response URL that should be used to retrieve the results of the initial request.

Follow along with the example to the right.

Usage Limits

Some VETRO FiberMap API endpoints require some more intensive server processing. In these cases, there will be usage limits applied. If you hit these API endpoints too many times within a certain timespan, the API endpoint will return a 429 error code, with messaging similar to: "Too many requests per second, please slow down the number of concurrent requests."

Other Notes

Support

Please note that this public API is provided for your use in accessing your network and related non-network data. While we are happy to assist you in understanding the parameters that go into requests to this API or the answers that result, we can provide only advisory support for whatever application is using this data other than VETRO FiberMap.

Please contact us through support@vetrofibermap.com if you have any questions or concerns!

This documentation was generated on Thu, 22 Jul 2021 17:55:54 GMT.

Base URLs:

Authentication

Address APIs

Get Similar Valid Addresses

Code samples

# You can also use wget
curl -X GET /v2/address/match/{address} \
  -H 'Accept: application/json'

GET /v2/address/match/{address} HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/address/match/{address}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /address/match/{address}

Get similar valid addresses

Parameters

Name In Type Required Description
address path string true Address
center query array[number] false Center
radius query integer false Radius in meters
allow_any_location query boolean false Return locations other than street level addresses (ie. cities, states)

Example responses

200 Response

{
  "success": true,
  "result": []
}

Responses

Status Meaning Description Schema
200 OK Array of addresses and their geo coordinates Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result array false none none
»» items [object] false none none
»»» address string false none none
»»» coordinates [number] false none Coordinates of the point (lat, lng)

Analysis APIs

Tabulate Analysis

Code samples

# You can also use wget
curl -X POST /v2/analysis/tabulate \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST /v2/analysis/tabulate HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
  "summary_items": [
    {
      "type": "layer",
      "id": 57
    }
  ],
  "target_data_selectors": [
    {
      "label": "Lateral",
      "query": "layer=\"Lateral\""
    }
  ],
  "analysis_types": [
    "count"
  ],
  "attributes": [
    "string"
  ],
  "offset": 400,
  "limit": 200
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('/v2/analysis/tabulate',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /analysis/tabulate

Analyzes data according to the provided parameters

Body parameter

{
  "summary_items": [
    {
      "type": "layer",
      "id": 57
    }
  ],
  "target_data_selectors": [
    {
      "label": "Lateral",
      "query": "layer=\"Lateral\""
    }
  ],
  "analysis_types": [
    "count"
  ],
  "attributes": [
    "string"
  ],
  "offset": 400,
  "limit": 200
}

Parameters

Name In Type Required Description
body body object false Payload describing the type of feature tabulate analysis to carry out
» summary_items body [oneOf] true none
»» anonymous body object false A layer id and type
»»» id body integer true Layer id
»»» type body string true Type of layer
»» anonymous body object false A polygon with id, type, and coordinates
»»» id body string(uuid) true Polygon id in UUID format
»»» type body string true Type of polygon
»»» coordinates body [array] true Coordinates of the polygon
» target_data_selectors body [object] true Target feature(s) for analysis
»» label body string false Layer label
»» query body string false Query to restrict which features are included
» analysis_types body [string] true The type of analysis that will be performed.
» attributes body [string] false Attributes to include in the analysis
» offset body integer false The number of rows by which the result data will be offset.
» limit body integer true The number of rows that will be returned in the result data.

Enumerated Values

Parameter Value
»»» type Layer
»»» type Polygon
» analysis_types count
» analysis_types length

Example responses

200 Response

{
  "success": true,
  "result": {
    "data": {
      "00a18151-d047-4db5-a825-c5c3ac603650": {
        "Backbone - count": 55,
        "Lateral - count": 382,
        "FAT - count": 0
      },
      "0e36c5dc-4945-4057-8430-522c448261cd": {
        "Backbone - count": 0,
        "Lateral - count": 3,
        "FAT - count": 8932
      }
    },
    "source_feature_id_label_map": {
      "00a18151-d047-4db5-a825-c5c3ac603650": "NB-00001234",
      "0e36c5dc-4945-4057-8430-522c448261cd": "NB-00001235"
    },
    "done": true,
    "error": null
  }
}

Responses

Status Meaning Description Schema
200 OK The results of the analysis grouped by the ids of features in the source layer and sub-grouped by the layer ids of the features in the target data. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none Success status of the request
» result object false none Object containing the result of the analysis
»» data object true none Description of the analysis results
»» source_feature_id_label_map object false none This is a key value map that associates the vetro ids in the data object with labels.
»» done boolean true none True when the analysis has finished running; false otherwise
»» error string¦null true none Error description when something went wrong with the analysis

Macrocost Analysis

Code samples

# You can also use wget
curl -X POST /v2/analysis/macrocost \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST /v2/analysis/macrocost HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
  "summary_items": [
    {
      "type": "layer",
      "id": 57
    }
  ],
  "target_layers": {
    "source_layers": [
      {
        "label": "Residences",
        "layer_id": 6,
        "layer_attribute_label": "Name",
        "cost_to_connect": 1000,
        "monthly_revenue": 100,
        "take_rate": 0.25
      }
    ],
    "road_layer_id": 149
  },
  "macro_cost_params": {
    "cost_per_road_length": 10
  },
  "plan_ids": [
    8
  ],
  "offset": 400,
  "limit": 200
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('/v2/analysis/macrocost',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /analysis/macrocost

Provides costing information about provided parameters

Body parameter

{
  "summary_items": [
    {
      "type": "layer",
      "id": 57
    }
  ],
  "target_layers": {
    "source_layers": [
      {
        "label": "Residences",
        "layer_id": 6,
        "layer_attribute_label": "Name",
        "cost_to_connect": 1000,
        "monthly_revenue": 100,
        "take_rate": 0.25
      }
    ],
    "road_layer_id": 149
  },
  "macro_cost_params": {
    "cost_per_road_length": 10
  },
  "plan_ids": [
    8
  ],
  "offset": 400,
  "limit": 200
}

Parameters

Name In Type Required Description
body body object false Payload describing the type of feature costing analysis to carry out
» summary_items body [oneOf] true none
»» anonymous body object false A layer id and type
»»» id body integer true Layer id
»»» type body string true Type of layer
»» anonymous body object false A polygon with id, type, and coordinates
»»» id body string(uuid) true Polygon id in UUID format
»»» type body string true Type of polygon
»»» coordinates body [array] true Coordinates of the polygon
» target_layers body object false Layers to target for analysis. Will default to organization settings if not provided.
»» source_layers body [object] false none
»»» label body string true Name of the source
»»» layer_id body number true Source layer to use in AWP analysis
»»» layer_attribute_label body string¦null false Source layer attribute to use in AWP analysis
»»» cost_to_connect body number true Cost to connect the unit
»»» monthly_revenue body number true Monthly revenue of the unit
»»» take_rate body number true Take rate percentage
»» road_layer_id body integer false Road layer id to use
» macro_cost_params body object false Parameters to use to calculate the cost when running the analysis. Will default to organization settings if not provided
»» cost_per_road_length body integer false Cost for each unit of length on the road
» plan_ids body [integer] false List of plan ids to use for the analysis
» offset body integer false The number of rows by which the result data will be offset.
» limit body integer true The number of rows that will be returned in the result data.

Enumerated Values

Parameter Value
»»» type Layer
»»» type Polygon

Example responses

200 Response

{
  "success": true,
  "result": {
    "data": {
      "00a18151-d047-4db5-a825-c5c3ac603650": {
        "Est. Annual Revenue": "10000,",
        "Est. Cost": "93401,",
        "Payback Period (years)": "358,",
        "Projected Customers": "200,",
        "Business Points": "100,",
        "Premise Points": "300,",
        "Residential Units - MDU": "150,",
        "Residential Units - Single Family": "150,"
      },
      "0e36c5dc-4945-4057-8430-522c448261cd": {
        "Est. Annual Revenue": "20000,",
        "Est. Cost": "53401,",
        "Payback Period (years)": "328,",
        "Projected Customers": "500,",
        "Business Points": "200,",
        "Premise Points": "400,",
        "Residential Units - MDU": "250,",
        "Residential Units - Single Family": "150,"
      }
    },
    "source_feature_id_label_map": {
      "00a18151-d047-4db5-a825-c5c3ac603650": "NB-00001234",
      "0e36c5dc-4945-4057-8430-522c448261cd": "NB-00001235"
    },
    "done": true,
    "error": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK Costing data grouped by source polygon id. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none Success status of the request
» result object false none Object containing the result of the analysis
»» data object true none Description of the analysis results
»» source_feature_id_label_map object false none This is a key value map that associates the vetro ids in the data object with labels.
»» done boolean true none True when the analysis has finished running; false otherwise
»» error string¦null true none none

Get Raw Data

Code samples

# You can also use wget
curl -X POST /v2/analysis/raw \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST /v2/analysis/raw HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
  "summary_items": [
    {
      "type": "layer",
      "id": 57
    }
  ],
  "target_data_selectors": [
    {
      "label": "Lateral",
      "query": "layer=\"Lateral\""
    }
  ],
  "limit": 200,
  "offset": 400
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('/v2/analysis/raw',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /analysis/raw

Gets the raw data of features according to the provided parameters

Body parameter

{
  "summary_items": [
    {
      "type": "layer",
      "id": 57
    }
  ],
  "target_data_selectors": [
    {
      "label": "Lateral",
      "query": "layer=\"Lateral\""
    }
  ],
  "limit": 200,
  "offset": 400
}

Parameters

Name In Type Required Description
body body object false none
» summary_items body [oneOf] true none
»» anonymous body object false A layer id and type
»»» id body integer true Layer id
»»» type body string true Type of layer
»» anonymous body object false A polygon with id, type, and coordinates
»»» id body string(uuid) true Polygon id in UUID format
»»» type body string true Type of polygon
»»» coordinates body [array] true Coordinates of the polygon
» target_data_selectors body [object] true none
»» label body string false none
»» query body string false none
» limit body integer true The number of rows that will be returned in the feature result data.
» offset body integer false The number of rows by which the feature result data will be offset.

Enumerated Values

Parameter Value
»»» type Layer
»»» type Polygon

Example responses

200 Response

{
  "success": true,
  "result": {
    "data": {
      "00a18151-d047-4db5-a825-c5c3ac603650": [
        {
          "ID": "FAT-001",
          "Build": "Yes"
        },
        {
          "ID": "FAT-002",
          "Build": "Yes"
        },
        {
          "ID": "FAT-003",
          "Build": "No"
        }
      ],
      "0e36c5dc-4945-4057-8430-522c448261cd": [
        {
          "ID": "BB-008",
          "Build": "No"
        }
      ]
    },
    "source_feature_id_label_map": {
      "00a18151-d047-4db5-a825-c5c3ac603650": "NB-00001234",
      "0e36c5dc-4945-4057-8430-522c448261cd": "NB-00001235"
    },
    "attributes": [
      "ID",
      "Build",
      "Size"
    ],
    "done": true
  }
}

Responses

Status Meaning Description Schema
200 OK The results of the raw data grouped by the summary items vetro ids. Provides a list of all available attributes across all targeted layers as well. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result object false none none
»» data object true none none
»» source_feature_id_label_map object false none This is a key value map that associates the vetro ids in the data object with labels.
»» attributes [string] false none none
»» done boolean true none none

Export Raw Data

Code samples

# You can also use wget
curl -X POST /v2/analysis/raw/export \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST /v2/analysis/raw/export HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
  "summary_items": [
    {
      "type": "layer",
      "id": 57
    }
  ],
  "target_data_selectors": [
    {
      "label": "Lateral",
      "query": "layer=\"Lateral\""
    }
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('/v2/analysis/raw/export',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /analysis/raw/export

Exports the raw data of features according to the provided parameters

Body parameter

{
  "summary_items": [
    {
      "type": "layer",
      "id": 57
    }
  ],
  "target_data_selectors": [
    {
      "label": "Lateral",
      "query": "layer=\"Lateral\""
    }
  ]
}

Parameters

Name In Type Required Description
body body object false none
» summary_items body [oneOf] true none
»» anonymous body object false A layer id and type
»»» id body integer true Layer id
»»» type body string true Type of layer
»» anonymous body object false A polygon with id, type, and coordinates
»»» id body string(uuid) true Polygon id in UUID format
»»» type body string true Type of polygon
»»» coordinates body [array] true Coordinates of the polygon
» target_data_selectors body [object] true none
»» label body string false none
»» query body string false none

Enumerated Values

Parameter Value
»»» type Layer
»»» type Polygon

Example responses

200 Response

{
  "success": true,
  "result": {
    "url": "https://s3.amazonaws.com/data.vetro.io/localhost/plan-estimates/WIGVep2br8tQctOdsUnxb.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIDYRCNT2CSBD4URA%2F20210311%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210311T160835Z&X-Amz-Expires=900&X-Amz-Signature=612f7881b2f5eb1e26f7b923781817c496039c0878bea6c250ca156a1536ac81&X-Amz-SignedHeaders=host",
    "key": "wise-plan-0ac52510-a939-405e-be48-17897bd80482.zip"
  }
}

Responses

Status Meaning Description Schema
200 OK A signed url where the generated file can be downloaded Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result object false none none
»» url string true none none
»» key string true none none

Export APIs

Export layer

Code samples

# You can also use wget
curl -X POST /v2/export/layer/{layer_id}/{format} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST /v2/export/layer/{layer_id}/{format} HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
  "filter": "string",
  "included_vetro_ids": [
    "497f6eca-6276-4993-bfeb-53cbbbba6f08"
  ],
  "excluded_vetro_ids": [
    "497f6eca-6276-4993-bfeb-53cbbbba6f08"
  ],
  "active_plan_ids": [
    0
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('/v2/export/layer/{layer_id}/{format}',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /export/layer/{layer_id}/{format}

Export a layer in the specified format

Body parameter

{
  "filter": "string",
  "included_vetro_ids": [
    "497f6eca-6276-4993-bfeb-53cbbbba6f08"
  ],
  "excluded_vetro_ids": [
    "497f6eca-6276-4993-bfeb-53cbbbba6f08"
  ],
  "active_plan_ids": [
    0
  ]
}

Parameters

Name In Type Required Description
layer_id path number true The id of the layer to export
format path string true The file format with which to export the features
body body object true Filtration information
» filter body string¦null false a query to apply to filtration.
» included_vetro_ids body [string]¦null false ids of features to include. Note that if this is defined, no other features will be included in the export.
» excluded_vetro_ids body [string]¦null false ids of features to exclude
» active_plan_ids body [integer]¦null false ids of plans to include

Enumerated Values

Parameter Value
format bna
format csv
format csvgeom
format dgn
format dxf
format shp
format prj
format shx
format dbf
format gxt
format txt
format json
format geojson
format gml
format gfs
format gmt
format gpx
format gpkg
format kml
format kmz

Example responses

200 Response

{
  "success": true,
  "result": {
    "url": "https://vetro-user-imports.s3.amazonaws.com/exports/lcp-layer-0ac52510-a939-405e-be48-17897bd80482.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIDYRCNT2CSBD4URA%2F20200515%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20200515T191444Z&X-Amz-Expires=900&X-Amz-Signature=b08825d2356e643e7c4fbf0d01be039ebe59287a540103cg92c39a68aa4886c7&X-Amz-SignedHeaders=host",
    "key": "lcp-layer-0ac52510-a939-405e-be48-17897bd80482.zip"
  }
}

Responses

Status Meaning Description Schema
200 OK A signed s3 url that can be used to download the exported layer Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result object false none none
»» url string false none none
»» key string false none none

Export plan

Code samples

# You can also use wget
curl -X GET /v2/export/plan/{plan_id}/{format} \
  -H 'Accept: application/json'

GET /v2/export/plan/{plan_id}/{format} HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/export/plan/{plan_id}/{format}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /export/plan/{plan_id}/{format}

Export a plan in the specified format

Parameters

Name In Type Required Description
plan_id path number true The id of the plan to export
format path string true The file format with which to export the features

Enumerated Values

Parameter Value
format bna
format csv
format csvgeom
format dgn
format dxf
format shp
format prj
format shx
format dbf
format gxt
format txt
format json
format geojson
format gml
format gfs
format gmt
format gpx
format gpkg
format kml
format kmz

Example responses

200 Response

{
  "success": true,
  "result": {
    "url": "https://vetro-user-imports.s3.amazonaws.com/exports/wise-plan-0ac52510-a939-405e-be48-17897bd80482.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIDYRCNT2CSBD4URA%2F20200515%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20200515T191444Z&X-Amz-Expires=900&X-Amz-Signature=b08825d2356e643e7c4fbf0d01be039ebe59287a540103cg92c39a68aa4886c7&X-Amz-SignedHeaders=host",
    "key": "wise-plan-0ac52510-a939-405e-be48-17897bd80482.zip"
  }
}

Responses

Status Meaning Description Schema
200 OK A signed s3 url that can be used to download the exported plan Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result object false none none
»» url string false none none
»» key string false none none

Feature APIs

These APIs provide direct Feature-level access to create, update or delete objects from the VETRO FiberMap database.

x-vetro Extension

# *x-vetro* and *vetro_id* example:

{
  "type": "Feature",
  "properties": {
    "ID": "MY-Fiber-Cable",
    "Capacity": 144
  },
  "geometry": {
    "type": "LineString",
    "coordinates": [ ... ]
  },
--> "x-vetro": {
--> "vetro_id": "f03cd7a0-05f2-4861-a5cd-2fd4ad5b30f0"
    ...
  }
}

Because VETRO FiberMap APIs provide much more than the individual attributes of each Feature, a special key is included with Features returned by these APIs. That property, x-vetro, is included as a sibling to type, properties and geometry. x-vetro is a simple object, with keys that can vary depending on the need of the API. However, there should always be a vetro_id attached, which is an identifier (specifically a uuid) that uniquely identifies the given Feature.

Update Features

Code samples

# You can also use wget
curl -X PATCH /v2/features \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

PATCH /v2/features HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
  "features": [
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [
          102,
          0.5
        ]
      },
      "x-vetro": {
        "layer_id": 14,
        "vetro_id": "1679f385-9d6e-417f-8e04-fd27b62f3fcd",
        "plan_id": 19,
        "material_template_id": 17,
        "labor_template_id": 42,
        "hardware_template_id": 42,
        "parent_vetro_id": "16645485-9d6e-417f-8e04-fd27njs65k2d"
      },
      "properties": {}
    }
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('/v2/features',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PATCH /features

Update Features that already exist.

Body parameter

{
  "features": [
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [
          102,
          0.5
        ]
      },
      "x-vetro": {
        "layer_id": 14,
        "vetro_id": "1679f385-9d6e-417f-8e04-fd27b62f3fcd",
        "plan_id": 19,
        "material_template_id": 17,
        "labor_template_id": 42,
        "hardware_template_id": 42,
        "parent_vetro_id": "16645485-9d6e-417f-8e04-fd27njs65k2d"
      },
      "properties": {}
    }
  ]
}

Parameters

Name In Type Required Description
body body object true FeatureCollection containing one or more Features to update, each much include x-vetro.vetro_id to be identified. Values included in properties that are included will be updated - values NOT included will be ignored (in other words, they will not be 'unset' or set to null). To move a Feature to a different plan, set plan_id; to move to a different Layer, set layer_id in x-vetro.
» features body [object] false List of features to update
»» type body string false Type of feature
»» geometry body any false Geometry type of the feature
»»» anonymous body string¦null false No geometry type
»»» anonymous body object false GeoJSON point geometry
»»»» type body string true Point type
»»»» coordinates body [number] true Coordinates of the point (lat, lng)
»»» anonymous body object false GeoJSON linestring geometry
»»»» type body string true LineString type
»»»» coordinates body [array] true Coordinates of the line string
»»» anonymous body object false GeoJSON polygon geometry
»»»» type body string true Polygon type
»»»» coordinates body [array] true List of polygon coordinate points
»» x-vetro body object true vetro specific properties (e.g., layer_id, vetro_id)
»»» layer_id body integer false Layer id of the vetro feature
»»» vetro_id body string(uuid) true Vetro id of the feature
»»» plan_id body integer false Plan the feature belongs to
»»» material_template_id body integer¦null false Material template to apply to the feature
»»» labor_template_id body integer¦null false Labor template to apply to the feature
»»» hardware_template_id body integer¦null false Hardware template to apply to the feature
»»» parent_vetro_id body string(uuid) false Parent feature id to attach the child feature to. Used for equipment.
»» properties body object false Feature attributes

Enumerated Values

Parameter Value
»»»» type Point
»»»» type LineString
»»»» type Polygon

Example responses

200 Response

{
  "success": true,
  "result": [
    {
      "type": "Feature",
      "geometry": "string",
      "x-vetro": {
        "id": 42,
        "layer_id": 14,
        "vetro_id": "1679f385-9d6e-417f-8e04-fd27b62f3fcd",
        "plan_id": 19,
        "has_custom_length": true,
        "parent_vetro_id": "df976393-ffb0-4c8c-a377-13b3f1d52728",
        "child_vetro_ids": [
          "497f6eca-6276-4993-bfeb-53cbbbba6f08"
        ],
        "feature_type": null,
        "feature_table": "network_points",
        "material_template_id": 0,
        "labor_template_id": 0,
        "hardware_template_id": 0,
        "has_parent": true
      },
      "properties": {}
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK FeatureCollection of updated Features Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none Success status of the request
» result [object] false none List of vetro features
»» type string true none Type of feature
»» geometry any true none Geometry of feature according to the geojson spec. This must be null if "properties.parent_vetro_id" is not null.

oneOf

Name Type Required Restrictions Description
»»» anonymous string¦null false none No geometry type

xor

Name Type Required Restrictions Description
»»» anonymous object false none GeoJSON point geometry
»»»» type string true none Point type
»»»» coordinates [number] true none Coordinates of the point (lat, lng)

xor

Name Type Required Restrictions Description
»»» anonymous object false none GeoJSON linestring geometry
»»»» type string true none LineString type
»»»» coordinates [array] true none Coordinates of the line string

xor

Name Type Required Restrictions Description
»»» anonymous object false none GeoJSON polygon geometry
»»»» type string true none Polygon type
»»»» coordinates [array] true none List of polygon coordinate points

continued

Name Type Required Restrictions Description
»» x-vetro object true none vetro specific properties (e.g., layer_id, vetro_id)
»»» id integer true none ID of the feature
»»» layer_id integer true none Layer id of the feature
»»» vetro_id string(uuid) true none Vetro id of the feature
»»» plan_id integer true none Plan the feature belongs to
»»» has_custom_length boolean false none Feature has a custom length that is not determined from the geometry coordinates
»»» parent_vetro_id string(uuid)¦null true none Vetro id of parent if it exists, null otherwise. This must be null if geometry is not null.
»»» child_vetro_ids [string] true none Vetro ids of child features (e.g., equipment)
»»» feature_type string¦null true none The categorization of a feature within vetro
»»» feature_table string false none none
»»» material_template_id integer¦null true none ID of material template applied to the feature
»»» labor_template_id integer¦null true none ID of labor template applied to the feature
»»» hardware_template_id integer¦null true none ID of hardware template applied to the feature
»»» has_parent boolean true none none
»» properties object true none Feature attributes

Enumerated Values

Property Value
type Point
type LineString
type Polygon
feature_type null
feature_type network_point
feature_type chief_office
feature_type junction
feature_type service_location
feature_type network_line
feature_type nonnetwork_line
feature_type nonnetwork_point
feature_type nonnetwork_polygon
feature_type fiber_cable
feature_type duct
feature_type micro_duct
feature_type micro_duct_bundle
feature_type slack_loop
feature_type equipment_muxer
feature_type equipment_splitter
feature_type equipment_nxn
feature_type equipment_splice_closure
feature_type hardware
feature_type pole
feature_table network_points
feature_table nonnetwork_points
feature_table network_lines
feature_table nonnetwork_lines
feature_table nonnetwork_polygons

Create Features

Code samples

# You can also use wget
curl -X POST /v2/features \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST /v2/features HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
  "features": [
    {
      "type": "Feature",
      "geometry": "string",
      "x-vetro": {
        "layer_id": 14,
        "plan_id": 8,
        "parent_vetro_id": "df976393-ffb0-4c8c-a377-13b3f1d52728",
        "material_template_id": 13,
        "labor_template_id": 17,
        "hardware_template_id": 21
      },
      "properties": {}
    }
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('/v2/features',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /features

Adds new Features to VETRO FiberMap.

Feature objects passed in to this API will be converted to their equivalent in the VETRO FiberMap and assigned to a layer and plan. x-vetro must contain layer_id to identify the kind of Feature (Pole, Backbone, et al), and plan_id should be included to assign the Feature to a single Plan. Given no plan_id the new Feature will be assigned to the [Global Plan|#global plan].

Body parameter

{
  "features": [
    {
      "type": "Feature",
      "geometry": "string",
      "x-vetro": {
        "layer_id": 14,
        "plan_id": 8,
        "parent_vetro_id": "df976393-ffb0-4c8c-a377-13b3f1d52728",
        "material_template_id": 13,
        "labor_template_id": 17,
        "hardware_template_id": 21
      },
      "properties": {}
    }
  ]
}

Parameters

Name In Type Required Description
body body object true An array of VETRO FiberMap Feature objects. Include parent_vetro_id if feature is a child feature (e.g., equipment). Otherwise include geometry.
» features body [object] false List of features to be created
»» type body string false Feature type being created
»» geometry body any true Geometry type of the feature
»»» anonymous body string¦null false No geometry type
»»» anonymous body object false GeoJSON point geometry
»»»» type body string true Point type
»»»» coordinates body [number] true Coordinates of the point (lat, lng)
»»» anonymous body object false GeoJSON linestring geometry
»»»» type body string true LineString type
»»»» coordinates body [array] true Coordinates of the line string
»»» anonymous body object false GeoJSON polygon geometry
»»»» type body string true Polygon type
»»»» coordinates body [array] true List of polygon coordinate points
»» x-vetro body object true vetro specific properties (e.g., layer_id, vetro_id)
»»» layer_id body integer true Integer corresponding to a vetro layer
»»» plan_id body integer true Integer corresponding to a vetro plan
»»» parent_vetro_id body string(uuid)¦null false Parent feature's vetro id
»»» material_template_id body integer¦null false Id of a material template
»»» labor_template_id body integer¦null false Id of a layer template
»»» hardware_template_id body integer¦null false Id of a hardware template
»» properties body object true Feature attributes

Enumerated Values

Parameter Value
»»»» type Point
»»»» type LineString
»»»» type Polygon

Example responses

201 Response

{
  "success": true,
  "result": [
    {
      "type": "Feature",
      "geometry": "string",
      "x-vetro": {
        "id": 42,
        "layer_id": 14,
        "vetro_id": "1679f385-9d6e-417f-8e04-fd27b62f3fcd",
        "plan_id": 19,
        "has_custom_length": true,
        "parent_vetro_id": "df976393-ffb0-4c8c-a377-13b3f1d52728",
        "child_vetro_ids": [
          "497f6eca-6276-4993-bfeb-53cbbbba6f08"
        ],
        "feature_type": null,
        "feature_table": "network_points",
        "material_template_id": 0,
        "labor_template_id": 0,
        "hardware_template_id": 0,
        "has_parent": true
      },
      "properties": {}
    }
  ]
}

Responses

Status Meaning Description Schema
201 Created Array of features Inline

Response Schema

Status Code 201

Name Type Required Restrictions Description
» success boolean false none Success status of the request
» result [object] false none List of vetro features
»» type string true none Type of feature
»» geometry any true none Geometry of feature according to the geojson spec. This must be null if "properties.parent_vetro_id" is not null.

oneOf

Name Type Required Restrictions Description
»»» anonymous string¦null false none No geometry type

xor

Name Type Required Restrictions Description
»»» anonymous object false none GeoJSON point geometry
»»»» type string true none Point type
»»»» coordinates [number] true none Coordinates of the point (lat, lng)

xor

Name Type Required Restrictions Description
»»» anonymous object false none GeoJSON linestring geometry
»»»» type string true none LineString type
»»»» coordinates [array] true none Coordinates of the line string

xor

Name Type Required Restrictions Description
»»» anonymous object false none GeoJSON polygon geometry
»»»» type string true none Polygon type
»»»» coordinates [array] true none List of polygon coordinate points

continued

Name Type Required Restrictions Description
»» x-vetro object true none vetro specific properties (e.g., layer_id, vetro_id)
»»» id integer true none ID of the feature
»»» layer_id integer true none Layer id of the feature
»»» vetro_id string(uuid) true none Vetro id of the feature
»»» plan_id integer true none Plan the feature belongs to
»»» has_custom_length boolean false none Feature has a custom length that is not determined from the geometry coordinates
»»» parent_vetro_id string(uuid)¦null true none Vetro id of parent if it exists, null otherwise. This must be null if geometry is not null.
»»» child_vetro_ids [string] true none Vetro ids of child features (e.g., equipment)
»»» feature_type string¦null true none The categorization of a feature within vetro
»»» feature_table string false none none
»»» material_template_id integer¦null true none ID of material template applied to the feature
»»» labor_template_id integer¦null true none ID of labor template applied to the feature
»»» hardware_template_id integer¦null true none ID of hardware template applied to the feature
»»» has_parent boolean true none none
»» properties object true none Feature attributes

Enumerated Values

Property Value
type Point
type LineString
type Polygon
feature_type null
feature_type network_point
feature_type chief_office
feature_type junction
feature_type service_location
feature_type network_line
feature_type nonnetwork_line
feature_type nonnetwork_point
feature_type nonnetwork_polygon
feature_type fiber_cable
feature_type duct
feature_type micro_duct
feature_type micro_duct_bundle
feature_type slack_loop
feature_type equipment_muxer
feature_type equipment_splitter
feature_type equipment_nxn
feature_type equipment_splice_closure
feature_type hardware
feature_type pole
feature_table network_points
feature_table nonnetwork_points
feature_table network_lines
feature_table nonnetwork_lines
feature_table nonnetwork_polygons

Update Feature Pre Update

Code samples

# You can also use wget
curl -X PATCH /v2/features/pre_update \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

PATCH /v2/features/pre_update HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
  "features": [
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [
          102,
          0.5
        ]
      },
      "x-vetro": {
        "layer_id": 14,
        "vetro_id": "1679f385-9d6e-417f-8e04-fd27b62f3fcd",
        "plan_id": 19,
        "material_template_id": 17,
        "labor_template_id": 42,
        "hardware_template_id": 42,
        "parent_vetro_id": "16645485-9d6e-417f-8e04-fd27njs65k2d"
      },
      "properties": {}
    }
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('/v2/features/pre_update',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PATCH /features/pre_update

Get information about side effects of an update operation

Body parameter

{
  "features": [
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [
          102,
          0.5
        ]
      },
      "x-vetro": {
        "layer_id": 14,
        "vetro_id": "1679f385-9d6e-417f-8e04-fd27b62f3fcd",
        "plan_id": 19,
        "material_template_id": 17,
        "labor_template_id": 42,
        "hardware_template_id": 42,
        "parent_vetro_id": "16645485-9d6e-417f-8e04-fd27njs65k2d"
      },
      "properties": {}
    }
  ]
}

Parameters

Name In Type Required Description
body body object true FeatureCollection containing one or more Features to pre-update, this should be the same feature array passed to PATCH /features
» features body [object] false List of features to update
»» type body string false Type of feature
»» geometry body any false Geometry type of the feature
»»» anonymous body string¦null false No geometry type
»»» anonymous body object false GeoJSON point geometry
»»»» type body string true Point type
»»»» coordinates body [number] true Coordinates of the point (lat, lng)
»»» anonymous body object false GeoJSON linestring geometry
»»»» type body string true LineString type
»»»» coordinates body [array] true Coordinates of the line string
»»» anonymous body object false GeoJSON polygon geometry
»»»» type body string true Polygon type
»»»» coordinates body [array] true List of polygon coordinate points
»» x-vetro body object true vetro specific properties (e.g., layer_id, vetro_id)
»»» layer_id body integer false Layer id of the vetro feature
»»» vetro_id body string(uuid) true Vetro id of the feature
»»» plan_id body integer false Plan the feature belongs to
»»» material_template_id body integer¦null false Material template to apply to the feature
»»» labor_template_id body integer¦null false Labor template to apply to the feature
»»» hardware_template_id body integer¦null false Hardware template to apply to the feature
»»» parent_vetro_id body string(uuid) false Parent feature id to attach the child feature to. Used for equipment.
»» properties body object false Feature attributes

Enumerated Values

Parameter Value
»»»» type Point
»»»» type LineString
»»»» type Polygon

Example responses

200 Response

{
  "success": true,
  "result": {
    "features": [
      {
        "feature": {
          "type": "Feature",
          "geometry": "string",
          "x-vetro": {
            "id": 42,
            "layer_id": 14,
            "vetro_id": "1679f385-9d6e-417f-8e04-fd27b62f3fcd",
            "plan_id": 19,
            "has_custom_length": true,
            "parent_vetro_id": "df976393-ffb0-4c8c-a377-13b3f1d52728",
            "child_vetro_ids": [
              "497f6eca-6276-4993-bfeb-53cbbbba6f08"
            ],
            "feature_type": null,
            "feature_table": "network_points",
            "material_template_id": 0,
            "labor_template_id": 0,
            "hardware_template_id": 0,
            "has_parent": true
          },
          "properties": {}
        },
        "nodes": [
          {
            "id": 0,
            "data": {
              "type": "fiber_end",
              "is_connected": true,
              "fiber_number": 0,
              "fiber_side": "start",
              "geographic_nodes_id": 0,
              "parent_vetro_id": "df976393-ffb0-4c8c-a377-13b3f1d52728",
              "stored_fiberpath_ids": [
                0
              ],
              "last_splice_edit_time": "2019-08-24T14:15:22Z"
            }
          }
        ]
      }
    ]
  }
}

Responses

Status Meaning Description Schema
200 OK Features contains an array of features grouped with their child nodes that would be affected by this update Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result object false none none
»» features [object] true none none
»»» feature object true none none
»»»» type string true none Type of feature
»»»» geometry any true none Geometry of feature according to the geojson spec. This must be null if "properties.parent_vetro_id" is not null.

oneOf

Name Type Required Restrictions Description
»»»»» anonymous string¦null false none No geometry type

xor

Name Type Required Restrictions Description
»»»»» anonymous object false none GeoJSON point geometry
»»»»»» type string true none Point type
»»»»»» coordinates [number] true none Coordinates of the point (lat, lng)

xor

Name Type Required Restrictions Description
»»»»» anonymous object false none GeoJSON linestring geometry
»»»»»» type string true none LineString type
»»»»»» coordinates [array] true none Coordinates of the line string

xor

Name Type Required Restrictions Description
»»»»» anonymous object false none GeoJSON polygon geometry
»»»»»» type string true none Polygon type
»»»»»» coordinates [array] true none List of polygon coordinate points

continued

Name Type Required Restrictions Description
»»»» x-vetro object true none vetro specific properties (e.g., layer_id, vetro_id)
»»»»» id integer true none ID of the feature
»»»»» layer_id integer true none Layer id of the feature
»»»»» vetro_id string(uuid) true none Vetro id of the feature
»»»»» plan_id integer true none Plan the feature belongs to
»»»»» has_custom_length boolean false none Feature has a custom length that is not determined from the geometry coordinates
»»»»» parent_vetro_id string(uuid)¦null true none Vetro id of parent if it exists, null otherwise. This must be null if geometry is not null.
»»»»» child_vetro_ids [string] true none Vetro ids of child features (e.g., equipment)
»»»»» feature_type string¦null true none The categorization of a feature within vetro
»»»»» feature_table string false none none
»»»»» material_template_id integer¦null true none ID of material template applied to the feature
»»»»» labor_template_id integer¦null true none ID of labor template applied to the feature
»»»»» hardware_template_id integer¦null true none ID of hardware template applied to the feature
»»»»» has_parent boolean true none none
»»»» properties object true none Feature attributes
»»» nodes [oneOf] true none none

oneOf

Name Type Required Restrictions Description
»»»» anonymous any false none none

allOf

Name Type Required Restrictions Description
»»»»» anonymous object false none none
»»»»»» id integer true none none
»»»»»» data any true none Information about the node.

and

Name Type Required Restrictions Description
»»»»» anonymous object false none none
»»»»»» data object false none none
»»»»»»» type string true none none
»»»»»»» is_connected boolean true none indicates whether this node is connected to another node.
»»»»»»» fiber_number integer true none The fiber number, between 1 and the cable's fiber capacity.
»»»»»»» fiber_side string true none Describes which of the two nodes for a particular fiber this is.
»»»»»»» geographic_nodes_id integer true none The cable end node that is parent of this fiber end node.
»»»»»»» parent_vetro_id string(uuid)¦null true none Parent feature's vetro id
»»»»»»» stored_fiberpath_ids [integer] true none none
»»»»»»» last_splice_edit_time string(date-time)¦null true none The last time a fibergraph node had its connectivity changed, i.e., connected or disconnected.

xor

Name Type Required Restrictions Description
»»»» anonymous any false none none

allOf

Name Type Required Restrictions Description
»»»»» anonymous object false none none

and

Name Type Required Restrictions Description
»»»»» anonymous object false none none
»»»»»» data object false none none
»»»»»»» type string true none none
»»»»»»» is_connected boolean true none indicates whether this node is connected to another node.
»»»»»»» sort_order integer false none Determines the order in which ports on the same side are displayed.
»»»»»»» port_number integer true none A numeric label label for the port. Unique within a side.
»»»»»»» side string true none Equipment ports are group into two sides. Number of "a" ports will be less than or equal to number of "b" ports
»»»»»»» parent_vetro_id string(uuid)¦null true none Parent feature's vetro id
»»»»»»» stored_fiberpath_ids [integer] true none none
»»»»»»» last_splice_edit_time string(date-time)¦null true none The last time a fibergraph node had its connectivity changed, i.e., connected or disconnected.
»»»»»»» label string¦null true none A text description

Enumerated Values

Property Value
type Point
type LineString
type Polygon
feature_type null
feature_type network_point
feature_type chief_office
feature_type junction
feature_type service_location
feature_type network_line
feature_type nonnetwork_line
feature_type nonnetwork_point
feature_type nonnetwork_polygon
feature_type fiber_cable
feature_type duct
feature_type micro_duct
feature_type micro_duct_bundle
feature_type slack_loop
feature_type equipment_muxer
feature_type equipment_splitter
feature_type equipment_nxn
feature_type equipment_splice_closure
feature_type hardware
feature_type pole
feature_table network_points
feature_table nonnetwork_points
feature_table network_lines
feature_table nonnetwork_lines
feature_table nonnetwork_polygons
type fiber_end
fiber_side start
fiber_side end
type equipment_port
side a
side b

Count Features By Layer

Code samples

# You can also use wget
curl -X POST /v2/features/intersection/count_by_layer \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST /v2/features/intersection/count_by_layer HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
  "features": {
    "geometry": {
      "type": "Point",
      "coordinates": [
        0,
        0
      ]
    },
    "layer_ids": [
      14
    ],
    "plan_ids": [
      8
    ],
    "excluded_attributes": [
      {
        "layer_id": 14,
        "attribute_name": "string",
        "excluded_values": [
          "string"
        ]
      }
    ]
  }
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('/v2/features/intersection/count_by_layer',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /features/intersection/count_by_layer

Counts features intersecting with some geometry (point, line, polygon)

Body parameter

{
  "features": {
    "geometry": {
      "type": "Point",
      "coordinates": [
        0,
        0
      ]
    },
    "layer_ids": [
      14
    ],
    "plan_ids": [
      8
    ],
    "excluded_attributes": [
      {
        "layer_id": 14,
        "attribute_name": "string",
        "excluded_values": [
          "string"
        ]
      }
    ]
  }
}

Parameters

Name In Type Required Description
body body object true none
» features body object false none
»» geometry body object false none
»»» anonymous body object false GeoJSON point geometry
»»»» type body string true Point type
»»»» coordinates body [number] true Coordinates of the point (lat, lng)
»»» anonymous body object false GeoJSON linestring geometry
»»»» type body string true LineString type
»»»» coordinates body [array] true Coordinates of the line string
»»» anonymous body object false GeoJSON polygon geometry
»»»» type body string true Polygon type
»»»» coordinates body [array] true List of polygon coordinate points
»» layer_ids body [integer] false none
»» plan_ids body [integer] false none
»» excluded_attributes body [object] false none
»»» layer_id body integer true Integer corresponding to a vetro layer
»»» attribute_name body string true name of attribute to exclude
»»» excluded_values body any true array of attribute values to exclude from results
»»»» anonymous body [string] false none
»»»» anonymous body [number] false none

Enumerated Values

Parameter Value
»»»» type Point
»»»» type LineString
»»»» type Polygon

Example responses

200 Response

{
  "success": true,
  "result": {
    "result": {
      "9": 42,
      "11": 68
    }
  }
}

Responses

Status Meaning Description Schema
200 OK A map of layer ids to the count of their features intersecting the given geometry Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none Success status of the request
» result object false none none
»» result object false none none
»»» additionalProperties number false none none

Get Features in Polygon

Code samples

# You can also use wget
curl -X POST /v2/features/intersection \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST /v2/features/intersection HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
  "features": {
    "geometry": {
      "type": "Point",
      "coordinates": [
        0,
        0
      ]
    },
    "layer_ids": [
      14
    ],
    "plan_ids": [
      8
    ],
    "excluded_attributes": [
      {
        "layer_id": 14,
        "attribute_name": "string",
        "excluded_values": [
          "string"
        ]
      }
    ]
  }
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('/v2/features/intersection',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /features/intersection

Gets features intersecting with some geometry (point, line, polygon)

Body parameter

{
  "features": {
    "geometry": {
      "type": "Point",
      "coordinates": [
        0,
        0
      ]
    },
    "layer_ids": [
      14
    ],
    "plan_ids": [
      8
    ],
    "excluded_attributes": [
      {
        "layer_id": 14,
        "attribute_name": "string",
        "excluded_values": [
          "string"
        ]
      }
    ]
  }
}

Parameters

Name In Type Required Description
body body object true none
» features body object false none
»» geometry body object false none
»»» anonymous body object false GeoJSON point geometry
»»»» type body string true Point type
»»»» coordinates body [number] true Coordinates of the point (lat, lng)
»»» anonymous body object false GeoJSON linestring geometry
»»»» type body string true LineString type
»»»» coordinates body [array] true Coordinates of the line string
»»» anonymous body object false GeoJSON polygon geometry
»»»» type body string true Polygon type
»»»» coordinates body [array] true List of polygon coordinate points
»» layer_ids body [integer] false none
»» plan_ids body [integer] false none
»» excluded_attributes body [object] false none
»»» layer_id body integer true Integer corresponding to a vetro layer
»»» attribute_name body string true name of attribute to exclude
»»» excluded_values body any true array of attribute values to exclude from results
»»»» anonymous body [string] false none
»»»» anonymous body [number] false none

Enumerated Values

Parameter Value
»»»» type Point
»»»» type LineString
»»»» type Polygon

Example responses

200 Response

{
  "success": true,
  "result": [
    {
      "type": "Feature",
      "geometry": "string",
      "x-vetro": {
        "id": 42,
        "layer_id": 14,
        "vetro_id": "1679f385-9d6e-417f-8e04-fd27b62f3fcd",
        "plan_id": 19,
        "has_custom_length": true,
        "parent_vetro_id": "df976393-ffb0-4c8c-a377-13b3f1d52728",
        "child_vetro_ids": [
          "497f6eca-6276-4993-bfeb-53cbbbba6f08"
        ],
        "feature_type": null,
        "feature_table": "network_points",
        "material_template_id": 0,
        "labor_template_id": 0,
        "hardware_template_id": 0,
        "has_parent": true
      },
      "properties": {}
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Array of features Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none Success status of the request
» result any false none none

anyOf

Name Type Required Restrictions Description
»» anonymous [object] false none List of vetro features
»»» type string true none Type of feature
»»» geometry any true none Geometry of feature according to the geojson spec. This must be null if "properties.parent_vetro_id" is not null.

oneOf

Name Type Required Restrictions Description
»»»» anonymous string¦null false none No geometry type

xor

Name Type Required Restrictions Description
»»»» anonymous object false none GeoJSON point geometry
»»»»» type string true none Point type
»»»»» coordinates [number] true none Coordinates of the point (lat, lng)

xor

Name Type Required Restrictions Description
»»»» anonymous object false none GeoJSON linestring geometry
»»»»» type string true none LineString type
»»»»» coordinates [array] true none Coordinates of the line string

xor

Name Type Required Restrictions Description
»»»» anonymous object false none GeoJSON polygon geometry
»»»»» type string true none Polygon type
»»»»» coordinates [array] true none List of polygon coordinate points

continued

Name Type Required Restrictions Description
»»» x-vetro object true none vetro specific properties (e.g., layer_id, vetro_id)
»»»» id integer true none ID of the feature
»»»» layer_id integer true none Layer id of the feature
»»»» vetro_id string(uuid) true none Vetro id of the feature
»»»» plan_id integer true none Plan the feature belongs to
»»»» has_custom_length boolean false none Feature has a custom length that is not determined from the geometry coordinates
»»»» parent_vetro_id string(uuid)¦null true none Vetro id of parent if it exists, null otherwise. This must be null if geometry is not null.
»»»» child_vetro_ids [string] true none Vetro ids of child features (e.g., equipment)
»»»» feature_type string¦null true none The categorization of a feature within vetro
»»»» feature_table string false none none
»»»» material_template_id integer¦null true none ID of material template applied to the feature
»»»» labor_template_id integer¦null true none ID of labor template applied to the feature
»»»» hardware_template_id integer¦null true none ID of hardware template applied to the feature
»»»» has_parent boolean true none none
»»» properties object true none Feature attributes

or

Name Type Required Restrictions Description
»» anonymous [object] false none none
»»» type string true none Type of feature
»»» geometry any true none Geometry of feature according to the geojson spec

oneOf

Name Type Required Restrictions Description
»»»» anonymous object false none GeoJSON point geometry

xor

Name Type Required Restrictions Description
»»»» anonymous object false none GeoJSON linestring geometry

xor

Name Type Required Restrictions Description
»»»» anonymous object false none GeoJSON polygon geometry

xor

Name Type Required Restrictions Description
»»»» anonymous object false none GeoJSON geometry
»»»»» type string true none none
»»»»» coordinates [array] true none none

xor

Name Type Required Restrictions Description
»»»» anonymous object false none GeoJson geometry
»»»»» type string true none none
»»»»» coordinates [array] true none none

xor

Name Type Required Restrictions Description
»»»» anonymous object false none GeoJson geometry
»»»»» type string false none none
»»»»» coordinates [array] false none none

continued

Name Type Required Restrictions Description
»»» x-vetro object true none none
»»»» layer_id number true none none
»»»» is_external boolean true none none
»»» properties object true none Feature attributes

Enumerated Values

Property Value
type Point
type LineString
type Polygon
feature_type null
feature_type network_point
feature_type chief_office
feature_type junction
feature_type service_location
feature_type network_line
feature_type nonnetwork_line
feature_type nonnetwork_point
feature_type nonnetwork_polygon
feature_type fiber_cable
feature_type duct
feature_type micro_duct
feature_type micro_duct_bundle
feature_type slack_loop
feature_type equipment_muxer
feature_type equipment_splitter
feature_type equipment_nxn
feature_type equipment_splice_closure
feature_type hardware
feature_type pole
feature_table network_points
feature_table nonnetwork_points
feature_table network_lines
feature_table nonnetwork_lines
feature_table nonnetwork_polygons
type MultiPoint
type MultiLineString
type MultiPolygon

Feature query

Code samples

# You can also use wget
curl -X GET /v2/features/query \
  -H 'Accept: application/json'

GET /v2/features/query HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/features/query',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /features/query

Using the layer_ids, plan_ids, and filter params, fetch features matching the specified filters.

Parameters

Name In Type Required Description
offset query integer false Number of records to skip from the beginning of the results
limit query integer false The maximum number of results to return
order query string false Specifies the ordering of each attribute of features when querying. Sorts from left to right
plan_ids query array[integer] false ids of plans to include in the response
layer_ids query array[integer] false ids of layers to include in the response
filter query string false The query filter specifies the characteristics of the features returned by this endpoint. Properties available for query are "material", "layer", "plan", and feature attributes, e.g., "Fiber Capacity". For more information about formatting a query, please see the help documentation inside that VETRO FiberMap application.

Detailed descriptions

filter: The query filter specifies the characteristics of the features returned by this endpoint. Properties available for query are "material", "layer", "plan", and feature attributes, e.g., "Fiber Capacity". For more information about formatting a query, please see the help documentation inside that VETRO FiberMap application.

Example responses

200 Response

{
  "success": true,
  "result": [
    {
      "type": "Feature",
      "geometry": "string",
      "x-vetro": {
        "id": 42,
        "layer_id": 14,
        "vetro_id": "1679f385-9d6e-417f-8e04-fd27b62f3fcd",
        "plan_id": 19,
        "has_custom_length": true,
        "parent_vetro_id": "df976393-ffb0-4c8c-a377-13b3f1d52728",
        "child_vetro_ids": [
          "497f6eca-6276-4993-bfeb-53cbbbba6f08"
        ],
        "feature_type": null,
        "feature_table": "network_points",
        "material_template_id": 0,
        "labor_template_id": 0,
        "hardware_template_id": 0,
        "has_parent": true
      },
      "properties": {}
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Vetro geojson matching the specified filters. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result [object] false none List of vetro features
»» type string true none Type of feature
»» geometry any true none Geometry of feature according to the geojson spec. This must be null if "properties.parent_vetro_id" is not null.

oneOf

Name Type Required Restrictions Description
»»» anonymous string¦null false none No geometry type

xor

Name Type Required Restrictions Description
»»» anonymous object false none GeoJSON point geometry
»»»» type string true none Point type
»»»» coordinates [number] true none Coordinates of the point (lat, lng)

xor

Name Type Required Restrictions Description
»»» anonymous object false none GeoJSON linestring geometry
»»»» type string true none LineString type
»»»» coordinates [array] true none Coordinates of the line string

xor

Name Type Required Restrictions Description
»»» anonymous object false none GeoJSON polygon geometry
»»»» type string true none Polygon type
»»»» coordinates [array] true none List of polygon coordinate points

continued

Name Type Required Restrictions Description
»» x-vetro object true none vetro specific properties (e.g., layer_id, vetro_id)
»»» id integer true none ID of the feature
»»» layer_id integer true none Layer id of the feature
»»» vetro_id string(uuid) true none Vetro id of the feature
»»» plan_id integer true none Plan the feature belongs to
»»» has_custom_length boolean false none Feature has a custom length that is not determined from the geometry coordinates
»»» parent_vetro_id string(uuid)¦null true none Vetro id of parent if it exists, null otherwise. This must be null if geometry is not null.
»»» child_vetro_ids [string] true none Vetro ids of child features (e.g., equipment)
»»» feature_type string¦null true none The categorization of a feature within vetro
»»» feature_table string false none none
»»» material_template_id integer¦null true none ID of material template applied to the feature
»»» labor_template_id integer¦null true none ID of labor template applied to the feature
»»» hardware_template_id integer¦null true none ID of hardware template applied to the feature
»»» has_parent boolean true none none
»» properties object true none Feature attributes

Enumerated Values

Property Value
type Point
type LineString
type Polygon
feature_type null
feature_type network_point
feature_type chief_office
feature_type junction
feature_type service_location
feature_type network_line
feature_type nonnetwork_line
feature_type nonnetwork_point
feature_type nonnetwork_polygon
feature_type fiber_cable
feature_type duct
feature_type micro_duct
feature_type micro_duct_bundle
feature_type slack_loop
feature_type equipment_muxer
feature_type equipment_splitter
feature_type equipment_nxn
feature_type equipment_splice_closure
feature_type hardware
feature_type pole
feature_table network_points
feature_table nonnetwork_points
feature_table network_lines
feature_table nonnetwork_lines
feature_table nonnetwork_polygons

Get Features

Code samples

# You can also use wget
curl -X GET /v2/features/{vetro_ids} \
  -H 'Accept: application/json'

GET /v2/features/{vetro_ids} HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/features/{vetro_ids}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /features/{vetro_ids}

Retrieve a FeatureCollection of Features within a given layer.

Parameters

Name In Type Required Description
vetro_ids path array[string] true Vetro ids (uuids)

Example responses

200 Response

{
  "success": true,
  "result": [
    {
      "type": "Feature",
      "geometry": "string",
      "x-vetro": {
        "id": 42,
        "layer_id": 14,
        "vetro_id": "1679f385-9d6e-417f-8e04-fd27b62f3fcd",
        "plan_id": 19,
        "has_custom_length": true,
        "parent_vetro_id": "df976393-ffb0-4c8c-a377-13b3f1d52728",
        "child_vetro_ids": [
          "497f6eca-6276-4993-bfeb-53cbbbba6f08"
        ],
        "feature_type": null,
        "feature_table": "network_points",
        "material_template_id": 0,
        "labor_template_id": 0,
        "hardware_template_id": 0,
        "has_parent": true
      },
      "properties": {}
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Array of features Inline
404 Not Found No feature corresponds to at least one provided vetro id None
414 URI Too Long The request is too large (more than 1000 ids sent) None

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result [object] false none List of vetro features
»» type string true none Type of feature
»» geometry any true none Geometry of feature according to the geojson spec. This must be null if "properties.parent_vetro_id" is not null.

oneOf

Name Type Required Restrictions Description
»»» anonymous string¦null false none No geometry type

xor

Name Type Required Restrictions Description
»»» anonymous object false none GeoJSON point geometry
»»»» type string true none Point type
»»»» coordinates [number] true none Coordinates of the point (lat, lng)

xor

Name Type Required Restrictions Description
»»» anonymous object false none GeoJSON linestring geometry
»»»» type string true none LineString type
»»»» coordinates [array] true none Coordinates of the line string

xor

Name Type Required Restrictions Description
»»» anonymous object false none GeoJSON polygon geometry
»»»» type string true none Polygon type
»»»» coordinates [array] true none List of polygon coordinate points

continued

Name Type Required Restrictions Description
»» x-vetro object true none vetro specific properties (e.g., layer_id, vetro_id)
»»» id integer true none ID of the feature
»»» layer_id integer true none Layer id of the feature
»»» vetro_id string(uuid) true none Vetro id of the feature
»»» plan_id integer true none Plan the feature belongs to
»»» has_custom_length boolean false none Feature has a custom length that is not determined from the geometry coordinates
»»» parent_vetro_id string(uuid)¦null true none Vetro id of parent if it exists, null otherwise. This must be null if geometry is not null.
»»» child_vetro_ids [string] true none Vetro ids of child features (e.g., equipment)
»»» feature_type string¦null true none The categorization of a feature within vetro
»»» feature_table string false none none
»»» material_template_id integer¦null true none ID of material template applied to the feature
»»» labor_template_id integer¦null true none ID of labor template applied to the feature
»»» hardware_template_id integer¦null true none ID of hardware template applied to the feature
»»» has_parent boolean true none none
»» properties object true none Feature attributes

Enumerated Values

Property Value
type Point
type LineString
type Polygon
feature_type null
feature_type network_point
feature_type chief_office
feature_type junction
feature_type service_location
feature_type network_line
feature_type nonnetwork_line
feature_type nonnetwork_point
feature_type nonnetwork_polygon
feature_type fiber_cable
feature_type duct
feature_type micro_duct
feature_type micro_duct_bundle
feature_type slack_loop
feature_type equipment_muxer
feature_type equipment_splitter
feature_type equipment_nxn
feature_type equipment_splice_closure
feature_type hardware
feature_type pole
feature_table network_points
feature_table nonnetwork_points
feature_table network_lines
feature_table nonnetwork_lines
feature_table nonnetwork_polygons

Delete Features

Code samples

# You can also use wget
curl -X DELETE /v2/features/{vetro_ids} \
  -H 'Accept: application/json'

DELETE /v2/features/{vetro_ids} HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/features/{vetro_ids}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

DELETE /features/{vetro_ids}

Deletes Features given a number of vetro_ids.

Parameters

Name In Type Required Description
vetro_ids path array[string] true Vetro ids (uuids)

Example responses

200 Response

{
  "success": true,
  "result": [
    "497f6eca-6276-4993-bfeb-53cbbbba6f08"
  ]
}

Responses

Status Meaning Description Schema
200 OK Features were successfully deleted Inline
404 Not Found request contains features that do not exist or are already deleted None
414 URI Too Long request too large (more than 1000 ids sent) None

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none Success status of the request
» result [string] false none uuids of deleted features

Get Closest Point

Code samples

# You can also use wget
curl -X GET /v2/features/{vetro_id}/closest_point?lng=0&lat=0 \
  -H 'Accept: application/json'

GET /v2/features/{vetro_id}/closest_point?lng=0&lat=0 HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/features/{vetro_id}/closest_point?lng=0&lat=0',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /features/{vetro_id}/closest_point

Get the closest point on the feature to the given lng/lat.

Parameters

Name In Type Required Description
vetro_id path string(uuid) true Vetro id (uuid)
lng query number true longitude of point
lat query number true latitude of point

Example responses

200 Response

{
  "success": true,
  "result": {
    "type": "Point",
    "coordinates": [
      0,
      0
    ]
  }
}

Responses

Status Meaning Description Schema
200 OK A geojson representation of the closest point on the feature. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result object false none GeoJSON point geometry
»» type string true none Point type
»» coordinates [number] true none Coordinates of the point (lat, lng)

Enumerated Values

Property Value
type Point

Get Feature Nesting

Code samples

# You can also use wget
curl -X GET /v2/features/{vetro_id}/nesting \
  -H 'Accept: application/json'

GET /v2/features/{vetro_id}/nesting HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/features/{vetro_id}/nesting',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /features/{vetro_id}/nesting

Retrieve all the descendant and ancestor features for a given feature.

Parameters

Name In Type Required Description
vetro_id path string(uuid) true Vetro id (uuid)

Example responses

200 Response

{
  "success": true,
  "result": {
    "ancestors": [
      {
        "path": [
          "string"
        ],
        "feature": {
          "type": "Feature",
          "geometry": "string",
          "x-vetro": {
            "id": 42,
            "layer_id": 14,
            "vetro_id": "1679f385-9d6e-417f-8e04-fd27b62f3fcd",
            "plan_id": 19,
            "has_custom_length": true,
            "parent_vetro_id": "df976393-ffb0-4c8c-a377-13b3f1d52728",
            "child_vetro_ids": [
              "497f6eca-6276-4993-bfeb-53cbbbba6f08"
            ],
            "feature_type": null,
            "feature_table": "network_points",
            "material_template_id": 0,
            "labor_template_id": 0,
            "hardware_template_id": 0,
            "has_parent": true
          },
          "properties": {}
        }
      }
    ],
    "descendants": [
      {
        "path": [
          "string"
        ],
        "feature": {
          "type": "Feature",
          "geometry": "string",
          "x-vetro": {
            "id": 42,
            "layer_id": 14,
            "vetro_id": "1679f385-9d6e-417f-8e04-fd27b62f3fcd",
            "plan_id": 19,
            "has_custom_length": true,
            "parent_vetro_id": "df976393-ffb0-4c8c-a377-13b3f1d52728",
            "child_vetro_ids": [
              "497f6eca-6276-4993-bfeb-53cbbbba6f08"
            ],
            "feature_type": null,
            "feature_table": "network_points",
            "material_template_id": 0,
            "labor_template_id": 0,
            "hardware_template_id": 0,
            "has_parent": true
          },
          "properties": {}
        }
      }
    ]
  }
}

Responses

Status Meaning Description Schema
200 OK ancestor and descendant arrays containing feature and path data Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none Success status of the request
» result object false none none
»» ancestors [object] false none none
»»» path [string] false none none
»»» feature object false none none
»»»» type string true none Type of feature
»»»» geometry any true none Geometry of feature according to the geojson spec. This must be null if "properties.parent_vetro_id" is not null.

oneOf

Name Type Required Restrictions Description
»»»»» anonymous string¦null false none No geometry type

xor

Name Type Required Restrictions Description
»»»»» anonymous object false none GeoJSON point geometry
»»»»»» type string true none Point type
»»»»»» coordinates [number] true none Coordinates of the point (lat, lng)

xor

Name Type Required Restrictions Description
»»»»» anonymous object false none GeoJSON linestring geometry
»»»»»» type string true none LineString type
»»»»»» coordinates [array] true none Coordinates of the line string

xor

Name Type Required Restrictions Description
»»»»» anonymous object false none GeoJSON polygon geometry
»»»»»» type string true none Polygon type
»»»»»» coordinates [array] true none List of polygon coordinate points

continued

Name Type Required Restrictions Description
»»»» x-vetro object true none vetro specific properties (e.g., layer_id, vetro_id)
»»»»» id integer true none ID of the feature
»»»»» layer_id integer true none Layer id of the feature
»»»»» vetro_id string(uuid) true none Vetro id of the feature
»»»»» plan_id integer true none Plan the feature belongs to
»»»»» has_custom_length boolean false none Feature has a custom length that is not determined from the geometry coordinates
»»»»» parent_vetro_id string(uuid)¦null true none Vetro id of parent if it exists, null otherwise. This must be null if geometry is not null.
»»»»» child_vetro_ids [string] true none Vetro ids of child features (e.g., equipment)
»»»»» feature_type string¦null true none The categorization of a feature within vetro
»»»»» feature_table string false none none
»»»»» material_template_id integer¦null true none ID of material template applied to the feature
»»»»» labor_template_id integer¦null true none ID of labor template applied to the feature
»»»»» hardware_template_id integer¦null true none ID of hardware template applied to the feature
»»»»» has_parent boolean true none none
»»»» properties object true none Feature attributes
»» descendants [object] false none none
»»» path [string] false none none
»»» feature object false none none

Enumerated Values

Property Value
type Point
type LineString
type Polygon
feature_type null
feature_type network_point
feature_type chief_office
feature_type junction
feature_type service_location
feature_type network_line
feature_type nonnetwork_line
feature_type nonnetwork_point
feature_type nonnetwork_polygon
feature_type fiber_cable
feature_type duct
feature_type micro_duct
feature_type micro_duct_bundle
feature_type slack_loop
feature_type equipment_muxer
feature_type equipment_splitter
feature_type equipment_nxn
feature_type equipment_splice_closure
feature_type hardware
feature_type pole
feature_table network_points
feature_table nonnetwork_points
feature_table network_lines
feature_table nonnetwork_lines
feature_table nonnetwork_polygons

Get Nearby Feature Parents

Code samples

# You can also use wget
curl -X GET /v2/features/{vetro_id}/potential_parents \
  -H 'Accept: application/json'

GET /v2/features/{vetro_id}/potential_parents HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/features/{vetro_id}/potential_parents',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /features/{vetro_id}/potential_parents

Given the supplied network line feature, returns an array of network line features which could be added as parents. Valid parents are completely contained within a portion of the supplied feature geometry which is not currently covered by other parents.

Parameters

Name In Type Required Description
vetro_id path string(uuid) true Vetro id (uuid)

Example responses

200 Response

{
  "success": true,
  "result": [
    {
      "type": "Feature",
      "geometry": "string",
      "x-vetro": {
        "id": 42,
        "layer_id": 14,
        "vetro_id": "1679f385-9d6e-417f-8e04-fd27b62f3fcd",
        "plan_id": 19,
        "has_custom_length": true,
        "parent_vetro_id": "df976393-ffb0-4c8c-a377-13b3f1d52728",
        "child_vetro_ids": [
          "497f6eca-6276-4993-bfeb-53cbbbba6f08"
        ],
        "feature_type": null,
        "feature_table": "network_points",
        "material_template_id": 0,
        "labor_template_id": 0,
        "hardware_template_id": 0,
        "has_parent": true
      },
      "properties": {}
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Array of features Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none Success status of the request
» result [object] false none List of vetro features
»» type string true none Type of feature
»» geometry any true none Geometry of feature according to the geojson spec. This must be null if "properties.parent_vetro_id" is not null.

oneOf

Name Type Required Restrictions Description
»»» anonymous string¦null false none No geometry type

xor

Name Type Required Restrictions Description
»»» anonymous object false none GeoJSON point geometry
»»»» type string true none Point type
»»»» coordinates [number] true none Coordinates of the point (lat, lng)

xor

Name Type Required Restrictions Description
»»» anonymous object false none GeoJSON linestring geometry
»»»» type string true none LineString type
»»»» coordinates [array] true none Coordinates of the line string

xor

Name Type Required Restrictions Description
»»» anonymous object false none GeoJSON polygon geometry
»»»» type string true none Polygon type
»»»» coordinates [array] true none List of polygon coordinate points

continued

Name Type Required Restrictions Description
»» x-vetro object true none vetro specific properties (e.g., layer_id, vetro_id)
»»» id integer true none ID of the feature
»»» layer_id integer true none Layer id of the feature
»»» vetro_id string(uuid) true none Vetro id of the feature
»»» plan_id integer true none Plan the feature belongs to
»»» has_custom_length boolean false none Feature has a custom length that is not determined from the geometry coordinates
»»» parent_vetro_id string(uuid)¦null true none Vetro id of parent if it exists, null otherwise. This must be null if geometry is not null.
»»» child_vetro_ids [string] true none Vetro ids of child features (e.g., equipment)
»»» feature_type string¦null true none The categorization of a feature within vetro
»»» feature_table string false none none
»»» material_template_id integer¦null true none ID of material template applied to the feature
»»» labor_template_id integer¦null true none ID of labor template applied to the feature
»»» hardware_template_id integer¦null true none ID of hardware template applied to the feature
»»» has_parent boolean true none none
»» properties object true none Feature attributes

Enumerated Values

Property Value
type Point
type LineString
type Polygon
feature_type null
feature_type network_point
feature_type chief_office
feature_type junction
feature_type service_location
feature_type network_line
feature_type nonnetwork_line
feature_type nonnetwork_point
feature_type nonnetwork_polygon
feature_type fiber_cable
feature_type duct
feature_type micro_duct
feature_type micro_duct_bundle
feature_type slack_loop
feature_type equipment_muxer
feature_type equipment_splitter
feature_type equipment_nxn
feature_type equipment_splice_closure
feature_type hardware
feature_type pole
feature_table network_points
feature_table nonnetwork_points
feature_table network_lines
feature_table nonnetwork_lines
feature_table nonnetwork_polygons

Add Feature Parents

Code samples

# You can also use wget
curl -X PUT /v2/features/{vetro_id}/parents \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

PUT /v2/features/{vetro_id}/parents HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
  "parent_vetro_id": "df976393-ffb0-4c8c-a377-13b3f1d52728"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('/v2/features/{vetro_id}/parents',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PUT /features/{vetro_id}/parents

Add a parent to an a feature

Body parameter

{
  "parent_vetro_id": "df976393-ffb0-4c8c-a377-13b3f1d52728"
}

Parameters

Name In Type Required Description
vetro_id path string(uuid) true Vetro id (uuid)
body body object true The vetro_id of the parent to add.
» parent_vetro_id body string(uuid) true Vetro id of the feature

Example responses

200 Response

{
  "success": true
}

Responses

Status Meaning Description Schema
200 OK The child was successfully added Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none Success status of the request

Remove Feature Parents

Code samples

# You can also use wget
curl -X DELETE /v2/features/{vetro_id}/parents/{parent_vetro_id} \
  -H 'Accept: application/json'

DELETE /v2/features/{vetro_id}/parents/{parent_vetro_id} HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/features/{vetro_id}/parents/{parent_vetro_id}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

DELETE /features/{vetro_id}/parents/{parent_vetro_id}

Remove a parent line from a line feature

Parameters

Name In Type Required Description
vetro_id path string(uuid) true Vetro id (uuid)
parent_vetro_id path string(uuid) true parent Vetro id (uuid)

Example responses

200 Response

{
  "success": true
}

Responses

Status Meaning Description Schema
200 OK the child line successfully removed Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none Success status of the request

Get Feature Fiberpaths

Code samples

# You can also use wget
curl -X GET /v2/features/{vetro_id}/stored_fiberpaths \
  -H 'Accept: application/json'

GET /v2/features/{vetro_id}/stored_fiberpaths HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/features/{vetro_id}/stored_fiberpaths',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /features/{vetro_id}/stored_fiberpaths

Retrieve all the stored fiberpaths associated with a feature

Parameters

Name In Type Required Description
vetro_id path string(uuid) true Vetro id (uuid)
plan_ids query array[integer] false ids of plans to include in the response
layer_ids query array[integer] false ids of layers to include in the response

Example responses

200 Response

{
  "success": true,
  "result": [
    {
      "id": 0,
      "type": "circuit",
      "label": "string",
      "can_view": true,
      "fiber_number": 0
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Array of stored fiberpaths Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none Success status of the request
» result [object] false none none
»» id number true none none
»» type string true none none
»» label string true none none
»» can_view boolean true none none
»» fiber_number number false none none

Enumerated Values

Property Value
type circuit
type leased
type reserved

Split Feature

Code samples

# You can also use wget
curl -X POST /v2/features/split/{vetro_id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST /v2/features/split/{vetro_id} HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
  "geometry": {
    "type": "MultiPoint",
    "coordinates": [
      [
        0,
        0
      ]
    ]
  }
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('/v2/features/split/{vetro_id}',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /features/split/{vetro_id}

Split feature. If the splitting Point doesn't intersect with the LineString, the nearest Point on the LineString will be found, and the LineString will be split at that Point.

Body parameter

{
  "geometry": {
    "type": "MultiPoint",
    "coordinates": [
      [
        0,
        0
      ]
    ]
  }
}

Parameters

Name In Type Required Description
vetro_id path string(uuid) true Vetro id (uuid)
body body object true Split a LineString with a Point or a MultiPoint to split the line in multiple locations.
» geometry body any true none
»» anonymous body object false GeoJSON geometry
»»» type body string true none
»»» coordinates body [array] true none
»» anonymous body object false GeoJSON point geometry
»»» type body string true Point type
»»» coordinates body [number] true Coordinates of the point (lat, lng)

Enumerated Values

Parameter Value
»»» type MultiPoint
»»» type Point

Example responses

200 Response

{
  "success": true,
  "result": {
    "points": [
      {
        "type": "Feature",
        "geometry": "string",
        "x-vetro": {
          "id": 42,
          "layer_id": 14,
          "vetro_id": "1679f385-9d6e-417f-8e04-fd27b62f3fcd",
          "plan_id": 19,
          "has_custom_length": true,
          "parent_vetro_id": "df976393-ffb0-4c8c-a377-13b3f1d52728",
          "child_vetro_ids": [
            "497f6eca-6276-4993-bfeb-53cbbbba6f08"
          ],
          "feature_type": null,
          "feature_table": "network_points",
          "material_template_id": 0,
          "labor_template_id": 0,
          "hardware_template_id": 0,
          "has_parent": true
        },
        "properties": {}
      }
    ],
    "lines": [
      {
        "type": "Feature",
        "geometry": "string",
        "x-vetro": {
          "id": 42,
          "layer_id": 14,
          "vetro_id": "1679f385-9d6e-417f-8e04-fd27b62f3fcd",
          "plan_id": 19,
          "has_custom_length": true,
          "parent_vetro_id": "df976393-ffb0-4c8c-a377-13b3f1d52728",
          "child_vetro_ids": [
            "497f6eca-6276-4993-bfeb-53cbbbba6f08"
          ],
          "feature_type": null,
          "feature_table": "network_points",
          "material_template_id": 0,
          "labor_template_id": 0,
          "hardware_template_id": 0,
          "has_parent": true
        },
        "properties": {}
      }
    ]
  }
}

Responses

Status Meaning Description Schema
200 OK The new features Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none Success status of the request
» result object false none none
»» points [object] true none List of vetro features
»»» type string true none Type of feature
»»» geometry any true none Geometry of feature according to the geojson spec. This must be null if "properties.parent_vetro_id" is not null.

oneOf

Name Type Required Restrictions Description
»»»» anonymous string¦null false none No geometry type

xor

Name Type Required Restrictions Description
»»»» anonymous object false none GeoJSON point geometry
»»»»» type string true none Point type
»»»»» coordinates [number] true none Coordinates of the point (lat, lng)

xor

Name Type Required Restrictions Description
»»»» anonymous object false none GeoJSON linestring geometry
»»»»» type string true none LineString type
»»»»» coordinates [array] true none Coordinates of the line string

xor

Name Type Required Restrictions Description
»»»» anonymous object false none GeoJSON polygon geometry
»»»»» type string true none Polygon type
»»»»» coordinates [array] true none List of polygon coordinate points

continued

Name Type Required Restrictions Description
»»» x-vetro object true none vetro specific properties (e.g., layer_id, vetro_id)
»»»» id integer true none ID of the feature
»»»» layer_id integer true none Layer id of the feature
»»»» vetro_id string(uuid) true none Vetro id of the feature
»»»» plan_id integer true none Plan the feature belongs to
»»»» has_custom_length boolean false none Feature has a custom length that is not determined from the geometry coordinates
»»»» parent_vetro_id string(uuid)¦null true none Vetro id of parent if it exists, null otherwise. This must be null if geometry is not null.
»»»» child_vetro_ids [string] true none Vetro ids of child features (e.g., equipment)
»»»» feature_type string¦null true none The categorization of a feature within vetro
»»»» feature_table string false none none
»»»» material_template_id integer¦null true none ID of material template applied to the feature
»»»» labor_template_id integer¦null true none ID of labor template applied to the feature
»»»» hardware_template_id integer¦null true none ID of hardware template applied to the feature
»»»» has_parent boolean true none none
»»» properties object true none Feature attributes
»» lines [object] true none List of vetro features

Enumerated Values

Property Value
type Point
type LineString
type Polygon
feature_type null
feature_type network_point
feature_type chief_office
feature_type junction
feature_type service_location
feature_type network_line
feature_type nonnetwork_line
feature_type nonnetwork_point
feature_type nonnetwork_polygon
feature_type fiber_cable
feature_type duct
feature_type micro_duct
feature_type micro_duct_bundle
feature_type slack_loop
feature_type equipment_muxer
feature_type equipment_splitter
feature_type equipment_nxn
feature_type equipment_splice_closure
feature_type hardware
feature_type pole
feature_table network_points
feature_table nonnetwork_points
feature_table network_lines
feature_table nonnetwork_lines
feature_table nonnetwork_polygons

Check Features Pre Merge

Code samples

# You can also use wget
curl -X POST /v2/features/pre_merge/{vetro_ids} \
  -H 'Accept: application/json'

POST /v2/features/pre_merge/{vetro_ids} HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/features/pre_merge/{vetro_ids}',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /features/pre_merge/{vetro_ids}

Get information about side effects of a merge operation

Parameters

Name In Type Required Description
vetro_ids path array[string] true Vetro ids (uuids)

Example responses

200 Response

{
  "success": true,
  "result": {
    "stored_fiberpaths": [
      {
        "id": 0,
        "type": "circuit",
        "label": "string",
        "can_view": true
      }
    ],
    "features": [
      {
        "feature": {
          "type": "Feature",
          "geometry": "string",
          "x-vetro": {
            "id": 42,
            "layer_id": 14,
            "vetro_id": "1679f385-9d6e-417f-8e04-fd27b62f3fcd",
            "plan_id": 19,
            "has_custom_length": true,
            "parent_vetro_id": "df976393-ffb0-4c8c-a377-13b3f1d52728",
            "child_vetro_ids": [
              "497f6eca-6276-4993-bfeb-53cbbbba6f08"
            ],
            "feature_type": null,
            "feature_table": "network_points",
            "material_template_id": 0,
            "labor_template_id": 0,
            "hardware_template_id": 0,
            "has_parent": true
          },
          "properties": {}
        },
        "nodes": [
          {
            "id": 0,
            "data": {
              "type": "fiber_end",
              "is_connected": true,
              "fiber_number": 0,
              "fiber_side": "start",
              "geographic_nodes_id": 0,
              "parent_vetro_id": "df976393-ffb0-4c8c-a377-13b3f1d52728",
              "stored_fiberpath_ids": [
                0
              ],
              "last_splice_edit_time": "2019-08-24T14:15:22Z"
            }
          }
        ]
      }
    ]
  }
}

Responses

Status Meaning Description Schema
200 OK Features contains an array of features grouped with their child nodes that would be affected by this merge Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none Success status of the request
» result object false none none
»» stored_fiberpaths [object] true none none
»»» id number true none none
»»» type string true none none
»»» label string true none none
»»» can_view boolean true none none
»» features [object] true none none
»»» feature object true none none
»»»» type string true none Type of feature
»»»» geometry any true none Geometry of feature according to the geojson spec. This must be null if "properties.parent_vetro_id" is not null.

oneOf

Name Type Required Restrictions Description
»»»»» anonymous string¦null false none No geometry type

xor

Name Type Required Restrictions Description
»»»»» anonymous object false none GeoJSON point geometry
»»»»»» type string true none Point type
»»»»»» coordinates [number] true none Coordinates of the point (lat, lng)

xor

Name Type Required Restrictions Description
»»»»» anonymous object false none GeoJSON linestring geometry
»»»»»» type string true none LineString type
»»»»»» coordinates [array] true none Coordinates of the line string

xor

Name Type Required Restrictions Description
»»»»» anonymous object false none GeoJSON polygon geometry
»»»»»» type string true none Polygon type
»»»»»» coordinates [array] true none List of polygon coordinate points

continued

Name Type Required Restrictions Description
»»»» x-vetro object true none vetro specific properties (e.g., layer_id, vetro_id)
»»»»» id integer true none ID of the feature
»»»»» layer_id integer true none Layer id of the feature
»»»»» vetro_id string(uuid) true none Vetro id of the feature
»»»»» plan_id integer true none Plan the feature belongs to
»»»»» has_custom_length boolean false none Feature has a custom length that is not determined from the geometry coordinates
»»»»» parent_vetro_id string(uuid)¦null true none Vetro id of parent if it exists, null otherwise. This must be null if geometry is not null.
»»»»» child_vetro_ids [string] true none Vetro ids of child features (e.g., equipment)
»»»»» feature_type string¦null true none The categorization of a feature within vetro
»»»»» feature_table string false none none
»»»»» material_template_id integer¦null true none ID of material template applied to the feature
»»»»» labor_template_id integer¦null true none ID of labor template applied to the feature
»»»»» hardware_template_id integer¦null true none ID of hardware template applied to the feature
»»»»» has_parent boolean true none none
»»»» properties object true none Feature attributes
»»» nodes [oneOf] true none none

oneOf

Name Type Required Restrictions Description
»»»» anonymous any false none none

allOf

Name Type Required Restrictions Description
»»»»» anonymous object false none none
»»»»»» id integer true none none
»»»»»» data any true none Information about the node.

and

Name Type Required Restrictions Description
»»»»» anonymous object false none none
»»»»»» data object false none none
»»»»»»» type string true none none
»»»»»»» is_connected boolean true none indicates whether this node is connected to another node.
»»»»»»» fiber_number integer true none The fiber number, between 1 and the cable's fiber capacity.
»»»»»»» fiber_side string true none Describes which of the two nodes for a particular fiber this is.
»»»»»»» geographic_nodes_id integer true none The cable end node that is parent of this fiber end node.
»»»»»»» parent_vetro_id string(uuid)¦null true none Parent feature's vetro id
»»»»»»» stored_fiberpath_ids [integer] true none none
»»»»»»» last_splice_edit_time string(date-time)¦null true none The last time a fibergraph node had its connectivity changed, i.e., connected or disconnected.

xor

Name Type Required Restrictions Description
»»»» anonymous any false none none

allOf

Name Type Required Restrictions Description
»»»»» anonymous object false none none

and

Name Type Required Restrictions Description
»»»»» anonymous object false none none
»»»»»» data object false none none
»»»»»»» type string true none none
»»»»»»» is_connected boolean true none indicates whether this node is connected to another node.
»»»»»»» sort_order integer false none Determines the order in which ports on the same side are displayed.
»»»»»»» port_number integer true none A numeric label label for the port. Unique within a side.
»»»»»»» side string true none Equipment ports are group into two sides. Number of "a" ports will be less than or equal to number of "b" ports
»»»»»»» parent_vetro_id string(uuid)¦null true none Parent feature's vetro id
»»»»»»» stored_fiberpath_ids [integer] true none none
»»»»»»» last_splice_edit_time string(date-time)¦null true none The last time a fibergraph node had its connectivity changed, i.e., connected or disconnected.
»»»»»»» label string¦null true none A text description

Enumerated Values

Property Value
type circuit
type leased
type reserved
type Point
type LineString
type Polygon
feature_type null
feature_type network_point
feature_type chief_office
feature_type junction
feature_type service_location
feature_type network_line
feature_type nonnetwork_line
feature_type nonnetwork_point
feature_type nonnetwork_polygon
feature_type fiber_cable
feature_type duct
feature_type micro_duct
feature_type micro_duct_bundle
feature_type slack_loop
feature_type equipment_muxer
feature_type equipment_splitter
feature_type equipment_nxn
feature_type equipment_splice_closure
feature_type hardware
feature_type pole
feature_table network_points
feature_table nonnetwork_points
feature_table network_lines
feature_table nonnetwork_lines
feature_table nonnetwork_polygons
type fiber_end
fiber_side start
fiber_side end
type equipment_port
side a
side b

Merge Features

Code samples

# You can also use wget
curl -X POST /v2/features/merge/{vetro_ids} \
  -H 'Accept: application/json'

POST /v2/features/merge/{vetro_ids} HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/features/merge/{vetro_ids}',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /features/merge/{vetro_ids}

Merge features. Features must have geometry type as LineString or Polygon. Features must have same geometry type, layer id and plan id.

Parameters

Name In Type Required Description
vetro_ids path array[string] true Vetro ids (uuids)

Example responses

200 Response

{
  "success": true,
  "result": [
    {
      "type": "Feature",
      "geometry": "string",
      "x-vetro": {
        "id": 42,
        "layer_id": 14,
        "vetro_id": "1679f385-9d6e-417f-8e04-fd27b62f3fcd",
        "plan_id": 19,
        "has_custom_length": true,
        "parent_vetro_id": "df976393-ffb0-4c8c-a377-13b3f1d52728",
        "child_vetro_ids": [
          "497f6eca-6276-4993-bfeb-53cbbbba6f08"
        ],
        "feature_type": null,
        "feature_table": "network_points",
        "material_template_id": 0,
        "labor_template_id": 0,
        "hardware_template_id": 0,
        "has_parent": true
      },
      "properties": {}
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The new feature Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none Success status of the request
» result [object] false none List of vetro features
»» type string true none Type of feature
»» geometry any true none Geometry of feature according to the geojson spec. This must be null if "properties.parent_vetro_id" is not null.

oneOf

Name Type Required Restrictions Description
»»» anonymous string¦null false none No geometry type

xor

Name Type Required Restrictions Description
»»» anonymous object false none GeoJSON point geometry
»»»» type string true none Point type
»»»» coordinates [number] true none Coordinates of the point (lat, lng)

xor

Name Type Required Restrictions Description
»»» anonymous object false none GeoJSON linestring geometry
»»»» type string true none LineString type
»»»» coordinates [array] true none Coordinates of the line string

xor

Name Type Required Restrictions Description
»»» anonymous object false none GeoJSON polygon geometry
»»»» type string true none Polygon type
»»»» coordinates [array] true none List of polygon coordinate points

continued

Name Type Required Restrictions Description
»» x-vetro object true none vetro specific properties (e.g., layer_id, vetro_id)
»»» id integer true none ID of the feature
»»» layer_id integer true none Layer id of the feature
»»» vetro_id string(uuid) true none Vetro id of the feature
»»» plan_id integer true none Plan the feature belongs to
»»» has_custom_length boolean false none Feature has a custom length that is not determined from the geometry coordinates
»»» parent_vetro_id string(uuid)¦null true none Vetro id of parent if it exists, null otherwise. This must be null if geometry is not null.
»»» child_vetro_ids [string] true none Vetro ids of child features (e.g., equipment)
»»» feature_type string¦null true none The categorization of a feature within vetro
»»» feature_table string false none none
»»» material_template_id integer¦null true none ID of material template applied to the feature
»»» labor_template_id integer¦null true none ID of labor template applied to the feature
»»» hardware_template_id integer¦null true none ID of hardware template applied to the feature
»»» has_parent boolean true none none
»» properties object true none Feature attributes

Enumerated Values

Property Value
type Point
type LineString
type Polygon
feature_type null
feature_type network_point
feature_type chief_office
feature_type junction
feature_type service_location
feature_type network_line
feature_type nonnetwork_line
feature_type nonnetwork_point
feature_type nonnetwork_polygon
feature_type fiber_cable
feature_type duct
feature_type micro_duct
feature_type micro_duct_bundle
feature_type slack_loop
feature_type equipment_muxer
feature_type equipment_splitter
feature_type equipment_nxn
feature_type equipment_splice_closure
feature_type hardware
feature_type pole
feature_table network_points
feature_table nonnetwork_points
feature_table network_lines
feature_table nonnetwork_lines
feature_table nonnetwork_polygons

Transfer Layer Features

Code samples

# You can also use wget
curl -X POST /v2/features/transfer_layers/{source_layer_id}/{target_layer_id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST /v2/features/transfer_layers/{source_layer_id}/{target_layer_id} HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('/v2/features/transfer_layers/{source_layer_id}/{target_layer_id}',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /features/transfer_layers/{source_layer_id}/{target_layer_id}

Transfers all features from one layer to another.

Transfer every feature from a source layer into a target layer. To assist the transfer, an attribute map must be provided.

Body parameter

{}

Parameters

Name In Type Required Description
source_layer_id path integer true The id of the layer to transfer from
target_layer_id path integer true The id of the layer to transfer to
body body object true Maps target layer attributes (the map keys) with source layer attributes (the map values)

Example responses

200 Response

{
  "success": true,
  "result": {}
}

Responses

Status Meaning Description Schema
200 OK This endpoint will always return with 200. If the user is an application user, the transfer process will be monitered via websockets Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none Success status of the request
» result object false none none

Get Feature Attributes By Layer

Code samples

# You can also use wget
curl -X GET /v2/features/attributes/{layer_id}/{attribute} \
  -H 'Accept: application/json'

GET /v2/features/attributes/{layer_id}/{attribute} HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/features/attributes/{layer_id}/{attribute}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /features/attributes/{layer_id}/{attribute}

This returns the vetro id and a single attribute of every feature in the specified layer.

Parameters

Name In Type Required Description
layer_id path integer true layer id
attribute path string true An attribute in the specified layer

Example responses

200 Response

{
  "success": true,
  "result": {}
}

Responses

Status Meaning Description Schema
200 OK The attribute and vetro id of the features in the provided layer. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none Success status of the request
» result object false none none

Feature Attribute Unique Values

Code samples

# You can also use wget
curl -X GET /v2/features/attributes/{layer_id}/{attribute}/unique \
  -H 'Accept: application/json'

GET /v2/features/attributes/{layer_id}/{attribute}/unique HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/features/attributes/{layer_id}/{attribute}/unique',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /features/attributes/{layer_id}/{attribute}/unique

This endpoint returns the unique value of a specified attribute on the features in a specified layer. It is limited to 1000 values.

Parameters

Name In Type Required Description
layer_id path integer true layer id
attribute path string true An attribute in the specified layer

Example responses

200 Response

{
  "success": true,
  "result": [
    "string"
  ]
}

Responses

Status Meaning Description Schema
200 OK Up to 1000 unique values of the attribute on the specified layer. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none Success status of the request
» result [oneOf] false none none

oneOf

Name Type Required Restrictions Description
»» anonymous string¦null false none none

xor

Name Type Required Restrictions Description
»» anonymous number false none none

Update Feature Attribute

Code samples

# You can also use wget
curl -X PATCH /v2/features/attributes/{layer_id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

PATCH /v2/features/attributes/{layer_id} HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
  "filter": "string",
  "included_vetro_ids": [
    "497f6eca-6276-4993-bfeb-53cbbbba6f08"
  ],
  "excluded_vetro_ids": [
    "497f6eca-6276-4993-bfeb-53cbbbba6f08"
  ],
  "active_plan_ids": [
    0
  ],
  "attribute_label": "string",
  "attribute_value": null
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('/v2/features/attributes/{layer_id}',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PATCH /features/attributes/{layer_id}

Given a layer and optional constraints, update feature

Body parameter

{
  "filter": "string",
  "included_vetro_ids": [
    "497f6eca-6276-4993-bfeb-53cbbbba6f08"
  ],
  "excluded_vetro_ids": [
    "497f6eca-6276-4993-bfeb-53cbbbba6f08"
  ],
  "active_plan_ids": [
    0
  ],
  "attribute_label": "string",
  "attribute_value": null
}

Parameters

Name In Type Required Description
layer_id path integer true layer id
body body object true none
» filter body string¦null false a query to apply to filtration.
» included_vetro_ids body [string]¦null false ids of features to include. Note that if this is defined, no other features will be included in the export.
» excluded_vetro_ids body [string]¦null false ids of features to exclude
» active_plan_ids body [integer]¦null false ids of plans to include
» attribute_label body string false name of the attribute to update
» attribute_value body any false value of the attribute to update

Example responses

200 Response

{}

Responses

Status Meaning Description Schema
200 OK successfully initiated update. Progress is relayed via sockets. Inline

Response Schema

Count of features

Code samples

# You can also use wget
curl -X GET /v2/features/count/plan/{plan_id} \
  -H 'Accept: application/json'

GET /v2/features/count/plan/{plan_id} HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/features/count/plan/{plan_id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /features/count/plan/{plan_id}

This returns the total count of features in the specified plan that match the specified parameters.

Parameters

Name In Type Required Description
layer_ids query array[integer] false ids of layers to include in the response
plan_id path integer true Integer corresponding to a vetro plan
filter query string false The query filter specifies the characteristics of the features returned by this endpoint. Properties available for query are "material", "layer", "plan", and feature attributes, e.g., "Fiber Capacity". For more information about formatting a query, please see the help documentation inside that VETRO FiberMap application.

Detailed descriptions

filter: The query filter specifies the characteristics of the features returned by this endpoint. Properties available for query are "material", "layer", "plan", and feature attributes, e.g., "Fiber Capacity". For more information about formatting a query, please see the help documentation inside that VETRO FiberMap application.

Example responses

200 Response

{
  "success": true,
  "result": 0
}

Responses

Status Meaning Description Schema
200 OK The total count of the features in the provided plan matching the specified parameters. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result integer false none none

Count Of Features

Code samples

# You can also use wget
curl -X GET /v2/features/count/layer/{layer_id} \
  -H 'Accept: application/json'

GET /v2/features/count/layer/{layer_id} HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/features/count/layer/{layer_id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /features/count/layer/{layer_id}

This returns the total count of features in the specified layer that match the specified parameters.

Parameters

Name In Type Required Description
layer_id path integer true layer id
plan_ids query array[integer] false limits the request to features in specified plans
filter query string false The query filter specifies the characteristics of the features returned by this endpoint. Properties available for query are "material", "layer", "plan", and feature attributes, e.g., "Fiber Capacity". For more information about formatting a query, please see the help documentation inside that VETRO FiberMap application.

Detailed descriptions

filter: The query filter specifies the characteristics of the features returned by this endpoint. Properties available for query are "material", "layer", "plan", and feature attributes, e.g., "Fiber Capacity". For more information about formatting a query, please see the help documentation inside that VETRO FiberMap application.

Example responses

200 Response

{
  "success": true,
  "result": 0
}

Responses

Status Meaning Description Schema
200 OK The total count of all features in the provided layer. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none Success status of the request
» result integer false none none

Update Parent Line Geometry

Code samples

# You can also use wget
curl -X PATCH /v2/features/update_parent_line_geometry/{vetro_id}/{new_coordinates} \
  -H 'Accept: application/json'

PATCH /v2/features/update_parent_line_geometry/{vetro_id}/{new_coordinates} HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/features/update_parent_line_geometry/{vetro_id}/{new_coordinates}',
{
  method: 'PATCH',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PATCH /features/update_parent_line_geometry/{vetro_id}/{new_coordinates}

This alters the geometry of a feature's parent line.

This endpoint receives a child feature id. If that child has a parent that is a LineString, this endpoint will alter the geometry of the parent so that in goes over the geometry of the child.

Parameters

Name In Type Required Description
vetro_id path string(uuid) true Vetro id (uuid)
new_coordinates path array[number] true geometric coordinates

Example responses

200 Response

{
  "success": true,
  "result": {
    "type": "Feature",
    "geometry": "string",
    "x-vetro": {
      "id": 42,
      "layer_id": 14,
      "vetro_id": "1679f385-9d6e-417f-8e04-fd27b62f3fcd",
      "plan_id": 19,
      "has_custom_length": true,
      "parent_vetro_id": "df976393-ffb0-4c8c-a377-13b3f1d52728",
      "child_vetro_ids": [
        "497f6eca-6276-4993-bfeb-53cbbbba6f08"
      ],
      "feature_type": null,
      "feature_table": "network_points",
      "material_template_id": 0,
      "labor_template_id": 0,
      "hardware_template_id": 0,
      "has_parent": true
    },
    "properties": {}
  }
}

Responses

Status Meaning Description Schema
200 OK FeatureCollection containing the updated parent line Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none Success status of the request
» result object false none none
»» type string true none Type of feature
»» geometry any true none Geometry of feature according to the geojson spec. This must be null if "properties.parent_vetro_id" is not null.

oneOf

Name Type Required Restrictions Description
»»» anonymous string¦null false none No geometry type

xor

Name Type Required Restrictions Description
»»» anonymous object false none GeoJSON point geometry
»»»» type string true none Point type
»»»» coordinates [number] true none Coordinates of the point (lat, lng)

xor

Name Type Required Restrictions Description
»»» anonymous object false none GeoJSON linestring geometry
»»»» type string true none LineString type
»»»» coordinates [array] true none Coordinates of the line string

xor

Name Type Required Restrictions Description
»»» anonymous object false none GeoJSON polygon geometry
»»»» type string true none Polygon type
»»»» coordinates [array] true none List of polygon coordinate points

continued

Name Type Required Restrictions Description
»» x-vetro object true none vetro specific properties (e.g., layer_id, vetro_id)
»»» id integer true none ID of the feature
»»» layer_id integer true none Layer id of the feature
»»» vetro_id string(uuid) true none Vetro id of the feature
»»» plan_id integer true none Plan the feature belongs to
»»» has_custom_length boolean false none Feature has a custom length that is not determined from the geometry coordinates
»»» parent_vetro_id string(uuid)¦null true none Vetro id of parent if it exists, null otherwise. This must be null if geometry is not null.
»»» child_vetro_ids [string] true none Vetro ids of child features (e.g., equipment)
»»» feature_type string¦null true none The categorization of a feature within vetro
»»» feature_table string false none none
»»» material_template_id integer¦null true none ID of material template applied to the feature
»»» labor_template_id integer¦null true none ID of labor template applied to the feature
»»» hardware_template_id integer¦null true none ID of hardware template applied to the feature
»»» has_parent boolean true none none
»» properties object true none Feature attributes

Enumerated Values

Property Value
type Point
type LineString
type Polygon
feature_type null
feature_type network_point
feature_type chief_office
feature_type junction
feature_type service_location
feature_type network_line
feature_type nonnetwork_line
feature_type nonnetwork_point
feature_type nonnetwork_polygon
feature_type fiber_cable
feature_type duct
feature_type micro_duct
feature_type micro_duct_bundle
feature_type slack_loop
feature_type equipment_muxer
feature_type equipment_splitter
feature_type equipment_nxn
feature_type equipment_splice_closure
feature_type hardware
feature_type pole
feature_table network_points
feature_table nonnetwork_points
feature_table network_lines
feature_table nonnetwork_lines
feature_table nonnetwork_polygons

Get Computed Length

Code samples

# You can also use wget
curl -X GET /v2/features/length/{vetro_id} \
  -H 'Accept: application/json'

GET /v2/features/length/{vetro_id} HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/features/length/{vetro_id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /features/length/{vetro_id}

Returns the computed length of a line geometry regardless of whether the feature has a custom total length attribute.

Parameters

Name In Type Required Description
vetro_id path string(uuid) true Vetro id (uuid)

Example responses

200 Response

{
  "success": true,
  "result": 0
}

Responses

Status Meaning Description Schema
200 OK The computed length Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none Success status of the request
» result number false none none

Move Features

Code samples

# You can also use wget
curl -X PATCH /v2/features/move \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

PATCH /v2/features/move HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
  "target_plan_id": 185,
  "source_plan_id": 3,
  "vetro_ids": [
    "497f6eca-6276-4993-bfeb-53cbbbba6f08"
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('/v2/features/move',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PATCH /features/move

Moves selected features from their current plan into a target plan.

Body parameter

{
  "target_plan_id": 185,
  "source_plan_id": 3,
  "vetro_ids": [
    "497f6eca-6276-4993-bfeb-53cbbbba6f08"
  ]
}

Parameters

Name In Type Required Description
body body object true none
» target_plan_id body integer true none
» source_plan_id body integer true none
» vetro_ids body [string] true Array of vetro ids

Example responses

200 Response

{
  "success": true,
  "result": true
}

Responses

Status Meaning Description Schema
200 OK A boolean indicating the success of the feature move. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none Success status of the request
» result boolean false none none

Copy Features

Code samples

# You can also use wget
curl -X PATCH /v2/features/copy \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

PATCH /v2/features/copy HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
  "target_plan_id": 185,
  "source_plan_id": 3,
  "vetro_ids": [
    "497f6eca-6276-4993-bfeb-53cbbbba6f08"
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('/v2/features/copy',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PATCH /features/copy

Copies selected features from their current plan into a target plan.

Body parameter

{
  "target_plan_id": 185,
  "source_plan_id": 3,
  "vetro_ids": [
    "497f6eca-6276-4993-bfeb-53cbbbba6f08"
  ]
}

Parameters

Name In Type Required Description
body body object true none
» target_plan_id body integer true none
» source_plan_id body integer true none
» vetro_ids body [string] true Array of vetro ids

Example responses

200 Response

{
  "success": true,
  "result": [
    "497f6eca-6276-4993-bfeb-53cbbbba6f08"
  ]
}

Responses

Status Meaning Description Schema
200 OK The vetro ids of the newly created features. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none Success status of the request
» result [string] false none Array of vetro ids

Hardware APIs

Get Hardware

Code samples

# You can also use wget
curl -X GET /v2/hardware \
  -H 'Accept: application/json'

GET /v2/hardware HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/hardware',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /hardware

Get Hardware Templates

Example responses

200 Response

{
  "success": true,
  "result": [
    {
      "id": 42,
      "label": "Flex-Span ADSS fiber optic cable",
      "description": "Used for underground cables only",
      "link": "https://fiberparts.biz",
      "unit_cost": 0.42,
      "unit_cost_metric": "each",
      "layer_id": 14,
      "manufacturer_id": "id corresponding to the manufacturer record",
      "vendor_id": "id corresponding to the vendor record",
      "part_number": "ABGT-350",
      "created_time": "2019-08-24T14:15:22Z",
      "updated_time": "2019-08-24T14:15:22Z"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK All hardware Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result [object] false none none
»» id integer true none The primary key of the record
»» label string true none none
»» description string¦null true none none
»» link string¦null true none none
»» unit_cost number true none none
»» unit_cost_metric string true none none
»» layer_id integer true none Integer corresponding to a vetro layer
»» manufacturer_id integer¦null true none none
»» vendor_id integer¦null true none none
»» part_number string¦null true none none
»» created_time string(date-time) true none none
»» updated_time string(date-time)¦null true none none

Enumerated Values

Property Value
unit_cost_metric each
unit_cost_metric foot
unit_cost_metric meter
unit_cost_metric kilometer
unit_cost_metric mile

Create Hardware Templates

Code samples

# You can also use wget
curl -X POST /v2/hardware/templates \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST /v2/hardware/templates HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
  "hardware_templates": [
    {
      "label": "Flex-Span ADSS fiber optic cable",
      "description": "Used for underground cables only",
      "link": "https://fiberparts.biz",
      "part_number": "ABGT-350",
      "unit_cost": 0.42,
      "unit_cost_metric": "each",
      "layer_id": 14,
      "manufacturer_id": "id corresponding to the manufacturer record",
      "vendor_id": "id corresponding to the vendor record"
    }
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('/v2/hardware/templates',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /hardware/templates

Create Hardware Templates

Body parameter

{
  "hardware_templates": [
    {
      "label": "Flex-Span ADSS fiber optic cable",
      "description": "Used for underground cables only",
      "link": "https://fiberparts.biz",
      "part_number": "ABGT-350",
      "unit_cost": 0.42,
      "unit_cost_metric": "each",
      "layer_id": 14,
      "manufacturer_id": "id corresponding to the manufacturer record",
      "vendor_id": "id corresponding to the vendor record"
    }
  ]
}

Parameters

Name In Type Required Description
body body object false An array of objects specifying hardware template properties
» hardware_templates body [object] false none
»» label body string true none
»» description body string¦null false none
»» link body string¦null false none
»» part_number body string¦null false none
»» unit_cost body number true none
»» unit_cost_metric body string true none
»» layer_id body integer true Integer corresponding to a vetro layer
»» manufacturer_id body integer¦null false none
»» vendor_id body integer¦null false none

Enumerated Values

Parameter Value
»» unit_cost_metric each
»» unit_cost_metric foot
»» unit_cost_metric meter
»» unit_cost_metric kilometer
»» unit_cost_metric mile

Example responses

201 Response

{
  "success": true,
  "result": [
    {
      "id": 42,
      "label": "Flex-Span ADSS fiber optic cable",
      "description": "Used for underground cables only",
      "link": "https://fiberparts.biz",
      "unit_cost": 0.42,
      "unit_cost_metric": "each",
      "layer_id": 14,
      "manufacturer_id": "id corresponding to the manufacturer record",
      "vendor_id": "id corresponding to the vendor record",
      "part_number": "ABGT-350",
      "created_time": "2019-08-24T14:15:22Z",
      "updated_time": "2019-08-24T14:15:22Z"
    }
  ]
}

Responses

Status Meaning Description Schema
201 Created Created hardware templates Inline

Response Schema

Status Code 201

Name Type Required Restrictions Description
» success boolean false none none
» result [object] false none none
»» id integer true none The primary key of the record
»» label string true none none
»» description string¦null true none none
»» link string¦null true none none
»» unit_cost number true none none
»» unit_cost_metric string true none none
»» layer_id integer true none Integer corresponding to a vetro layer
»» manufacturer_id integer¦null true none none
»» vendor_id integer¦null true none none
»» part_number string¦null true none none
»» created_time string(date-time) true none none
»» updated_time string(date-time)¦null true none none

Enumerated Values

Property Value
unit_cost_metric each
unit_cost_metric foot
unit_cost_metric meter
unit_cost_metric kilometer
unit_cost_metric mile

Update Hardware Templates

Code samples

# You can also use wget
curl -X PATCH /v2/hardware/templates \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

PATCH /v2/hardware/templates HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
  "hardware_templates": [
    {
      "id": 42,
      "label": "Flex-Span ADSS fiber optic cable",
      "description": "Used for underground cables only",
      "link": "https://fiberparts.biz",
      "part_number": "ABGT-350",
      "unit_cost": 0.42,
      "unit_cost_metric": "each",
      "layer_id": 14,
      "manufacturer_id": "id corresponding to the manufacturer record",
      "vendor_id": "id corresponding to the vendor record"
    }
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('/v2/hardware/templates',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PATCH /hardware/templates

Update Hardware Templates

Body parameter

{
  "hardware_templates": [
    {
      "id": 42,
      "label": "Flex-Span ADSS fiber optic cable",
      "description": "Used for underground cables only",
      "link": "https://fiberparts.biz",
      "part_number": "ABGT-350",
      "unit_cost": 0.42,
      "unit_cost_metric": "each",
      "layer_id": 14,
      "manufacturer_id": "id corresponding to the manufacturer record",
      "vendor_id": "id corresponding to the vendor record"
    }
  ]
}

Parameters

Name In Type Required Description
body body object false An array of objects specifying updated hardware template properties
» hardware_templates body [object] false none
»» id body integer true The primary key of the record
»» label body string false none
»» description body string¦null false none
»» link body string¦null false none
»» part_number body string¦null false none
»» unit_cost body number false none
»» unit_cost_metric body string false none
»» layer_id body integer false Integer corresponding to a vetro layer
»» manufacturer_id body integer¦null false none
»» vendor_id body integer¦null false none

Enumerated Values

Parameter Value
»» unit_cost_metric each
»» unit_cost_metric foot
»» unit_cost_metric meter
»» unit_cost_metric kilometer
»» unit_cost_metric mile

Example responses

200 Response

{
  "success": true,
  "result": [
    {
      "id": 42,
      "label": "Flex-Span ADSS fiber optic cable",
      "description": "Used for underground cables only",
      "link": "https://fiberparts.biz",
      "unit_cost": 0.42,
      "unit_cost_metric": "each",
      "layer_id": 14,
      "manufacturer_id": "id corresponding to the manufacturer record",
      "vendor_id": "id corresponding to the vendor record",
      "part_number": "ABGT-350",
      "created_time": "2019-08-24T14:15:22Z",
      "updated_time": "2019-08-24T14:15:22Z"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Updated hardware templates Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result [object] false none none
»» id integer true none The primary key of the record
»» label string true none none
»» description string¦null true none none
»» link string¦null true none none
»» unit_cost number true none none
»» unit_cost_metric string true none none
»» layer_id integer true none Integer corresponding to a vetro layer
»» manufacturer_id integer¦null true none none
»» vendor_id integer¦null true none none
»» part_number string¦null true none none
»» created_time string(date-time) true none none
»» updated_time string(date-time)¦null true none none

Enumerated Values

Property Value
unit_cost_metric each
unit_cost_metric foot
unit_cost_metric meter
unit_cost_metric kilometer
unit_cost_metric mile

Delete Hardware Templates

Code samples

# You can also use wget
curl -X DELETE /v2/hardware/templates/{hardware_template_ids} \
  -H 'Accept: application/json'

DELETE /v2/hardware/templates/{hardware_template_ids} HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/hardware/templates/{hardware_template_ids}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

DELETE /hardware/templates/{hardware_template_ids}

Delete Hardware Templates

Parameters

Name In Type Required Description
hardware_template_ids path array[integer] true Hardware template ids

Example responses

200 Response

{
  "success": true,
  "result": [
    42
  ]
}

Responses

Status Meaning Description Schema
200 OK The ids of the deleted hardware templates. If templates w/ provided id(s) do not exist (e.g., were already deleted), those ids will not be included here. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result [integer] false none none

Delete Hardware Types

Code samples

# You can also use wget
curl -X DELETE /v2/hardware/types/{hardware_type_ids} \
  -H 'Accept: application/json'

DELETE /v2/hardware/types/{hardware_type_ids} HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/hardware/types/{hardware_type_ids}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

DELETE /hardware/types/{hardware_type_ids}

Delete Hardware Types

Parameters

Name In Type Required Description
hardware_type_ids path array[integer] true Hardware type ids

Example responses

200 Response

{
  "success": true,
  "result": [
    42
  ]
}

Responses

Status Meaning Description Schema
200 OK The ids of the deleted hardware types. If types w/ provided id(s) do not exist (e.g., were already deleted), those ids will not be included here. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result [integer] false none none

Get Feature Hardware

Code samples

# You can also use wget
curl -X GET /v2/hardware/{vetro_id} \
  -H 'Accept: application/json'

GET /v2/hardware/{vetro_id} HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/hardware/{vetro_id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /hardware/{vetro_id}

Get hardware for feature

Parameters

Name In Type Required Description
vetro_id path string(uuid) true Vetro id (uuid)

Example responses

200 Response

{
  "success": true,
  "result": [
    {
      "id": 42,
      "label": "Flex-Span ADSS fiber optic cable",
      "description": "Used for underground cables only",
      "link": "https://fiberparts.biz",
      "part_number": "ABGT-350",
      "unit_cost": 0.42,
      "unit_cost_metric": "each",
      "layer_id": 14,
      "manufacturer": "AFL",
      "vendor": "Power and Telephone",
      "quantity": 5,
      "hardware_template_id": 2,
      "vetro_id": "1679f385-9d6e-417f-8e04-fd27b62f3fcd"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK A record of the feature's hardware, if any Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result [object]¦null false none none
»» id integer¦null true none The primary key of the record
»» label string¦null true none none
»» description string¦null true none none
»» link string¦null true none none
»» part_number string¦null true none none
»» unit_cost number¦null true none none
»» unit_cost_metric string¦null true none none
»» layer_id integer¦null true none Integer corresponding to a vetro layer
»» manufacturer string¦null true none none
»» vendor string¦null true none none
»» quantity number true none none
»» hardware_template_id number true none none
»» vetro_id string(uuid) true none none

Enumerated Values

Property Value
unit_cost_metric each
unit_cost_metric foot
unit_cost_metric meter
unit_cost_metric kilometer
unit_cost_metric mile
unit_cost_metric null

Import APIs

Get URL for upload

Code samples

# You can also use wget
curl -X GET /v2/import/signed_url?folder_name=string \
  -H 'Accept: application/json'

GET /v2/import/signed_url?folder_name=string HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/import/signed_url?folder_name=string',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /import/signed_url

Gets a signed 'put' url for uploading import data.

Parameters

Name In Type Required Description
folder_name query string true S3 key that will be used to store upload.

Example responses

200 Response

{
  "success": true,
  "result": "https://vetro-user-imports.s3.amazonaws.com/filname.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIDYRCNT2CSBD4URA%2F20200428%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20200428T160944Z&X-Amz-Expires=900&X-Amz-Signature=062f568e0c4af3f152312f9c671df4835962978de70c00108ddbbe5473f87306&X-Amz-SignedHeaders=host"
}

Responses

Status Meaning Description Schema
200 OK array of new layer names and worker ids to be used to get the status of the import. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result string false none none

Import

Code samples

# You can also use wget
curl -X POST /v2/import \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST /v2/import HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
  "folder_name": "john-does-features.zip",
  "plan_id": 42
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('/v2/import',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /import

Ingests data from s3 into the vetro database.

Body parameter

{
  "folder_name": "john-does-features.zip",
  "plan_id": 42
}

Parameters

Name In Type Required Description
body body object false The folder name to access the file and and the plan id to load the features into.
» folder_name body string false none
» plan_id body integer false none

Example responses

200 Response

{
  "success": true,
  "result": {}
}

Responses

Status Meaning Description Schema
200 OK The status of the import will be communicated to the application via websocket. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result object false none none

Labor APIs

Delete Labor Templates

Code samples

# You can also use wget
curl -X DELETE /v2/labor/templates/{labor_template_ids} \
  -H 'Accept: application/json'

DELETE /v2/labor/templates/{labor_template_ids} HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/labor/templates/{labor_template_ids}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

DELETE /labor/templates/{labor_template_ids}

Delete Labor Templates

Parameters

Name In Type Required Description
labor_template_ids path array[integer] true Labor template ids

Example responses

200 Response

{
  "success": true,
  "result": [
    42
  ]
}

Responses

Status Meaning Description Schema
200 OK The ids of the deleted labor templates. If templates w/ provided id(s) do not exist (e.g., were already deleted), those ids will not be included here. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result [integer] false none none

Delete Labor Collections

Code samples

# You can also use wget
curl -X DELETE /v2/labor/collections/{labor_collection_ids} \
  -H 'Accept: application/json'

DELETE /v2/labor/collections/{labor_collection_ids} HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/labor/collections/{labor_collection_ids}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

DELETE /labor/collections/{labor_collection_ids}

Delete Labor Collections

Parameters

Name In Type Required Description
labor_collection_ids path array[integer] true Labor collection ids

Example responses

200 Response

{
  "success": true,
  "result": [
    42
  ]
}

Responses

Status Meaning Description Schema
200 OK The ids of the deleted labor collections. If collections w/ provided id(s) do not exist (e.g., were already deleted), those ids will not be included here. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result [integer] false none none

Get Labor

Code samples

# You can also use wget
curl -X GET /v2/labor \
  -H 'Accept: application/json'

GET /v2/labor HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/labor',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /labor

Get Labor Templates

Example responses

200 Response

{
  "success": true,
  "result": {
    "labor_collections": [
      {
        "id": 42,
        "label": "2019 Materials",
        "description": "Used for underground cables only",
        "plan_ids": [
          0
        ],
        "project_ids": [
          0
        ],
        "default_template_ids": [
          0
        ],
        "template_ids": [
          0
        ],
        "created_time": "2019-08-24T14:15:22Z",
        "updated_time": "2019-08-24T14:15:22Z",
        "is_default": true
      }
    ],
    "labor_templates": [
      {
        "id": 42,
        "label": "Flex-Span ADSS fiber optic cable",
        "description": "Used for underground cables only",
        "unit_cost": 0.42,
        "unit_cost_metric": "each",
        "layer_id": 14,
        "default_collection_ids": [
          0
        ],
        "collection_ids": [
          0
        ],
        "feature_count": 0,
        "plan_ids": [
          0
        ],
        "project_ids": [
          0
        ],
        "created_time": "2019-08-24T14:15:22Z",
        "updated_time": "2019-08-24T14:15:22Z"
      }
    ]
  }
}

Responses

Status Meaning Description Schema
200 OK All labor Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result object false none none
»» labor_collections [object] true none none
»»» id integer true none The primary key of the record
»»» label string true none none
»»» description string¦null true none none
»»» plan_ids [integer] true none The ids of the plans that use this collection
»»» project_ids [integer] true none The ids of the projects in which a plan uses this collection
»»» default_template_ids [integer] true none The templates that are the defualt for this collection
»»» template_ids [integer] true none The templates that belong to this collection, but are not the default
»»» created_time string(date-time) true none none
»»» updated_time string(date-time)¦null true none none
»»» is_default boolean true none none
»» labor_templates [object] true none none
»»» id integer true none The primary key of the record
»»» label string true none none
»»» description string¦null true none none
»»» unit_cost number true none none
»»» unit_cost_metric string true none none
»»» layer_id integer true none Integer corresponding to a vetro layer
»»» default_collection_ids [integer] true none The collections for which this template is the default
»»» collection_ids [integer] true none The collections for which this template belongs to, but is not the default
»»» feature_count integer true none The number of features this template is applied to
»»» plan_ids [integer] true none The ids of the plans in which this template is present
»»» project_ids [integer] true none The ids of the projects in which this template is present
»»» created_time string(date-time) true none none
»»» updated_time string(date-time)¦null true none none

Enumerated Values

Property Value
unit_cost_metric each
unit_cost_metric foot
unit_cost_metric meter
unit_cost_metric kilometer
unit_cost_metric mile

Create Labor Templates

Code samples

# You can also use wget
curl -X POST /v2/labor/templates \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST /v2/labor/templates HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
  "labor_templates": [
    {
      "label": "Flex-Span ADSS fiber optic cable",
      "description": "Used for underground cables only",
      "unit_cost": 0.42,
      "unit_cost_metric": "each",
      "layer_id": 14,
      "collection_ids": [
        0
      ]
    }
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('/v2/labor/templates',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /labor/templates

Create Labor Templates

Body parameter

{
  "labor_templates": [
    {
      "label": "Flex-Span ADSS fiber optic cable",
      "description": "Used for underground cables only",
      "unit_cost": 0.42,
      "unit_cost_metric": "each",
      "layer_id": 14,
      "collection_ids": [
        0
      ]
    }
  ]
}

Parameters

Name In Type Required Description
body body object true An array of objects specifying labor template properties
» labor_templates body [object] true none
»» label body string true none
»» description body string¦null false none
»» unit_cost body number true none
»» unit_cost_metric body string true none
»» layer_id body integer true Integer corresponding to a vetro layer
»» collection_ids body [integer] true The collections for which this template belongs to, but is not the default

Enumerated Values

Parameter Value
»» unit_cost_metric each
»» unit_cost_metric foot
»» unit_cost_metric meter
»» unit_cost_metric kilometer
»» unit_cost_metric mile

Example responses

201 Response

{
  "success": true,
  "result": [
    {
      "id": 42,
      "label": "Flex-Span ADSS fiber optic cable",
      "description": "Used for underground cables only",
      "unit_cost": 0.42,
      "unit_cost_metric": "each",
      "layer_id": 14,
      "default_collection_ids": [
        0
      ],
      "collection_ids": [
        0
      ],
      "feature_count": 0,
      "plan_ids": [
        0
      ],
      "project_ids": [
        0
      ],
      "created_time": "2019-08-24T14:15:22Z",
      "updated_time": "2019-08-24T14:15:22Z"
    }
  ]
}

Responses

Status Meaning Description Schema
201 Created Created labor templates Inline

Response Schema

Status Code 201

Name Type Required Restrictions Description
» success boolean false none none
» result [object] false none none
»» id integer true none The primary key of the record
»» label string true none none
»» description string¦null true none none
»» unit_cost number true none none
»» unit_cost_metric string true none none
»» layer_id integer true none Integer corresponding to a vetro layer
»» default_collection_ids [integer] true none The collections for which this template is the default
»» collection_ids [integer] true none The collections for which this template belongs to, but is not the default
»» feature_count integer true none The number of features this template is applied to
»» plan_ids [integer] true none The ids of the plans in which this template is present
»» project_ids [integer] true none The ids of the projects in which this template is present
»» created_time string(date-time) true none none
»» updated_time string(date-time)¦null true none none

Enumerated Values

Property Value
unit_cost_metric each
unit_cost_metric foot
unit_cost_metric meter
unit_cost_metric kilometer
unit_cost_metric mile

Update Labor Templates

Code samples

# You can also use wget
curl -X PATCH /v2/labor/templates \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

PATCH /v2/labor/templates HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
  "labor_templates": [
    {
      "id": 42,
      "label": "Flex-Span ADSS fiber optic cable",
      "description": "Used for underground cables only",
      "unit_cost": 0.42,
      "unit_cost_metric": "each",
      "layer_id": 14,
      "collection_ids": [
        0
      ],
      "default_collection_ids": [
        0
      ]
    }
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('/v2/labor/templates',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PATCH /labor/templates

Update Labor Templates

Body parameter

{
  "labor_templates": [
    {
      "id": 42,
      "label": "Flex-Span ADSS fiber optic cable",
      "description": "Used for underground cables only",
      "unit_cost": 0.42,
      "unit_cost_metric": "each",
      "layer_id": 14,
      "collection_ids": [
        0
      ],
      "default_collection_ids": [
        0
      ]
    }
  ]
}

Parameters

Name In Type Required Description
body body object true An array of objects specifying updated labor template properties
» labor_templates body [object] true none
»» id body integer true The primary key of the record
»» label body string false none
»» description body string¦null false none
»» unit_cost body number false none
»» unit_cost_metric body string false none
»» layer_id body integer false Integer corresponding to a vetro layer
»» collection_ids body [integer] false The collections for which this template belongs to, but is not the default
»» default_collection_ids body [integer] false The collections for which this template is the default

Enumerated Values

Parameter Value
»» unit_cost_metric each
»» unit_cost_metric foot
»» unit_cost_metric meter
»» unit_cost_metric kilometer
»» unit_cost_metric mile

Example responses

200 Response

{
  "success": true,
  "result": [
    {
      "id": 42,
      "label": "Flex-Span ADSS fiber optic cable",
      "description": "Used for underground cables only",
      "unit_cost": 0.42,
      "unit_cost_metric": "each",
      "layer_id": 14,
      "default_collection_ids": [
        0
      ],
      "collection_ids": [
        0
      ],
      "feature_count": 0,
      "plan_ids": [
        0
      ],
      "project_ids": [
        0
      ],
      "created_time": "2019-08-24T14:15:22Z",
      "updated_time": "2019-08-24T14:15:22Z"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Updated labor templates Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result [object] false none none
»» id integer true none The primary key of the record
»» label string true none none
»» description string¦null true none none
»» unit_cost number true none none
»» unit_cost_metric string true none none
»» layer_id integer true none Integer corresponding to a vetro layer
»» default_collection_ids [integer] true none The collections for which this template is the default
»» collection_ids [integer] true none The collections for which this template belongs to, but is not the default
»» feature_count integer true none The number of features this template is applied to
»» plan_ids [integer] true none The ids of the plans in which this template is present
»» project_ids [integer] true none The ids of the projects in which this template is present
»» created_time string(date-time) true none none
»» updated_time string(date-time)¦null true none none

Enumerated Values

Property Value
unit_cost_metric each
unit_cost_metric foot
unit_cost_metric meter
unit_cost_metric kilometer
unit_cost_metric mile

Create Labor Collections

Code samples

# You can also use wget
curl -X POST /v2/labor/collections \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST /v2/labor/collections HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
  "labor_collections": [
    {
      "label": "2019 Materials",
      "description": "Used for underground cables only",
      "plan_ids": [
        0
      ],
      "template_ids": [
        0
      ]
    }
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('/v2/labor/collections',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /labor/collections

Create Labor Collections

Body parameter

{
  "labor_collections": [
    {
      "label": "2019 Materials",
      "description": "Used for underground cables only",
      "plan_ids": [
        0
      ],
      "template_ids": [
        0
      ]
    }
  ]
}

Parameters

Name In Type Required Description
body body object true An array of objects specifying labor collection properties
» labor_collections body [object] true none
»» label body string true none
»» description body string¦null false none
»» plan_ids body [integer] false The ids of the plans that use this collection
»» template_ids body [integer] false The ids of templates that correspond to this collection

Example responses

201 Response

{
  "success": true,
  "result": [
    {
      "id": 42,
      "label": "2019 Materials",
      "description": "Used for underground cables only",
      "plan_ids": [
        0
      ],
      "project_ids": [
        0
      ],
      "default_template_ids": [
        0
      ],
      "template_ids": [
        0
      ],
      "created_time": "2019-08-24T14:15:22Z",
      "updated_time": "2019-08-24T14:15:22Z",
      "is_default": true
    }
  ]
}

Responses

Status Meaning Description Schema
201 Created Created labor templates Inline

Response Schema

Status Code 201

Name Type Required Restrictions Description
» success boolean false none none
» result [object] false none none
»» id integer true none The primary key of the record
»» label string true none none
»» description string¦null true none none
»» plan_ids [integer] true none The ids of the plans that use this collection
»» project_ids [integer] true none The ids of the projects in which a plan uses this collection
»» default_template_ids [integer] true none The templates that are the defualt for this collection
»» template_ids [integer] true none The templates that belong to this collection, but are not the default
»» created_time string(date-time) true none none
»» updated_time string(date-time)¦null true none none
»» is_default boolean true none none

Update Labor Collections

Code samples

# You can also use wget
curl -X PATCH /v2/labor/collections \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

PATCH /v2/labor/collections HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
  "labor_collections": [
    {
      "id": 42,
      "label": "2019 Materials",
      "description": "Used for underground cables only",
      "plan_ids": [
        0
      ],
      "template_ids": [
        0
      ],
      "template_id_map": {
        "9": 53,
        "12": 53,
        "14": 21
      }
    }
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('/v2/labor/collections',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PATCH /labor/collections

Update Labor Collections

Body parameter

{
  "labor_collections": [
    {
      "id": 42,
      "label": "2019 Materials",
      "description": "Used for underground cables only",
      "plan_ids": [
        0
      ],
      "template_ids": [
        0
      ],
      "template_id_map": {
        "9": 53,
        "12": 53,
        "14": 21
      }
    }
  ]
}

Parameters

Name In Type Required Description
body body object true A 1-length array of objects specifying updated labor collection properties
» labor_collections body [object] true none
»» id body integer true The primary key of the record
»» label body string false none
»» description body string¦null false none
»» plan_ids body [integer] false The ids of the plans that use this collection
»» template_ids body [integer] false The ids of templates that correspond to this collection
»» template_id_map body object false When updating a plan's collection, template_id_map describes how to update the _template_id of the plan's features. Take the example below, (e.g., updating a material collection). For features whose plan is being assigned to the passed collection: Features with a material_template_id of 9 or 12 will have their material_tempalte_id updated to 53. Features with a material_template_id of 14 will have their material_template_id updated to 21. All other features will retain their current material_template_id, unless it has been removed entirely from the collection.
»»» additionalProperties body integer¦null false none

Example responses

200 Response

{
  "success": true,
  "result": [
    {
      "id": 42,
      "label": "2019 Materials",
      "description": "Used for underground cables only",
      "plan_ids": [
        0
      ],
      "project_ids": [
        0
      ],
      "default_template_ids": [
        0
      ],
      "template_ids": [
        0
      ],
      "created_time": "2019-08-24T14:15:22Z",
      "updated_time": "2019-08-24T14:15:22Z",
      "is_default": true
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Updated labor collections Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result [object] false none none
»» id integer true none The primary key of the record
»» label string true none none
»» description string¦null true none none
»» plan_ids [integer] true none The ids of the plans that use this collection
»» project_ids [integer] true none The ids of the projects in which a plan uses this collection
»» default_template_ids [integer] true none The templates that are the defualt for this collection
»» template_ids [integer] true none The templates that belong to this collection, but are not the default
»» created_time string(date-time) true none none
»» updated_time string(date-time)¦null true none none
»» is_default boolean true none none

Get Feature Labor

Code samples

# You can also use wget
curl -X GET /v2/labor/{vetro_id} \
  -H 'Accept: application/json'

GET /v2/labor/{vetro_id} HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/labor/{vetro_id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /labor/{vetro_id}

Get Labor Template for Feature

Parameters

Name In Type Required Description
vetro_id path string(uuid) true Vetro id (uuid)

Example responses

200 Response

{
  "success": true,
  "result": {
    "id": 42,
    "label": "Flex-Span ADSS fiber optic cable",
    "description": "Used for underground cables only",
    "unit_cost": 0.42,
    "unit_cost_metric": "each",
    "layer_id": 14,
    "is_default": true,
    "collection": "2019 Materials"
  }
}

Responses

Status Meaning Description Schema
200 OK A record of the feature's labor, if any Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result object¦null false none none
»» id integer¦null true none The primary key of the record
»» label string¦null true none none
»» description string¦null true none none
»» unit_cost number¦null true none none
»» unit_cost_metric string¦null true none none
»» layer_id integer¦null true none Integer corresponding to a vetro layer
»» is_default boolean¦null false none Whether the template is the default for its layer within the current collection
»» collection string true none none

Enumerated Values

Property Value
unit_cost_metric each
unit_cost_metric foot
unit_cost_metric meter
unit_cost_metric kilometer
unit_cost_metric mile
unit_cost_metric null

Create Labor Defaults

Code samples

# You can also use wget
curl -X POST /v2/labor/defaults \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST /v2/labor/defaults HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
  "defaults": [
    {
      "labor_template_id": 0,
      "labor_collection_id": 0
    }
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('/v2/labor/defaults',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /labor/defaults

Create Labor Defaults

Body parameter

{
  "defaults": [
    {
      "labor_template_id": 0,
      "labor_collection_id": 0
    }
  ]
}

Parameters

Name In Type Required Description
body body object false An array of objects specifying labor defaults
» defaults body [object] true none
»» labor_template_id body integer true Labor template id
»» labor_collection_id body integer true Labor collection id

Example responses

201 Response

{
  "success": true,
  "result": {
    "created": [
      {
        "id": 42,
        "label": "Flex-Span ADSS fiber optic cable",
        "description": "Used for underground cables only",
        "unit_cost": 0.42,
        "unit_cost_metric": "each",
        "layer_id": 14,
        "default_collection_ids": [
          0
        ],
        "collection_ids": [
          0
        ],
        "feature_count": 0,
        "plan_ids": [
          0
        ],
        "project_ids": [
          0
        ],
        "created_time": "2019-08-24T14:15:22Z",
        "updated_time": "2019-08-24T14:15:22Z"
      }
    ],
    "removed": [
      {
        "id": 42,
        "label": "Flex-Span ADSS fiber optic cable",
        "description": "Used for underground cables only",
        "unit_cost": 0.42,
        "unit_cost_metric": "each",
        "layer_id": 14,
        "default_collection_ids": [
          0
        ],
        "collection_ids": [
          0
        ],
        "feature_count": 0,
        "plan_ids": [
          0
        ],
        "project_ids": [
          0
        ],
        "created_time": "2019-08-24T14:15:22Z",
        "updated_time": "2019-08-24T14:15:22Z"
      }
    ]
  }
}

Responses

Status Meaning Description Schema
201 Created The templates that were updated with new default records Inline

Response Schema

Status Code 201

Name Type Required Restrictions Description
» success boolean false none none
» result object false none none
»» created [object] false none none
»»» id integer true none The primary key of the record
»»» label string true none none
»»» description string¦null true none none
»»» unit_cost number true none none
»»» unit_cost_metric string true none none
»»» layer_id integer true none Integer corresponding to a vetro layer
»»» default_collection_ids [integer] true none The collections for which this template is the default
»»» collection_ids [integer] true none The collections for which this template belongs to, but is not the default
»»» feature_count integer true none The number of features this template is applied to
»»» plan_ids [integer] true none The ids of the plans in which this template is present
»»» project_ids [integer] true none The ids of the projects in which this template is present
»»» created_time string(date-time) true none none
»»» updated_time string(date-time)¦null true none none
»» removed [object] false none none

Enumerated Values

Property Value
unit_cost_metric each
unit_cost_metric foot
unit_cost_metric meter
unit_cost_metric kilometer
unit_cost_metric mile

Remove Labor Defaults

Code samples

# You can also use wget
curl -X DELETE /v2/labor/defaults \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

DELETE /v2/labor/defaults HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
  "remove_defaults": [
    {
      "labor_template_id": 0,
      "labor_collection_id": 0
    }
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('/v2/labor/defaults',
{
  method: 'DELETE',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

DELETE /labor/defaults

Remove Labor Defaults

Body parameter

{
  "remove_defaults": [
    {
      "labor_template_id": 0,
      "labor_collection_id": 0
    }
  ]
}

Parameters

Name In Type Required Description
body body object false An array of objects specifying default templates to make not default
» remove_defaults body [object] true none
»» labor_template_id body integer true Labor template id
»» labor_collection_id body integer true Labor collection id

Example responses

200 Response

{
  "success": true,
  "result": {
    "removed": [
      {
        "id": 42,
        "label": "Flex-Span ADSS fiber optic cable",
        "description": "Used for underground cables only",
        "unit_cost": 0.42,
        "unit_cost_metric": "each",
        "layer_id": 14,
        "default_collection_ids": [
          0
        ],
        "collection_ids": [
          0
        ],
        "feature_count": 0,
        "plan_ids": [
          0
        ],
        "project_ids": [
          0
        ],
        "created_time": "2019-08-24T14:15:22Z",
        "updated_time": "2019-08-24T14:15:22Z"
      }
    ]
  }
}

Responses

Status Meaning Description Schema
200 OK The templates that were updated with new non-default records Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result object false none none
»» removed [object] false none none
»»» id integer true none The primary key of the record
»»» label string true none none
»»» description string¦null true none none
»»» unit_cost number true none none
»»» unit_cost_metric string true none none
»»» layer_id integer true none Integer corresponding to a vetro layer
»»» default_collection_ids [integer] true none The collections for which this template is the default
»»» collection_ids [integer] true none The collections for which this template belongs to, but is not the default
»»» feature_count integer true none The number of features this template is applied to
»»» plan_ids [integer] true none The ids of the plans in which this template is present
»»» project_ids [integer] true none The ids of the projects in which this template is present
»»» created_time string(date-time) true none none
»»» updated_time string(date-time)¦null true none none

Enumerated Values

Property Value
unit_cost_metric each
unit_cost_metric foot
unit_cost_metric meter
unit_cost_metric kilometer
unit_cost_metric mile

Create Labor Default Collection

Code samples

# You can also use wget
curl -X POST /v2/labor/collection/default \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST /v2/labor/collection/default HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
  "default_collection_id": 0
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('/v2/labor/collection/default',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /labor/collection/default

Create Labor Default Collection

Body parameter

{
  "default_collection_id": 0
}

Parameters

Name In Type Required Description
body body object false A collection id to use as the default labor collection
» default_collection_id body integer true Labor collection id

Example responses

201 Response

{
  "success": true,
  "result": {
    "default_collection": {
      "id": 0,
      "label": "string",
      "description": "string",
      "is_default": true
    }
  }
}

Responses

Status Meaning Description Schema
201 Created The new default labor collection Inline

Response Schema

Status Code 201

Name Type Required Restrictions Description
» success boolean false none none
» result object false none none
»» default_collection object false none none
»»» id number false none none
»»» label string false none none
»»» description string¦null false none none
»»» is_default boolean false none none

Remove Labor Default Collection

Code samples

# You can also use wget
curl -X DELETE /v2/labor/collection/default \
  -H 'Accept: application/json'

DELETE /v2/labor/collection/default HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/labor/collection/default',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

DELETE /labor/collection/default

Remove Labor Default Collection

Example responses

200 Response

{
  "success": true,
  "result": {
    "default_collection_removed": true
  }
}

Responses

Status Meaning Description Schema
200 OK Success of removing the default material collection Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result object false none none
»» default_collection_removed boolean false none none

Layers and Metadata APIs

Get Layer List

Code samples

# You can also use wget
curl -X GET /v2/layers \
  -H 'Accept: application/json'

GET /v2/layers HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/layers',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /layers

Retrieve the listing of available layers and metadata about each.

Example responses

200 Response

{
  "success": true,
  "result": {
    "layers": [
      {
        "id": 43,
        "available_attributes": {
          "property1": {
            "default_value": null,
            "display_order": 0,
            "html_element": "textarea",
            "html_input_type": "radio",
            "is_required": true,
            "maximum": 0,
            "minimum": 0,
            "permitted_values": [
              "Low",
              "Medium",
              "High"
            ],
            "display_format": "currency",
            "is_expense_size_attribute": true
          },
          "property2": {
            "default_value": null,
            "display_order": 0,
            "html_element": "textarea",
            "html_input_type": "radio",
            "is_required": true,
            "maximum": 0,
            "minimum": 0,
            "permitted_values": [
              "Low",
              "Medium",
              "High"
            ],
            "display_format": "currency",
            "is_expense_size_attribute": true
          }
        },
        "style": {
          "layer_id": 14,
          "symbols": {
            "property1": {
              "fill_color": "string",
              "fill_opacity": 0,
              "icon_class": "vetro",
              "icon_size": 5,
              "stroke_color": "string",
              "stroke_dasharray": "string",
              "stroke_opacity": 0,
              "stroke_weight": 1,
              "display_order": 0
            },
            "property2": {
              "fill_color": "string",
              "fill_opacity": 0,
              "icon_class": "vetro",
              "icon_size": 5,
              "stroke_color": "string",
              "stroke_dasharray": "string",
              "stroke_opacity": 0,
              "stroke_weight": 1,
              "display_order": 0
            }
          },
          "categorized_attribute_label": "string",
          "labels_enabled": true,
          "labels": [
            "string"
          ],
          "style_theme_id": 42
        },
        "category_id": 42,
        "label": "string",
        "sort_order": 43,
        "enabled": true,
        "layer_type": "string",
        "mappable": true,
        "is_imported": true,
        "created_time": "2019-08-24T14:15:22Z",
        "created_by": 0,
        "last_modified_time": "string",
        "feature_type": null,
        "feature_table": "string",
        "is_exportable": true,
        "geom_type": "string",
        "is_editable": true,
        "external_url": "string",
        "external_source_type": "vector",
        "external_raster_scheme": "tms",
        "external_vector_source_id": "string",
        "raster_id": "string",
        "is_active": true
      }
    ],
    "categories": [
      {
        "id": 42,
        "label": "string",
        "sort_order": 0
      }
    ]
  }
}

Responses

Status Meaning Description Schema
200 OK array of layer metadata Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result object false none none
»» layers [object] false none none
»»» id integer true none none
»»» available_attributes object true none maps allowed attribute to their configuration (type, permitted values, etc.). Attribute labels are keys.
»»»» additionalProperties object false none none
»»»»» default_value any true none none
»»»»» display_order integer¦null true none none
»»»»» html_element string true none none
»»»»» html_input_type string true none none
»»»»» is_required boolean true none none
»»»»» maximum number¦null true none none
»»»»» minimum number¦null true none none
»»»»» permitted_values array¦null true none none
»»»»» display_format string¦null true none none
»»»»» is_expense_size_attribute boolean true none whether the attribute can be used for material defaults
»»» style object true none none
»»»» layer_id integer true none Integer corresponding to a vetro layer
»»»» symbols object true none none
»»»»» additionalProperties object false none none
»»»»»» fill_color string false none Used to color points and interior of polygons. 3 or 6 character hex value.
»»»»»» fill_opacity number false none Used to determine transparency of points and interior of polygons.
»»»»»» icon_class string false none The shape of a point icon.
»»»»»» icon_size integer false none Pixel size of point icon.
»»»»»» stroke_color string false none Used to color lines and border of polygons. Polygon will default to fill color if not provided. 3 or 6 character hex value.
»»»»»» stroke_dasharray string¦null false none The dasharray of the line
»»»»»» stroke_opacity number false none Used to determine transparency of lines and border of polygon. Polygon will default to fill opacity if not provided.
»»»»»» stroke_weight number false none The width of lines and border of polygons.
»»»»»» display_order number false none order in which item is displayed in layer list
»»»» categorized_attribute_label string¦null true none name of property the layer style is categorized by. Null if style is not categorized.
»»»» labels_enabled boolean true none Whether labels should be displayed on the map.
»»»» labels [string] true none The labels to display on the map.
»»»» style_theme_id integer true none The id of the template a style belongs to. 1 is the fallback template.
»»» category_id integer¦null true none none
»»» label string true none Name of layer
»»» sort_order integer¦null true none none
»»» enabled boolean true none none
»»» layer_type string true none none
»»» mappable boolean true none Describes whether the layer should be shown on the map. Equipment, for example, is not mappable.
»»» is_imported boolean true none none
»»» created_time string(date-time)¦null true none none
»»» created_by integer¦null true none none
»»» last_modified_time string¦null true none none
»»» feature_type string¦null true none The categorization of a feature within vetro
»»» feature_table string¦null true none none
»»» is_exportable boolean true none none
»»» geom_type string¦null true none none
»»» is_editable boolean true none none
»»» external_url string¦null true none Used for layers that use data stored outside of vetro. This url should include {z}, {x}, and {y} params.
»»» external_source_type string¦null true none none
»»» external_raster_scheme string¦null true none none
»»» external_vector_source_id string¦null false none the name of the source layer to use with an external vector tileset.
»»» raster_id string¦null true none none
»»» is_active boolean false none whether the layer should be initialized as "active" on the map
»» categories [object] false none none
»»» id integer false none none
»»» label string false none none
»»» sort_order integer¦null false none describes placement of category within layer list. Null values are hidden in the layer list

Enumerated Values

Property Value
display_format null
display_format links
display_format date
display_format currency
display_format images
display_format files
icon_class vetro
icon_class loop
icon_class office
icon_class tower-b
icon_class tower
icon_class line-dotted
icon_class line
icon_class house
icon_class house-o
icon_class star
icon_class star-o
icon_class octagon
icon_class octagon-o
icon_class hexagon
icon_class hexagon-o
icon_class hexagon-b
icon_class hexagon-o-b
icon_class pentagon
icon_class pentagon-o
icon_class diamond
icon_class diamond-o
icon_class square
icon_class square-o
icon_class triangle
icon_class triangle-o
icon_class circle
icon_class circle-o
icon_class triangle-b
icon_class triangle-c
icon_class triangle-o-b
icon_class triangle-o-c
icon_class coil
icon_class bowtie
icon_class infinity
icon_class infinity-b
feature_type null
feature_type network_point
feature_type chief_office
feature_type junction
feature_type service_location
feature_type network_line
feature_type nonnetwork_line
feature_type nonnetwork_point
feature_type nonnetwork_polygon
feature_type fiber_cable
feature_type duct
feature_type micro_duct
feature_type micro_duct_bundle
feature_type slack_loop
feature_type equipment_muxer
feature_type equipment_splitter
feature_type equipment_nxn
feature_type equipment_splice_closure
feature_type hardware
feature_type pole
external_source_type vector
external_source_type raster
external_source_type null
external_raster_scheme tms
external_raster_scheme xyz
external_raster_scheme null

Create a layer

Code samples

# You can also use wget
curl -X POST /v2/layers \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST /v2/layers HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
  "category_id": 0,
  "label": "string",
  "geom_type": "Point",
  "symbol": {
    "fill_color": "string",
    "fill_opacity": 0,
    "icon_class": "vetro",
    "icon_size": 5,
    "stroke_color": "string",
    "stroke_dasharray": "string",
    "stroke_opacity": 0,
    "stroke_weight": 1,
    "display_order": 0
  },
  "external": {
    "url": "string",
    "source_type": "vector",
    "raster_scheme": null,
    "vector_source_id": "string"
  }
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('/v2/layers',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /layers

Create an empty layer

Body parameter

{
  "category_id": 0,
  "label": "string",
  "geom_type": "Point",
  "symbol": {
    "fill_color": "string",
    "fill_opacity": 0,
    "icon_class": "vetro",
    "icon_size": 5,
    "stroke_color": "string",
    "stroke_dasharray": "string",
    "stroke_opacity": 0,
    "stroke_weight": 1,
    "display_order": 0
  },
  "external": {
    "url": "string",
    "source_type": "vector",
    "raster_scheme": null,
    "vector_source_id": "string"
  }
}

Parameters

Name In Type Required Description
body body object true none
» category_id body integer false The id of the layer category to which the layer belongs.
» label body string false The name of the layer.
» geom_type body string false The type of geometry the layer represents.
» symbol body object false none
»» fill_color body string false Used to color points and interior of polygons. 3 or 6 character hex value.
»» fill_opacity body number false Used to determine transparency of points and interior of polygons.
»» icon_class body string false The shape of a point icon.
»» icon_size body integer false Pixel size of point icon.
»» stroke_color body string false Used to color lines and border of polygons. Polygon will default to fill color if not provided. 3 or 6 character hex value.
»» stroke_dasharray body string¦null false The dasharray of the line
»» stroke_opacity body number false Used to determine transparency of lines and border of polygon. Polygon will default to fill opacity if not provided.
»» stroke_weight body number false The width of lines and border of polygons.
»» display_order body number false order in which item is displayed in layer list
» external body object¦null false Optional. If provided, will be used to display the layer on Vetro FiberMap.
»» url body string true This url will be used to fetch source data for displaying the layer on Vetro Fibermap.
»» source_type body string true The type of spatial data the external url represents.
»» raster_scheme body string¦null false The protocol for displaying the data returned by the external url. Must be not-null for raster layers.
»» vector_source_id body string¦null false The name of the layer of data within the external vector source. Must be not-null for vector layers. Multiple external vector layers can share a url, but they must have unique vector source ids.

Enumerated Values

Parameter Value
» geom_type Point
» geom_type LineString
» geom_type Polygon
»» icon_class vetro
»» icon_class loop
»» icon_class office
»» icon_class tower-b
»» icon_class tower
»» icon_class line-dotted
»» icon_class line
»» icon_class house
»» icon_class house-o
»» icon_class star
»» icon_class star-o
»» icon_class octagon
»» icon_class octagon-o
»» icon_class hexagon
»» icon_class hexagon-o
»» icon_class hexagon-b
»» icon_class hexagon-o-b
»» icon_class pentagon
»» icon_class pentagon-o
»» icon_class diamond
»» icon_class diamond-o
»» icon_class square
»» icon_class square-o
»» icon_class triangle
»» icon_class triangle-o
»» icon_class circle
»» icon_class circle-o
»» icon_class triangle-b
»» icon_class triangle-c
»» icon_class triangle-o-b
»» icon_class triangle-o-c
»» icon_class coil
»» icon_class bowtie
»» icon_class infinity
»» icon_class infinity-b
»» source_type vector
»» source_type raster
»» raster_scheme null
»» raster_scheme tms
»» raster_scheme xyz
»» raster_scheme tc

Example responses

200 Response

{
  "success": true,
  "result": {
    "id": 43,
    "available_attributes": {
      "property1": {
        "default_value": null,
        "display_order": 0,
        "html_element": "textarea",
        "html_input_type": "radio",
        "is_required": true,
        "maximum": 0,
        "minimum": 0,
        "permitted_values": [
          "Low",
          "Medium",
          "High"
        ],
        "display_format": "currency",
        "is_expense_size_attribute": true
      },
      "property2": {
        "default_value": null,
        "display_order": 0,
        "html_element": "textarea",
        "html_input_type": "radio",
        "is_required": true,
        "maximum": 0,
        "minimum": 0,
        "permitted_values": [
          "Low",
          "Medium",
          "High"
        ],
        "display_format": "currency",
        "is_expense_size_attribute": true
      }
    },
    "style": {
      "layer_id": 14,
      "symbols": {
        "property1": {
          "fill_color": "string",
          "fill_opacity": 0,
          "icon_class": "vetro",
          "icon_size": 5,
          "stroke_color": "string",
          "stroke_dasharray": "string",
          "stroke_opacity": 0,
          "stroke_weight": 1,
          "display_order": 0
        },
        "property2": {
          "fill_color": "string",
          "fill_opacity": 0,
          "icon_class": "vetro",
          "icon_size": 5,
          "stroke_color": "string",
          "stroke_dasharray": "string",
          "stroke_opacity": 0,
          "stroke_weight": 1,
          "display_order": 0
        }
      },
      "categorized_attribute_label": "string",
      "labels_enabled": true,
      "labels": [
        "string"
      ],
      "style_theme_id": 42
    },
    "category_id": 42,
    "label": "string",
    "sort_order": 43,
    "enabled": true,
    "layer_type": "string",
    "mappable": true,
    "is_imported": true,
    "created_time": "2019-08-24T14:15:22Z",
    "created_by": 0,
    "last_modified_time": "string",
    "feature_type": null,
    "feature_table": "string",
    "is_exportable": true,
    "geom_type": "string",
    "is_editable": true,
    "external_url": "string",
    "external_source_type": "vector",
    "external_raster_scheme": "tms",
    "external_vector_source_id": "string",
    "raster_id": "string",
    "is_active": true
  }
}

Responses

Status Meaning Description Schema
200 OK The new layer's metadata Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result object false none none
»» id integer true none none
»» available_attributes object true none maps allowed attribute to their configuration (type, permitted values, etc.). Attribute labels are keys.
»»» additionalProperties object false none none
»»»» default_value any true none none
»»»» display_order integer¦null true none none
»»»» html_element string true none none
»»»» html_input_type string true none none
»»»» is_required boolean true none none
»»»» maximum number¦null true none none
»»»» minimum number¦null true none none
»»»» permitted_values array¦null true none none
»»»» display_format string¦null true none none
»»»» is_expense_size_attribute boolean true none whether the attribute can be used for material defaults
»» style object true none none
»»» layer_id integer true none Integer corresponding to a vetro layer
»»» symbols object true none none
»»»» additionalProperties object false none none
»»»»» fill_color string false none Used to color points and interior of polygons. 3 or 6 character hex value.
»»»»» fill_opacity number false none Used to determine transparency of points and interior of polygons.
»»»»» icon_class string false none The shape of a point icon.
»»»»» icon_size integer false none Pixel size of point icon.
»»»»» stroke_color string false none Used to color lines and border of polygons. Polygon will default to fill color if not provided. 3 or 6 character hex value.
»»»»» stroke_dasharray string¦null false none The dasharray of the line
»»»»» stroke_opacity number false none Used to determine transparency of lines and border of polygon. Polygon will default to fill opacity if not provided.
»»»»» stroke_weight number false none The width of lines and border of polygons.
»»»»» display_order number false none order in which item is displayed in layer list
»»» categorized_attribute_label string¦null true none name of property the layer style is categorized by. Null if style is not categorized.
»»» labels_enabled boolean true none Whether labels should be displayed on the map.
»»» labels [string] true none The labels to display on the map.
»»» style_theme_id integer true none The id of the template a style belongs to. 1 is the fallback template.
»» category_id integer¦null true none none
»» label string true none Name of layer
»» sort_order integer¦null true none none
»» enabled boolean true none none
»» layer_type string true none none
»» mappable boolean true none Describes whether the layer should be shown on the map. Equipment, for example, is not mappable.
»» is_imported boolean true none none
»» created_time string(date-time)¦null true none none
»» created_by integer¦null true none none
»» last_modified_time string¦null true none none
»» feature_type string¦null true none The categorization of a feature within vetro
»» feature_table string¦null true none none
»» is_exportable boolean true none none
»» geom_type string¦null true none none
»» is_editable boolean true none none
»» external_url string¦null true none Used for layers that use data stored outside of vetro. This url should include {z}, {x}, and {y} params.
»» external_source_type string¦null true none none
»» external_raster_scheme string¦null true none none
»» external_vector_source_id string¦null false none the name of the source layer to use with an external vector tileset.
»» raster_id string¦null true none none
»» is_active boolean false none whether the layer should be initialized as "active" on the map

Enumerated Values

Property Value
display_format null
display_format links
display_format date
display_format currency
display_format images
display_format files
icon_class vetro
icon_class loop
icon_class office
icon_class tower-b
icon_class tower
icon_class line-dotted
icon_class line
icon_class house
icon_class house-o
icon_class star
icon_class star-o
icon_class octagon
icon_class octagon-o
icon_class hexagon
icon_class hexagon-o
icon_class hexagon-b
icon_class hexagon-o-b
icon_class pentagon
icon_class pentagon-o
icon_class diamond
icon_class diamond-o
icon_class square
icon_class square-o
icon_class triangle
icon_class triangle-o
icon_class circle
icon_class circle-o
icon_class triangle-b
icon_class triangle-c
icon_class triangle-o-b
icon_class triangle-o-c
icon_class coil
icon_class bowtie
icon_class infinity
icon_class infinity-b
feature_type null
feature_type network_point
feature_type chief_office
feature_type junction
feature_type service_location
feature_type network_line
feature_type nonnetwork_line
feature_type nonnetwork_point
feature_type nonnetwork_polygon
feature_type fiber_cable
feature_type duct
feature_type micro_duct
feature_type micro_duct_bundle
feature_type slack_loop
feature_type equipment_muxer
feature_type equipment_splitter
feature_type equipment_nxn
feature_type equipment_splice_closure
feature_type hardware
feature_type pole
external_source_type vector
external_source_type raster
external_source_type null
external_raster_scheme tms
external_raster_scheme xyz
external_raster_scheme null

Create Layer Category

Code samples

# You can also use wget
curl -X POST /v2/layers/category \
  -H 'Accept: application/json'

POST /v2/layers/category HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/layers/category',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /layers/category

Create a layer category. Useful for organizing layers.

Parameters

Name In Type Required Description
label query string false The new label

Example responses

201 Response

{
  "success": true,
  "result": {
    "id": 42,
    "label": "string",
    "sort_order": 0
  }
}

Responses

Status Meaning Description Schema
201 Created Category was created Inline

Response Schema

Status Code 201

Name Type Required Restrictions Description
» success boolean false none none
» result object false none none
»» id integer false none none
»» label string false none none
»» sort_order integer¦null false none describes placement of category within layer list. Null values are hidden in the layer list

Get Layer

Code samples

# You can also use wget
curl -X GET /v2/layers/layer/{id} \
  -H 'Accept: application/json'

GET /v2/layers/layer/{id} HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/layers/layer/{id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /layers/layer/{id}

Retrieve a single layer with metadata

Parameters

Name In Type Required Description
id path integer true id of layer or category

Example responses

200 Response

{
  "success": true,
  "result": {
    "id": 43,
    "available_attributes": {
      "property1": {
        "default_value": null,
        "display_order": 0,
        "html_element": "textarea",
        "html_input_type": "radio",
        "is_required": true,
        "maximum": 0,
        "minimum": 0,
        "permitted_values": [
          "Low",
          "Medium",
          "High"
        ],
        "display_format": "currency",
        "is_expense_size_attribute": true
      },
      "property2": {
        "default_value": null,
        "display_order": 0,
        "html_element": "textarea",
        "html_input_type": "radio",
        "is_required": true,
        "maximum": 0,
        "minimum": 0,
        "permitted_values": [
          "Low",
          "Medium",
          "High"
        ],
        "display_format": "currency",
        "is_expense_size_attribute": true
      }
    },
    "style": {
      "layer_id": 14,
      "symbols": {
        "property1": {
          "fill_color": "string",
          "fill_opacity": 0,
          "icon_class": "vetro",
          "icon_size": 5,
          "stroke_color": "string",
          "stroke_dasharray": "string",
          "stroke_opacity": 0,
          "stroke_weight": 1,
          "display_order": 0
        },
        "property2": {
          "fill_color": "string",
          "fill_opacity": 0,
          "icon_class": "vetro",
          "icon_size": 5,
          "stroke_color": "string",
          "stroke_dasharray": "string",
          "stroke_opacity": 0,
          "stroke_weight": 1,
          "display_order": 0
        }
      },
      "categorized_attribute_label": "string",
      "labels_enabled": true,
      "labels": [
        "string"
      ],
      "style_theme_id": 42
    },
    "category_id": 42,
    "label": "string",
    "sort_order": 43,
    "enabled": true,
    "layer_type": "string",
    "mappable": true,
    "is_imported": true,
    "created_time": "2019-08-24T14:15:22Z",
    "created_by": 0,
    "last_modified_time": "string",
    "feature_type": null,
    "feature_table": "string",
    "is_exportable": true,
    "geom_type": "string",
    "is_editable": true,
    "external_url": "string",
    "external_source_type": "vector",
    "external_raster_scheme": "tms",
    "external_vector_source_id": "string",
    "raster_id": "string",
    "is_active": true
  }
}

Responses

Status Meaning Description Schema
200 OK object of layer metadata Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result object false none none
»» id integer true none none
»» available_attributes object true none maps allowed attribute to their configuration (type, permitted values, etc.). Attribute labels are keys.
»»» additionalProperties object false none none
»»»» default_value any true none none
»»»» display_order integer¦null true none none
»»»» html_element string true none none
»»»» html_input_type string true none none
»»»» is_required boolean true none none
»»»» maximum number¦null true none none
»»»» minimum number¦null true none none
»»»» permitted_values array¦null true none none
»»»» display_format string¦null true none none
»»»» is_expense_size_attribute boolean true none whether the attribute can be used for material defaults
»» style object true none none
»»» layer_id integer true none Integer corresponding to a vetro layer
»»» symbols object true none none
»»»» additionalProperties object false none none
»»»»» fill_color string false none Used to color points and interior of polygons. 3 or 6 character hex value.
»»»»» fill_opacity number false none Used to determine transparency of points and interior of polygons.
»»»»» icon_class string false none The shape of a point icon.
»»»»» icon_size integer false none Pixel size of point icon.
»»»»» stroke_color string false none Used to color lines and border of polygons. Polygon will default to fill color if not provided. 3 or 6 character hex value.
»»»»» stroke_dasharray string¦null false none The dasharray of the line
»»»»» stroke_opacity number false none Used to determine transparency of lines and border of polygon. Polygon will default to fill opacity if not provided.
»»»»» stroke_weight number false none The width of lines and border of polygons.
»»»»» display_order number false none order in which item is displayed in layer list
»»» categorized_attribute_label string¦null true none name of property the layer style is categorized by. Null if style is not categorized.
»»» labels_enabled boolean true none Whether labels should be displayed on the map.
»»» labels [string] true none The labels to display on the map.
»»» style_theme_id integer true none The id of the template a style belongs to. 1 is the fallback template.
»» category_id integer¦null true none none
»» label string true none Name of layer
»» sort_order integer¦null true none none
»» enabled boolean true none none
»» layer_type string true none none
»» mappable boolean true none Describes whether the layer should be shown on the map. Equipment, for example, is not mappable.
»» is_imported boolean true none none
»» created_time string(date-time)¦null true none none
»» created_by integer¦null true none none
»» last_modified_time string¦null true none none
»» feature_type string¦null true none The categorization of a feature within vetro
»» feature_table string¦null true none none
»» is_exportable boolean true none none
»» geom_type string¦null true none none
»» is_editable boolean true none none
»» external_url string¦null true none Used for layers that use data stored outside of vetro. This url should include {z}, {x}, and {y} params.
»» external_source_type string¦null true none none
»» external_raster_scheme string¦null true none none
»» external_vector_source_id string¦null false none the name of the source layer to use with an external vector tileset.
»» raster_id string¦null true none none
»» is_active boolean false none whether the layer should be initialized as "active" on the map

Enumerated Values

Property Value
display_format null
display_format links
display_format date
display_format currency
display_format images
display_format files
icon_class vetro
icon_class loop
icon_class office
icon_class tower-b
icon_class tower
icon_class line-dotted
icon_class line
icon_class house
icon_class house-o
icon_class star
icon_class star-o
icon_class octagon
icon_class octagon-o
icon_class hexagon
icon_class hexagon-o
icon_class hexagon-b
icon_class hexagon-o-b
icon_class pentagon
icon_class pentagon-o
icon_class diamond
icon_class diamond-o
icon_class square
icon_class square-o
icon_class triangle
icon_class triangle-o
icon_class circle
icon_class circle-o
icon_class triangle-b
icon_class triangle-c
icon_class triangle-o-b
icon_class triangle-o-c
icon_class coil
icon_class bowtie
icon_class infinity
icon_class infinity-b
feature_type null
feature_type network_point
feature_type chief_office
feature_type junction
feature_type service_location
feature_type network_line
feature_type nonnetwork_line
feature_type nonnetwork_point
feature_type nonnetwork_polygon
feature_type fiber_cable
feature_type duct
feature_type micro_duct
feature_type micro_duct_bundle
feature_type slack_loop
feature_type equipment_muxer
feature_type equipment_splitter
feature_type equipment_nxn
feature_type equipment_splice_closure
feature_type hardware
feature_type pole
external_source_type vector
external_source_type raster
external_source_type null
external_raster_scheme tms
external_raster_scheme xyz
external_raster_scheme null

Delete Layer

Code samples

# You can also use wget
curl -X DELETE /v2/layers/layer/{id} \
  -H 'Accept: application/json'

DELETE /v2/layers/layer/{id} HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/layers/layer/{id}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

DELETE /layers/layer/{id}

Delete a layer, and all features associated with it

Delete a nonnetwork layer and all features in that layer. Deletion of network point and network line layers is not supported.

Parameters

Name In Type Required Description
id path integer true id of layer or category

Example responses

200 Response

{
  "success": true,
  "result": {}
}

Responses

Status Meaning Description Schema
200 OK Layer delete does not return a record, just an indication of success. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result object false none none

Update Layer

Code samples

# You can also use wget
curl -X PATCH /v2/layers/layer/{id} \
  -H 'Accept: application/json'

PATCH /v2/layers/layer/{id} HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/layers/layer/{id}',
{
  method: 'PATCH',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PATCH /layers/layer/{id}

Update the name, sort order, and/or category of a layer

Parameters

Name In Type Required Description
id path integer true id of layer or category
sort_order query integer false The new sort order
label query string false The new label
category_id query integer false The id of the new category

Example responses

200 Response

{
  "success": true,
  "result": {}
}

Responses

Status Meaning Description Schema
200 OK Layer update does not return a record, just an indication of success. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result object false none none

Rename Layer

Code samples

# You can also use wget
curl -X PATCH /v2/layers/layer/{id}/rename \
  -H 'Accept: application/json'

PATCH /v2/layers/layer/{id}/rename HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/layers/layer/{id}/rename',
{
  method: 'PATCH',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PATCH /layers/layer/{id}/rename

Update the name of a layer

Parameters

Name In Type Required Description
id path integer true id of layer or category
label query string false The new label

Example responses

200 Response

{
  "success": true,
  "result": {}
}

Responses

Status Meaning Description Schema
200 OK Layer update does not return a record, just an indication of success. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result object false none none

Rename Layer Attribute

Code samples

# You can also use wget
curl -X PATCH /v2/layers/layer/{id}/attribute/rename \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

PATCH /v2/layers/layer/{id}/attribute/rename HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
  "old_label": "address",
  "new_label": "new address"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('/v2/layers/layer/{id}/attribute/rename',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PATCH /layers/layer/{id}/attribute/rename

Update the name of a layer attribute

Body parameter

{
  "old_label": "address",
  "new_label": "new address"
}

Parameters

Name In Type Required Description
id path integer true id of layer or category
body body object true none
» old_label body string true The old attribute label to rename
» new_label body string true The new attribute label

Example responses

200 Response

{
  "success": true,
  "result": {}
}

Responses

Status Meaning Description Schema
200 OK Layer attribute update does not return a record, just an indication of success. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result object false none none

Sort Layer

Code samples

# You can also use wget
curl -X PATCH /v2/layers/layer/{id}/change_category \
  -H 'Accept: application/json'

PATCH /v2/layers/layer/{id}/change_category HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/layers/layer/{id}/change_category',
{
  method: 'PATCH',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PATCH /layers/layer/{id}/change_category

Update the category of a layer

Parameters

Name In Type Required Description
id path integer true id of layer or category
sort_order query integer false The new sort order
category_id query integer false The id of the new category

Example responses

200 Response

{
  "success": true,
  "result": {}
}

Responses

Status Meaning Description Schema
200 OK Layer update does not return a record, just an indication of success. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result object false none none

Update Layer Style

Code samples

# You can also use wget
curl -X PATCH /v2/layers/layer/{id}/style \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

PATCH /v2/layers/layer/{id}/style HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
  "symbols": {
    "property1": {
      "fill_color": "string",
      "fill_opacity": 0,
      "icon_class": "vetro",
      "icon_size": 5,
      "stroke_color": "string",
      "stroke_dasharray": "string",
      "stroke_opacity": 0,
      "stroke_weight": 1,
      "display_order": 0
    },
    "property2": {
      "fill_color": "string",
      "fill_opacity": 0,
      "icon_class": "vetro",
      "icon_size": 5,
      "stroke_color": "string",
      "stroke_dasharray": "string",
      "stroke_opacity": 0,
      "stroke_weight": 1,
      "display_order": 0
    }
  },
  "categorized_attribute_label": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('/v2/layers/layer/{id}/style',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PATCH /layers/layer/{id}/style

Update the style of a layer

Body parameter

{
  "symbols": {
    "property1": {
      "fill_color": "string",
      "fill_opacity": 0,
      "icon_class": "vetro",
      "icon_size": 5,
      "stroke_color": "string",
      "stroke_dasharray": "string",
      "stroke_opacity": 0,
      "stroke_weight": 1,
      "display_order": 0
    },
    "property2": {
      "fill_color": "string",
      "fill_opacity": 0,
      "icon_class": "vetro",
      "icon_size": 5,
      "stroke_color": "string",
      "stroke_dasharray": "string",
      "stroke_opacity": 0,
      "stroke_weight": 1,
      "display_order": 0
    }
  },
  "categorized_attribute_label": "string"
}

Parameters

Name In Type Required Description
id path integer true id of layer or category
body body object true Object describing style of layer. If it is a single symbol, provide an object with default as the key, and the symbol as the value. Otherwise, provide an object with each category value as the key (e.g., 1, 2, 4, etc. for fiber capacity), and the corresponding symbol as the value. If using categorized styling, you must also pass the label of the category as the categorized_attribute_value. You may also provide a default symbol for categorized styling using Other as a key.
» symbols body object true none
»» additionalProperties body object false none
»»» fill_color body string false Used to color points and interior of polygons. 3 or 6 character hex value.
»»» fill_opacity body number false Used to determine transparency of points and interior of polygons.
»»» icon_class body string false The shape of a point icon.
»»» icon_size body integer false Pixel size of point icon.
»»» stroke_color body string false Used to color lines and border of polygons. Polygon will default to fill color if not provided. 3 or 6 character hex value.
»»» stroke_dasharray body string¦null false The dasharray of the line
»»» stroke_opacity body number false Used to determine transparency of lines and border of polygon. Polygon will default to fill opacity if not provided.
»»» stroke_weight body number false The width of lines and border of polygons.
»»» display_order body number false order in which item is displayed in layer list
» categorized_attribute_label body string¦null false none

Enumerated Values

Parameter Value
»»» icon_class vetro
»»» icon_class loop
»»» icon_class office
»»» icon_class tower-b
»»» icon_class tower
»»» icon_class line-dotted
»»» icon_class line
»»» icon_class house
»»» icon_class house-o
»»» icon_class star
»»» icon_class star-o
»»» icon_class octagon
»»» icon_class octagon-o
»»» icon_class hexagon
»»» icon_class hexagon-o
»»» icon_class hexagon-b
»»» icon_class hexagon-o-b
»»» icon_class pentagon
»»» icon_class pentagon-o
»»» icon_class diamond
»»» icon_class diamond-o
»»» icon_class square
»»» icon_class square-o
»»» icon_class triangle
»»» icon_class triangle-o
»»» icon_class circle
»»» icon_class circle-o
»»» icon_class triangle-b
»»» icon_class triangle-c
»»» icon_class triangle-o-b
»»» icon_class triangle-o-c
»»» icon_class coil
»»» icon_class bowtie
»»» icon_class infinity
»»» icon_class infinity-b

Example responses

200 Response

{
  "success": true,
  "result": {
    "layer_id": 14,
    "symbols": {
      "property1": {
        "fill_color": "string",
        "fill_opacity": 0,
        "icon_class": "vetro",
        "icon_size": 5,
        "stroke_color": "string",
        "stroke_dasharray": "string",
        "stroke_opacity": 0,
        "stroke_weight": 1,
        "display_order": 0
      },
      "property2": {
        "fill_color": "string",
        "fill_opacity": 0,
        "icon_class": "vetro",
        "icon_size": 5,
        "stroke_color": "string",
        "stroke_dasharray": "string",
        "stroke_opacity": 0,
        "stroke_weight": 1,
        "display_order": 0
      }
    },
    "categorized_attribute_label": "string",
    "labels_enabled": true,
    "labels": [
      "string"
    ],
    "style_theme_id": 42
  }
}

Responses

Status Meaning Description Schema
200 OK The layer style Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result object false none none
»» layer_id integer true none Integer corresponding to a vetro layer
»» symbols object true none none
»»» additionalProperties object false none none
»»»» fill_color string false none Used to color points and interior of polygons. 3 or 6 character hex value.
»»»» fill_opacity number false none Used to determine transparency of points and interior of polygons.
»»»» icon_class string false none The shape of a point icon.
»»»» icon_size integer false none Pixel size of point icon.
»»»» stroke_color string false none Used to color lines and border of polygons. Polygon will default to fill color if not provided. 3 or 6 character hex value.
»»»» stroke_dasharray string¦null false none The dasharray of the line
»»»» stroke_opacity number false none Used to determine transparency of lines and border of polygon. Polygon will default to fill opacity if not provided.
»»»» stroke_weight number false none The width of lines and border of polygons.
»»»» display_order number false none order in which item is displayed in layer list
»» categorized_attribute_label string¦null true none name of property the layer style is categorized by. Null if style is not categorized.
»» labels_enabled boolean true none Whether labels should be displayed on the map.
»» labels [string] true none The labels to display on the map.
»» style_theme_id integer true none The id of the template a style belongs to. 1 is the fallback template.

Enumerated Values

Property Value
icon_class vetro
icon_class loop
icon_class office
icon_class tower-b
icon_class tower
icon_class line-dotted
icon_class line
icon_class house
icon_class house-o
icon_class star
icon_class star-o
icon_class octagon
icon_class octagon-o
icon_class hexagon
icon_class hexagon-o
icon_class hexagon-b
icon_class hexagon-o-b
icon_class pentagon
icon_class pentagon-o
icon_class diamond
icon_class diamond-o
icon_class square
icon_class square-o
icon_class triangle
icon_class triangle-o
icon_class circle
icon_class circle-o
icon_class triangle-b
icon_class triangle-c
icon_class triangle-o-b
icon_class triangle-o-c
icon_class coil
icon_class bowtie
icon_class infinity
icon_class infinity-b

Update Layer Behavior

Code samples

# You can also use wget
curl -X PATCH /v2/layers/layer/{id}/behavior \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

PATCH /v2/layers/layer/{id}/behavior HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
  "labels_enabled": true,
  "labels": [
    "string"
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('/v2/layers/layer/{id}/behavior',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PATCH /layers/layer/{id}/behavior

Update the behavior of a layer

Body parameter

{
  "labels_enabled": true,
  "labels": [
    "string"
  ]
}

Parameters

Name In Type Required Description
id path integer true id of layer or category
body body object true Object describing behavior of layer
» labels_enabled body boolean true Whether labels should be displayed on the map.
» labels body [string] true The labels to display on the map.

Example responses

200 Response

{
  "success": true,
  "result": {
    "layer_id": 14,
    "symbols": {
      "property1": {
        "fill_color": "string",
        "fill_opacity": 0,
        "icon_class": "vetro",
        "icon_size": 5,
        "stroke_color": "string",
        "stroke_dasharray": "string",
        "stroke_opacity": 0,
        "stroke_weight": 1,
        "display_order": 0
      },
      "property2": {
        "fill_color": "string",
        "fill_opacity": 0,
        "icon_class": "vetro",
        "icon_size": 5,
        "stroke_color": "string",
        "stroke_dasharray": "string",
        "stroke_opacity": 0,
        "stroke_weight": 1,
        "display_order": 0
      }
    },
    "categorized_attribute_label": "string",
    "labels_enabled": true,
    "labels": [
      "string"
    ],
    "style_theme_id": 42
  }
}

Responses

Status Meaning Description Schema
200 OK The layer style Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean true none none
» result object true none none
»» layer_id integer true none Integer corresponding to a vetro layer
»» symbols object true none none
»»» additionalProperties object false none none
»»»» fill_color string false none Used to color points and interior of polygons. 3 or 6 character hex value.
»»»» fill_opacity number false none Used to determine transparency of points and interior of polygons.
»»»» icon_class string false none The shape of a point icon.
»»»» icon_size integer false none Pixel size of point icon.
»»»» stroke_color string false none Used to color lines and border of polygons. Polygon will default to fill color if not provided. 3 or 6 character hex value.
»»»» stroke_dasharray string¦null false none The dasharray of the line
»»»» stroke_opacity number false none Used to determine transparency of lines and border of polygon. Polygon will default to fill opacity if not provided.
»»»» stroke_weight number false none The width of lines and border of polygons.
»»»» display_order number false none order in which item is displayed in layer list
»» categorized_attribute_label string¦null true none name of property the layer style is categorized by. Null if style is not categorized.
»» labels_enabled boolean true none Whether labels should be displayed on the map.
»» labels [string] true none The labels to display on the map.
»» style_theme_id integer true none The id of the template a style belongs to. 1 is the fallback template.

Enumerated Values

Property Value
icon_class vetro
icon_class loop
icon_class office
icon_class tower-b
icon_class tower
icon_class line-dotted
icon_class line
icon_class house
icon_class house-o
icon_class star
icon_class star-o
icon_class octagon
icon_class octagon-o
icon_class hexagon
icon_class hexagon-o
icon_class hexagon-b
icon_class hexagon-o-b
icon_class pentagon
icon_class pentagon-o
icon_class diamond
icon_class diamond-o
icon_class square
icon_class square-o
icon_class triangle
icon_class triangle-o
icon_class circle
icon_class circle-o
icon_class triangle-b
icon_class triangle-c
icon_class triangle-o-b
icon_class triangle-o-c
icon_class coil
icon_class bowtie
icon_class infinity
icon_class infinity-b

Get Feature Count In Layer

Code samples

# You can also use wget
curl -X GET /v2/layers/layer/{id}/feature_count \
  -H 'Accept: application/json'

GET /v2/layers/layer/{id}/feature_count HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/layers/layer/{id}/feature_count',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /layers/layer/{id}/feature_count

Returns the number of features in a layer

Parameters

Name In Type Required Description
id path integer true id of layer or category

Example responses

200 Response

{
  "success": true,
  "result": {
    "9": {
      "feature_count": 42,
      "child_count": 84
    }
  }
}

Responses

Status Meaning Description Schema
200 OK A map of the layer id to the number of features, and number of children Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result object false none none
»» additionalProperties object false none none
»»» feature_count number false none none
»»» child_count number false none none

Get the attributes for a layer

Code samples

# You can also use wget
curl -X GET /v2/layers/layer/{id}/attribute \
  -H 'Accept: application/json'

GET /v2/layers/layer/{id}/attribute HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/layers/layer/{id}/attribute',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /layers/layer/{id}/attribute

Get the attributes for a layer

Parameters

Name In Type Required Description
id path integer true id of layer or category

Example responses

200 Response

{
  "success": true,
  "result": [
    {
      "label": "label",
      "default_value": null,
      "display_order": 0,
      "html_element": "textarea",
      "html_input_type": "radio",
      "is_required": true,
      "maximum": 0,
      "minimum": 0,
      "permitted_values": [
        "Low",
        "Medium",
        "High"
      ],
      "display_format": "currency",
      "is_expense_size_attribute": true
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK An array containing the attributes that correspond to the layer Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result [object] false none none
»» label string true none none
»» default_value any true none none
»» display_order integer¦null true none none
»» html_element string true none none
»» html_input_type string true none none
»» is_required boolean true none none
»» maximum number¦null true none none
»» minimum number¦null true none none
»» permitted_values array¦null true none none
»» display_format string¦null false none none
»» is_expense_size_attribute boolean true none Whether the attribute is used for size-based material defaults

Enumerated Values

Property Value
display_format null
display_format currency
display_format links
display_format date
display_format images

Create New Layer Attribute

Code samples

# You can also use wget
curl -X POST /v2/layers/layer/{id}/attribute \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST /v2/layers/layer/{id}/attribute HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
  "label": "label",
  "type": "text",
  "permitted_values": [
    "val1",
    "val2",
    "val3"
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('/v2/layers/layer/{id}/attribute',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /layers/layer/{id}/attribute

Adds a new attribute to specified layer.

Body parameter

{
  "label": "label",
  "type": "text",
  "permitted_values": [
    "val1",
    "val2",
    "val3"
  ]
}

Parameters

Name In Type Required Description
id path integer true id of layer or category
body body object true Object describing the new attribute. Permitted values is only applicable to single select type.
» label body string true none
» type body string true none
» permitted_values body [oneOf]¦null false An array of permitted values
»» anonymous body string false none
»» anonymous body number false none

Enumerated Values

Parameter Value
» type text
» type number
» type currency
» type single_select
» type links
» type date
» type images

Example responses

201 Response

{
  "success": true,
  "result": {
    "label": "label",
    "default_value": null,
    "display_order": 0,
    "html_element": "textarea",
    "html_input_type": "radio",
    "is_required": true,
    "maximum": 0,
    "minimum": 0,
    "permitted_values": [
      "Low",
      "Medium",
      "High"
    ],
    "display_format": "currency",
    "is_expense_size_attribute": true
  }
}

Responses

Status Meaning Description Schema
201 Created An object containing the details of the newly created attribute. Inline

Response Schema

Status Code 201

Name Type Required Restrictions Description
» success boolean false none none
» result object false none none
»» label string true none none
»» default_value any true none none
»» display_order integer¦null true none none
»» html_element string true none none
»» html_input_type string true none none
»» is_required boolean true none none
»» maximum number¦null true none none
»» minimum number¦null true none none
»» permitted_values array¦null true none none
»» display_format string¦null false none none
»» is_expense_size_attribute boolean true none Whether the attribute is used for size-based material defaults

Enumerated Values

Property Value
display_format null
display_format currency
display_format links
display_format date
display_format images

Delete Layer Attribute(s)

Code samples

# You can also use wget
curl -X DELETE /v2/layers/layer/{id}/attribute?labels=%22address%22%2C%22residences%22 \
  -H 'Accept: application/json'

DELETE /v2/layers/layer/{id}/attribute?labels=%22address%22%2C%22residences%22 HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/layers/layer/{id}/attribute?labels=%22address%22%2C%22residences%22',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

DELETE /layers/layer/{id}/attribute

Delete attribute(s) of the specified layer.

Parameters

Name In Type Required Description
id path integer true id of layer or category
labels query string true The attribute(s) to delete. Each attribute must be surrounded by double quotes and separated by a comma

Example responses

200 Response

{
  "success": true,
  "result": {}
}

Responses

Status Meaning Description Schema
200 OK Attribute delete does not return a record, just an indication of success. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result object false none none

Edit Attribute Type

Code samples

# You can also use wget
curl -X PATCH /v2/layers/layer/{id}/attribute/{attribute}/set_type/{type} \
  -H 'Accept: application/json'

PATCH /v2/layers/layer/{id}/attribute/{attribute}/set_type/{type} HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/layers/layer/{id}/attribute/{attribute}/set_type/{type}',
{
  method: 'PATCH',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PATCH /layers/layer/{id}/attribute/{attribute}/set_type/{type}

Alters the type of a specified attribute.

Parameters

Name In Type Required Description
id path integer true id of layer or category
type path string true attribute type
attribute path string true An attribute in the specified layer

Enumerated Values

Parameter Value
type text
type number
type currency
type links
type date
type images

Example responses

200 Response

{
  "success": true,
  "result": {}
}

Responses

Status Meaning Description Schema
200 OK This endpoint will always return with 200. If the user is an application user, the update process will be monitered via websockets Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result object false none none

Set Permitted Values

Code samples

# You can also use wget
curl -X PATCH /v2/layers/layer/{id}/attribute/{attribute}/permitted_values \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

PATCH /v2/layers/layer/{id}/attribute/{attribute}/permitted_values HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
  "permitted_values": [
    "val1",
    "val2",
    "val3"
  ],
  "rename_values": [
    {
      "old_value": "string",
      "new_value": "string"
    }
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('/v2/layers/layer/{id}/attribute/{attribute}/permitted_values',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PATCH /layers/layer/{id}/attribute/{attribute}/permitted_values

Sets the permitted values of a specified attribute

Body parameter

{
  "permitted_values": [
    "val1",
    "val2",
    "val3"
  ],
  "rename_values": [
    {
      "old_value": "string",
      "new_value": "string"
    }
  ]
}

Parameters

Name In Type Required Description
id path integer true id of layer or category
attribute path string true An attribute in the specified layer
body body object true none
» permitted_values body [oneOf]¦null false An array of permitted values
»» anonymous body string false none
»» anonymous body number false none
» rename_values body [object] false none
»» old_value body string true none
»» new_value body string true none

Example responses

200 Response

{
  "success": true,
  "result": {}
}

Responses

Status Meaning Description Schema
200 OK Attribute permitted values update does not return a record, just an indication of success. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result object false none none

Delete Category

Code samples

# You can also use wget
curl -X DELETE /v2/layers/category/{id} \
  -H 'Accept: application/json'

DELETE /v2/layers/category/{id} HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/layers/category/{id}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

DELETE /layers/category/{id}

Delete a category. Category must not have any layers associated with it.

Parameters

Name In Type Required Description
id path integer true id of layer or category

Example responses

200 Response

{
  "success": true,
  "result": {}
}

Responses

Status Meaning Description Schema
200 OK Category delete does not return a record, just an indication of success. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result object false none none

Rename Category

Code samples

# You can also use wget
curl -X PATCH /v2/layers/category/{id}/rename \
  -H 'Accept: application/json'

PATCH /v2/layers/category/{id}/rename HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/layers/category/{id}/rename',
{
  method: 'PATCH',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PATCH /layers/category/{id}/rename

Update the name of a category

Parameters

Name In Type Required Description
id path integer true id of layer or category
label query string false The new label

Example responses

200 Response

{
  "success": true,
  "result": {}
}

Responses

Status Meaning Description Schema
200 OK Category update does not return a record, just an indication of success. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result object false none none

Sort Category

Code samples

# You can also use wget
curl -X PATCH /v2/layers/category/{id}/sort \
  -H 'Accept: application/json'

PATCH /v2/layers/category/{id}/sort HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/layers/category/{id}/sort',
{
  method: 'PATCH',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PATCH /layers/category/{id}/sort

Update the sort order of a category

Parameters

Name In Type Required Description
id path integer true id of layer or category
sort_order query integer false The new sort order

Example responses

200 Response

{
  "success": true,
  "result": {}
}

Responses

Status Meaning Description Schema
200 OK Category update does not return a record, just an indication of success. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result object false none none

User Has Full Edit For Layer

Code samples

# You can also use wget
curl -X GET /v2/layers/layer/{id}/has_all_features \
  -H 'Accept: application/json'

GET /v2/layers/layer/{id}/has_all_features HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/layers/layer/{id}/has_all_features',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /layers/layer/{id}/has_all_features

This endpoint returns true if the requesting user has edit permission for every feature in the specifed layer.

Parameters

Name In Type Required Description
id path integer true id of layer or category

Example responses

200 Response

{
  "success": true,
  "result": true
}

Responses

Status Meaning Description Schema
200 OK A boolean indicating if the user has edit permission for every feature in the layer. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result boolean false none none

Get Layer Relationships

Code samples

# You can also use wget
curl -X GET /v2/layers/parent_child_relationships \
  -H 'Accept: application/json'

GET /v2/layers/parent_child_relationships HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/layers/parent_child_relationships',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /layers/parent_child_relationships

Get the parent/child relationship map for layers.

Array of objects with a parent id and a permitted child id. For example, one object might have the FAT layer id as the parent_id, and the Splitter layer id as the child_id. That means that FATs are permitted to have Splitters as children.

Example responses

200 Response

{
  "success": true,
  "result": [
    {
      "parent_id": 0,
      "child_id": 0,
      "create_by_default": true
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Array of objects with a parent id and a permitted child id. Layers that do not have any valid children are not included as keys in the response. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result [object] false none none
»» parent_id integer true none The parent layer id
»» child_id integer true none The child layer id
»» create_by_default boolean true none An indicator to automatically add this child when creating a new instance of the parent layer. CLIENT SIDE ONLY

Material APIs

Get Material

Code samples

# You can also use wget
curl -X GET /v2/material \
  -H 'Accept: application/json'

GET /v2/material HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/material',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /material

Get Material Templates

Example responses

200 Response

{
  "success": true,
  "result": {
    "material_collections": [
      {
        "id": 42,
        "label": "2019 Materials",
        "description": "Used for underground cables only",
        "plan_ids": [
          0
        ],
        "project_ids": [
          0
        ],
        "default_template_ids": [
          0
        ],
        "template_ids": [
          0
        ],
        "created_time": "2019-08-24T14:15:22Z",
        "updated_time": "2019-08-24T14:15:22Z",
        "is_default": true
      }
    ],
    "material_templates": [
      {
        "id": 42,
        "label": "Flex-Span ADSS fiber optic cable",
        "description": "Used for underground cables only",
        "unit_cost": 0.42,
        "unit_cost_metric": "each",
        "layer_id": 14,
        "default_collection_ids": [
          0
        ],
        "collection_ids": [
          0
        ],
        "feature_count": 0,
        "plan_ids": [
          0
        ],
        "project_ids": [
          0
        ],
        "manufacturer_id": "id corresponding to the manufacturer record",
        "vendor_id": "id corresponding to the vendor record",
        "part_number": "ABGT-350",
        "created_time": "2019-08-24T14:15:22Z",
        "updated_time": "2019-08-24T14:15:22Z",
        "attribute_value": 0
      }
    ]
  }
}

Responses

Status Meaning Description Schema
200 OK All material Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result object false none none
»» material_collections [object] true none none
»»» id integer true none The primary key of the record
»»» label string true none none
»»» description string¦null true none none
»»» plan_ids [integer] true none The ids of the plans that use this collection
»»» project_ids [integer] true none The ids of the projects in which a plan uses this collection
»»» default_template_ids [integer] true none The templates that are the defualt for this collection
»»» template_ids [integer] true none The templates that belong to this collection, but are not the default
»»» created_time string(date-time) true none none
»»» updated_time string(date-time)¦null true none none
»»» is_default boolean true none none
»» material_templates [object] true none none
»»» id integer true none The primary key of the record
»»» label string true none none
»»» description string¦null true none none
»»» unit_cost number true none none
»»» unit_cost_metric string true none none
»»» layer_id integer true none Integer corresponding to a vetro layer
»»» default_collection_ids [integer] true none The collections for which this template is the default
»»» collection_ids [integer] true none The collections for which this template belongs to, but is not the default
»»» feature_count integer true none The number of features this template is applied to
»»» plan_ids [integer] true none The ids of the plans in which this template is present
»»» project_ids [integer] true none The ids of the projects in which this template is present
»»» manufacturer_id integer¦null true none none
»»» vendor_id integer¦null true none none
»»» part_number string¦null true none none
»»» created_time string(date-time) true none none
»»» updated_time string(date-time)¦null true none none
»»» attribute_value any true none An optional value to confine template to a specific value. Can only be defined for layers with a "size" attribute, like Fiber Capacity or Number of Ports.

anyOf

Name Type Required Restrictions Description
»»»» anonymous integer¦null false none none

or

Name Type Required Restrictions Description
»»»» anonymous string¦null false none none

Enumerated Values

Property Value
unit_cost_metric each
unit_cost_metric foot
unit_cost_metric meter
unit_cost_metric kilometer
unit_cost_metric mile

Create Material Templates

Code samples

# You can also use wget
curl -X POST /v2/material/templates \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST /v2/material/templates HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
  "material_templates": [
    {
      "label": "Flex-Span ADSS fiber optic cable",
      "description": "Used for underground cables only",
      "part_number": "ABGT-350",
      "unit_cost": 0.42,
      "unit_cost_metric": "each",
      "layer_id": 14,
      "collection_ids": [
        0
      ],
      "manufacturer_id": "id corresponding to the manufacturer record",
      "vendor_id": "id corresponding to the vendor record",
      "attribute_value": 0
    }
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('/v2/material/templates',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /material/templates

Create Material Templates

Body parameter

{
  "material_templates": [
    {
      "label": "Flex-Span ADSS fiber optic cable",
      "description": "Used for underground cables only",
      "part_number": "ABGT-350",
      "unit_cost": 0.42,
      "unit_cost_metric": "each",
      "layer_id": 14,
      "collection_ids": [
        0
      ],
      "manufacturer_id": "id corresponding to the manufacturer record",
      "vendor_id": "id corresponding to the vendor record",
      "attribute_value": 0
    }
  ]
}

Parameters

Name In Type Required Description
body body object false An array of objects specifying material template properties
» material_templates body [object] false none
»» label body string true none
»» description body string¦null false none
»» part_number body string¦null false none
»» unit_cost body number true none
»» unit_cost_metric body string true none
»» layer_id body integer true Integer corresponding to a vetro layer
»» collection_ids body [integer] true The collections for which this template belongs to, but is not the default
»» manufacturer_id body integer¦null false none
»» vendor_id body integer¦null false none
»» attribute_value body any false An optional value to confine template to a specific value. Can only be defined for layers with a "size" attribute, like Fiber Capacity or Number of Ports.
»»» anonymous body integer¦null false none
»»» anonymous body string¦null false none

Enumerated Values

Parameter Value
»» unit_cost_metric each
»» unit_cost_metric foot
»» unit_cost_metric meter
»» unit_cost_metric kilometer
»» unit_cost_metric mile

Example responses

201 Response

{
  "success": true,
  "result": [
    {
      "id": 42,
      "label": "Flex-Span ADSS fiber optic cable",
      "description": "Used for underground cables only",
      "unit_cost": 0.42,
      "unit_cost_metric": "each",
      "layer_id": 14,
      "default_collection_ids": [
        0
      ],
      "collection_ids": [
        0
      ],
      "feature_count": 0,
      "plan_ids": [
        0
      ],
      "project_ids": [
        0
      ],
      "manufacturer_id": "id corresponding to the manufacturer record",
      "vendor_id": "id corresponding to the vendor record",
      "part_number": "ABGT-350",
      "created_time": "2019-08-24T14:15:22Z",
      "updated_time": "2019-08-24T14:15:22Z",
      "attribute_value": 0
    }
  ]
}

Responses

Status Meaning Description Schema
201 Created Created material templates Inline

Response Schema

Status Code 201

Name Type Required Restrictions Description
» success boolean false none none
» result [object] false none none
»» id integer true none The primary key of the record
»» label string true none none
»» description string¦null true none none
»» unit_cost number true none none
»» unit_cost_metric string true none none
»» layer_id integer true none Integer corresponding to a vetro layer
»» default_collection_ids [integer] true none The collections for which this template is the default
»» collection_ids [integer] true none The collections for which this template belongs to, but is not the default
»» feature_count integer true none The number of features this template is applied to
»» plan_ids [integer] true none The ids of the plans in which this template is present
»» project_ids [integer] true none The ids of the projects in which this template is present
»» manufacturer_id integer¦null true none none
»» vendor_id integer¦null true none none
»» part_number string¦null true none none
»» created_time string(date-time) true none none
»» updated_time string(date-time)¦null true none none
»» attribute_value any true none An optional value to confine template to a specific value. Can only be defined for layers with a "size" attribute, like Fiber Capacity or Number of Ports.

anyOf

Name Type Required Restrictions Description
»»» anonymous integer¦null false none none

or

Name Type Required Restrictions Description
»»» anonymous string¦null false none none

Enumerated Values

Property Value
unit_cost_metric each
unit_cost_metric foot
unit_cost_metric meter
unit_cost_metric kilometer
unit_cost_metric mile

Update Material Templates

Code samples

# You can also use wget
curl -X PATCH /v2/material/templates \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

PATCH /v2/material/templates HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
  "material_templates": [
    {
      "id": 42,
      "label": "Flex-Span ADSS fiber optic cable",
      "description": "Used for underground cables only",
      "part_number": "ABGT-350",
      "unit_cost": 0.42,
      "unit_cost_metric": "each",
      "layer_id": 14,
      "collection_ids": [
        0
      ],
      "default_collection_ids": [
        0
      ],
      "manufacturer_id": "id corresponding to the manufacturer record",
      "vendor_id": "id corresponding to the vendor record",
      "attribute_value": 0
    }
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('/v2/material/templates',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PATCH /material/templates

Update Material Templates

Body parameter

{
  "material_templates": [
    {
      "id": 42,
      "label": "Flex-Span ADSS fiber optic cable",
      "description": "Used for underground cables only",
      "part_number": "ABGT-350",
      "unit_cost": 0.42,
      "unit_cost_metric": "each",
      "layer_id": 14,
      "collection_ids": [
        0
      ],
      "default_collection_ids": [
        0
      ],
      "manufacturer_id": "id corresponding to the manufacturer record",
      "vendor_id": "id corresponding to the vendor record",
      "attribute_value": 0
    }
  ]
}

Parameters

Name In Type Required Description
body body object false An array of objects specifying updated material template properties
» material_templates body [object] false none
»» id body integer true The primary key of the record
»» label body string false none
»» description body string¦null false none
»» part_number body string¦null false none
»» unit_cost body number false none
»» unit_cost_metric body string false none
»» layer_id body integer false Integer corresponding to a vetro layer
»» collection_ids body [integer] false The collections for which this template belongs to, but is not the default
»» default_collection_ids body [integer] false The collections for which this template is the default
»» manufacturer_id body integer¦null false none
»» vendor_id body integer¦null false none
»» attribute_value body any false An optional value to confine template to a specific value. Can only be defined for layers with a "size" attribute, like Fiber Capacity or Number of Ports.
»»» anonymous body integer¦null false none
»»» anonymous body string¦null false none

Enumerated Values

Parameter Value
»» unit_cost_metric each
»» unit_cost_metric foot
»» unit_cost_metric meter
»» unit_cost_metric kilometer
»» unit_cost_metric mile

Example responses

200 Response

{
  "success": true,
  "result": [
    {
      "id": 42,
      "label": "Flex-Span ADSS fiber optic cable",
      "description": "Used for underground cables only",
      "unit_cost": 0.42,
      "unit_cost_metric": "each",
      "layer_id": 14,
      "default_collection_ids": [
        0
      ],
      "collection_ids": [
        0
      ],
      "feature_count": 0,
      "plan_ids": [
        0
      ],
      "project_ids": [
        0
      ],
      "manufacturer_id": "id corresponding to the manufacturer record",
      "vendor_id": "id corresponding to the vendor record",
      "part_number": "ABGT-350",
      "created_time": "2019-08-24T14:15:22Z",
      "updated_time": "2019-08-24T14:15:22Z",
      "attribute_value": 0
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Updated material templates Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result [object] false none none
»» id integer true none The primary key of the record
»» label string true none none
»» description string¦null true none none
»» unit_cost number true none none
»» unit_cost_metric string true none none
»» layer_id integer true none Integer corresponding to a vetro layer
»» default_collection_ids [integer] true none The collections for which this template is the default
»» collection_ids [integer] true none The collections for which this template belongs to, but is not the default
»» feature_count integer true none The number of features this template is applied to
»» plan_ids [integer] true none The ids of the plans in which this template is present
»» project_ids [integer] true none The ids of the projects in which this template is present
»» manufacturer_id integer¦null true none none
»» vendor_id integer¦null true none none
»» part_number string¦null true none none
»» created_time string(date-time) true none none
»» updated_time string(date-time)¦null true none none
»» attribute_value any true none An optional value to confine template to a specific value. Can only be defined for layers with a "size" attribute, like Fiber Capacity or Number of Ports.

anyOf

Name Type Required Restrictions Description
»»» anonymous integer¦null false none none

or

Name Type Required Restrictions Description
»»» anonymous string¦null false none none

Enumerated Values

Property Value
unit_cost_metric each
unit_cost_metric foot
unit_cost_metric meter
unit_cost_metric kilometer
unit_cost_metric mile

Create Material Collections

Code samples

# You can also use wget
curl -X POST /v2/material/collections \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST /v2/material/collections HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
  "material_collections": [
    {
      "label": "2019 Materials",
      "description": "Used for underground cables only",
      "plan_ids": [
        0
      ],
      "template_ids": [
        0
      ]
    }
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('/v2/material/collections',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /material/collections

Create Material Collections

Body parameter

{
  "material_collections": [
    {
      "label": "2019 Materials",
      "description": "Used for underground cables only",
      "plan_ids": [
        0
      ],
      "template_ids": [
        0
      ]
    }
  ]
}

Parameters

Name In Type Required Description
body body object false An array of objects specifying material collection properties
» material_collections body [object] true none
»» label body string true none
»» description body string¦null false none
»» plan_ids body [integer] false The ids of the plans that use this collection
»» template_ids body [integer] false The ids of templates that correspond to this collection

Example responses

201 Response

{
  "success": true,
  "result": [
    {
      "id": 42,
      "label": "2019 Materials",
      "description": "Used for underground cables only",
      "plan_ids": [
        0
      ],
      "project_ids": [
        0
      ],
      "default_template_ids": [
        0
      ],
      "template_ids": [
        0
      ],
      "created_time": "2019-08-24T14:15:22Z",
      "updated_time": "2019-08-24T14:15:22Z",
      "is_default": true
    }
  ]
}

Responses

Status Meaning Description Schema
201 Created Created material templates Inline

Response Schema

Status Code 201

Name Type Required Restrictions Description
» success boolean false none none
» result [object] false none none
»» id integer true none The primary key of the record
»» label string true none none
»» description string¦null true none none
»» plan_ids [integer] true none The ids of the plans that use this collection
»» project_ids [integer] true none The ids of the projects in which a plan uses this collection
»» default_template_ids [integer] true none The templates that are the defualt for this collection
»» template_ids [integer] true none The templates that belong to this collection, but are not the default
»» created_time string(date-time) true none none
»» updated_time string(date-time)¦null true none none
»» is_default boolean true none none

Update Material Collections

Code samples

# You can also use wget
curl -X PATCH /v2/material/collections \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

PATCH /v2/material/collections HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
  "material_collections": [
    {
      "id": 42,
      "label": "2019 Materials",
      "description": "Used for underground cables only",
      "plan_ids": [
        0
      ],
      "template_ids": [
        0
      ],
      "template_id_map": {
        "9": 53,
        "12": 53,
        "14": 21
      }
    }
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('/v2/material/collections',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PATCH /material/collections

Update Material Collections

Body parameter

{
  "material_collections": [
    {
      "id": 42,
      "label": "2019 Materials",
      "description": "Used for underground cables only",
      "plan_ids": [
        0
      ],
      "template_ids": [
        0
      ],
      "template_id_map": {
        "9": 53,
        "12": 53,
        "14": 21
      }
    }
  ]
}

Parameters

Name In Type Required Description
body body object false A 1-length array of objects specifying updated material collection properties
» material_collections body [object] true none
»» id body integer true The primary key of the record
»» label body string false none
»» description body string¦null false none
»» plan_ids body [integer] false The ids of the plans that use this collection
»» template_ids body [integer] false The ids of templates that correspond to this collection
»» template_id_map body object false When updating a plan's collection, template_id_map describes how to update the _template_id of the plan's features. Take the example below, (e.g., updating a material collection). For features whose plan is being assigned to the passed collection: Features with a material_template_id of 9 or 12 will have their material_tempalte_id updated to 53. Features with a material_template_id of 14 will have their material_template_id updated to 21. All other features will retain their current material_template_id, unless it has been removed entirely from the collection.
»»» additionalProperties body integer¦null false none

Example responses

200 Response

{
  "success": true,
  "result": [
    {
      "id": 42,
      "label": "2019 Materials",
      "description": "Used for underground cables only",
      "plan_ids": [
        0
      ],
      "project_ids": [
        0
      ],
      "default_template_ids": [
        0
      ],
      "template_ids": [
        0
      ],
      "created_time": "2019-08-24T14:15:22Z",
      "updated_time": "2019-08-24T14:15:22Z",
      "is_default": true
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Updated material collections Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result [object] false none none
»» id integer true none The primary key of the record
»» label string true none none
»» description string¦null true none none
»» plan_ids [integer] true none The ids of the plans that use this collection
»» project_ids [integer] true none The ids of the projects in which a plan uses this collection
»» default_template_ids [integer] true none The templates that are the defualt for this collection
»» template_ids [integer] true none The templates that belong to this collection, but are not the default
»» created_time string(date-time) true none none
»» updated_time string(date-time)¦null true none none
»» is_default boolean true none none

Get Material Manufacturers

Code samples

# You can also use wget
curl -X GET /v2/material/manufacturers \
  -H 'Accept: application/json'

GET /v2/material/manufacturers HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/material/manufacturers',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /material/manufacturers

Get Material Manufacturers

Example responses

200 Response

{
  "success": true,
  "result": [
    {
      "id": 42,
      "label": "string",
      "address": "string",
      "city": "string",
      "state": "string",
      "zip_code": "string",
      "phone_number": "string",
      "contact_name": "string",
      "contact_email": "string",
      "note": "string",
      "country": "string"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Manufacturer records Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result [object] false none none
»» id integer true none The primary key of the record
»» label string true none none
»» address string¦null true none none
»» city string¦null true none none
»» state string¦null true none none
»» zip_code string¦null true none none
»» phone_number string¦null true none none
»» contact_name string¦null true none none
»» contact_email string¦null true none none
»» note string¦null true none none
»» country string¦null true none none

Get Material Vendors

Code samples

# You can also use wget
curl -X GET /v2/material/vendors \
  -H 'Accept: application/json'

GET /v2/material/vendors HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/material/vendors',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /material/vendors

Get Material Vendors

Example responses

200 Response

{
  "success": true,
  "result": [
    {
      "id": 42,
      "label": "string",
      "address": "string",
      "city": "string",
      "state": "string",
      "zip_code": "string",
      "phone_number": "string",
      "contact_name": "string",
      "contact_email": "string",
      "note": "string",
      "country": "string"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Vendor records Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result [object] false none none
»» id integer true none The primary key of the record
»» label string true none none
»» address string¦null true none none
»» city string¦null true none none
»» state string¦null true none none
»» zip_code string¦null true none none
»» phone_number string¦null true none none
»» contact_name string¦null true none none
»» contact_email string¦null true none none
»» note string¦null true none none
»» country string¦null true none none

Get Feature Material

Code samples

# You can also use wget
curl -X GET /v2/material/{vetro_id} \
  -H 'Accept: application/json'

GET /v2/material/{vetro_id} HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/material/{vetro_id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /material/{vetro_id}

Get Material Template for Feature

Parameters

Name In Type Required Description
vetro_id path string(uuid) true Vetro id (uuid)

Example responses

200 Response

{
  "success": true,
  "result": {
    "id": 42,
    "label": "Flex-Span ADSS fiber optic cable",
    "description": "Used for underground cables only",
    "link": "https://fiberparts.biz",
    "part_number": "ABGT-350",
    "unit_cost": 0.42,
    "unit_cost_metric": "each",
    "layer_id": 14,
    "is_default": true,
    "collection": "2019 Materials",
    "manufacturer": "AFL",
    "vendor": "Power and Telephone",
    "attribute_value": 0
  }
}

Responses

Status Meaning Description Schema
200 OK A record of the feature's material, if any Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result object¦null false none none
»» id integer¦null true none The primary key of the record
»» label string¦null true none none
»» description string¦null true none none
»» link string¦null true none none
»» part_number string¦null true none none
»» unit_cost number¦null true none none
»» unit_cost_metric string¦null true none none
»» layer_id integer¦null true none Integer corresponding to a vetro layer
»» is_default boolean¦null false none Whether the template is the default for its layer within the current collection
»» collection string true none none
»» manufacturer string¦null true none none
»» vendor string¦null true none none
»» attribute_value any true none An optional value to confine template to a specific value. Can only be defined for layers with a "size" attribute, like Fiber Capacity or Number of Ports.

anyOf

Name Type Required Restrictions Description
»»» anonymous integer¦null false none none

or

Name Type Required Restrictions Description
»»» anonymous string¦null false none none

Enumerated Values

Property Value
unit_cost_metric each
unit_cost_metric foot
unit_cost_metric meter
unit_cost_metric kilometer
unit_cost_metric mile
unit_cost_metric null

Delete Material Templates

Code samples

# You can also use wget
curl -X DELETE /v2/material/templates/{material_template_ids} \
  -H 'Accept: application/json'

DELETE /v2/material/templates/{material_template_ids} HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/material/templates/{material_template_ids}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

DELETE /material/templates/{material_template_ids}

Delete Material Templates

Parameters

Name In Type Required Description
material_template_ids path array[integer] true Material template ids

Example responses

200 Response

{
  "success": true,
  "result": [
    42
  ]
}

Responses

Status Meaning Description Schema
200 OK The ids of the deleted material templates. If templates w/ provided id(s) do not exist (e.g., were already deleted), those ids will not be included here. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result [integer] false none none

Delete Material Collections

Code samples

# You can also use wget
curl -X DELETE /v2/material/collections/{material_collection_ids} \
  -H 'Accept: application/json'

DELETE /v2/material/collections/{material_collection_ids} HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/material/collections/{material_collection_ids}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

DELETE /material/collections/{material_collection_ids}

Delete Material Collections

Parameters

Name In Type Required Description
material_collection_ids path array[integer] true Material collection ids

Example responses

200 Response

{
  "success": true,
  "result": [
    42
  ]
}

Responses

Status Meaning Description Schema
200 OK The ids of the deleted material collections. If collections w/ provided id(s) do not exist (e.g., were already deleted), those ids will not be included here. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result [integer] false none none

Create Material Defaults

Code samples

# You can also use wget
curl -X POST /v2/material/defaults \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST /v2/material/defaults HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
  "defaults": [
    {
      "material_template_id": 0,
      "material_collection_id": 0
    }
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('/v2/material/defaults',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /material/defaults

Create Material Defaults

Body parameter

{
  "defaults": [
    {
      "material_template_id": 0,
      "material_collection_id": 0
    }
  ]
}

Parameters

Name In Type Required Description
body body object false An array of objects specifying material defaults
» defaults body [object] true none
»» material_template_id body integer true Material template id
»» material_collection_id body integer true Material collection id

Example responses

201 Response

{
  "success": true,
  "result": {
    "created": [
      {
        "id": 42,
        "label": "Flex-Span ADSS fiber optic cable",
        "description": "Used for underground cables only",
        "unit_cost": 0.42,
        "unit_cost_metric": "each",
        "layer_id": 14,
        "default_collection_ids": [
          0
        ],
        "collection_ids": [
          0
        ],
        "feature_count": 0,
        "plan_ids": [
          0
        ],
        "project_ids": [
          0
        ],
        "manufacturer_id": "id corresponding to the manufacturer record",
        "vendor_id": "id corresponding to the vendor record",
        "part_number": "ABGT-350",
        "created_time": "2019-08-24T14:15:22Z",
        "updated_time": "2019-08-24T14:15:22Z",
        "attribute_value": 0
      }
    ],
    "removed": [
      {
        "id": 42,
        "label": "Flex-Span ADSS fiber optic cable",
        "description": "Used for underground cables only",
        "unit_cost": 0.42,
        "unit_cost_metric": "each",
        "layer_id": 14,
        "default_collection_ids": [
          0
        ],
        "collection_ids": [
          0
        ],
        "feature_count": 0,
        "plan_ids": [
          0
        ],
        "project_ids": [
          0
        ],
        "manufacturer_id": "id corresponding to the manufacturer record",
        "vendor_id": "id corresponding to the vendor record",
        "part_number": "ABGT-350",
        "created_time": "2019-08-24T14:15:22Z",
        "updated_time": "2019-08-24T14:15:22Z",
        "attribute_value": 0
      }
    ]
  }
}

Responses

Status Meaning Description Schema
201 Created The templates that were updated with new default records Inline

Response Schema

Status Code 201

Name Type Required Restrictions Description
» success boolean false none none
» result object false none none
»» created [object] false none none
»»» id integer true none The primary key of the record
»»» label string true none none
»»» description string¦null true none none
»»» unit_cost number true none none
»»» unit_cost_metric string true none none
»»» layer_id integer true none Integer corresponding to a vetro layer
»»» default_collection_ids [integer] true none The collections for which this template is the default
»»» collection_ids [integer] true none The collections for which this template belongs to, but is not the default
»»» feature_count integer true none The number of features this template is applied to
»»» plan_ids [integer] true none The ids of the plans in which this template is present
»»» project_ids [integer] true none The ids of the projects in which this template is present
»»» manufacturer_id integer¦null true none none
»»» vendor_id integer¦null true none none
»»» part_number string¦null true none none
»»» created_time string(date-time) true none none
»»» updated_time string(date-time)¦null true none none
»»» attribute_value any true none An optional value to confine template to a specific value. Can only be defined for layers with a "size" attribute, like Fiber Capacity or Number of Ports.

anyOf

Name Type Required Restrictions Description
»»»» anonymous integer¦null false none none

or

Name Type Required Restrictions Description
»»»» anonymous string¦null false none none

continued

Name Type Required Restrictions Description
»» removed [object] false none none

Enumerated Values

Property Value
unit_cost_metric each
unit_cost_metric foot
unit_cost_metric meter
unit_cost_metric kilometer
unit_cost_metric mile

Remove Material Defaults

Code samples

# You can also use wget
curl -X DELETE /v2/material/defaults \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

DELETE /v2/material/defaults HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
  "remove_defaults": [
    {
      "material_template_id": 0,
      "material_collection_id": 0
    }
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('/v2/material/defaults',
{
  method: 'DELETE',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

DELETE /material/defaults

Remove Material Defaults

Body parameter

{
  "remove_defaults": [
    {
      "material_template_id": 0,
      "material_collection_id": 0
    }
  ]
}

Parameters

Name In Type Required Description
body body object false An array of objects specifying default templates to make not default
» remove_defaults body [object] true none
»» material_template_id body integer true Material template id
»» material_collection_id body integer true Material collection id

Example responses

200 Response

{
  "success": true,
  "result": {
    "removed": [
      {
        "id": 42,
        "label": "Flex-Span ADSS fiber optic cable",
        "description": "Used for underground cables only",
        "unit_cost": 0.42,
        "unit_cost_metric": "each",
        "layer_id": 14,
        "default_collection_ids": [
          0
        ],
        "collection_ids": [
          0
        ],
        "feature_count": 0,
        "plan_ids": [
          0
        ],
        "project_ids": [
          0
        ],
        "manufacturer_id": "id corresponding to the manufacturer record",
        "vendor_id": "id corresponding to the vendor record",
        "part_number": "ABGT-350",
        "created_time": "2019-08-24T14:15:22Z",
        "updated_time": "2019-08-24T14:15:22Z",
        "attribute_value": 0
      }
    ]
  }
}

Responses

Status Meaning Description Schema
200 OK The templates that were updated with new non-default records Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result object false none none
»» removed [object] false none none
»»» id integer true none The primary key of the record
»»» label string true none none
»»» description string¦null true none none
»»» unit_cost number true none none
»»» unit_cost_metric string true none none
»»» layer_id integer true none Integer corresponding to a vetro layer
»»» default_collection_ids [integer] true none The collections for which this template is the default
»»» collection_ids [integer] true none The collections for which this template belongs to, but is not the default
»»» feature_count integer true none The number of features this template is applied to
»»» plan_ids [integer] true none The ids of the plans in which this template is present
»»» project_ids [integer] true none The ids of the projects in which this template is present
»»» manufacturer_id integer¦null true none none
»»» vendor_id integer¦null true none none
»»» part_number string¦null true none none
»»» created_time string(date-time) true none none
»»» updated_time string(date-time)¦null true none none
»»» attribute_value any true none An optional value to confine template to a specific value. Can only be defined for layers with a "size" attribute, like Fiber Capacity or Number of Ports.

anyOf

Name Type Required Restrictions Description
»»»» anonymous integer¦null false none none

or

Name Type Required Restrictions Description
»»»» anonymous string¦null false none none

Enumerated Values

Property Value
unit_cost_metric each
unit_cost_metric foot
unit_cost_metric meter
unit_cost_metric kilometer
unit_cost_metric mile

Create Material Default Collection

Code samples

# You can also use wget
curl -X POST /v2/material/collection/default \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST /v2/material/collection/default HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
  "default_collection_id": 0
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('/v2/material/collection/default',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /material/collection/default

Create Material Default Collection

Body parameter

{
  "default_collection_id": 0
}

Parameters

Name In Type Required Description
body body object false A collection id to use as the default material collection
» default_collection_id body integer true Material collection id

Example responses

201 Response

{
  "success": true,
  "result": {
    "default_collection": {
      "id": 0,
      "label": "string",
      "description": "string",
      "is_default": true
    }
  }
}

Responses

Status Meaning Description Schema
201 Created The new default material collection Inline

Response Schema

Status Code 201

Name Type Required Restrictions Description
» success boolean false none none
» result object false none none
»» default_collection object false none none
»»» id number false none none
»»» label string false none none
»»» description string¦null false none none
»»» is_default boolean false none none

Remove Material Default Collection

Code samples

# You can also use wget
curl -X DELETE /v2/material/collection/default \
  -H 'Accept: application/json'

DELETE /v2/material/collection/default HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/material/collection/default',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

DELETE /material/collection/default

Remove Material Default Collection

Example responses

200 Response

{
  "success": true,
  "result": {
    "default_collection_removed": true
  }
}

Responses

Status Meaning Description Schema
200 OK Success of removing the default material collection Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result object false none none
»» default_collection_removed boolean false none none

Network APIs

APIs related to the geometric and fiber networks.

Connect Ports To Fibers

Code samples

# You can also use wget
curl -X POST /v2/network/connections/port-to-fiber \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST /v2/network/connections/port-to-fiber HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
  "connections": [
    {
      "fiber_end_id": 0,
      "equipment_port_id": 0
    }
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('/v2/network/connections/port-to-fiber',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /network/connections/port-to-fiber

Create connections between fibers and equipment ports.

Body parameter

{
  "connections": [
    {
      "fiber_end_id": 0,
      "equipment_port_id": 0
    }
  ]
}

Parameters

Name In Type Required Description
body body object true An array of objects describing the connections to make.
» connections body [object] true none
»» fiber_end_id body integer true none
»» equipment_port_id body integer true none

Example responses

201 Response

{
  "success": true,
  "result": null
}

Responses

Status Meaning Description Schema
201 Created Indicates successful creation of fiber connections. Inline

Response Schema

Status Code 201

Name Type Required Restrictions Description
» success boolean false none none
» result any false none none

Connect Ports To Ports

Code samples

# You can also use wget
curl -X POST /v2/network/connections/port-to-port \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST /v2/network/connections/port-to-port HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
  "connections": [
    {
      "equipment_port_a_id": 0,
      "equipment_port_b_id": 0
    }
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('/v2/network/connections/port-to-port',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /network/connections/port-to-port

Create external connections between equipment ports.

Body parameter

{
  "connections": [
    {
      "equipment_port_a_id": 0,
      "equipment_port_b_id": 0
    }
  ]
}

Parameters

Name In Type Required Description
body body object true An array of objects describing the connections to make.
» connections body [object] true none
»» equipment_port_a_id body integer true none
»» equipment_port_b_id body integer true none

Example responses

201 Response

{
  "success": true,
  "result": null
}

Responses

Status Meaning Description Schema
201 Created Indicates successful creation of fiber connections. Inline

Response Schema

Status Code 201

Name Type Required Restrictions Description
» success boolean false none none
» result any false none none

Get Fiberpaths for a Geographic Path

Code samples

# You can also use wget
curl -X GET /v2/network/fibergraph/paths \
  -H 'Accept: application/json'

GET /v2/network/fibergraph/paths HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/network/fibergraph/paths',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /network/fibergraph/paths

Retrieves fiber paths that follow the feature path specified by vetro_ids. The supplied vetro ids must begin and end with a network point and alternate points & cables.

Parameters

Name In Type Required Description
vetro_ids query array[string] false an array of feature vetro ids

Example responses

200 Response

{
  "success": true,
  "result": {
    "nodes": [
      {
        "id": 0,
        "data": {
          "type": "fiber_end",
          "is_connected": true,
          "fiber_number": 0,
          "fiber_side": "start",
          "geographic_nodes_id": 0,
          "parent_vetro_id": "df976393-ffb0-4c8c-a377-13b3f1d52728",
          "stored_fiberpath_ids": [
            0
          ],
          "last_splice_edit_time": "2019-08-24T14:15:22Z"
        }
      }
    ],
    "edges": [
      {
        "id": 0,
        "from_id": 0,
        "to_id": 0,
        "data": {
          "id": 0,
          "type": "fiber"
        }
      }
    ],
    "paths": [
      [
        {
          "id": 0,
          "muxer_channel_id": 0
        }
      ]
    ],
    "stored_fiberpaths": [
      {
        "id": 0,
        "type": "circuit",
        "label": "string",
        "can_view": true
      }
    ]
  }
}

Responses

Status Meaning Description Schema
200 OK An object containing nodes, edges, and paths arrays. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result object false none none
»» nodes [oneOf] true none none

oneOf

Name Type Required Restrictions Description
»»» anonymous any false none none

allOf

Name Type Required Restrictions Description
»»»» anonymous object false none none
»»»»» id integer true none none
»»»»» data any true none Information about the node.

and

Name Type Required Restrictions Description
»»»» anonymous object false none none
»»»»» data object false none none
»»»»»» type string true none none
»»»»»» is_connected boolean true none indicates whether this node is connected to another node.
»»»»»» fiber_number integer true none The fiber number, between 1 and the cable's fiber capacity.
»»»»»» fiber_side string true none Describes which of the two nodes for a particular fiber this is.
»»»»»» geographic_nodes_id integer true none The cable end node that is parent of this fiber end node.
»»»»»» parent_vetro_id string(uuid)¦null true none Parent feature's vetro id
»»»»»» stored_fiberpath_ids [integer] true none none
»»»»»» last_splice_edit_time string(date-time)¦null true none The last time a fibergraph node had its connectivity changed, i.e., connected or disconnected.

xor

Name Type Required Restrictions Description
»»» anonymous any false none none

allOf

Name Type Required Restrictions Description
»»»» anonymous object false none none

and

Name Type Required Restrictions Description
»»»» anonymous object false none none
»»»»» data object false none none
»»»»»» type string true none none
»»»»»» is_connected boolean true none indicates whether this node is connected to another node.
»»»»»» sort_order integer false none Determines the order in which ports on the same side are displayed.
»»»»»» port_number integer true none A numeric label label for the port. Unique within a side.
»»»»»» side string true none Equipment ports are group into two sides. Number of "a" ports will be less than or equal to number of "b" ports
»»»»»» parent_vetro_id string(uuid)¦null true none Parent feature's vetro id
»»»»»» stored_fiberpath_ids [integer] true none none
»»»»»» last_splice_edit_time string(date-time)¦null true none The last time a fibergraph node had its connectivity changed, i.e., connected or disconnected.
»»»»»» label string¦null true none A text description

continued

Name Type Required Restrictions Description
»» edges [oneOf] true none none

oneOf

Name Type Required Restrictions Description
»»» anonymous object false none none

allOf

Name Type Required Restrictions Description
»»»» anonymous object false none none
»»»»» id integer false none none
»»»»» from_id integer true none none
»»»»» to_id integer true none none
»»»»» data any true none Information about the edge.

and

Name Type Required Restrictions Description
»»»» anonymous object false none none
»»»»» data object false none none
»»»»»» id integer true none none
»»»»»» type string true none whether this is a physical splice or a passthrough connection.

xor

Name Type Required Restrictions Description
»»» anonymous object false none none

allOf

Name Type Required Restrictions Description
»»»» anonymous object false none none

and

Name Type Required Restrictions Description
»»»» anonymous object false none none
»»»»» data object false none none
»»»»»» id integer true none none
»»»»»» type string true none none
»»»»»» parent_vetro_id string(uuid)¦null true none none

xor

Name Type Required Restrictions Description
»»» anonymous object false none none

allOf

Name Type Required Restrictions Description
»»»» anonymous object false none none

and

Name Type Required Restrictions Description
»»»» anonymous object false none none
»»»»» data object false none none
»»»»»» id integer true none none
»»»»»» type string true none none
»»»»»» parent_vetro_id string(uuid) true none none

xor

Name Type Required Restrictions Description
»»» anonymous object false none none

allOf

Name Type Required Restrictions Description
»»»» anonymous object false none none

and

Name Type Required Restrictions Description
»»»» anonymous object false none none
»»»»» data object false none none
»»»»»» id integer true none none
»»»»»» type string true none none
»»»»»» muxer_channel_id integer false none (optional) the channel id if this is a part of a muxer.

xor

Name Type Required Restrictions Description
»»» anonymous object false none none

allOf

Name Type Required Restrictions Description
»»»» anonymous object false none none

and

Name Type Required Restrictions Description
»»»» anonymous object false none none
»»»»» data object false none none
»»»»»» id integer true none none
»»»»»» type string true none none

xor

Name Type Required Restrictions Description
»»» anonymous object false none none

allOf

Name Type Required Restrictions Description
»»»» anonymous object false none none

and

Name Type Required Restrictions Description
»»»» anonymous object false none none
»»»»» data object false none none
»»»»»» id integer true none none
»»»»»» type string true none none

continued

Name Type Required Restrictions Description
»» paths [array] true none none
»»» id integer true none none
»»» muxer_channel_id integer false none none
stored_fiberpaths [object] true none none
» id number true none none
» type string true none none
» label string true none none
» can_view boolean true none none

Enumerated Values

Property Value
type fiber_end
fiber_side start
fiber_side end
type equipment_port
side a
side b
type fiber
type passthrough
type splice
type equipment_internal_connection
type port_port
type port_fiber
type circuit
type leased
type reserved

Delete Fibergraph Edges

Code samples

# You can also use wget
curl -X DELETE /v2/network/fibergraph_edges/{edge_ids} \
  -H 'Accept: application/json'

DELETE /v2/network/fibergraph_edges/{edge_ids} HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/network/fibergraph_edges/{edge_ids}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

DELETE /network/fibergraph_edges/{edge_ids}

Delete fibergraph edges.

Delete connectivity between fibergraph nodes by fibergraph edge id.

Parameters

Name In Type Required Description
edge_ids path array[integer] true array of edge ids

Example responses

200 Response

{
  "success": true,
  "result": [
    0
  ]
}

Responses

Status Meaning Description Schema
200 OK Edges were successfully deleted Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result [number] false none ids of deleted edges

Connect Fibers

Code samples

# You can also use wget
curl -X POST /v2/network/fibergraph_edges/connect_fibers \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST /v2/network/fibergraph_edges/connect_fibers HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
  "connections": [
    {
      "node_ids": [
        0,
        0
      ],
      "vetro_id": "6bfda495-7424-4933-b5f3-6767ae08e1e2"
    }
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('/v2/network/fibergraph_edges/connect_fibers',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /network/fibergraph_edges/connect_fibers

Create connections between fibers at points.

Body parameter

{
  "connections": [
    {
      "node_ids": [
        0,
        0
      ],
      "vetro_id": "6bfda495-7424-4933-b5f3-6767ae08e1e2"
    }
  ]
}

Parameters

Name In Type Required Description
body body object true An array of objects describing the fiber connections to make. The supplied vetro ids must be for network point features.
» connections body [object] true none
»» node_ids body [number] true none
»» vetro_id body string(uuid) true none

Example responses

201 Response

{
  "success": true,
  "result": null
}

Responses

Status Meaning Description Schema
201 Created Indicates successful creation of fiber connections. Inline

Response Schema

Status Code 201

Name Type Required Restrictions Description
» success boolean false none none
» result any false none none

Restore Passthrough

Code samples

# You can also use wget
curl -X POST /v2/network/fibergraph_edges/restore_passthrough \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST /v2/network/fibergraph_edges/restore_passthrough HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
  "connections": [
    {
      "node_ids": [
        0,
        0
      ]
    }
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('/v2/network/fibergraph_edges/restore_passthrough',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /network/fibergraph_edges/restore_passthrough

Restore passthrough connections between fibers.

Restore passthrough connections between fiber nodes whose parent cables are passthrough connected. The fibers must not already be connected.

Body parameter

{
  "connections": [
    {
      "node_ids": [
        0,
        0
      ]
    }
  ]
}

Parameters

Name In Type Required Description
body body object true An array of objects describing the fiber connections to restore to passthrough. The supplied vetro ids must be for network point features.
» connections body [object] true none
»» node_ids body [number] true none

Example responses

201 Response

{
  "success": true,
  "result": null
}

Responses

Status Meaning Description Schema
201 Created Indicates successful creation of fiber connections. Inline

Response Schema

Status Code 201

Name Type Required Restrictions Description
» success boolean false none none
» result any false none none

Get Geograph

Code samples

# You can also use wget
curl -X GET /v2/network/geograph/{vetro_ids} \
  -H 'Accept: application/json'

GET /v2/network/geograph/{vetro_ids} HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/network/geograph/{vetro_ids}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /network/geograph/{vetro_ids}

Get feature connectivity for the given vetro_ids

Parameters

Name In Type Required Description
vetro_ids path array[string] true Vetro ids (uuids)
plan_ids query array[integer] false ids of plans to include in the response
layer_ids query array[integer] false limits the request to features in specified layers

Example responses

200 Response

{
  "success": true,
  "result": {
    "nodes": [
      {
        "id": 0,
        "data": {
          "vetro_id": "6bfda495-7424-4933-b5f3-6767ae08e1e2",
          "feature_type": null,
          "line_side": "start"
        }
      }
    ],
    "edges": [
      {
        "id": 0,
        "from_id": 0,
        "to_id": 0,
        "data": {
          "is_passthrough": true
        }
      }
    ]
  }
}

Responses

Status Meaning Description Schema
200 OK Object describing feature connectivity as nodes and edges. The subgraph returned includes only nodes/edges within the specified layers and plans, up to a 'point depth' of 1 from the source features. Specifically, a geonode will be included in the response if: - it corresponds to a feature in the given provided vetroIds (a 'starting node'), or - it can be reached from a starting node without traversing other (non-junction) point nodes. (I.e., has 'point depth' at most 1). Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result object false none none
»» nodes [allOf] true none none

allOf

Name Type Required Restrictions Description
»»» anonymous object false none none
»»»» id integer true none none
»»»» data any true none Information about the node.

and

Name Type Required Restrictions Description
»»» anonymous object false none none
»»»» data object false none none
»»»»» vetro_id string(uuid)¦null true none Parent feature's vetro id
»»»»» feature_type string¦null true none The categorization of a feature within vetro
»»»»» line_side string false none none

continued

Name Type Required Restrictions Description
»» edges [allOf] true none none

allOf

Name Type Required Restrictions Description
»»» anonymous object false none none
»»»» id integer false none none
»»»» from_id integer true none none
»»»» to_id integer true none none
»»»» data any true none Information about the edge.

and

Name Type Required Restrictions Description
»»» anonymous object false none none
»»»» data object false none none
»»»»» is_passthrough boolean false none none

Enumerated Values

Property Value
feature_type null
feature_type network_point
feature_type chief_office
feature_type junction
feature_type service_location
feature_type network_line
feature_type nonnetwork_line
feature_type nonnetwork_point
feature_type nonnetwork_polygon
feature_type fiber_cable
feature_type duct
feature_type micro_duct
feature_type micro_duct_bundle
feature_type slack_loop
feature_type equipment_muxer
feature_type equipment_splitter
feature_type equipment_nxn
feature_type equipment_splice_closure
feature_type hardware
feature_type pole
line_side start
line_side end

Update Equipment Configuration

Code samples

# You can also use wget
curl -X PATCH /v2/network/equipment/{vetro_id}/configuration/ \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

PATCH /v2/network/equipment/{vetro_id}/configuration/ HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
  "connections": [
    {
      "a_port_id": 0,
      "b_port_id": 0,
      "muxer_channel_id": 0
    }
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('/v2/network/equipment/{vetro_id}/configuration/',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PATCH /network/equipment/{vetro_id}/configuration/

Create, delete, or modify the internal edges for equipment

Accepts an array of internal equipment edges. Will first delete any existing edges using the bPortIds, then create the new edges. Edges can be deleted by providing the B Port and, leaving the channel and other port undefined.

Body parameter

{
  "connections": [
    {
      "a_port_id": 0,
      "b_port_id": 0,
      "muxer_channel_id": 0
    }
  ]
}

Parameters

Name In Type Required Description
vetro_id path string(uuid) true Vetro id (uuid)
body body object true none
» connections body [object] true none
»» a_port_id body integer¦null true none
»» b_port_id body integer true none
»» muxer_channel_id body integer¦null true none

Example responses

200 Response

{
  "success": true,
  "result": null
}

Responses

Status Meaning Description Schema
200 OK Operation successful Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result any false none none

Get Trace

Code samples

# You can also use wget
curl -X GET /v2/network/trace/{a_point_vetro_id}/{z_point_vetro_id} \
  -H 'Accept: application/json'

GET /v2/network/trace/{a_point_vetro_id}/{z_point_vetro_id} HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/network/trace/{a_point_vetro_id}/{z_point_vetro_id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /network/trace/{a_point_vetro_id}/{z_point_vetro_id}

Given a starting location ("A Point") and an ending location ("Z Point"), find the shortest path from the A Point to the Z Point, if one exists. Optionally limit the search to specified layers and plans.

Parameters

Name In Type Required Description
a_point_vetro_id path string(uuid) true VETRO id of starting point
z_point_vetro_id path string(uuid) true VETRO id of ending point
through query array[string] false VETRO ids of features that must appear along result path
plan_ids query array[integer] false ids of plans to include in the response
layer_ids query array[integer] false limits the request to features in specified layers

Example responses

200 Response

{
  "success": true,
  "result": {
    "path": [
      {
        "vetro_id": "6bfda495-7424-4933-b5f3-6767ae08e1e2",
        "feature_type": "string",
        "node_ids": [
          0
        ],
        "alternatives": [
          "497f6eca-6276-4993-bfeb-53cbbbba6f08"
        ]
      }
    ],
    "nodes": [
      {
        "id": 0,
        "data": {
          "vetro_id": "6bfda495-7424-4933-b5f3-6767ae08e1e2",
          "feature_type": null,
          "line_side": "start"
        }
      }
    ],
    "edges": [
      {
        "id": 0,
        "from_id": 0,
        "to_id": 0,
        "data": {
          "is_passthrough": true
        }
      }
    ]
  }
}

Responses

Status Meaning Description Schema
200 OK Array of features Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result object false none none
»» path [object]¦null true none An array of objects specifing features that form a path from the A Point to the Z Point. If no path from A to Z exists, this property has value null.
»»» vetro_id string(uuid) true none none
»»» feature_type string true none "network_point" or "network_line"
»»» node_ids [integer] true none none
»»» alternatives [string] true none An array of alternative vetro_ids that also connect the previous and next feature.
»» nodes [allOf] true none none

allOf

Name Type Required Restrictions Description
»»» anonymous object false none none
»»»» id integer true none none
»»»» data any true none Information about the node.

and

Name Type Required Restrictions Description
»»» anonymous object false none none
»»»» data object false none none
»»»»» vetro_id string(uuid)¦null true none Parent feature's vetro id
»»»»» feature_type string¦null true none The categorization of a feature within vetro
»»»»» line_side string false none none

continued

Name Type Required Restrictions Description
»» edges [allOf] true none none

allOf

Name Type Required Restrictions Description
»»» anonymous object false none none
»»»» id integer false none none
»»»» from_id integer true none none
»»»» to_id integer true none none
»»»» data any true none Information about the edge.

and

Name Type Required Restrictions Description
»»» anonymous object false none none
»»»» data object false none none
»»»»» is_passthrough boolean false none none

Enumerated Values

Property Value
feature_type null
feature_type network_point
feature_type chief_office
feature_type junction
feature_type service_location
feature_type network_line
feature_type nonnetwork_line
feature_type nonnetwork_point
feature_type nonnetwork_polygon
feature_type fiber_cable
feature_type duct
feature_type micro_duct
feature_type micro_duct_bundle
feature_type slack_loop
feature_type equipment_muxer
feature_type equipment_splitter
feature_type equipment_nxn
feature_type equipment_splice_closure
feature_type hardware
feature_type pole
line_side start
line_side end

Get Fibergraph By VetroId

Code samples

# You can also use wget
curl -X GET /v2/network/fibergraph/{vetro_ids} \
  -H 'Accept: application/json'

GET /v2/network/fibergraph/{vetro_ids} HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/network/fibergraph/{vetro_ids}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /network/fibergraph/{vetro_ids}

Retrieves a set of edges and nodes that define the internal and external connectivity for the given vetro_ids.

Parameters

Name In Type Required Description
vetro_ids path array[string] true Vetro ids (uuids)

Example responses

200 Response

{
  "success": true,
  "result": {
    "nodes": [
      {
        "id": 0,
        "data": {
          "type": "fiber_end",
          "is_connected": true,
          "fiber_number": 0,
          "fiber_side": "start",
          "geographic_nodes_id": 0,
          "parent_vetro_id": "df976393-ffb0-4c8c-a377-13b3f1d52728",
          "stored_fiberpath_ids": [
            0
          ],
          "last_splice_edit_time": "2019-08-24T14:15:22Z"
        }
      }
    ],
    "edges": [
      {
        "id": 0,
        "from_id": 0,
        "to_id": 0,
        "data": {
          "id": 0,
          "type": "fiber"
        }
      }
    ],
    "stored_fiberpaths": [
      {
        "id": 0,
        "type": "circuit",
        "label": "string",
        "can_view": true
      }
    ]
  }
}

Responses

Status Meaning Description Schema
200 OK An object containing nodes edges array Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result object false none none
»» nodes [oneOf] true none none

oneOf

Name Type Required Restrictions Description
»»» anonymous any false none none

allOf

Name Type Required Restrictions Description
»»»» anonymous object false none none
»»»»» id integer true none none
»»»»» data any true none Information about the node.

and

Name Type Required Restrictions Description
»»»» anonymous object false none none
»»»»» data object false none none
»»»»»» type string true none none
»»»»»» is_connected boolean true none indicates whether this node is connected to another node.
»»»»»» fiber_number integer true none The fiber number, between 1 and the cable's fiber capacity.
»»»»»» fiber_side string true none Describes which of the two nodes for a particular fiber this is.
»»»»»» geographic_nodes_id integer true none The cable end node that is parent of this fiber end node.
»»»»»» parent_vetro_id string(uuid)¦null true none Parent feature's vetro id
»»»»»» stored_fiberpath_ids [integer] true none none
»»»»»» last_splice_edit_time string(date-time)¦null true none The last time a fibergraph node had its connectivity changed, i.e., connected or disconnected.

xor

Name Type Required Restrictions Description
»»» anonymous any false none none

allOf

Name Type Required Restrictions Description
»»»» anonymous object false none none

and

Name Type Required Restrictions Description
»»»» anonymous object false none none
»»»»» data object false none none
»»»»»» type string true none none
»»»»»» is_connected boolean true none indicates whether this node is connected to another node.
»»»»»» sort_order integer false none Determines the order in which ports on the same side are displayed.
»»»»»» port_number integer true none A numeric label label for the port. Unique within a side.
»»»»»» side string true none Equipment ports are group into two sides. Number of "a" ports will be less than or equal to number of "b" ports
»»»»»» parent_vetro_id string(uuid)¦null true none Parent feature's vetro id
»»»»»» stored_fiberpath_ids [integer] true none none
»»»»»» last_splice_edit_time string(date-time)¦null true none The last time a fibergraph node had its connectivity changed, i.e., connected or disconnected.
»»»»»» label string¦null true none A text description

continued

Name Type Required Restrictions Description
»» edges [oneOf] true none none

oneOf

Name Type Required Restrictions Description
»»» anonymous object false none none

allOf

Name Type Required Restrictions Description
»»»» anonymous object false none none
»»»»» id integer false none none
»»»»» from_id integer true none none
»»»»» to_id integer true none none
»»»»» data any true none Information about the edge.

and

Name Type Required Restrictions Description
»»»» anonymous object false none none
»»»»» data object false none none
»»»»»» id integer true none none
»»»»»» type string true none whether this is a physical splice or a passthrough connection.

xor

Name Type Required Restrictions Description
»»» anonymous object false none none

allOf

Name Type Required Restrictions Description
»»»» anonymous object false none none

and

Name Type Required Restrictions Description
»»»» anonymous object false none none
»»»»» data object false none none
»»»»»» id integer true none none
»»»»»» type string true none none
»»»»»» parent_vetro_id string(uuid)¦null true none none

xor

Name Type Required Restrictions Description
»»» anonymous object false none none

allOf

Name Type Required Restrictions Description
»»»» anonymous object false none none

and

Name Type Required Restrictions Description
»»»» anonymous object false none none
»»»»» data object false none none
»»»»»» id integer true none none
»»»»»» type string true none none
»»»»»» parent_vetro_id string(uuid) true none none

xor

Name Type Required Restrictions Description
»»» anonymous object false none none

allOf

Name Type Required Restrictions Description
»»»» anonymous object false none none

and

Name Type Required Restrictions Description
»»»» anonymous object false none none
»»»»» data object false none none
»»»»»» id integer true none none
»»»»»» type string true none none
»»»»»» muxer_channel_id integer false none (optional) the channel id if this is a part of a muxer.

xor

Name Type Required Restrictions Description
»»» anonymous object false none none

allOf

Name Type Required Restrictions Description
»»»» anonymous object false none none

and

Name Type Required Restrictions Description
»»»» anonymous object false none none
»»»»» data object false none none
»»»»»» id integer true none none
»»»»»» type string true none none

xor

Name Type Required Restrictions Description
»»» anonymous object false none none

allOf

Name Type Required Restrictions Description
»»»» anonymous object false none none

and

Name Type Required Restrictions Description
»»»» anonymous object false none none
»»»»» data object false none none
»»»»»» id integer true none none
»»»»»» type string true none none

continued

Name Type Required Restrictions Description
»» stored_fiberpaths [object] true none none
»»» id number true none none
»»» type string true none none
»»» label string true none none
»»» can_view boolean true none none

Enumerated Values

Property Value
type fiber_end
fiber_side start
fiber_side end
type equipment_port
side a
side b
type fiber
type passthrough
type splice
type equipment_internal_connection
type port_port
type port_fiber
type circuit
type leased
type reserved

Get Muxer Channels

Code samples

# You can also use wget
curl -X GET /v2/network/muxer-channels \
  -H 'Accept: application/json'

GET /v2/network/muxer-channels HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/network/muxer-channels',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /network/muxer-channels

Get an array of all possible muxer channels.

Example responses

200 Response

{
  "success": true,
  "result": [
    {
      "id": 0,
      "label": "string",
      "sort_order": 0
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK A wrapped results object that describes all possible muxer channels. Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result [object] false none none
»» id integer true none none
»» label string true none none
»» sort_order integer true none none

Get Stored Fiberpath Types

Code samples

# You can also use wget
curl -X GET /v2/network/stored_fiberpath_types \
  -H 'Accept: application/json'

GET /v2/network/stored_fiberpath_types HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v2/network/stored_fiberpath_types',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /network/stored_fiberpath_types

Returns metadata about types of stored fiberpaths (circuits, leased paths,...).

Example responses

200 Response

{
  "success": true,
  "result": {
    "stored_fiberpath_types": [
      {
        "id": "circuit",
        "priority": 0,
        "label": "string",
        "available_attributes": {
          "property1": {
            "default_value": null,
            "display_order": 0,
            "html_element": "textarea",
            "html_input_type": "radio",
            "is_required": true,
            "maximum": 0,
            "minimum": 0,
            "permitted_values": [
              "Low",
              "Medium",
              "High"
            ],
            "display_format": "currency",
            "is_expense_size_attribute": true
          },
          "property2": {
            "default_value": null,
            "display_order": 0,
            "html_element": "textarea",
            "html_input_type": "radio",
            "is_required": true,
            "maximum": 0,
            "minimum": 0,
            "permitted_values": [
              "Low",
              "Medium",
              "High"
            ],
            "display_format": "currency",
            "is_expense_size_attribute": true
          }
        }
      }
    ]
  }
}

Responses

Status Meaning Description Schema
200 OK array of stored fiberpath type metadata Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result object false none none
»» stored_fiberpath_types [object] true none none
»»» id string true none none
»»» priority number true none none
»»» label string true none none
»»» available_attributes object true none maps allowed attribute to their configuration (type, permitted values, etc.). Attribute labels are keys.
»»»» additionalProperties object false none none
»»»»» default_value any true none none
»»»»» display_order integer¦null true none none
»»»»» html_element string true none none
»»»»» html_input_type string true none none
»»»»» is_required boolean true none none
»»»»» maximum number¦null true none none
»»»»» minimum number¦null true none none
»»»»» permitted_values array¦null true none none
»»»»» display_format string¦null true none none
»»»»» is_expense_size_attribute boolean true none whether the attribute can be used for material defaults

Enumerated Values

Property Value
id circuit
id leased
id reserved
display_format null
display_format links
display_format date
display_format currency
display_format images
display_format files

Create Stored Fiberpaths

Code samples

# You can also use wget
curl -X POST /v2/network/stored_fiberpaths \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST /v2/network/stored_fiberpaths HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
  "paths": [
    {
      "type": "string",
      "node_ids": [
        0
      ],
      "attributes": {},
      "start_vetro_id": "09bad960-f0a4-44cf-9272-348b03893e1c",
      "end_vetro_id": "298a0200-7f89-4045-9f35-be7c025ef79c"
    }
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('/v2/network/stored_fiberpaths',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /network/stored_fiberpaths

Stores a fiberpath

Body parameter

{
  "paths": [
    {
      "type": "string",
      "node_ids": [
        0
      ],
      "attributes": {},
      "start_vetro_id": "09bad960-f0a4-44cf-9272-348b03893e1c",
      "end_vetro_id": "298a0200-7f89-4045-9f35-be7c025ef79c"
    }
  ]
}

Parameters

Name In Type Required Description
body body object true An array of objects describing the paths to store.
» paths body [object] true none
»» type body string true none
»» node_ids body [integer] true none
»» attributes body object true none
»» start_vetro_id body string(uuid) true Vetro id of the feature
»» end_vetro_id body string(uuid) true Vetro id of the feature

Example responses

201 Response

{
  "success": true,
  "result": [
    0
  ]
}

Responses

Status Meaning Description Schema
201 Created Returns an array of stored fiberpath ids Inline

Response Schema

Status Code 201

Name Type Required Restrictions Description
» success boolean false none none
» result [integer] false none none

Update Stored Fiberpaths

Code samples

# You can also use wget
curl -X PATCH /v2/network/stored_fiberpaths \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

PATCH /v2/network/stored_fiberpaths HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
  "paths": [
    {
      "id": 0,
      "type": "circuit",
      "attributes": {}
    }
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('/v2/network/stored_fiberpaths',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PATCH /network/stored_fiberpaths

Updates a stored a fiberpath

Body parameter

{
  "paths": [
    {
      "id": 0,
      "type": "circuit",
      "attributes": {}
    }
  ]
}

Parameters

Name In Type Required Description
body body object true An array of objects describing the updates to make
» paths body [object] true none
»» id body number true none
»» type body string false none
»» attributes body object false none

Enumerated Values

Parameter Value
»» type circuit
»» type leased
»» type reserved

Example responses

200 Response

{
  "success": true,
  "result": {}
}

Responses

Status Meaning Description Schema
200 OK Returns an array of stored fiberpath ids Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» success boolean false none none
» result object¦null false none none

Quick Connect

Code samples

# You can also use wget
curl -X PATCH /v2/network/quick_connect \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

PATCH /v2/network/quick_connect HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{