Giter VIP home page Giter VIP logo

action-wait-for-api's Introduction

Wait for API action

A Github Action to wait for a specific API response to proceed.

This can be useful to wait e.g. for a specific version of an API to deployed or similar.

Example usage

  • name: Wait for API Url Action
uses: Hardsix/action-wait-for-api@v2
with:
  url: "https://api.example.com/status"
  expected-response-field: "version"
  expected-response-field-value: ${{env.EXPECTED_API_VERSION}}

Inputs

url

Required The full URL to query.

method

Required The HTTP method to use. Default "GET".

headers

Optional JSON-string of headers to send along. For example:

headers: '{"Authorization":"ci"}'

expected-status

Required The HTTP status which has to be returned to continue. Default "200".

expected-response-field

If set, only continue if the response contains this field. You can use dot-notation to query nested fields, for example:

{
  "user": {
    "name": "Anne"
  }
}

Can be queried with "user.name".

expected-response-field-value

If set, the expected-response-field must contain this value to continue. Note that due to Github Action restrictions, this can only work with strings, so any value is converted to a string.

timeout

Required The max. amount of seconds to wait until to stop trying to reach the API. Default "300".

interval

Required The number of seconds to wait between each try to the API. Default "10".

action-wait-for-api's People

Contributors

mydea avatar hardsix avatar fmariluis avatar tjcorr avatar

Stargazers

 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.