{
	"info": {
		"_postman_id": "807f29de-4ee0-4b0e-8aaa-e49f1ce5a6fd",
		"name": "Oliasoft APIs V2",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
		"_exporter_id": "12388855"
	},
	"item": [
		{
			"name": "Design Management",
			"item": [
				{
					"name": "List Designs",
					"request": {
						"auth": {
							"type": "apikey",
							"apikey": [
								{
									"key": "value",
									"value": "{{api_key}}",
									"type": "string"
								},
								{
									"key": "key",
									"value": "apikey",
									"type": "string"
								},
								{
									"key": "in",
									"value": "header",
									"type": "string"
								}
							]
						},
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{base_url}}/v3/datasets/list?groupid=1",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"v3",
								"datasets",
								"list"
							],
							"query": [
								{
									"key": "groupid",
									"value": "1"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Create Design",
					"request": {
						"auth": {
							"type": "apikey",
							"apikey": [
								{
									"key": "value",
									"value": "{{api_key}}",
									"type": "string"
								},
								{
									"key": "key",
									"value": "apikey",
									"type": "string"
								},
								{
									"key": "in",
									"value": "header",
									"type": "string"
								}
							]
						},
						"method": "POST",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"groupid\": 1,\n  \"name\": \"API Test #2\",\n  \"unitSystem\": \"NCS\",\n  \"wellConfiguration\": \"onshore\",\n  \"drillingUnit\": \"land_rig\",\n  \"groundElevation\": {\n    \"value\": 100,\n    \"unit\": \"m\"\n  },\n  \"drillFloorHeight\": \"25|m\",\n  \"wellheadDepth\": \"75|m\",\n  \"category\": \"Prototype\"\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{base_url}}/v3/datasets",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"v3",
								"datasets"
							]
						}
					},
					"response": []
				},
				{
					"name": "Update Design",
					"request": {
						"auth": {
							"type": "apikey",
							"apikey": [
								{
									"key": "value",
									"value": "{{api_key}}",
									"type": "string"
								},
								{
									"key": "key",
									"value": "apikey",
									"type": "string"
								},
								{
									"key": "in",
									"value": "header",
									"type": "string"
								}
							]
						},
						"method": "PUT",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"datasetUUID\": \"{{designid}}\",\n  \"name\": \"Changed name\",\n  \"category\": \"Actual\",\n  \"wellConfiguration\": \"onshore\",\n  \"drillingUnit\": \"land_rig\",\n  \"groundElevation\": \"500|m\",\n  \"drillFloorHeight\": \"456|m\",\n  \"wellheadDepth\": \"456|m\"\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{base_url}}/v3/datasets",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"v3",
								"datasets"
							]
						}
					},
					"response": []
				},
				{
					"name": "Delete Design",
					"request": {
						"auth": {
							"type": "apikey",
							"apikey": [
								{
									"key": "value",
									"value": "{{api_key}}",
									"type": "string"
								},
								{
									"key": "key",
									"value": "apikey",
									"type": "string"
								},
								{
									"key": "in",
									"value": "header",
									"type": "string"
								}
							]
						},
						"method": "DELETE",
						"header": [],
						"url": {
							"raw": "{{base_url}}/v3/datasets?datasetUUID={{designid}}",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"v3",
								"datasets"
							],
							"query": [
								{
									"key": "datasetUUID",
									"value": "{{designid}}"
								}
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "Trajectories",
			"item": [
				{
					"name": "Fetch Trajectory",
					"request": {
						"auth": {
							"type": "apikey",
							"apikey": [
								{
									"key": "value",
									"value": "{{api_key}}",
									"type": "string"
								},
								{
									"key": "key",
									"value": "apikey",
									"type": "string"
								},
								{
									"key": "in",
									"value": "header",
									"type": "string"
								}
							]
						},
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{base_url}}/v1/designs/{{designid}}/trajectories",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"v1",
								"designs",
								"{{designid}}",
								"trajectories"
							]
						}
					},
					"response": []
				},
				{
					"name": "Create Trajectory (Planned)",
					"request": {
						"auth": {
							"type": "apikey",
							"apikey": [
								{
									"key": "value",
									"value": "{{api_key}}",
									"type": "string"
								},
								{
									"key": "key",
									"value": "apikey",
									"type": "string"
								},
								{
									"key": "in",
									"value": "header",
									"type": "string"
								}
							]
						},
						"method": "POST",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"name\": \"Planned S-curve\",\n  \"type\": \"planned\",\n  \"trajectoryPoints\": {\n    \"headers\": [\n      { \"index\": 0, \"quantity\": \"depth\", \"unit\": \"m\", \"key\": \"depthMD\" },\n      { \"index\": 1, \"quantity\": \"angles\", \"unit\": \"deg\", \"key\": \"inclination\" },\n      { \"index\": 2, \"quantity\": \"angles\", \"unit\": \"deg\", \"key\": \"azimuth\" }\n    ],\n    \"values\": [\n      [0, 0, 0],\n      [500, 2.1, 135.0],\n      [1200, 12.5, 135.0],\n      [2500, 45.0, 135.0],\n      [3200, 45.0, 135.0]\n    ]\n  }\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{base_url}}/v1/designs/{{designid}}/trajectories",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"v1",
								"designs",
								"{{designid}}",
								"trajectories"
							]
						}
					},
					"response": []
				},
				{
					"name": "Edit Trajectory",
					"request": {
						"auth": {
							"type": "apikey",
							"apikey": [
								{
									"key": "value",
									"value": "{{api_key}}",
									"type": "string"
								},
								{
									"key": "key",
									"value": "apikey",
									"type": "string"
								},
								{
									"key": "in",
									"value": "header",
									"type": "string"
								}
							]
						},
						"method": "PATCH",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"name\": \"Updated S-curve v2\",\n  \"trajectoryPoints\": {\n    \"headers\": [\n      { \"index\": 0, \"quantity\": \"depth\", \"unit\": \"m\", \"key\": \"depthMD\" },\n      { \"index\": 1, \"quantity\": \"angles\", \"unit\": \"deg\", \"key\": \"inclination\" },\n      { \"index\": 2, \"quantity\": \"angles\", \"unit\": \"deg\", \"key\": \"azimuth\" }\n    ],\n    \"values\": [\n      [0, 0, 0],\n      [500, 2.1, 135.0],\n      [1500, 18.0, 135.0],\n      [3000, 45.0, 135.0],\n      [3800, 45.0, 135.0]\n    ]\n  }\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{base_url}}/v1/designs/{{designid}}/trajectories/{{trajectory_uuid}}",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"v1",
								"designs",
								"{{designid}}",
								"trajectories",
								"{{trajectory_uuid}}"
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "Survey Runs",
			"item": [
				{
					"name": "Fetch Survey Runs",
					"request": {
						"auth": {
							"type": "apikey",
							"apikey": [
								{
									"key": "value",
									"value": "{{api_key}}",
									"type": "string"
								},
								{
									"key": "key",
									"value": "apikey",
									"type": "string"
								},
								{
									"key": "in",
									"value": "header",
									"type": "string"
								}
							]
						},
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{base_url}}/v1/designs/{{designid}}/survey-runs",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"v1",
								"designs",
								"{{designid}}",
								"survey-runs"
							]
						}
					},
					"response": []
				},
				{
					"name": "Create Survey Run (Surface Tie-On)",
					"request": {
						"auth": {
							"type": "apikey",
							"apikey": [
								{
									"key": "value",
									"value": "{{api_key}}",
									"type": "string"
								},
								{
									"key": "key",
									"value": "apikey",
									"type": "string"
								},
								{
									"key": "in",
									"value": "header",
									"type": "string"
								}
							]
						},
						"method": "POST",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"name\": \"Vertical Section\",\n  \"tieOnType\": \"surface\",\n  \"surveyTool\": \"MWD rev 4 ISCWSA\",\n  \"points\": {\n    \"headers\": [\n      { \"index\": 0, \"quantity\": \"depth\", \"unit\": \"m\", \"key\": \"depthMD\" },\n      { \"index\": 1, \"quantity\": \"angles\", \"unit\": \"deg\", \"key\": \"inclination\" },\n      { \"index\": 2, \"quantity\": \"angles\", \"unit\": \"deg\", \"key\": \"azimuth\" }\n    ],\n    \"values\": [\n      [0, 0, 135],\n      [500, 0, 135],\n      [1000, 0.5, 135]\n    ]\n  }\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{base_url}}/v1/designs/{{designid}}/survey-runs",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"v1",
								"designs",
								"{{designid}}",
								"survey-runs"
							]
						}
					},
					"response": []
				},
				{
					"name": "Create Survey Run (Run Tie-On)",
					"request": {
						"auth": {
							"type": "apikey",
							"apikey": [
								{
									"key": "value",
									"value": "{{api_key}}",
									"type": "string"
								},
								{
									"key": "key",
									"value": "apikey",
									"type": "string"
								},
								{
									"key": "in",
									"value": "header",
									"type": "string"
								}
							]
						},
						"method": "POST",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"name\": \"Build Section\",\n  \"tieOnType\": \"run\",\n  \"tieOnRunUUID\": \"{{survey_run_uuid}}\",\n  \"tieOnDepth\": \"1000|m\",\n  \"surveyTool\": \"MWD rev 4 ISCWSA\",\n  \"points\": {\n    \"headers\": [\n      { \"index\": 0, \"quantity\": \"depth\", \"unit\": \"m\", \"key\": \"depthMD\" },\n      { \"index\": 1, \"quantity\": \"angles\", \"unit\": \"deg\", \"key\": \"inclination\" },\n      { \"index\": 2, \"quantity\": \"angles\", \"unit\": \"deg\", \"key\": \"azimuth\" }\n    ],\n    \"values\": [\n      [1200, 8.5, 135],\n      [1500, 22.0, 135],\n      [2000, 45.0, 135]\n    ]\n  }\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{base_url}}/v1/designs/{{designid}}/survey-runs",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"v1",
								"designs",
								"{{designid}}",
								"survey-runs"
							]
						}
					},
					"response": []
				},
				{
					"name": "Fetch Survey Run",
					"request": {
						"auth": {
							"type": "apikey",
							"apikey": [
								{
									"key": "value",
									"value": "{{api_key}}",
									"type": "string"
								},
								{
									"key": "key",
									"value": "apikey",
									"type": "string"
								},
								{
									"key": "in",
									"value": "header",
									"type": "string"
								}
							]
						},
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{base_url}}/v1/designs/{{designid}}/survey-runs/{{survey_run_uuid}}",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"v1",
								"designs",
								"{{designid}}",
								"survey-runs",
								"{{survey_run_uuid}}"
							]
						}
					},
					"response": []
				},
				{
					"name": "Edit Survey Run",
					"request": {
						"auth": {
							"type": "apikey",
							"apikey": [
								{
									"key": "value",
									"value": "{{api_key}}",
									"type": "string"
								},
								{
									"key": "key",
									"value": "apikey",
									"type": "string"
								},
								{
									"key": "in",
									"value": "header",
									"type": "string"
								}
							]
						},
						"method": "PATCH",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"name\": \"Vertical Section (updated)\",\n  \"surveyTool\": \"Gyro ISCWSA\"\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{base_url}}/v1/designs/{{designid}}/survey-runs/{{survey_run_uuid}}",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"v1",
								"designs",
								"{{designid}}",
								"survey-runs",
								"{{survey_run_uuid}}"
							]
						}
					},
					"response": []
				}
			]
		}
	],
	"event": [
		{
			"listen": "prerequest",
			"script": {
				"type": "text/javascript",
				"packages": {},
				"exec": [
					""
				]
			}
		},
		{
			"listen": "test",
			"script": {
				"type": "text/javascript",
				"packages": {},
				"exec": [
					""
				]
			}
		}
	],
	"variable": [
		{
			"key": "base_url",
			"value": "https://welldesign.qa.oliasoft.com/api",
			"type": "string"
		},
		{
			"key": "api_key",
			"value": "YOUR_API_KEY",
			"type": "string"
		},
		{
			"key": "designid",
			"value": "YOUR_DESIGN_UUID",
			"type": "string"
		},
		{
			"key": "trajectory_uuid",
			"value": "YOUR_TRAJECTORY_UUID",
			"type": "string"
		},
		{
			"key": "survey_run_uuid",
			"value": "YOUR_SURVEY_RUN_UUID",
			"type": "string"
		}
	]
}