> ## Documentation Index > Fetch the complete documentation index at: https://support.keypro.fi/llms.txt > Use this file to discover all available pages before exploring further. # Create new Survey file > Operation is used to create new Survey file. Available from product version 2024.3. ## OpenAPI ````json POST /survey-files/ { "openapi": "3.0.4", "info": { "title": "KeyLight REST API", "termsOfService": "https://www.keypro.fi/en/terms-of-service", "contact": { "name": "Keypro Oy", "url": "https://keypro.fi/", "email": "keypro@keypro.fi" }, "license": { "name": "Copyright (C) Keypro Oy. All rights reserved.", "url": "https://www.keypro.fi/" }, "version": "2.0.0" }, "servers": [ { "url": "/api/v2" } ], "tags": [ { "name": "Plan", "description": "Plan related operations." }, { "name": "FreeArea", "description": "FreeArea related operations." }, { "name": "FreeLine", "description": "FreeLine related operations." }, { "name": "FreeText", "description": "FreeText related operations." }, { "name": "FreeTextComponent", "description": "FreeText component related operations." }, { "name": "Address", "description": "Building address related operations." }, { "name": "Apartment", "description": "Building apartments related operations." }, { "name": "Extra Attribute", "description": "Extra attributes related operations." }, { "name": "Extra Value", "description": "Extra attribute values related operations." }, { "name": "EAV Enum", "description": "EAV Enum value related operations." }, { "name": "EAV Enum Group", "description": "EAV Enum group related operations." }, { "name": "External Document", "description": "External documents related operations." }, { "name": "Attached Document", "description": "Attached Documents related operations." }, { "name": "Collections", "description": "Collection related operations." }, { "name": "Source system apartment", "description": "External source system derived apartment related operations." }, { "name": "Source system address", "description": "External source system derived address related operations." }, { "name": "Address alias", "description": "Address aliases related operations" }, { "name": "TxtConstant", "description": "TxtConstants related operations." }, { "name": "Point", "description": "Point objects related operations." }, { "name": "Survey Constant", "description": "Survey Constants related operations." }, { "name": "Survey Point", "description": "Survey Points related operations." }, { "name": "Survey Line String", "description": "Survey Line Strings related operations." }, { "name": "Template Catalog", "description": "Template Catalog related operations." }, { "name": "Route Following", "description": "Route following related operations." }, { "name": "Contact Person", "description": "Contact person related operations." }, { "name": "Contact Person Connection", "description": "Contact person connection related operations." }, { "name": "Electric Premises", "description": "Electric Premises related operations." }, { "name": "Electric Fuse", "description": "Fuse related operations." }, { "name": "Electric Splice", "description": "Electric Splice related operations." }, { "name": "Electric Manhole", "description": "Electric Manhole related operations." }, { "name": "Electric Point Object", "description": "Other electric point objects related operations." }, { "name": "Electric Pole", "description": "Electric Pole related operations." }, { "name": "Streetlight", "description": "Streetlight related operations." }, { "name": "Traffic Signal", "description": "Traffic signal related operations." }, { "name": "Electric Cable", "description": "Electric Cable related operations." }, { "name": "Electric Cable Connection", "description": "Operations related to connecting Electric Cables and Electric endpoints(Streetlights, Splices, Premises)." }, { "name": "Electric Conduit", "description": "Electric Conduit related operations." }, { "name": "Electric Conduit Link", "description": "Operations related to putting Electric Cables and Ducts into Conduits." }, { "name": "Electric Conduit Connection", "description": "Operations related to connecting Conduits and endpoints(Streetlights, Splices, Premises)." }, { "name": "Electric Duct", "description": "Electric Duct related operations." }, { "name": "Electric Duct Link", "description": "Operations related to putting Electric Cables into Ducts." }, { "name": "Electric Routefollower", "description": "Electric Routefollower related operations." }, { "name": "Task", "description": "Task related operations." }, { "name": "Subregion", "description": "Subregion related operations." }, { "name": "SAttribute", "description": "SAttribute related operations." }, { "name": "Fault", "description": "Fault related operations." }, { "name": "Maintenance history", "description": "Maintenance history related operations." }, { "name": "Deflection", "description": "Deflection related operations." }, { "name": "Fault Component", "description": "Fault Component related operations." }, { "name": "Task Comment", "description": "Task comment related operations." }, { "name": "FaultComponentFault", "description": "FaultComponentFault related operations." } ], "paths": { "/survey-files/": { "post": { "tags": [ "Survey File" ], "summary": "Create new Survey file", "description": "Operation is used to create new Survey file. Available from product version 2024.3.\n", "operationId": "createSurveyFile", "requestBody": { "description": "Survey file to be created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FlatSurveyFile" } } }, "required": true, "x-bodyName": "Survey File" }, "responses": { "201": { "description": "A newly created Survey file", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FlatSurveyFile" }, "example": { "combinePoint": true, "combinePointNumber": false, "coordinateOrder": 800, "createdBy": "example.user", "createdDate": "2024-05-14T08:32:26.716237", "fileName": "test.txt", "hashCode": "73c539a1265ecea4da6e2936a21d3b648da0c683", "heightAccuracy": 210, "historyDate": "2024-05-14", "id": 1919021, "identification": "test", "inputSrs": "3067", "kindCode": 801, "locationAccuracy": 3019, "mapper": "example.mapper", "mappingConfig": 1, "mappingMethod": 3015, "name": "test", "operator": 621, "plan": null, "procedure": 81, "processed": true, "rawText": "0 1 2310 29 6940066.737 662608.394 0.000 0\r\n0 1 2310 30 6940079.681 662633.697 0.000 0\r\n0 1 2310 31 6940091.115 662657.592 0.000 0\r\n0 1 2310 32 6940095.332 662663.369 0.000 0\r\n0 1 2310 33 6940097.127 662666.554 0.000 0\r\n0 1 2310 34 6940097.387 662668.499 0.000 0\r\n0 1 2310 35 6940098.338 662669.326 0.000 0\r\n0 1 2310 36 6940099.784 662672.116 0.000 0\r\n0 1 2310 37 6940100.676 662674.610 0.000 0\r\n0 1 2310 38 6940111.111 662694.414 0.000 0\r\n0 1 2310 39 6940138.112 662744.359 0.000 0\r\n0 1 2310 40 6940144.218 662755.741 0.000 0\r\n0 1 2310 41 6940153.005 662769.017 0.000 0\r\n0 1 2310 42 6940158.065 662775.159 0.000 0\r\n0 1 2310 43 6940160.829 662778.160 0.000 0\r\n0 1 2310 44 6940172.380 662795.760 0.000 0\r\n0 1 2310 45 6940179.898 662807.504 0.000 0\r\n0 1 2310 46 6940196.485 662829.526 0.000 0\r\n0 1 2310 47 6940206.959 662840.947 0.000 0\r\n0 1 2310 48 6940221.305 662854.917 0.000 0\r\n0 1 2310 49 6940238.199 662870.187 0.000 0\r\n0 1 2310 50 6940251.578 662882.408 0.000 0\r\n0 1 2310 51 6940264.041 662891.856 0.000 0\r\n0 1 2310 52 6940273.706 662897.280 0.000 0\r\n0 1 2310 53 6940287.255 662901.589 0.000 0\r\n0 1 2310 54 6940297.418 662903.950 0.000 0\r\n0 1 2310 55 6940310.539 662907.235 0.000 0\r\n0 2 2310 56 6940310.541 662907.197 0.000 0\r\n0 2 2310 57 6940319.398 662910.872 0.000 0\r\n0 2 2310 58 6940323.685 662913.424 0.000 0\r\n0 2 2310 59 6940328.088 662917.001 0.000 0\r\n0 2 2310 60 6940335.853 662923.723 0.000 0\r\n0 2 2310 61 6940339.609 662926.500 0.000 0\r\n0 2 2310 62 6940344.559 662930.090 0.000 0\r\n0 2 2310 63 6940347.224 662930.826 0.000 0\r\n0 2 2310 64 6940349.451 662931.806 0.000 0\r\n0 2 2310 65 6940352.965 662937.173 0.000 0\r\n0 2 2310 66 6940353.703 662938.371 0.000 0\r\n0 2 2310 67 6940352.113 662944.365 0.000 0\r\n0 2 2310 68 6940351.603 662947.021 0.000 0\r\n0 5 2310 75 6940351.574 662947.033 0.000 0\r\n0 5 2310 76 6940352.823 662950.725 0.000 0\r\n0 5 2310 77 6940363.064 662976.966 0.000 0\r\n0 5 2310 78 6940364.156 662977.542 0.000 0\r\n0 6 2511 79 6940364.157 662977.534 0.000 0\r\n0 6 2511 80 6940369.190 662984.543 0.000 0\r\n0 7 2310 81 6940369.183 662984.531 0.000 0\r\n0 7 2310 82 6940370.953 662985.797 0.000 0\r\n0 7 2310 83 6940373.828 662991.002 0.000 0\r\n0 7 2310 84 6940375.777 662998.734 0.000 0\r\n0 7 2310 85 6940376.106 663003.833 0.000 0\r\n0 7 2310 86 6940378.400 663008.731 0.000 0\r\n0 8 2511 87 6940378.421 663008.738 0.000 0\r\n0 8 2511 88 6940390.370 663029.613 0.000 0\r\n0 8 2511 89 6940400.388 663046.025 0.000 0\r\n0 8 2511 90 6940402.650 663047.581 0.000 0\r\n0 8 2511 91 6940405.137 663047.422 0.000 0\r\n0 8 2511 92 6940414.741 663063.170 0.000 0\r\n0 8 2511 93 6940415.037 663065.416 0.000 0\r\n0 8 2511 94 6940416.103 663069.682 0.000 0\r\n0 8 2511 95 6940419.641 663077.178 0.000 0\r\n0 8 2511 96 6940428.695 663094.293 0.000 0\r\n0 8 2511 97 6940435.714 663105.237 0.000 0\r\n0 8 2511 98 6940441.397 663114.925 0.000 0\r\n0 8 2511 99 6940445.110 663119.128 0.000 0\r\n0 8 2511 100 6940449.167 663122.871 0.000 0\r\n0 8 2511 101 6940457.013 663126.287 0.000 0\r\n0 8 2511 102 6940460.522 663127.156 0.000 0\r\n0 8 2511 103 6940462.288 663126.532 0.000 0\r\n0 8 2511 104 6940463.244 663123.771 0.000 0\r\n0 8 2511 105 6940463.028 663122.462 0.000 0", "srid": 3067, "surveyAmount": 10, "updatedBy": "example.user", "updatedDate": "2024-05-14T08:32:26.716237" } } } }, "400": { "description": "There was an error in request. Usually field validation failed.", "content": { "application/json": { "schema": { "minProperties": 1, "type": "object", "additionalProperties": { "type": "array", "items": { "type": "string", "description": "Validation error" }, "description": "List of validation errors for this field name" }, "description": "Fields which failed validation" }, "example": { "surveyAmount": [ "A valid integer is required." ] } } } }, "401": { "$ref": "#/components/responses/Http401" } }, "security": [ { "Token": [] } ] } } }, "components": { "schemas": { "FlatSurveyFile": { "required": [ "operator", "procedure" ], "type": "object", "properties": { "combinePoint": { "type": "boolean", "description": "Is survey file processed to have combined point" }, "combinePointNumber": { "type": "boolean", "description": "Is survey file processed to have combined point number" }, "coordinateFile": { "type": "string", "description": "coordinate file attached to the survey file", "format": "binary" }, "coordinateOrder": { "type": "integer", "description": "Unique id of survey constant. required if KEYCONVERT_MAPPING_CONFIG_ENABLED is false and coordinateFile is provided." }, "createdBy": { "type": "string", "description": "created by user", "readOnly": true }, "createdDate": { "type": "string", "description": "created date", "format": "date-time", "readOnly": true }, "fileName": { "type": "string", "description": "file name attached to the survey file" }, "hashCode": { "type": "string", "description": "hash code of the file attached to the survey file", "readOnly": true }, "heightAccuracy": { "type": "integer", "description": "Unique id of constant" }, "historyDate": { "type": "string", "description": "history date of survey file", "format": "date" }, "id": { "type": "integer", "description": "Unique id of survey file", "readOnly": true }, "identification": { "type": "string", "description": "identification of survey file" }, "inputSrs": { "type": "string", "description": "input srs of the survey file" }, "kindCode": { "type": "integer", "description": "Unique id of survey constant. required if KEYCONVERT_MAPPING_CONFIG_ENABLED is false and coordinateFile is provided." }, "locationAccuracy": { "type": "integer", "description": "Unique id of constant" }, "mapper": { "type": "string", "description": "Mapper of the survey file" }, "mappingConfig": { "type": "integer", "description": "Unique id of mapping config. required if KEYCONVERT_MAPPING_CONFIG_ENABLED is true and coordinateFile is provided." }, "mappingMethod": { "type": "integer", "description": "Unique id of constant" }, "name": { "type": "string", "description": "name of survey file" }, "operator": { "type": "integer", "description": "Unique id of survey constant" }, "plan": { "type": "integer", "description": "Unique id of plan" }, "procedure": { "type": "integer", "description": "Unique id of survey constant" }, "processed": { "type": "boolean", "description": "Is survey file processed or not" }, "rawText": { "type": "string", "description": "raw text of the file attached to the survey file", "readOnly": true }, "srid": { "type": "integer", "description": "Srid of the survey file" }, "surveyAmount": { "type": "integer", "description": "Amount of surveys in the file" }, "updatedBy": { "type": "string", "description": "updated by user", "readOnly": true }, "updatedDate": { "type": "string", "description": "updated date", "format": "date-time", "readOnly": true } }, "description": "SurveyFile" }, "ErrorDetailsResponse": { "required": [ "details" ], "type": "object", "properties": { "details": { "type": "string", "description": "Detailed description of error" } }, "description": "Standard error response payload" } }, "responses": { "Http401": { "description": "Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetailsResponse" }, "example": { "details": "Authentication credentials were not provided" } } } } }, "securitySchemes": { "Token": { "type": "apiKey", "description": "Token issued for API consumer.", "name": "Authorization", "in": "header" } } } } ````