Coder Social home page Coder Social logo

flogo-contrib's Introduction

title weight
REST
4618

REST

This activity allows you to invoke a REST service.

Installation

Flogo Web

This activity comes out of the box with the Flogo Web UI

Flogo CLI

flogo add activity github.com/TIBCOSoftware/flogo-contrib/activity/rest

Schema

Inputs and Outputs:

{
  "input":[
    {
      "name": "method",
      "type": "string",
      "required": true,
      "allowed" : ["GET", "POST", "PUT", "PATCH", "DELETE"]
    },
    {
      "name": "uri",
      "type": "string",
      "required": true
    },
    {
      "name": "proxy",
      "type": "string",
      "required": false
    },
    {
      "name": "pathParams",
      "type": "params"
    },
    {
      "name": "queryParams",
      "type": "params"
    },
    {
      "name": "header",
      "type": "params"
    },
    {
      "name": "skipSsl",
      "type": "boolean",
      "value": "false"
    },
    {
      "name": "content",
      "type": "any"
    }
  ],
  "output": [
    {
      "name": "result",
      "type": "any"
    },
    {
      "name": "status",
      "type": "integer"
    }
  ]
}

Settings

Setting Required Description
method True The HTTP method to invoke (Allowed values are GET, POST, PUT, DELETE, and PATCH)
uri True The URI of the service to invoke
proxy False The address of the proxy server to be used
pathParams False The path parameters. This field is only required if you have params in your URI (for example http://.../pet/:id)
queryParams False The query parameters
header False The header parameters
skipSsl False If set to true, skips the SSL validation (defaults to false)
content False The message content you want to send. This field is only used in POST, PUT, and PATCH

Examples

Simple

The below example retrieves a pet with number '1234' from the swagger petstore:

{
  "id": "rest_2",
  "name": "Invoke REST Service",
  "description": "Simple REST Activity",
  "activity": {
    "ref": "github.com/TIBCOSoftware/flogo-contrib/activity/rest",
    "input": {
      "method": "GET",
      "uri": "http://petstore.swagger.io/v2/pet/1234"
    }
  }
}

Using Path Params

The below example is the same as above, itretrieves a pet with number '1234' from the swagger petstore, but uses a URI parameter to configure the ID:

{
  "id": "rest_2",
  "name": "Invoke REST Service",
  "description": "Simple REST Activity",
  "activity": {
    "ref": "github.com/TIBCOSoftware/flogo-contrib/activity/rest",
    "input": {
      "method": "GET",
      "uri": "http://petstore.swagger.io/v2/pet/:id",
      "params": { "id": "1234"}
    }
  }
}

flogo-contrib's People

Contributors

abramvandergeest avatar adirio avatar akaranam avatar awagle avatar emilienthomas avatar fcastill avatar ganitagya avatar ik-adrian avatar jamesrknox avatar leeshing0315 avatar lixingwang avatar mellismi avatar mellistibco avatar mr-tibco avatar pdhar-tibco avatar philippegabert avatar pointlander avatar retgits avatar rkozhikk avatar shaokexu avatar skothari-tibco avatar torresashjian avatar vijaynalawade avatar vnalawad-tibco avatar wnichols avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.