JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle® ZFS Storage Appliance RESTful Application Programming Interface
Oracle Technology Network
Library
PDF
Print View
Feedback
search filter icon
search icon

Document Information

Using This Documentation

Chapter 1 Overview

Chapter 2 Working with the API

Chapter 3 Alert Service Commands

Chapter 4 Analytics Services

Chapter 5 Hardware Services

Chapter 6 Log Commands

Chapter 7 Network Commands

Chapter 8 Problem Service Commands

Chapter 9 Role Service

Chapter 10 SAN Services

Chapter 11 Service Commands

Chapter 12 Storage Services

Chapter 13 System Commands

Chapter 14 User Service

Chapter 15 Workflow Commands

Workflow Service Commands

List Workflows

Get Workflow

Modify a Workflow

Execute a Workflow

Delete Workflow

Upload Workflow

Chapter 16 RESTful Clients

Upload Workflow

Uploads a workflow to the appliance.

Example Request:

POST /api/workflow/v1/workflows HTTP/1.1
Authorization: Basic abcefgMWE=
Host: zfssa.example.com:215
Accept: application/json
Content-Type: application/javascript
Content-Length: 290

var workflow = {
    name: 'Echo',
    description: 'Echo bird repeats a song.',
    parameters: {
        song: {
            label: 'Words of a song to sing',
            type: 'String',
        }
    },
    execute: function (params) { return (params.song) }
};

Example Result:

HTTP/1.1 201 Created
X-Zfssa-Appliance-Api: 1.0
Content-Type: application/json
Content-Length: 268
X-Zfssa-Version: jkremer/generic@2013.09.14,1-0
Location: /api/workflow/v1/workflows/f4fe892f-cf46-4d6a-9026-cd0c0cce9971

{
    "workflow": {
        "href": "/api/workflow/v1/workflows/f4fe892f-cf46-4d6a-9026-cd0c0cce9971",
        "name": "Echo",
        "description": "Echo bird repeats a song.",
        "uuid": "f4fe892f-cf46-4d6a-9026-cd0c0cce9971",
        "owner": "root",
        "origin": "<local>",
        "setid": false,
        "alert": false,
        "version": "",
        "scheduled": false
    }
}