diff --git a/docs/reference.md b/docs/reference.md index 1693b9e23..ad64e00e4 100644 --- a/docs/reference.md +++ b/docs/reference.md @@ -466,8 +466,8 @@ DESCRIPTION USAGE $ apify run [--allow-missing-secrets] [--entrypoint ] - [-i | --input-file ] [--profile ] - [-p | --resurrect] + [-i | --input-file ] [--port ] + [--profile ] [-p | --resurrect] [--standby] FLAGS --allow-missing-secrets Allow the command to @@ -488,6 +488,9 @@ FLAGS this flag or `--input`, the CLI still reads standard input, but stops waiting if input is slow to start or pauses. + --port= The port the Actor's web + server listens on. Use with --standby. Defaults to + 4321. --profile= The stored account to use for this command, by name or user ID. See "apify auth list". @@ -500,6 +503,11 @@ FLAGS --resurrect Whether to keep the default request queue, dataset and key-value store before the run starts. + --standby Run the Actor the way the + platform starts it for its server interface: sets + APIFY_META_ORIGIN=STANDBY and the web server port, + then sends the readiness probe and prints the local + URL. ``` ##### `apify validate-schema` @@ -1946,6 +1954,133 @@ FLAGS +### Server Actors + +These commands let you call a Server Actor's HTTP endpoints and inspect its server interface. + + + +##### `apify server` + +```sh +DESCRIPTION + Send requests to a Server Actor and inspect its server interface. + +SUBCOMMANDS + server request Sends an authenticated HTTP request to a + Server Actor's server interface and prints the response. + server status Shows how a Server Actor's server interface + is configured and, for single-tenant Actors, the runs serving + you. Never sends a request to the Actor, so it cannot start a + run. + server endpoints Lists the HTTP endpoints of a Server Actor, + read from the web server schema of the build that serves its + server interface. + server url Prints the URL of a Server Actor's server + interface. +``` + +##### `apify server request` + +```sh +DESCRIPTION + Sends an authenticated HTTP request to a Server Actor's server interface and + prints the response. + The host always comes from the Actor; pass a path, never a full URL. The API + token is sent in the Authorization header and never reaches the Actor. + +USAGE + $ apify server request [methodOrTarget] [targetOrPath] + [path] [-d ] [-H ] + [-X GET|POST|PUT|PATCH|DELETE] [-p ] + [--profile ] + +ARGUMENTS + methodOrTarget The HTTP method (defaults to GET), or the Actor + when the method is omitted. + targetOrPath The Actor ID or "username/name" (defaults to the + Actor in the current directory), or the path. + path The path on the Actor's server, starting with + "/". Defaults to "/". + +FLAGS + -d, --body= The request body. Use "-" to read + from stdin. + -H, --header= Additional HTTP header(s). Pass a + single "key:value" string, or a JSON object like '{"X-Foo": + "bar", "X-Baz": "qux"}' to send multiple headers. + -X, --method=