REST Web Services Key Concepts

The following sections introduce the main concepts of REST web services.

HATEOAS

Hypermedia as the Engine of Application State is an essential principle that should be respected in RESTful APIs.

In practice this means that you can navigate to the referenced resources without deeper knowledge of the system. A typical response contains "links" sections for each resource, which can be a sub-resource of a parent resource or any other referenced resource. You can use links to work with those resources.

For example, when getting sales order data, the response contains a customer reference field that contains a links section. You can then use the link to get data of the particular customer.

For more information, see the following resources:

Resource

A resource represents some data which can be uniquely identified. Each resource has its own unique URL, and each resource can reference other resources.

The two main types of resources are the following:

  • Singular resources

  • Collection resources that contain multiple singular resources

Resources can exist in hierarchy, and can form a tree structure, consisting of child and parent resources.

In NetSuite, the most important resource is a record. A record is a singular resource. However, there can be other resources in NetSuite as well.

A record usually references other resources - other records.

An example of a collection resource is a sublist because it contains multiple lines. Each line is a singular child resource, and the record is a parent resource.

A record with multiple sublists, each of them with multiple lines, forms a hierarchical resource.

Related Topics

General Notices