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
- Many VETRO FiberMap APIs return ID values. Those ID values can often be used to make further requests, and we do our best to maintain the names of parameters so that subsequent uses should be apparent. For example, an early request may present a list of information about different available datasets and each includes a
layer_id
value. Searching for other endpoints that offerlayer_id
as an input parameter can give you hints where to use it.
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, 19 May 2022 19:03:44 GMT.
Base URLs:
Authentication
-
API Key (Session)
- Parameter Name: vetro_session, in: cookie.
-
API Key (ApiKeyAuth)
- Parameter Name: token, in: header.
-
API Key (ApiKeyAuthQuery)
- Parameter Name: token, in: query.
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 (lng, lat) |
Address Search
Code samples
# You can also use wget
curl -X GET /v2/address/search/{address} \
-H 'Accept: application/json'
GET /v2/address/search/{address} HTTP/1.1
Accept: application/json
const headers = {
'Accept':'application/json'
};
fetch('/v2/address/search/{address}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
GET /address/search/{address}
Search for an address via typeahead
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
address | path | string | true | Address |
limit | query | integer | false | Number of Addresses to return |
offset | query | integer | false | How many Addresses to skip |
Example responses
200 Response
{
"success": true,
"result": [
"string"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Work with your VETRO representative to identify what response format works for your use case. | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» success | boolean | false | none | none |
» result | [oneOf] | false | none | none |
oneOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»» anonymous | string | false | none | none |
xor
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»» anonymous | object | false | none | none |
Geocode Address
Code samples
# You can also use wget
curl -X GET /v2/address/geocode/{address} \
-H 'Accept: application/json'
GET /v2/address/geocode/{address} HTTP/1.1
Accept: application/json
const headers = {
'Accept':'application/json'
};
fetch('/v2/address/geocode/{address}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
GET /address/geocode/{address}
Get coordinates for a given address
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
address | path | string | true | Address |
Example responses
200 Response
{
"success": true,
"result": {
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-157.140204,
37.2516
]
},
"properties": {}
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Returns a Validated and Geocoded GeoJSON Feature. Work with your VETRO representative to set address attributes. | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» success | boolean | false | none | Success status of the request |
» result | object | false | none | A feature |
»» type | string | true | none | Type of feature |
»» geometry | object | true | none | Geometry of feature according to the geojson spec |
»»» type | string | true | none | Point type |
»»» coordinates | [number] | true | none | Coordinates of the point (lng, lat) |
»» properties | object | true | none | Feature attributes |
Enumerated Values
Property | Value |
---|---|
type | Point |
Validate Address
Code samples
# You can also use wget
curl -X GET /v2/address/validate/{address} \
-H 'Accept: application/json'
GET /v2/address/validate/{address} HTTP/1.1
Accept: application/json
const headers = {
'Accept':'application/json'
};
fetch('/v2/address/validate/{address}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
GET /address/validate/{address}
Validate and clean an address
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
address | path | string | true | Address |
Example responses
200 Response
{
"success": true,
"result": {
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-157.140204,
37.2516
]
},
"properties": {}
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Returns a Validated GeoJSON Feature, work with your VETRO representative to set address attributes.. | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» success | boolean | false | none | Success status of the request |
» result | object | false | none | A feature managed outside of Vetro Fibermap, e.g., census block data. External features are non-editable and have more limited functionality compared to Vetro Features. |
»» type | string | true | none | Type of feature |
»» geometry | object | true | none | Geometry of feature according to the geojson spec |
»»» type | string | true | none | Point type |
»»» coordinates | [number] | true | none | Coordinates of the point (lng, lat) |
»» properties | object | true | none | Feature attributes |
Enumerated Values
Property | Value |
---|---|
type | Point |
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
],
"use_housing_unit_count": true,
"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
],
"use_housing_unit_count": true,
"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 that features must have to be used 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 |
» use_housing_unit_count | body | boolean | false | If this is set to true and the source layers specify an attribute_layer_label, then the feature count will be replaced by the housing unit count. |
» 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 |
Route To Network
Code samples
# You can also use wget
curl -X POST /v2/analysis/route_to_network \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
POST /v2/analysis/route_to_network HTTP/1.1
Content-Type: application/json
Accept: application/json
const inputBody = '{
"start_points": [
[
34.456,
68.234
],
[
34.472,
68.255
]
],
"plan_ids": [
0
],
"road_layer_id": 34,
"target_layer_ids": [
14
],
"excluded_vetro_ids": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('/v2/analysis/route_to_network',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST /analysis/route_to_network
Generates routes from provided points to the nearest connected network points.
Body parameter
{
"start_points": [
[
34.456,
68.234
],
[
34.472,
68.255
]
],
"plan_ids": [
0
],
"road_layer_id": 34,
"target_layer_ids": [
14
],
"excluded_vetro_ids": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | object | false | none |
» start_points | body | [array] | true | none |
» plan_ids | body | [number] | true | none |
» road_layer_id | body | integer | true | none |
» target_layer_ids | body | [integer]¦null | false | none |
» excluded_vetro_ids | body | [string]¦null | false | ids of features to exclude |
Example responses
200 Response
{
"success": true,
"result": [
{
"success": true,
"data": {
"length": 5555,
"endpoint_vetro_id": "a202dd9b-b5e5-4cd3-a6c6-bc79577801f7",
"layer_id": 8,
"geometry": {
"type": "LineString",
"coordinates": [
[
-157.140204,
37.2516
]
]
}
}
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Generated routes from provided points to the nearest connected network points. | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» success | boolean | false | none | none |
» result | [object] | false | none | none |
»» success | boolean | true | none | none |
»» data | any | true | none | none |
oneOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»»» anonymous | object | false | none | none |
»»»» length | number | true | none | none |
»»»» endpoint_vetro_id | string(uuid) | true | none | vetro id of the network point being routed to. |
»»»» layer_id | number | true | none | none |
»»»» geometry | object | true | 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 | none |
»»»» error | string | true | none | none |
Enumerated Values
Property | Value |
---|---|
type | LineString |
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",
"area_filters": [
{
"type": "Polygon",
"coordinates": [
[
[
-157.140204,
37.2516
]
]
]
}
],
"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",
"area_filters": [
{
"type": "Polygon",
"coordinates": [
[
[
-157.140204,
37.2516
]
]
]
}
],
"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 |
imperial_units | query | boolean | false | Whether to export length attributes in imperial units. Defaults to false. |
body | body | object | true | Filtration information |
» filter | body | string¦null | false | a query to apply to filtration. |
» area_filters | body | [object]¦null | false | An array of Polygon geometries that serve as a geometric filter for this api. |
»» type | body | string | true | Polygon type |
»» coordinates | body | [array] | true | List of polygon coordinate points |
» 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 |
»» type | Polygon |
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 |
imperial_units | query | boolean | false | Whether to export length attributes in imperial units. Defaults to false. |
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 (lng, lat) |
»»» 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)¦null | false | Parent feature ID to attach the child feature to. If the child feature is a Record, this can be set to null to unlink it from its current parent. |
»» 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",
"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"
],
"parent_line_vetro_ids": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"child_line_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,
"created_time": "2019-08-24T14:15:22Z",
"last_edited_time": "2019-08-24T14:15:22Z"
},
"properties": {},
"geometry": "string"
}
]
}
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 | [allOf] | false | none | List of vetro features |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»» anonymous | object | false | none | none |
»»» type | string | true | none | Type of feature |
»»» 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) |
»»»» parent_line_vetro_ids | [string] | true | none | Vetro ids of lines that contain this feature (e.g., ducts) |
»»»» child_line_vetro_ids | [string] | true | none | Vetro ids of lines contained inside this feature |
»»»» 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 |
»»»» created_time | string(date-time)¦null | false | none | none |
»»»» last_edited_time | string(date-time)¦null | false | none | none |
»»» properties | object | true | none | Feature attributes |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»» anonymous | object | false | none | none |
»»» 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 (lng, lat) |
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 |
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 |
feature_type | record |
feature_table | network_points |
feature_table | nonnetwork_points |
feature_table | network_lines |
feature_table | nonnetwork_lines |
feature_table | nonnetwork_polygons |
type | Point |
type | LineString |
type | Polygon |
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,
"child": {
"type": "Feature",
"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": {}
}
},
"properties": {}
}
],
"return_created_children": true
}';
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,
"child": {
"type": "Feature",
"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": {}
}
},
"properties": {}
}
],
"return_created_children": true
}
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] | true | 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 (lng, lat) |
»»» 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 |
»»» child | body | object | false | none |
»»»» type | body | string | false | Child Feature type being created |
»»»» 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 | false | Child's feature attributes |
»» properties | body | object | true | Feature attributes |
» return_created_children | body | boolean | false | Optional. If provided, any children attached to an incoming feature will be returned as part of the array of created VETRO FiberMap features. |
Enumerated Values
Parameter | Value |
---|---|
»»»» type | Point |
»»»» type | LineString |
»»»» type | Polygon |
Example responses
201 Response
{
"success": true,
"result": [
{
"type": "Feature",
"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"
],
"parent_line_vetro_ids": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"child_line_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,
"created_time": "2019-08-24T14:15:22Z",
"last_edited_time": "2019-08-24T14:15:22Z"
},
"properties": {},
"geometry": "string"
}
]
}
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 | [allOf] | false | none | none |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»» anonymous | object | false | none | none |
»»» type | string | true | none | Type of feature |
»»» 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) |
»»»» parent_line_vetro_ids | [string] | true | none | Vetro ids of lines that contain this feature (e.g., ducts) |
»»»» child_line_vetro_ids | [string] | true | none | Vetro ids of lines contained inside this feature |
»»»» 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 |
»»»» created_time | string(date-time)¦null | false | none | none |
»»»» last_edited_time | string(date-time)¦null | false | none | none |
»»» properties | object | true | none | Feature attributes |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»» anonymous | object | false | none | none |
»»» 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 (lng, lat) |
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 |
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 |
feature_type | record |
feature_table | network_points |
feature_table | nonnetwork_points |
feature_table | network_lines |
feature_table | nonnetwork_lines |
feature_table | nonnetwork_polygons |
type | Point |
type | LineString |
type | Polygon |
Upsert Features
Code samples
# You can also use wget
curl -X PUT /v2/features/ensure_unique \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
PUT /v2/features/ensure_unique 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,
"child": {
"type": "Feature",
"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": {}
}
},
"properties": {}
}
],
"unique_attributes": [
{
"plan_ids": [
0
],
"layer_id": 0,
"attributes": [
"string"
],
"case_insensitive": true,
"match_parent": true
}
],
"return_children": true
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('/v2/features/ensure_unique',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
PUT /features/ensure_unique
Upserts 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). The next step is to search for existing VETRO FiberMap Features based on the unique_attributes Array passed to the API. If duplicates are found, an edit will be made to the duplicate VETRO FiberMap Features, if no duplicates are found a new VETRO FiberMap Feature will be created.
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,
"child": {
"type": "Feature",
"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": {}
}
},
"properties": {}
}
],
"unique_attributes": [
{
"plan_ids": [
0
],
"layer_id": 0,
"attributes": [
"string"
],
"case_insensitive": true,
"match_parent": true
}
],
"return_children": true
}
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. An array of unique attribute objects, one for each layer type being passed into the API. |
» features | body | [object] | true | 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 (lng, lat) |
»»» 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 |
»»» child | body | object | false | none |
»»»» type | body | string | false | Child Feature type being created |
»»»» 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 | false | Child's feature attributes |
»» properties | body | object | true | Feature attributes |
» unique_attributes | body | [object] | true | none |
»» plan_ids | body | [number] | false | none |
»» layer_id | body | number | true | none |
»» attributes | body | [string] | true | none |
»» case_insensitive | body | boolean | false | none |
»» match_parent | body | boolean | false | none |
» return_children | body | boolean | false | Optional. If provided, any modified or created children that were present on an inbound feature will be returned as part of the array of VETRO FiberMap features the request feature turned into. |
Enumerated Values
Parameter | Value |
---|---|
»»»» type | Point |
»»»» type | LineString |
»»»» type | Polygon |
Example responses
200 Response
{
"success": true,
"result": [
{
"requestFeature": {
"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,
"child": {
"type": "Feature",
"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": {}
}
},
"properties": {}
},
"vetroFeatures": [
{
"type": "Feature",
"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"
],
"parent_line_vetro_ids": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"child_line_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,
"created_time": "2019-08-24T14:15:22Z",
"last_edited_time": "2019-08-24T14:15:22Z"
},
"properties": {},
"geometry": "string"
}
],
"duplicateFeatures": true
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | This status is returned when all features passed to the API had duplicates found in VETRO FiberMap. The response will be an array of objects that contain the feature passed to the API, the VETRO FiberMap features the request feature turned into, and whether a duplicate was found. | Inline |
201 | Created | This status is returned when a duplicate couldn't be found for a feature passed to the API, so a new VETRO FiberMap feature was created. The response will be an array of objects that contain the feature passed to the API, the vetro features the request feature turned into, and whether a duplicate was found. | 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 |
»» requestFeature | object | false | none | none |
»»» type | string | false | none | Feature type being created |
»»» geometry | any | true | none | Geometry type of the feature |
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 (lng, lat) |
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) |
»»»» layer_id | integer | true | none | Integer corresponding to a vetro layer |
»»»» plan_id | integer | true | none | Integer corresponding to a vetro plan |
»»»» parent_vetro_id | string(uuid)¦null | false | none | Parent feature's vetro id |
»»»» material_template_id | integer¦null | false | none | Id of a material template |
»»»» labor_template_id | integer¦null | false | none | Id of a layer template |
»»»» hardware_template_id | integer¦null | false | none | Id of a hardware template |
»»»» child | object | false | none | none |
»»»»» type | string | false | none | Child Feature type being created |
»»»»» x-vetro | object | true | none | vetro specific properties (e.g., layer_id, vetro_id) |
»»»»»» layer_id | integer | true | none | Integer corresponding to a vetro layer |
»»»»»» plan_id | integer | true | none | Integer corresponding to a vetro plan |
»»»»»» parent_vetro_id | string(uuid)¦null | false | none | Parent feature's vetro id |
»»»»»» material_template_id | integer¦null | false | none | Id of a material template |
»»»»»» labor_template_id | integer¦null | false | none | Id of a layer template |
»»»»»» hardware_template_id | integer¦null | false | none | Id of a hardware template |
»»»»» properties | object | false | none | Child's feature attributes |
»»» properties | object | true | none | Feature attributes |
»» vetroFeatures | [allOf] | false | none | List of vetro features |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»»» anonymous | object | false | none | none |
»»»» type | string | true | none | Type of feature |
»»»» 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) |
»»»»» parent_line_vetro_ids | [string] | true | none | Vetro ids of lines that contain this feature (e.g., ducts) |
»»»»» child_line_vetro_ids | [string] | true | none | Vetro ids of lines contained inside this feature |
»»»»» 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 |
»»»»» created_time | string(date-time)¦null | false | none | none |
»»»»» last_edited_time | string(date-time)¦null | false | none | none |
»»»» properties | object | true | none | Feature attributes |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»»» anonymous | object | false | none | none |
»»»» 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 |
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 |
continued
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»» duplicateFeatures | boolean | 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_type | record |
feature_table | network_points |
feature_table | nonnetwork_points |
feature_table | network_lines |
feature_table | nonnetwork_lines |
feature_table | nonnetwork_polygons |
Status Code 201
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» success | boolean | false | none | Success status of the request |
» result | [object] | false | none | none |
»» requestFeature | object | false | none | none |
»»» type | string | false | none | Feature type being created |
»»» geometry | any | true | none | Geometry type of the feature |
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 (lng, lat) |
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) |
»»»» layer_id | integer | true | none | Integer corresponding to a vetro layer |
»»»» plan_id | integer | true | none | Integer corresponding to a vetro plan |
»»»» parent_vetro_id | string(uuid)¦null | false | none | Parent feature's vetro id |
»»»» material_template_id | integer¦null | false | none | Id of a material template |
»»»» labor_template_id | integer¦null | false | none | Id of a layer template |
»»»» hardware_template_id | integer¦null | false | none | Id of a hardware template |
»»»» child | object | false | none | none |
»»»»» type | string | false | none | Child Feature type being created |
»»»»» x-vetro | object | true | none | vetro specific properties (e.g., layer_id, vetro_id) |
»»»»»» layer_id | integer | true | none | Integer corresponding to a vetro layer |
»»»»»» plan_id | integer | true | none | Integer corresponding to a vetro plan |
»»»»»» parent_vetro_id | string(uuid)¦null | false | none | Parent feature's vetro id |
»»»»»» material_template_id | integer¦null | false | none | Id of a material template |
»»»»»» labor_template_id | integer¦null | false | none | Id of a layer template |
»»»»»» hardware_template_id | integer¦null | false | none | Id of a hardware template |
»»»»» properties | object | false | none | Child's feature attributes |
»»» properties | object | true | none | Feature attributes |
»» vetroFeatures | [allOf] | false | none | List of vetro features |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»»» anonymous | object | false | none | none |
»»»» type | string | true | none | Type of feature |
»»»» 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) |
»»»»» parent_line_vetro_ids | [string] | true | none | Vetro ids of lines that contain this feature (e.g., ducts) |
»»»»» child_line_vetro_ids | [string] | true | none | Vetro ids of lines contained inside this feature |
»»»»» 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 |
»»»»» created_time | string(date-time)¦null | false | none | none |
»»»»» last_edited_time | string(date-time)¦null | false | none | none |
»»»» properties | object | true | none | Feature attributes |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»»» anonymous | object | false | none | none |
»»»» 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 |
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 |
continued
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»» duplicateFeatures | boolean | 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_type | record |
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 (lng, lat) |
»»» 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)¦null | false | Parent feature ID to attach the child feature to. If the child feature is a Record, this can be set to null to unlink it from its current parent. |
»» 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",
"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"
],
"parent_line_vetro_ids": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"child_line_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,
"created_time": "2019-08-24T14:15:22Z",
"last_edited_time": "2019-08-24T14:15:22Z"
},
"properties": {},
"geometry": "string"
},
"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"
}
}
]
}
],
"storedFiberpathIds": [
0
]
}
}
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 | any | true | none | none |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»»»» anonymous | object | false | none | none |
»»»»» type | string | true | none | Type of feature |
»»»»» 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) |
»»»»»» parent_line_vetro_ids | [string] | true | none | Vetro ids of lines that contain this feature (e.g., ducts) |
»»»»»» child_line_vetro_ids | [string] | true | none | Vetro ids of lines contained inside this feature |
»»»»»» 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 |
»»»»»» created_time | string(date-time)¦null | false | none | none |
»»»»»» last_edited_time | string(date-time)¦null | false | none | none |
»»»»» properties | object | true | none | Feature attributes |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»»»» anonymous | object | false | none | none |
»»»»» 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 (lng, lat) |
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 |
---|---|---|---|---|
»»» 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 |
---|---|---|---|---|
»» storedFiberpathIds | [number] | true | 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 |
feature_type | record |
feature_table | network_points |
feature_table | nonnetwork_points |
feature_table | network_lines |
feature_table | nonnetwork_lines |
feature_table | nonnetwork_polygons |
type | Point |
type | LineString |
type | Polygon |
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 = '{
"geometry": {
"type": "Point",
"coordinates": [
-157.140204,
37.2516
]
},
"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
{
"geometry": {
"type": "Point",
"coordinates": [
-157.140204,
37.2516
]
},
"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 |
» geometry | body | object | true | none |
»» anonymous | body | object | false | GeoJSON point geometry |
»»» type | body | string | true | Point type |
»»» coordinates | body | [number] | true | Coordinates of the point (lng, lat) |
»» 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 Intersecting Geometry
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 = '{
"geometry": {
"type": "Point",
"coordinates": [
-157.140204,
37.2516
]
},
"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
{
"geometry": {
"type": "Point",
"coordinates": [
-157.140204,
37.2516
]
},
"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 |
» geometry | body | object | true | none |
»» anonymous | body | object | false | GeoJSON point geometry |
»»» type | body | string | true | Point type |
»»» coordinates | body | [number] | true | Coordinates of the point (lng, lat) |
»» 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",
"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"
],
"parent_line_vetro_ids": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"child_line_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,
"created_time": "2019-08-24T14:15:22Z",
"last_edited_time": "2019-08-24T14:15:22Z"
},
"properties": {},
"geometry": "string"
}
]
}
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 | [anyOf] | false | none | none |
anyOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»» anonymous | any | false | none | none |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»»» anonymous | object | false | none | none |
»»»» type | string | true | none | Type of feature |
»»»» 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) |
»»»»» parent_line_vetro_ids | [string] | true | none | Vetro ids of lines that contain this feature (e.g., ducts) |
»»»»» child_line_vetro_ids | [string] | true | none | Vetro ids of lines contained inside this feature |
»»»»» 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 |
»»»»» created_time | string(date-time)¦null | false | none | none |
»»»»» last_edited_time | string(date-time)¦null | false | none | none |
»»»» properties | object | true | none | Feature attributes |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»»» anonymous | object | false | none | none |
»»»» 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 (lng, lat) |
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 |
or
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»» anonymous | object | false | none | A feature managed outside of Vetro Fibermap, e.g., census block data. External features are non-editable and have more limited functionality compared to Vetro Features. |
»»» 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 |
---|---|
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_type | record |
feature_table | network_points |
feature_table | nonnetwork_points |
feature_table | network_lines |
feature_table | nonnetwork_lines |
feature_table | nonnetwork_polygons |
type | Point |
type | LineString |
type | Polygon |
type | MultiPoint |
type | MultiLineString |
type | MultiPolygon |
Get Polygons Intersecting Position
Code samples
# You can also use wget
curl -X POST /v2/features/polygon/intersection/position \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
POST /v2/features/polygon/intersection/position HTTP/1.1
Content-Type: application/json
Accept: application/json
const inputBody = '{
"position": [
-157.140204,
37.2516
],
"polygon_layer_ids": [
14
],
"plan_ids": [
8
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('/v2/features/polygon/intersection/position',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST /features/polygon/intersection/position
Gets polygon features intersecting the given coordinate pair
Body parameter
{
"position": [
-157.140204,
37.2516
],
"polygon_layer_ids": [
14
],
"plan_ids": [
8
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | object | true | none |
» position | body | [number] | true | Coordinates of the point (lng, lat) |
» polygon_layer_ids | body | [integer] | false | The list of Vetro polygon layer IDs from which you would like to retrieve features. Omit to search all polygon layers. An empty array will be rejected. |
» plan_ids | body | [integer] | false | The list of Vetro plan ids from which you would like to retrieve features. Omit to search all plans. An empty array will be rejected. |
Example responses
200 Response
{
"success": true,
"result": [
{
"type": "Feature",
"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"
],
"parent_line_vetro_ids": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"child_line_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,
"created_time": "2019-08-24T14:15:22Z",
"last_edited_time": "2019-08-24T14:15:22Z"
},
"properties": {},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-157.140204,
37.2516
]
]
]
}
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Array of polygon features | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» success | boolean | false | none | Success status of the request |
» result | [allOf] | false | none | A list of vetro polygon features |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»» anonymous | object | false | none | none |
»»» type | string | true | none | Type of feature |
»»» 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) |
»»»» parent_line_vetro_ids | [string] | true | none | Vetro ids of lines that contain this feature (e.g., ducts) |
»»»» child_line_vetro_ids | [string] | true | none | Vetro ids of lines contained inside this feature |
»»»» 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 |
»»»» created_time | string(date-time)¦null | false | none | none |
»»»» last_edited_time | string(date-time)¦null | false | none | none |
»»» properties | object | true | none | Feature attributes |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»» anonymous | object | false | none | none |
»»» geometry | object | true | none | GeoJSON polygon geometry |
»»»» type | string | true | none | Polygon type |
»»»» coordinates | [array] | true | none | List of polygon coordinate points |
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 |
feature_type | record |
feature_table | network_points |
feature_table | nonnetwork_points |
feature_table | network_lines |
feature_table | nonnetwork_lines |
feature_table | nonnetwork_polygons |
type | Polygon |
Get Polygons Intersecting Address
Code samples
# You can also use wget
curl -X POST /v2/features/polygon/intersection/address \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
POST /v2/features/polygon/intersection/address HTTP/1.1
Content-Type: application/json
Accept: application/json
const inputBody = '{
"address": "188 Limerick Rd, Arundel, Maine 04046",
"polygon_layer_ids": [
14
],
"plan_ids": [
8
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('/v2/features/polygon/intersection/address',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST /features/polygon/intersection/address
Gets polygon features intersecting the geocoded coordinates of the given address
Body parameter
{
"address": "188 Limerick Rd, Arundel, Maine 04046",
"polygon_layer_ids": [
14
],
"plan_ids": [
8
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | object | true | none |
» address | body | string | true | A full, single line address |
» polygon_layer_ids | body | [integer] | false | The list of Vetro polygon layer IDs from which you would like to retrieve features. Omit to search all polygon layers. An empty array will be rejected. |
» plan_ids | body | [integer] | false | The list of Vetro plan ids from which you would like to retrieve features. Omit to search all plans. An empty array will be rejected. |
Example responses
200 Response
{
"success": true,
"result": [
{
"type": "Feature",
"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"
],
"parent_line_vetro_ids": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"child_line_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,
"created_time": "2019-08-24T14:15:22Z",
"last_edited_time": "2019-08-24T14:15:22Z"
},
"properties": {},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-157.140204,
37.2516
]
]
]
}
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Array of polygon features | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» success | boolean | false | none | Success status of the request |
» result | [allOf] | false | none | A list of vetro polygon features |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»» anonymous | object | false | none | none |
»»» type | string | true | none | Type of feature |
»»» 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) |
»»»» parent_line_vetro_ids | [string] | true | none | Vetro ids of lines that contain this feature (e.g., ducts) |
»»»» child_line_vetro_ids | [string] | true | none | Vetro ids of lines contained inside this feature |
»»»» 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 |
»»»» created_time | string(date-time)¦null | false | none | none |
»»»» last_edited_time | string(date-time)¦null | false | none | none |
»»» properties | object | true | none | Feature attributes |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»» anonymous | object | false | none | none |
»»» geometry | object | true | none | GeoJSON polygon geometry |
»»»» type | string | true | none | Polygon type |
»»»» coordinates | [array] | true | none | List of polygon coordinate points |
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 |
feature_type | record |
feature_table | network_points |
feature_table | nonnetwork_points |
feature_table | network_lines |
feature_table | nonnetwork_lines |
feature_table | nonnetwork_polygons |
type | Polygon |
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 (defaults to 100, maximum of 50,000) |
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 search api documentation. |
included_vetro_ids | query | array[string] | false | This parameter will limit the results of this request to features with these vetro ids. |
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 search api documentation.
Example responses
200 Response
{
"success": true,
"result": [
{
"type": "Feature",
"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"
],
"parent_line_vetro_ids": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"child_line_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,
"created_time": "2019-08-24T14:15:22Z",
"last_edited_time": "2019-08-24T14:15:22Z"
},
"properties": {},
"geometry": "string"
}
]
}
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 | [allOf] | false | none | List of vetro features |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»» anonymous | object | false | none | none |
»»» type | string | true | none | Type of feature |
»»» 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) |
»»»» parent_line_vetro_ids | [string] | true | none | Vetro ids of lines that contain this feature (e.g., ducts) |
»»»» child_line_vetro_ids | [string] | true | none | Vetro ids of lines contained inside this feature |
»»»» 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 |
»»»» created_time | string(date-time)¦null | false | none | none |
»»»» last_edited_time | string(date-time)¦null | false | none | none |
»»» properties | object | true | none | Feature attributes |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»» anonymous | object | false | none | none |
»»» 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 (lng, lat) |
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 |
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 |
feature_type | record |
feature_table | network_points |
feature_table | nonnetwork_points |
feature_table | network_lines |
feature_table | nonnetwork_lines |
feature_table | nonnetwork_polygons |
type | Point |
type | LineString |
type | Polygon |
Feature query (POST)
Code samples
# You can also use wget
curl -X POST /v2/features/query \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
POST /v2/features/query HTTP/1.1
Content-Type: application/json
Accept: application/json
const inputBody = '{
"area_filters": [
{
"type": "Polygon",
"coordinates": [
[
[
-157.140204,
37.2516
]
]
]
}
],
"plan_ids": [
8
],
"layer_ids": [
14
],
"included_vetro_ids": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('/v2/features/query',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST /features/query
Using the layer_ids, plan_ids, and filter params, fetch features matching the specified filters.
Body parameter
{
"area_filters": [
{
"type": "Polygon",
"coordinates": [
[
[
-157.140204,
37.2516
]
]
]
}
],
"plan_ids": [
8
],
"layer_ids": [
14
],
"included_vetro_ids": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
]
}
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 (defaults to 100, maximum of 50,000) |
order | query | string | false | Specifies the ordering of each attribute of features when querying. Sorts from left to right |
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 search api documentation. |
body | body | object | false | The geometric filters that constrain the features that are included in the result. |
» area_filters | body | [object]¦null | false | An array of Polygon geometries that serve as a geometric filter for this api. |
»» type | body | string | true | Polygon type |
»» coordinates | body | [array] | true | List of polygon coordinate points |
» plan_ids | body | [integer] | false | none |
» layer_ids | body | [integer] | false | none |
» 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. |
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 search api documentation.
Enumerated Values
Parameter | Value |
---|---|
»» type | Polygon |
Example responses
200 Response
{
"success": true,
"result": [
{
"type": "Feature",
"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"
],
"parent_line_vetro_ids": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"child_line_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,
"created_time": "2019-08-24T14:15:22Z",
"last_edited_time": "2019-08-24T14:15:22Z"
},
"properties": {},
"geometry": "string"
}
]
}
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 | [allOf] | false | none | List of vetro features |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»» anonymous | object | false | none | none |
»»» type | string | true | none | Type of feature |
»»» 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) |
»»»» parent_line_vetro_ids | [string] | true | none | Vetro ids of lines that contain this feature (e.g., ducts) |
»»»» child_line_vetro_ids | [string] | true | none | Vetro ids of lines contained inside this feature |
»»»» 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 |
»»»» created_time | string(date-time)¦null | false | none | none |
»»»» last_edited_time | string(date-time)¦null | false | none | none |
»»» properties | object | true | none | Feature attributes |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»» anonymous | object | false | none | none |
»»» 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 (lng, lat) |
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 |
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 |
feature_type | record |
feature_table | network_points |
feature_table | nonnetwork_points |
feature_table | network_lines |
feature_table | nonnetwork_lines |
feature_table | nonnetwork_polygons |
type | Point |
type | LineString |
type | Polygon |
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",
"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"
],
"parent_line_vetro_ids": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"child_line_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,
"created_time": "2019-08-24T14:15:22Z",
"last_edited_time": "2019-08-24T14:15:22Z"
},
"properties": {},
"geometry": "string"
}
]
}
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 | [allOf] | false | none | List of vetro features |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»» anonymous | object | false | none | none |
»»» type | string | true | none | Type of feature |
»»» 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) |
»»»» parent_line_vetro_ids | [string] | true | none | Vetro ids of lines that contain this feature (e.g., ducts) |
»»»» child_line_vetro_ids | [string] | true | none | Vetro ids of lines contained inside this feature |
»»»» 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 |
»»»» created_time | string(date-time)¦null | false | none | none |
»»»» last_edited_time | string(date-time)¦null | false | none | none |
»»» properties | object | true | none | Feature attributes |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»» anonymous | object | false | none | none |
»»» 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 (lng, lat) |
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 |
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 |
feature_type | record |
feature_table | network_points |
feature_table | nonnetwork_points |
feature_table | network_lines |
feature_table | nonnetwork_lines |
feature_table | nonnetwork_polygons |
type | Point |
type | LineString |
type | Polygon |
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) |
bypass_cascade_delete_layer_ids | query | array[integer] | false | ids of child layers to bypass cascading deletion when their parent features are deleted. Note that only some layers support this bypass. Please reach out to the VETRO Support team if you'd like the ability to assign child layers without a parent. |
Example responses
200 Response
{
"success": true,
"result": {
"vetro_ids": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"deletion_event": {
"event_id": 0,
"event_time": "string"
}
}
}
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 | object | false | none | none |
»» vetro_ids | [string] | false | none | Array of vetro ids |
»» deletion_event | object | false | none | none |
»»» event_id | number | false | none | none |
»»» event_time | string | false | none | none |
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": [
-157.140204,
37.2516
]
}
}
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 (lng, lat) |
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",
"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"
],
"parent_line_vetro_ids": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"child_line_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,
"created_time": "2019-08-24T14:15:22Z",
"last_edited_time": "2019-08-24T14:15:22Z"
},
"properties": {},
"geometry": "string"
}
}
],
"descendants": [
{
"path": [
"string"
],
"feature": {
"type": "Feature",
"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"
],
"parent_line_vetro_ids": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"child_line_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,
"created_time": "2019-08-24T14:15:22Z",
"last_edited_time": "2019-08-24T14:15:22Z"
},
"properties": {},
"geometry": "string"
}
}
]
}
}
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 | any | false | none | none |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»»»» anonymous | object | false | none | none |
»»»»» type | string | true | none | Type of feature |
»»»»» 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) |
»»»»»» parent_line_vetro_ids | [string] | true | none | Vetro ids of lines that contain this feature (e.g., ducts) |
»»»»»» child_line_vetro_ids | [string] | true | none | Vetro ids of lines contained inside this feature |
»»»»»» 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 |
»»»»»» created_time | string(date-time)¦null | false | none | none |
»»»»»» last_edited_time | string(date-time)¦null | false | none | none |
»»»»» properties | object | true | none | Feature attributes |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»»»» anonymous | object | false | none | none |
»»»»» 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 (lng, lat) |
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 |
---|---|---|---|---|
»» descendants | [object] | false | none | none |
»»» path | [string] | false | none | none |
»»» feature | any | 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 |
feature_type | record |
feature_table | network_points |
feature_table | nonnetwork_points |
feature_table | network_lines |
feature_table | nonnetwork_lines |
feature_table | nonnetwork_polygons |
type | Point |
type | LineString |
type | Polygon |
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",
"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"
],
"parent_line_vetro_ids": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"child_line_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,
"created_time": "2019-08-24T14:15:22Z",
"last_edited_time": "2019-08-24T14:15:22Z"
},
"properties": {},
"geometry": "string"
}
]
}
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 | [allOf] | false | none | List of vetro features |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»» anonymous | object | false | none | none |
»»» type | string | true | none | Type of feature |
»»» 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) |
»»»» parent_line_vetro_ids | [string] | true | none | Vetro ids of lines that contain this feature (e.g., ducts) |
»»»» child_line_vetro_ids | [string] | true | none | Vetro ids of lines contained inside this feature |
»»»» 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 |
»»»» created_time | string(date-time)¦null | false | none | none |
»»»» last_edited_time | string(date-time)¦null | false | none | none |
»»» properties | object | true | none | Feature attributes |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»» anonymous | object | false | none | none |
»»» 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 (lng, lat) |
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 |
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 |
feature_type | record |
feature_table | network_points |
feature_table | nonnetwork_points |
feature_table | network_lines |
feature_table | nonnetwork_lines |
feature_table | nonnetwork_polygons |
type | Point |
type | LineString |
type | Polygon |
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": [
[
-157.140204,
37.2516
]
]
}
}';
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": [
[
-157.140204,
37.2516
]
]
}
}
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 (lng, lat) |
Enumerated Values
Parameter | Value |
---|---|
»»» type | MultiPoint |
»»» type | Point |
Example responses
200 Response
{
"success": true,
"result": {
"points": [
{
"type": "Feature",
"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"
],
"parent_line_vetro_ids": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"child_line_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,
"created_time": "2019-08-24T14:15:22Z",
"last_edited_time": "2019-08-24T14:15:22Z"
},
"properties": {},
"geometry": "string"
}
],
"lines": [
{
"type": "Feature",
"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"
],
"parent_line_vetro_ids": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"child_line_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,
"created_time": "2019-08-24T14:15:22Z",
"last_edited_time": "2019-08-24T14:15:22Z"
},
"properties": {},
"geometry": "string"
}
]
}
}
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 | [allOf] | true | none | List of vetro features |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»»» anonymous | object | false | none | none |
»»»» type | string | true | none | Type of feature |
»»»» 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) |
»»»»» parent_line_vetro_ids | [string] | true | none | Vetro ids of lines that contain this feature (e.g., ducts) |
»»»»» child_line_vetro_ids | [string] | true | none | Vetro ids of lines contained inside this feature |
»»»»» 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 |
»»»»» created_time | string(date-time)¦null | false | none | none |
»»»»» last_edited_time | string(date-time)¦null | false | none | none |
»»»» properties | object | true | none | Feature attributes |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»»» anonymous | object | false | none | none |
»»»» 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 (lng, lat) |
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 |
---|---|---|---|---|
»» lines | [allOf] | true | none | List of vetro features |
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 |
feature_type | record |
feature_table | network_points |
feature_table | nonnetwork_points |
feature_table | network_lines |
feature_table | nonnetwork_lines |
feature_table | nonnetwork_polygons |
type | Point |
type | LineString |
type | Polygon |
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",
"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"
],
"parent_line_vetro_ids": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"child_line_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,
"created_time": "2019-08-24T14:15:22Z",
"last_edited_time": "2019-08-24T14:15:22Z"
},
"properties": {},
"geometry": "string"
},
"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 | any | true | none | none |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»»»» anonymous | object | false | none | none |
»»»»» type | string | true | none | Type of feature |
»»»»» 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) |
»»»»»» parent_line_vetro_ids | [string] | true | none | Vetro ids of lines that contain this feature (e.g., ducts) |
»»»»»» child_line_vetro_ids | [string] | true | none | Vetro ids of lines contained inside this feature |
»»»»»» 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 |
»»»»»» created_time | string(date-time)¦null | false | none | none |
»»»»»» last_edited_time | string(date-time)¦null | false | none | none |
»»»»» properties | object | true | none | Feature attributes |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»»»» anonymous | object | false | none | none |
»»»»» 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 (lng, lat) |
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 |
---|---|---|---|---|
»»» 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 |
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_type | record |
feature_table | network_points |
feature_table | nonnetwork_points |
feature_table | network_lines |
feature_table | nonnetwork_lines |
feature_table | nonnetwork_polygons |
type | Point |
type | LineString |
type | Polygon |
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",
"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"
],
"parent_line_vetro_ids": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"child_line_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,
"created_time": "2019-08-24T14:15:22Z",
"last_edited_time": "2019-08-24T14:15:22Z"
},
"properties": {},
"geometry": "string"
}
]
}
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 | [allOf] | false | none | List of vetro features |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»» anonymous | object | false | none | none |
»»» type | string | true | none | Type of feature |
»»» 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) |
»»»» parent_line_vetro_ids | [string] | true | none | Vetro ids of lines that contain this feature (e.g., ducts) |
»»»» child_line_vetro_ids | [string] | true | none | Vetro ids of lines contained inside this feature |
»»»» 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 |
»»»» created_time | string(date-time)¦null | false | none | none |
»»»» last_edited_time | string(date-time)¦null | false | none | none |
»»» properties | object | true | none | Feature attributes |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»» anonymous | object | false | none | none |
»»» 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 (lng, lat) |
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 |
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 |
feature_type | record |
feature_table | network_points |
feature_table | nonnetwork_points |
feature_table | network_lines |
feature_table | nonnetwork_lines |
feature_table | nonnetwork_polygons |
type | Point |
type | LineString |
type | Polygon |
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",
"area_filters": [
{
"type": "Polygon",
"coordinates": [
[
[
-157.140204,
37.2516
]
]
]
}
],
"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",
"area_filters": [
{
"type": "Polygon",
"coordinates": [
[
[
-157.140204,
37.2516
]
]
]
}
],
"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. |
» area_filters | body | [object]¦null | false | An array of Polygon geometries that serve as a geometric filter for this api. |
»» type | body | string | true | Polygon type |
»» coordinates | body | [array] | true | List of polygon coordinate points |
» 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 |
Enumerated Values
Parameter | Value |
---|---|
»» type | Polygon |
Example responses
200 Response
{}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successfully initiated update. Progress is relayed via sockets. | Inline |
Response Schema
Get Inheriting Parents
Code samples
# You can also use wget
curl -X GET /v2/features/inheritance/{vetro_id} \
-H 'Accept: application/json'
GET /v2/features/inheritance/{vetro_id} HTTP/1.1
Accept: application/json
const headers = {
'Accept':'application/json'
};
fetch('/v2/features/inheritance/{vetro_id}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
GET /features/inheritance/{vetro_id}
This returns the features from which the specified feature has inherited attributes.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
vetro_id | path | string(uuid) | true | Vetro id (uuid) |
Example responses
200 Response
{
"success": true,
"result": [
{
"destination_attribute_label": "Zone Status",
"source_attribute_label": "Status",
"source_features": [
{
"type": "Feature",
"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"
],
"parent_line_vetro_ids": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"child_line_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,
"created_time": "2019-08-24T14:15:22Z",
"last_edited_time": "2019-08-24T14:15:22Z"
},
"properties": {},
"geometry": "string"
}
]
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | An array of features that the specified feature inherits from. | 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 |
»» destination_attribute_label | string | false | none | none |
»» source_attribute_label | string | false | none | none |
»» source_features | [anyOf] | false | none | none |
anyOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»»» anonymous | any | false | none | none |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»»»» anonymous | object | false | none | none |
»»»»» type | string | true | none | Type of feature |
»»»»» 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) |
»»»»»» parent_line_vetro_ids | [string] | true | none | Vetro ids of lines that contain this feature (e.g., ducts) |
»»»»»» child_line_vetro_ids | [string] | true | none | Vetro ids of lines contained inside this feature |
»»»»»» 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 |
»»»»»» created_time | string(date-time)¦null | false | none | none |
»»»»»» last_edited_time | string(date-time)¦null | false | none | none |
»»»»» properties | object | true | none | Feature attributes |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»»»» anonymous | object | false | none | none |
»»»»» 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 (lng, lat) |
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 |
or
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»»» anonymous | object | false | none | A feature managed outside of Vetro Fibermap, e.g., census block data. External features are non-editable and have more limited functionality compared to Vetro Features. |
»»»» 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 |
---|---|
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_type | record |
feature_table | network_points |
feature_table | nonnetwork_points |
feature_table | network_lines |
feature_table | nonnetwork_lines |
feature_table | nonnetwork_polygons |
type | Point |
type | LineString |
type | Polygon |
type | MultiPoint |
type | MultiLineString |
type | MultiPolygon |
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 search api documentation. |
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 search api documentation.
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 search api documentation. |
included_vetro_ids | query | array[string] | false | This parameter will limit the results of this request to features with these vetro ids. |
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 search api documentation.
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 |
Count Of Features (POST)
Code samples
# You can also use wget
curl -X POST /v2/features/count/layer/{layer_id} \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
POST /v2/features/count/layer/{layer_id} HTTP/1.1
Content-Type: application/json
Accept: application/json
const inputBody = '{
"area_filters": [
{
"type": "Polygon",
"coordinates": [
[
[
-157.140204,
37.2516
]
]
]
}
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('/v2/features/count/layer/{layer_id}',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST /features/count/layer/{layer_id}
This returns the total count of features in the specified layer that match the specified parameters.
Body parameter
{
"area_filters": [
{
"type": "Polygon",
"coordinates": [
[
[
-157.140204,
37.2516
]
]
]
}
]
}
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 search api documentation. |
included_vetro_ids | query | array[string] | false | This parameter will limit the results of this request to features with these vetro ids. |
body | body | object | false | The geometric filters that constrain the features which are counted in the response. |
» area_filters | body | [object]¦null | false | An array of Polygon geometries that serve as a geometric filter for this api. |
»» type | body | string | true | Polygon type |
»» coordinates | body | [array] | true | List of polygon coordinate points |
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 search api documentation.
Enumerated Values
Parameter | Value |
---|---|
»» type | Polygon |
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",
"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"
],
"parent_line_vetro_ids": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"child_line_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,
"created_time": "2019-08-24T14:15:22Z",
"last_edited_time": "2019-08-24T14:15:22Z"
},
"properties": {},
"geometry": "string"
}
}
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 | any | false | none | none |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»» anonymous | object | false | none | none |
»»» type | string | true | none | Type of feature |
»»» 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) |
»»»» parent_line_vetro_ids | [string] | true | none | Vetro ids of lines that contain this feature (e.g., ducts) |
»»»» child_line_vetro_ids | [string] | true | none | Vetro ids of lines contained inside this feature |
»»»» 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 |
»»»» created_time | string(date-time)¦null | false | none | none |
»»»» last_edited_time | string(date-time)¦null | false | none | none |
»»» properties | object | true | none | Feature attributes |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»» anonymous | object | false | none | none |
»»» 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 (lng, lat) |
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 |
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 |
feature_type | record |
feature_table | network_points |
feature_table | nonnetwork_points |
feature_table | network_lines |
feature_table | nonnetwork_lines |
feature_table | nonnetwork_polygons |
type | Point |
type | LineString |
type | Polygon |
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 |
Get Records Without Parent
Code samples
# You can also use wget
curl -X GET /v2/features/records/without_parent/{layer_id} \
-H 'Accept: application/json'
GET /v2/features/records/without_parent/{layer_id} HTTP/1.1
Accept: application/json
const headers = {
'Accept':'application/json'
};
fetch('/v2/features/records/without_parent/{layer_id}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
GET /features/records/without_parent/{layer_id}
Get an Array of Records that don't have a parent.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
layer_id | path | integer | true | layer id |
limit | query | integer | false | Number of Records to return (Default of 100, maximum of 50,000) |
offset | query | integer | false | Number of records to skip (Default of 0, minimum of 0) |
Example responses
200 Response
{
"success": true,
"result": [
{
"type": "Feature",
"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"
],
"parent_line_vetro_ids": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"child_line_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,
"created_time": "2019-08-24T14:15:22Z",
"last_edited_time": "2019-08-24T14:15:22Z"
},
"properties": {},
"geometry": "string"
}
]
}
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 | [allOf] | false | none | List of vetro features |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»» anonymous | object | false | none | none |
»»» type | string | true | none | Type of feature |
»»» 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) |
»»»» parent_line_vetro_ids | [string] | true | none | Vetro ids of lines that contain this feature (e.g., ducts) |
»»»» child_line_vetro_ids | [string] | true | none | Vetro ids of lines contained inside this feature |
»»»» 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 |
»»»» created_time | string(date-time)¦null | false | none | none |
»»»» last_edited_time | string(date-time)¦null | false | none | none |
»»» properties | object | true | none | Feature attributes |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»» anonymous | object | false | none | none |
»»» 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 (lng, lat) |
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 |
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 |
feature_type | record |
feature_table | network_points |
feature_table | nonnetwork_points |
feature_table | network_lines |
feature_table | nonnetwork_lines |
feature_table | nonnetwork_polygons |
type | Point |
type | LineString |
type | Polygon |
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 |
Check Hardware in Use
Code samples
# You can also use wget
curl -X GET /v2/hardware/templates/{hardware_template_id}/in_use \
-H 'Accept: application/json'
GET /v2/hardware/templates/{hardware_template_id}/in_use HTTP/1.1
Accept: application/json
const headers = {
'Accept':'application/json'
};
fetch('/v2/hardware/templates/{hardware_template_id}/in_use',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
GET /hardware/templates/{hardware_template_id}/in_use
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
hardware_template_id | path | integer | true | Hardware template id |
Example responses
200 Response
{
"success": true,
"result": true
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | A boolean indicating whether the hardware exists on any features. | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» success | boolean | false | none | none |
» result | boolean | 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 | true | 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",
"fixed_cost": 0
}
]
}
}
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 |
»»» fixed_cost | number¦null | true | none | \ A fixed cost is used in the context of labor that has both a distance-based and per-item-based cost associated with it. \ The fixed cost will hold the per-item cost. If an items unit_cost_metric is "each", this should be 0 or null. |
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,
"fixed_cost": 0,
"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,
"fixed_cost": 0,
"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 |
»» fixed_cost | body | number¦null | false | \ A fixed cost is used in the context of labor that has both a distance-based and per-item-based cost associated with it. \ The fixed cost will hold the per-item cost. If an items unit_cost_metric is "each", this should be 0 or null. |
»» 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",
"fixed_cost": 0
}
]
}
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 |
»» fixed_cost | number¦null | true | none | \ A fixed cost is used in the context of labor that has both a distance-based and per-item-based cost associated with it. \ The fixed cost will hold the per-item cost. If an items unit_cost_metric is "each", this should be 0 or null. |
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,
"fixed_cost": 0,
"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,
"fixed_cost": 0,
"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 |
»» fixed_cost | body | number¦null | false | \ A fixed cost is used in the context of labor that has both a distance-based and per-item-based cost associated with it. \ The fixed cost will hold the per-item cost. If an items unit_cost_metric is "each", this should be 0 or null. |
»» 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",
"fixed_cost": 0
}
]
}
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 |
»» fixed_cost | number¦null | true | none | \ A fixed cost is used in the context of labor that has both a distance-based and per-item-based cost associated with it. \ The fixed cost will hold the per-item cost. If an items unit_cost_metric is "each", this should be 0 or null. |
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,
"fixed_cost": 0,
"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 |
»» fixed_cost | number¦null | true | none | \ A fixed cost is used in the context of labor that has both a distance-based and per-item-based cost associated with it. \ The fixed cost will hold the per-item cost. If an items unit_cost_metric is "each", this should be 0 or null. |
»» 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 |
Check Labor in Use
Code samples
# You can also use wget
curl -X GET /v2/labor/templates/{labor_template_id}/in_use \
-H 'Accept: application/json'
GET /v2/labor/templates/{labor_template_id}/in_use HTTP/1.1
Accept: application/json
const headers = {
'Accept':'application/json'
};
fetch('/v2/labor/templates/{labor_template_id}/in_use',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
GET /labor/templates/{labor_template_id}/in_use
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
labor_template_id | path | integer | true | Labor template id |
Example responses
200 Response
{
"success": true,
"result": true
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | A boolean indicating whether the labor has been applied to any features. | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» success | boolean | false | none | none |
» result | boolean | false | none | none |
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",
"fixed_cost": 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
],
"created_time": "2019-08-24T14:15:22Z",
"updated_time": "2019-08-24T14:15:22Z",
"fixed_cost": 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 |
»»» created_time | string(date-time) | true | none | none |
»»» updated_time | string(date-time)¦null | true | none | none |
»»» fixed_cost | number¦null | true | none | \ A fixed cost is used in the context of labor that has both a distance-based and per-item-based cost associated with it. \ The fixed cost will hold the per-item cost. If an items unit_cost_metric is "each", this should be 0 or null. |
»» 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",
"fixed_cost": 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 |
»»» created_time | string(date-time) | true | none | none |
»»» updated_time | string(date-time)¦null | true | none | none |
»»» fixed_cost | number¦null | true | none | \ A fixed cost is used in the context of labor that has both a distance-based and per-item-based cost associated with it. \ The fixed cost will hold the per-item cost. If an items unit_cost_metric is "each", this should be 0 or null. |
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": {
"id": 0,
"default_value": null,
"display_order": 0,
"html_element": "textarea",
"html_input_type": "radio",
"is_required": true,
"maximum": 0,
"minimum": 0,
"source_layer_id": 44,
"permitted_values": [
"Low",
"Medium",
"High"
],
"display_format": "currency",
"is_expense_size_attribute": true
},
"property2": {
"id": 0,
"default_value": null,
"display_order": 0,
"html_element": "textarea",
"html_input_type": "radio",
"is_required": true,
"maximum": 0,
"minimum": 0,
"source_layer_id": 44,
"permitted_values": [
"Low",
"Medium",
"High"
],
"display_format": "currency",
"is_expense_size_attribute": true
}
},
"style": {
"layer_id": 14,
"symbols": {
"property1": {
"fill_color": "string",
"fill_opacity": 1,
"icon_class": "vetro",
"icon_size": 5,
"stroke_color": "string",
"stroke_dasharray": "string",
"stroke_opacity": 1,
"stroke_weight": 1,
"display_order": 0
},
"property2": {
"fill_color": "string",
"fill_opacity": 1,
"icon_class": "vetro",
"icon_size": 5,
"stroke_color": "string",
"stroke_dasharray": "string",
"stroke_opacity": 1,
"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_oid": "string",
"external_vector_source_id": "string",
"has_external_auth": true,
"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 |
»»»»» id | integer | 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 |
»»»»» source_layer_id | number¦null | false | none | The layer id of the layer from which this attribute has been inherited. Null unless this attribute is inherited. |
»»»»» 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_oid | string¦null | false | none | the property that uniquely identifies each vector feature |
»»» external_vector_source_id | string¦null | false | none | the name of the source layer to use with an external vector tileset. |
»»» has_external_auth | boolean | true | none | whether the layer requires additional authenication to retrieve its features, e.g., an authenticated ArcGis FeatureServer. |
»»» 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 |
feature_type | record |
external_source_type | vector |
external_source_type | raster |
external_source_type | geojson |
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": 1,
"icon_class": "vetro",
"icon_size": 5,
"stroke_color": "string",
"stroke_dasharray": "string",
"stroke_opacity": 1,
"stroke_weight": 1,
"display_order": 0
},
"external": {
"url": "string",
"source_type": "vector",
"raster_scheme": null,
"vector_oid": "string",
"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": 1,
"icon_class": "vetro",
"icon_size": 5,
"stroke_color": "string",
"stroke_dasharray": "string",
"stroke_opacity": 1,
"stroke_weight": 1,
"display_order": 0
},
"external": {
"url": "string",
"source_type": "vector",
"raster_scheme": null,
"vector_oid": "string",
"vector_source_id": "string"
}
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | object | true | none |
» category_id | body | integer | true | The id of the layer category to which the layer belongs. |
» label | body | string | true | The name of the layer. |
» geom_type | body | string | true | 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_oid | body | string¦null | false | the property that uniquely identifies each vector feature |
»» 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 |
»» source_type | geojson |
»» raster_scheme | null |
»» raster_scheme | tms |
»» raster_scheme | xyz |
»» raster_scheme | tc |
Example responses
200 Response
{
"success": true,
"result": {
"id": 43,
"available_attributes": {
"property1": {
"id": 0,
"default_value": null,
"display_order": 0,
"html_element": "textarea",
"html_input_type": "radio",
"is_required": true,
"maximum": 0,
"minimum": 0,
"source_layer_id": 44,
"permitted_values": [
"Low",
"Medium",
"High"
],
"display_format": "currency",
"is_expense_size_attribute": true
},
"property2": {
"id": 0,
"default_value": null,
"display_order": 0,
"html_element": "textarea",
"html_input_type": "radio",
"is_required": true,
"maximum": 0,
"minimum": 0,
"source_layer_id": 44,
"permitted_values": [
"Low",
"Medium",
"High"
],
"display_format": "currency",
"is_expense_size_attribute": true
}
},
"style": {
"layer_id": 14,
"symbols": {
"property1": {
"fill_color": "string",
"fill_opacity": 1,
"icon_class": "vetro",
"icon_size": 5,
"stroke_color": "string",
"stroke_dasharray": "string",
"stroke_opacity": 1,
"stroke_weight": 1,
"display_order": 0
},
"property2": {
"fill_color": "string",
"fill_opacity": 1,
"icon_class": "vetro",
"icon_size": 5,
"stroke_color": "string",
"stroke_dasharray": "string",
"stroke_opacity": 1,
"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_oid": "string",
"external_vector_source_id": "string",
"has_external_auth": true,
"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 |
»»»» id | integer | 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 |
»»»» source_layer_id | number¦null | false | none | The layer id of the layer from which this attribute has been inherited. Null unless this attribute is inherited. |
»»»» 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_oid | string¦null | false | none | the property that uniquely identifies each vector feature |
»» external_vector_source_id | string¦null | false | none | the name of the source layer to use with an external vector tileset. |
»» has_external_auth | boolean | true | none | whether the layer requires additional authenication to retrieve its features, e.g., an authenticated ArcGis FeatureServer. |
»» 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 |
feature_type | record |
external_source_type | vector |
external_source_type | raster |
external_source_type | geojson |
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": {
"id": 0,
"default_value": null,
"display_order": 0,
"html_element": "textarea",
"html_input_type": "radio",
"is_required": true,
"maximum": 0,
"minimum": 0,
"source_layer_id": 44,
"permitted_values": [
"Low",
"Medium",
"High"
],
"display_format": "currency",
"is_expense_size_attribute": true
},
"property2": {
"id": 0,
"default_value": null,
"display_order": 0,
"html_element": "textarea",
"html_input_type": "radio",
"is_required": true,
"maximum": 0,
"minimum": 0,
"source_layer_id": 44,
"permitted_values": [
"Low",
"Medium",
"High"
],
"display_format": "currency",
"is_expense_size_attribute": true
}
},
"style": {
"layer_id": 14,
"symbols": {
"property1": {
"fill_color": "string",
"fill_opacity": 1,
"icon_class": "vetro",
"icon_size": 5,
"stroke_color": "string",
"stroke_dasharray": "string",
"stroke_opacity": 1,
"stroke_weight": 1,
"display_order": 0
},
"property2": {
"fill_color": "string",
"fill_opacity": 1,
"icon_class": "vetro",
"icon_size": 5,
"stroke_color": "string",
"stroke_dasharray": "string",
"stroke_opacity": 1,
"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_oid": "string",
"external_vector_source_id": "string",
"has_external_auth": true,
"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 |
»»»» id | integer | 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 |
»»»» source_layer_id | number¦null | false | none | The layer id of the layer from which this attribute has been inherited. Null unless this attribute is inherited. |
»»»» 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_oid | string¦null | false | none | the property that uniquely identifies each vector feature |
»» external_vector_source_id | string¦null | false | none | the name of the source layer to use with an external vector tileset. |
»» has_external_auth | boolean | true | none | whether the layer requires additional authenication to retrieve its features, e.g., an authenticated ArcGis FeatureServer. |
»» 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 |
feature_type | record |
external_source_type | vector |
external_source_type | raster |
external_source_type | geojson |
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}/sort \
-H 'Accept: application/json'
PATCH /v2/layers/layer/{id}/sort HTTP/1.1
Accept: application/json
const headers = {
'Accept':'application/json'
};
fetch('/v2/layers/layer/{id}/sort',
{
method: 'PATCH',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
PATCH /layers/layer/{id}/sort
Update the sort order 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 |
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 |
Change Category
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": 1,
"icon_class": "vetro",
"icon_size": 5,
"stroke_color": "string",
"stroke_dasharray": "string",
"stroke_opacity": 1,
"stroke_weight": 1,
"display_order": 0
},
"property2": {
"fill_color": "string",
"fill_opacity": 1,
"icon_class": "vetro",
"icon_size": 5,
"stroke_color": "string",
"stroke_dasharray": "string",
"stroke_opacity": 1,
"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": 1,
"icon_class": "vetro",
"icon_size": 5,
"stroke_color": "string",
"stroke_dasharray": "string",
"stroke_opacity": 1,
"stroke_weight": 1,
"display_order": 0
},
"property2": {
"fill_color": "string",
"fill_opacity": 1,
"icon_class": "vetro",
"icon_size": 5,
"stroke_color": "string",
"stroke_dasharray": "string",
"stroke_opacity": 1,
"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": 1,
"icon_class": "vetro",
"icon_size": 5,
"stroke_color": "string",
"stroke_dasharray": "string",
"stroke_opacity": 1,
"stroke_weight": 1,
"display_order": 0
},
"property2": {
"fill_color": "string",
"fill_opacity": 1,
"icon_class": "vetro",
"icon_size": 5,
"stroke_color": "string",
"stroke_dasharray": "string",
"stroke_opacity": 1,
"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": 1,
"icon_class": "vetro",
"icon_size": 5,
"stroke_color": "string",
"stroke_dasharray": "string",
"stroke_opacity": 1,
"stroke_weight": 1,
"display_order": 0
},
"property2": {
"fill_color": "string",
"fill_opacity": 1,
"icon_class": "vetro",
"icon_size": 5,
"stroke_color": "string",
"stroke_dasharray": "string",
"stroke_opacity": 1,
"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": [
{
"id": 0,
"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 |
»» id | integer | true | 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": {
"id": 0,
"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 |
»» id | integer | true | 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 |
Validate Geometries of a Layer
Code samples
# You can also use wget
curl -X GET /v2/layers/{id}/validate \
-H 'Accept: application/json'
GET /v2/layers/{id}/validate HTTP/1.1
Accept: application/json
const headers = {
'Accept':'application/json'
};
fetch('/v2/layers/{id}/validate',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
GET /layers/{id}/validate
Retrieve the vetro ids of features with invalid geometries 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": "00a18151-d047-4db5-a825-c5c3ac603650"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The results of validation on the layer | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» success | boolean | false | none | Success status of the request |
» result | [string] | false | none | Vetro ids of layer features with invalid geometry |
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 |