This developer documentation isoutdated, but provides historical context.

It isnotuser documentation and should not be treated as such.

Documentation is available here.

REST API - Adding a new BE

In this wiki we will introduce all the steps needed in the REST API side in order to add a new Business Entity Examples on each step are based on work done in patch for the Extrenal Tasks RFE

Creating BE in api.xsd

First, we will have do define the new BE in the api.xsd This is a XML meta-data file that helps to generate the new BE classes. In the example we will see a new Job entity and a new “Step” entity There is an heirarchy between “Job” and “Step” , A “Job” can contain several tests. Also, keep in mind that steps can be nested, we will get to that later.

The following is a type definition for all relevants parts that may appear in the URI /api/jobs /api/jobs/ /api/jobs//steps /api/jobs//steps/

 

This is the “Step”definition

`   ` `     ` `        ` `     ` `   ` `   ` `     ` `       ` `         ` `         ` `         ` `         ` `         ` `         ` `         ` `         ` `       ` `     ` `   ` ` `

This is the “Step” collection definition

`   ` `     ` `       ` `         ` `           ` `               ` `           ` `         ` `         ` `       ` `     ` `   `

This is the “job” definition

`   ` `     ` `        ` `     ` `   ` `   ` `     ` `       ` `         ` `         ` `         ` `         ` `         ` `         ` `         ` `       ` `     ` `   ` ` `

This is the “Job” collection definition

`   ` `     ` `       ` `         ` `           ` `               ` `           ` `         ` `         ` `       ` `     ` `   `

Working with nested entities (i.e disks under a vm , steps under a job etc.)

Adding Mappers

Adding tests

Adding resource classes for single entity

Adding tests

Adding resource classed for entity collections

Adding tests

Enabling parameter passing in the URL

Adding tests

Handling root resources

Adding Permissions

Adding enums to capabilities

Defining new BE API in the RSDL