Junos Space SDK > Developer Guides > Junos Space Application Developer Guide > Programming with the Junos Space SDK > Using the Junos Space SDK Plug-in > Using the EJB-REST Wizard

Using Envelope

The EJB-REST wizard provides a three level envelope for non-collection methods. Envelope provide a container to hold simple API parameters which otherwise are not added in the request body. These parameters are considered as either path param or query parameter. Envelopes should always be used on non-collection methods, whenever there is one or more parameters (complex or simple). Ensure that the parameters are not already used as PATHPARAM or QUERYPARAM.

Note: By default, we use parameter inside the envelope, instead of the QUERYPARAM. Also standard GET, DELETE, PUT, and POST operations on collections should not use envelopes.

When user has configured any parameter as “HTTP Request Body” from “Configure A Parameter” wizard then envelope DTO would be created would be created with name {XML Root Element name}_{http method}. For example, for addStateToCountry method envelope DTO name will be Statetocountries_POST.

All parameter configured as “HTTP Request Body” would be created in REST DTO.

HTTP Request Body parameter would be available to configure in Configure REST DTO Page. As shown in below screen.

Note: Envelope will be created automatically for other cases, when API has multiple complex types as parameters and operation type is POST or PUT.