IEEE.org     |     IEEE Xplore Digital Library     |     IEEE Standards     |     IEEE Spectrum     |     More Sites

Unverified Commit 0b3176f4 authored by tilley14's avatar tilley14 Committed by GitHub
Browse files

Merge pull request #79 from my-conservation-life/import-api-docs

Documentation for import CSV related API endpoints
parents 7004ca53 8806db00
{
"/csv": {
"put": {
"requestBody": {
"description": "A CSV file containing asset data",
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"assetTypeId": {
"type": "integer"
},
"csv": {
"type": "string",
"format": "binary"
}
}
},
"examples": {
"import-csv-example": {
"summary": "Importing data with a valid CSV",
"description": "CSV containing data to be stored",
"value": {
"asset_type_id": 3,
"csv": "fire.csv"
}
}
}
}
}
}
}
}
}
{
"Asset": {
"type": "object",
"required": [
"id",
"project_id",
"asset_type_id"
],
"properties": {
"id": {
"type": "bigint",
"description": "the ID of the asset"
},
"project_id": {
"type": "integer",
"description": "the ID of the project tracking the asset"
},
"asset_type_id": {
"type": "integer",
"description": "the ID of the asset type that the asset belongs to"
},
"location": {
"type": "geometry",
"description": "the location of the asset"
}
}
}
}
{
"Asset Property": {
"type": "object",
"required": [
"asset_id",
"property_id"
],
"properties": {
"asset_id": {
"type": "bigint",
"description": "The asset associated with the property"
},
"property_id": {
"type": "integer",
"description": "The property the asset possesses"
},
"value": {
"type": "string",
"description": "Value of the property for a particular asset"
}
}
}
}
{
"Property": {
"type": "object",
"required": [
"id",
"asset_type_id",
"data_type"
],
"properties": {
"id": {
"type": "integer",
"description": "the unique ID of the property"
},
"asset_type_id": {
"type": "integer",
"description": "the ID of the asset type possessing the property"
},
"data_type": {
"type": "string",
"description": "the data type of the information that the property tracks"
},
"name": {
"type": "string",
"description": "the name of the property"
},
"required": {
"type": "boolean",
"description": "tell whether the property is required to be stored for all assets possessing the property"
},
"is_private": {
"type": "boolean",
"description": "tell whether this property should be private from the general public"
}
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment