{
	"info": {
		"_postman_id": "71697f53-d8ba-4d9f-a92c-b5078bce12b9",
		"name": "Feasibility and Tasking API",
		"description": "## Initial Setup\n\nAn environment needs to be created with certain attributes populated in order to use this Postman Collection.\n\n| Key | Value |\n| --- | --- |\n| api | [https://platform.ursaspace.com/api/v1/tfs](https://platform.ursaspace.com/api/v1/tfs) |\n| auth-api | [https://platform.ursaspace.com/api/pas](https://platform.ursaspace.com/api/pas) |\n| username | _provided to you by Ursa Space_ |\n| password | _provided to you by Ursa Space_ |\n\nThe username and password will be provided by Ursa Space Systems and should not be shared.\n\n## Authentication\n\nThe API utilizes tokens for authentication. Before making a request to the Feasibility and Tasking API, ensure a valid token is cached in the environment. To obtain a valid token run the `Authenticate` request.\n\n## API Documentation\n\nPlease visit the following page for full documentation on the Feasibility and Tasking API: [https://info.ursaspace.com/getting-started-with-the-feasibility-and-tasking-api](https://info.ursaspace.com/getting-started-with-the-feasibility-and-tasking-api)",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
		"_exporter_id": "37260627"
	},
	"item": [
		{
			"name": "Feasibility",
			"item": [
				{
					"name": "New Feasibility Request",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"var jsonData = pm.response.json();",
									"pm.environment.set(\"_feasibility_request_id\", jsonData.id);"
								],
								"type": "text/javascript",
								"packages": {}
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"target_lat\": 40.730610,\n    \"target_lon\": -73.935242,\n    \"start_datetime\": \"2024-10-09T15:12:00.000\",\n    \"end_datetime\": \"2024-10-14T15:12:00.000\",\n    \"vendor\": \"UMBRA\",\n    \"incidence_min\": 0,\n    \"incidence_max\": 90,\n    \"azimuth_min\": 0,\n    \"azimuth_max\": 360,\n    \"squint_min\": -90,\n    \"squint_max\": 90\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{api}}/feasibility",
							"host": [
								"{{api}}"
							],
							"path": [
								"feasibility"
							]
						}
					},
					"response": []
				},
				{
					"name": "Get Feasibility Request Status",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{api}}/feasibility/:id",
							"host": [
								"{{api}}"
							],
							"path": [
								"feasibility",
								":id"
							],
							"variable": [
								{
									"key": "id",
									"value": "{{_feasibility_request_id}}"
								}
							]
						}
					},
					"response": []
				}
			],
			"auth": {
				"type": "bearer",
				"bearer": [
					{
						"key": "token",
						"value": "{{_jwt}}",
						"type": "string"
					}
				]
			},
			"event": [
				{
					"listen": "prerequest",
					"script": {
						"type": "text/javascript",
						"packages": {},
						"exec": [
							""
						]
					}
				},
				{
					"listen": "test",
					"script": {
						"type": "text/javascript",
						"packages": {},
						"exec": [
							""
						]
					}
				}
			]
		},
		{
			"name": "Tasking",
			"item": [
				{
					"name": "New Tasking Request",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"var jsonData = pm.response.json();",
									"pm.environment.set(\"_tasking_request_id\", jsonData.id);"
								],
								"type": "text/javascript",
								"packages": {}
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"target_lon\": -76.5019,\n    \"target_lat\": 42.443,\n    \"target_datetime\": \"2024-10-30T15:12:00.000\",\n    \"mode\": \"CAPELLA_SPOTLIGHT\",\n    \"polarization\": \"VV\",\n    \"products\": [\n        \"MANTIS\", \"VESSEL_DETECTION\", \"OBJECT_DETECTION\", \"AIRCRAFT_DETECTION\", \"FLOOD\", \"CAR_COUNTING\"\n    ]\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{api}}/tasking",
							"host": [
								"{{api}}"
							],
							"path": [
								"tasking"
							]
						}
					},
					"response": []
				},
				{
					"name": "Get Tasking Request Status",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{api}}/tasking/:id",
							"host": [
								"{{api}}"
							],
							"path": [
								"tasking",
								":id"
							],
							"variable": [
								{
									"key": "id",
									"value": "{{_tasking_request_id}}"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "List All Tasking Requests",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{api}}/tasking",
							"host": [
								"{{api}}"
							],
							"path": [
								"tasking"
							]
						}
					},
					"response": []
				},
				{
					"name": "Cancel Tasking Request",
					"request": {
						"method": "POST",
						"header": [],
						"url": {
							"raw": "{{api}}/tasking/:id/cancel",
							"host": [
								"{{api}}"
							],
							"path": [
								"tasking",
								":id",
								"cancel"
							],
							"variable": [
								{
									"key": "id",
									"value": "{{_tasking_request_id}}"
								}
							]
						}
					},
					"response": []
				}
			],
			"auth": {
				"type": "bearer",
				"bearer": [
					{
						"key": "token",
						"value": "{{_jwt}}",
						"type": "string"
					}
				]
			},
			"event": [
				{
					"listen": "prerequest",
					"script": {
						"type": "text/javascript",
						"packages": {},
						"exec": [
							""
						]
					}
				},
				{
					"listen": "test",
					"script": {
						"type": "text/javascript",
						"packages": {},
						"exec": [
							""
						]
					}
				}
			]
		},
		{
			"name": "Authenticate",
			"event": [
				{
					"listen": "test",
					"script": {
						"exec": [
							"var jsonData = pm.response.json();",
							"pm.environment.set(\"_jwt\", jsonData.access_token);"
						],
						"type": "text/javascript",
						"packages": {}
					}
				},
				{
					"listen": "prerequest",
					"script": {
						"exec": [
							""
						],
						"type": "text/javascript",
						"packages": {}
					}
				}
			],
			"request": {
				"auth": {
					"type": "noauth"
				},
				"method": "POST",
				"header": [
					{
						"key": "Content-Type",
						"value": "application/x-www-form-urlencoded"
					}
				],
				"body": {
					"mode": "urlencoded",
					"urlencoded": [
						{
							"key": "grant_type",
							"value": "password",
							"type": "text"
						},
						{
							"key": "username",
							"value": "{{username}}",
							"type": "text"
						},
						{
							"key": "password",
							"value": "{{password}}",
							"type": "text"
						}
					]
				},
				"url": {
					"raw": "{{auth-api}}/login",
					"host": [
						"{{auth-api}}"
					],
					"path": [
						"login"
					]
				},
				"description": "gets bearer token from PAS"
			},
			"response": []
		}
	],
	"event": [
		{
			"listen": "prerequest",
			"script": {
				"type": "text/javascript",
				"packages": {},
				"exec": [
					""
				]
			}
		},
		{
			"listen": "test",
			"script": {
				"type": "text/javascript",
				"packages": {},
				"exec": [
					""
				]
			}
		}
	]
}