As defined in , HATEOAS stands for Hypermedia As The Engine Of Application State. It means that the hypermedia models application state transitions and describe application protocols.
As defined in  clause 3 RESTful Domain Application Protocols, an application is a software implementation defined to achieve a particular goal. It consists of a set of constrained interactions between NF Service Consumer and Producer performed at run-time that are guided by an application specific set of rules. The application transits across some intermediate states until the application's goal is achieved. The application has then reached its final state.
An application state is a snapshot of an application instance.
On each interaction, the NF Service Consumer and Producer exchange representations of resource state. According to , "REST concentrates all of the control state into the representations received in response to interactions." and "The model application is therefore an engine that moves from one state to the next by examining and choosing from among the alternative state transitions in the current set of representations." After each interaction the NF Service Consumer is then presented with control state options to interact with additional resources. These control states are in the form of hypermedia markups embedded in the returned resource representation. The application state changes when an NF Service Consumer examines and chooses which control to operate and subsequently interacts with the resources identified in the selected control state.
HATEOAS support is optional. If HATEOAS is supported, the procedure in the present clause 4.7 shall apply.
_links attribute to be added into the JSON hypermedia object definition
The LinksValueSchema data type shall be added to the list of re-used data types of the hypermedia enabled API (see TS 29.509 for an example of implementation of a hypermedia API).
The "_links" member names are link relation types (as defined by RFC 8288) and values are either a "link" object or an array of "link" objects.
Basic 3GPP hypermedia format specifies the following "link" attribute:
"href": contains the URI of the linked resource.
A NF service producer shall set the Content-Type HTTP header to "application/3gppHal+json" when returning an HTTP payload with a basic 3GPP hypermedia enabled document.
A NF service consumer supporting HATEOAS shall advertise it by adding an "Accept" HTTP header with "application/3gppHal+json" as media type.
The key is the name of the corresponding link relation type to which the template is to be applied.
The Link data type and HalTemplate data type shall be added to the list of re-used data types of the hypermedia enabled API.
A NF service consumer supporting HATEOAS and extended 3GPP hypermedia shall advertise it by adding an "Accept" HTTP header with "application/3gppHalForms+json" as media type.
When a NF service producer responds to a NF service consumer and there is one or more application state transition possible, the NF service producer shall advertise them by adding a "_links" property in the returned resource representation. When there are multiple state transitions with different relation types, then one member per relation type shall be added to the "_links" object which name is equal to the relation type. If there is only one state transition for a given relation type then the value of the member is a "link" object otherwise it is an array of "link" objects.
A NF service producer shall include a link into the returned resource representation with a registered relation type "self" when it is expected further actions upon it (for instance reading it again or replacing the resource state).
When a NF service consumer receives a response with linked resources then it shall infer the link relation semantic from the relation type. It shall not infer it from the linked resource URI format.
In 3GPP hypermedia, relation types are the name of "_links" object members.
This clause contains the list of relation types supported in 3GPP Service Based Interface APIs.
As defined in Section 2.1 in RFC 8288, a link relation type identifies the semantics of a link. It describes how resources are related to each other. It may also be used to indicate that the target resource of a link has particular attributes, or exhibits particular behaviours. Relation types shall not be confused with media types. It does not identify the format of the representation that results when the link is dereferenced.
There are two kinds of relation types:
Registered relation types;
Extension relation types.
Registered relation types are identified by a token (for instance "self") and can be reused by other applications such as 3GPP SBI APIs. They are registered by IANA. Registered relation types shall be preferred against extension relation types when expressing the link relation between two resources.
If there is a need to define a relation type that does not correspond to a registered one but it is not wanted to register it then an extension relation type shall be used instead.
When no registered relation exists to express the relation between two resources, an extension relation type shall be used instead. It may be defined as a string token or as a URI as defined in RFC 8288.
An API specification using extension relation types shall contain a clause "Relation types" in the clause "Simple data types and enumerations" (see TS 29.509 for an example of implementation of a hypermedia API). The clause shall contain a table listing the token or the URI of the created relation types. It shall also contain a detailed specification of the semantic of the relation types defining the conditions that the NF Service Consumer shall match to follow a link.
The supported feature mechanism in clause 6.6.2 of TS 29.500 should be used to negotiate the usage of optional HATEOAS features in addition to negotiating the content type "3gppHal+json" and "3gppHalForms+json". Separate supported features can be defined for link relation types related to different use cases.