Newer
Older
# Copyright 2022 ETSI. Licensed under the BSD-3-Clause license
# API for the Augmented Reality Framework (ARF)
# Working group: ETSI ISG ARF
# STF group: STF620 (validation)
#
# References:
# - Explaination UUID: https://en.wikipedia.org/wiki/Universally_unique_identifier / https://fr.wikipedia.org/wiki/Universally_unique_identifier
# - UUID formats: 8-4-4-4-12 format string, lower case (but case insensitive on input)
# - UUID RFC4122: https://datatracker.ietf.org/doc/html/rfc4122#section-3
# - online UUID generator: https://www.uuidgenerator.net/
# - Rules for RESTful error code RFC2616: https://datatracker.ietf.org/doc/html/rfc2616#section-10
# - Guide: https://restfulapi.net/http-status-codes/
#
title: World Storage API
description: API ensuring interoperability between an authoring tool and a World Storage service
license:
name: Copyright 2022 ETSI. Licensed under the BSD-3-Clause license
url: https://opensource.org/licenses/BSD-3-Clause
servers:
- url: http://localhost:8080
tags:
- name: default
description: Default operations to test the current server's state
- name: Trackables
description: Trackables are models of parts of the real world. <br>Trackables are elements of the real world of which features are available and/or could be extracted.<br> Trackables provide a Coordinate Reference System in which a pose can be expressed.
- name: World Anchors
description: A World Anchor represents a fixed position in relation to one or more elements of the real world. <br>It has a Coordinate Reference System in which AR Assets stay spatially-registered.
- name: World Links
description: A World Link represents and defines the relative 3D position and orientation between elements (Trackables and/or World Anchors).
paths:
/ping:
get:
summary: Test the server availability
Sylvain Renault
committed
summary: Get the state of the server.
operationId: getAdmin
responses:
'200':
description: OK, world storage server ready.
Sylvain Renault
committed
/version:
get:
summary: Get the version of the ARF API.
##############
# TRACKABLES #
##############
description: Create a new Trackable from a json object containing all the required informations and add it to the world storage. <br>As a result you will get the ID of the newly created Trackable.
description: The Trackable to be added to the world storage.
required: true
content:
application/json:
schema:
description: OK, return the UUID of the Trackable defined by the world storage.
content:
text/plain:
schema:
type: string
'201':
description: Null response.
'400':
$ref: '#/components/responses/400_BadRequest'
'409':
$ref: '#/components/responses/409_NotEmptyUUID'
'default':
$ref: '#/components/responses/4xx_UnexpectedError'
description: Get all the Trackables currently being stored in the world storage.
description: OK, return all the Trackables defined by the world storage.
content:
application/json:
schema:
type : array
items :
$ref: '#/components/responses/4xx_UnexpectedError'
/trackables/{trackableUUID}:
description: Get a single Trackable stored in the world storage from its ID.
description: UUID of the Trackable to retrieve.
$ref: '#/components/responses/400_InvalidUUID'
$ref: '#/components/responses/404_NotFoundUUID'
operationId: deleteTrackable
description: Delete a single Trackable stored in the world storage from its ID.
required: true
schema:
type: string
responses:
'200':
$ref: '#/components/responses/400_InvalidUUID'
$ref: '#/components/responses/404_NotFoundUUID'
#################
# WORLD ANCHORS #
#################
description: Create a new World Anchor from a json object containing all the required informations and add it to the world storage. <br>As a result you will get the ID of the newly created World Anchor.
description: The World Anchor to be added to the world storage.
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/WorldAnchor'
description: OK, return the UUID of the World Anchor defined by the world storage.
content:
text/plain:
schema:
type: string
'201':
description: Null response.
'400':
$ref: '#/components/responses/400_BadRequest'
'409':
$ref: '#/components/responses/409_NotEmptyUUID'
'default':
$ref: '#/components/responses/4xx_UnexpectedError'
summary: Return all the World Anchors.
description: Get all the World Anchors currently being stored in the world storage.
description: OK, return all the World Anchors defined by the world storage.
content:
application/json:
schema:
type : array
items :
$ref: "#/components/schemas/WorldAnchor"
$ref: '#/components/responses/4xx_UnexpectedError'
/worldAnchors/{worldAnchorUUID}:
summary: Find a World Anchor by its UUID.
description: Get a single World Anchor stored in the world storage from its ID.
description: UUID of the World Anchor to retrieve.
content:
application/json:
schema:
$ref: '#/components/schemas/WorldAnchor'
'400':
$ref: '#/components/responses/400_InvalidUUID'
$ref: '#/components/responses/404_NotFoundUUID'
description: Delete a single World Anchor stored in the world storage from its ID.
description: World Anchor UUID to delete.
$ref: '#/components/responses/400_InvalidUUID'
$ref: '#/components/responses/404_NotFoundUUID'
###############
# WORLD LINKS #
###############
summary: Create a World Link between elements (world anchors and/or trackables).
description: Create a new World Link from a json object containing all the required informations and add it to the world storage. <br>As a result you will get the ID of the newly created World Link.
description: The link to be added to the world storage.
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/WorldLink'
responses:
'200':
description: OK, return the UUID of the World Link defined by the world storage.
content:
text/plain:
schema:
type: string
'201':
description: Null response
'400':
$ref: '#/components/responses/400_BadRequest'
'409':
$ref: '#/components/responses/409_NotEmptyUUID'
'default':
$ref: '#/components/responses/4xx_UnexpectedError'
summary: Return all World Links.
description: Get all the World Links currently being stored in the world storage.
description: OK return all the World Links defined by the world storage.
content:
application/json:
schema:
type : array
items :
$ref: "#/components/schemas/WorldLink"
$ref: '#/components/responses/4xx_UnexpectedError'
/worldLinks/{worldLinkUUID}:
summary: Find a World Link by its UUID.
description: Get a single World Link stored in the world storage from its ID.
description: UUID of the World Link to retrieve.
content:
application/json:
schema:
$ref: '#/components/schemas/WorldLink'
'400':
$ref: '#/components/responses/400_InvalidUUID'
$ref: '#/components/responses/404_NotFoundUUID'
description: Delete a single World Link stored in the world storage from its ID.
description: World Link id to delete.
$ref: '#/components/responses/400_InvalidUUID'
'404':
$ref: '#/components/responses/404_NotFoundUUID'
# COMPONENTS ###############################################
#-------------------------------
# Reusable schemas (data models)
#-------------------------------
description: An element representing a Trackable object in the real world.
Sylvain Renault
committed
- name
- trackableType
- trackableEncodingInformation
- trackablePayload
- keyvalueTags
description: An Universally Unique IDentifier identifying the Trackable (RFC 4122).
type: string
format: uuid
example: fa8bbe40-8052-11ec-a8a3-0242ac120002
Sylvain Renault
committed
name:
description: A human readable name for the Trackable.
Sylvain Renault
committed
type: string
description: An Universally Unique IDentifier identifying the creator of the Trackable (a person, a team or a company).
description: Extensible list of Trackable types, possibly handled by complient world storage implementation.
enum: [FIDUCIAL_MARKER, IMAGE_MARKER, MAP, GEOPOSE, OTHER]
example: FIDUCIAL_MARKER
trackableEncodingInformation:
$ref: '#/components/schemas/EncodingInformationStructure'
description: The data provided to create the Trackable in a specific format handled by the world storage service.
type: string
format: byte
example: "10110101"
localCRS:
$ref: '#/components/schemas/Transform3D'
$ref: '#/components/schemas/UnitSystem'
$ref: '#/components/schemas/Size'
$ref: '#/components/schemas/KeyvalueTagList'
description: An element describing a pose in the world graph.
Sylvain Renault
committed
- name
description: An Universally Unique IDentifier identifying the World Anchor (RFC 4122).
Sylvain Renault
committed
name:
description: A human readable name for the World Anchor.
Sylvain Renault
committed
type: string
description: An Universally Unique IDentifier identifying the creator of the World Anchor.
$ref: '#/components/schemas/Transform3D'
$ref: '#/components/schemas/UnitSystem'
$ref: '#/components/schemas/Size'
$ref: '#/components/schemas/KeyvalueTagList'
description: An object holding the info of a transform between two elements.
- creatorUUID
- UUIDFrom
- UUIDTo
- transform
description: An Universally Unique IDentifier identifying the World Link (RFC 4122).
description: An Universally Unique IDentifier identifying the creator of the World Link.
description: An Universally Unique IDentifier identifying a World Anchor or Trackable.
description: An Universally Unique IDentifier identifying a World Anchor or Trackable.
example: 85eed503-875c-4d3d-9569-06c4859bd4cd
typeFrom:
$ref: '#/components/schemas/ObjectType'
typeTo:
$ref: '#/components/schemas/ObjectType'
$ref: '#/components/schemas/Transform3D'
$ref: '#/components/schemas/UnitSystem'
$ref: '#/components/schemas/KeyvalueTagList'
description: An object holding the info of a Trackable`'`s encoding informations `:` the data format and the version.
required:
- dataFormat
- version
properties:
dataFormat:
enum: [HOLOLENS, ARKIT, ARCORE, VUFORIA, ARUCO, OTHER]
example : "HOLOLENS"
version:
description: The version of the format
type: string
example : "1.01"
description: Coordinate reference system of the world anchor, a 4*4 matrix (rowmajor) represented by a float vector.
type: array
minItems: 16
maxItems: 16
items:
type: number
format: float
example: [ 1, 0, 0, 3,
0, 1, 0, 3,
0, 0, 1, 3,
0, 0, 0, 1]
type: string
enum: [MM, CM, DM, M, DAM, HM, KM, INCH, FOOT, YARD, MILE]
description: Size object in format {width, length, depth}.
type: array
items:
type: number
format: double
minItems: 3
maxItems: 3
Sylvain Renault
committed
description: List of additional parameters to be stored with the object.
type: object
additionalProperties:
type: array
items:
type: string
minItems: 1
example: { "Place" : ["Building 123"], "Room" : ["007"]}
Error:
required:
- code
- message
properties:
code:
type: integer
format: int32
message:
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
#-------------------------------
# Reusable responses
#-------------------------------
responses:
#######################
# 1xx : Informational #
#######################
#################
# 2xx : Success #
#################
#####################
# 3xx : Redirection #
#####################
#######################
# 4xx : Client Errors #
#######################
400_BadRequest:
description: Bad request.
400_InvalidUUID:
description: Invalid UUID supplied.
404_NotFoundUUID:
description: Not found, could not find UUID in database.
409_NotEmptyUUID:
description: Invalid UUID, id must be a Nil value.
4xx_UnexpectedError: # Can be referenced as '#/components/responses/GenericError'
description: Unexpected error.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
########################
# 5xx : Server Errors #
########################
5xx_UnexpectedError:
description: Unexpected server error.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'