Commit 67e520c3 authored by Jérémy Lacoche's avatar Jérémy Lacoche Committed by Jérémy Lacoche
Browse files

Unsubscribing name it "unsubsribeToPost" but "unsubscribeFromPose".

The path for subscriptions is now /pose/subscriptions/{subscriptionsUUID}. 
Add GET request to retrieve a subscription. Also an update using PUT to modify a subscription.
Can subscribed information is available with the get last pose method.
Flag "deviceToWorldAnchor" is now an enum
parent 71d87e0a
Loading
Loading
Loading
Loading
+149 −41
Original line number Original line Diff line number Diff line
@@ -98,14 +98,13 @@ paths:
        schema:
        schema:
          type: string
          type: string
          format: uuid
          format: uuid
      - name: deviceToWorldAnchor
          example: "fa8bbe40-8052-11ec-a8a3-0242ac120002"
      - name: mode
        in: query
        in: query
        description: a boolean representing the context of the Relocalization information (AR device to WorldAnchor/Trackable or WorldAnchor/Trackable to AR device)
        description: Mode representing the context of the Relocalization information (AR device to WorldAnchor/Trackable or WorldAnchor/Trackable to AR device)
        required: false
        required: true
        schema:
        schema:
          type: boolean
          $ref: '#/components/schemas/Mode'
          default: false
        example: false
      responses: 
      responses: 
        '200':
        '200':
          description: Successful operation.
          description: Successful operation.
@@ -124,7 +123,7 @@ paths:
        'default':
        'default':
          $ref: '#/components/responses/4xx_UnexpectedError'
          $ref: '#/components/responses/4xx_UnexpectedError'


  /pose/{trackableOrAnchorUUID}/subscribe:
  /pose/subscriptions:
    post:
    post:
      summary: Subscribe to collect the pose of an AR device, an Anchor or a Trackable 
      summary: Subscribe to collect the pose of an AR device, an Anchor or a Trackable 
      operationId: subscribeToPose
      operationId: subscribeToPose
@@ -136,27 +135,99 @@ paths:
          in: header
          in: header
          schema:
          schema:
            $ref: '#/components/schemas/Token'
            $ref: '#/components/schemas/Token'
        - name: trackableOrAnchorUUID
        - name: target
          in: path
          in: query
          description: UUID of the Trackable or Anchor to subscribe
          description: UUID of the Trackable or Anchor to subscribe
          required: false
          schema:
            type: string
            format: uuid
            example: "fa8bbe40-8052-11ec-a8a3-0242ac120002"
      requestBody:
          required: true
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionRequest'
      responses: 
        '200':
          description: Successful operation.
          content: 
            application/json:
              schema:
                $ref: '#/components/schemas/Subscription'
        '400':
          $ref: '#/components/responses/400_InvalidUUID'
        '403':
          $ref: '#/components/responses/403_ForbiddenUUID'
        '404':
          $ref: '#/components/responses/404_NotFoundUUID'
        '405':
          $ref: '#/components/responses/405_NotSupported'
        'default':
          $ref: '#/components/responses/4xx_UnexpectedError'


  /pose/subscriptions/{subscriptionUUID}:
    get:
      summary: Get information about a subscription
      operationId: getSubscription
      description: End the subscription and the associated callback for collecting a given pose
      tags:
        - Pose
      parameters:
        - in: header
          name: token
          schema:
            $ref: '#/components/schemas/Token'
        - name: subscriptionUUID
          in: path
          description: Subscription UUID to delete.
          required: true
          required: true
          schema:
          schema:
            type: string
            type: string
            format: uuid
            format: uuid
        - name: deviceToWorldAnchor
            example: "bdc83e6b-a89d-4b29-9c99-e9015d448b10"
          in: query
      responses:
          description: a boolean representing the context of the Relocalization information (AR device to WorldAnchor/Trackable or WorldAnchor/Trackable to AR device)
        '200':
          required: false
          description: Successful operation.
          content: 
            application/json:
              schema:
              schema:
            type: boolean
                $ref: '#/components/schemas/Subscription'
            default: false
        '400':
          example: false
          $ref: '#/components/responses/400_InvalidUUID'
        '404':
          $ref: '#/components/responses/404_NotFoundUUID'
    put:
      summary: Update a subscription
      operationId: updateSubscription
      description: Update an existing subscription
      tags:
        - Pose
      parameters:
        - in: header
          name: token
          schema:
            $ref: '#/components/schemas/Token'
        - name: subscriptionUUID
          in: path
          description: Subscription UUID to delete.
          required: true
          schema:
            type: string
            format: uuid
            example: "bdc83e6b-a89d-4b29-9c99-e9015d448b10"
      requestBody:
      requestBody:
          required: false
          required: true
          content:
          content:
            application/json:
            application/json:
              schema:
              schema:
                type: object
                properties:
                properties:
                  mode:
                    description: Mode representing the context of the Relocalization information (AR device to WorldAnchor/Trackable or WorldAnchor/Trackable to AR device)
                    $ref: '#/components/schemas/Mode'
                  validity: 
                  validity: 
                    description: Subscription validity delay in millisecond 
                    description: Subscription validity delay in millisecond 
                    type: integer
                    type: integer
@@ -165,7 +236,7 @@ paths:
                    description: Optional URL of your listening webhook for collecting the poses
                    description: Optional URL of your listening webhook for collecting the poses
                    type: string
                    type: string
                    default: null
                    default: null
                    example: http://mySceneManagementServer.com/Poses"
                    example: "http://myscenemanagementserver.com/poses"
      responses:
      responses:
        '200':
        '200':
          description: Successful operation.
          description: Successful operation.
@@ -175,19 +246,11 @@ paths:
                $ref: '#/components/schemas/Subscription'
                $ref: '#/components/schemas/Subscription'
        '400':
        '400':
          $ref: '#/components/responses/400_InvalidUUID'
          $ref: '#/components/responses/400_InvalidUUID'
        '403':
          $ref: '#/components/responses/403_ForbiddenUUID'
        '404':
        '404':
          $ref: '#/components/responses/404_NotFoundUUID'
          $ref: '#/components/responses/404_NotFoundUUID'
        '405':
          $ref: '#/components/responses/405_NotSupported'
        'default':
          $ref: '#/components/responses/4xx_UnexpectedError'

  /pose/unsubscribe/{subscriptionUUID}:
    delete:
    delete:
        summary: Remove a subscription to a given pose
        summary: Remove a subscription to a given pose
        operationId: unSubscribeToPose
        operationId: unsubscribeFromPose
        description: End the subscription and the associated callback for collecting a given pose
        description: End the subscription and the associated callback for collecting a given pose
        tags:
        tags:
          - Pose
          - Pose
@@ -203,9 +266,10 @@ paths:
            schema:
            schema:
              type: string
              type: string
              format: uuid
              format: uuid
              example: "bdc83e6b-a89d-4b29-9c99-e9015d448b10"
        responses:
        responses:
          '200':
          '200':
            description: OK, unbscription successful.
            description: OK, unsubcription successful.
            content:
            content:
              text/plain:
              text/plain:
                schema:
                schema:
@@ -244,7 +308,7 @@ paths:
          $ref: '#/components/responses/4xx_UnexpectedError'
          $ref: '#/components/responses/4xx_UnexpectedError'




  /capabilities/{TrackableOrAnchorUUID}:
  /capabilities/{trackableOrAnchorUUID}:
      get:
      get:
        summary: For a given trackable or anchor, get its support information  
        summary: For a given trackable or anchor, get its support information  
        operationId: getSupport
        operationId: getSupport
@@ -256,7 +320,7 @@ paths:
            name: token
            name: token
            schema:
            schema:
              $ref: '#/components/schemas/Token'
              $ref: '#/components/schemas/Token'
          - name: TrackableOrAnchorUUID
          - name: trackableOrAnchorUUID
            in: path
            in: path
            description: UUID of the Trackable or Anchor to check support
            description: UUID of the Trackable or Anchor to check support
            required: true
            required: true
@@ -325,10 +389,9 @@ components:
            description: A score representing the confidence concerning the accuracy of the pose estimated
            description: A score representing the confidence concerning the accuracy of the pose estimated
            type: number
            type: number
            example : 50.00
            example : 50.00
          deviceToWorldAnchor:
          mode:
            description: A boolean representing the context of the estimated pose (AR device to WorldAnchor/Trackable or WorldAnchor/Trackable to AR device)
            description: Mode representing the context of the Relocalization information (AR device to WorldAnchor/Trackable or WorldAnchor/Trackable to AR device)
            type: boolean
            $ref: '#/components/schemas/Mode'
            example: false
          value:
          value:
            description: The pose value
            description: The pose value
            oneOf:
            oneOf:
@@ -341,6 +404,10 @@ components:
                 0, 1, 0, 3,
                 0, 1, 0, 3,
                 0, 0, 1, 3,
                 0, 0, 1, 3,
                 0, 0, 0, 1 ]
                 0, 0, 0, 1 ]
          subscriptionUrl:
            description: The URL to use for subscription (if available), see [/pose/subscriptions]
            type: string
            example: "http://mywordanalysisserver.com/pose/subscriptions?target=fa8bbe40-8052-11ec-a8a3-0242ac120002"
            
            
      PoseValue:
      PoseValue:
        description: Base type to define the pose value
        description: Base type to define the pose value
@@ -450,6 +517,12 @@ components:
        enum: [TRACKABLE, ANCHOR]
        enum: [TRACKABLE, ANCHOR]
        example: ANCHOR
        example: ANCHOR


      Mode:
        description: Mode representing the context of the relocalization information (AR device to WorldAnchor/Trackable or WorldAnchor/Trackable to AR device)
        type: string
        enum: [DEVICE_TO_TRACKABLE_OR_ANCHOR, TRACKABLE_OR_ANCHOR_TO_DEVICE]
        example: DEVICE_TO_TRACKABLE_OR_ANCHOR

      Capability:
      Capability:
        description: An object representing a supported capability of the World Analysis and its associated metadata
        description: An object representing a supported capability of the World Analysis and its associated metadata
        type: object
        type: object
@@ -490,6 +563,31 @@ components:
            type: number
            type: number
            example : 30.0
            example : 30.0


      SubscriptionRequest:
        description: Request when subscribing for pose update of a Trackable or a WorldAnchor
        type: object
        properties:
          target:
            description: UUID of the Trackable or Anchor to subscribe
            type: string
            format: uuid
            example: "fa8bbe40-8052-11ec-a8a3-0242ac120002"
          mode:
            description: Mode representing the context of the Relocalization information (AR device to WorldAnchor/Trackable or WorldAnchor/Trackable to AR device)
            $ref: '#/components/schemas/Mode'
          validity: 
            description: Subscription validity delay in millisecond 
            type: integer
            example: 20000
          webhookUrl:
            description: Optional URL of your listening webhook for collecting the poses
            type: string
            default: null
            example: "http://myscenemanagementserver.com/poses"
        required:
          - target
          - mode

      Subscription:
      Subscription:
        description: Response when subscribing for pose update of a Trackable or a WorldAnchor
        description: Response when subscribing for pose update of a Trackable or a WorldAnchor
        type: object
        type: object
@@ -499,15 +597,25 @@ components:
            type: string
            type: string
            format: uuid
            format: uuid
            example: "bdc83e6b-a89d-4b29-9c99-e9015d448b10"
            example: "bdc83e6b-a89d-4b29-9c99-e9015d448b10"
          target:
            description: UUID of the Trackable or Anchor associated with the subscription
            type: string
            format: uuid
            example: "fa8bbe40-8052-11ec-a8a3-0242ac120002"
          mode:
            description: Mode representing the context of the Relocalization information (AR device to WorldAnchor/Trackable or WorldAnchor/Trackable to AR device)
            $ref: '#/components/schemas/Mode'
          validity:
          validity:
            type: integer
            type: integer
            example: 20000
            example: 20000
          websocketurl:
          webhookUrl:
              description: Optional URL of the listening webhook that collect the poses
              type: string
              default: null
          websocketUrl:
            description: Optional dynamically generated websocket url in case of no webhook provided in the request body
            description: Optional dynamically generated websocket url in case of no webhook provided in the request body
            type: string
            type: string
            example: wss://www.WorkdAnalysis.com/socketserver/bdc83e6b-a89d-4b29-9c99-e9015d448b10"
            example: "wss://mywordanalysisserver.com/websocket/bdc83e6b-a89d-4b29-9c99-e9015d448b10"
        required:
          - uuid


      Error:
      Error:
        required:
        required: