Skip to content
Fous Docs
MarkdownStudio

Methods

Find methods, read their contracts, publish or delete your own.

The Method object

  • idstringrequired

    mth_ followed by 26 characters.

  • slugstringrequired

    <domain>/<snake_case_name>, one method’s own; accepted wherever an id is.

  • namestringrequired
  • descriptionstringrequired
  • returnsstringrequired

    What the output holds, in a few words.

  • platformobjectrequired
    Show child attributes
    • namestring
    • domainstring
  • input_schemaobjectrequired

    A flat JSON Schema object: snake_case properties with descriptions; required lists the inputs a call must send.

  • authobjectrequired
    Show child attributes
    • requiredbooleanrequired

      Whether the method runs with a connected account.

    • typestring

      session: a website login; api_key: the site’s own API key.

      sessionapi_key

    • connectionstring or null

      Your default connection for this platform, if any.

  • effectstringrequired

    read: it gets data. write: it does something on the site (submits, posts, books, sends); run it with care.

    readwrite

  • costobjectrequired
    Show child attributes
    • creditsinteger
  • privateboolean

    Present (true) on your organization’s methods that are not published.

  • versionintegerrequired

    The version shown: the one your organization uses (its pin, else the latest), or the one the ref named (@N). A version is a contract: its inputs and outputs never change.

  • latest_versionintegerrequired

    The method’s newest version.

  • statusstring

    In a search result, present only when the version is not ready: degraded (failing: its saved examples stopped answering, and no run has answered since; runs are still attempted, and Fous repairs it) or repairing (a repair confirmed the break while runs failed too; runs are refused with 503 method_repairing until it ends, at the latest at repair.expected_at).

    degradedrepairing

  • repairobject

    Only while repairing: when the version is back at the latest. A repair that has not confirmed a break is never shown.

    Show child attributes
    • expected_atstringrequired
    • back_in_minutesintegerrequired
  • last_repairobject

    While degraded, when a repair ran and could not fix the version: when it ended and why, in its own words. Fous checks the version every hour and repairs it again later.

    Show child attributes
    • atstringrequired
    • reasonstringrequired
  • deletes_atstring

    A public method nobody has run for 6 months: when it is deleted unless it runs (any run keeps it).

The MethodListItem object

  • idstringrequired

    mth_ followed by 26 characters.

  • slugstringrequired

    <domain>/<snake_case_name>, one method’s own; accepted wherever an id is.

  • namestringrequired
  • descriptionstringrequired
  • returnsstringrequired

    What the output holds, in a few words.

  • platformobjectrequired
    Show child attributes
    • namestring
    • domainstring
  • input_schemaobjectrequired

    A flat JSON Schema object: snake_case properties with descriptions; required lists the inputs a call must send.

  • authobjectrequired
    Show child attributes
    • requiredbooleanrequired

      Whether the method runs with a connected account.

    • typestring

      session: a website login; api_key: the site’s own API key.

      sessionapi_key

    • connectionstring or null

      Your default connection for this platform, if any.

  • effectstringrequired

    read: it gets data. write: it does something on the site (submits, posts, books, sends); run it with care.

    readwrite

  • costobjectrequired
    Show child attributes
    • creditsinteger
  • privateboolean

    Present (true) on your organization’s methods that are not published.

  • versionintegerrequired

    The version shown: the one your organization uses (its pin, else the latest), or the one the ref named (@N). A version is a contract: its inputs and outputs never change.

  • latest_versionintegerrequired

    The method’s newest version.

  • statusstringrequired

    How the version shown stands: ready (any answer with data makes it ready at once); degraded (failing: its saved examples stopped answering, and no run has answered since; runs are still attempted, and Fous repairs it); repairing (a repair confirmed the break while runs failed too; runs are refused with 503 method_repairing until it ends, at the latest at repair.expected_at).

    readydegradedrepairing

  • repairobject

    Only while repairing: when the version is back at the latest. A repair that has not confirmed a break is never shown.

    Show child attributes
    • expected_atstringrequired
    • back_in_minutesintegerrequired
  • last_repairobject

    While degraded, when a repair ran and could not fix the version: when it ended and why, in its own words. Fous checks the version every hour and repairs it again later.

    Show child attributes
    • atstringrequired
    • reasonstringrequired
  • deletes_atstring

    A public method nobody has run for 6 months: when it is deleted unless it runs (any run keeps it).

  • pinned_versioninteger or nullrequired

    The version your organization uses: set by its first run (owners too), moved by PATCH {"pinned_version": N} or by a new version it builds itself. Null until a run.

  • visibilitystringrequired

    private: only your organization finds and runs it. public: anyone may; it stays public, and anyone may improve it.

    publicprivate

  • statsobjectrequired

    How the method has done so far.

    Show child attributes
    • success_ratenumber or null
    • runsinteger
    • last_success_atstring or null
  • ownedbooleanrequired

    Your organization built it: it publishes it, and deletes it while it is private.

  • based_onobject

    The method (and its version) this one was started from.

    Show child attributes
    • idstringrequired
    • slugstringrequired
    • namestringrequired
    • versioninteger

      The version, when one is meant.

  • created_atstringrequired
  • updated_atstringrequired

The MethodDetail object

  • idstringrequired

    mth_ followed by 26 characters.

  • slugstringrequired

    <domain>/<snake_case_name>, one method’s own; accepted wherever an id is.

  • namestringrequired
  • descriptionstringrequired
  • returnsstringrequired

    What the output holds, in a few words.

  • platformobjectrequired
    Show child attributes
    • namestring
    • domainstring
  • input_schemaobjectrequired

    A flat JSON Schema object: snake_case properties with descriptions; required lists the inputs a call must send.

  • authobjectrequired
    Show child attributes
    • requiredbooleanrequired

      Whether the method runs with a connected account.

    • typestring

      session: a website login; api_key: the site’s own API key.

      sessionapi_key

    • connectionstring or null

      Your default connection for this platform, if any.

  • effectstringrequired

    read: it gets data. write: it does something on the site (submits, posts, books, sends); run it with care.

    readwrite

  • costobjectrequired
    Show child attributes
    • creditsinteger
  • privateboolean

    Present (true) on your organization’s methods that are not published.

  • versionintegerrequired

    The version shown: the one your organization uses (its pin, else the latest), or the one the ref named (@N). A version is a contract: its inputs and outputs never change.

  • latest_versionintegerrequired

    The method’s newest version.

  • statusstringrequired

    How the version shown stands: ready (any answer with data makes it ready at once); degraded (failing: its saved examples stopped answering, and no run has answered since; runs are still attempted, and Fous repairs it); repairing (a repair confirmed the break while runs failed too; runs are refused with 503 method_repairing until it ends, at the latest at repair.expected_at).

    readydegradedrepairing

  • repairobject

    Only while repairing: when the version is back at the latest. A repair that has not confirmed a break is never shown.

    Show child attributes
    • expected_atstringrequired
    • back_in_minutesintegerrequired
  • last_repairobject

    While degraded, when a repair ran and could not fix the version: when it ended and why, in its own words. Fous checks the version every hour and repairs it again later.

    Show child attributes
    • atstringrequired
    • reasonstringrequired
  • deletes_atstring

    A public method nobody has run for 6 months: when it is deleted unless it runs (any run keeps it).

  • pinned_versioninteger or nullrequired

    The version your organization uses: set by its first run (owners too), moved by PATCH {"pinned_version": N} or by a new version it builds itself. Null until a run.

  • visibilitystringrequired

    private: only your organization finds and runs it. public: anyone may; it stays public, and anyone may improve it.

    publicprivate

  • statsobjectrequired

    How the method has done so far.

    Show child attributes
    • success_ratenumber or null
    • runsinteger
    • last_success_atstring or null
  • ownedbooleanrequired

    Your organization built it: it publishes it, and deletes it while it is private.

  • based_onobject

    The method (and its version) this one was started from.

    Show child attributes
    • idstringrequired
    • slugstringrequired
    • namestringrequired
    • versioninteger

      The version, when one is meant.

  • revisionintegerrequired

    How many times the version shown was revised in place (a repair or an improvement that kept its contract); the seen parameter carries it.

  • latest_changesstring

    When the version shown is not the latest: what the latest changes against it, in a sentence or two.

  • versionsarray of objectrequired

    The method’s versions, newest first (at most 20).

    Show child attributes
    • versionintegerrequired
    • revisionintegerrequired
    • latestboolean

      The newest version.

      true

    • pinnedboolean

      The version your organization uses.

      true

    • statusstringrequired

      readydegradedrepairing

    • created_atstringrequired
    • revised_atstring

      When it was last revised in place.

    • changesstringrequired

      What it changes against the version before it; empty for the first.

  • output_schemaobjectrequired

    The JSON Schema every run’s data follows.

  • exampleobject
    Show child attributes
    • inputobject
    • outputJSON value

Find methods

Describe what you need in plain language. Returns the methods that fit, best first, each with its effect (read or write) and input schema, or match "none". Search never builds: when nothing fits, build one with POST /v1/builds. Free.

Query parameters

  • querystring

    What you need, in plain language.

  • platformstring

    A domain or site name to search within; alone, it lists that site’s methods.

  • limitinteger

    How many: 1 to 20 with a query (default 5); a site listed without a query, up to 100 (default 100).

  • suggestbooleandefault false

    Search as someone types: the methods nearest the text so far (its last word may be unfinished), without checking which do it all, so results, suggested: true, and no match or reason. Five a minute for each of the plan’s requests, counted apart from searches.

Returns

  • 200Methods that fit, or none. With suggest=true, the nearest methods.

The answer has these fields:

  • resultsarray of Methodrequired
  • matchstring

    Always sent, except with suggest=true.

    foundnone

  • suggestedboolean

    With suggest=true: the results are unchecked suggestions.

    true

  • On a miss: methods that do part of what was asked (unchecked when Fous could not check fit just then; reason says so).

  • reasonstring

    On a miss: why nothing fits (a request that names only a topic), that POST /v1/builds can make it, or that Fous could not check fit just then.

Errors

StatusCodeWhen
400invalid_requestNeither query nor platform
401unauthorizedNo valid key
429rate_limitedToo many searches for the plan this minute

List your methods

Your organization’s own methods, private and published, the latest change first; or, with ids, any methods it sees, each at the version it uses, for a live re-read of their status. Free.

Query parameters

  • platformstring

    Only the methods on this site (a domain or site name).

  • idsstring

    Method ids, comma-separated, at most 50: those methods instead of your own (owned says whose).

Returns

  • 200Your methods.

The answer has these fields:

Get a method

A method’s full contract at the version your organization uses (or @N for one version): input and output schema, an example, auth, cost, how it stands (status, repair), its versions and what the latest changes. With wait, the answer is held while the version is under repair; with seen (the status:revision:deletes_at of the last read) while nothing about it has changed. Free.

Path parameters

/v1/methods/{domain}/{name}

  • domainstringrequired

    The site of the method’s slug.

  • namestringrequired

    The name of the method’s slug.

/v1/methods/{id}

  • idstringrequired

    The method’s id (mth_…).

Query parameters

  • waitintegerdefault 0

    Seconds to hold the answer while the version is under repair (or, with seen, while nothing has changed), 0 to 60.

  • seenstring

    What was last read, as <status>:<revision>:<deletes_at or ->; with wait, the answer is held until it differs.

Returns

A MethodDetail object.

  • 200The method.

Errors

StatusCodeWhen
404not_foundNo such method, or no such version of it

Update a method

{"pinned_version": N} switches your organization to version N of any method it sees: runs and queries use it from then on. {"visibility": "public"} publishes your organization’s method: anyone may then find, run and improve it; a public method stays public. Owners and admins.

Path parameters

/v1/methods/{domain}/{name}

  • domainstringrequired

    The site of the method’s slug.

  • namestringrequired

    The name of the method’s slug.

/v1/methods/{id}

  • idstringrequired

    The method’s id (mth_…).

Request body

Required, JSON. One of:

Switch version

  • pinned_versionintegerrequired

    The version your organization switches to.

Publish

  • visibilitystringrequired

    "public" publishes the method. There is no way back: others may come to rely on it.

    public

Returns

A MethodDetail object.

  • 200The method, as your organization now sees it.

Errors

StatusCodeWhen
400invalid_requestNeither {"pinned_version": N} nor {"visibility": "public"}
403forbiddenOnly owners and admins change methods and builds
404not_foundNo such method, or no such version of it
409conflictPublishing: not your organization’s method (reason not_owned), or another public method has its name

Delete a method

Deletes your organization’s private method: it no longer runs, and its versions stay for the record. A public method stays, since others may run it. Owners and admins.

Path parameters

/v1/methods/{domain}/{name}

  • domainstringrequired

    The site of the method’s slug.

  • namestringrequired

    The name of the method’s slug.

/v1/methods/{id}

  • idstringrequired

    The method’s id (mth_…).

Returns

  • 200Deleted.

The answer has these fields:

  • idstring
  • deletedboolean

Errors

StatusCodeWhen
403forbiddenOnly owners and admins change methods and builds
404not_foundNo such method
409conflictA public method, or not your organization’s (reason not_owned)