Creating an Auto-Generated Endpoint
Follow the instructions below to create an Auto-Generated Data on Demand endpoint. Auto-Generated endpoints can quickly be created to make available all of the data in the selected Data Layers. The data cannot be customized to exclude certain classes, join data across classes, or apply functions and formulas to properties. For instructions on creating an endpoint that can be customized, see Creating a Custom Endpoint.
- In the Anzo application, expand the Blend menu and click Graphmarts. Anzo displays a list of the existing graphmarts. For example:
- On the Graphmarts screen, click the name of the graphmart for which you want to create an endpoint.
- Click the Data on Demand tab. Anzo displays the Data on Demand screen, which lists any existing endpoints. For example, the image below shows a graphmart that does not have any endpoints configured:
- Click the Create New Endpoint button on the left side of the screen. Anzo displays the Create REST API Query Endpoint screen.
- Configure the endpoint options on the screen as needed. The list below describes each setting:
- Endpoint Name: Specify a name for the endpoint in this field. The endpoint name must be unique.
- Endpoint Description: You can add an optional description for the endpoint in this field.
- Endpoint Creation: This field specifies the type of endpoint to create. By default, the type is set to Auto-Generated. Leave the Auto-Generated radio button selected.
- Denormalize Results: By default (when Denormalize Results is not selected), OData returns multi-valued properties as arrays. Certain BI tools, however, do not support arrays or multi-valued properties. If your data includes multi-valued properties and you plan to view the endpoint using a BI tool that does not support them, you can select the Denormalize Results setting to denormalize all multi-valued properties that are exposed in the endpoint. For JSON, XML, and CSV output formats, denormalization expands the properties into new rows so that they can be viewed in BI tools.
The following image shows an example of CSV output of multi-valued properties when Denormalize Results is disabled:
And the example below shows the output of multi-valued properties when Denormalize Results is enabled:
Keep in mind that denormalizing the results means that more rows are created and transferred. Depending on the number of multi-valued properties and how the data is set up, you may see slower performance when creating and querying denormalized endpoints.
- Click Save to create the endpoint and view the configuration details. For example:
- You can make changes to any of the following additional configuration options that become available after the endpoint is created:
- Enabled: By default the endpoint is set to Enabled, indicating that the endpoint is active. If you want to disable the endpoint, slide the Enabled slider to the left.
If a request is sent to a disabled endpoint, Anzo displays a
503: Service Unavailable
error with a message indicating that the endpoint is disabled. For example, "Unable to process request. The endpoint '<name>' is DISABLED." - Included Data Layers: By default the Included Data Layers option is set to All, indicating that all of the layers in the graphmart are available from the endpoint. The included layers are listed below the radio buttons.
If you do not want to include all layers, click the Selected radio button. An Edit Selections link becomes available under the list of layers. Click Edit Selections to open the Select Data Layers dialog box. For example:
Clear the checkbox for any layer that you want to exclude from the endpoint, and then click Save Selections to save the change and return to the configuration screen.
- Controls whether or not to look up name using endPointNamePredicate: This setting controls which predicate value from the related model is used for the class and property display names in the endpoint. By default, the setting is enabled and the Predicate used to retrieve value for name from class or property is blank. That means Anzo uses the rdfs:label (http://www.w3.org/2000/01/rdf-schema#label) value for each class and property name.
- If you want the endpoint to use a different value for class and property names, you can edit Predicate used to retrieve value for name from class or property to specify the URI for another predicate from the model. For example, specifying
http://purl.org/dc/elements/1.1/description
would use each entity's Description value. - If you disable the Controls whether or not to look up name using endPointNamePredicate setting, each entity's local name is used.
- If you want the endpoint to use a different value for class and property names, you can edit Predicate used to retrieve value for name from class or property to specify the URI for another predicate from the model. For example, specifying
- Cache Enabled: When the endpoint is accessed, Anzo translates the OData query to a SPARQL query and sends it to AnzoGraph for execution. The Cache Enabled setting controls whether the results of that AnzoGraph query are cached in Anzo so that subsequent endpoint requests can run against the cache in Anzo. When Cache Enabled is disabled (the default setting), Anzo does not store the cache, and endpoint requests are sent to AnzoGraph. When Cache Enabled is selected, Anzo stores the cached results and AnzoGraph only gets queried if the cached results are invalidated and need to be refreshed.
- Enabled: By default the endpoint is set to Enabled, indicating that the endpoint is active. If you want to disable the endpoint, slide the Enabled slider to the left.
Once you are satisfied with the configuration, this Data on Demand endpoint is ready for access via OData/ODBC or JDBC. At the bottom of the screen, retrieve the ODBC or JDBC service URL to use to access the endpoint. For example:
To test whether the endpoint is active, you can copy the ODBC service URL and paste it into a web browser. If the endpoint is active, the browser shows an XML feed of the schema. For example:
The endpoint is accessible only when it is Enabled and the associated graphmart is Active.
For information about accessing endpoints programmatically, see Accessing an Endpoint Programmatically. For information about accessing endpoints with third-party analytics tools, see Accessing an Endpoint from an Application. For information about the supported OData operators, output format, and query examples, see OData Reference.