Invoking the APIs

1 minute readDeveloper productivity

There are various mechanisms available to invoke CloudBees CD/RO APIs to create models, run objects, modify properties, and so on.

  1. REST - https://sda.<instanceName>.cb-demos.io/rest/doc/v1.0/

  2. ectool

  3. ec-perl

  4. ec-groovy

  5. DSL (both Declarative and Scripted)

  6. $[/javascript api.<apiName>({fieldName: “value”, …​})]

  7. $[/increment /path/to/property <optional increment value>] (updates and retrieves a property)

API command naming conventions

Table 1. API command names
NameExample

create<object>

createProcedure

delete<object>

deleteProcedure

modify<object>

deleteProcedure

get<object>

getProcedure

get<object>s

getProcedures

run<object>

runProcedure

DSL has access to all the API commands plus direct access to objects. For example, the procedure DSL command can be used to create and modify a procedure. It can also be used as a closure to encapsulate steps and other subobjects.