{"_id":"56e1cb0fe416450e00b9e485","__v":5,"parentDoc":null,"project":"55faeacad0e22017005b8265","user":"56267741db1eda0d001c3dbb","version":{"_id":"55faeacad0e22017005b8268","project":"55faeacad0e22017005b8265","__v":32,"createdAt":"2015-09-17T16:31:06.800Z","releaseDate":"2015-09-17T16:31:06.800Z","categories":["55faeacbd0e22017005b8269","55faf550764f50210095078e","55faf5b5626c341700fd9e96","55faf8a7825d5f19001fa386","560052f91503430d007cc88f","560054f73aa0520d00da0b1a","56005aaf6932a00d00ba7c62","56005c273aa0520d00da0b3f","5601ae7681a9670d006d164d","5601ae926811d00d00ceb487","5601aeb064866b1900f4768d","5601aee850ee460d0002224c","5601afa02499c119000faf19","5601afd381a9670d006d1652","561d4c78281aec0d00eb27b6","561d588d8ca8b90d00210219","563a5f934cc3621900ac278c","5665c5763889610d0008a29e","566710a36819320d000c2e93","56ddf6df8a5ae10e008e3926","56e1c96b2506700e00de6e83","56e1ccc4e416450e00b9e48c","56e1ccdfe63f910e00e59870","56e1cd10bc46be0e002af26a","56e1cd21e416450e00b9e48e","56e3139a51857d0e008e77be","573b4f62ef164e2900a2b881","57c9d1335fd8ca0e006308ed","57e2bd9d1e7b7220000d7fa5","57f2b992ac30911900c7c2b6","58adb5c275df0f1b001ed59b","58c81b5c6dc7140f003c3c46"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"v1","version_clean":"1.0.0","version":"1"},"category":{"_id":"56e1ccdfe63f910e00e59870","version":"55faeacad0e22017005b8268","project":"55faeacad0e22017005b8265","__v":5,"pages":["56e311b0cb6ef20e0084f24b","56e312096e602e0e00700b2d","56e312bcd46bc30e007bb99a","56e31309cb6ef20e0084f250","56e31357cb6ef20e0084f254"],"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-03-10T19:37:03.043Z","from_sync":false,"order":18,"slug":"write-ingest-vector-services-guide","title":"Write & Ingest Vector Services Guide"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-03-10T19:29:19.996Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"settings":"","results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":3,"body":"In order for users to add a vector item or multiple vector items directly to an index, user vector generation is available.  Vector generation is useful for direct additions of or updates to vectors, without needing a third party service or a vector submission request form.\n\n<h2>Generate Vector API Parameters</h2>\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Data Type\",\n    \"h-2\": \"Parameter Type\",\n    \"h-3\": \"Description\",\n    \"1-0\": \"itemJson\",\n    \"1-1\": \"String\",\n    \"1-2\": \"Query\",\n    \"1-3\": \"GeoJSON of item to write.\\nExample:\\n{\\n    \\\"type\\\": \\\"Feature\\\",\\n        \\\"geometry\\\": {\\n            \\\"type\\\": \\\"Point\\\",\\n            \\\"coordinates\\\": [1.0,1.0]\\n        },\\n        \\\"properties\\\": {\\n            \\\"text\\\" : \\\"elementary school\\\",\\n            \\\"name\\\" : \\\"foo\\\",\\n            \\\"item_type\\\" : [“Building”,”School\\\"],\\n            \\\"ingest_source\\\" : \\\"REST API test source\\\",\\n           \\\"access\\\" : {\\n            \\\"users\\\" : [ \\\"_ALL_\\\" ],\\n            \\\"groups\\\" : [ \\\"_ALL_\\\" ]\\n            },\\n            \\\"attributes\\\" : {\\n               \\\"latitude\\\" : 1,\\n               \\\"institute.founded\\\" : \\\"2015-07-17\\\",\\n               \\\"mascot \\\" : \\\"moth\\\"\\n            }\\n        }\\n}\",\n    \"2-0\": \"id\",\n    \"2-1\": \"String\",\n    \"2-2\": \"Query\",\n    \"2-3\": \"The ID of the item.\",\n    \"3-0\": \"itemArray\",\n    \"3-1\": \"String\",\n    \"3-2\": \"Query\",\n    \"3-3\": \"JSON array of items to write.\",\n    \"0-0\": \"index\",\n    \"0-1\": \"String\",\n    \"0-2\": \"Query\",\n    \"0-3\": \"The index to which items will be written/are stored. The index is generated during the POST call.\\nNote: All indicies generated through the API will be of the format vector-{user defined index name} if using the asynchronous upload method; otherwise the format will be vector-web-{geohash}.\"\n  },\n  \"cols\": 4,\n  \"rows\": 4\n}\n[/block]\nIn order for all Vector Services and ESRI Vector Services APIs to retrieve the vectors generated through this API, GeoJSON must include the following:\n - Within the geometry: coordinates and type\n - Within the properties: ingest_source, item_type, and text\n\nThe index is generated one of two ways, depending on the API call used:\n - Via user input when using the asynchronous write API\n - Automatically chosen based on the coordinates given in the GeoJSON when using other write APIs\n\n<h2>Associated API calls</h2>\n[Adding Single Vector Item](doc:adding-single-vector-to-an-index) \n[Adding Multiple Vector Items](doc:adding-multiple-vectors-to-an-index)\n[Adding Vectors to an Index Asynchronously](doc:adding-vectors-async)\n[Updating Single Vector Item](doc:updating-a-vector-in-an-index)\n[Retrieving Single Vector Item](doc:retrieving-a-vector-via-item-id)\n[Deleting Single Vector Item](doc:deleting-a-vector-via-item-id)\n[Batch Deleting Vectors via item ID](doc:batch-delete-vectors-via-item-id)","excerpt":"Overview of the Generating Vectors API","slug":"writing-vectors-course","type":"basic","title":"Writing Vectors Course"}

Writing Vectors Course

Overview of the Generating Vectors API

In order for users to add a vector item or multiple vector items directly to an index, user vector generation is available. Vector generation is useful for direct additions of or updates to vectors, without needing a third party service or a vector submission request form. <h2>Generate Vector API Parameters</h2> [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Data Type", "h-2": "Parameter Type", "h-3": "Description", "1-0": "itemJson", "1-1": "String", "1-2": "Query", "1-3": "GeoJSON of item to write.\nExample:\n{\n \"type\": \"Feature\",\n \"geometry\": {\n \"type\": \"Point\",\n \"coordinates\": [1.0,1.0]\n },\n \"properties\": {\n \"text\" : \"elementary school\",\n \"name\" : \"foo\",\n \"item_type\" : [“Building”,”School\"],\n \"ingest_source\" : \"REST API test source\",\n \"access\" : {\n \"users\" : [ \"_ALL_\" ],\n \"groups\" : [ \"_ALL_\" ]\n },\n \"attributes\" : {\n \"latitude\" : 1,\n \"institute.founded\" : \"2015-07-17\",\n \"mascot \" : \"moth\"\n }\n }\n}", "2-0": "id", "2-1": "String", "2-2": "Query", "2-3": "The ID of the item.", "3-0": "itemArray", "3-1": "String", "3-2": "Query", "3-3": "JSON array of items to write.", "0-0": "index", "0-1": "String", "0-2": "Query", "0-3": "The index to which items will be written/are stored. The index is generated during the POST call.\nNote: All indicies generated through the API will be of the format vector-{user defined index name} if using the asynchronous upload method; otherwise the format will be vector-web-{geohash}." }, "cols": 4, "rows": 4 } [/block] In order for all Vector Services and ESRI Vector Services APIs to retrieve the vectors generated through this API, GeoJSON must include the following: - Within the geometry: coordinates and type - Within the properties: ingest_source, item_type, and text The index is generated one of two ways, depending on the API call used: - Via user input when using the asynchronous write API - Automatically chosen based on the coordinates given in the GeoJSON when using other write APIs <h2>Associated API calls</h2> [Adding Single Vector Item](doc:adding-single-vector-to-an-index) [Adding Multiple Vector Items](doc:adding-multiple-vectors-to-an-index) [Adding Vectors to an Index Asynchronously](doc:adding-vectors-async) [Updating Single Vector Item](doc:updating-a-vector-in-an-index) [Retrieving Single Vector Item](doc:retrieving-a-vector-via-item-id) [Deleting Single Vector Item](doc:deleting-a-vector-via-item-id) [Batch Deleting Vectors via item ID](doc:batch-delete-vectors-via-item-id)