FaaS Execution
The FaaS Execution service collection provides operations for retrieving large request bodies from Function-as-a-Service gateway executions. Retrieve files or other large payloads that have spilled into object storage during function execution.
| Language | Last Update |
|---|---|
| Python | v1.6.1 |
| PowerShell | v2.2.9 |
| Go | v0.20.0 |
| TypeScript | v0.6.0 |
| Rust | v0.7.0 |
| Ruby | v1.2.0 |
Table of Contents
Section titled “Table of Contents”| Operation | Description |
|---|---|
ReadRequestBodyread_request_body | Retrieve a large request body, such as a file, that has spilled into object storage. |
ReadRequestBody
Section titled “ReadRequestBody”Retrieve a large request body, such as a file, that has spilled into object storage.
GET /faas-gateway/entities/execution-request-body/v2
PEP 8
read_request_bodyParameters
Section titled “Parameters”| Name | Type | Data type | Description |
|---|---|---|---|
| id | query | string | Execution ID. |
| fn | query | string | Function reference. Format: $fn_id:$fn_version |
| filename | query | string | Filename to be retrieved. |
| parameters | query | dictionary | Full query string parameters payload in JSON format. |
| sha256 | query | string | SHA256 checksum for file to be retrieved. |
Code Examples
Section titled “Code Examples”from falconpy import FaaSExecution
falcon = FaaSExecution(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
with open("output_file", "wb") as save_file: response = falcon.read_request_body(id="string", fn="string", filename="string", sha256="string", stream=boolean) save_file.write(response)from falconpy import FaaSExecution
falcon = FaaSExecution(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
with open("output_file", "wb") as save_file: response = falcon.ReadRequestBody(id="string", fn="string", filename="string", sha256="string", stream=boolean) save_file.write(response)from falconpy import APIHarnessV2
falcon = APIHarnessV2(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
with open("output_file", "wb") as save_file: response = falcon.command("ReadRequestBody", id="string", fn="string", filename="string", sha256="string") save_file.write(response)Examples coming soon.
package main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/execution")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
response, err := client.Execution.ReadRequestBody( &execution.ReadRequestBodyParams{ ID: "string", Fn: "string", Filename: "string", Sha256: "string", Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: process.env.FALCON_CLOUD!, clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.execution.readRequestBody( "string", // id "string", // fn "string", // filename "string" // sha256);
console.log(response);use rusty_falcon::apis::execution_api::read_request_body;use rusty_falcon::easy::client::FalconHandle;
#[tokio::main]async fn main() { let falcon = FalconHandle::from_env().await.expect("Could not authenticate");
let response = read_request_body( &falcon.cfg, // configuration "string", // id "string", // filename "string", // sha256 ).await.expect("API call failed");
println!("{:?}", response);}require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::Execution.new
response = api.read_request_body('string', 'string', 'string', 'string')
puts response