Commit 3bd72d83 authored by Dimitrios Gogos's avatar Dimitrios Gogos
Browse files

Merge branch 'fix/restore-location-retrieve-endpoint' into 'main'

fix: added location retrieval endpoint

See merge request !17
parents db35a097 6959561d
Loading
Loading
Loading
Loading
+49 −0
Original line number Diff line number Diff line
@@ -814,6 +814,55 @@ paths:
  #         description: Method not allowed
  #       "404":
  #         description: Session not found
  /location/retrieve:
    post:
      tags:
      - Location Retrieval Functions
      summary: Retrieve the location of a device
      description: |
        Retrieve the location of a device using the CAMARA Device Location API.
        The request is forwarded to the Service Resource Manager which delegates
        to the configured network adapter.
      operationId: edge_cloud_management_api.controllers.network_functions_controller.retrieve_location
      requestBody:
        description: Location retrieval request following CAMARA Device Location API.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RetrievalLocationRequest'
            examples:
              PhoneNumberExample:
                summary: Retrieve location by phone number
                value:
                  device:
                    phoneNumber: "+123456789"
                  maxAge: 60
              Ipv4Example:
                summary: Retrieve location by IPv4 address
                value:
                  device:
                    ipv4Address:
                      publicAddress: "198.51.100.1"
                      publicPort: 59765
                  maxAge: 120
                  maxSurface: 10000
      responses:
        "200":
          description: Device location retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LocationResponse'
        "400":
          $ref: "#/components/responses/400"
        "401":
          $ref: "#/components/responses/401"
        "404":
          $ref: "#/components/responses/404"
        "500":
          $ref: "#/components/responses/500"
        "503":
          $ref: "#/components/responses/503"
  /partner:
    post: 
      tags: