CrushMFT Documentation

Snippets and the curl import#

Two helps for reading and for filling a job: the summary on each task's card, and the import of a curl command into an HTTP task.

The summary on a card#

On the canvas of the designer, a task's card shows its most telling settings under its name: a Find shows where it looks and for what, a Copy where it copies to, an Email the recipient and subject. A job can so be read without opening one task.

On the card Is
Source Filter / Folder Traversal Filter the task's filter, when it is not empty
the task's own lines the settings that say what the task does. Which ones is fixed for each kind of task.
"...and 3 more" on a UserVariable: further variables it sets

Things to know:

  • Passwords are not shown. A password inside an address is starred out, and so is the value of a variable whose name has "password" in it.
  • Show details in a task's menu lists every setting of the task, also those the form does not show, by their stored names. This is the place to look when a task behaves in a way its form does not explain.
  • Notes. A task's Notes tab is for people. Write there why the task is as it is.

Import from cURL#

Many services document their API as curl commands, and a browser's developer tools can copy any request "as cURL". The HTTP task reads such a command and fills itself in.

  1. Add an HTTP task, or open one.
  2. Press Import from cURL: "Paste a curl command. The URL, the method, the headers, the body and the authentication of this task are replaced by what it says."
  3. Paste the command and confirm.

What is taken over:

In the command Becomes
the address URL
-X, --request the method. Without it: POST when there is data, else GET.
-H, --header a line in the list of headers
-d, --data, --data-raw, --data-binary, --data-urlencode the body. Several are joined with &.
-G, --get with data the data goes into the address, after a ?
-u, --user sign-in Basic, with the name and the password
--aws-sigv4 with -u sign-in AWS, with access key, secret key, region and service
-A, -b, -e the headers User-Agent, Cookie, Referer
-m, --max-time the time-out

The command may be the way a shell writes it: single and double quotes, $'...', and lines that end with a backslash (or ^ from Windows, or a backtick from PowerShell).

Anything else is left out and named afterwards, under Imported from cURL:

Not applied, set it by hand if you need it: --compressed, -k

So are a header without a colon and a command without an address.

Things to know:

  • The task's settings are replaced, not added to. Import first, then adjust.
  • The password is encrypted as it is stored, like one that is typed.
  • A copied request carries your own session. A command copied from a browser holds your cookies and tokens in its headers. Take them out, and give the task a sign-in of its own: a job should not run as you.
  • Make it general afterwards. Replace the fixed parts with variables: the file name in the address with {name}, a date with {yyyy}-{MM}-{dd}.

Other ways to not start from nothing#

Way Where
a task with its settings, kept as a template The job list
several tasks kept as a group The designer
Copy task, and paste in another job The designer
a whole job, exported and imported The job list
worked examples Examples