Create a Type From an Endpoint

When you create a type from an endpoint, you define a custom type structure by using the endpoint's (response) data structure.

For example, when sending a request to a getall_Employee endpoint, you might want the structure of the response to be an array with the id and a few specific fields (say, a string name and email, among others). You can create a type by selecting the endpoint, then selecting the fields that you want in the response. All variables that are assigned this custom type will have the same data structure.

To create a type from an endpoint

  1. Select your application, flow, or page artifact in the Navigator. You can also select a dynamic layout or a fragment.
  2. Click the Types tab to open the Types editor.
  3. Click + Type and select From Endpoint.
  4. Select an endpoint from the list. Click Next.
    Description of var-type-fromendpoint.png follows
    Description of the illustration var-type-fromendpoint.png
  5. Select the endpoint attributes you want to include in the data structure. Click Finish.
    Description of var-type-fromendpoint-attributes.png follows
    Description of the illustration var-type-fromendpoint-attributes.png
If you expand your new type in the Types editor, you can see it is an object type with an array items containing the fields in the endpoint that you selected.

Once your type is used in an artifact, you can view its usage information under Usages in the Properties pane (for example, which variables are based on it). Simply click a usage to readily navigate there.