Designer 10.7 | webMethods Service Development Help | Working with REST API Descriptors | Swagger-Based Provider REST API Descriptors | Configuring a REST V2 Resource | Creating a REST V2 Resource | Configuring REST V2 Resources as JSON API Compliant
 
Configuring REST V2 Resources as JSON API Compliant
You can configure a REST V2 resource based on JSON API to enhance the usage capabilities of the resource. In this approach, you can define a JSON API based REST V2 resource and JSON API specific URL templates are automatically generated. You can use these URLs to invoke and use the resources. For more details on JSON API specification, see http://jsonapi.org/format/.
You can configure a REST V2 resource as JSON API compliant using either of the following ways:
*Select the Generate JSON API URL templates check box while creating the REST V2 resource in the Select Resource Type wizard. For the REST V2 resource, Designer creates an attribute named id of type String, by default. The id attribute acts as the unique identifier for a REST V2 resource and is required for the resource to be JSON API compliant. You use the id attribute to access various properties of the resource. Designer generates all JSON API based URL templates for a REST V2 resource based on this unique identifier. If you rename this unique identifier, Designer modifies all JSON API based URL templates accordingly. Unique identifiers are always of type String.
*Set the Generate JSON API URLs property to True for an existing REST V2 resource. If you did not configure a resource as JSON API complaint while creating it, you can still configure it to be JSON API compliant by setting this property to True. Before setting this property, you must define at least one attribute as unique identifier. When you set this property to True, Designer automatically recreates all JSON API based URL templates for the REST V2 resource based on this unique identifier. If you change this property to False, Designer does not remove the JSON API URLs but you might not be able to use the resource as JSON API resource. For more information about this property, see REST V2 Resource Properties.