REST Messages

This section provides information about request and response messages used in REST service operations.

Request and Response Message Combinations

The REST method you select for a REST service operation determines the request and response message combination that you can use for the operation. The following table lists the allowable request and response message combinations for each REST method:

REST Method Request Message Response Message

Delete

Yes

Yes

Get

No

Yes

Head

No

No

Options

Note: This method is only applicable for the REST Listening Connector.

Yes

No

Patch

Yes

Yes

Post

Yes

Yes

Put

Yes

Yes

MIME Content-Types

When you specify a message for a REST service operation, you must also specify the MIME content-type of the message. PeopleSoft supports the following content types for request and response messages used for REST service operations:

  • application/json

  • application/xml

  • text/xml

  • text/plain

  • text/html

HTTP Status Codes

When you define a message for a REST service operation, along with the MIME content-type, specify the HTTP response code to return to the integration partner. Note that the content-type defines the acceptable HTTP media type.

PeopleSoft supports the following HTTP status codes:

  • 200 - Default. OK: Request successfully executed and the response has content.

  • 201 - This value is valid only when the REST method is Post.

    Created: Resource successfully created. The response contains the created resource and possibly a location header that points to the new resource.

  • 202 - Accepted: Request has been accepted for processing but processing has not been completed. This is required for resource that supports asynchronous process.

  • 203 - This value is valid only when the REST method is Get.

  • 204 - No Content: Request successfully executed and the response doesn't have content.

  • 205 - Reset Content: Tells the user agent to reset the document which sent this request.

  • 206 - Partial Content: This response code is used when the Range header is sent from the client to request only part of a resource.

  • 207 - Multi-Status: Conveys information about multiple resources, for situations where multiple status codes might be appropriate.

Optional MIME Content-Types and HTTP Status Codes

Using the Set Content Types window, you can assign optional content-types and status codes to message instances on REST service operations. You can type in any content type or select from the existing content types.

Generated WADL documents will reflect the optional content-type values, allowing consumers to request the content type they prefer.

You can define optional content types on request, response, and fault message instances.

You can define optional status codes on response message instances.