Module rest¶
- License: Apache 2.0
- Version: 0.2.0
- Author: Inmanta <code@inmanta.com>
- This module requires compiler version 2018.1 or higher
- Upstream project: https://github.com/inmanta/rest.git
Entities¶
-
entity
rest::RESTCall
¶ Parents:
std::Resource
This resource executes a restcall during the execute phase of the handler
-
attribute string
url_id
¶
-
attribute string
url
¶ The url to call
-
attribute string
method
='GET'¶ The HTTP method to use
-
attribute dict
body
¶ The body of the the http call. By default this body is sent as a json body
-
attribute dict
headers
=Dict()¶ Additional headers to pass to the server.
-
attribute bool
form_encoded
=False¶ Use form encoding for the body
-
attribute bool
ssl_verify
=True¶ Verify the ssl cert of the server
-
attribute string
auth_user
=null¶ The user to authenticate with
-
attribute string
auth_password
=null¶ The password to authenticate with
-
attribute number
return_codes
=List()¶ Returns code that indicate that the call was successfull
-
attribute string
validate_return
=null¶ An JQ expression to validate the return result of the call. The result of this JQ expression evaluates to a python true or false.
-
attribute bool
skip_on_fail
=False¶ Report this resource as skipped instead of failed.
-
attribute string
agent
='internal'¶ The agent to initiate the REST call from
The following implementations are defined for this entity:
The following implements statements select implementations for this entity:
-
attribute string
Resources¶
-
class
rest.
RESTCall
¶ - A Call to a rest endpoint
- Resource for entity
rest::RESTCall
- Id attribute
url_id
- Agent name
agent
- Handlers
rest.RESTHandler
- Resource for entity
Handlers¶
-
class
rest.
RESTHandler
¶ - Handler name
requests
- Handler for entity
rest::RESTCall
- Handler name