SovLabs RESTipe™ Guide

The SovLabs RESTipe™ is a single JSON or YAML formatted script, based on the SovLabs Template Engine

View SovLabs RESTipe™ example in

Anatomy

A SovLabs RESTipe™ is made of global variables and steps. Use SovLabs Template Engine in a RESTipe™.

[ global variables ]

steps:
  [steps]

Variables

Define global variables as key:value pairs

Example


{
  "restipeName": "SovLabs (module) vRA Integration",
  "description": "SovLabs (module vRA description",
  "debugLogging": true,
  "useBasicAuth": true,
  "user": "{{ restipe.host.user }}",
  "password": "{{ restipe.host.password }}",
  "baseurl": "{{ restipe.host.protocol }}://{{ restipe.host.hostname }}:{{ restipe.host.port }}/api",
  "var1": "{{ myvar1 }}"
}


---
restipeName: SovLabs (module) vRA Integration
description: SovLabs (module) vRA Integration

#  debugLogging enables verbose logging about the METHOD, URL, and Parameters/body being sent to the rest calls
debugLogging: true

#  Use basic authentication to connect to
useBasicAuth: true
user: {{ restipe.host.user }}
password": {{ restipe.host.password }}

#  Set the Base URL for all of the Rest calls.
baseurl: "{{ restipe.host.protocol }}://{{ restipe.host.hostname }}:{{ restipe.host.port }}/api"

####################
#  Input Variables
####################
var1: "{{ myvar1 }}"


Steps

Creates the process logic and control flow in which to execute

Execute vRO workflow

stepName
  description: Description of step
  method: workflow
  workflowId: [ vRO workflow ID ]
  params:
    List all input parameters as key:value pairs
    Reference a global variable by 
    *Currently only supports string or number field inputs
  nextStep: Define the next step to go to when workflow succeeds
Reference the vRO workflow output(s) in following steps: {{ restipe.stepName.outputVarName }}

Example


{
  "restipeName": "SovLabs (module) vRA Integration",
  "description": "SovLabs (module vRA description",
  "debugLogging": true,
  "useBasicAuth": true,
  "user": "{{ restipe.host.user }}",
  "password": "{{ restipe.host.password }}",
  "baseurl": "{{ restipe.host.protocol }}://{{ restipe.host.hostname }}:{{ restipe.host.port }}/api",
  "var1": "{{ myvar1 }}"
  "steps": {
    "callVroWorkflowStepName": {
      "description": "This step will call a vRO workflow",
      "workflowId": "9259c58a-0d4a-4cda-bfaa-6ce216edb15a",
      "method": "workflow",
      "params": {
        "inputString": "{{ restipe.var1 }}",
        "inputNumber": 1
      }
      "nextStep": "myNextStepName"
    }
  }
}


---
restipeName: SovLabs (module) vRA Integration
description: SovLabs (module) vRA Integration

#  debugLogging enables verbose logging about the METHOD, URL, and Parameters/body being sent to the rest calls
debugLogging: true

#  Use basic authentication to connect to
useBasicAuth: true
user: {{ restipe.host.user }}
password": {{ restipe.host.password }}

#  Set the Base URL for all of the Rest calls.
baseurl: "{{ restipe.host.protocol }}://{{ restipe.host.hostname }}:{{ restipe.host.port }}/api"

####################
#  Input Variables
####################
var1: "{{ myvar1 }}"

####################
#  RESTipe Steps
####################
steps:
  callVroWorkflowStepName
    description: "This step will call a vRO workflow"
    workflowId: "9259c58a-0d4a-4cda-bfaa-6ce216edb15a"
    method: workflow
    params:
      inputString: "{{ restipe.var1 }}"
      inputNumber: 1
    nextStep: "myNextStepName"


Execute a Condition

Step to determine a condition (if/else)

stepName
  description: Description of step
  method: condition
  nextStep: Define the next step to go to based on the condition in an if/elsif/else statement

Example


{
  "restipeName": "SovLabs (module) vRA Integration",
  "description": "SovLabs (module vRA description",
  "debugLogging": true,
  "useBasicAuth": true,
  "user": "{{ restipe.host.user }}",
  "password": "{{ restipe.host.password }}",
  "baseurl": "{{ restipe.host.protocol }}://{{ restipe.host.hostname }}:{{ restipe.host.port }}/api",
  "var1": "{{ myvar1 }}"
  "steps": {
    "executeConditionStepName": {
      "description": "This step will execute a condition",
      "method": "condition",
      "nextStep": "{% if restipe.var1 == 'Yes' %}nextStep2{% elsif restipe.var1 == 'Maybe' %}nextStep3{% else %}nextStep4{% endif %}"
    }
  }
}


---
restipeName: SovLabs (module) vRA Integration
description: SovLabs (module) vRA Integration

#  debugLogging enables verbose logging about the METHOD, URL, and Parameters/body being sent to the rest calls
debugLogging: true

#  Use basic authentication to connect to
useBasicAuth: true
user: {{ restipe.host.user }}
password": {{ restipe.host.password }}

#  Set the Base URL for all of the Rest calls.
baseurl: "{{ restipe.host.protocol }}://{{ restipe.host.hostname }}:{{ restipe.host.port }}/api"

####################
#  Input Variables
####################
var1: "{{ myvar1 }}"

####################
#  RESTipe Steps
####################
steps:
  executeConditionStepName
    description: "This step will execute a condition"
    method: condition
    nextStep: "{% if restipe.var1 == 'Yes' %}nextStep2{% elsif restipe.var1 == 'Maybe' %}nextStep3{% else %}nextStep4{% endif %}"


Execute a GET

stepName
  description: Description of step
  method: get 
  url: Define URL
  params:
    List all input parameters as key:value pairs
  nextStep: Define the next step to go to based on the return

Example


{
  "restipeName": "SovLabs (module) vRA Integration",
  "description": "SovLabs (module vRA description",
  "debugLogging": true,
  "useBasicAuth": true,
  "user": "{{ restipe.host.user }}",
  "password": "{{ restipe.host.password }}",
  "baseurl": "{{ restipe.host.protocol }}://{{ restipe.host.hostname }}:{{ restipe.host.port }}/api",
  "var1": "{{ myvar1 }}"
  "steps": {
    "executeGETStepName": {
      "description": "This step will execute a GET",
      "method": "get",
      "url": "{{ restipe.baseurl }}/action",
      "params": {
        "inputString": "{{ restipe.var1 }}",
      }
      "nextStep": "{% if restipe.executeGETStepName.status == '200' %}nextStep2{% else %}FAILURE{% endif %}"
    }
  }
}


---
restipeName: SovLabs (module) vRA Integration
description: SovLabs (module) vRA Integration

#  debugLogging enables verbose logging about the METHOD, URL, and Parameters/body being sent to the rest calls
debugLogging: true

#  Use basic authentication to connect to
useBasicAuth: true
user: {{ restipe.host.user }}
password": {{ restipe.host.password }}

#  Set the Base URL for all of the Rest calls.
baseurl: "{{ restipe.host.protocol }}://{{ restipe.host.hostname }}:{{ restipe.host.port }}/api"

####################
#  Input Variables
####################
var1: "{{ myvar1 }}"

####################
#  RESTipe Steps
####################
steps:
  executeGETStepName
    description: "This step will execute a GET"
    method: get
    url: "{{ restipe.baseurl }}/action"
    params:
      inputString: "{{ restipe.var1 }}"
    nextStep: "{% if restipe.executeGETStepName.status == '200' %}nextStep2{% else %}FAILURE{% endif %}"


Execute a POST or PATCH

stepName
  description: Description of step
  method: post or patch 
  url: Define URL
  body:
    List body parameters as key:value pairs
  nextStep: Define the next step to go to based on the return

Example


{
  "restipeName": "SovLabs (module) vRA Integration",
  "description": "SovLabs (module vRA description",
  "debugLogging": true,
  "useBasicAuth": true,
  "user": "{{ restipe.host.user }}",
  "password": "{{ restipe.host.password }}",
  "baseurl": "{{ restipe.host.protocol }}://{{ restipe.host.hostname }}:{{ restipe.host.port }}/api",
  "var1": "{{ myvar1 }}"
  "steps": {
    "executePOSTorPATCHStepName": {
      "description": "This step will execute a POST or PATCH",
      "method": "post",
      "url": "{{ restipe.baseurl }}/action",
      "body": {
        "inputString": "{{ restipe.var1 }}",
      }
      "nextStep": "{% if restipe.executePOSTorPATCHStepName.status == '200' %}nextStep2{% else %}FAILURE{% endif %}"
    }
  }
}


---
restipeName: SovLabs (module) vRA Integration
description: SovLabs (module) vRA Integration

#  debugLogging enables verbose logging about the METHOD, URL, and Parameters/body being sent to the rest calls
debugLogging: true

#  Use basic authentication to connect to
useBasicAuth: true
user: {{ restipe.host.user }}
password": {{ restipe.host.password }}

#  Set the Base URL for all of the Rest calls.
baseurl: "{{ restipe.host.protocol }}://{{ restipe.host.hostname }}:{{ restipe.host.port }}/api"

####################
#  Input Variables
####################
var1: "{{ myvar1 }}"

####################
#  RESTipe Steps
####################
steps:
  executePOSTorPATCHStepName
    description: "This step will execute a POST or PATCH"
    method: post
    url: "{{ restipe.baseurl }}/action"
    body:
      inputString: "{{ restipe.var1 }}"
    nextStep: "{% if restipe.executePOSTorPATCHStepName.status == '200' %}nextStep2{% else %}FAILURE{% endif %}"


Execute a DELETE

stepName
  description: Description of step
  method: delete 
  url: Define URL
  nextStep: Define the next step to go to based on the return

Example


{
  "restipeName": "SovLabs (module) vRA Integration",
  "description": "SovLabs (module vRA description",
  "debugLogging": true,
  "useBasicAuth": true,
  "user": "{{ restipe.host.user }}",
  "password": "{{ restipe.host.password }}",
  "baseurl": "{{ restipe.host.protocol }}://{{ restipe.host.hostname }}:{{ restipe.host.port }}/api",
  "var1": "{{ myvar1 }}"
  "steps": {
    "executeDELETEStepName": {
      "description": "This step will execute a DELETE",
      "method": "delete",
      "url": "{{ restipe.baseurl }}/action",
      "nextStep": "{% if restipe.executeDELETEStepName.status == '200' %}nextStep2{% else %}FAILURE{% endif %}"
    }
  }
}


---
restipeName: SovLabs (module) vRA Integration
description: SovLabs (module) vRA Integration

#  debugLogging enables verbose logging about the METHOD, URL, and Parameters/body being sent to the rest calls
debugLogging: true

#  Use basic authentication to connect to
useBasicAuth: true
user: {{ restipe.host.user }}
password": {{ restipe.host.password }}

#  Set the Base URL for all of the Rest calls.
baseurl: "{{ restipe.host.protocol }}://{{ restipe.host.hostname }}:{{ restipe.host.port }}/api"

####################
#  Input Variables
####################
var1: "{{ myvar1 }}"

####################
#  RESTipe Steps
####################
steps:
  executeDELETEStepName
    description: "This step will execute a DELETE"
    method: delete
    url: "{{ restipe.baseurl }}/action"
    nextStep: "{% if restipe.executeDELETEStepName.status == '200' %}nextStep2{% else %}FAILURE{% endif %}"


End a RESTipe

Set SUCCESS or FAILURE to end a RESTipe in nextStep of a step

stepName
  ...
  nextStep: "{% if restipe.var1 == true %}SUCCESS{% else %}FAILURE{% endif %}"

Manage RESTipe Configuration

  1. Login to vRA tenant
  2. Click on the Catalog tab
  3. Request the Manage RESTipe Configuration vRA Catalog Item
  4. Fill out the form accordingly (see below) and Submit
Manage RESTipe Configuration
Manage RESTipe Configuration

FieldValue
Action

Choose whether to create, update or delete a SovLabs RESTipe

Filter by type

Shown if Action is 'Update' or 'Delete'

Type to filter existing SovLabs RESTipes by

RESTipe

Shown if Action is 'Update' or 'Delete'

Select an existing SovLabs RESTipe to update or delete

Type

Shown if Action is 'Create' or 'Update'

Select type of SovLabs RESTipe

Configuration label

No spaces, periods or special characters except underscore (_) and dash (-)

Unique label

DO NOT prepend with your tenant name and an underscore, e.g. mytenant_

RESTipe

JSON or YAML format

This field is templatable. Click the link below to view documentation on the SovLabs Template Engine

SovLabs Template Engine page