Trading Networks 10.3 | Administering and Monitoring B2B Transactions | Service Development Help | Working with REST | Configuring a REST V2 Resource | Creating a REST V2 Resource
 
Creating a REST V2 Resource
 
Supporting Elements for a REST V2 Resource
Configuring REST V2 Resources as JSON API Compliant
To build a REST V2 resource, first create an empty REST V2 resource or a REST V2 resource based on an existing document type and then define operations and attributes for the resource.
*To create a REST V2 resource
1. In the Service Development perspective, select File > New > REST Resource.
2. In the New REST Resource dialog box, select REST V2 Resource (Recommended) as the type of REST resource to create and click Next.
3. Select the package or folder in which you want to create the REST resource.
In the REST resource name field, type a name for the REST resource using any combination of letters, numbers, and/or the underscore character. For information about restricted characters, see About Element Names.
4. Click Next.
5. On the Select Source Type panel, do one of the following:
Select
To
Empty REST Resource
Create an empty REST V2 resource. Use this option if you do not have an existing document type to create the REST V2 resource.
Document Type Based REST Resource
Create a REST V2 resource from an existing IS document type. Designer accesses the resource definition from the Integration Server document type and creates the REST V2 resource allocating the properties according to the resource definition.
6. Select the Generate JSON API URL templates check box if you want Designer to create JSON API compliant URL templates for the REST resource as part of creating the REST V2 resource. For information about the URL template for a REST V2 resource, see REST Developer’s Guide.
7. If you selected Empty REST Resource as the source resource type, click Finish.
Designer adds an empty REST V2 resource to the selected location in the namespace. For the created resource, you can define resource operations. For more information, refer to Defining a REST V2 Resource Operation.
If you selected Document Type Based REST Resource, click Next.
8. On the Select Document Type panel, navigate to and select the Integration Server document type.
To select a field from the document type to use as the unique identifier for the REST V2 resource, click Next. Otherwise, click Finish.
Note:
If you selected the Generate JSON API URL templates check box, you must select a field from the document type to use as the unique identifier.
9. On the Select Unique Identifier panel, select the field in the document type to use as the unique identifier for the REST V2 resource.
Note:
Only fields of type String can be used as the unique identifier.
10. Click Finish.
Designer adds a REST V2 resource created from an existing document type with the resource operations and attributes already defined.