Service Development Help : Working with REST API Descriptors : Working with REST Resources in a REST API Descriptor : Working with Operations : Changing the MIME Types for an Operation in a REST Resource
Changing the MIME Types for an Operation in a REST Resource
When you create a REST API descriptor, you specify the MIME types that the APIs can consume and produce. Each REST resource in the REST API descriptor inherits these MIME types. However, for an individual operation in a REST resource included in a REST API descriptor, you can select different MIME types that the operations in the REST resource consume or produce.
Note:  
The MIME types set for a REST resource operation in a descriptor override the MIME types set for the parent REST API descriptor. That is, the consumes and produces MIME types specified for an individual REST resource operation replace the MIME types specified for the REST API descriptor.
To change the MIME types for an operation in a REST resource
1. In the Package Navigator view, lock and open the REST API descriptor that contains the REST resource operation which you want to specify MIME types.
2. Click the REST Resources tab.
3. Select the REST resource that contains the operation for which you want to specify MIME types.
4. Expand the operation for which you want to specify MIME types.
5. To change the MIME types that the operation can consume, next to Consumes, select the MIME types that the operation can consume.
If no MIME types are selected, the operation can consume the MIME types listed on the General tab of the REST API descriptor.
If you do not see the MIME type you want to use listed, you can update the list of available MIME types. For more information, see Changing the Available MIME Types for a REST API Descriptor.
6. To change the MIME types that the operation can produce, next to Produces, select the MIME types that the operation con produce.
If no MIME types are selected, the operation can produce the MIME types listed on the General tab of the REST API descriptor.
If you do not see the MIME type you want to use listed, you can update the list of available MIME types. For more information, see Changing the Available MIME Types for a REST API Descriptor.
7. Click File > Save.
Copyright © 2017 Software AG, Darmstadt, Germany. (Innovation Release)

Product LogoContact Support   |   Community   |   Feedback