OpenAPI Specification (formerly Swagger Specification) is an API description format for REST APIs. OpenAPI (Swagger) document needs to be hosted online and should be reached without authentication. You need to provide a URL to this document in the credentials.
Using OpenAPI Specification make request to REST API on elastic.io platform.
Currently, it is supported OpenAPI version 2.0 documents. It is used Swagger Client version 3.10.0. OpenAPI Specification.
The technical notes page gives some technical details about Open API component like changelog and completeness matrix.
Authentication type field to define the authentication schema that would be used for making request.
It is supported 4 auth type:
No Auth
- used by default, make request without authentication.Basic Auth
- make request with basic authentication, Username
and Password
fields should be specified:API Key Auth
- make request with API key in headers authentication, Header Name
and Header Value
fields should be specified:OAuth2
- it is supported Authorization code
OAuth2 flow. Fields:
Client Id
- is a public identifier for appsClient Secret
- is a secret known only to the application and the authorization serverAuth URI
- uri for authorizationToken URI
- uri for getting an access tokenScopes
- is a scope of the access requestA URL to an OpenAPI/Swagger document that would define the calls that could be made, as example https://petstore.swagger.io/v2/swagger.json
This component has no trigger functions. This means it will not be accessible to select as a first component during the integration flow design.
Path - A dropdown for the paths than defined in the OpenAPI document.
Operation - A dropdown for the operations that are allowed for a previously defined path.
Do not throw Error on Failed Calls - An option as to whether or not errors should be thrown for HTTP codes in the 4xx/5xx range.
Please Note an exception is the 401 HTTP status code - error would be thrown for this code regardless of field value (true/false)
Input metadata is depend on parameters, that are defined in operation:
path parameters
are defined as a separate fields, and body
as object that should be configured by user.
For example, path /pet/{petId}
and operation get
metadata is:
{
"type": "object",
"properties": {
"petId": {
"type": "integer",
"required": true
}
}
}
{
"paths": {
"/pet/{petId}": {
"get": {
"tags": [
"pet"
],
"summary": "Find pet by ID",
"description": "Returns a single pet",
"operationId": "getPetById",
"produces": [
"application/json",
"application/xml"
],
"parameters": [
{
"name": "petId",
"in": "path",
"description": "ID of pet to return",
"required": true,
"type": "integer",
"format": "int64"
}
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"$ref": "#/definitions/Pet"
}
},
"400": {
"description": "Invalid ID supplied"
},
"404": {
"description": "Pet not found"
}
},
"security": [
{
"api_key": []
}
]
}
}
}
}
{
"type": "object",
"properties": {
"headers": {
"type": "object",
"properties": {},
"required": true
},
"body": {
"type": "object",
"properties": {},
"required": true
},
"responseCode": {
"type": "number",
"required": true
}
}
}
Click here to learn more about the elastic.io iPaaS