Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

http (migration step)

Sends one HTTP request to another system, with secrets by name and an optional signature, and keeps the answer for references.

Download as PDF

Address: https://doc.exponential.earth/learninminutes/exphelp/viewer/examples/migration-steps/http.md

On this page

http

Sends one HTTP request to another system, with secrets by name and an optional signature, and keeps the answer for references.

A step of a YAML migration with type: http. The class expMigrationStepHttp (kernel/classes/migration/steps/expmigrationstephttp.php) is registered in settings/migration.ini [StepSettings] StepTypeList[http].

Keys

KeyTypeDefaultWhat it is
methodstring: GET, POST, PUT, PATCH, DELETE, HEAD"GET"the method
urlstringrequiredhttp:// or https:// with a host, without a user or password
headersmapheader => value (no secrets here: secret_headers:)
secret_headersmapheader => the name of a secret (Setup > Secrets, or env:<VARIABLE>)
bearerstringthe name of a secret sent as Authorization: Bearer <value>
bodystringthe body as a text
jsonanythe body as JSON (Content-Type: application/json)
signstringthe name of a secret that signs the request as webhooks of Exponential are signed
expectlistthe status codes that pass (default: any 2xx)
timeoutint30seconds

Besides these, every step takes the keys of the engine: type, mode, if, references, environments, engines and comment (the file format). A key of type identifier names a node, an object or another part of the installation by id, remote id, path or name (identifiers).

Values for references

references: { <name>: <value> } keeps a value of the step's result as ${ref.<name>} for the steps and migrations after it:

ValueWhat it is
statusthe status code of the answer
bodythe body of the answer (at most 64 KB)
jsonthe body decoded as JSON (null when it is not)

Undoing

A step of this type does not undo itself: a migration with it needs down: or a rollback to its caption.

It touches no cache.

Example

- type: http
  method: POST
  url: https://cdn.example.com/purge
  bearer: cdn.token
  json: { paths: [ "/news/*" ] }
  expect: [ 200, 202 ]
  references: { purge_status: status }

Generated by ./console exp:help:examples from settings/migration.ini, kernel/classes/migration/steps/expmigrationstephttp.php. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x