{
  "swagger": "2.0",
  "info": {
    "version": "v1",
    "title": "Flyguys APIs",
    "description": "Web API Designated to provide information related to the Jobs/Missions and their results",
    "termsOfService": "Terms of Service",
    "contact": {
      "name": "FlyGuys",
      "url": "https://dev-connect.flyguys.com/",
      "email": "support@flyguys.com"
    }
  },
  "host": "api.flyguys.com",
  "schemes": [
    "https"
  ],
  "paths": {
    "/S3Credentials": {
      "get": {
        "tags": [
          "AWSSecurity"
        ],
        "summary": "Retrieves temporary S3 credentials for the client to access the S3 bucket.\r\nThe client must provide a valid `client_id` in the request headers. \r\nBased on the client's company association, the system retrieves the necessary S3 configuration \r\n(such as access key, secret key, and bucket name) and generates temporary credentials via AWS STS.",
        "operationId": "AWSSecurity_S3Credentials",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer "
          },
          {
            "name": "client_id",
            "in": "header",
            "required": false,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/Credentials"
            },
            "examples": {
              "application/json": {
                "AccessKeyId": "CCIAZUSTWZTSIMHZM5XQ",
                "SecretAccessKey": "FwoJMXIvYXdzEDgaDA1zqs2ECor2SN+hfCKBAeXh4qCZntXGnoGA0MluuG7Yv8dtLw0lUckvIrbaeVro8HvWczn7Mb0N3F6+rxi9Vc0XSDq1ywPX8MS0uH/bSS01v+LaUyIcHhjFSRoN66yl0bgvwGeqc142g51X4KDRHWsZlQ56MyAtore19+EIkfiMV3uwLr8uM0UBZa1CfTbcpijj0tm4BjIohvM60Z0RbaCBK2s3O4sQzf5UyE5jVXEeE2a1HKzmtBA6iDif2EOZKw==",
                "SessionToken": "erWTOKNktSmwdRhAJ/R6yTTBG7NCKmiJuAPQAnYh",
                "Expiration": "2026-10-30T07:57:21.9212997Z",
                "Message": "Success",
                "S3BucketName": "fg-demo-bkct-folder"
              }
            }
          },
          "401": {
            "description": "Not authorized to use this api method"
          },
          "404": {
            "description": "The server did not find any data for this request"
          },
          "500": {
            "description": "An error has ocurred in the server",
            "schema": {
              "$ref": "#/definitions/AWSCredentialsInternalServerErrorDTO"
            }
          },
          "503": {
            "description": "The current API method is unavailable"
          }
        }
      }
    },
    "/AzureStorageCredentials": {
      "get": {
        "tags": [
          "AzureSecurity"
        ],
        "summary": "Retrieves temporary Blob Storage Shared Acces Signature for the client to access the blob container.\r\nThe client must provide a valid `client_id` in the request headers. \r\nBased on the client's company association, the system retrieves the necessary Azure configuration \r\n(such as Service URL, Shared Acces Signature SAS,Account Name  and Container Name).",
        "operationId": "AzureSecurity_AzureStorageCredentials",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer "
          },
          {
            "name": "client_id",
            "in": "header",
            "required": false,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/APIAzureSecurityResponseOKDTO"
            },
            "examples": {
              "application/json": {
                "ServiceUrl": "https://flyguys20storage.blob.core.windows.net",
                "SharedAccesSignature": "?sv=2024-08-04&ss=b&srt=o&se=2024-10-11T00%3A15%3A05Z&sp=r&sig=FWnS6GXyN54MRGo0BTvRBpygZKlr1fDo0IAhg302mQU%74",
                "ExpirationTime": "2026-10-30T07:57:21.9369234Z",
                "AccountName": "flyguys20teststorage",
                "ContainerName": "flyguys-test-container",
                "Message": "Success"
              }
            }
          },
          "204": {
            "description": "Unable to process your request."
          },
          "401": {
            "description": "Authorization has been denied for this request."
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/APIAzureSecurityResponseInternalServerErrorDTO"
            }
          }
        }
      }
    },
    "/Jobs": {
      "post": {
        "tags": [
          "Mission"
        ],
        "summary": "Endpoint for creating new jobs. Processes mission creation requests sent as JSON input.",
        "description": "    Sample Request:\r\n    {\r\n       \"package\":{\r\n          \"id\":\"demo-catalog-aerial\"\r\n       },\r\n       \"location\":{\r\n          \"name\": \"DEMO – Rebel Base (Endor Station Construction)\",\r\n          \"address\":{\r\n             \"city\":\"Lafayette\",\r\n             \"state\":\"LA\",\r\n             \"address\":\"120 Clinton St, Lafayette, LA 70501, USA\",\r\n             \"country\":\"US\",\r\n             \"address2\":null,\r\n             \"postal_code\":\"70501\"\r\n          },\r\n          \"coordinate\":{\r\n             \"latitude\":30.2239805,\r\n             \"longitude\":-92.0156694\r\n          },\r\n          \"annotations\":{\r\n             \"type\":\"FeatureCollection\",\r\n             \"features\":[\r\n                {\r\n                   \"type\":\"Feature\",\r\n                   \"geometry\":{\r\n                      \"type\":\"Polygon\",\r\n                      \"coordinates\":[\r\n                         [\r\n                            [\r\n                               -92.0156694,\r\n                               30.2239805\r\n                            ]\r\n                         ]\r\n                      ]\r\n                   },\r\n                   \"properties\":{\r\n                      \"name\":\"Roof\",\r\n                      \"type\":\"Property Area\",\r\n                      \"catalog_item_ids\":[\r\n                         \"DBACI638103894064210\"\r\n                      ]\r\n                   }\r\n                },\r\n                {\r\n                   \"type\":\"Feature\",\r\n                   \"geometry\":{\r\n                      \"type\":\"Polygon\",\r\n                      \"coordinates\":[\r\n                         [\r\n                            [\r\n                               -92.0156694,\r\n                               30.2239805\r\n                            ]\r\n                         ]\r\n                      ]\r\n                   },\r\n                   \"properties\":{\r\n                      \"name\":\"Property\",\r\n                      \"type\":\"Property Area\",\r\n                      \"catalog_item_ids\":[\r\n                         \"DBACI087795008790989\"\r\n                      ]\r\n                   }\r\n                }\r\n             ]\r\n          }\r\n       },\r\n       \"portfolio\":\"DEMO - Rebel Base (Endor Station Construction)\",\r\n       \"external_id\":\"69d70127-0450-4ba6-bfb9-1a1c89ce111c\",\r\n       \"instructions\":\"Please do not schedule within 72 hours of this submission\",\r\n       \"reference_id\":\"0fa695b3-11be-425f-86a9-e47540866cdc\",\r\n       \"onsite_contact\":{\r\n          \"name\":\"Wickett Warrick\",\r\n          \"note\":\"Please text or call if you run into any emergencies on site.\",\r\n          \"phone\":\"123-456-1234\",\r\n          \"call_action\":\"in_case_of_emergency\"\r\n       },\r\n       \"scheduled_at_start\": \"2024-04-25T14:30:00\",\r\n       \"scheduled_at_end\": \"2024-04-26T14:30:00\"\r\n    }\r\n    \r\nThis Method creates a new Job",
        "operationId": "Mission_Jobs",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "inputJson",
            "in": "body",
            "description": "An object containing mission details, such as missionName, companyId, and more.",
            "required": true,
            "schema": {
              "type": "object"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer "
          },
          {
            "name": "client_id",
            "in": "header",
            "required": false,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "object"
            },
            "examples": {
              "application/json": {
                "response": {
                  "id": "fcc27cc8-98a6-4b86-8934-76445d4001b4",
                  "job_number": "76445d4001b4",
                  "job_id": "3132",
                  "fg_20_mission_id": "",
                  "fg_20_mission_number": null,
                  "fg_20_capture_id": "",
                  "fg_20_capture_number": null,
                  "status": "created",
                  "status_update_reason": "",
                  "created_at": "2024-10-21T16:34:45Z",
                  "cancellation_reasons": null,
                  "reference_id": "0fa695b3-11be-425f-86a9-e47540866cdc",
                  "external_id": "69d70127-0450-4ba6-bfb9-1a1c89ce111c",
                  "status_timestamps": {
                    "created": "2024-10-21T16:34:45Z"
                  },
                  "scheduled_at": "",
                  "actual_date": "",
                  "estimated_date": "",
                  "scheduled_at_start": null,
                  "scheduled_at_end": null,
                  "rating_pilot_professionalism": null,
                  "rating_image_quality": null,
                  "pilot_id": null,
                  "instructions": "Looking to monitor the construction progression of the new site on Endor. We will only be scheduling this initial visit with the pilot but may need another visit when the base is complete. This location will have a ship docking bay, a training facility, and some housing for the rebels. Please make sure you capture each of these features. (A rendering is attached for reference) \n\n",
                  "scheduling_requirement": "",
                  "location": {
                    "name": "DEMO – Rebel Base (Endor Station Construction)",
                    "coordinate": {
                      "longitude": -92.0156694,
                      "latitude": 30.2239805
                    },
                    "address": {
                      "city": "Lafayette ",
                      "state": "LA",
                      "address": "120 Clinton St, Lafayette, LA 70501, USA",
                      "country": "USA",
                      "address2": "",
                      "postal_code": "70501"
                    },
                    "annotations": {
                      "type": "FeatureCollection",
                      "features": [
                        {
                          "type": "Feature",
                          "geometry": {
                            "type": "Polygon",
                            "coordinates": [
                              [
                                [
                                  -92.0156694,
                                  30.2239805
                                ]
                              ]
                            ]
                          },
                          "properties": {
                            "name": "Roof",
                            "type": "Property Area",
                            "catalog_item_ids": [
                              "DBACI638103894064210"
                            ]
                          }
                        },
                        {
                          "type": "Feature",
                          "geometry": {
                            "type": "Polygon",
                            "coordinates": [
                              [
                                [
                                  -92.0156694,
                                  30.2239805
                                ]
                              ]
                            ]
                          },
                          "properties": {
                            "name": "Property",
                            "type": "Property Area",
                            "catalog_item_ids": [
                              "DBACI087795008790989"
                            ]
                          }
                        }
                      ]
                    }
                  },
                  "parent_id": "0fa695b3-11be-425f-86a9-e47540866cdc",
                  "job_service_details": null,
                  "portfolio": "DEMO - Rebel Base (Endor Station Construction)",
                  "package": {
                    "id": "demo-catalog-aerial",
                    "name": null
                  },
                  "onsite_contact": {
                    "name": "Wickett Warrick",
                    "note": "Please text or call if you run into any emergencies on site.",
                    "phone": "123-456-1234",
                    "call_action": ""
                  },
                  "scheduling_contact": null,
                  "activity_logs": [
                    {
                      "activity_id": "21941",
                      "created_at": "2024-10-21T16:34:45Z",
                      "action": "created",
                      "reason": ""
                    }
                  ],
                  "images": null,
                  "videos": null,
                  "panoramas": null,
                  "ortho_photo_maps": null,
                  "attachments": null,
                  "flight_app": null,
                  "file_content": null
                }
              }
            }
          },
          "401": {
            "description": "Not authorized to use this api method"
          },
          "404": {
            "description": "Job id was not found",
            "schema": {
              "$ref": "#/definitions/JobModel404"
            }
          },
          "500": {
            "description": "An error has ocurred in the server",
            "schema": {
              "$ref": "#/definitions/JobModel500"
            }
          },
          "503": {
            "description": "The current API method is unavailable"
          }
        }
      }
    },
    "/Jobs/{id}": {
      "get": {
        "tags": [
          "Mission"
        ],
        "summary": "Retrieves mission details based on the mission ID. The method converts the string ID into a GUID and fetches the mission data.",
        "description": "This method uses a two-stage try-catch block: one to validate the mission ID and another to handle potential errors during mission data retrieval.\r\nOn successful retrieval, the response includes mission details and annotations.",
        "operationId": "Mission_Jobs",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The unique mission ID as a string, which is converted to a GUID internally.",
            "required": true,
            "type": "string"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer "
          },
          {
            "name": "client_id",
            "in": "header",
            "required": false,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "object"
            },
            "examples": {
              "application/json": {
                "message_created_at": "2024-11-15T13:44:48Z",
                "mission_event": "created",
                "mission": {
                  "id": "d153976d-82eb-4870-81db-71df700ee8fe",
                  "job_number": "71df700ee9fc",
                  "job_id": "56033",
                  "fg_20_mission_id": "b58c22af-2a7b-e60a-d2ab-3a1666e61107",
                  "fg_20_mission_number": 56033,
                  "fg_20_capture_id": "35d08ac6-e7f0-7685-18f8-3a1666e61197",
                  "fg_20_capture_number": 1,
                  "status": "confirmed",
                  "status_update_reason": "",
                  "created_at": "2024-10-21T13:44:48Z",
                  "cancellation_reasons": null,
                  "reference_id": "949997d9-79f8-441b-ab44-c0a20940a961",
                  "external_id": "58fb2d3a-929f-441b-ba59-05d9225edc14",
                  "status_timestamps": {
                    "created": "2024-11-15T13:44:48Z"
                  },
                  "scheduled_at": "",
                  "actual_date": "",
                  "estimated_date": "",
                  "scheduled_at_start": null,
                  "scheduled_at_end": null,
                  "rating_pilot_professionalism": null,
                  "rating_image_quality": null,
                  "pilot_id": null,
                  "instructions": "Looking to monitor the construction progression of the new site on Endor.\n\n\nWe will only be scheduling this initital visit with the pilot but may need another visit when the base is complete.\n\n\nThis location will have a ship docking bay, a training facility and some housing for the rebels.\n\n\nPlease make sure you capture each of these features. (A rendering is attached for reference) \n\n",
                  "scheduling_requirement": "",
                  "location": {
                    "name": "Endor Station ,LA",
                    "coordinate": {
                      "longitude": -92.0156694,
                      "latitude": 30.22398055
                    },
                    "address": {
                      "city": "Lafayette",
                      "state": "LA",
                      "address": "120 Clinton St, Lafayette, LA 70501, USA",
                      "country": "USA",
                      "address2": "",
                      "postal_code": "70501"
                    },
                    "annotations": {
                      "features": [
                        {
                          "geometry": {
                            "coordinates": [
                              [
                                [
                                  -92.014545992341738,
                                  30.224370934570651
                                ],
                                [
                                  -92.015554083604343,
                                  30.225303405938909
                                ],
                                [
                                  -92.013695454607486,
                                  30.22611246280464
                                ],
                                [
                                  -92.0152324062168,
                                  30.228550023240231
                                ],
                                [
                                  -92.017442985415173,
                                  30.227740201380371
                                ],
                                [
                                  -92.019828008282374,
                                  30.225242360971031
                                ],
                                [
                                  -92.01980303974176,
                                  30.221715059359
                                ],
                                [
                                  -92.017250359617648,
                                  30.220042020654681
                                ],
                                [
                                  -92.016038850992018,
                                  30.2219487348229
                                ],
                                [
                                  -92.014545992341738,
                                  30.224370934570651
                                ]
                              ]
                            ],
                            "type": "Polygon"
                          },
                          "properties": {
                            "catalog_item_ids": [
                              "DBACI087795008790989"
                            ],
                            "name": "Property",
                            "type": "Property Area"
                          },
                          "type": "Feature"
                        }
                      ],
                      "type": "FeatureCollection"
                    }
                  },
                  "parent_id": "949997d9-79f8-441b-ab44-c0a20940a961",
                  "job_service_details": null,
                  "portfolio": "DEMO - Rebel Base (Endor Station Construction)",
                  "package": {
                    "id": "demo-catalog-aerial",
                    "name": null
                  },
                  "onsite_contact": {
                    "name": "Skywalker Construction LLC",
                    "note": "This is a secure site. Please call to coordinate access in advance.",
                    "phone": "123456789",
                    "call_action": ""
                  },
                  "scheduling_contact": null,
                  "activity_logs": [
                    {
                      "activity_id": "21900",
                      "created_at": "2024-11-15T13:44:48Z",
                      "action": "created",
                      "reason": ""
                    },
                    {
                      "activity_id": "21901",
                      "created_at": "2024-11-15T13:44:48Z",
                      "action": "confirmed",
                      "reason": ""
                    },
                    {
                      "activity_id": "21902",
                      "created_at": "2024-11-15T13:44:59Z",
                      "action": "created",
                      "reason": "Proposed Date changed to 2024-11-30T19:00:00Z"
                    },
                    {
                      "activity_id": "21903",
                      "created_at": "2024-11-15T13:44:59Z",
                      "action": "confirmed",
                      "reason": "Proposed Date changed to 2024-11-15T19:00:00Z"
                    }
                  ],
                  "images": null,
                  "videos": null,
                  "panoramas": null,
                  "ortho_photo_maps": null,
                  "attachments": null,
                  "flight_app": null,
                  "file_content": null
                }
              }
            }
          },
          "401": {
            "description": "Not authorized to use this api method"
          },
          "404": {
            "description": "The server did not find any data for this request",
            "schema": {
              "$ref": "#/definitions/JobModel404Get"
            }
          },
          "500": {
            "description": "An error has ocurred in the server",
            "schema": {
              "$ref": "#/definitions/JobModel500"
            }
          }
        }
      }
    },
    "/Mission": {
      "post": {
        "tags": [
          "Mission"
        ],
        "summary": "Updates the status and details of a mission based on the input JSON.",
        "description": "     Sample Request:\r\n     {\r\n\t\t    \"mission\": { \r\n\t\t    \"id\": \"d3e173cb-19a9-4c06-a2eb-70bbb23ce3e4\", \r\n\t\t    \"status\": \"put_on_hold\", \r\n\t\t    \"created_at\": \"2023-11-16T08: 55: 31Z\", \r\n\t\t    \"status_update_reason\": \"Customer asked\" \r\n\t\t    } \r\n     }\r\n\r\n \r\n \r\n This method validates the mission ID, checks for the status and status update reason, and then updates the mission status.\r\n If the mission status is successfully updated, the method publishes a message to a service bus and logs the update.",
        "operationId": "Mission_UpdateMission",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "inputJson",
            "in": "body",
            "description": "An object containing the mission details to be updated, such as mission ID, status, and reasons for status update.",
            "required": true,
            "schema": {
              "type": "object"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer "
          },
          {
            "name": "client_id",
            "in": "header",
            "required": false,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "object"
            },
            "examples": {
              "application/json": {
                "response": {
                  "id": "fcc27cc8-98a6-4b86-8934-76445d4001b4",
                  "job_number": "76445d4001b4",
                  "job_id": "3132",
                  "fg_20_mission_id": "55f8d111-221a-9f57-834e-3a15c21b9ba7",
                  "fg_20_mission_number": 51001,
                  "fg_20_capture_id": "",
                  "fg_20_capture_number": null,
                  "status": "put_on_hold",
                  "status_update_reason": "Customer asked",
                  "created_at": "2024-10-21T16:34:45Z",
                  "cancellation_reasons": null,
                  "reference_id": "0fa695b3-11be-425f-86a9-e47540866cdc",
                  "external_id": "69d70127-0450-4ba6-bfb9-1a1c89ce111c",
                  "status_timestamps": {
                    "created": "2024-10-21T16:34:45Z"
                  },
                  "scheduled_at": "",
                  "actual_date": "",
                  "estimated_date": "",
                  "scheduled_at_start": null,
                  "scheduled_at_end": null,
                  "rating_pilot_professionalism": null,
                  "rating_image_quality": null,
                  "pilot_id": null,
                  "instructions": "Please do not schedule within 72 hours of this submission, Note: Please text or call if you run into any emergencies on site. \n\n\nKML measurement calculations\n\n  _1.kml\n    Area(sqft): -1.00   |   Area(ac): -1.00   |   Linear Feet(ft): 0.00 \n\n  Mapping 115ft_1.kml\n    Area(sqft): -1.00   |   Area(ac): -1.00   |   Linear Feet(ft): 0.00 \n\n",
                  "scheduling_requirement": "",
                  "location": {
                    "name": "DEMO – Rebel Base (Endor Station Construction)",
                    "coordinate": {
                      "longitude": -92.0156694,
                      "latitude": 30.2239805
                    },
                    "address": {
                      "city": "Lafayette",
                      "state": "LA",
                      "address": "120 Clinton St, Lafayette, LA 70501, USA",
                      "country": "USA",
                      "address2": "",
                      "postal_code": "70501"
                    },
                    "annotations": {
                      "type": "FeatureCollection",
                      "features": [
                        {
                          "type": "Feature",
                          "geometry": {
                            "type": "Polygon",
                            "coordinates": [
                              [
                                [
                                  -92.014545992341738,
                                  30.224370934570651
                                ]
                              ]
                            ]
                          },
                          "properties": {
                            "name": "Roof",
                            "type": "Property Area",
                            "catalog_item_ids": [
                              "DBACI638103894064210"
                            ]
                          }
                        },
                        {
                          "type": "Feature",
                          "geometry": {
                            "type": "Polygon",
                            "coordinates": [
                              [
                                [
                                  -92.014545992341738,
                                  30.224370934570651
                                ]
                              ]
                            ]
                          },
                          "properties": {
                            "name": "Property",
                            "type": "Property Area",
                            "catalog_item_ids": [
                              "DBACI087795008790989"
                            ]
                          }
                        }
                      ]
                    }
                  },
                  "parent_id": "0fa695b3-11be-425f-86a9-e47540866cdc",
                  "job_service_details": null,
                  "portfolio": "DEMO - Rebel Base (Endor Station Construction)",
                  "package": {
                    "id": "demo-catalog-aerial",
                    "name": null
                  },
                  "onsite_contact": {
                    "name": "Wickett Warrick",
                    "note": "Please text or call if you run into any emergencies on site.",
                    "phone": "123-456-1234",
                    "call_action": ""
                  },
                  "scheduling_contact": null,
                  "activity_logs": [
                    {
                      "activity_id": "21941",
                      "created_at": "2024-10-21T16:34:45Z",
                      "action": "created",
                      "reason": ""
                    },
                    {
                      "activity_id": "21942",
                      "created_at": "2024-10-21T16:34:45Z",
                      "action": "confirmed",
                      "reason": ""
                    },
                    {
                      "activity_id": "21943",
                      "created_at": "2024-10-21T16:38:50Z",
                      "action": "put_on_hold",
                      "reason": "Customer asked"
                    }
                  ],
                  "images": null,
                  "videos": null,
                  "panoramas": null,
                  "ortho_photo_maps": null,
                  "attachments": null,
                  "flight_app": null,
                  "file_content": null
                }
              }
            }
          },
          "401": {
            "description": "Not authorized to use this api method"
          },
          "404": {
            "description": "The server did not find any data for this request",
            "schema": {
              "$ref": "#/definitions/JobUpdate404"
            }
          },
          "500": {
            "description": "An error has ocurred in the server",
            "schema": {
              "$ref": "#/definitions/JobModel500"
            }
          },
          "503": {
            "description": "The current API method is unavailable"
          }
        }
      }
    },
    "/Files/{jobId}": {
      "get": {
        "tags": [
          "MissionFile"
        ],
        "summary": "Retrieves the list of files associated with a specific mission.",
        "description": "This method retrieves file data from the database via the {Flyguys_Api.Models.S3FileManager} class. \r\nThe client ID is validated from the request headers to ensure proper authorization.",
        "operationId": "MissionFile_Files",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "description": "The unique identifier of the mission for which files need to be retrieved.",
            "required": true,
            "type": "string"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer "
          },
          {
            "name": "client_id",
            "in": "header",
            "required": false,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/MissionFiles"
            },
            "examples": {
              "application/json": {
                "mission_id": "00000000-0000-0000-0000-000000000000",
                "fileList": [
                  {
                    "file_name": "1711662.JPG",
                    "catalog_item_id": "DBACI236972520822663"
                  },
                  {
                    "file_name": "1711663.JPG",
                    "catalog_item_id": "DBACI087795008790989"
                  }
                ],
                "message": ""
              }
            }
          },
          "401": {
            "description": "Authorization has been denied for this request."
          },
          "500": {
            "description": "Unable to process your request. Internal server error."
          },
          "503": {
            "description": "Unable to process your request. Service not available."
          }
        }
      }
    },
    "/Files/v2/{jobId}": {
      "get": {
        "tags": [
          "MissionFileV2"
        ],
        "summary": "Retrieves a lists of file available on Azure Blob Storage for a given mission.",
        "operationId": "MissionFileV2_MissionBlobFiles",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "description": "The unique identifier of the mission for which files need to be retrieved.",
            "required": true,
            "type": "string"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer "
          },
          {
            "name": "client_id",
            "in": "header",
            "required": false,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/AzureMissionFilesDto"
            },
            "examples": {
              "application/json": {
                "mission_id": "160522ab-863f-4607-90db-e14fd38e53bf",
                "total_files": 2,
                "fileList": [
                  {
                    "blob_id": "15304d91-8120-45f8-9f1b-a9eb284ef52f",
                    "file_name": "15304d91-8120-45f8-9f1b-a9eb284ef52f.png",
                    "file_display_name": "DJI_001_ABC.png",
                    "catalog_item_id": "ABC123456"
                  },
                  {
                    "blob_id": "55304d91-8120-45f8-9f1b-a9eb284ef52f",
                    "file_name": "55304d91-8120-45f8-9f1b-a9eb284ef52f.jpg",
                    "file_display_name": "DJI_002_ABC.jpg",
                    "catalog_item_id": "CHF123456"
                  }
                ],
                "dateTime": "2026-10-30T07:57:21.9837936Z",
                "success": true
              }
            }
          },
          "204": {
            "description": "Unable to process your request. Job files are not available."
          },
          "400": {
            "description": "client_id is missing in the header.",
            "schema": {
              "$ref": "#/definitions/APIMissionFileV2ResponseBadRequestDTO"
            }
          },
          "401": {
            "description": "Authorization has been denied for this request."
          },
          "404": {
            "description": "Job id was not found.",
            "schema": {
              "$ref": "#/definitions/APIMissionFileV2ResponseNotFoundDTO"
            }
          },
          "500": {
            "description": "Unable to process your request. Internal server error.",
            "schema": {
              "$ref": "#/definitions/APIMissionFileV2ResponseInternalServerErrorDTO"
            }
          },
          "503": {
            "description": "Unable to process your request. Service not available.",
            "schema": {
              "$ref": "#/definitions/APIMissionFileV2ResponseServiceUnavailableDTO"
            }
          }
        }
      }
    },
    "/token": {
      "post": {
        "tags": [
          "Auth"
        ],
        "consumes": [
          "application/x-www-form-urlencoded"
        ],
        "parameters": [
          {
            "name": "grant_type",
            "in": "formData",
            "required": true,
            "type": "string",
            "default": "client_credentials"
          },
          {
            "name": "client_id",
            "in": "formData",
            "required": false,
            "type": "string"
          },
          {
            "name": "client_secret",
            "in": "formData",
            "required": false,
            "type": "string"
          }
        ]
      }
    }
  },
  "definitions": {
    "Credentials": {
      "description": "The Credentials class represents the temporary AWS credentials that are provided to clients.\r\nThese credentials include an access key, secret access key, session token, expiration time, and a message to describe the request status.",
      "type": "object",
      "properties": {
        "AccessKeyId": {
          "description": "Gets or sets the temporary AWS access key ID.",
          "type": "string"
        },
        "SecretAccessKey": {
          "description": "Gets or sets the temporary AWS secret access key.",
          "type": "string"
        },
        "SessionToken": {
          "description": "Gets or sets the temporary session token provided by AWS.",
          "type": "string"
        },
        "Expiration": {
          "format": "date-time",
          "description": "Gets or sets the expiration time of the temporary credentials.",
          "type": "string"
        },
        "Message": {
          "description": "Gets or sets a message indicating the status of the request, e.g., \"Success\" or an error message.",
          "type": "string"
        },
        "S3BucketName": {
          "description": "Gets or sets the name of the S3 bucket associated with these credentials.",
          "type": "string"
        }
      }
    },
    "AWSCredentialsInternalServerErrorDTO": {
      "type": "object",
      "properties": {
        "AccessKeyId": {
          "type": "string",
          "example": ""
        },
        "SecretAccessKey": {
          "type": "string",
          "example": ""
        },
        "SessionToken": {
          "type": "string",
          "example": ""
        },
        "Expiration": {
          "format": "date-time",
          "type": "string"
        },
        "Message": {
          "type": "string",
          "example": "An error has ocurred in the server"
        },
        "S3BucketName": {
          "type": "string",
          "example": ""
        }
      }
    },
    "AzureStorageCredentials": {
      "type": "object",
      "properties": {
        "ServiceUrl": {
          "type": "string"
        },
        "SharedAccesSignature": {
          "type": "string"
        },
        "ExpirationTime": {
          "format": "date-time",
          "type": "string"
        },
        "AccountName": {
          "type": "string"
        },
        "ContainerName": {
          "type": "string"
        },
        "Message": {
          "type": "string"
        }
      }
    },
    "APIAzureSecurityResponseOKDTO": {
      "type": "object",
      "properties": {
        "ServiceUrl": {
          "type": "string",
          "example": "https://flyguys20storage.blob.core.windows.net"
        },
        "SharedAccesSignature": {
          "type": "string",
          "example": "?sv=2024-08-04&ss=b&srt=o&se=2024-10-11T00%3A15%3A05Z&sp=r&sig=FWnS6GXyN54MRGo0BTvRBpygZKlr1fDo0IAhg302mQU%74"
        },
        "ExpirationTime": {
          "format": "date-time",
          "type": "string"
        },
        "AccountName": {
          "type": "string",
          "example": "flyguys20teststorage"
        },
        "ContainerName": {
          "type": "string",
          "example": "flyguys-test-container"
        },
        "Message": {
          "type": "string",
          "example": "Success"
        }
      }
    },
    "APIAzureSecurityResponseInternalServerErrorDTO": {
      "type": "object",
      "properties": {
        "ServiceUrl": {
          "type": "string",
          "example": ""
        },
        "SharedAccesSignature": {
          "type": "string",
          "example": ""
        },
        "ExpirationTime": {
          "format": "date-time",
          "type": "string"
        },
        "AccountName": {
          "type": "string",
          "example": ""
        },
        "ContainerName": {
          "type": "string",
          "example": ""
        },
        "Message": {
          "type": "string",
          "example": "Internal Server Error"
        }
      }
    },
    "JobModel404": {
      "type": "object",
      "properties": {
        "MissionId": {
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "MissionIdPublic": {
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "Message": {
          "type": "string",
          "example": "Job id was not found"
        },
        "StatusCode": {
          "type": "string",
          "example": "404"
        },
        "Data": {
          "type": "object",
          "example": "{}"
        },
        "fg_20_mission_id": {
          "type": "string",
          "example": "string"
        },
        "fg_20_mission_number": {
          "format": "int32",
          "type": "integer",
          "example": "0"
        }
      }
    },
    "JobModel500": {
      "type": "object",
      "properties": {
        "MissionId": {
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "MissionIdPublic": {
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "Message": {
          "type": "string",
          "example": "An error has ocurred in the server"
        },
        "StatusCode": {
          "type": "string",
          "example": "404"
        },
        "Data": {
          "type": "object",
          "example": "{}"
        },
        "fg_20_mission_id": {
          "type": "string",
          "example": "string"
        },
        "fg_20_mission_number": {
          "format": "int32",
          "type": "integer",
          "example": "0"
        }
      }
    },
    "JobModel404Get": {
      "type": "object",
      "properties": {
        "MissionId": {
          "type": "string"
        },
        "MissionIdPublic": {
          "type": "string"
        },
        "Message": {
          "type": "string",
          "example": "Mission Id not found"
        },
        "StatusCode": {
          "type": "string",
          "example": "NotFound"
        },
        "Data": {
          "type": "object"
        },
        "fg_20_mission_id": {
          "type": "string"
        },
        "fg_20_mission_number": {
          "format": "int32",
          "type": "integer"
        }
      }
    },
    "JobUpdate404": {
      "type": "object",
      "properties": {
        "MissionId": {
          "type": "string"
        },
        "MissionIdPublic": {
          "type": "string"
        },
        "Message": {
          "type": "string",
          "example": "Invalid  status provided"
        },
        "StatusCode": {
          "type": "string",
          "example": "BadRequest"
        },
        "Data": {
          "type": "object"
        },
        "fg_20_mission_id": {
          "type": "string"
        },
        "fg_20_mission_number": {
          "format": "int32",
          "type": "integer"
        }
      }
    },
    "MissionFiles": {
      "type": "object",
      "properties": {
        "mission_id": {
          "type": "string"
        },
        "fileList": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/FileList"
          }
        },
        "message": {
          "type": "string"
        }
      }
    },
    "FileList": {
      "type": "object",
      "properties": {
        "file_name": {
          "type": "string"
        },
        "catalog_item_id": {
          "type": "string"
        }
      }
    },
    "AzureMissionFilesDto": {
      "type": "object",
      "properties": {
        "mission_id": {
          "format": "uuid",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "total_files": {
          "format": "int32",
          "type": "integer"
        },
        "fileList": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/AzureFileListDto"
          }
        },
        "dateTime": {
          "format": "date-time",
          "type": "string"
        },
        "success": {
          "type": "boolean"
        }
      }
    },
    "AzureFileListDto": {
      "type": "object",
      "properties": {
        "blob_id": {
          "format": "uuid",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "file_name": {
          "type": "string"
        },
        "file_display_name": {
          "type": "string"
        },
        "catalog_item_id": {
          "type": "string"
        }
      }
    },
    "APIMissionFileV2ResponseBadRequestDTO": {
      "type": "object",
      "properties": {
        "missionId": {
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "missionIdPublic": {
          "format": "uuid",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "message": {
          "type": "string",
          "example": "client_id is missing in the header."
        },
        "statusCode": {
          "type": "string",
          "example": "400"
        },
        "data": {
          "type": "object"
        },
        "fg_20_mission_id": {
          "type": "string"
        },
        "fg_20_mission_number": {
          "format": "int32",
          "type": "integer"
        }
      }
    },
    "APIMissionFileV2ResponseNotFoundDTO": {
      "type": "object",
      "properties": {
        "missionId": {
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "missionIdPublic": {
          "format": "uuid",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "message": {
          "type": "string",
          "example": "Job id was not found."
        },
        "statusCode": {
          "type": "string",
          "example": "404"
        },
        "data": {
          "type": "object"
        },
        "fg_20_mission_id": {
          "type": "string"
        },
        "fg_20_mission_number": {
          "format": "int32",
          "type": "integer"
        }
      }
    },
    "APIMissionFileV2ResponseInternalServerErrorDTO": {
      "type": "object",
      "properties": {
        "missionId": {
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "missionIdPublic": {
          "format": "uuid",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "message": {
          "type": "string",
          "example": "Unable to process your request. Internal server error."
        },
        "statusCode": {
          "type": "string",
          "example": "500"
        },
        "data": {
          "type": "object"
        },
        "fg_20_mission_id": {
          "type": "string"
        },
        "fg_20_mission_number": {
          "format": "int32",
          "type": "integer"
        }
      }
    },
    "APIMissionFileV2ResponseServiceUnavailableDTO": {
      "type": "object",
      "properties": {
        "missionId": {
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "missionIdPublic": {
          "format": "uuid",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "message": {
          "type": "string",
          "example": "Unable to process your request. Service not available."
        },
        "statusCode": {
          "type": "string",
          "example": "500"
        },
        "data": {
          "type": "object"
        },
        "fg_20_mission_id": {
          "type": "string"
        },
        "fg_20_mission_number": {
          "format": "int32",
          "type": "integer"
        }
      }
    }
  }
}