Getting Metadata

The endpoint for getting the metadata schema for all exposed records is http://demo123.suitetalk.api.netsuite.com/services/rest/record/v1/metadata-catalog where services/rest is the name of the REST API endpoint, record is the name of the service we are trying to access, v1 is the service version, and metadata-catalog is the sub-resource, that is, the record metadata.

Note:

For detailed information about the URL schema for REST web services, see REST Web Services URL Schema and Account-Specific URLs.

The following is an example of a request that returns metadata about all records.

          GET http://demo123.suitetalk.api.netsuite.com/services/rest/record/v1/metadata-catalog 

        

The following is an example of an intentionally shortened response for the previous request:

          {
    "items": [
        {
            "name": "account",
            "links": [
                {
                    "rel": "canonical",
                    "href": "https://demo123.suitetalk.api.netsuite.com/services/rest/record/v1/metadata-catalog/account",
                    "mediaType": "application/json"
                },
                {
                    "rel": "alternate",
                    "href": "https://demo123.suitetalk.api.netsuite.com/services/rest/record/v1/metadata-catalog/account",
                    "mediaType": "application/swagger+json"
                },
                {
                    "rel": "alternate",
                    "href": "https://demo123.suitetalk.api.netsuite.com/services/rest/record/v1/metadata-catalog/account",
                    "mediaType": "application/schema+json"
                },
                {
                    "rel": "describes",
                    "href": "https://demo123.suitetalk.api.netsuite.com/services/rest/record/v1/metadata-catalog/account"
                }
            ]
        },
            ]
} 

        

The response informs you through HATEOAS links about the possible mediaType flavor in which the response can be obtained. You can see that the metadata for each record can be served in both OpenAPI 3.0 and JSON schema formats.

Related Topics

Working with Resource Metadata
Working with OpenAPI 3.0 Metadata
Working with JSON Schema Metadata

General Notices