CoolFace
Datasetpublic

enigmare/v2-crawler

sourceHugging Faceupdated 28d agoView on Hugging Face
1likes904downloads
documentation.jsonl406 linesDownload Raw Back to test
1{"id":"doc-generate_rsa_key_pair_auth0_docs-54f1eeb4","source":"documentation","title":"Generate RSA Key Pair - Auth0 Docs","url":"https://auth0.com/docs/secure/application-credentials/generate-rsa-key-pair","text":"Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.\n\nExample:\n```text\n----BEGIN PUBLIC KEY----- MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA53VzmIVVZZWyNm266l82 mnoDc9g/snXklax5kChEhqK/WnTUvuXP4Gd4THj8rchxgUGKXd4PF3SUcKyn/qPm Tet0idVHk2PwP//FOVgYo5Lb04js0pgZkbyB/WjuMp1w+yMuSn0NYAP7Q9U7DfTb jmox8OQt4tCB4m7UrJghGqT8jkPyZO/Ka6/XsyjTYPOUL3t3PD7JShVAgo1mAY6g Sr4SORywIiuHsg+59ad7MXGy78LirhtqAcDECKF7VZpxMuEjMLg3o2yzNUeWI2Mg IF+t0HbO1E387fvLcuSyai1yWbSr1PXyiB2aXyDpbD4u7d3ux4ahU2opH11lBqvx +wIDAQAB -----END PUBLIC KEY-----\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:15:12.724Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":1,"totalLines":8,"estimatedTokens":157}}2{"id":"doc-profiles_foundry_ethereum_development_framework-6d16391a","source":"documentation","title":"Profiles – foundry - Ethereum Development Framework","url":"https://book.getfoundry.sh/config/profiles","text":"IntroductionInstallationGetting StartedPromptingDocumentation for AgentsProjectsOverviewProject LayoutDependenciesSoldeerForgeOverviewBuildingCloning ContractsDocumentationContract BindingsTestingScriptingDebuggingGas TrackingFormattingLintingCastOverviewReading Chain DataSending TransactionsWallet OperationsEIP-7702 DelegationABI EncodingAnvilOverviewForkingMining and Transaction PoolState ManagementCustom MethodsRPC Method ReferenceChiselOverviewSession ManagementForkingCommandsHelpFAQTroubleshootingConfigurationOverviewProfilesCompilerTestingMESCCI IntegrationEditor SetupBest Practices\n\nExample:\n```text\n[profile.default]\nsrc = \"src\"\nout = \"out\"\nlibs = [\"lib\"]\noptimizer = true\noptimizer_runs = 200\n \n[profile.ci]\nverbosity = 3\nfuzz = { runs = 10000 }\n \n[profile.lite]\noptimizer = false\nfuzz = { runs = 32 }\n```\n\nExample:\n```text\n$ FOUNDRY_PROFILE=ci forge test\n```\n\nExample:\n```text\n$ export FOUNDRY_PROFILE=ci\n$ forge test\n$ forge build\n```\n\nExample:\n```text\n[profile.ci]\nverbosity = 3\nfuzz = { runs = 10000, seed = \"0x1\" }\ninvariant = { runs = 1000 }\n```\n\nExample:\n```text\n[profile.lite]\noptimizer = false\nfuzz = { runs = 32 }\nvia_ir = false\n```\n\nExample:\n```text\n[profile.production]\noptimizer = true\noptimizer_runs = 1000000\nvia_ir = true\nbytecode_hash = \"none\"\n```\n\nExample:\n```text\n[profile.default]\nsrc = \"src\"\nout = \"out\"\nlibs = [\"lib\"]\nsolc_version = \"0.8.28\"\noptimizer = true\noptimizer_runs = 200\n \n# Inherits everything from default, overrides optimizer_runs\n[profile.production]\noptimizer_runs = 1000000\n```\n\nExample:\n```text\n# Override optimizer runs\n$ FOUNDRY_OPTIMIZER_RUNS=500 forge build\n \n# Override solc version\n$ FOUNDRY_SOLC_VERSION=0.8.25 forge build\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:15:13.174Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":8,"totalLines":82,"estimatedTokens":426}}3{"id":"doc-project_setup_foundry_ethereum_development_frame-8873ccd9","source":"documentation","title":"Project Setup – foundry - Ethereum Development Framework","url":"https://book.getfoundry.sh/projects","text":"IntroductionInstallationGetting StartedPromptingDocumentation for AgentsProjectsOverviewProject LayoutDependenciesSoldeerForgeOverviewBuildingCloning ContractsDocumentationContract BindingsTestingScriptingDebuggingGas TrackingFormattingLintingCastOverviewReading Chain DataSending TransactionsWallet OperationsEIP-7702 DelegationABI EncodingAnvilOverviewForkingMining and Transaction PoolState ManagementCustom MethodsRPC Method ReferenceChiselOverviewSession ManagementForkingCommandsHelpFAQTroubleshootingConfigurationOverviewProfilesCompilerTestingMESCCI IntegrationEditor SetupBest Practices\n\nExample:\n```text\n$ forge init my_project\n$ cd my_project\n```\n\nExample:\n```text\n$ cd existing_directory\n$ forge init\n```\n\nExample:\n```text\n$ forge init --force\n```\n\nExample:\n```text\n$ forge init --template https://github.com/PaulRBerg/foundry-template my_project\n```\n\nExample:\n```text\n$ forge init --no-git my_project\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:15:13.183Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":5,"totalLines":30,"estimatedTokens":233}}4{"id":"doc-signkeychain_foundry_ethereum_development_framew-9204c0ad","source":"documentation","title":"signKeychain – foundry - Ethereum Development Framework","url":"https://book.getfoundry.sh/reference/cheatcodes/sign-keychain","text":"Example:\n```text\nfunction signKeychain(uint256 privateKey, address account, bytes32 digest) external pure returns (bytes memory signature);\n```\n\nExample:\n```text\n// `account` has authorized `accessPk` as an access key on-chain.\nbytes32 digest = keccak256(\"authorize this action\");\nbytes memory signature = vm.signKeychain(accessPk, account, digest);\n \n// Verifies against the account's active access keys via the SignatureVerifier precompile.\nbool ok = signatureVerifier.verifyKeychain(account, digest, signature);\nassertTrue(ok); // [PASS]\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:15:13.198Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":2,"totalLines":17,"estimatedTokens":140}}5{"id":"doc-cast_channel_id_foundry_ethereum_development_fra-318a8ca5","source":"documentation","title":"cast channel-id – foundry - Ethereum Development Framework","url":"https://book.getfoundry.sh/reference/cast/channel-id","text":"ReferencecastABI CommandsAccount CommandsBlock CommandsChain CommandsConversion CommandsENS CommandsEtherscan CommandsGeneral CommandsTransaction CommandsUtility Commandscast abi-encode-eventcast address-zerocast admincast artifactcast b2e-payloadcast base-feecast batch-mktxcast batch-sendcast bindcast call --createcast channel-idcast classifycast codehashcast compute-addresscast concat-hexcast constructor-argscast create2cast creation-codecast decode-errorcast decode-eventcast decode-stringcast decode-transactioncast disassemblecast erc20-tokencast erc20-token allowancecast erc20-token approvecast erc20-token burncast erc20-token decimalscast erc20-token mintcast erc20-token namecast erc20-token symbolcast erc20-token total-supplycast erc20-token transfercast estimate --createcast format-unitscast hash-messagecast hash-zerocast implementationcast indexcast index-erc7201cast interfacecast keccakcast key-authorizationcast key-authorization encodecast key-authorization inspectcast key-authorization signcast keychaincast keychain authorizecast keychain burn-witnesscast keychain checkcast keychain doctorcast keychain inspectcast keychain is-admincast keychain is-witness-burnedcast keychain listcast keychain policycast keychain policy add-callcast keychain policy remove-targetcast keychain policy set-limitcast keychain revokecast keychain rlcast keychain rscast keychain showcast keychain sscast keychain ulcast keychain verifycast keychain verify-admincast max-intcast max-uintcast min-intcast mktx --createcast padcast parse-unitscast receive-policycast receive-policy claimcast receive-policy getcast receive-policy receipt burncast receive-policy receipt decodecast receive-policy setcast receive-policy validatecast recover-authoritycast send --createcast sigcast sig-eventcast storage-creditscast storage-credits budgetcast storage-credits modecast storage-credits set-budgetcast storage-credits set-modecast storage-rootcast tempocast tempo logincast tip20-tokencast tip20-token createcast tip20-token logo-checkcast tip20-token logo-setcast tip20-token minecast tip403cast tip403 blacklistcast tip403 checkcast tip403 createcast tip403 infocast tip403 whitelistcast to-check-sum-addresscast to-utf8cast tracecast tx-poolcast tx-pool contentcast tx-pool content-fromcast tx-pool inspectcast tx-pool statuscast virtual-addresscast virtual-address createcast virtual-address resolvecast virtual-address watchcast wallet addresscast wallet change-passwordcast wallet decrypt-keystorecast wallet derivecast wallet importcast wallet listcast wallet newcast wallet new-mnemoniccast wallet private-keycast wallet public-keycast wallet removecast wallet sessioncast wallet session createcast wallet session revokecast wallet signcast wallet sign-authcast wallet vanitycast wallet verifyWallet Commands\n\nExample:\n```text\n$ cast channel-id --help\n```\n\nExample:\n```text\nUsage: cast channel-id [OPTIONS] <PAYER> <PAYEE> <TOKEN> <SALT>\n\nArguments:\n  <PAYER>\n          Channel payer address\n\n  <PAYEE>\n          Channel payee address\n\n  <TOKEN>\n          TIP-20 token address locked by the channel\n\n  <SALT>\n          User-supplied channel salt\n\nOptions:\n      --operator <OPERATOR>\n          Optional relayer allowed to submit settlements for the payee\n\n      --authorized-signer <AUTHORIZED_SIGNER>\n          Optional voucher signer. Defaults to the zero address, meaning the\n          payer signs\n\n      --expiring-nonce-hash <EXPIRING_NONCE_HASH>\n          Transaction-derived expiring nonce hash from ChannelOpened\n          \n          [default:\n          0x0000000000000000000000000000000000000000000000000000000000000000]\n\n      --reserve <RESERVE>\n          Channel reserve precompile address\n\n  -B, --block <BLOCK>\n          The block height to query at.\n          \n          Can also be the tags earliest, finalized, safe, latest, or pending.\n\n  -h, --help\n          Print help (see a summary with '-h')\n\n  -j, --threads <THREADS>\n          Number of threads to use. Specifying 0 defaults to the number of\n          logical cores\n          \n          [alias: --jobs]\n\n      --profile <PROFILE>\n          The configuration profile to use\n\nRpc options:\n  -r, --rpc-url <URL>\n          The RPC endpoint\n          \n          [alias: --fork-url]\n\n  -k, --insecure\n          Allow insecure RPC connections (accept invalid HTTPS certificates).\n          \n          When the provider's inner runtime transport variant is HTTP, this\n          configures the reqwest client to accept invalid certificates.\n\n      --rpc-timeout <RPC_TIMEOUT>\n          Timeout for the RPC request in seconds.\n          \n          The specified timeout will be used to override the default timeout for\n          RPC requests.\n          \n          Default value: 45\n          \n          [env: ETH_RPC_TIMEOUT=]\n\n      --no-proxy\n          Disable automatic proxy detection.\n          \n          Use this in sandboxed environments (e.g., Cursor IDE sandbox, macOS\n          App Sandbox) where system proxy detection causes crashes. When\n          enabled, HTTP_PROXY/HTTPS_PROXY environment variables and system proxy\n          settings will be ignored.\n\n      --compute-units-per-second <CUPS>\n          Sets the number of assumed available compute units per second for this\n          provider.\n          \n          default value: 330\n          \n          See also\n          [https://docs.alchemy.com/reference/compute-units#what-are-cups-compute-units-per-second](https://docs.alchemy.com/reference/compute-units#what-are-cups-compute-units-per-second)\n\n      --no-rpc-rate-limit\n          Disables rate limiting for this node's provider.\n          \n          See also\n          [https://docs.alchemy.com/reference/compute-units#what-are-cups-compute-units-per-second](https://docs.alchemy.com/reference/compute-units#what-are-cups-compute-units-per-second)\n          \n          [alias: --no-rate-limit]\n\n      --flashbots\n          Use the Flashbots RPC URL with fast mode\n          ([https://rpc.flashbots.net/fast](https://rpc.flashbots.net/fast)).\n          \n          This shares the transaction privately with all registered builders.\n          \n          See:\n          [https://docs.flashbots.net/flashbots-protect/quick-start#faster-transactions](https://docs.flashbots.net/flashbots-protect/quick-start#faster-transactions)\n\n      --jwt-secret <JWT_SECRET>\n          JWT Secret for the RPC endpoint.\n          \n          The JWT secret will be used to create a JWT for an RPC. For example,\n          the following can be used to simulate a CL `engine_forkchoiceUpdated`\n          call:\n          \n          cast rpc --jwt-secret <JWT_SECRET> engine_forkchoiceUpdatedV2\n          '[\"0x6bb38c26db65749ab6e472080a3d20a2f35776494e72016d1e339593f21c59bc\",\n          \"0x6bb38c26db65749ab6e472080a3d20a2f35776494e72016d1e339593f21c59bc\",\n          \"0x6bb38c26db65749ab6e472080a3d20a2f35776494e72016d1e339593f21c59bc\"]'\n          \n          [env: ETH_RPC_JWT_SECRET=]\n\n      --rpc-headers <RPC_HEADERS>\n          Specify custom headers for RPC requests\n          \n          [env: ETH_RPC_HEADERS=]\n\n      --curl\n          Print the equivalent curl command instead of making the RPC request\n\nDisplay options:\n      --color <COLOR>\n          The color of the log messages\n\n          Possible values:\n          - auto:   Intelligently guess whether to use color output (default)\n          - always: Force color output\n          - never:  Force disable color output\n\n      --json\n          Format log messages as JSON\n\n      --md\n          Format log messages as Markdown\n\n  -q, --quiet\n          Do not print log messages\n\n  -v, --verbosity...\n          Verbosity level of the log messages.\n          \n          Pass multiple times to increase the verbosity (e.g. -v, -vv, -vvv).\n          \n          Depending on the context the verbosity levels have different meanings.\n          \n          For example, the verbosity levels of the EVM are:\n          - 2 (-vv): Print logs for all tests.\n          - 3 (-vvv): Print execution traces for failing tests.\n          - 4 (-vvvv): Print execution traces for all tests, and setup traces\n          for failing tests.\n          - 5 (-vvvvv): Print execution and setup traces for all tests,\n          including storage changes and\n            backtraces with line numbers.\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:15:13.207Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":2,"totalLines":172,"estimatedTokens":2081}}6{"id":"doc-tautological_compare_foundry_ethereum_developmen-531c5523","source":"documentation","title":"Tautological compare – foundry - Ethereum Development Framework","url":"https://book.getfoundry.sh/forge/linting/tautological-compare","text":"ForgeOverviewBuildingCloning ContractsDocumentationContract BindingsTestingScriptingDebuggingGas TrackingFormattingLintingHigh severityMedium severityassert-state-changeboolean-cstdangerous-unary-operatordivide-before-multiplyecrecoverincorrect-erc20-interfaceincorrect-erc721-interfaceincorrect-strict-equalitylocked-etherlow-level-callsmapping-deletionnon-reentrant-not-firstreentrancy-no-ethtautological-comparetx-origintype-based-tautologyuninitialized-localuninitialized-stateunsafe-oz-erc721-mintunsafe-typecastunused-returnweak-prngLow severityInformationalGas optimizationCode size\n\nExample:\n```text\nrequire(balance >= balance); // always true; likely meant another operand\nif (a[i] < a[i]) {           // always false; dead branch\n    // ...\n}\n```\n\nExample:\n```text\nrequire(balance >= amount);\nif (a[i] < a[j]) {\n    // ...\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:15:13.214Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":2,"totalLines":19,"estimatedTokens":213}}7{"id":"doc-type_based_tautology_foundry_ethereum_developmen-a0ae80e0","source":"documentation","title":"Type-Based Tautology – foundry - Ethereum Development Framework","url":"https://book.getfoundry.sh/forge/linting/type-based-tautology","text":"ForgeOverviewBuildingCloning ContractsDocumentationContract BindingsTestingScriptingDebuggingGas TrackingFormattingLintingHigh severityMedium severityassert-state-changeboolean-cstdangerous-unary-operatordivide-before-multiplyecrecoverincorrect-erc20-interfaceincorrect-erc721-interfaceincorrect-strict-equalitylocked-etherlow-level-callsmapping-deletionnon-reentrant-not-firstreentrancy-no-ethtautological-comparetx-origintype-based-tautologyuninitialized-localuninitialized-stateunsafe-oz-erc721-mintunsafe-typecastunused-returnweak-prngLow severityInformationalGas optimizationCode size\n\nExample:\n```text\nfunction isValid(uint256 x) public pure returns (bool) {\n    return x >= 0; // always true, uint cannot be negative\n}\n \nfunction isInRange(uint8 x) public pure returns (bool) {\n    return x < 256; // always true, uint8 max is 255\n}\n \nfunction isBelowMin(int8 x) public pure returns (bool) {\n    return x < -128; // always false, int8 min is -128\n}\n \nfunction isImpossible(uint8 x) public pure returns (bool) {\n    return x == 256; // always false, 256 is outside uint8 range\n}\n```\n\nExample:\n```text\nfunction isValid(uint256 x) public pure returns (bool) {\n    return x > 0; // meaningful: false when x == 0\n}\n \nfunction isInRange(uint8 x, uint8 limit) public pure returns (bool) {\n    return x < limit; // compare against a runtime value\n}\n \nfunction isBelowThreshold(int8 x) public pure returns (bool) {\n    return x < -100; // a value within the representable range\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:15:13.216Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":2,"totalLines":37,"estimatedTokens":374}}8{"id":"doc-cast_tip403_create_foundry_ethereum_development_-0b91e05b","source":"documentation","title":"cast tip403 create – foundry - Ethereum Development Framework","url":"https://book.getfoundry.sh/reference/cast/tip403/create","text":"ReferencecastABI CommandsAccount CommandsBlock CommandsChain CommandsConversion CommandsENS CommandsEtherscan CommandsGeneral CommandsTransaction CommandsUtility Commandscast abi-encode-eventcast address-zerocast admincast artifactcast b2e-payloadcast base-feecast batch-mktxcast batch-sendcast bindcast call --createcast channel-idcast classifycast codehashcast compute-addresscast concat-hexcast constructor-argscast create2cast creation-codecast decode-errorcast decode-eventcast decode-stringcast decode-transactioncast disassemblecast erc20-tokencast erc20-token allowancecast erc20-token approvecast erc20-token burncast erc20-token decimalscast erc20-token mintcast erc20-token namecast erc20-token symbolcast erc20-token total-supplycast erc20-token transfercast estimate --createcast format-unitscast hash-messagecast hash-zerocast implementationcast indexcast index-erc7201cast interfacecast keccakcast key-authorizationcast key-authorization encodecast key-authorization inspectcast key-authorization signcast keychaincast keychain authorizecast keychain burn-witnesscast keychain checkcast keychain doctorcast keychain inspectcast keychain is-admincast keychain is-witness-burnedcast keychain listcast keychain policycast keychain policy add-callcast keychain policy remove-targetcast keychain policy set-limitcast keychain revokecast keychain rlcast keychain rscast keychain showcast keychain sscast keychain ulcast keychain verifycast keychain verify-admincast max-intcast max-uintcast min-intcast mktx --createcast padcast parse-unitscast receive-policycast receive-policy claimcast receive-policy getcast receive-policy receipt burncast receive-policy receipt decodecast receive-policy setcast receive-policy validatecast recover-authoritycast send --createcast sigcast sig-eventcast storage-creditscast storage-credits budgetcast storage-credits modecast storage-credits set-budgetcast storage-credits set-modecast storage-rootcast tempocast tempo logincast tip20-tokencast tip20-token createcast tip20-token logo-checkcast tip20-token logo-setcast tip20-token minecast tip403cast tip403 blacklistcast tip403 checkcast tip403 createcast tip403 infocast tip403 whitelistcast to-check-sum-addresscast to-utf8cast tracecast tx-poolcast tx-pool contentcast tx-pool content-fromcast tx-pool inspectcast tx-pool statuscast virtual-addresscast virtual-address createcast virtual-address resolvecast virtual-address watchcast wallet addresscast wallet change-passwordcast wallet decrypt-keystorecast wallet derivecast wallet importcast wallet listcast wallet newcast wallet new-mnemoniccast wallet private-keycast wallet public-keycast wallet removecast wallet sessioncast wallet session createcast wallet session revokecast wallet signcast wallet sign-authcast wallet vanitycast wallet verifyWallet Commands\n\nExample:\n```text\n$ cast tip403 create --help\n```\n\nExample:\n```text\nUsage: cast tip403 create [OPTIONS] --admin <ADMIN> <POLICY_TYPE>\n\nArguments:\n  <POLICY_TYPE>\n          Policy type to create\n          \n          [possible values: whitelist, blacklist]\n\nOptions:\n      --admin <ADMIN>\n          Address authorized to modify the policy\n\n      --member <ADDRESS>\n          Initial member(s) to seed the policy with. Can be specified multiple\n          times\n\n      --async\n          Only print the transaction hash and exit immediately\n          \n          [env: CAST_ASYNC=]\n\n      --sync\n          Wait for transaction receipt synchronously instead of polling. Note:\n          uses `eth_sendTransactionSync` which may not be supported by all\n          clients\n\n      --confirmations <CONFIRMATIONS>\n          The number of confirmations until the receipt is fetched\n          \n          [default: 1]\n\n      --timeout <TIMEOUT>\n          Timeout for sending the transaction\n          \n          [env: ETH_TIMEOUT=]\n\n      --poll-interval <POLL_INTERVAL>\n          Polling interval for transaction receipts (in seconds)\n          \n          [env: ETH_POLL_INTERVAL=]\n\n  -h, --help\n          Print help (see a summary with '-h')\n\n  -j, --threads <THREADS>\n          Number of threads to use. Specifying 0 defaults to the number of\n          logical cores\n          \n          [alias: --jobs]\n\n      --profile <PROFILE>\n          The configuration profile to use\n\nRpc options:\n  -r, --rpc-url <URL>\n          The RPC endpoint\n          \n          [alias: --fork-url]\n\n  -k, --insecure\n          Allow insecure RPC connections (accept invalid HTTPS certificates).\n          \n          When the provider's inner runtime transport variant is HTTP, this\n          configures the reqwest client to accept invalid certificates.\n\n      --rpc-timeout <RPC_TIMEOUT>\n          Timeout for the RPC request in seconds.\n          \n          The specified timeout will be used to override the default timeout for\n          RPC requests.\n          \n          Default value: 45\n          \n          [env: ETH_RPC_TIMEOUT=]\n\n      --no-proxy\n          Disable automatic proxy detection.\n          \n          Use this in sandboxed environments (e.g., Cursor IDE sandbox, macOS\n          App Sandbox) where system proxy detection causes crashes. When\n          enabled, HTTP_PROXY/HTTPS_PROXY environment variables and system proxy\n          settings will be ignored.\n\n      --compute-units-per-second <CUPS>\n          Sets the number of assumed available compute units per second for this\n          provider.\n          \n          default value: 330\n          \n          See also\n          [https://docs.alchemy.com/reference/compute-units#what-are-cups-compute-units-per-second](https://docs.alchemy.com/reference/compute-units#what-are-cups-compute-units-per-second)\n\n      --no-rpc-rate-limit\n          Disables rate limiting for this node's provider.\n          \n          See also\n          [https://docs.alchemy.com/reference/compute-units#what-are-cups-compute-units-per-second](https://docs.alchemy.com/reference/compute-units#what-are-cups-compute-units-per-second)\n          \n          [alias: --no-rate-limit]\n\n      --flashbots\n          Use the Flashbots RPC URL with fast mode\n          ([https://rpc.flashbots.net/fast](https://rpc.flashbots.net/fast)).\n          \n          This shares the transaction privately with all registered builders.\n          \n          See:\n          [https://docs.flashbots.net/flashbots-protect/quick-start#faster-transactions](https://docs.flashbots.net/flashbots-protect/quick-start#faster-transactions)\n\n      --jwt-secret <JWT_SECRET>\n          JWT Secret for the RPC endpoint.\n          \n          The JWT secret will be used to create a JWT for an RPC. For example,\n          the following can be used to simulate a CL `engine_forkchoiceUpdated`\n          call:\n          \n          cast rpc --jwt-secret <JWT_SECRET> engine_forkchoiceUpdatedV2\n          '[\"0x6bb38c26db65749ab6e472080a3d20a2f35776494e72016d1e339593f21c59bc\",\n          \"0x6bb38c26db65749ab6e472080a3d20a2f35776494e72016d1e339593f21c59bc\",\n          \"0x6bb38c26db65749ab6e472080a3d20a2f35776494e72016d1e339593f21c59bc\"]'\n          \n          [env: ETH_RPC_JWT_SECRET=]\n\n      --rpc-headers <RPC_HEADERS>\n          Specify custom headers for RPC requests\n          \n          [env: ETH_RPC_HEADERS=]\n\n      --curl\n          Print the equivalent curl command instead of making the RPC request\n\n  -e, --etherscan-api-key <KEY>\n          The Etherscan (or equivalent) API key\n          \n          [env: ETHERSCAN_API_KEY=]\n\n  -c, --chain <CHAIN>\n          The chain name or EIP-155 chain ID\n          \n          [env: CHAIN=]\n\nWallet options - raw:\n  -f, --from <ADDRESS>\n          The sender account\n          \n          [env: ETH_FROM=]\n\n  -i, --interactive\n          Open an interactive prompt to enter your private key\n\n      --private-key <RAW_PRIVATE_KEY>\n          Use the provided private key\n\n      --mnemonic <MNEMONIC>\n          Use the mnemonic phrase of mnemonic file at the specified path\n\n      --mnemonic-passphrase <PASSPHRASE>\n          Use a BIP39 passphrase for the mnemonic\n\n      --mnemonic-derivation-path <PATH>\n          The wallet derivation path.\n          \n          Works with both --mnemonic-path and hardware wallets.\n\n      --mnemonic-index <INDEX>\n          Use the private key from the given mnemonic index.\n          \n          Used with --mnemonic-path.\n          \n          [default: 0]\n\nWallet options - keystore:\n      --keystore <PATH>\n          Use the keystore in the given folder or file\n          \n          [env: ETH_KEYSTORE=]\n\n      --account <ACCOUNT_NAME>\n          Use a keystore from the default keystores folder\n          (~/.foundry/keystores) by its filename\n          \n          [env: ETH_KEYSTORE_ACCOUNT=]\n\n      --password <PASSWORD>\n          The keystore password.\n          \n          Used with --keystore.\n\n      --password-file <PASSWORD_FILE>\n          The keystore password file path.\n          \n          Used with --keystore.\n          \n          [env: ETH_PASSWORD=]\n\nWallet options - hardware wallet:\n  -l, --ledger\n          Use a Ledger hardware wallet\n\n  -t, --trezor\n          Use a Trezor hardware wallet\n\nWallet options - remote:\n      --aws\n          Use AWS Key Management Service.\n          \n          Ensure the AWS_KMS_KEY_ID environment variable is set.\n\n      --gcp\n          Use Google Cloud Key Management Service.\n          \n          Ensure the following environment variables are set: GCP_PROJECT_ID,\n          GCP_LOCATION, GCP_KEY_RING, GCP_KEY_NAME, GCP_KEY_VERSION.\n          \n          See: [https://cloud.google.com/kms/docs](https://cloud.google.com/kms/docs)\n\n      --turnkey\n          Use Turnkey.\n          \n          Ensure the following environment variables are set:\n          TURNKEY_API_PRIVATE_KEY, TURNKEY_ORGANIZATION_ID, TURNKEY_ADDRESS.\n          \n          See: [https://docs.turnkey.com/getting-started/quickstart](https://docs.turnkey.com/getting-started/quickstart)\n\nWallet options - Tempo:\n      --tempo.access-key <PRIVATE_KEY>\n          Tempo access key private key.\n          \n          When set, the transaction is signed with this access key on behalf of\n          `--tempo.root-account`.\n          \n          [env: TEMPO_ACCESS_KEY=]\n\n      --tempo.root-account <ADDRESS>\n          Tempo root account address (the `from` address for keychain\n          transactions).\n          \n          Required when `--tempo.access-key` is set.\n          \n          [env: TEMPO_ROOT_ACCOUNT=]\n\nWallet options - browser wallet:\n      --browser\n          Use a browser wallet\n\n      --browser-port <PORT>\n          Port for the browser wallet server\n          \n          [default: 9545]\n\n      --browser-disable-open\n          Whether to open the browser for wallet connection\n\nTransaction options:\n      --gas-limit <GAS_LIMIT>\n          Gas limit for the transaction\n          \n          [env: ETH_GAS_LIMIT=]\n\n      --gas-price <GAS_PRICE>\n          Gas price for legacy transactions, or max fee per gas for EIP1559\n          transactions\n          \n          [env: ETH_GAS_PRICE=]\n\n      --priority-gas-price <PRIORITY_GAS_PRICE>\n          Max priority fee per gas for EIP1559 transactions\n          \n          [env: ETH_PRIORITY_GAS_PRICE=]\n\n      --nonce <NONCE>\n          Nonce for the transaction\n\nTempo:\n      --tempo.session <SESSION_ID>\n          Use a live Tempo wallet session for signing.\n          \n          When set, Foundry resolves the session from\n          `$TEMPO_HOME/wallet/sessions.toml` and signs Tempo transactions with\n          the session's temporary access key on behalf of its root account.\n\n      --tempo.fee-token <FEE_TOKEN>\n          Fee token address, numeric TIP-20 token id, or known symbol for Tempo\n          transactions.\n          \n          When set, builds a Tempo (type 0x76) transaction that pays gas fees in\n          the specified token. Known symbols are PathUSD, AlphaUSD, BetaUSD, and\n          ThetaUSD.\n          \n          If this is not set, the fee token is chosen according to network\n          rules. See the Tempo docs for more information.\n\n      --tempo.expires <SECONDS>\n          Opt into TIP-1009 expiring-nonce mode with a validity window.\n          \n          Convenience flag that combines `--tempo.expiring-nonce` with a\n          relative `--tempo.valid-before`. Sets nonce_key = U256::MAX, nonce =\n          0, and valid_before = now + seconds.\n          \n          Maximum value is 30 seconds. The transaction must be mined before the\n          deadline or it becomes permanently invalid, giving safe retry\n          semantics: retries produce a fresh tx hash and the old tx can never\n          land late.\n\n      --tempo.nonce-key <NONCE_KEY>\n          Nonce key for Tempo parallelizable nonces.\n          \n          When set, builds a Tempo (type 0x76) transaction with the specified\n          nonce key, allowing multiple transactions with the same nonce but\n          different keys to be executed in parallel. If not set, the protocol\n          nonce key (0) will be used.\n          \n          For more information see\n          [https://docs.tempo.xyz/protocol/transactions/spec-tempo-transaction#parallelizable-nonces](https://docs.tempo.xyz/protocol/transactions/spec-tempo-transaction#parallelizable-nonces).\n\n      --tempo.lane <NAME>\n          Named nonce lane for Tempo parallelizable nonces.\n          \n          Resolves a friendly lane name (e.g. `deploy`, `payments`) to a\n          `nonce_key` via a shared lanes file (default: `tempo.lanes.toml` at\n          the project root). The lanes file is a TOML map of `name = <U256>`\n          entries, e.g.:\n          \n          ```toml deploy   = 1 ops      = 2 payments = 3 ```\n          \n          Mutually exclusive with `--tempo.nonce-key`.\n\n      --tempo.lanes-file <PATH>\n          Path to the Tempo lanes file used by `--tempo.lane`.\n          \n          Defaults to `tempo.lanes.toml` at the project root.\n\n      --tempo.sponsor <ADDRESS>\n          Sponsor (fee payer) address for Tempo sponsored transactions\n\n      --tempo.sponsor-signer <SIGNER>\n          Sign Tempo sponsor digests in-band with the given signer URI.\n          \n          Supported forms include `env://VAR`, `keystore://PATH`,\n          `account://NAME`, `ledger://`, `trezor://`, `aws://`, `gcp://`,\n          `turnkey://`, and `private-key://KEY`.\n\n      --tempo.sponsor-sig <SPONSOR_SIG>\n          Sponsor (fee payer) signature for Tempo sponsored transactions.\n          \n          The sponsor signs the `fee_payer_signature_hash` to commit to paying\n          gas fees on behalf of the sender. Provide as a hex-encoded signature.\n\n      --sponsor-url <URL>\n          Remote sponsor (fee payer) service URL.\n          \n          When set, the user-signed transaction is forwarded to this URL via\n          `eth_signRawTransaction`. The service adds its fee payer signature and\n          returns the fully-sponsored transaction, which is then submitted via\n          the regular RPC. No local sponsor key is required.\n          \n          Example: `cast send 0x... --sponsor-url\n          https://sponsor.tempo.xyz/tp_abc123`\n          \n          [env: TEMPO_SPONSOR_URL=]\n\n      --tempo.print-sponsor-hash\n          Print the sponsor signature hash and exit.\n          \n          Computes the `fee_payer_signature_hash` for the transaction so that a\n          sponsor knows what hash to sign. The transaction is not sent.\n\n      --tempo.key-id <KEY_ID>\n          Access key ID for Tempo Keychain signature transactions.\n          \n          Used during gas estimation to override the key_id that would normally\n          be recovered from the signature.\n\n      --tempo.expiring-nonce\n          Enable expiring nonce mode for Tempo transactions.\n          \n          Sets nonce to 0 and nonce_key to U256::MAX, enabling time-bounded\n          transaction validity via `--tempo.valid-before` and\n          `--tempo.valid-after`.\n\n      --tempo.valid-before <VALID_BEFORE>\n          Upper bound timestamp for Tempo expiring nonce transactions.\n          \n          The transaction is only valid before this unix timestamp. Requires\n          `--tempo.expiring-nonce`.\n\n      --tempo.valid-after <VALID_AFTER>\n          Lower bound timestamp for Tempo expiring nonce transactions.\n          \n          The transaction is only valid after this unix timestamp. Requires\n          `--tempo.expiring-nonce`.\n\nDisplay options:\n      --color <COLOR>\n          The color of the log messages\n\n          Possible values:\n          - auto:   Intelligently guess whether to use color output (default)\n          - always: Force color output\n          - never:  Force disable color output\n\n      --json\n          Format log messages as JSON\n\n      --md\n          Format log messages as Markdown\n\n  -q, --quiet\n          Do not print log messages\n\n  -v, --verbosity...\n          Verbosity level of the log messages.\n          \n          Pass multiple times to increase the verbosity (e.g. -v, -vv, -vvv).\n          \n          Depending on the context the verbosity levels have different meanings.\n          \n          For example, the verbosity levels of the EVM are:\n          - 2 (-vv): Print logs for all tests.\n          - 3 (-vvv): Print execution traces for failing tests.\n          - 4 (-vvvv): Print execution traces for all tests, and setup traces\n          for failing tests.\n          - 5 (-vvvvv): Print execution and setup traces for all tests,\n          including storage changes and\n            backtraces with line numbers.\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:15:13.246Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":2,"totalLines":437,"estimatedTokens":4367}}9{"id":"doc-forge_inspect_foundry_ethereum_development_frame-c435588a","source":"documentation","title":"forge inspect – foundry - Ethereum Development Framework","url":"https://book.getfoundry.sh/reference/forge/inspect","text":"ReferenceforgeBuild Commandsforge buildforge cache cleanforge cleanforge inspectforge soldeer cleanDeploy CommandsGeneral CommandsProject CommandsTest CommandsUtility Commands\n\nExample:\n```text\n$ forge inspect --help\n```\n\nExample:\n```text\nUsage: forge inspect [OPTIONS] <CONTRACT> <FIELD>\n\nArguments:\n  <CONTRACT>\n          The identifier of the contract to inspect in the form\n          `(<path>:)?<contractname>`\n\n  <FIELD>\n          The contract artifact field to inspect\n          \n          [possible values: artifact, abi, bytecode, deployedBytecode, assembly,\n          legacyAssembly, assemblyOptimized, methodIdentifiers, gasEstimates,\n          storageLayout, devdoc, ir, irOptimized, metadata, userdoc, ewasm,\n          errors, events, standardJson, libraries, linearization]\n\nOptions:\n  -h, --help\n          Print help (see a summary with '-h')\n\n  -j, --threads <THREADS>\n          Number of threads to use. Specifying 0 defaults to the number of\n          logical cores\n          \n          [alias: --jobs]\n\n      --profile <PROFILE>\n          The configuration profile to use\n\nCache options:\n      --force\n          Clear the cache and artifacts folder and recompile\n\nBuild options:\n      --no-cache\n          Disable the cache\n\n      --no-dynamic-test-linking\n          Disable dynamic test linking\n\n      --skip <SKIP>...\n          Skip building files whose names contain the given filter.\n          \n          `test` and `script` are aliases for `.t.sol` and `.s.sol`.\n\nLinker options:\n      --libraries <LIBRARIES>\n          Set pre-linked libraries\n          \n          [env: DAPP_LIBRARIES=]\n\nCompiler options:\n      --ignored-error-codes <ERROR_CODES>\n          Ignore solc warnings by error code\n\n  -D, --deny <LEVEL>\n          A compiler error will be triggered at the specified diagnostic level.\n          \n          Replaces the deprecated `--deny-warnings` flag.\n          \n          Possible values: - `never`: Do not treat any diagnostics as errors. -\n          `warnings`: Treat warnings as errors. - `notes`: Treat both, warnings\n          and notes, as errors.\n\n          Possible values:\n          - never:    Always exit with zero code\n          - warnings: Exit with a non-zero code if any warnings are found\n          - notes:    Exit with a non-zero code if any notes or warnings are\n            found\n\n      --no-auto-detect\n          Do not auto-detect the `solc` version\n\n      --use <SOLC_VERSION>\n          Specify the solc version, or a path to a local solc, to build with.\n          \n          Valid values are in the format `x.y.z`, `solc:x.y.z` or\n          `path/to/solc`.\n\n      --offline\n          Do not access the network.\n          \n          Missing solc versions will not be installed.\n\n      --use-literal-content\n          Changes compilation to only use literal content and not URLs\n\n      --no-metadata\n          Do not append any metadata to the bytecode.\n          \n          This is equivalent to setting `bytecode_hash` to `none` and\n          `cbor_metadata` to `false`.\n\n      --ast\n          Includes the AST as JSON in the compiler output\n\n      --evm-version <VERSION>\n          The target EVM version\n\n      --optimize [<OPTIMIZE>]\n          Activate the Solidity optimizer\n          \n          [possible values: true, false]\n\n      --optimizer-runs <RUNS>\n          The number of runs specifies roughly how often each opcode of the\n          deployed code will be executed across the life-time of the contract.\n          This means it is a trade-off parameter between code size (deploy cost)\n          and code execution cost (cost after deployment). An `optimizer_runs`\n          parameter of `1` will produce short but expensive code. In contrast, a\n          larger `optimizer_runs` parameter will produce longer but more gas\n          efficient code\n\n      --via-ir\n          Use the Yul intermediate representation compilation pipeline\n\n      --via-ssa-cfg\n          Turn on SSA CFG-based code generation via the IR (experimental).\n          \n          This passes `--via-ssa-cfg` to solc. Implies `--via-ir`. Requires\n          `--experimental` to be set (as of Solidity 0.8.35+). This is false by\n          default.\n\n      --experimental\n          Enable Solidity's experimental mode.\n          \n          This passes `--experimental` to solc, which is required by Solidity\n          0.8.35+ for experimental features.\n\n      --extra-output <SELECTOR>...\n          Extra output to include in the contract's artifact.\n          \n          Example keys: evm.assembly, ewasm, ir, irOptimized, metadata\n          \n          For a full description, see\n          [https://docs.soliditylang.org/en/v0.8.13/using-the-compiler.html#input-description](https://docs.soliditylang.org/en/v0.8.13/using-the-compiler.html#input-description)\n\n      --extra-output-files <SELECTOR>...\n          Extra output to write to separate files.\n          \n          Valid values: metadata, ir, irOptimized, ewasm, evm.assembly\n\nProject options:\n  -o, --out <PATH>\n          The path to the contract artifacts folder\n\n      --revert-strings <REVERT>\n          Revert string configuration.\n          \n          Possible values are \"default\", \"strip\" (remove), \"debug\"\n          (Solidity-generated revert strings) and \"verboseDebug\"\n\n      --build-info\n          Generate build info files\n\n      --build-info-path <PATH>\n          Output path to directory that build info files will be written to\n\n      --root <PATH>\n          The project's root path.\n          \n          By default root of the Git repository, if in one, or the current\n          working directory.\n\n  -C, --contracts <PATH>\n          The contracts source directory\n\n  -R, --remappings <REMAPPINGS>\n          The project's remappings\n\n      --remappings-env <ENV>\n          The project's remappings from the environment\n\n      --cache-path <PATH>\n          The path to the compiler cache\n\n      --lib-paths <PATH>\n          The path to the library folder\n\n      --hardhat\n          Use the Hardhat-style project layout.\n          \n          This is the same as using: `--contracts contracts --lib-paths\n          node_modules`.\n          \n          [alias: --hh]\n\n      --config-path <FILE>\n          Path to the config file\n\nDisplay options:\n  -s, --strip-yul-comments\n          Whether to remove comments when inspecting `ir` and `irOptimized`\n          artifact fields\n\n  -w, --wrap\n          Whether to wrap the table to the terminal width\n\n      --color <COLOR>\n          The color of the log messages\n\n          Possible values:\n          - auto:   Intelligently guess whether to use color output (default)\n          - always: Force color output\n          - never:  Force disable color output\n\n      --json\n          Format log messages as JSON\n\n      --md\n          Format log messages as Markdown\n\n  -q, --quiet\n          Do not print log messages\n\n  -v, --verbosity...\n          Verbosity level of the log messages.\n          \n          Pass multiple times to increase the verbosity (e.g. -v, -vv, -vvv).\n          \n          Depending on the context the verbosity levels have different meanings.\n          \n          For example, the verbosity levels of the EVM are:\n          - 2 (-vv): Print logs for all tests.\n          - 3 (-vvv): Print execution traces for failing tests.\n          - 4 (-vvvv): Print execution traces for all tests, and setup traces\n          for failing tests.\n          - 5 (-vvvvv): Print execution and setup traces for all tests,\n          including storage changes and\n            backtraces with line numbers.\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:15:13.258Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":2,"totalLines":241,"estimatedTokens":1896}}10{"id":"doc-cast_erc20_token_approve_foundry_ethereum_develo-12e0eb86","source":"documentation","title":"cast erc20-token approve – foundry - Ethereum Development Framework","url":"https://book.getfoundry.sh/reference/cast/erc20-token/approve","text":"ReferencecastABI CommandsAccount CommandsBlock CommandsChain CommandsConversion CommandsENS CommandsEtherscan CommandsGeneral CommandsTransaction CommandsUtility Commandscast abi-encode-eventcast address-zerocast admincast artifactcast b2e-payloadcast base-feecast batch-mktxcast batch-sendcast bindcast call --createcast channel-idcast classifycast codehashcast compute-addresscast concat-hexcast constructor-argscast create2cast creation-codecast decode-errorcast decode-eventcast decode-stringcast decode-transactioncast disassemblecast erc20-tokencast erc20-token allowancecast erc20-token approvecast erc20-token burncast erc20-token decimalscast erc20-token mintcast erc20-token namecast erc20-token symbolcast erc20-token total-supplycast erc20-token transfercast estimate --createcast format-unitscast hash-messagecast hash-zerocast implementationcast indexcast index-erc7201cast interfacecast keccakcast key-authorizationcast key-authorization encodecast key-authorization inspectcast key-authorization signcast keychaincast keychain authorizecast keychain burn-witnesscast keychain checkcast keychain doctorcast keychain inspectcast keychain is-admincast keychain is-witness-burnedcast keychain listcast keychain policycast keychain policy add-callcast keychain policy remove-targetcast keychain policy set-limitcast keychain revokecast keychain rlcast keychain rscast keychain showcast keychain sscast keychain ulcast keychain verifycast keychain verify-admincast max-intcast max-uintcast min-intcast mktx --createcast padcast parse-unitscast receive-policycast receive-policy claimcast receive-policy getcast receive-policy receipt burncast receive-policy receipt decodecast receive-policy setcast receive-policy validatecast recover-authoritycast send --createcast sigcast sig-eventcast storage-creditscast storage-credits budgetcast storage-credits modecast storage-credits set-budgetcast storage-credits set-modecast storage-rootcast tempocast tempo logincast tip20-tokencast tip20-token createcast tip20-token logo-checkcast tip20-token logo-setcast tip20-token minecast tip403cast tip403 blacklistcast tip403 checkcast tip403 createcast tip403 infocast tip403 whitelistcast to-check-sum-addresscast to-utf8cast tracecast tx-poolcast tx-pool contentcast tx-pool content-fromcast tx-pool inspectcast tx-pool statuscast virtual-addresscast virtual-address createcast virtual-address resolvecast virtual-address watchcast wallet addresscast wallet change-passwordcast wallet decrypt-keystorecast wallet derivecast wallet importcast wallet listcast wallet newcast wallet new-mnemoniccast wallet private-keycast wallet public-keycast wallet removecast wallet sessioncast wallet session createcast wallet session revokecast wallet signcast wallet sign-authcast wallet vanitycast wallet verifyWallet Commands\n\nExample:\n```text\n$ cast erc20-token approve --help\n```\n\nExample:\n```text\nUsage: cast erc20-token approve [OPTIONS] <TOKEN> <SPENDER> <AMOUNT>\n\nArguments:\n  <TOKEN>\n          The ERC20 token contract address\n\n  <SPENDER>\n          The spender address\n\n  <AMOUNT>\n          The amount to approve\n\nOptions:\n      --async\n          Only print the transaction hash and exit immediately\n          \n          [env: CAST_ASYNC=]\n\n      --sync\n          Wait for transaction receipt synchronously instead of polling. Note:\n          uses `eth_sendTransactionSync` which may not be supported by all\n          clients\n\n      --confirmations <CONFIRMATIONS>\n          The number of confirmations until the receipt is fetched\n          \n          [default: 1]\n\n      --timeout <TIMEOUT>\n          Timeout for sending the transaction\n          \n          [env: ETH_TIMEOUT=]\n\n      --poll-interval <POLL_INTERVAL>\n          Polling interval for transaction receipts (in seconds)\n          \n          [env: ETH_POLL_INTERVAL=]\n\n  -h, --help\n          Print help (see a summary with '-h')\n\n  -j, --threads <THREADS>\n          Number of threads to use. Specifying 0 defaults to the number of\n          logical cores\n          \n          [alias: --jobs]\n\n      --profile <PROFILE>\n          The configuration profile to use\n\nRpc options:\n  -r, --rpc-url <URL>\n          The RPC endpoint\n          \n          [alias: --fork-url]\n\n  -k, --insecure\n          Allow insecure RPC connections (accept invalid HTTPS certificates).\n          \n          When the provider's inner runtime transport variant is HTTP, this\n          configures the reqwest client to accept invalid certificates.\n\n      --rpc-timeout <RPC_TIMEOUT>\n          Timeout for the RPC request in seconds.\n          \n          The specified timeout will be used to override the default timeout for\n          RPC requests.\n          \n          Default value: 45\n          \n          [env: ETH_RPC_TIMEOUT=]\n\n      --no-proxy\n          Disable automatic proxy detection.\n          \n          Use this in sandboxed environments (e.g., Cursor IDE sandbox, macOS\n          App Sandbox) where system proxy detection causes crashes. When\n          enabled, HTTP_PROXY/HTTPS_PROXY environment variables and system proxy\n          settings will be ignored.\n\n      --compute-units-per-second <CUPS>\n          Sets the number of assumed available compute units per second for this\n          provider.\n          \n          default value: 330\n          \n          See also\n          [https://docs.alchemy.com/reference/compute-units#what-are-cups-compute-units-per-second](https://docs.alchemy.com/reference/compute-units#what-are-cups-compute-units-per-second)\n\n      --no-rpc-rate-limit\n          Disables rate limiting for this node's provider.\n          \n          See also\n          [https://docs.alchemy.com/reference/compute-units#what-are-cups-compute-units-per-second](https://docs.alchemy.com/reference/compute-units#what-are-cups-compute-units-per-second)\n          \n          [alias: --no-rate-limit]\n\n      --flashbots\n          Use the Flashbots RPC URL with fast mode\n          ([https://rpc.flashbots.net/fast](https://rpc.flashbots.net/fast)).\n          \n          This shares the transaction privately with all registered builders.\n          \n          See:\n          [https://docs.flashbots.net/flashbots-protect/quick-start#faster-transactions](https://docs.flashbots.net/flashbots-protect/quick-start#faster-transactions)\n\n      --jwt-secret <JWT_SECRET>\n          JWT Secret for the RPC endpoint.\n          \n          The JWT secret will be used to create a JWT for an RPC. For example,\n          the following can be used to simulate a CL `engine_forkchoiceUpdated`\n          call:\n          \n          cast rpc --jwt-secret <JWT_SECRET> engine_forkchoiceUpdatedV2\n          '[\"0x6bb38c26db65749ab6e472080a3d20a2f35776494e72016d1e339593f21c59bc\",\n          \"0x6bb38c26db65749ab6e472080a3d20a2f35776494e72016d1e339593f21c59bc\",\n          \"0x6bb38c26db65749ab6e472080a3d20a2f35776494e72016d1e339593f21c59bc\"]'\n          \n          [env: ETH_RPC_JWT_SECRET=]\n\n      --rpc-headers <RPC_HEADERS>\n          Specify custom headers for RPC requests\n          \n          [env: ETH_RPC_HEADERS=]\n\n      --curl\n          Print the equivalent curl command instead of making the RPC request\n\n  -e, --etherscan-api-key <KEY>\n          The Etherscan (or equivalent) API key\n          \n          [env: ETHERSCAN_API_KEY=]\n\n  -c, --chain <CHAIN>\n          The chain name or EIP-155 chain ID\n          \n          [env: CHAIN=]\n\nWallet options - raw:\n  -f, --from <ADDRESS>\n          The sender account\n          \n          [env: ETH_FROM=]\n\n  -i, --interactive\n          Open an interactive prompt to enter your private key\n\n      --private-key <RAW_PRIVATE_KEY>\n          Use the provided private key\n\n      --mnemonic <MNEMONIC>\n          Use the mnemonic phrase of mnemonic file at the specified path\n\n      --mnemonic-passphrase <PASSPHRASE>\n          Use a BIP39 passphrase for the mnemonic\n\n      --mnemonic-derivation-path <PATH>\n          The wallet derivation path.\n          \n          Works with both --mnemonic-path and hardware wallets.\n\n      --mnemonic-index <INDEX>\n          Use the private key from the given mnemonic index.\n          \n          Used with --mnemonic-path.\n          \n          [default: 0]\n\nWallet options - keystore:\n      --keystore <PATH>\n          Use the keystore in the given folder or file\n          \n          [env: ETH_KEYSTORE=]\n\n      --account <ACCOUNT_NAME>\n          Use a keystore from the default keystores folder\n          (~/.foundry/keystores) by its filename\n          \n          [env: ETH_KEYSTORE_ACCOUNT=]\n\n      --password <PASSWORD>\n          The keystore password.\n          \n          Used with --keystore.\n\n      --password-file <PASSWORD_FILE>\n          The keystore password file path.\n          \n          Used with --keystore.\n          \n          [env: ETH_PASSWORD=]\n\nWallet options - hardware wallet:\n  -l, --ledger\n          Use a Ledger hardware wallet\n\n  -t, --trezor\n          Use a Trezor hardware wallet\n\nWallet options - remote:\n      --aws\n          Use AWS Key Management Service.\n          \n          Ensure the AWS_KMS_KEY_ID environment variable is set.\n\n      --gcp\n          Use Google Cloud Key Management Service.\n          \n          Ensure the following environment variables are set: GCP_PROJECT_ID,\n          GCP_LOCATION, GCP_KEY_RING, GCP_KEY_NAME, GCP_KEY_VERSION.\n          \n          See: [https://cloud.google.com/kms/docs](https://cloud.google.com/kms/docs)\n\n      --turnkey\n          Use Turnkey.\n          \n          Ensure the following environment variables are set:\n          TURNKEY_API_PRIVATE_KEY, TURNKEY_ORGANIZATION_ID, TURNKEY_ADDRESS.\n          \n          See: [https://docs.turnkey.com/getting-started/quickstart](https://docs.turnkey.com/getting-started/quickstart)\n\nWallet options - Tempo:\n      --tempo.access-key <PRIVATE_KEY>\n          Tempo access key private key.\n          \n          When set, the transaction is signed with this access key on behalf of\n          `--tempo.root-account`.\n          \n          [env: TEMPO_ACCESS_KEY=]\n\n      --tempo.root-account <ADDRESS>\n          Tempo root account address (the `from` address for keychain\n          transactions).\n          \n          Required when `--tempo.access-key` is set.\n          \n          [env: TEMPO_ROOT_ACCOUNT=]\n\nWallet options - browser wallet:\n      --browser\n          Use a browser wallet\n\n      --browser-port <PORT>\n          Port for the browser wallet server\n          \n          [default: 9545]\n\n      --browser-disable-open\n          Whether to open the browser for wallet connection\n\nTransaction options:\n      --gas-limit <GAS_LIMIT>\n          Gas limit for the transaction\n          \n          [env: ETH_GAS_LIMIT=]\n\n      --gas-price <GAS_PRICE>\n          Gas price for legacy transactions, or max fee per gas for EIP1559\n          transactions\n          \n          [env: ETH_GAS_PRICE=]\n\n      --priority-gas-price <PRIORITY_GAS_PRICE>\n          Max priority fee per gas for EIP1559 transactions\n          \n          [env: ETH_PRIORITY_GAS_PRICE=]\n\n      --nonce <NONCE>\n          Nonce for the transaction\n\nTempo:\n      --tempo.session <SESSION_ID>\n          Use a live Tempo wallet session for signing.\n          \n          When set, Foundry resolves the session from\n          `$TEMPO_HOME/wallet/sessions.toml` and signs Tempo transactions with\n          the session's temporary access key on behalf of its root account.\n\n      --tempo.fee-token <FEE_TOKEN>\n          Fee token address, numeric TIP-20 token id, or known symbol for Tempo\n          transactions.\n          \n          When set, builds a Tempo (type 0x76) transaction that pays gas fees in\n          the specified token. Known symbols are PathUSD, AlphaUSD, BetaUSD, and\n          ThetaUSD.\n          \n          If this is not set, the fee token is chosen according to network\n          rules. See the Tempo docs for more information.\n\n      --tempo.expires <SECONDS>\n          Opt into TIP-1009 expiring-nonce mode with a validity window.\n          \n          Convenience flag that combines `--tempo.expiring-nonce` with a\n          relative `--tempo.valid-before`. Sets nonce_key = U256::MAX, nonce =\n          0, and valid_before = now + seconds.\n          \n          Maximum value is 30 seconds. The transaction must be mined before the\n          deadline or it becomes permanently invalid, giving safe retry\n          semantics: retries produce a fresh tx hash and the old tx can never\n          land late.\n\n      --tempo.nonce-key <NONCE_KEY>\n          Nonce key for Tempo parallelizable nonces.\n          \n          When set, builds a Tempo (type 0x76) transaction with the specified\n          nonce key, allowing multiple transactions with the same nonce but\n          different keys to be executed in parallel. If not set, the protocol\n          nonce key (0) will be used.\n          \n          For more information see\n          [https://docs.tempo.xyz/protocol/transactions/spec-tempo-transaction#parallelizable-nonces](https://docs.tempo.xyz/protocol/transactions/spec-tempo-transaction#parallelizable-nonces).\n\n      --tempo.lane <NAME>\n          Named nonce lane for Tempo parallelizable nonces.\n          \n          Resolves a friendly lane name (e.g. `deploy`, `payments`) to a\n          `nonce_key` via a shared lanes file (default: `tempo.lanes.toml` at\n          the project root). The lanes file is a TOML map of `name = <U256>`\n          entries, e.g.:\n          \n          ```toml deploy   = 1 ops      = 2 payments = 3 ```\n          \n          Mutually exclusive with `--tempo.nonce-key`.\n\n      --tempo.lanes-file <PATH>\n          Path to the Tempo lanes file used by `--tempo.lane`.\n          \n          Defaults to `tempo.lanes.toml` at the project root.\n\n      --tempo.sponsor <ADDRESS>\n          Sponsor (fee payer) address for Tempo sponsored transactions\n\n      --tempo.sponsor-signer <SIGNER>\n          Sign Tempo sponsor digests in-band with the given signer URI.\n          \n          Supported forms include `env://VAR`, `keystore://PATH`,\n          `account://NAME`, `ledger://`, `trezor://`, `aws://`, `gcp://`,\n          `turnkey://`, and `private-key://KEY`.\n\n      --tempo.sponsor-sig <SPONSOR_SIG>\n          Sponsor (fee payer) signature for Tempo sponsored transactions.\n          \n          The sponsor signs the `fee_payer_signature_hash` to commit to paying\n          gas fees on behalf of the sender. Provide as a hex-encoded signature.\n\n      --sponsor-url <URL>\n          Remote sponsor (fee payer) service URL.\n          \n          When set, the user-signed transaction is forwarded to this URL via\n          `eth_signRawTransaction`. The service adds its fee payer signature and\n          returns the fully-sponsored transaction, which is then submitted via\n          the regular RPC. No local sponsor key is required.\n          \n          Example: `cast send 0x... --sponsor-url\n          https://sponsor.tempo.xyz/tp_abc123`\n          \n          [env: TEMPO_SPONSOR_URL=]\n\n      --tempo.print-sponsor-hash\n          Print the sponsor signature hash and exit.\n          \n          Computes the `fee_payer_signature_hash` for the transaction so that a\n          sponsor knows what hash to sign. The transaction is not sent.\n\n      --tempo.key-id <KEY_ID>\n          Access key ID for Tempo Keychain signature transactions.\n          \n          Used during gas estimation to override the key_id that would normally\n          be recovered from the signature.\n\n      --tempo.expiring-nonce\n          Enable expiring nonce mode for Tempo transactions.\n          \n          Sets nonce to 0 and nonce_key to U256::MAX, enabling time-bounded\n          transaction validity via `--tempo.valid-before` and\n          `--tempo.valid-after`.\n\n      --tempo.valid-before <VALID_BEFORE>\n          Upper bound timestamp for Tempo expiring nonce transactions.\n          \n          The transaction is only valid before this unix timestamp. Requires\n          `--tempo.expiring-nonce`.\n\n      --tempo.valid-after <VALID_AFTER>\n          Lower bound timestamp for Tempo expiring nonce transactions.\n          \n          The transaction is only valid after this unix timestamp. Requires\n          `--tempo.expiring-nonce`.\n\nDisplay options:\n      --color <COLOR>\n          The color of the log messages\n\n          Possible values:\n          - auto:   Intelligently guess whether to use color output (default)\n          - always: Force color output\n          - never:  Force disable color output\n\n      --json\n          Format log messages as JSON\n\n      --md\n          Format log messages as Markdown\n\n  -q, --quiet\n          Do not print log messages\n\n  -v, --verbosity...\n          Verbosity level of the log messages.\n          \n          Pass multiple times to increase the verbosity (e.g. -v, -vv, -vvv).\n          \n          Depending on the context the verbosity levels have different meanings.\n          \n          For example, the verbosity levels of the EVM are:\n          - 2 (-vv): Print logs for all tests.\n          - 3 (-vvv): Print execution traces for failing tests.\n          - 4 (-vvvv): Print execution traces for all tests, and setup traces\n          for failing tests.\n          - 5 (-vvvvv): Print execution and setup traces for all tests,\n          including storage changes and\n            backtraces with line numbers.\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:15:13.290Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":2,"totalLines":434,"estimatedTokens":4329}}11{"id":"doc-cast_wallet_list_foundry_ethereum_development_fr-c8ad64b6","source":"documentation","title":"cast wallet list – foundry - Ethereum Development Framework","url":"https://book.getfoundry.sh/reference/cast/wallet/list","text":"ReferencecastABI CommandsAccount CommandsBlock CommandsChain CommandsConversion CommandsENS CommandsEtherscan CommandsGeneral CommandsTransaction CommandsUtility Commandscast abi-encode-eventcast address-zerocast admincast artifactcast b2e-payloadcast base-feecast batch-mktxcast batch-sendcast bindcast call --createcast channel-idcast classifycast codehashcast compute-addresscast concat-hexcast constructor-argscast create2cast creation-codecast decode-errorcast decode-eventcast decode-stringcast decode-transactioncast disassemblecast erc20-tokencast erc20-token allowancecast erc20-token approvecast erc20-token burncast erc20-token decimalscast erc20-token mintcast erc20-token namecast erc20-token symbolcast erc20-token total-supplycast erc20-token transfercast estimate --createcast format-unitscast hash-messagecast hash-zerocast implementationcast indexcast index-erc7201cast interfacecast keccakcast key-authorizationcast key-authorization encodecast key-authorization inspectcast key-authorization signcast keychaincast keychain authorizecast keychain burn-witnesscast keychain checkcast keychain doctorcast keychain inspectcast keychain is-admincast keychain is-witness-burnedcast keychain listcast keychain policycast keychain policy add-callcast keychain policy remove-targetcast keychain policy set-limitcast keychain revokecast keychain rlcast keychain rscast keychain showcast keychain sscast keychain ulcast keychain verifycast keychain verify-admincast max-intcast max-uintcast min-intcast mktx --createcast padcast parse-unitscast receive-policycast receive-policy claimcast receive-policy getcast receive-policy receipt burncast receive-policy receipt decodecast receive-policy setcast receive-policy validatecast recover-authoritycast send --createcast sigcast sig-eventcast storage-creditscast storage-credits budgetcast storage-credits modecast storage-credits set-budgetcast storage-credits set-modecast storage-rootcast tempocast tempo logincast tip20-tokencast tip20-token createcast tip20-token logo-checkcast tip20-token logo-setcast tip20-token minecast tip403cast tip403 blacklistcast tip403 checkcast tip403 createcast tip403 infocast tip403 whitelistcast to-check-sum-addresscast to-utf8cast tracecast tx-poolcast tx-pool contentcast tx-pool content-fromcast tx-pool inspectcast tx-pool statuscast virtual-addresscast virtual-address createcast virtual-address resolvecast virtual-address watchcast wallet addresscast wallet change-passwordcast wallet decrypt-keystorecast wallet derivecast wallet importcast wallet listcast wallet newcast wallet new-mnemoniccast wallet private-keycast wallet public-keycast wallet removecast wallet sessioncast wallet session createcast wallet session revokecast wallet signcast wallet sign-authcast wallet vanitycast wallet verifyWallet Commands\n\nExample:\n```text\n$ cast wallet list --help\n```\n\nExample:\n```text\nUsage: cast wallet list [OPTIONS]\n\nOptions:\n      --dir [<DIR>]\n          List all the accounts in the keystore directory. Default keystore\n          directory is used if no path provided\n\n  -l, --ledger\n          List accounts from a Ledger hardware wallet\n\n  -t, --trezor\n          List accounts from a Trezor hardware wallet\n\n      --aws\n          List accounts from AWS KMS.\n          \n          Ensure either one of AWS_KMS_KEY_IDS (comma-separated) or\n          AWS_KMS_KEY_ID environment variables are set.\n\n      --gcp\n          List accounts from Google Cloud KMS.\n          \n          Ensure the following environment variables are set: GCP_PROJECT_ID,\n          GCP_LOCATION, GCP_KEY_RING, GCP_KEY_NAME, GCP_KEY_VERSION.\n          \n          See: [https://cloud.google.com/kms/docs](https://cloud.google.com/kms/docs)\n\n      --turnkey\n          List accounts from Turnkey\n\n      --all\n          List all configured accounts\n\n  -m, --max-senders <MAX_SENDERS>\n          Max number of addresses to display from hardware wallets\n          \n          [default: 3]\n\n  -h, --help\n          Print help (see a summary with '-h')\n\n  -j, --threads <THREADS>\n          Number of threads to use. Specifying 0 defaults to the number of\n          logical cores\n          \n          [alias: --jobs]\n\n      --profile <PROFILE>\n          The configuration profile to use\n\nDisplay options:\n      --color <COLOR>\n          The color of the log messages\n\n          Possible values:\n          - auto:   Intelligently guess whether to use color output (default)\n          - always: Force color output\n          - never:  Force disable color output\n\n      --json\n          Format log messages as JSON\n\n      --md\n          Format log messages as Markdown\n\n  -q, --quiet\n          Do not print log messages\n\n  -v, --verbosity...\n          Verbosity level of the log messages.\n          \n          Pass multiple times to increase the verbosity (e.g. -v, -vv, -vvv).\n          \n          Depending on the context the verbosity levels have different meanings.\n          \n          For example, the verbosity levels of the EVM are:\n          - 2 (-vv): Print logs for all tests.\n          - 3 (-vvv): Print execution traces for failing tests.\n          - 4 (-vvvv): Print execution traces for all tests, and setup traces\n          for failing tests.\n          - 5 (-vvvvv): Print execution and setup traces for all tests,\n          including storage changes and\n            backtraces with line numbers.\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:15:13.309Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":2,"totalLines":95,"estimatedTokens":1347}}12{"id":"doc-vs_title_type_html_read_values_that_you_iterate_-c06b1123","source":"documentation","title":"` vs `<title type=\"html\">`). Read values that you iterate, or that may carry attributes, defensively: ```ts const entries = [feed.entry ?? []].flat(); // an array either way const title = typeof e.title === \"string\" ? e.title : (e.title[\"#text\"] ?? \"\"); ``` The tree shape has neither ambiguity: `children` is an array and each element is an object. #### Input types and encodings `XML.parse` accepts a string, or bytes as a `Buffer`, `TypedArray`, `DataView`, `ArrayBuffer`, or `Blob`. A string is already-decoded text, so its `encoding` declaration is checked for syntax but otherwise ignored. Bytes are decoded per the XML rules: a byte-order mark or the `encoding` in `<?xml version=\"1.0\" encoding=\"...\"?>` selects UTF-8 (the default), UTF-16 (either byte order), or ISO-8859-1. Other encodings throw. ```ts XML.parse(await Bun.file(\"feed.xml\").bytes()); ``` #### Error handling `Bun.XML.parse()` throws a `SyntaxError` when the document is not well-formed (there is no lenient mode), and a `RangeError` for pathologically deep nesting: ```ts try { XML.parse(\"<a><b></a>\"); } catch (error) { console.error(error.message); // \"XML Parse error: Expected closing tag </b> but found </a>\" } ``` ### `Bun.XML.stringify()` Serialize one element, in either shape, to XML. ```ts import { XML } from \"bun\"; XML.stringify({ order: { \"@id\": \"A1\", customer: \"Ada\", item: [{ \"@sku\": \"tea\", \"#text\": \"Green tea\" }, { \"@sku\": \"mug\" }], paid: null, }, }); // '<order id=\"A1\"><customer>Ada</customer><item sku=\"tea\">Green tea</item><item sku=\"mug\"/><paid/></order>' XML.stringify({ name: \"p\", attributes: { class: \"lead\" }, children: [\"Hello \", { name: \"b\", children: [\"world\"] }, \"!\", { comment: \" draft \" }], }); // '<p class=\"lead\">Hello <b>world</b>!<!-- draft --></p>' ``` Bun writes a value as a tree node when it has a string `name` and a `children` or `attributes` property. Inside `children`, an object with `name` is an element, one with `comment` is a comment, and one with `target` is a processing instruction. Anything else is a compact object with one key naming the root element. Bun writes keys in order, `@`-keys as attributes. Strings, numbers, booleans and bigints become text via `String()`, and a `Date` becomes its ISO string. `null` becomes an empty element. Bun skips `undefined`, functions and symbols, as `JSON.stringify` does. An array is one element per item. The output is well-formed XML, or `stringify` throws. Bun escapes `&`, `<` and `>`. It writes `\"`, tabs and newlines in attribute values, and carriage returns anywhere, as character references so they parse back unchanged. Values XML cannot hold produce an error rather than a broken document: element and attribute names that are not XML names (`\"first name\"`, `\"0\"`), characters outside XML's repertoire (U+0000 and other control characters, unpaired surrogates — XML 1.0 has no escape for these), `--` inside a comment, `?>` inside a processing instruction, an array at the root or inside another array, and circular structures. The result is the element only, with no `<?xml …?>` declaration and no DOCTYPE, so you can concatenate results inside an enclosing element. To write a file, prepend the prolog yourself: ```ts await Bun.write( \"Info.plist\", `<?xml version=\"1.0\" encoding=\"UTF-8\"?>\\n` + `<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\\n` + XML.stringify(plist, null, \"\\t\"), ); ``` #### Pretty printing Pass a `space` argument (a number of spaces or an indent string, as with `JSON.stringify`) to indent element-only content. Bun writes an element that contains text on one line, so indentation does not change character data: ```ts console.log(XML.stringify(data, null, 2)); // <order id=\"A1\" currency=\"USD\"> // <customer>Ada</customer> // <item sku=\"tea\" qty=\"2\">Green tea</item> // <item sku=\"mug\" qty=\"1\">Mug</item> // <paid/> // </order> ``` The second parameter is reserved; pass `null` or `undefined`. For a value that `XML.parse` produced, in either shape, `XML.parse(XML.stringify(value))` gives back an equal value. --- ## Module Import ### ES Modules You can import XML files directly. Bun decodes the file like bytes passed to `XML.parse` (UTF-8, UTF-16, or ISO-8859-1 per the byte-order mark or declaration). The module's value is the compact object described above: ```xml config.xml <?xml version=\"1.0\" encoding=\"UTF-8\"?> <config env=\"production\"> <database host=\"localhost\" port=\"5432\" name=\"myapp\"/> <feature name=\"auth\"/> <feature name=\"rateLimit\"/> </config> ``` #### Default Import ```ts app.ts icon=\"/icons/typescript.svg\" import doc from \"./config.xml\"; console.log(doc.config[\"@env\"]); // \"production\" console.log(doc.config.database[\"@host\"]); // \"localhost\" console.log(doc.config.feature.map(f => f[\"@name\"])); // [\"auth\", \"rateLimit\"] ``` #### Named Import The root element is also available as a named import: ```ts app.ts icon=\"/icons/typescript.svg\" import { config } from \"./config.xml\"; console.log(config.database[\"@port\"]); // \"5432\" ``` ### CommonJS ```ts app.ts icon=\"/icons/typescript.svg\" const { config } = require(\"./config.xml\"); console.log(config.database[\"@name\"]); // \"myapp\" ``` ### Import Attributes Use `with { type: \"xml\" }` to parse a file with another extension as XML: ```ts import feed from \"./export.rss\" with { type: \"xml\" }; ``` --- ## Hot Reloading with XML When you run your application with `bun --hot`, Bun reloads XML files when they change: ```ts server.ts icon=\"/icons/typescript.svg\" import { config } from \"./config.xml\"; Bun.serve({ port: 3000, fetch(req) { return new Response(`Running in ${config[\"@env\"]} against ${config.database[\"@host\"]}`); }, }); ``` ```bash terminal icon=\"terminal\" bun --hot server.ts ``` --- ## Bundler Integration When you bundle with Bun, the bundler parses imported XML files at build time and inlines them as JavaScript objects: ```bash terminal icon=\"terminal\" bun build app.ts --outdir=dist ``` Parsing at build time means: - Zero runtime XML parsing overhead in production - Smaller bundle sizes - Tree shaking of unused properties ### Dynamic Imports You can import XML files dynamically: ```ts const { default: doc } = await import(\"./config.xml\"); ``` --- ## Conformance Bun's XML parser is written in Rust and implements [XML 1.0 (Fifth Edition)](https://www.w3.org/TR/2008/REC-xml-20081126/) as a non-validating processor that does not read external entities: - The whole document, including the internal DTD subset, must be well-formed — anything else throws a `SyntaxError`. - The parser expands internal entities declared in the document, with expansion limits so \"billion laughs\" payloads fail instead of exhausting memory. It normalizes attribute values and applies attribute defaults declared in the internal subset. - The parser does not fetch or read external DTDs or external entities, so there is no XXE surface. In a document with no DTD, a reference to an undeclared entity is an error. When the DOCTYPE points at an external subset (or uses parameter entities) that could have declared the entity, the parser keeps the reference as written (` ` stays ` `), unless the document says `standalone=\"yes\"`. - The parser validates nothing against the DTD. It does not resolve namespaces and keeps prefixed names verbatim. The parser is run against the [W3C XML Conformance Test Suite](https://www.w3.org/XML/Test/). All 1,679 cases that have a required outcome for this class of processor pass: the parser rejects not-well-formed documents and accepts well-formed ones. Where the suite gives a canonical output, the element tree of a well-formed document (processing instructions included) matches it byte for byte. The [translated test suite](https://github.com/oven-sh/bun/blob/main/test/js/bun/xml/xml-test-suite.test.ts) lists every case, including the ones whose outcome legitimately depends on not reading external entities. --- ## Performance The parser works in two stages, like Bun's JSON parser. A SIMD pass (runtime-dispatched AVX2/AVX-512/NEON/SVE kernels) finds the bytes that can change the parse, so the parser never scans character data, attribute values, comments and CDATA sections a byte at a time. Element and attribute names reuse JavaScriptCore's atom-string cache the same way `JSON.parse` does. [`bench/xml/xml.mjs`](https://github.com/oven-sh/bun/blob/main/bench/xml/xml.mjs) compares `Bun.XML.parse` with popular npm parsers on the same documents (lower is better; Linux x64, one core): | Document | `Bun.XML.parse` | txml | fast-xml-parser | @xmldom/xmldom | xml2js | | ----------------------------------- | --------------: | -----: | --------------: | -------------: | -----: | | S3 `ListObjectsV2` response, 231 KB | **1.1 ms** | 4.0 ms | 23 ms | 31 ms | 19 ms | | Atom feed, 193 KB | **1.1 ms** | 3.7 ms | 19 ms | 23 ms | 16 ms | | libphonenumber metadata, 960 KB | **5.3 ms** | 9.6 ms | 56 ms | 53 ms | — | | Chromium `enums.xml`, 1.4 MB | **16 ms** | 41 ms | 150 ms | 103 ms | — | | freedesktop MIME database, 2.2 MB | **27 ms** | 56 ms | 299 ms | 280 ms | — |","url":"https://bun.sh/docs/runtime/xml.md","text":"New in Bun v1.4\n\nAda Green tea Mug\n\n` and `` are the same thing in XML. - Any other element becomes an object. It has a `\"@name\"` key per attribute, then one key per distinct child element name and a `\"#text\"` key for the element's own text, in the order each first appears. - When a child element name occurs more than once in the element, its key holds an array in document order. Otherwise it holds the single value. See [One or many](#one-or-many). - `compact` chooses a structure; it does not change values. Bun returns text as , trailing and internal whitespace included, CDATA sections and entity references expanded, line ends normalized to `\\n` — the same text the tree shape gives for that element. Because an element has one `\"#text\"`, Bun concatenates its text runs and leaves out whitespace-only runs that sit between child elements (the document's layout). If your documents are hand-formatted (`\\n value\\n`), trim where you read. - All values are strings. Nothing is coerced to numbers, booleans, or `null`. - Names are kept as written, namespace prefix included (`\"soap:Body\"`); `xmlns` declarations are ordinary attributes. - Comments, processing instructions, the `` declaration and the `` are not represented. `@` and `#` cannot start an XML name, so attribute and text keys do not collide with child element keys. The compact shape is for _data_. It does not keep the relative order of differently named siblings, or where text sat relative to child elements: ```ts XML.parse(`Hello world!`); // { p: { \"#text\": \"Hello !\", b: \"world\" } } ``` When that matters — documents rather than data — pass `{ }` to get the root element as a tree that keeps the element's content in document order: ```ts const p = XML.parse(`Hello world!`, { }); console.log(p); // { // name: \"p\", // attributes: { class: \"lead\" }, // children: [ // \"Hello \", // { name: \"b\", attributes: {}, children: [\"world\"] }, // \"!\", // { comment: \" draft \" }, // ], // } ``` Every element is `{ name, attributes, children }`; both keys are present even when empty. `children` holds the element's content in as strings (as written, whitespace-only runs included, adjacent text merged), child elements, comments as `{ comment }`, and processing instructions as `{ target, data }`. Tell object children apart by which key they have. As in the compact shape, the tree does not represent the declaration, the DOCTYPE, or anything before or after the root element. #### One or many In the compact shape a list of one and a list of two have different types (`entry: {…}` vs `entry: [{…}, {…}]`). An element that is usually a string also becomes an object when it carries an attribute (`` vs `<title type=\"html\">`). Read values that you iterate, or that may carry attributes, defensively: ```ts const entries = [feed.entry ?? []].flat(); // an array either way const title = typeof e.title === \"string\" ? e.title : (e.title[\"#text\"] ?? \"\"); ``` The tree shape has neither ambiguity: `children` is an array and each element is an object. #### Input types and encodings `XML.parse` accepts a string, or bytes as a `Buffer`, `TypedArray`, `DataView`, `ArrayBuffer`, or `Blob`. A string is already-decoded text, so its `encoding` declaration is checked for syntax but otherwise ignored. Bytes are decoded per the XML byte-order mark or the `encoding` in `<?xml version=\"1.0\" encoding=\"...\"?>` selects UTF-8 (the default), UTF-16 (either byte order), or ISO-8859-1. Other encodings throw. ```ts XML.parse(await Bun.file(\"feed.xml\").bytes()); ``` #### Error handling `Bun.XML.parse()` throws a `SyntaxError` when the document is not well-formed (there is no lenient mode), and a `RangeError` for pathologically deep nesting: ```ts try { XML.parse(\"<a><b></a>\"); } catch (error) { console.error(error.message); // \"XML Parse closing tag </b> but found </a>\" } ``` ### `Bun.XML.stringify()` Serialize one element, in either shape, to XML. ```ts import { XML } from \"bun\"; XML.stringify({ order: { \"@id\": \"A1\", customer: \"Ada\", item: [{ \"@sku\": \"tea\", \"#text\": \"Green tea\" }, { \"@sku\": \"mug\" }], , }, }); // '<order id=\"A1\"><customer>Ada</customer><item sku=\"tea\">Green tea</item><item sku=\"mug\"/><paid/></order>' XML.stringify({ name: \"p\", attributes: { class: \"lead\" }, children: [\"Hello \", { name: \"b\", children: [\"world\"] }, \"!\", { comment: \" draft \" }], }); // '<p class=\"lead\">Hello <b>world</b>!<!-- draft --></p>' ``` Bun writes a value as a tree node when it has a string `name` and a `children` or `attributes` property. Inside `children`, an object with `name` is an element, one with `comment` is a comment, and one with `target` is a processing instruction. Anything else is a compact object with one key naming the root element. Bun writes keys in order, `@`-keys as attributes. Strings, numbers, booleans and bigints become text via `String()`, and a `Date` becomes its ISO string. `null` becomes an empty element. Bun skips `undefined`, functions and symbols, as `JSON.stringify` does. An array is one element per item. The output is well-formed XML, or `stringify` throws. Bun escapes `&`, `<` and `>`. It writes `\"`, tabs and newlines in attribute values, and carriage returns anywhere, as character references so they parse back unchanged. Values XML cannot hold produce an error rather than a broken and attribute names that are not XML names (`\"first name\"`, `\"0\"`), characters outside XML's repertoire (U+0000 and other control characters, unpaired surrogates — XML 1.0 has no escape for these), `--` inside a comment, `?>` inside a processing instruction, an array at the root or inside another array, and circular structures. The result is the element only, with no `<?xml …?>` declaration and no DOCTYPE, so you can concatenate results inside an enclosing element. To write a file, prepend the prolog yourself: ```ts await Bun.write( \"Info.plist\", `<?xml version=\"1.0\" encoding=\"UTF-8\"?>\\n` + `<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\\n` + XML.stringify(plist, null, \"\\t\"), ); ``` #### Pretty printing Pass a `space` argument (a number of spaces or an indent string, as with `JSON.stringify`) to indent element-only content. Bun writes an element that contains text on one line, so indentation does not change character data: ```ts console.log(XML.stringify(data, null, 2)); // <order id=\"A1\" currency=\"USD\"> // <customer>Ada</customer> // <item sku=\"tea\" qty=\"2\">Green tea</item> // <item sku=\"mug\" qty=\"1\">Mug</item> // <paid/> // </order> ``` The second parameter is reserved; pass `null` or `undefined`. For a value that `XML.parse` produced, in either shape, `XML.parse(XML.stringify(value))` gives back an equal value. --- ## Module Import ### ES Modules You can import XML files directly. Bun decodes the file like bytes passed to `XML.parse` (UTF-8, UTF-16, or ISO-8859-1 per the byte-order mark or declaration). The module's value is the compact object described above: ```xml config.xml <?xml version=\"1.0\" encoding=\"UTF-8\"?> <config env=\"production\"> <database host=\"localhost\" port=\"5432\" name=\"myapp\"/> <feature name=\"auth\"/> <feature name=\"rateLimit\"/> </config> ``` #### Default Import ```ts app.ts icon=\"/icons/typescript.svg\" import doc from \"./config.xml\"; console.log(doc.config[\"@env\"]); // \"production\" console.log(doc.config.database[\"@host\"]); // \"localhost\" console.log(doc.config.feature.map(f => f[\"@name\"])); // [\"auth\", \"rateLimit\"] ``` #### Named Import The root element is also available as a named import: ```ts app.ts icon=\"/icons/typescript.svg\" import { config } from \"./config.xml\"; console.log(config.database[\"@port\"]); // \"5432\" ``` ### CommonJS ```ts app.ts icon=\"/icons/typescript.svg\" const { config } = require(\"./config.xml\"); console.log(config.database[\"@name\"]); // \"myapp\" ``` ### Import Attributes Use `with { type: \"xml\" }` to parse a file with another extension as XML: ```ts import feed from \"./export.rss\" with { type: \"xml\" }; ``` --- ## Hot Reloading with XML When you run your application with `bun --hot`, Bun reloads XML files when they change: ```ts server.ts icon=\"/icons/typescript.svg\" import { config } from \"./config.xml\"; Bun.serve({ , fetch(req) { return new Response(`Running in ${config[\"@env\"]} against ${config.database[\"@host\"]}`); }, }); ``` ```bash terminal icon=\"terminal\" bun --hot server.ts ``` --- ## Bundler Integration When you bundle with Bun, the bundler parses imported XML files at build time and inlines them as JavaScript objects: ```bash terminal icon=\"terminal\" bun build app.ts --outdir=dist ``` Parsing at build time Zero runtime XML parsing overhead in production - Smaller bundle sizes - Tree shaking of unused properties ### Dynamic Imports You can import XML files dynamically: ```ts const { } = await import(\"./config.xml\"); ``` --- ## Conformance Bun's XML parser is written in Rust and implements [XML 1.0 (Fifth Edition)](https://www.w3.org/TR/2008/REC-xml-20081126/) as a non-validating processor that does not read external The whole document, including the internal DTD subset, must be well-formed — anything else throws a `SyntaxError`. - The parser expands internal entities declared in the document, with expansion limits so \"billion laughs\" payloads fail instead of exhausting memory. It normalizes attribute values and applies attribute defaults declared in the internal subset. - The parser does not fetch or read external DTDs or external entities, so there is no XXE surface. In a document with no DTD, a reference to an undeclared entity is an error. When the DOCTYPE points at an external subset (or uses parameter entities) that could have declared the entity, the parser keeps the reference as written (` ` stays ` `), unless the document says `standalone=\"yes\"`. - The parser validates nothing against the DTD. It does not resolve namespaces and keeps prefixed names verbatim. The parser is run against the [W3C XML Conformance Test Suite](https://www.w3.org/XML/Test/). All 1,679 cases that have a required outcome for this class of processor parser rejects not-well-formed documents and accepts well-formed ones. Where the suite gives a canonical output, the element tree of a well-formed document (processing instructions included) matches it byte for byte. The [translated test suite](https://github.com/oven-sh/bun/blob/main/test/js/bun/xml/xml-test-suite.test.ts) lists every case, including the ones whose outcome legitimately depends on not reading external entities. --- ## Performance The parser works in two stages, like Bun's JSON parser. A SIMD pass (runtime-dispatched AVX2/AVX-512/NEON/SVE kernels) finds the bytes that can change the parse, so the parser never scans character data, attribute values, comments and CDATA sections a byte at a time. Element and attribute names reuse JavaScriptCore's atom-string cache the same way `JSON.parse` does. [`bench/xml/xml.mjs`](https://github.com/oven-sh/bun/blob/main/bench/xml/xml.mjs) compares `Bun.XML.parse` with popular npm parsers on the same documents (lower is better; Linux x64, one core): | Document | `Bun.XML.parse` | txml | fast-xml-parser | @xmldom/xmldom | xml2js | | ----------------------------------- | --------------: | -----: | --------------: | -------------: | -----: | | S3 `ListObjectsV2` response, 231 KB | **1.1 ms** | 4.0 ms | 23 ms | 31 ms | 19 ms | | Atom feed, 193 KB | **1.1 ms** | 3.7 ms | 19 ms | 23 ms | 16 ms | | libphonenumber metadata, 960 KB | **5.3 ms** | 9.6 ms | 56 ms | 53 ms | — | | Chromium `enums.xml`, 1.4 MB | **16 ms** | 41 ms | 150 ms | 103 ms | — | | freedesktop MIME database, 2.2 MB | **27 ms** | 56 ms | 299 ms | 280 ms | — |\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:15:13.558Z","totalSectionsIncluded":3,"totalCodeBlocksIncluded":0,"totalLines":7,"estimatedTokens":2904}}13{"id":"doc-envor_foundry_ethereum_development_framework-36346afa","source":"documentation","title":"envOr – foundry - Ethereum Development Framework","url":"https://book.getfoundry.sh/reference/cheatcodes/env-or","text":"Example:\n```text\nfunction envOr(string calldata key, bool defaultValue) external returns (bool value);\nfunction envOr(string calldata key, uint256 defaultValue) external returns (uint256 value);\nfunction envOr(string calldata key, int256 defaultValue) external returns (int256 value);\nfunction envOr(string calldata key, address defaultValue) external returns (address value);\nfunction envOr(string calldata key, bytes32 defaultValue) external returns (bytes32 value);\nfunction envOr(string calldata key, string calldata defaultValue) external returns (string memory value);\nfunction envOr(string calldata key, bytes calldata defaultValue) external returns (bytes memory value);\nfunction envOr(string calldata key, string calldata delimiter, bool[] calldata defaultValue) external returns (bool[] memory value);\nfunction envOr(string calldata key, string calldata delimiter, uint256[] calldata defaultValue) external returns (uint256[] memory value);\nfunction envOr(string calldata key, string calldata delimiter, int256[] calldata defaultValue) external returns (int256[] memory value);\nfunction envOr(string calldata key, string calldata delimiter, address[] calldata defaultValue) external returns (address[] memory value);\nfunction envOr(string calldata key, string calldata delimiter, bytes32[] calldata defaultValue) external returns (bytes32[] memory value);\nfunction envOr(string calldata key, string calldata delimiter, string[] calldata defaultValue) external returns (string[] memory value);\nfunction envOr(string calldata key, string calldata delimiter, bytes[] calldata defaultValue) external returns (bytes[] memory value);\n```\n\nExample:\n```text\nbool fork = vm.envOr(\"FORK\", false);\n```\n\nExample:\n```text\naddress owner;\n \nfunction setUp() {\n    owner = vm.envOr(\"OWNER\", address(this));\n}\n```\n\nExample:\n```text\naddress[] badTokens;\n \nfunction envBadTokens() public {\n    badTokens = vm.envOr(\"BAD_TOKENS\", \",\", badTokens);\n}\n```\n\nExample:\n```text\nfunction envBadTokens() public {\n    address[] memory defaultBadTokens = new address[](0);\n    address[] memory badTokens = vm.envOr(\"BAD_TOKENS\", \",\", defaultBadTokens);\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:15:13.321Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":5,"totalLines":50,"estimatedTokens":538}}14{"id":"doc-cast_from_bin_foundry_ethereum_development_frame-f2703383","source":"documentation","title":"cast from-bin – foundry - Ethereum Development Framework","url":"https://book.getfoundry.sh/reference/cast/from-bin","text":"ReferencecastABI CommandsAccount CommandsBlock CommandsChain CommandsConversion Commandscast format-bytes32-stringcast from-bincast from-fixed-pointcast from-rlpcast from-utf8cast from-weicast parse-bytes32-addresscast parse-bytes32-stringcast shlcast shrcast to-asciicast to-basecast to-bytes-memorycast to-bytes32cast to-deccast to-fixed-pointcast to-hexcast to-hexdatacast to-int256cast to-rlpcast to-uint256cast to-unitcast to-weiENS CommandsEtherscan CommandsGeneral CommandsTransaction CommandsUtility CommandsWallet Commands\n\nExample:\n```text\n$ cast from-bin --help\n```\n\nExample:\n```text\nUsage: cast from-bin [OPTIONS]\n\nOptions:\n  -h, --help\n          Print help (see a summary with '-h')\n\n  -j, --threads <THREADS>\n          Number of threads to use. Specifying 0 defaults to the number of\n          logical cores\n          \n          [alias: --jobs]\n\n      --profile <PROFILE>\n          The configuration profile to use\n\nDisplay options:\n      --color <COLOR>\n          The color of the log messages\n\n          Possible values:\n          - auto:   Intelligently guess whether to use color output (default)\n          - always: Force color output\n          - never:  Force disable color output\n\n      --json\n          Format log messages as JSON\n\n      --md\n          Format log messages as Markdown\n\n  -q, --quiet\n          Do not print log messages\n\n  -v, --verbosity...\n          Verbosity level of the log messages.\n          \n          Pass multiple times to increase the verbosity (e.g. -v, -vv, -vvv).\n          \n          Depending on the context the verbosity levels have different meanings.\n          \n          For example, the verbosity levels of the EVM are:\n          - 2 (-vv): Print logs for all tests.\n          - 3 (-vvv): Print execution traces for failing tests.\n          - 4 (-vvvv): Print execution traces for all tests, and setup traces\n          for failing tests.\n          - 5 (-vvvvv): Print execution and setup traces for all tests,\n          including storage changes and\n            backtraces with line numbers.\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:15:13.326Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":2,"totalLines":60,"estimatedTokens":517}}15{"id":"doc-cql_commands_apache_cassandra_documentation-2c205cf7","source":"documentation","title":"CQL Commands | Apache Cassandra Documentation","url":"https://cassandra.apache.org/doc/latest/cassandra/reference/cql-commands/commands-toc.html","text":"Get Started Cassandra Basics Quickstart Ecosystem Documentation Community Welcome Discussions Governance Contribute Meet the Community Catalyst Program Events Learn Cassandra 5.0 Case Studies Resources Blog Download Now\n\nwebsite 7.0 6.0 6.0-alpha2 5.0.9 5.0.8 5.0 4.1 4.0 3.11 Main Glossary How to report bugs Contact us Development Getting started Building and IDE integration Testing Contributing code changes Code style Review checklist How to commit Working on documentation Jenkins CI environment Dependency management Release process Cassandra FAQ Getting Started Cassandra Quickstart SAI Quickstart Vector Search Quickstart Installing Cassandra Configuring Cassandra Inserting and querying Client drivers Production recommendations What’s new Support for Java Architecture Overview Dynamo Storage Engine Guarantees Improved Internode Messaging Improved Streaming Data Modeling Introduction Conceptual data modeling RDBMS design Defining application queries Logical data modeling Physical data modeling Evaluating and refining data models Defining database schema Cassandra data modeling tools Cassandra Query Language (CQL) Definitions Data types Data definition (DDL) Data manipulation (DML) Dynamic Data Masking (DDM) Operators Indexing concepts SAI Overview Concepts SAI Quickstart SAI FAQ Working with SAI SAI operations Secondary indexes (2i) overview Concepts Working with 2i Rebuild 2i Materialized views Functions JSON Security Triggers Appendices Changes SASI Single file of CQL information Vector Search overview Concepts Vector Modeling Vector Search Quickstart Working with Vector Search Managing Configuring cassandra.yaml cassandra-rackdc.properties cassandra-env.sh cassandra-topologies.properties commitlog-archiving.properties logback.xml jvm-* files Liberating cassandra.yaml Parameters' Names from Their Units Operating Auto Repair Backups Bloom filters Bulk loading Change Data Capture (CDC) Compaction Compression Hardware Hints Logging Audit logging Audit logging 2 Full query logging Monitoring metrics Repair Read repair Security Snitches Topology changes Transient replication Virtual tables Tools CQL shell nodetool SSTable tools cassandra-stress Troubleshooting Finding misbehaving nodes Reading Cassandra logs Using nodetool Using external tools to deep-dive Reference CQL commands CQL specification Java 17 Native Protocol specification SAI virtual table Static columns Vector data type Plug-ins You are viewing the documentation for a prerelease version. View Latest Cassandra Reference CQL commands Edit CQL Commands This section describes the Cassandra Query Language (CQL) commands supported by the Apache Cassandra database. ALTER KEYSPACE Changes keyspace replication strategy and enables or disables commit log. ALTER MATERIALIZED VIEW Changes the table properties of a materialized view. ALTER ROLE Changes password and sets superuser or login options. ALTER TABLE Modifies the columns and properties of a table, or modify ALTER TYPE Modifies an existing user-defined type (UDT). ALTER USER (Deprecated) Deprecated. Alter existing user options. BATCH Applies multiple data modification language (DML) statements with atomicity and/or in isolation. CREATE AGGREGATE Defines a user-defined aggregate. CREATE CUSTOM INDEX Creates a storage-attached index. CREATE FUNCTION Creates custom function to execute user provided code. CREATE INDEX Defines a new index for a single column of a table. CREATE KEYSPACE CREATE MATERIALIZED VIEW Optimizes read requests and eliminates the need for multiple write requests by duplicating data from a base table. CREATE ROLE Creates a cluster wide database object used for access control. CREATE TABLE Creates a new table. CREATE TYPE Creates a custom data type in the keyspace that contains one or more fields of related information. CREATE USER (Deprecated) Deprecated. Creates a new user. DELETE Removes data from one or more columns or removes the entire row DROP AGGREGATE Deletes a user-defined aggregate from a keyspace. DROP FUNCTION Deletes a user-defined function (UDF) from a keyspace. DROP INDEX Removes an index from a table. DROP KEYSPACE Removes the keyspace. DROP MATERIALIZED VIEW Removes the named materialized view. DROP ROLE Removes a role. DROP TABLE Removes the table. DROP TYPE Drop a user-defined type. DROP USER (Deprecated) Removes a user. GRANT Allow access to database resources. INSERT Inserts an entire row or upserts data into existing rows. LIST PERMISSIONS Lists permissions on resources. LIST ROLES Lists roles and shows superuser and login status. LIST USERS (Deprecated) Lists existing internal authentication users and their superuser status. REVOKE Removes privileges on database objects from roles. SELECT Returns data from a table. TRUNCATE Removes all data from a table. UPDATE Modifies one or more column values to a row in a table. USE Selects the keyspace for the current client session.\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:15:14.031Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":0,"totalLines":5,"estimatedTokens":1231}}16{"id":"doc-frequently_asked_questions_apache_cassandra_docu-81152eb9","source":"documentation","title":"Frequently Asked Questions | Apache Cassandra Documentation","url":"https://cassandra.apache.org/doc/latest/cassandra/overview/faq/index.html","text":"Get Started Cassandra Basics Quickstart Ecosystem Documentation Community Welcome Discussions Governance Contribute Meet the Community Catalyst Program Events Learn Cassandra 5.0 Case Studies Resources Blog Download Now\n\nwebsite 7.0 6.0 6.0-alpha2 5.0.9 5.0.8 5.0 4.1 4.0 3.11 Main Glossary How to report bugs Contact us Development Getting started Building and IDE integration Testing Contributing code changes Code style Review checklist How to commit Working on documentation Jenkins CI environment Dependency management Release process Cassandra FAQ Getting Started Cassandra Quickstart SAI Quickstart Vector Search Quickstart Installing Cassandra Configuring Cassandra Inserting and querying Client drivers Production recommendations What’s new Support for Java Architecture Overview Dynamo Storage Engine Guarantees Improved Internode Messaging Improved Streaming Data Modeling Introduction Conceptual data modeling RDBMS design Defining application queries Logical data modeling Physical data modeling Evaluating and refining data models Defining database schema Cassandra data modeling tools Cassandra Query Language (CQL) Definitions Data types Data definition (DDL) Data manipulation (DML) Dynamic Data Masking (DDM) Operators Indexing concepts SAI Overview Concepts SAI Quickstart SAI FAQ Working with SAI SAI operations Secondary indexes (2i) overview Concepts Working with 2i Rebuild 2i Materialized views Functions JSON Security Triggers Appendices Changes SASI Single file of CQL information Vector Search overview Concepts Vector Modeling Vector Search Quickstart Working with Vector Search Managing Configuring cassandra.yaml cassandra-rackdc.properties cassandra-env.sh cassandra-topologies.properties commitlog-archiving.properties logback.xml jvm-* files Liberating cassandra.yaml Parameters' Names from Their Units Operating Auto Repair Backups Bloom filters Bulk loading Change Data Capture (CDC) Compaction Compression Hardware Hints Logging Audit logging Audit logging 2 Full query logging Monitoring metrics Repair Read repair Security Snitches Topology changes Transient replication Virtual tables Tools CQL shell nodetool SSTable tools cassandra-stress Troubleshooting Finding misbehaving nodes Reading Cassandra logs Using nodetool Using external tools to deep-dive Reference CQL commands CQL specification Java 17 Native Protocol specification SAI virtual table Static columns Vector data type Plug-ins You are viewing the documentation for a prerelease version. View Latest Cassandra FAQ Edit Frequently Asked Questions Why can’t I set listen_address to listen on 0.0.0.0 (all my addresses)? Cassandra is a gossip-based distributed system and listen_address is the address a node tells other nodes to reach it at. Telling other nodes \"contact me on any of my addresses\" is a bad idea; if different nodes in the cluster pick different addresses for you, Bad Things happen. If you don’t want to manually specify an IP to listen_address for each node in your cluster (understandable!), leave it blank and Cassandra will use InetAddress.getLocalHost() to pick an address. Then it’s up to you or your ops team to make things resolve correctly (/etc/hosts/, dns, etc). One exception to this process is JMX, which by default binds to 0.0.0.0 (Java bug 6425769). See 256 and 43 for more gory details. What ports does Cassandra use? By default, Cassandra uses 7000 for cluster communication (7001 if SSL is enabled), 9042 for native protocol clients, and 7199 for JMX. The internode communication and native protocol ports are configurable in the cassandra-yaml. The JMX port is configurable in cassandra-env.sh (through JVM options). All ports are TCP. What happens to existing data in my cluster when I add new nodes? When a new nodes joins a cluster, it will automatically contact the other nodes in the cluster and copy the right data to itself. See topology-changes. I delete data from Cassandra, but disk usage stays the same. What gives? Data you write to Cassandra gets persisted to SSTables. Since SSTables are immutable, the data can’t actually be removed when you perform a delete, instead, a marker (also called a \"tombstone\") is written to indicate the value’s new status. Never fear though, on the first compaction that occurs between the data and the tombstone, the data will be expunged completely and the corresponding disk space recovered. See compaction for more detail. Why does nodetool ring only show one entry, even though my nodes logged that they see each other joining the ring? This happens when you have the same token assigned to each node. Don’t do that. Most often this bites people who deploy by installing Cassandra on a VM (especially when using the Debian package, which auto-starts Cassandra after installation, thus generating and saving a token), then cloning that VM to other nodes. The easiest fix is to wipe the data and commitlog directories, thus making sure that each node will generate a random token on the next restart. Can I change the replication factor (a a keyspace) on a live cluster? Yes, but it will require running a full repair (or cleanup) to change the replica count of existing <alter-keyspace-statement> the replication factor for desired keyspace (using cqlsh for instance). If you’re reducing the replication factor, run nodetool cleanup on the cluster to remove surplus replicated data. Cleanup runs on a per-node basis. If you’re increasing the replication factor, run nodetool repair -full to ensure data is replicated according to the new configuration. Repair runs on a per-replica set basis. This is an intensive process that may result in adverse cluster performance. It’s highly recommended to do rolling repairs, as an attempt to repair the entire cluster at once will most likely swamp it. Note that you will need to run a full repair (-full) to make sure that already repaired sstables are not skipped. You should use ConsistencyLevel.QUORUM or ALL (depending on your existing replication factor) to make sure that a replica that actually has the data is consulted. Otherwise some clients potentially being told no data exists until repair is done. Can I Store (large) BLOBs in Cassandra? Cassandra isn’t optimized for large file or BLOB storage and a single blob value is always read and send to the client entirely. As such, storing small blobs (less than single digit MB) should not be a problem, but it is advised to manually split large blobs into smaller chunks. Please note in particular that by default, any value greater than 16MiB will be rejected by Cassandra due the max_mutation_size configuration of the cassandra-yaml file (which default to half of commitlog_segment_size, which itself default to 32MiB). Nodetool says \"Connection refused to \" for any remote host. What gives? Nodetool relies on JMX, which in turn relies on RMI, which in turn sets up its own listeners and connectors as needed on each end of the exchange. Normally all of this happens behind the scenes transparently, but incorrect name resolution for either the host connecting, or the one being connected to, can result in crossed wires and confusing exceptions. If you are not using DNS, then make sure that your /etc/hosts files are accurate on both ends. If that fails, try setting the -Djava.rmi.server.hostname=<public name> JVM option near the bottom of cassandra-env.sh to an interface that you can reach from the remote machine. Will batching my operations speed up my bulk load? No. Using batches to load data will generally just add \"spikes\" of latency. Use asynchronous INSERTs instead, or use true bulk-loading. An exception is batching updates to a single partition, which can be a Good Thing (as long as the size of a single batch stay reasonable). But never ever blindly batch everything! On RHEL nodes are unable to join the ring Check if SELinux is on; if it is, turn it off. How do I unsubscribe from the email list? Send an email to user-unsubscribe@cassandra.apache.org. Why does top report that Cassandra is using a lot more memory than the Java heap max? Cassandra uses Memory Mapped Files (mmap) internally. That is, we use the operating system’s virtual memory system to map a number of on-disk files into the Cassandra process' address space. This will \"use\" virtual memory; i.e. address space, and will be reported by tools like top accordingly, but on 64 bit systems virtual address space is effectively unlimited so you should not worry about that. What matters from the perspective of \"memory use\" in the sense as it is normally meant, is the amount of data allocated on brk() or mmap’d /dev/zero, which represent real memory used. The key issue is that for a mmap’d file, there is never a need to retain the data resident in physical memory. Thus, whatever you do keep resident in physical memory is essentially just there as a cache, in the same way as normal I/O will cause the kernel page cache to retain data that you read/write. The difference between normal I/O and mmap() is that in the mmap() case the memory is actually mapped to the process, thus affecting the virtual size as reported by top. The main argument for using mmap() instead of standard I/O is the fact that reading entails just touching memory - in the case of the memory being resident, you just read it - you don’t even take a page fault (so no overhead in entering the kernel and doing a semi-context switch). This is covered in more detail here. What are seeds? Seeds are used during startup to discover the cluster. If you configure your nodes to refer some node as seed, nodes in your ring tend to send Gossip message to seeds more often (also see the section on gossip <gossip>) than to non-seeds. In other words, seeds are worked as hubs of Gossip network. With seeds, each node can detect status changes of other nodes quickly. Seeds are also referred by new nodes on bootstrap to learn other nodes in ring. When you add a new node to ring, you need to specify at least one live seed to contact. Once a node join the ring, it learns about the other nodes, so it doesn’t need seed on subsequent boot. You can make a seed a node at any time. There is nothing special about seed nodes. If you list the node in seed list it is a seed Seeds do not auto bootstrap (i.e. if a node has itself in its seed list it will not automatically transfer data to itself) If you want a node to do that, bootstrap it first and then add it to seeds later. If you have no data (new install) you do not have to worry about bootstrap at all. Recommended usage of two (or more) nodes per data center as seed nodes. sync the seed list to all your nodes Does single seed mean single point of failure? The ring can operate or boot without a seed; however, you will not be able to add new nodes to the cluster. It is recommended to configure multiple seeds in production system. Why can’t I call jmx method X on jconsole? Some of JMX operations use array argument and as jconsole doesn’t support array argument, those operations can’t be called with jconsole (the buttons are inactive for them). You need to write a JMX client to call such operations or need array-capable JMX monitoring tool. Why do I see \"…​ messages dropped …​\" in the logs? This is a symptom of load shedding — Cassandra defending itself against more requests than it can handle. Internode messages which are received by a node, but do not get not to be processed within their proper timeout (see read_request_timeout, write_request_timeout, …​ in the cassandra-yaml), are dropped rather than processed (since the as the coordinator node will no longer be waiting for a response). For writes, this means that the mutation was not applied to all replicas it was sent to. The inconsistency will be repaired by read repair, hints or a manual repair. The write operation may also have timeouted as a result. For reads, this means a read request may not have completed. Load shedding is part of the Cassandra architecture, if this is a persistent issue it is generally a sign of an overloaded node or cluster. Cassandra dies with java.lang.OutOfMemoryError: Map failed If Cassandra is dying specifically with the \"Map failed\" message, it means the OS is denying java the ability to lock more memory. In linux, this typically means memlock is limited. Check /proc/<pid of cassandra>/limits to verify this and raise it (eg, via ulimit in bash). You may also need to increase vm.max_map_count. Note that the debian package handles this for you automatically. What happens if two updates are made with the same timestamp? Updates must be commutative, since they may arrive in different orders on different replicas. As long as Cassandra has a deterministic way to pick the winner (in a timestamp tie), the one selected is as valid as any other, and the specifics should be treated as an implementation detail. That said, in the case of a timestamp tie, Cassandra follows two , deletes take precedence over inserts/updates. Second, if there are two updates, the one with the lexically larger value is selected. Why bootstrapping a new node fails with a \"Stream failed\" error? Two main GC may be creating long pauses disrupting the streaming process compactions happening in the background hold streaming long enough that the TCP connection fails In the first case, regular GC tuning advices apply. In the second case, you need to set TCP keepalive to a lower value (default is very high on Linux). Try to just run the following: $ sudo /sbin/sysctl -w net.ipv4.tcp_keepalive_time=60 net.ipv4.tcp_keepalive_intvl=60 net.ipv4.tcp_keepalive_probes=5 To make those settings permanent, add them to your /etc/sysctl.conf file. 's firewall will always interrupt TCP connections that are inactive for more than 10 min. Running the above command is highly recommended in that environment.\n\nExample:\n```text\n$ sudo /sbin/sysctl -w net.ipv4.tcp_keepalive_time=60 net.ipv4.tcp_keepalive_intvl=60 net.ipv4.tcp_keepalive_probes=5\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:15:14.106Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":1,"totalLines":10,"estimatedTokens":3489}}17{"id":"doc-best_practices_for_general_style_and_structure_t-c89363be","source":"documentation","title":"Best practices for general style and structure | Terraform on Google Cloud | Google Cloud Documentation","url":"https://cloud.google.com/docs/terraform/best-practices-for-terraform","text":"Example:\n```text\nresource \"google_compute_instance\" \"web_server\" {\n  name = \"web-server\"\n}\n```\n\nExample:\n```text\nresource \"google_compute_instance\" \"web-server\" {\n  name = \"web-server\"\n}\n```\n\nExample:\n```text\nresource \"google_compute_global_address\" \"main\" { ... }\n```\n\nExample:\n```text\nresource \"google_compute_global_address\" \"main_global_address\" { … }\n```\n\nExample:\n```text\noutput \"name\" {\n  description = \"Name of instance\"\n  value       = google_compute_instance.main.name\n}\n```\n\nExample:\n```text\noutput \"name\" {\n  description = \"Name of instance\"\n  value       = var.name\n}\n```\n\nExample:\n```text\nresource \"google_sql_database_instance\" \"main\" {\n  name = \"primary-instance\"\n  settings {\n    tier = \"D0\"\n  }\n\n  lifecycle {\n    prevent_destroy = true\n  }\n}\n```\n\nExample:\n```text\nvariable \"readers\" {\n  description = \"...\"\n  type        = list\n  default     = []\n}\n\nresource \"resource_type\" \"reference_name\" {\n  // Do not create this resource if the list of readers is empty.\n  count = length(var.readers) == 0 ? 0 : 1\n  ...\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:15:14.494Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":8,"totalLines":70,"estimatedTokens":262}}18{"id":"doc-license_api_for_cloud_apps-415d899d","source":"documentation","title":"License API for cloud apps","url":"https://developer.atlassian.com/platform/marketplace/license-api-for-cloud-apps","text":"Example:\n```json\n{\n  \"key\": \"example-app\",\n  \"version\": \"1.0\",\n  \"state\": \"ENABLED\",\n  \"host\": {\n      \"product\": \"Jira\",\n      \"contacts\": [\n        {\n            \"name\": \"Example Contact\",\n            \"email\": \"contact@example.com\"\n        }\n      ]\n  },\n  \"license\": {\n      \"active\": true,\n      \"type\": \"COMMERCIAL\",\n      \"evaluation\": false,\n      \"supportEntitlementNumber\": \"SEN-###\"\n  },\n  \"links\": {\n      \"marketplace\": [\n        {\n            \"href\": \"http:// marketplace.atlassian.com/plugins/example-app\"\n        }\n      ],\n      \"self\": [\n        {\n            \"href\": \"http:// example.com/rest/atlassian-connect/latest/example-app\"\n        }\n      ]\n  }\n}\n```\n\nExample:\n```text\n1\n2\n```\n\nExample:\n```json\n{\n    \"key\": \"example-app\",\n    \"version\": \"1.0\",\n    \"state\": \"ENABLED\",\n    \"host\": {\n        \"product\": \"Jira\",\n        \"contacts\": [\n          {\n              \"name\": \"Example Contact\",\n              \"email\": \"contact@example.com\"\n          }\n        ]\n    },\n    \"links\": {\n        \"marketplace\": [\n          {\n              \"href\": \"http:// marketplace.atlassian.com/plugins/example-app\"\n          }\n        ],\n        \"self\": [\n          {\n              \"href\": \"http:// example.com/rest/atlassian-connect/latest/example-app\"\n          }\n        ]\n    }\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:38.248Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":3,"totalLines":73,"estimatedTokens":326}}19{"id":"doc-deepspeed_model_compression_library_deepspeed-d7bd8364","source":"documentation","title":"DeepSpeed Model Compression Library - DeepSpeed","url":"https://www.deepspeed.ai/tutorials/model-compression/","text":"Enter your search term...\n\nExample:\n```text\nDeepSpeedExamples/compression/bert$ pip install -r requirements.txt\nDeepSpeedExamples/compression/bert$ bash bash_script/layer_reduction.sh\n```\n\nExample:\n```text\nEpoch: 18 | Time: 12m 38s\nClean the best model, and the accuracy of the clean model is acc/mm-acc:0.8340295466123281/0.8339096826688365\n```\n\nExample:\n```text\nDeepSpeedExamples/compression/bert$ pip install -r requirements.txt\nDeepSpeedExamples/compression/bert$ bash bash_script/quant_weight.sh\n```\n\nExample:\n```text\nEpoch: 09 | Time: 27m 10s\nClean the best model, and the accuracy of the clean model is acc/mm-acc:0.8414671421293938/0.8422497965825875\n```\n\nExample:\n```text\nDeepSpeedExamples/compression/bert$ pip install -r requirements.txt\nDeepSpeedExamples/compression/bert$ bash bash_script/quant_activation.sh\n```\n\nExample:\n```text\nEpoch: 02 | Time: 28m 50s\nClean the best model, and the accuracy of the clean model is acc/mm-acc:0.8375955170657158/0.8422497965825875\n```\n\nExample:\n```text\nDeepSpeedExamples/compression/bert$ pip install -r requirements.txt\nDeepSpeedExamples/compression/bert$ bash bash_script/pruning_sparse.sh\n```\n\nExample:\n```text\nEpoch: 02 | Time: 26m 14s\nClean the best model, and the accuracy of the clean model is acc/mm-acc:0.8416709118695873/0.8447925142392189\n```\n\nExample:\n```text\nDeepSpeedExamples/compression/bert$ pip install -r requirements.txt\nDeepSpeedExamples/compression/bert$ bash bash_script/pruning_row.sh\n```\n\nExample:\n```text\nEpoch: 02 | Time: 27m 43s\nClean the best model, and the accuracy of the clean model is acc/mm-acc:0.8440142638818136/0.8425549227013832\n```\n\nExample:\n```text\nDeepSpeedExamples/compression/bert$ pip install -r requirements.txt\nDeepSpeedExamples/compression/bert$ bash bash_script/pruning_head.sh\n```\n\nExample:\n```text\nClean the best model, and the accuracy of the clean model is acc/mm-acc:0.8397350993377484/0.8377746135069162\n```\n\nExample:\n```text\npip install torch torchvision\nDeepSpeedExamples/compression/cifar$ bash run_compress.sh\n```\n\nExample:\n```text\nafter_clean\nepoch 10 testing_correct: 0.7664\n```\n\nExample:\n```text\nDeepSpeedExamples/compression/bert$ pip install -r requirements.txt\nDeepSpeedExamples/compression/bert$ bash bash_script/ZeroQuant/zero_quant.sh\n```\n\nExample:\n```text\nClean the best model, and the accuracy of the clean model is acc/mm-acc:0.8427916454406521/0.8453010577705452\n```\n\nExample:\n```text\nDeepSpeedExamples/compression/gpt2$ pip install -r requirements.txt\nDeepSpeedExamples/compression/gpt2$ bash bash_script/run_zero_quant.sh\n```\n\nExample:\n```text\nBefore converting the module COVN1D to linear and init_compression: 19.371443732303174\nBefore cleaning, Epoch at 0 with Perplexity: 19.47031304212775\nAfter cleaning with Perplexity: 19.47031304212775\n```\n\nExample:\n```text\nDeepSpeedExamples/compression/bert$ pip install -r requirements.txt\n```\n\nExample:\n```text\nDeepSpeedExamples/compression/bert$ bash bash_script/XTC/quant_1bit.sh\n```\n\nExample:\n```text\nClean the best model, and the accuracy of the clean model is acc/mm-acc:0.8293428425878757/0.8396053702196908\n```\n\nExample:\n```text\nDeepSpeedExamples/compression/bert$ bash bash_script/XTC/layer_reduction.sh\n```\n\nExample:\n```text\nClean the best model, and the accuracy of the clean model is acc/mm-acc:0.8377992868059093/0.8365541090317331\n```\n\nExample:\n```text\nDeepSpeedExamples/compression/bert$ bash bash_script/XTC/layer_reduction_1bit.sh\n```\n\nExample:\n```text\nEpoch: 18 | Time: 18m 11s\nClean the best model, and the accuracy of the clean model is acc/mm-acc:0.8140601120733572/0.8199755899104963\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:15:29.990Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":25,"totalLines":146,"estimatedTokens":897}}20{"id":"doc-learning_rate_range_test_deepspeed-e16b6cdd","source":"documentation","title":"Learning Rate Range Test - DeepSpeed","url":"https://www.deepspeed.ai/tutorials/lrrt/","text":"Enter your search term...\n\nExample:\n```text\n\"scheduler\": {\n    \"type\": \"LRRangeTest\",\n    \"params\": {\n        \"lr_range_test_min_lr\": 0.0001,\n        \"lr_range_test_step_size\": 200,\n        \"lr_range_test_step_rate\": 5,\n        \"lr_range_test_staircase\": false\n    }\n}\n```\n\nExample:\n```text\n\"OneCycle\": {\n    \"cycle_min_lr\": 0.002,\n    \"cycle_max_lr\": 0.005,\n    \"cycle_first_step_size\": 2000,\n    \"cycle_second_step_size\": 2000,\n    ...\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:13.423Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":2,"totalLines":27,"estimatedTokens":115}}21{"id":"doc-loan_disbursements-733b995c","source":"documentation","title":"Loan disbursements","url":"https://developer.flutterwave.com/docs/managing-instant-loan-disbursements","text":"For AI https://developer.flutterwave.com/llms.txt for an index of all pages formatted in Markdown and endpoints in OpenAPI.\n\nExample:\n```json\ncurl --request GET  \n     --url 'https://developersandbox-api.flutterwave.com/banks?country=NG'  \n     --header 'X-Trace-Id: {{REPLACE_WITH_UNIQUE_IDENTIFIER}}'  \n     --header 'accept: application/json'  \n     --header 'authorization: Bearer {{REPLACE_WITH_API_ACCESS_TOKEN}}'\n```\n\nExample:\n```json\n{\n  \"status\": \"success\",\n  \"message\": \"Bank list retrieved successfully\",\n  \"data\": [\n    {\n      \"id\": \"bnk_cYjd92Qk\",\n      \"code\": \"044\",\n      \"name\": \"Access Bank\"\n    }\n    .......\n  ]\n}\n```\n\nExample:\n```json\ncurl --request POST  \n     --url 'https://developersandbox-api.flutterwave.com/banks/account-resolve'  \n     --header 'X-Trace-Id: {{REPLACE_WITH_UNIQUE_IDENTIFIER}}'  \n     --header 'authorization: Bearer {{REPLACE_WITH_API_ACCESS_TOKEN}}'  \n     --header 'content-type: application/json'  \n     --data '  \n{  \n  \"account\": {  \n    \"code\": \"044\",  \n    \"number\": \"0690000031\"  \n  },  \n  \"currency\": \"NGN\"  \n}  \n'\n```\n\nExample:\n```json\n{\n  \"status\": \"success\",\n  \"message\": \"Bank details retrieved successfully\",\n  \"data\": {\n    \"bank_code\": \"044\",\n    \"account_number\": \"0690000031\",\n    \"account_name\": \"Aduke Enterprise Limited\"\n  }\n}\n```\n\nExample:\n```json\ncurl --request POST  \n     --url 'https://developersandbox-api.flutterwave.com/direct-transfers'  \n     --header 'X-Trace-Id: {{REPLACE_WITH_UNIQUE_IDENTIFIER}}'  \n     --header 'authorization: Bearer {{REPLACE_WITH_API_ACCESS_TOKEN}}'  \n     --header 'content-type: application/json'  \n     --data '  \n{  \n  \"action\": \"instant\",  \n  \"payment_instruction\": {  \n    \"source_currency\": \"NGN\",  \n    \"amount\": {  \n      \"applies_to\": \"source_currency\",  \n      \"value\": 1000000  \n    },  \n    \"recipient\": {  \n      \"bank\": {  \n        \"account_number\": \"0690000031\",  \n        \"code\": \"044\"  \n      }  \n    },  \n    \"destination_currency\": \"NGN\"  \n  },  \n  \"type\": \"bank\"  \n}  \n'\n```\n\nExample:\n```json\n{\n    \"status\": \"success\",\n    \"message\": \"Transfer created\",\n    \"data\": {\n        \"id\": \"trf_KfuyB4YprRt0RD\",\n        \"type\": \"bank\",\n        \"action\": \"instant\",\n        \"reference\": \"3d8e2e08-d4bd-4f8c-951a-d68e98eea80b\",\n        \"status\": \"NEW\",\n        \"source_currency\": \"NGN\",\n        \"destination_currency\": \"NGN\",\n        \"amount\": {\n            \"value\": 1000000,\n            \"applies_to\": \"destination_currency\"\n        },\n        \"recipient\": {\n            \"type\": \"bank\",\n            \"name\": {\n                \"first\": \"Aduke Enterprise Limited\",\n                \"last\": \"\"\n            },\n            \"currency\": \"NGN\",\n            \"bank\": {\n                \"account_number\": \"0690000031\",\n                \"code\": \"044\"\n            },\n            \"id\": \"rcb_qcwLZGHj7l\"\n        },\n        \"meta\": {},\n        \"created_datetime\": \"2025-01-21T09:55:59.157510874Z\"\n    }\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:38.779Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":6,"totalLines":124,"estimatedTokens":730}}22{"id":"doc-bundling_extra_dependencies_in_an_obr-95c988d1","source":"documentation","title":"Bundling extra dependencies in an OBR","url":"https://developer.atlassian.com/server/framework/atlassian-sdk/bundling-extra-dependencies-in-an-obr/","text":"Example:\n```text\n<properties>\n   <my.library.version>1.0</my.library.version>\n   ....\n</properties>\n```\n\nExample:\n```text\n1\n2\n```\n\nExample:\n```text\n<dependencies>\n    <dependency>\n        <groupId>my.company.whatever</groupId>\n        <artifactId>my-library</artifactId>\n        <version>${my.library.version}</version>\n        <scope>provided</scope>\n    </dependency>\n    ....\n</dependencies>\n```\n\nExample:\n```text\n<build>\n        <plugins>\n            <plugin>\n                <groupId>com.atlassian.maven.plugins</groupId>\n                <artifactId>confluence-maven-plugin</artifactId>\n                <!-- use the latest version of the SDK -->\n                <version>3.2.4</version>\n                <extensions>true</extensions>\n                <configuration>\n                    <productVersion>${atlassian.product.version}</productVersion>\n                    <testResourcesVersion>${atlassian.product.data.version}</testResourcesVersion>\n                    <!-- Specify what to bundle in the OBR -->\n                    <pluginDependencies>\n                        <pluginDependency>\n                            <groupId>my.company.library</groupId>\n                            <artifactId>my-library</artifactId>\n                        </pluginDependency>\n                    </pluginDependencies>\n                    <instructions>\n                        <!-- Specify what package to include. Ensure that any packages from OBRs are also listed. -->\n                        <Import-Package>\n                            my.company.library;version=\"${my.library.version}\",\n                            ....\n                        </Import-Package>\n                        <CONF_COMM/>\n                        ....\n                    </instructions>\n                </configuration>\n            </plugin>\n            ....\n        </plugins>\n        ....\n</build>\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:38.471Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":4,"totalLines":65,"estimatedTokens":474}}23{"id":"doc-add_scopes_to_call_an_atlassian_rest_api-b7660994","source":"documentation","title":"Add scopes to call an Atlassian REST API","url":"https://developer.atlassian.com/platform/forge/add-scopes-to-call-an-atlassian-rest-api/","text":"Example:\n```bash\nforge lint\n```\n\nExample:\n```text\n1\n2\n```\n\nExample:\n```bash\nThe linter checks the app code for known errors. Warnings are problems you should\nfix, but that won't stop the app code from building.\nPress Ctrl+C to cancel.\n\n/src/index.jsx\n  10:57   warning  Confluence endpoint: GET /api/content requires\n  \"read:confluence-content.summary\" scope  permission-scope-required\n\n14:56   warning  Confluence endpoint: GET /api/content requires\n  \"read:confluence-content.summary\" scope  permission-scope-required\n\n19:51   warning  Jira endpoint: GET /rest/api/3/user requires\n  \"read:jira-user\" scope  permission-scope-required\n\n⚠ 3 problems (0 errors, 3 warnings)\n  Run forge lint --fix to automatically fix 0 errors and 3 warnings.\n```\n\nExample:\n```bash\nforge lint --fix\n```\n\nExample:\n```bash\n✔ Fixed 0 errors and 3 warnings\n\nRun forge lint to review outstanding errors and warnings\n```\n\nExample:\n```text\npermissions:\n  scopes:\n    - write:confluence-content\n```\n\nExample:\n```bash\nforge deploy\n```\n\nExample:\n```bash\nforge install --upgrade\n```\n\nExample:\n```bash\n┌───────────────┬──────────────────────────────┬──────────────────┬─────────────┐\n│ Environment   │ Site                         │ Atlassian app    │ Scopes      │\n├───────────────┼──────────────────────────────┼──────────────────┼─────────────┤\n│ ❯ development │ example-dev.atlassian.net    │ Jira             │ Latest      │\n│   development │ example-dev.atlassian.net    │ Confluence       │ Latest      │\n│   production  │ example.atlassian.net        │ Confluence       │ Out-of-date │\n└───────────────┴──────────────────────────────┴──────────────────┴─────────────┘\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:38.499Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":9,"totalLines":72,"estimatedTokens":416}}24{"id":"doc-scheduled_trigger-19ab31a7","source":"documentation","title":"Scheduled trigger","url":"https://developer.atlassian.com/platform/forge/manifest-reference/modules/scheduled-trigger/","text":"Example:\n```text\nmodules:\n  scheduledTrigger:\n    - key: example-scheduled-trigger\n      function: my-scheduled-function\n      interval: hour # Runs hourly\n      filter: # Optional. Skip invocations for unlicensed sites.\n        appIsLicensed: true\n  function:\n    - key: my-scheduled-function\n      handler: index.trigger\n      timeoutSeconds: 60 #Optional. Maximum time (in seconds) this function can run when triggered by a schedule or as an async event consumer. Range: 1–900 seconds.\n```\n\nExample:\n```text\n1\n2\n```\n\nExample:\n```javascript\n// index.js\n\nexport const trigger = ({ context }) => {\n  console.log(\"Scheduled trigger invoked\");\n  console.log(context);\n  // Add your business logic here\n};\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:38.552Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":3,"totalLines":33,"estimatedTokens":180}}25{"id":"doc-migrate_to_the_third_generation_gen3_of_the_sign-4cdac51b","source":"documentation","title":"Migrate to the third generation (Gen3) of the Sign-In Widget | Okta Developer","url":"https://developer.okta.com/docs/guides/custom-widget-migration-gen3/main/","text":"Example:\n```javascript\nnew OktaSignIn({\n  theme: {\n    tokens: {\n      PalettePrimaryMain: '#D11DCA',\n      TypographyColorBody: '#00297A',\n      TypographyColorHeading: '#00297A',\n      TypographyFamilyHeading: 'Helvetica',\n      TypographyFamilyBody: 'Helvetica',\n      TypographyWeightHeading: 600,\n      BorderRadiusMain: '24px',\n      Spacing5: '2.85714286rem',\n    }\n  }\n});\n```\n\nExample:\n```html\n{{#useSiwGen3}}\n    <style nonce=\"{{nonceValue}}\">\n        #okta-login-container {\n            background-color: red !important;\n        }\n    </style>\n{{/useSiwGen3}}\n```\n\nExample:\n```javascript\noktaSignIn.afterTransform('identify', ({ formBag }) => {\n const submitIndex = formBag.uischema.elements.findIndex(ele => ele.type === 'Button' && ele.options.type === 'submit');\n if (submitIndex != -1) {\n   const submit = formBag.uischema.elements[submitIndex];\n   submit.label = 'Login';\n }\n});\n```\n\nExample:\n```javascript\noktaSignIn.afterTransform('enroll-profile', ({ formBag }) => {\n   const submitIndex = formBag.uischema.elements.findIndex(ele => ele.type === 'Button' && ele.options.type === 'submit');\n   if (submitIndex != -1) {\n       const submit = formBag.uischema.elements[submitIndex];\n       submit.label = 'Register';\n   }\n});\n```\n\nExample:\n```javascript\noktaSignIn.afterTransform('identify', ({ formBag }) => {\n const help = formBag.uischema.elements.find(ele => ele.type === 'Link' && ele.options.dataSe === 'help');\n const unlock = formBag.uischema.elements.find(ele => ele.type === 'Link' && ele.options.dataSe === 'unlock');\n const forgot = formBag.uischema.elements.find(ele => ele.type === 'Link' && ele.options.dataSe === 'forgot-password');\n formBag.uischema.elements = formBag.uischema.elements.filter(ele => ![help, unlock, forgot].includes(ele));\n});\n```\n\nExample:\n```javascript\noktaSignIn.afterTransform?.('identify-recovery', ({ formBag }) => {\n   const titleIndex = formBag.uischema.elements.findIndex(ele => ele.type === 'Title');\n   // Add custom description after title\n   const descr = {\n       type: 'Description',\n       contentType: 'subtitle',\n       options: {\n           variant: 'body1',\n           content: '<div class=\\'my-reset-description\\'>Description<br />about<br />recovery</div>'\n       },\n   };\n   if (titleIndex != -1) {\n       formBag.uischema.elements.splice(titleIndex + 1, 0, descr);\n   }\n});\n```\n\nExample:\n```javascript\n<script type=\"text/javascript\" nonce=\"{{nonceValue}}\">\n    var config = OktaUtil.getSignInWidgetConfig();\n\n    var oktaSiwRoot = document.querySelector('#okta-login-container');\n    // The following allows you to reference the context from each render\n    var contextObj = {};\n    function cb(mutations, observer) {\n      // For the primary auth form, updates the button label\n      if (contextObj.formName === 'identify') {\n        var el = document.querySelector('[data-type=\"save\"]');\n        if (el) { el.textContent = 'Some new label'; }\n      }\n      // For the reset-authenticator view, updates the button label\n      if (contextObj.formName === 'reset-authenticator') {\n        var el = document.querySelector('[data-type=\"save\"]');\n        if (el) { el.textContent = 'A different label'; }\n      }\n    }\n    // Initializes the mutation observer object\n    var observer = new MutationObserver(cb);\n\n    // Renders the Okta Sign-In Widget\n    var oktaSignIn = new OktaSignIn(config);\n\n    // The following varies based on your configuration\n    oktaSignIn.renderEl({ el: '#okta-login-container' }, OktaUtil.completeLogin, function (error) {\n       console.log(error.message, error);\n    });\n\n    oktaSignIn.on('afterRender', function (ctx) { // ← Restores the context\n      // Resets the global context object for reference using the callback function\n      contextObj = ctx;\n      // The following condition only executes the observer for specific views/forms\n      if (ctx.formName === 'identify' || ctx.formName === 'reset-authenticator') {\n        // Pauses\n        observer.disconnect();\n\n        // Calls once after initial render\n        cb();\n\n        // Observes for re-renders\n        observer.observe(oktaSiwRoot, {\n          subtree: true,\n          childList: true,\n          attributes: true,\n          characterData: true,\n        });\n      }\n    });\n </script>\n```\n\nExample:\n```javascript\n<script type=\"text/javascript\" nonce=\"{{nonceValue}}\">\n   var config = OktaUtil.getSignInWidgetConfig();\n\n   // Renders the Okta Sign-In Widget\n   var oktaSignIn = new OktaSignIn(config);\n\n   // The following varies based on your own configuration\n   oktaSignIn.renderEl({ el: '#okta-login-container' }, OktaUtil.completeLogin, function (error) {\n      console.log(error.message, error);\n   });\n\n   oktaSignIn.on('afterRender', function (context) {\n      if (context.formName === 'identify') {\n         // Sends a log to your external logging service indicating a customer landed on this view\n         someExternalLoggingService.log('Rendered Primary auth form'); \n      }\n   });\n</script>\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:40.648Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":8,"totalLines":157,"estimatedTokens":1249}}26{"id":"doc-wbr_html_line_break_opportunity_element_html_mdn-9713e62e","source":"documentation","title":"<wbr> HTML line break opportunity element - HTML | MDN","url":"https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/wbr","text":"Example:\n```text\n#example-paragraphs {\n  background-color: white;\n  overflow: hidden;\n  resize: horizontal;\n  width: 9rem;\n  border: 2px dashed #999999;\n}\n```\n\nExample:\n```text\n<p>\n  http://this<wbr />.is<wbr />.a<wbr />.really<wbr />.long<wbr />.example<wbr />.com/With<wbr />/deeper<wbr />/level<wbr />/pages<wbr />/deeper<wbr />/level<wbr />/pages<wbr />/deeper<wbr />/level<wbr />/pages<wbr />/deeper<wbr />/level<wbr />/pages<wbr />/deeper<wbr />/level<wbr />/pages\n</p>\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T10:42:06.600Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":2,"totalLines":19,"estimatedTokens":124}}27{"id":"doc-oin_submission_requirements_okta_developer-a5401857","source":"documentation","title":"OIN submission requirements | Okta Developer","url":"https://developer.okta.com/docs/guides/submit-app-prereq/main/","text":"Example:\n```markdown\n## Prerequisites\n\nWhen you use SAML as the SSO mode with provisioning, you need to enable a specific account plan on the app side for silent activation.\n```\n\nExample:\n```markdown\n## Supported features\n\n* SP-initiated SSO (Single Sign-On)\n* IdP-initiated SSO (through [Third-party Initiated Login](https://openid.net/specs/openid-connect-core-1_0.html#ThirdPartyInitiatedLogin))\n* Just-In-Time provisioning\n* SP-initiated SLO (Single Logout)\n\nFor more information on the listed features, visit the [Okta Glossary](https://help.okta.com/okta_help.htm?type=oie&id=ext_glossary).\n```\n\nExample:\n```markdown\n## Supported features\n\n* IdP-initiated SSO\n* SP-initiated SSO\n* Just-In-Time provisioning\n* SP-initiated SLO\n* Force authentication\n\nFor more information on the listed features, visit the [Okta Glossary](https://help.okta.com/okta_help.htm?type=oie&id=ext_glossary).\n```\n\nExample:\n```markdown\n## Supported features\n\n* Create users\n* Update user attributes\n* Deactivate users\n* Import users\n* Import groups\n* Sync password\n* Profile sourcing\n* Group push\n\nOkta can't update user attributes for Admin users. This is an API limitation.\n\nFor more information on the listed features, visit the [Okta Glossary](https://help.okta.com/okta_help.htm?type=oie&id=ext_glossary).\n```\n\nExample:\n```markdown\n### Read this before you enable SAML\n\nEnabling SAML affects all users who use this app.\nUsers won't be able to sign in through their regular sign-in page.\nThey are able to access the app through the Okta service.\n\n### Backup URL\n\n{appName} doesn't provide a backup sign-in URL where users can sign in using their regular username and password.\nIf necessary, contact {appName} Support (support@{appName}.com) to turn off SAML.\n```\n\nExample:\n```markdown\n## Configuration steps\n\n1. Copy the Metadata URL from the Okta Admin Console, SAML 2.0 Sign on methods section.\n2. Contact the {appName} support team (for example, support@{appName}.com) and request that they enable SAML 2.0 for your account. Include the \"Metadata URL\" value from the previous step.\n   The {appName} support team processes your request and provides you with an SSO ID and an encryption certificate.\n3. In your Okta Admin Console, select the Sign on tab for the {appName} SAML app, then click \"Edit\" and follow the steps below:\n   * \"Encryption Certificate\": Upload the certificate provided by {appName} support in the previous step.\n   * Scroll down to Advanced Sign-on Settings and enter your \"SSO ID\".\n   * Application username format: Select \"email\".\n   * Click \"Save\".\n4. Your SAML configuration for {appName} is complete. You can start assigning people to the app.\n```\n\nExample:\n```markdown\n## Configuration steps\n\n1. Copy the Metadata URL from the SAML 2.0 Metadata details section in the Admin Console and save this value for the next few steps.\n2. Sign in to {appName}.\n3. Navigate to Admin >  Settings > SAML SSO.\n4. Specify the following:\n   * ENABLE SAML SSO: Select \"Yes\".\n   * IDP Provider: Select \"Okta\".\n   * Metadata URL: Copy and paste the metadata URL value from step one.\n4. Click \"Save Changes\".\n\nThe SAML setting is complete in {appName}.\n```\n\nExample:\n```markdown\n## Note\n\n* Ensure that you entered the correct value in the \"Subdomain\" field under the General tab. The wrong subdomain value prevents you from authenticating through SAML to {appName}.\n\n* Since only SP-initiated flow is supported, Okta recommends hiding the app icon for users.\n\n* The following SAML attributes are supported:\n\n   | Name      | Value          |\n   | --------- | -------------- |\n   | email     | user.email     |\n   | firstName | user.firstName |\n   | lastName  | user.lastName  |\n```\n\nExample:\n```markdown\n## Note\n\nThe External ID is a required attribute, but it doesn't have a default mapping.\nThis is because some customers prefer to set it to `EmployeeNumber`, and others like to set it to `emailAddress`.\nAssign the mapping to the correct value for your organization.\n```\n\nExample:\n```markdown\n## SP-initiated SSO\n\nThe sign-in process is initiated from {yourAppPortal}.\n\n1. From your browser, navigate to the {appName} sign-in page.\n2. Enter your Okta credentials (your email and password) and click \"Sign in with Okta\".\nIf your credentials are valid, you are redirected to the {appName} dashboard.\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:40.762Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":10,"totalLines":133,"estimatedTokens":1078}}28{"id":"doc-build_an_api_service_integration_okta_developer-16d54f62","source":"documentation","title":"Build an API service integration | Okta Developer","url":"https://developer.okta.com/docs/guides/build-api-integration/main/","text":"Example:\n```sh\nAuthorization: Basic {Base64({clientId}:{clientSecret})}\n```\n\nExample:\n```bash\ncurl --request POST \\\n  --url https://{customerOktaDomain}/oauth2/v1/token \\\n  --header 'Accept: application/json' \\\n  --header 'Authorization: Basic MG9hY...' \\\n  --header 'Cache-control: no-cache' \\\n  --header 'Content-type: application/x-www-form-urlencoded' \\\n  --data 'grant_type=client_credentials&scope=okta.users.read okta.groups.read'\n```\n\nExample:\n```json\n{\n   \"token_type\": \"Bearer\",\n   \"expires_in\": 3600,\n   \"access_token\": \"eyJraWQiOiJ.....UfThlJ7w\",\n   \"scope\": \"okta.users.read okta.groups.read\"\n}\n```\n\nExample:\n```json\n{\n   \"error\": \"invalid_client\",\n   \"error_description\": \"The client secret supplied for a confidential client is invalid.\"\n}\n```\n\nExample:\n```bash\ncurl -X GET \"https://{customerOktaDomain}/api/v1/users\"\n    -H \"Accept: application/json\"\n    -H \"Authorization: Bearer {accessToken}\"\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:40.790Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":5,"totalLines":42,"estimatedTokens":233}}29{"id":"doc-refresh_a_session-f101d03f","source":"documentation","title":"Refresh a session","url":"https://developer.okta.com/docs/api/openapi/okta-management/management/tags/session/other/refreshsession","text":"Example:\n```text\ncurl -i -X POST \\\n  https://subdomain.okta.com/api/v1/sessions/l7FbDVqS8zHSy65uJD85/lifecycle/refresh\n```\n\nExample:\n```text\n{\n  \"amr\": [\n    \"pwd\"\n  ],\n  \"createdAt\": \"2019-08-25T14:17:22Z\",\n  \"expiresAt\": \"2019-08-25T14:17:22Z\",\n  \"id\": \"l7FbDVqS8zHSy65uJD85\",\n  \"idp\": {\n    \"id\": \"01a2bcdef3GHIJKLMNOP\",\n    \"type\": \"ACTIVE_DIRECTORY\"\n  },\n  \"lastFactorVerification\": \"2019-08-24T14:15:22Z\",\n  \"lastPasswordVerification\": \"2019-08-24T14:15:22Z\",\n  \"login\": \"user@example.com\",\n  \"status\": \"ACTIVE\",\n  \"userId\": \"00u0abcdefGHIJKLMNOP\",\n  \"_links\": {\n    \"self\": { … },\n    \"href\": \"https://{yourOktaDomain}/api/v1/sessions/l7FbDVqS8zHSy65uJD85\"\n  }\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:40.799Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":2,"totalLines":32,"estimatedTokens":172}}30{"id":"doc-implement_data_source_terraform_hashicorp_develo-26bff2a2","source":"documentation","title":"Implement data source | Terraform | HashiCorp Developer","url":"https://developer.hashicorp.com/terraform/tutorials/providers-plugin-framework/providers-plugin-framework-data-source-read","text":"HashiConf 2025 Don't miss the live stream of HashiConf Day 2 happening now View live stream\n\nExample:\n```text\n$ git clone https://github.com/hashicorp/terraform-provider-hashicups\n```\n\nExample:\n```text\n$ cd terraform-provider-hashicups/02-provider-configure\n```\n\nExample:\n```text\n$ go mod tidy\n```\n\nExample:\n```text\n$ go env GOBIN\n/Users/<Username>/go/bin\n```\n\nExample:\n```text\nprovider_installation {\n\n  dev_overrides {\n    \"hashicorp.com/edu/hashicups\" = \"<PATH>\"\n  }\n\n  # For all other providers, install them directly from their origin provider\n  # registries as normal. If you omit this, Terraform will _only_ use\n  # the dev_overrides block, and so no other providers will be available.\n  direct {}\n}\n```\n\nExample:\n```text\n$ $env:APPDATA\n```\n\nExample:\n```text\n$ cd docker_compose\n```\n\nExample:\n```text\n$ docker-compose up\n```\n\nExample:\n```text\n$ curl localhost:19090/health/readyz\nok\n```\n\nExample:\n```text\n$ curl -X POST localhost:19090/signup -d '{\"username\":\"education\", \"password\":\"test123\"}'\n{\"UserID\":1,\"Username\":\"education\",\"token\":\"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1OTEwNzgwODUsInVzZXJfaWQiOjIsInVzZXJuYW1lIjoiZWR1Y2F0aW9uIn0.CguceCNILKdjOQ7Gx0u4UAMlOTaH3Dw-fsll2iXDrYU\"}\n```\n\nExample:\n```text\n$ export HASHICUPS_TOKEN=ey...\n```\n\nExample:\n```text\napi_1  | 2020-12-10T09:19:50.601Z [INFO]  Handle User | signup\n```\n\nExample:\n```text\npackage provider\n\nimport (\n  \"context\"\n\n  \"github.com/hashicorp/terraform-plugin-framework/datasource\"\n  \"github.com/hashicorp/terraform-plugin-framework/datasource/schema\"\n)\n\n// Ensure the implementation satisfies the expected interfaces.\nvar (\n  _ datasource.DataSource = &coffeesDataSource{}\n)\n\n// NewCoffeesDataSource is a helper function to simplify the provider implementation.\nfunc NewCoffeesDataSource() datasource.DataSource {\n  return &coffeesDataSource{}\n}\n\n// coffeesDataSource is the data source implementation.\ntype coffeesDataSource struct{}\n\n// Metadata returns the data source type name.\nfunc (d *coffeesDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) {\n  resp.TypeName = req.ProviderTypeName + \"_coffees\"\n}\n\n// Schema defines the schema for the data source.\nfunc (d *coffeesDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) {\n  resp.Schema = schema.Schema{}\n}\n\n// Read refreshes the Terraform state with the latest data.\nfunc (d *coffeesDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) {\n}\n```\n\nExample:\n```text\n// DataSources defines the data sources implemented in the provider.\nfunc (p *hashicupsProvider) DataSources(_ context.Context) []func() datasource.DataSource {\n  return []func() datasource.DataSource {\n    NewCoffeesDataSource,\n  }\n}\n```\n\nExample:\n```text\n// coffeesDataSource is the data source implementation.\ntype coffeesDataSource struct {\n  client *hashicups.Client\n}\n```\n\nExample:\n```text\nimport (\n  \"context\"\n\n  \"github.com/hashicorp-demoapp/hashicups-client-go\"\n  \"github.com/hashicorp/terraform-plugin-framework/datasource\"\n  \"github.com/hashicorp/terraform-plugin-framework/datasource/schema\"\n)\n```\n\nExample:\n```text\n// Ensure the implementation satisfies the expected interfaces.\nvar (\n  _ datasource.DataSource              = &coffeesDataSource{}\n  _ datasource.DataSourceWithConfigure = &coffeesDataSource{}\n)\n```\n\nExample:\n```text\n// Configure adds the provider configured client to the data source.\nfunc (d *coffeesDataSource) Configure(_ context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) {\n  // Add a nil check when handling ProviderData because Terraform\n  // sets that data after it calls the ConfigureProvider RPC.\n  if req.ProviderData == nil {\n    return\n  }\n\n  client, ok := req.ProviderData.(*hashicups.Client)\n  if !ok {\n    resp.Diagnostics.AddError(\n      \"Unexpected Data Source Configure Type\",\n      fmt.Sprintf(\"Expected *hashicups.Client, got: %T. Please report this issue to the provider developers.\", req.ProviderData),\n    )\n\n    return\n  }\n\n  d.client = client\n}\n```\n\nExample:\n```text\n// Schema defines the schema for the data source.\nfunc (d *coffeesDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) {\n  resp.Schema = schema.Schema{\n    Attributes: map[string]schema.Attribute{\n      \"coffees\": schema.ListNestedAttribute{\n        Computed: true,\n        NestedObject: schema.NestedAttributeObject{\n          Attributes: map[string]schema.Attribute{\n            \"id\": schema.Int64Attribute{\n              Computed: true,\n            },\n            \"name\": schema.StringAttribute{\n              Computed: true,\n            },\n            \"teaser\": schema.StringAttribute{\n              Computed: true,\n            },\n            \"description\": schema.StringAttribute{\n              Computed: true,\n            },\n            \"price\": schema.Float64Attribute{\n              Computed: true,\n            },\n            \"image\": schema.StringAttribute{\n              Computed: true,\n            },\n            \"ingredients\": schema.ListNestedAttribute{\n              Computed: true,\n              NestedObject: schema.NestedAttributeObject{\n                Attributes: map[string]schema.Attribute{\n                  \"id\": schema.Int64Attribute{\n                    Computed: true,\n                  },\n                },\n              },\n            },\n          },\n        },\n      },\n    },\n  }\n}\n```\n\nExample:\n```text\n// coffeesDataSourceModel maps the data source schema data.\ntype coffeesDataSourceModel struct {\n    Coffees []coffeesModel `tfsdk:\"coffees\"`\n}\n\n// coffeesModel maps coffees schema data.\ntype coffeesModel struct {\n    ID          types.Int64               `tfsdk:\"id\"`\n    Name        types.String              `tfsdk:\"name\"`\n    Teaser      types.String              `tfsdk:\"teaser\"`\n    Description types.String              `tfsdk:\"description\"`\n    Price       types.Float64             `tfsdk:\"price\"`\n    Image       types.String              `tfsdk:\"image\"`\n    Ingredients []coffeesIngredientsModel `tfsdk:\"ingredients\"`\n}\n\n// coffeesIngredientsModel maps coffee ingredients data\ntype coffeesIngredientsModel struct {\n    ID types.Int64 `tfsdk:\"id\"`\n}\n```\n\nExample:\n```text\nimport (\n  \"context\"\n  \"fmt\"\n\n  \"github.com/hashicorp-demoapp/hashicups-client-go\"\n  \"github.com/hashicorp/terraform-plugin-framework/datasource\"\n  \"github.com/hashicorp/terraform-plugin-framework/datasource/schema\"\n  \"github.com/hashicorp/terraform-plugin-framework/types\"\n)\n```\n\nExample:\n```text\n// Read refreshes the Terraform state with the latest data.\nfunc (d *coffeesDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) {\n    var state coffeesDataSourceModel\n\n    coffees, err := d.client.GetCoffees()\n    if err != nil {\n      resp.Diagnostics.AddError(\n        \"Unable to Read HashiCups Coffees\",\n        err.Error(),\n      )\n      return\n    }\n\n    // Map response body to model\n    for _, coffee := range coffees {\n      coffeeState := coffeesModel{\n        ID:          types.Int64Value(int64(coffee.ID)),\n        Name:        types.StringValue(coffee.Name),\n        Teaser:      types.StringValue(coffee.Teaser),\n        Description: types.StringValue(coffee.Description),\n        Price:       types.Float64Value(coffee.Price),\n        Image:       types.StringValue(coffee.Image),\n      }\n\n      for _, ingredient := range coffee.Ingredient {\n        coffeeState.Ingredients = append(coffeeState.Ingredients, coffeesIngredientsModel{\n          ID: types.Int64Value(int64(ingredient.ID)),\n        })\n      }\n\n      state.Coffees = append(state.Coffees, coffeeState)\n    }\n\n    // Set state\n    diags := resp.State.Set(ctx, &state)\n    resp.Diagnostics.Append(diags...)\n    if resp.Diagnostics.HasError() {\n      return\n    }\n}\n```\n\nExample:\n```text\n$ go install .\n```\n\nExample:\n```text\n$ cd examples/coffees\n```\n\nExample:\n```text\nterraform {\n  required_providers {\n    hashicups = {\n      source = \"hashicorp.com/edu/hashicups\"\n    }\n  }\n}\n\nprovider \"hashicups\" {\n  host     = \"http://localhost:19090\"\n  username = \"education\"\n  password = \"test123\"\n}\n\ndata \"hashicups_coffees\" \"edu\" {}\n\noutput \"edu_coffees\" {\n  value = data.hashicups_coffees.edu\n}\n```\n\nExample:\n```text\n$ terraform plan\n##...\ndata.hashicups_coffees.edu: Reading...\ndata.hashicups_coffees.edu: Read complete after 0s\n\nChanges to Outputs:\n  + edu_coffees = {\n      + coffees = [\n          + {\n              + description = \"\"\n              + id          = 1\n              + image       = \"/hashicorp.png\"\n              + ingredients = [\n                  + {\n                      + id = 6\n                    },\n                ]\n              + name        = \"HCP Aeropress\"\n              + price       = 200\n              + teaser      = \"Automation in a cup\"\n            },\n##...\nYou can apply this plan to save these new output values to the Terraform state,\nwithout changing any real infrastructure.\n\n───────────────────────────────────────────────────────────────────────────────\n\nNote: You didn't use the -out option to save this plan, so Terraform can't\nguarantee to take exactly these actions if you run \"terraform apply\" now.\n```\n\nExample:\n```text\n$ cd ../..\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:39.780Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":27,"totalLines":375,"estimatedTokens":2320}}31{"id":"doc-fedropshadow_svg_mdn-e5ae8273","source":"documentation","title":"<feDropShadow> - SVG | MDN","url":"https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/feDropShadow","text":"Example:\n```text\nhtml,\nbody,\nsvg {\n  height: 100%;\n}\n```\n\nExample:\n```text\n<svg viewBox=\"0 0 30 10\" xmlns=\"http://www.w3.org/2000/svg\">\n  <defs>\n    <filter id=\"shadow\">\n      <feDropShadow dx=\"0.2\" dy=\"0.4\" stdDeviation=\"0.2\" />\n    </filter>\n    <filter id=\"shadow2\">\n      <feDropShadow dx=\"0\" dy=\"0\" stdDeviation=\"0.5\" flood-color=\"cyan\" />\n    </filter>\n    <filter id=\"shadow3\">\n      <feDropShadow\n        dx=\"-0.8\"\n        dy=\"-0.8\"\n        stdDeviation=\"0\"\n        flood-color=\"pink\"\n        flood-opacity=\"0.5\" />\n    </filter>\n  </defs>\n\n  <circle cx=\"5\" cy=\"50%\" r=\"4\" fill=\"pink\" filter=\"url(#shadow)\" />\n  <circle cx=\"15\" cy=\"50%\" r=\"4\" fill=\"pink\" filter=\"url(#shadow2)\" />\n  <circle cx=\"25\" cy=\"50%\" r=\"4\" fill=\"pink\" filter=\"url(#shadow3)\" />\n</svg>\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T10:42:06.716Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":2,"totalLines":36,"estimatedTokens":196}}32{"id":"doc-femergenode_svg_mdn-1aa546a5","source":"documentation","title":"<feMergeNode> - SVG | MDN","url":"https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/feMergeNode","text":"Example:\n```text\n<svg\n  width=\"200\"\n  height=\"200\"\n  xmlns=\"http://www.w3.org/2000/svg\"\n  xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n  <filter id=\"feOffset\" x=\"-40\" y=\"-20\" width=\"100\" height=\"200\">\n    <feOffset in=\"SourceGraphic\" dx=\"60\" dy=\"60\" />\n    <feGaussianBlur in=\"SourceGraphic\" stdDeviation=\"5\" result=\"blur2\" />\n    <feMerge>\n      <feMergeNode in=\"blur2\" />\n      <feMergeNode in=\"SourceGraphic\" />\n    </feMerge>\n  </filter>\n\n  <rect\n    x=\"40\"\n    y=\"40\"\n    width=\"100\"\n    height=\"100\"\n    stroke=\"black\"\n    fill=\"green\"\n    filter=\"url(#feOffset)\" />\n  <rect x=\"40\" y=\"40\" width=\"100\" height=\"100\" stroke=\"black\" fill=\"green\" />\n</svg>\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T10:42:06.718Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":1,"totalLines":29,"estimatedTokens":169}}33{"id":"doc-https_developer_paypal_com_get_started_md-0aa793a2","source":"documentation","title":"https://developer.paypal.com/get-started.md","url":"https://developer.paypal.com/get-started.md","text":"Add PayPal payments to a digital store so customers can pay using any funding source linked to their PayPal account.\n\nSkip the integration and use payment links and buttons to accept PayPal payments anywhere.\n\nProvide more versatility in a payment flow by adding the ability to accept credit and debit card payments with Expanded Checkout.\n\nAdd customer information vaulting capabilities to a digital store by integrating Save PayPal, Venmo, Cards or tokens.\n\nAccept AI shopping assistant payments through 2 commerce protocols or surface a merchant's product catalog via Store Sync.\n\nAccept PayPal, Venmo, Google Pay, Apple Pay, Fastlane and credit and debit cards using our new SDK faster and more secure than before.\n\nRun tests in our sandbox, use AI tools to connect with LLMs, generate credit card numbers, and more with our toolset.\n\nWork with MAIA to upgrade an older PayPal integration easily to a newer PayPal product, with minimal disruptions.\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:42.996Z","totalSectionsIncluded":8,"totalCodeBlocksIncluded":0,"totalLines":17,"estimatedTokens":242}}34{"id":"doc-delete_an_authenticator_enrollment-03f90ce0","source":"documentation","title":"Delete an authenticator enrollment","url":"https://developer.okta.com/docs/api/openapi/okta-management/management/tags/userauthenticatorenrollments/other/deleteauthenticatorenrollment","text":"Example:\n```text\ncurl -i -X DELETE \\\n  https://subdomain.okta.com/api/v1/users/00ub0oNGTSWTBKOLGLNR/authenticator-enrollments/sms8lqwuzSpWT4kVs0g4\n```\n\nExample:\n```text\nNo content\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:40.868Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":2,"totalLines":12,"estimatedTokens":50}}35{"id":"doc-bc_authorize-9862d97a","source":"documentation","title":"/bc/authorize","url":"https://developer.okta.com/docs/api/openapi/okta-oauth/oauth/orgas/bcauthorize","text":"Example:\n```text\ncurl -i -X POST \\\n  https://subdomain.okta.com/oauth2/v1/bc/authorize \\\n  -H 'Content-Type: application/x-www-form-urlencoded' \\\n  -d client_id=0jrabyQWm4B9zVJPbotY \\\n  -d client_secret=6W7XvLCrs4ByKn7Ucwh8ygeeXRhdGFdVOTp75eOc \\\n  -d scope=openid \\\n  -d 'binding_message=Signing in from device' \\\n  -d login_hint=john.doe@example.com\n```\n\nExample:\n```text\n{\n  \"auth_req_id\": \"ftJwF5ZwW2SGPPoTQEKtAr_U8_Ek3RvWyR\",\n  \"expires_in\": 300,\n  \"interval\": 5\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:40.875Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":2,"totalLines":22,"estimatedTokens":122}}36{"id":"doc-token-b5e43145","source":"documentation","title":"/token","url":"https://developer.okta.com/docs/api/openapi/okta-oauth/oauth/orgas/token","text":"Example:\n```text\ncurl -i -X POST \\\n  https://subdomain.okta.com/oauth2/v1/token \\\n  -H 'Content-Type: application/x-www-form-urlencoded' \\\n  -d client_id=0jrabyQWm4B9zVJPbotY \\\n  -d client_secret=6W7XvLCrs4ByKn7Ucwh8ygeeXRhdGFdVOTp75eOc \\\n  -d grant_type=authorization_code \\\n  -d redirect_uri=https://www.example.com/oauth2/redirectUri \\\n  -d 'code=QnowT-aeawtOJKp-MtkH&'\n```\n\nExample:\n```text\n{\n  \"access_token\": \"<access_token_value>\",\n  \"token_type\": \"Bearer\",\n  \"expires_in\": 3600,\n  \"scope\": \"openid email offline_access\",\n  \"refresh_token\": \"a9VpZDRCeFh3Nkk2VdY\",\n  \"id_token\": \"<id_token_example>\"\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:40.877Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":2,"totalLines":25,"estimatedTokens":157}}37{"id":"doc-replace_a_trusted_origin-7f9f6bee","source":"documentation","title":"Replace a trusted origin","url":"https://developer.okta.com/docs/api/openapi/okta-management/management/tags/trustedorigin/other/replacetrustedorigin","text":"Example:\n```text\ncurl -i -X PUT \\\n  https://subdomain.okta.com/api/v1/trustedOrigins/7j2PkU1nyNIDe26ZNufR \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"value\": {\n      \"id\": \"tosue7JvguwJ7U6kz0g3\",\n      \"name\": \"Updated Example trusted origin\",\n      \"origin\": \"http://updated.example.com\",\n      \"scopes\": [\n        {\n          \"type\": \"CORS\"\n        },\n        {\n          \"type\": \"REDIRECT\"\n        }\n      ],\n      \"status\": \"ACTIVE\",\n      \"created\": \"2017-12-16T05:01:12.000Z\",\n      \"createdBy\": \"00ut5t92p6IEOi4bu0g3\",\n      \"lastUpdated\": \"2017-12-16T05:01:12.000Z\",\n      \"lastUpdatedBy\": \"00ut5t92p6IEOi4bu0g3\",\n      \"_links\": {\n        \"self\": {\n          \"href\": \"https://${yourOktaDomain}/api/v1/trustedOrigins/tosue7JvguwJ7U6kz0g3\",\n          \"hints\": {\n            \"allow\": [\n              \"GET\",\n              \"PUT\",\n              \"DELETE\"\n            ]\n          }\n        },\n        \"deactivate\": {\n          \"href\": \"https://${yourOktaDomain}/api/v1/trustedOrigins/tosue7JvguwJ7U6kz0g3/lifecycle/deactivate\",\n          \"hints\": {\n            \"allow\": [\n              \"POST\"\n            ]\n          }\n        }\n      }\n    }\n  }'\n```\n\nExample:\n```text\n{\n  \"value\": {\n    \"id\": \"tosue7JvguwJ7U6kz0g3\",\n    \"name\": \"Updated Example trusted origin\",\n    \"origin\": \"http://updated.example.com\",\n    \"scopes\": [ … ],\n    \"status\": \"ACTIVE\",\n    \"created\": \"2017-12-16T05:01:12.000Z\",\n    \"createdBy\": \"00ut5t92p6IEOi4bu0g3\",\n    \"lastUpdated\": \"2017-12-16T05:01:12.000Z\",\n    \"lastUpdatedBy\": \"00ut5t92p6IEOi4bu0g3\",\n    \"_links\": { … }\n  }\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:40.912Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":2,"totalLines":66,"estimatedTokens":397}}38{"id":"doc-retrieve_a_user_schema-912c1527","source":"documentation","title":"Retrieve a user schema","url":"https://developer.okta.com/docs/api/openapi/okta-management/management/tags/schema/other/getuserschema","text":"Example:\n```text\ncurl -i -X GET \\\n  'https://subdomain.okta.com/api/v1/meta/schemas/user/{schemaId}'\n```\n\nExample:\n```text\n{\n  \"id\": \"https://{yourOktaDomain}/meta/schemas/user/oscmlha7lcRyMn82P1d7\",\n  \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n  \"name\": \"user\",\n  \"title\": \"An Okta user\",\n  \"lastUpdated\": \"2015-09-05T10:40:45.000Z\",\n  \"created\": \"2015-02-02T10:27:36.000Z\",\n  \"definitions\": {\n    \"base\": { … },\n    \"custom\": { … }\n  },\n  \"type\": \"object\",\n  \"properties\": {\n    \"profile\": { … }\n  }\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:40.917Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":2,"totalLines":27,"estimatedTokens":133}}39{"id":"doc-deactivate_a_behavior_detection_rule-2e98fb8c","source":"documentation","title":"Deactivate a behavior detection rule","url":"https://developer.okta.com/docs/api/openapi/okta-management/management/tags/behavior/other/deactivatebehaviordetectionrule","text":"Example:\n```text\ncurl -i -X POST \\\n  https://subdomain.okta.com/api/v1/behaviors/abcd1234/lifecycle/deactivate\n```\n\nExample:\n```text\n{\n  \"id\": \"abcd1234\",\n  \"name\": \"My Behavior Rule\",\n  \"type\": \"VELOCITY\",\n  \"settings\": {\n    \"velocityKph\": 805\n  },\n  \"status\": \"ACTIVE\",\n  \"created\": \"2021-11-09 20:38:10.0\",\n  \"lastUpdated\": \"2021-11-11 20:38:10.0\",\n  \"_link\": {\n    \"self\": { … }\n  }\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:40.919Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":2,"totalLines":25,"estimatedTokens":102}}40{"id":"doc-upsert_the_custom_domain_s_certificate-7e80ee1c","source":"documentation","title":"Upsert the custom domain's certificate","url":"https://developer.okta.com/docs/api/openapi/okta-management/management/tags/customdomain/other/upsertcertificate","text":"Example:\n```text\ncurl -i -X PUT \\\n  https://subdomain.okta.com/api/v1/domains/OmWNeywfTzElSLOBMZsL/certificate \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"certificate\": \"\\\"-----BEGIN CERTIFICATE-----\\\\nMIIFNzCCBB+gAwIBAgHTAAXomJWRama3ypu8TIxdA9wzMA0GCSqGSIb3DQEBCwUA\\\\nMDIzCzAJCgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MQswCQYDVQQD\\\\nEwJSMzAeFw0yMTAyMTAwNTEzMDVaFw0yMTA1MTEwNTEzMDVaMCQxIjAgBgNVBAMT\\\\nGWFuaXRhdGVzdC5zaWdtYW5ldGNvcnAudXMwggEiMA0GCSqGSIb3DQEBAQUAA4IB\\\\nDwAwggEKAoIBAQC5cyk6x63iBJSWvtgsOBqIxfO8euPHcRnyWsL9dsvnbNyOnyvc\\\\nqFWxdiW3sh2cItzYtoN1Zfgj5lWGOVXbHxP0VaNG9fHVX3+NHP6LFHQz92BzAYQm\\\\npqi9zaP/aKJklk6LdPFbVLGhuZfm34+ijW9YsgLTKR2WTaZJK5QtamVVmP+VsSCl\\\\na2ifFzjz2FCkMMEc/Y0zUyP+en/mbL71K+VnpZdlEC1s38EvjRTFKFZTKVw5wpWg\\\\nCZQq/AZYj9RxR23IIuRcUJ8TQ2pyoc3kIXPWjiIarSgBlA8G9kCsxgzXP2RyLwKr\\\\nIBIo+qyHweifpPYW28ipdSbPjiypAMdpbGLDAgMBAAGjggJTMIICTzAOBgNVHQ8B\\\\nAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAwGA1UdEwEB\\\\n/wQCMAAwHQYDVR0OBBYEFPVZKiovtIK4Av/IBUQeLUs29pT6MB8GA1UdIwQYMBaA\\\\nFBQusxe3WFbLrlAJQOYfr52LFMLGMFUGCCsGAQUFBwEBBEkwRzAhBggrBgEFBQcw\\\\nAYYVaHR0cDovL3IzLm8ubGVuY3Iub3JnMCIGCCsGAQUFBzAChhZodHRwOi8vcjMu\\\\naS5sZW5jci5vcmcvMCQGA1UdEQQdMBuCGWFuaXRhdGVzdC5zaWdtYW5ldGNvcnAu\\\\ndXMwTAYDVR0gBEUwQzAIBgZngQwBAgEwNwYLKwYBBAGC3xMBAQEwKDAmBggrBgEF\\\\nBQcCARYaaHR0cDovL2Nwcy5sZXRzZW5jcnlwdC5vcmcwggEDBgorBgEEAdZ5AgQC\\\\nBIH0BIHxAO8AdgBc3EOS/uarRUSxXprUVuYQN/vV+kfcoXOUsl7m9scOygAAAXeK\\\\nkmOsAAAEAwBHMEUCIQDSudPEWXk969BT8yz3ag6BJWCMRU5tefEw9nXEQMsh5gIg\\\\nUmfGIuUlcNNI5PydVIHj+zns+SR8P7zfd3FIxW4gK0QAdQD2XJQv0XcwIhRUGAgw\\\\nlFaO400TGTO/3wwvIAvMTvFk4wAAAXeKkmOlAAAEAwBGMEQCIHQkr2qOGuInvonv\\\\nW4vvdI61nraax5V6SC3E0D2JSO91AiBVhpX4BBafRAh36r7l8LrxAfxBM3CjBmAC\\\\nq8fUrWfIWDANBgkqhkiG9w0BAQsFAAOCAQEAgGDMKXofKpDdv5kkID3s5GrKdzaj\\\\njFmb/6kyqd1E6eGXZAewCP1EF5BVvR6lBP2aRXiZ6sJVZktoIfztZnbxBGgbPHfv\\\\nR3iXIG6fxkklzR9Y8puPMBFadANE/QV78tIRAlyaqeSNsoxHi7ssQjHTP111B2lf\\\\n3KmuTpsruut1UesEJcPReLk/1xTkRx262wAncach5Wp+6GWWduTZYJbsNFyrK1RP\\\\nYQ0qYpP9wt2qR+DGaRUBG8i1XLnZS8pkyxtKhVw/a5Fowt+NqCpEBjjJiWJRSGnG\\\\nNSgRtSXq11j8O4JONi8EXe7cEtvzUiLR5PL3itsK2svtrZ9jIwQ95wOPaA==\\\\n-----END CERTIFICATE-----\\\",\",\n    \"certificateChain\": \"\\\"-----BEGIN CERTIFICATE-----\\\\nMIIFPjCCBCbjAwIBAgISA7RikMltj36DkLk1DUzjwfYBMA0GCSqGSIb3DQEBCwUA\\\\nMDIxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MQswCQYDVQQD\\\\nEwJSMzAeFw0yMTEwMTExOTQ3MjRaFw0yMjAxMDkxOTQ3MjNaMCgxJjAkBgNVBAMT\\\\nHWFuaXRhdGVzdHJhaW4uc2lnbWFuZXRjb3JwLnVzMIIBIjANBgkqhkiG9w0BAQEF\\\\nAAOCAQ8AMIIBCgKCAQEA40EsG7YrFlsH3XdZKirdKKOC7/cca5g9L4rwyA/PlfeU\\\\nB7mJhbQI/a3yZbtY+GjHmedBx15aPtyq+NFZLOkiRCXx0k2zNIJB4yC6Jr/Yp8C2\\\\nrXO6mrCcuqpX7SuDPBtrfdYcIg8G6m0wjj1V1p2/XR8G//CBe8I2XTaTpHsx/VC8\\\\nMNOAA27aSbeX4Nz6TQ69rFuxRG+neUbcz2hQKwroCsCHi6iBmqRkg19Uh8315Cx2\\\\nBUqY0JecpP42KMiktzIoSlqS9yZSuNQh1kP1tPwkEzbs/t3FrfCnnRx5RDr2pJpV\\\\nnonL3sB3TVotS3nFgPNHCfp65O0Bg/3ZpU9IvUpcdQIDAQABo4ICVjCCAlIwDgYD\\\\nVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAMBgNV\\\\nHRMBAf8EAjAAMB0GA1UdDgQWBBSzWt3Dvp71cKA2Z54ESjjyM4dp+jAfBgNVHSME\\\\nGDAWgBQULrMXt1hWy65QCUDmH6+dixTCxjBVBggrBgEFBQcBAQRJMEcwIQYIKwYB\\\\nBQUHMAGGFWh0dHA6Ly9yMy5vLmxlbmNyLm9yZzAiBggrBgEFBQcwAoYWaHR0cDov\\\\nL3IzLmkubGVuY3Iub3JnLzAoBgNVHREEITAfgh1hbml0YXRlc3RyYWluLnNpZ21h\\\\nbmV0Y29ycC51czBMBgNVHSAERTBDMAgGBmeBDAECATA3BgsrBgEEAYLfEwEBATAo\\\\nMCYGCCsGAQUFBwIBFhpodHRwOi8vY3BzLmxldHNlbmNyeXB0Lm9yZzCCAQIGCisG\\\\nAQQB1nkCBAIEgfMEgfAA7gB1AG9Tdqwx8DEZ2JkApFEV/3cVHBHZAsEAKQaNsgia\\\\nN9kTAAABfHEcLqAAAAQDAEYwRAIgMlyQ61FjuIKDfATjz0wfkskChD0csVe0TStq\\\\nmC7NbLACICp3CYMvvDiWt1pr5pzCwTQO8F6v0/qNjmH4mjCutAgyAHUARqVV63X6\\\\nkSAwtaKJafTzfREsQXS+/Um4havy/HD+bUcAAAF8cRwvRAAABAMARjBEAiAZd6Vn\\\\n7MLXT7JeIxZrfbNARrf5oCM4UAVjjJeaUhB1MwIgSLW5cVAZvkiwbQW+vIutFjBz\\\\na8cNb/i+nM7RxFW+JPgwDQYJKoZIhvcNAQELBQADggEBAIlHZiHIuOvYFteqpwvR\\\\n0ElqinIpkYsfI+0O5FwHBXz7vMCPGtfdlcX5M10eW3aEBo9lR59mjDMsMufbTb60\\\\nJuSnguelkUoq4WzqjZI+2uy/FTztI5GPpXmXW3IyzbqmCWQt7u8N607g1TYLBaLL\\\\nrbFIhl+LbTJAa//mxI6bb4l/86j/kSjht6U0OIde7ylscb+3MHobbpIWJYp8Jr1D\\\\nubm/0glL46ExnuLbIKojLhDBnG/wHVunB0rJxGh1vPvwD75O1nSIdxuNlVcGwws+\\\\n7wsOyPA1s0VWzrMN1olLMyIPFCwPvfCm1E8Dje1AXMpmyDlqjEoQsoMUH//GKF0S\\\\nTgM=\\\\n-----END CERTIFICATE-----\\\\n-----BEGIN CERTIFICATE-----\\\\nMIIFFjCCAv6gAwIBAgIRAJErCErPDBinU/bWLiWnX1owDQYJKoZIhvcNAQELBQAw\\\\nTzELMAkGA1UEBhMCVVMxKTAnBgNVBAoTIEludGVybmV0IFNlY3VyaXR5IFJlc2Vh\\\\ncmNoIEdyb3VwMRUwEwYDVQQDEwxJU1JHIFJvb3QgWDEwHhcNMjAwOTA0MDAwMDAw\\\\nWhcNMjUwOTE1MTYwMDAwWjAyMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNTGV0J3Mg\\\\nRW5jcnlwdDELMAkGA1UEAxMCUjMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK\\\\nAoIBAQC7AhUozPaglNMPEuyNVZLD+ILxmaZ6QoinXSaqtSu5xUyxr45r+XXIo9cP\\\\nR5QUVTVXjJ6oojkZ9YI8QqlObvU7wy7bjcCwXPNZOOftz2nwWgsbvsCUJCWH+jdx\\\\nsxPnHKzhm+/b5DtFUkWWqcFTzjTIUu61ru2P3mBw4qVUq7ZtDpelQDRrK9O8Zutm\\\\nNHz6a4uPVymZ+DAXXbpyb/uBxa3Shlg9F8fnCbvxK/eG3MHacV3URuPMrSXBiLxg\\\\nZ3Vms/EY96Jc5lP/Ooi2R6X/ExjqmAl3P51T+c8B5fWmcBcUr2Ok/5mzk53cU6cG\\\\n/kiFHaFpriV1uxPMUgP17VGhi9sVAgMBAAGjggEIMIIBBDAOBgNVHQ8BAf8EBAMC\\\\nAYYwHQYDVR0lBBYwFAYIKwYBBQUHAwIGCCsGAQUFBwMBMBIGA1UdEwEB/wQIMAYB\\\\nAf8CAQAwHQYDVR0OBBYEFBQusxe3WFbLrlAJQOYfr52LFMLGMB8GA1UdIwQYMBaA\\\\nFHm0WeZ7tuXkAXOACIjIGlj26ZtuMDIGCCsGAQUFBwEBBCYwJDAiBggrBgEFBQcw\\\\nAoYWaHR0cDovL3gxLmkubGVuY3Iub3JnLzAnBgNVHR8EIDAeMBygGqAYhhZodHRw\\\\nOi8veDEuYy5sZW5jci5vcmcvMCIGA1UdIAQbMBkwCAYGZ4EMAQIBMA0GCysGAQQB\\\\ngt8TAQEBMA0GCSqGSIb3DQEBCwUAA4ICAQCFyk5HPqP3hUSFvNVneLKYY611TR6W\\\\nPTNlclQtgaDqw+34IL9fzLdwALduO/ZelN7kIJ+m74uyA+eitRY8kc607TkC53wl\\\\nikfmZW4/RvTZ8M6UK+5UzhK8jCdLuMGYL6KvzXGRSgi3yLgjewQtCPkIVz6D2QQz\\\\nCkcheAmCJ8MqyJu5zlzyZMjAvnnAT45tRAxekrsu94sQ4egdRCnbWSDtY7kh+BIm\\\\nlJNXoB1lBMEKIq4QDUOXoRgffuDghje1WrG9ML+Hbisq/yFOGwXD9RiX8F6sw6W4\\\\navAuvDszue5L3sz85K+EC4Y/wFVDNvZo4TYXao6Z0f+lQKc0t8DQYzk1OXVu8rp2\\\\nyJMC6alLbBfODALZvYH7n7do1AZls4I9d1P4jnkDrQoxB3UqQ9hVl3LEKQ73xF1O\\\\nyK5GhDDX8oVfGKF5u+decIsH4YaTw7mP3GFxJSqv3+0lUFJoi5Lc5da149p90Ids\\\\nhCExroL1+7mryIkXPeFM5TgO9r0rvZaBFOvV2z0gp35Z0+L4WPlbuEjN/lxPFin+\\\\nHlUjr8gRsI3qfJOQFy/9rKIJR0Y/8Omwt/8oTWgy1mdeHmmjk7j1nYsvC9JSQ6Zv\\\\nMldlTTKB3zhThV1+XWYp6rjd5JW1zbVWEkLNxE7GJThEUG3szgBVGP7pSWTUTsqX\\\\nnLRbwHOoq7hHwg==\\\\n-----END CERTIFICATE-----\\\\n-----BEGIN CERTIFICATE-----\\\\nMIIFYDCCBEigAwIBAgIQQAF3ITfU6UK47naqPGQKtzANBgkqhkiG9w0BAQsFADA/\\\\nMSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMT\\\\nDkRTVCBSb290IENBIFgzMB4XDTIxMDEyMDE5MTQwM1oXDTI0MDkzMDE4MTQwM1ow\\\\nTzELMAkGA1UEBhMCVVMxKTAnBgNVBAoTIEludGVybmV0IFNlY3VyaXR5IFJlc2Vh\\\\ncmNoIEdyb3VwMRUwEwYDVQQDEwxJU1JHIFJvb3QgWDEwggIiMA0GCSqGSIb3DQEB\\\\nAQUAA4ICDwAwggIKAoICAQCt6CRz9BQ385ueK1coHIe+3LffOJCMbjzmV6B493XC\\\\nov71am72AE8o295ohmxEk7axY/0UEmu/H9LqMZshftEzPLpI9d1537O4/xLxIZpL\\\\nwYqGcWlKZmZsj348cL+tKSIG8+TA5oCu4kuPt5l+lAOf00eXfJlII1PoOK5PCm+D\\\\nLtFJV4yAdLbaL9A4jXsDcCEbdfIwPPqPrt3aY6vrFk/CjhFLfs8L6P+1dy70sntK\\\\n4EwSJQxwjQMpoOFTJOwT2e4ZvxCzSow/iaNhUd6shweU9GNx7C7ib1uYgeGJXDR5\\\\nbHbvO5BieebbpJovJsXQEOEO3tkQjhb7t/eo98flAgeYjzYIlefiN5YNNnWe+w5y\\\\nsR2bvAP5SQXYgd0FtCrWQemsAXaVCg/Y39W9Eh81LygXbNKYwagJZHduRze6zqxZ\\\\nXmidf3LWicUGQSk+WT7dJvUkyRGnWqNMQB9GoZm1pzpRboY7nn1ypxIFeFntPlF4\\\\nFQsDj43QLwWyPntKHEtzBRL8xurgUBN8Q5N0s8p0544fAQjQMNRbcTa0B7rBMDBc\\\\nSLeCO5imfWCKoqMpgsy6vYMEG6KDA0Gh1gXxG8K28Kh8hjtGqEgqiNx2mna/H2ql\\\\nPRmP6zjzZN7IKw0KKP/32+IVQtQi0Cdd4Xn+GOdwiK1O5tmLOsbdJ1Fu/7xk9TND\\\\nTwIDAQABo4IBRjCCAUIwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYw\\\\nSwYIKwYBBQUHAQEEPzA9MDsGCCsGAQUFBzAChi9odHRwOi8vYXBwcy5pZGVudHJ1\\\\nc3QuY29tL3Jvb3RzL2RzdHJvb3RjYXgzLnA3YzAfBgNVHSMEGDAWgBTEp7Gkeyxx\\\\n+tvhS5B1/8QVYIWJEDBUBgNVHSAETTBLMAgGBmeBDAECATA/BgsrBgEEAYLfEwEB\\\\nATAwMC4GCCsGAQUFBwIBFiJodHRwOi8vY3BzLnJvb3QteDEubGV0c2VuY3J5cHQu\\\\nb3JnMDwGA1UdHwQ1MDMwMaAvoC2GK2h0dHA6Ly9jcmwuaWRlbnRydXN0LmNvbS9E\\\\nU1RST09UQ0FYM0NSTC5jcmwwHQYDVR0OBBYEFHm0WeZ7tuXkAXOACIjIGlj26Ztu\\\\nMA0GCSqGSIb3DQEBCwUAA4IBAQAKcwBslm7/DlLQrt2M51oGrS+o44+/yQoDFVDC\\\\n5WxCu2+b9LRPwkSICHXM6webFGJueN7sJ7o5XPWioW5WlHAQU7G75K/QosMrAdSW\\\\n9MUgNTP52GE24HGNtLi1qoJFlcDyqSMo59ahy2cI2qBDLKobkx/J3vWraV0T9VuG\\\\nWCLKTVXkcGdtwlfFRjlBz4pYg1htmf5X6DYO8A4jqv2Il9DjXA6USbW1FzXSLr9O\\\\nhe8Y4IWS6wY7bCkjCWDcRQJMEhg76fsO3txE+FiYruq9RUWhiF1myv4Q6W+CyBFC\\\\nDfvp7OOGAN6dEOM4+qR9sdjoSYKEBpsr6GtPAQw4dy753ec5\\\\n-----END CERTIFICATE-----\\\"\",\n    \"privateKey\": \"\\\"-----BEGIN PRIVATE KEY-----\\\\nMIIEvgIBADANBgkqhkiG9w0AAQEFAASCBKgwghSkAgEAAoIBAQC5cyk6y63iBJSW\\\\nstgsOBqIxfO8euPHcRnyWsL9dsvnbNyOnyvcqFWxdiW3sh2cItzYtoN1Zfgj5lWG\\\\nOVXbHxP0VaNG9fHVX3+NHP6LFHQz92BzAYQmpqi9zaP/aKJklk6LdPFbVLGhuZfm\\\\n34+ijW9YsgLTKR2WTaZJK5QtamVVmP+VsSCla2ifFzjz2FCkMMEc/Y0zUyP+en/m\\\\nbL71K+VnpZdlEC1s38EvjRTFKFZTKVw5wpWgCZQq/AZYj9RxR23IIuRcUJ8TQ2py\\\\noc3kIXPWjiIarSgBlA8G9kCsxgzXP2RyLwKrIBIo+qyHweifpPYW28ipdSbPjiyp\\\\nAMdpbGLDAgMBAAECggEAUXVfT91z6IqghhKwO8QtC5T/+fN06B8rCYSKj/FFoZL0\\\\n0oTiLFuYwImoCadoUDQUE/Efj0rKE2LSgFHg/44IItQXE01m+5WmHmL1ADxsyoLH\\\\nz9yDosKj7jNM7RyV8F8Bg0pL1hU+rU4rhhL/MaS0mx4eFYjC4UmcWBmXTdelSVJa\\\\nkvXvQLT5y86bqh7tqMjM/kALTWRz5CgNJFk/ONA1yo5RTX9S7SIXimBgAvuGqP8i\\\\nMPEhJou7U3DfzXVfvP8byqNdsZs6ZNhG3wXspl61mRyrY+51SOaNLA7Bkji7x4bH\\\\nNw6mJI0IJTAP9oc1Z8fYeMuxT1bfuD7VOupSP0mAMQKBgQDk+KuyQkmPymeP/Wwu\\\\nII4DUpleVzxTK9obMQQoCEEElbQ6+jTb+8ixP0bWLvBXg/rX734j7OWfn/bljWLH\\\\nXLrSoqQZF1+XMVeY4g4wx9UuTK/D2n791zdOgQivxbIPdWL3a4ap86ar8uyMgJu8\\\\nBLXfFBAOc+9myqUkbeO7wt0e6QKBgQDPV04jPtIJoMrggpQDNreGrANKOmsXWxj4\\\\nOHW13QNdJ2KGQpoTdoqQ8ZmlxuA8Bf2RjHsnB2kgGVTVQR74zRib4MByhvsdhvVm\\\\nF2LNsJoIDfqtv3c+oj13VonRUGuzUeJpwT/snyaL+jQ/ZZcYz0jDgDhIODTcFYj8\\\\nDMSD5SHgywKBgHH6MwWuJ44TNBAiF2qyu959jGjAxf+k0ZI9iRMgYLUWjDvbdtqW\\\\ncCWDGRDfFraJtSEuTz003GzkJPPJuIUC7OCTI1p2HxhU8ITi6itwHfdJJyk4J4TW\\\\nT+qdIqTUpTk6tsPw23zYE3x+lS+viVZDhgEArKl1HpOthh0nMnixnH6ZAoGBAKGn\\\\nV+xy1h9bldFk/TFkP8Jn6ki9MzGKfPVKT7vzDORcCJzU4Hu8OFy5gSmW3Mzvfrsz\\\\n4/CR/oxgM5vwoc0pWr5thJ3GT5K93iYypX3o6q7M91zvonDa3UFl3x2qrc2pUfVS\\\\nDhzWGJ+Z+5JSCnP1aK3EEh18dPoCcELTUYPj6X3xAoGBALAllTb3RCIaqIqk+s3Y\\\\n6KDzikgwGM6j9lmOI2MH4XmCVym4Z40YGK5nxulDh2Ihn/n9zm13Z7ul2DJwgQSO\\\\n0zBc7/CMOsMEBaNXuKL8Qj4enJXMtub4waQ/ywqHIdc50YaPI5Ax8dD/10h9M6Qc\\\\nnUFLNE8pXSnsqb0eOL74f3uQ\\\\n-----END PRIVATE KEY-----\\\"\",\n    \"type\": \"PEM\"\n  }'\n```\n\nExample:\n```text\nNo content\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:40.922Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":2,"totalLines":19,"estimatedTokens":2454}}41{"id":"doc-org_governance_settings-4ed2e921","source":"documentation","title":"Org Governance Settings","url":"https://developer.okta.com/docs/api/iga/openapi/governance-production-reference/org-governance-settings","text":"Example:\n```text\ncurl -i -X GET \\\n  https://subdomain.okta.com/governance/api/v1/settings\n```\n\nExample:\n```text\n{\n  \"delegates\": {\n    \"enduser\": { … }\n  }\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:41.789Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":2,"totalLines":16,"estimatedTokens":44}}42{"id":"doc-drop_in_ui-8bcbc3f1","source":"documentation","title":"Drop-in UI","url":"https://developer.paypal.com/braintree/docs/start/drop-in","text":"Braintree a PayPal ServiceSDK DocsDrop-in UISDK DocsAPI & In-Person DocsSupport ArticlesSearchGet HelpContact SalesCreate AccountLoginProduction Control PanelLoginBecome a MerchantContact SalesAboutGet StartedGuidesReference\n\nGet StartedOverviewSet Up Your ClientSimple ServerGo LiveCheckout UIsDrop-in UIHosted FieldsTutorials & ExamplesDrop-in TutorialHosted Fields TutorialExample Integrations with Drop-inUsing the ExamplesJava (Spring).NET (ASP.NET)Node.js (Express)PHPPHP (Slim)Python (Flask)Ruby (Rails)Checkout UIs/Drop-in UIAsk ChatGPTDrop-in UI Our Drop-in UI is a ready-made payment UI that offers the quickest way to integrate and start securely accepting payments with Braintree. Quick, easy integrationsQuickly integrate Drop-in into your app or website's checkout flow.User-friendly, customizable UICustomize the checkout form to meet your needs and fit your brand requirements.Accept PayPal, cards, and moreEasily add new payment method types to your form.Try it outwith CodePenTry a live version of our JavaScript Drop-in UI. Open on CodePen TutorialGet your own Drop-in working in 20 minutes. Do the tutorial Drop-in and your serverWe provide complementary client- and server-side SDKs to complete your client SDKs enable you to collect payment method (e.g. credit card, PayPal) details. The server SDKs manage requests from your server to the Braintree gateway. Read about the server SDKs Integrate Drop-inStep-by-stepSet up your server with one of our server SDKs in the language of your choice. Set up your client to use Drop-in with one of our client SDKs. Consider configuring other payment methods, like PayPal, Venmo, or Apple Pay to complete your integration. If the Drop-in UI doesn't fit your needs, explore Hosted Fields or build your own custom integration using our client SDKs to have full control over the checkout process. On this pageGet help from a humanSubmit a request for help with your PayPal Braintree sandbox or production account.Get HelpGet StartedIntegration GuideTutorial (Preview)Checkout UIsExample IntegrationsBasicsClient AuthorizationSingle-use TokenCustomersPayment MethodsTransactionsPayment Method TypesOverviewACH Direct DebitApple PayCredit CardsGoogle PayPayPalVenmoSecure Remote CommerceTools3D SecurePremium Fraud Management ToolsClient SDKDisputesPayment Request APIReportsWebhooksCheckout UIDrop-in UIHosted FieldsAdditional FeaturesBraintree Auth (Beta)Braintree MarketplaceGrant API (Beta)OAuth (Beta)PayPal HereRecurring BillingAPI ReferenceClient ReferencesServer-side API RequestsServer-side Response ObjectsGeneralBraintreepayments.comStatusAPIIn-PersonSupport ArticlesPrivacy PolicyLegalBraintree is a service of PayPal. © 2026 PayPal\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:43.048Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":0,"totalLines":5,"estimatedTokens":679}}43{"id":"doc-forward_api-4bccf4f9","source":"documentation","title":"Forward API","url":"https://developer.paypal.com/braintree/docs/reference/forward-api/overview/","text":"Braintree a PayPal ServiceSDK DocsOverviewSDK DocsAPI & In-Person DocsSupport ArticlesSearchGet HelpContact SalesCreate AccountLoginProduction Control PanelLoginBecome a MerchantContact SalesAboutGet StartedGuidesReference\n\nExample:\n```json\n{\n    \"payment_method_nonce\": \"fake-valid-nonce\",\n```\n\nExample:\n```bash\nPOST /post HTTP/1.1\nContent-Type: application/json\n...\n{\"card\": {\"number\": \"4012888888881881\"}}\n```\n\nExample:\n```bash\nHTTP/1.1 200 OK\nContent-Type: application/json\n...\n{\"i-am-the-body\": ...}\n```\n\nExample:\n```json\n{\n    \"status\": 200,\n    \"headers\": {\n        \"Content-Type\": \"application/json\",\n        ...\n    },\n    \"body\": {\n        \"i-am-the-body\": ...\n    },\n    \"request-time\": (milliseconds spent by the forward API making the request)\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:43.052Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":4,"totalLines":40,"estimatedTokens":194}}44{"id":"doc-opt_in_to_okta_user_communication_emails-331af3eb","source":"documentation","title":"Opt in to Okta user communication emails","url":"https://developer.okta.com/docs/api/openapi/okta-management/management/tags/orgsettingcommunication/other/optinuserstooktacommunicationemails","text":"Example:\n```text\ncurl -i -X POST \\\n  https://subdomain.okta.com/api/v1/org/privacy/oktaCommunication/optIn\n```\n\nExample:\n```text\n{\n  \"optOutEmailUsers\": false,\n  \"_links\": {\n    \"optOut\": { … }\n  }\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:41.836Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":2,"totalLines":17,"estimatedTokens":55}}45{"id":"doc-retrieve_an_api_service_integration_instance-8ed9e1a4","source":"documentation","title":"Retrieve an API service integration instance","url":"https://developer.okta.com/docs/api/openapi/okta-management/management/tags/apiserviceintegrations/other/getapiserviceintegrationinstance","text":"Example:\n```text\ncurl -i -X GET \\\n  https://subdomain.okta.com/integrations/api/v1/api-services/000lr2rLjZ6NsGn1P0g3\n```\n\nExample:\n```text\n[\n  \"okta.logs.read\"\n]\n```\n\nExample:\n```text\n{\n  \"id\": \"0oa72lrepvp4WqEET1d9\",\n  \"type\": \"my_app_cie\",\n  \"name\": \"My App Cloud Identity Engine\",\n  \"createdAt\": \"2023-02-21T20:08:24.000Z\",\n  \"createdBy\": \"00uu3u0ujW1P6AfZC2d5\",\n  \"configGuideUrl\": \"https://{docDomain}/my-app-cie/configuration-guide\",\n  \"grantedScopes\": [\n    \"okta.logs.read\",\n    \"okta.groups.read\",\n    \"okta.users.read\"\n  ],\n  \"_links\": {\n    \"self\": { … },\n    \"client\": { … },\n    \"logo\": { … }\n  }\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:41.837Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":3,"totalLines":36,"estimatedTokens":158}}46{"id":"doc-retrieve_the_okta_communication_settings-d5870109","source":"documentation","title":"Retrieve the Okta communication settings","url":"https://developer.okta.com/docs/api/openapi/okta-management/management/tags/orgsettingcommunication/other/getoktacommunicationsettings","text":"Example:\n```text\ncurl -i -X GET \\\n  https://subdomain.okta.com/api/v1/org/privacy/oktaCommunication\n```\n\nExample:\n```text\n{\n  \"optOutEmailUsers\": true,\n  \"_links\": {\n    \"optIn\": { … }\n  }\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:41.838Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":2,"totalLines":17,"estimatedTokens":52}}47{"id":"doc-revoke_okta_support_access-32b339aa","source":"documentation","title":"Revoke Okta Support access","url":"https://developer.okta.com/docs/api/openapi/okta-management/management/tags/orgsettingsupport/other/revokeoktasupport","text":"Example:\n```text\ncurl -i -X POST \\\n  https://subdomain.okta.com/api/v1/org/privacy/oktaSupport/revoke\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:41.839Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":1,"totalLines":7,"estimatedTokens":30}}48{"id":"doc-basic_sign_in_with_the_password_factor_okta_deve-6dec8792","source":"documentation","title":"Basic sign in with the password factor | Okta Developer","url":"https://developer.okta.com/docs/guides/oie-embedded-sdk-use-case-basic-sign-in/aspnet/main/","text":"Example:\n```csharp\nvar idxAuthClient = new IdxClient();\nvar authnOptions = new AuthenticationOptions()\n   {\n      Username = model.UserName,\n      Password = model.Password,\n   };\n\nvar authnResponse = await idxAuthClient\n   .AuthenticateAsync(authnOptions).ConfigureAwait(false);\n```\n\nExample:\n```csharp\nswitch (authnResponse.AuthenticationStatus)\n{\n   case AuthenticationStatus.Success:\n      ClaimsIdentity identity = await AuthenticationHelper\n         .GetIdentityFromTokenResponseAsync(\n            _idxClient.Configuration, authnResponse.TokenInfo);\n      _authenticationManager.SignIn(\n         new AuthenticationProperties { IsPersistent = model.RememberMe },\n         identity);\n      return RedirectToAction(\"Index\", \"Home\");\n\n   case AuthenticationStatus.PasswordExpired:\n      // User has to change their password\n\n   case AuthenticationStatus.AwaitingChallengeAuthenticatorSelection:\n      // User has to verify their identity with another authentication factor\n\n   default:\n      return View(\"Login\", model);\n}\n\nreturn View(view, model);\n```\n\nExample:\n```csharp\npublic static async Task<IEnumerable<Claim>> GetClaimsFromUserInfoAsync(\n   IdxConfiguration configuration, string accessToken)\n{\n   Uri userInfoUri = new Uri(\n      IdxUrlHelper.GetNormalizedUriString(configuration.Issuer, \"v1/userinfo\")\n   );\n   HttpClient httpClient = new HttpClient();\n\n   var userInfoResponse = await httpClient.GetUserInfoAsync(\n      new UserInfoRequest { \n         Address = userInfoUri.ToString(), Token = accessToken,\n      }\n   ).ConfigureAwait(false);\n\n   var nameClaim = new Claim(\n      ClaimTypes.Name,\n      userInfoResponse.Claims.FirstOrDefault(x => x.Type == \"name\")?.Value\n   );\n   return userInfoResponse.Claims.Append(nameClaim);\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:41.846Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":3,"totalLines":64,"estimatedTokens":441}}49{"id":"doc-retrieve_an_oauth_2_0_client_secret-831d3951","source":"documentation","title":"Retrieve an OAuth 2.0 client secret","url":"https://developer.okta.com/docs/api/openapi/okta-management/management/tags/applicationssopublickeys/other/getoauth2clientsecret","text":"Example:\n```text\ncurl -i -X GET \\\n  https://subdomain.okta.com/api/v1/apps/0oafxqCAJWWGELFTYASJ/credentials/secrets/ocs2f4zrZbs8nUa7p0g4\n```\n\nExample:\n```text\n{\n  \"id\": \"ocs2f50kZB0cITmYU0g4\",\n  \"status\": \"ACTIVE\",\n  \"client_secret\": \"DRUFXGF9XbLn......a3x3POBiIxDreBCdZuFs5B\",\n  \"secret_hash\": \"FpCwXwSjTRQNtEI11I00-g\",\n  \"created\": \"2023-04-06T21:32:33.000Z\",\n  \"lastUpdated\": \"2023-04-06T21:32:33.000Z\",\n  \"_links\": {\n    \"deactivate\": { … }\n  }\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:41.857Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":2,"totalLines":22,"estimatedTokens":117}}50{"id":"doc-delete_an_identity_source_user-8d0763e4","source":"documentation","title":"Delete an identity source user","url":"https://developer.okta.com/docs/api/openapi/okta-management/management/tags/identitysource/other/deleteidentitysourceuser","text":"Example:\n```text\ncurl -i -X DELETE \\\n  https://subdomain.okta.com/api/v1/identity-sources/0oa3l6l6WK6h0R0QW0g4/users/00u7m9p9ZT8k2S2EX1f7\n```\n\nExample:\n```text\nNo content\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:41.860Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":2,"totalLines":12,"estimatedTokens":47}}51{"id":"doc-list_all_identity_source_sessions-8880d97f","source":"documentation","title":"List all identity source sessions","url":"https://developer.okta.com/docs/api/openapi/okta-management/management/tags/identitysource/other/listidentitysourcesessions","text":"Example:\n```text\ncurl -i -X GET \\\n  https://subdomain.okta.com/api/v1/identity-sources/0oa3l6l6WK6h0R0QW0g4/sessions\n```\n\nExample:\n```text\n[\n  {\n    \"id\": \"aps1qqonvr2SZv6o70h8\",\n    \"identitySourceId\": \"0oa3l6l6WK6h0R0QW0g4\",\n    \"status\": \"CREATED\",\n    \"importType\": \"INCREMENTAL\",\n    \"created\": \"2022-04-04T15:56:05.000Z\",\n    \"lastUpdated\": \"2022-05-05T16:15:44.000Z\"\n  },\n  {\n    \"id\": \"aps1quck606ngubVq0h8\",\n    \"identitySourceId\": \"0oa3l6l6WK6h0R0QW0g4\",\n    \"status\": \"TRIGGERED\",\n    \"importType\": \"INCREMENTAL\",\n    \"created\": \"2022-04-04T16:56:05.000Z\",\n    \"lastUpdated\": \"2022-05-05T17:15:44.000Z\"\n  },\n  {\n    \"id\": \"aps1qzy2acb5jDlUc0h8\",\n    \"identitySourceId\": \"0oa3l6l6WK6h0R0QW0g4\",\n    \"status\": \"IN_PROGRESS\",\n    \"importType\": \"INCREMENTAL\",\n    \"created\": \"2022-04-04T17:56:05.000Z\",\n    \"lastUpdated\": \"2022-05-05T18:15:44.000Z\"\n  },\n  {\n    \"id\": \"aps1qqne8c1JHkMdF0h8\",\n    \"identitySourceId\": \"0oa3l6l6WK6h0R0QW0g4\",\n    \"status\": \"EXPIRED\",\n    \"importType\": \"INCREMENTAL\",\n    \"created\": \"2022-04-04T18:56:05.000Z\",\n    \"lastUpdated\": \"2022-05-05T19:15:44.000Z\"\n  },\n  {\n    \"id\": \"aps1qqonvr2SZv6o70h8\",\n    \"identitySourceId\": \"0oa3l6l6WK6h0R0QW0g4\",\n    \"status\": \"CLOSED\",\n    \"importType\": \"INCREMENTAL\",\n    \"created\": \"2022-04-04T19:56:05.000Z\",\n    \"lastUpdated\": \"2022-05-05T20:15:44.000Z\"\n  }\n]\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:41.872Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":2,"totalLines":53,"estimatedTokens":339}}52{"id":"doc-list_the_sub_access_items_for_an_access_item-a6e29134","source":"documentation","title":"List the sub-access items for an access item","url":"https://developer.okta.com/docs/api/iga/openapi/governance-production-enduser-reference/my-security-access-reviews/listmysecurityaccessreviewsubaccesses","text":"Example:\n```text\ncurl -i -X GET \\\n  'https://subdomain.okta.com/governance/api/v2/my/security-access-reviews/{securityAccessReviewId}/accesses/{securityAccessReviewAccessId}/sub-accesses?filter=name%20co%20%22Git%22&orderBy=priority%20desc&after=00u68w6vzKLultXS97g6&limit=20'\n```\n\nExample:\n```text\n{\n  \"data\": [\n    { … },\n    { … },\n    { … }\n  ],\n  \"_links\": {\n    \"self\": { … }\n  }\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:41.887Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":2,"totalLines":21,"estimatedTokens":102}}53{"id":"doc-generate_a_summary_for_a_security_access_review-2d8ab957","source":"documentation","title":"Generate a summary for a security access review","url":"https://developer.okta.com/docs/api/iga/openapi/governance-production-enduser-reference/my-security-access-reviews/generatemysecurityaccessreviewsummary","text":"Example:\n```text\ncurl -i -X POST \\\n  'https://subdomain.okta.com/governance/api/v2/my/security-access-reviews/{securityAccessReviewId}/summary'\n```\n\nExample:\n```text\n{\n  \"message\": \"This app's overall priority is: High\\nThe reasons why this app was assigned priority of High include:\\n1. Usage history (HIGH): The user has not accessed this application in the last 90 days.\\n2. Assignment method (HIGH): This user's assignment method differs from 75% of other users who have access to this application.\\n\"\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:41.888Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":2,"totalLines":14,"estimatedTokens":132}}54{"id":"doc-retrieve_the_request_fields_for_my_catalog_entry-a53cb4bb","source":"documentation","title":"Retrieve the request fields for my catalog entry","url":"https://developer.okta.com/docs/api/iga/openapi/governance-production-enduser-reference/my-catalogs/getmycatalogentryrequestfieldsv2","text":"Example:\n```text\ncurl -i -X GET \\\n  https://subdomain.okta.com/governance/api/v2/my/catalogs/default/entries/cenp2rjyxK1Js2Fc41d5/request-fields\n```\n\nExample:\n```text\n{\n  \"data\": [\n    { … }\n  ]\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:41.891Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":2,"totalLines":16,"estimatedTokens":54}}55{"id":"doc-add_an_org_to_your_account-c049ba92","source":"documentation","title":"Add an org to your account","url":"https://developer.okta.com/docs/api/openapi/aerial/aerial/orgs/addorg","text":"Example:\n```text\ncurl -i -X POST \\\n  'https://aerial-apac.okta.com/{accountId}/api/v1/orgs' \\\n  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"orgId\": \"00oy0itaI2Yi7XGGE0g3\",\n    \"cell\": \"ok1\"\n  }'\n```\n\nExample:\n```text\n{\n  \"accountId\": \"0227mkkf8ulgt48bkidcd8ekqft\",\n  \"name\": \"My Org 1\",\n  \"cell\": \"ok1\",\n  \"domain\": \"my-org-1.okta.com\",\n  \"status\": \"ACTIVE\",\n  \"aerialOrg\": false,\n  \"createdDate\": \"2023-12-08T20:15:18.000Z\",\n  \"id\": \"00o16fjDHCgFqob8n0g4\"\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:41.913Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":2,"totalLines":27,"estimatedTokens":133}}56{"id":"doc-delete_an_ai_agent_json_web_key-dbe854b9","source":"documentation","title":"Delete an AI agent JSON Web Key","url":"https://developer.okta.com/docs/api/secures-ai/openapi/secures-ai-workload-principals/tags/agentpublickey/other/deleteagentjwk","text":"Example:\n```text\ncurl -i -X DELETE \\\n  https://subdomain.okta.com/workload-principals/api/v1/ai-agents/wlpcFogtKCrK9aYq3fgV/credentials/jwks/pks2f4zrZbs8nUa7p0g4\n```\n\nExample:\n```text\nNo content\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:41.927Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":2,"totalLines":12,"estimatedTokens":53}}57{"id":"doc-remove_a_specific_capability_from_a_virtual_mcp_-62c58186","source":"documentation","title":"Remove a specific capability from a virtual MCP connection","url":"https://developer.okta.com/docs/api/secures-ai/openapi/secures-ai-workload-principals/tags/virtualmcpconnections/other/removevirtualmcpconnectioncapability","text":"Example:\n```text\ncurl -i -X DELETE \\\n  https://subdomain.okta.com/workload-principals/api/v1/virtual-mcp-servers/wlp1aB2cD3eF4gH5iJ6k/connections/mcn1a2b3c4d5e6f7g8h9/capabilities/vsc1aB2cD3eF4gH5iJ6k\n```\n\nExample:\n```text\nNo content\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:41.931Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":2,"totalLines":12,"estimatedTokens":63}}58{"id":"doc-refresh_the_mcp_server_metadata-8d04550d","source":"documentation","title":"Refresh the MCP server metadata","url":"https://developer.okta.com/docs/api/secures-ai/openapi/secures-ai-resource-servers/tags/mcpserverregistration/other/refreshmcpservermetadata","text":"Example:\n```text\ncurl -i -X POST \\\n  https://subdomain.okta.com/resource-servers/api/v1/mcp-servers/ems8nUa7p0g4zrZbs2f4/metadata/refresh\n```\n\nExample:\n```text\nNo content\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:41.935Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":2,"totalLines":12,"estimatedTokens":47}}59{"id":"doc-create_and_send_multiparty_invoices_paypal_devel-140642cd","source":"documentation","title":"Create and send multiparty invoices | PayPal Developer","url":"https://developer.paypal.com/platforms/invoicing","text":"Copy for LLMView as MarkdownCreate and send multiparty invoicesUse the PayPal Invoicing API to create and send multiparty invoices, manage refunds, reminders, templates, or QR codes.Last 24, 2026DOCSCURRENTIntegrate Invoicing API to your product UI to create invoices that resonate with your brand. You can create, send, and manage invoices using the invoicing API. It also supports refund requests, QR payment options, and customer reminders. How it works The merchant creates a draft invoice. The merchant sends a draft invoice and PayPal emails the customer an invoice link. Optionally, merchants can share the invoice link in an email they send to their customers. To view the invoice, the customer clicks the invoice link in the email. The customer securely pays with a credit card, debit card, PayPal, or PayPal Credit. Eligibility Invoicing is available in multiple countries. Choose an Invoicing solution Invoicing REST APICustomize Invoicing to fit into your product UIIf you have your product UI, you can customize the Invoicing API and integrate it into your product. No-code invoicing dashboardManage Invoicing from your PayPal Business account dashboardRecommended if you don't need to integrate Invoicing into your product UI.On this pageOn this pageHow it worksEligibilityChoose an Invoicing solutionInvoicing REST APINo-code invoicing dashboard\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:43.699Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":0,"totalLines":3,"estimatedTokens":344}}60{"id":"doc-samples_lead_form_webhook_google_for_developers-f71670ba","source":"documentation","title":"Samples | Lead Form Webhook | Google for Developers","url":"https://developers.google.com/google-ads/webhook/docs/samples","text":"Example:\n```text\n{\n  \"lead_id\":\"Cj0KCQjwit_8BRCoARIsAIx3Rj7g-AeL6z35IWb6VYiZUygtTfwD3hDlgSGmY-XTTlK3lfV1wcuIwIAaAmMxEALw_wcB\",\n  \"campaign_id\":123456,\n  \"gcl_id\":\"Cj0KCQjwit_8BRCoARIsAIx3Rj7g-AeL6z35IWb6VYiZUygtTfwD3hDlgSGmY-XTTlK3lfV1wcuIwIAaAmMxEALw_wcB\",\n  \"user_column_data\": [\n    {\n      \"column_name\":\"Full Name\",\n      \"string_value\":\"John Doe\",\n      \"column_id\": \"FULL_NAME\"\n    },\n    {\n      \"column_name\": \"User Phone\",\n      \"string_value\":\"+11234567890\",\n      \"column_id\":\"PHONE_NUMBER\"\n    }\n  ],\n  \"api_version\":\"1.0\",\n  \"form_id\":1234,\n  \"google_key\":\"xfdgdgsgfchgvhgfchg\",\n}\n```\n\nExample:\n```text\n{\n  \"lead_id\":\"Cj0KCQjwit_8BRCoARIsAIx3Rj7g-AeL6z35IWb6VYiZUygtTfwD3hDlgSGmY-XTTlK3lfV1wcuIwIAaAmMxEALw_wcB\",\n  \"campaign_id\":123456,\n  \"gcl_id\":\"Cj0KCQjwit_8BRCoARIsAIx3Rj7g-AeL6z35IWb6VYiZUygtTfwD3hDlgSGmY-XTTlK3lfV1wcuIwIAaAmMxEALw_wcB\",\n  \"user_column_data\": [\n    {\n      \"column_name\":\"Full Name\",\n      \"string_value\":\"John Doe\",\n      \"column_id\": \"FULL_NAME\"\n    },\n    {\n      \"column_name\": \"User Phone\",\n      \"string_value\":\"+11234567890\",\n      \"column_id\":\"PHONE_NUMBER\"\n    }\n  ],\n  \"api_version\":\"1.0\",\n  \"form_id\":1234,\n  \"Google_key\":\"xfdgdgsgfchgvhgfchg\",\n  \"is_test\":true\n}\n```\n\nExample:\n```text\n{\n  \"lead_id\":\"Cj0KCQjwit_8BRCoARIsAIx3Rj7g-AeL6z35IWb6VYiZUygtTfwD3hDlgSGmY-XTTlK3lfV1wcuIwIAaAmMxEALw_wcB\",\n  \"campaign_id\":123456,\n  \"gcl_id\":\"Cj0KCQjwit_8BRCoARIsAIx3Rj7g-AeL6z35IWb6VYiZUygtTfwD3hDlgSGmY-XTTlK3lfV1wcuIwIAaAmMxEALw_wcB\",\n  \"user_column_data\": [\n    {\n      \"column_name\":\"Full Name\",\n      \"string_value\":\"John Doe\",\n      \"column_id\": \"FULL_NAME\"\n    },\n    {\n      \"column_name\": \"User Email\",\n      \"string_value\":\"abc@xyz.com\",\n      \"column_id\":\"EMAIL\"\n    },\n    {\n      \"column_name\": \"User Phone\",\n      \"string_value\":\"+11234567890\",\n      \"column_id\":\"PHONE_NUMBER\"\n    },\n    {\n      \"column_name\": \"Postal Code\",\n      \"string_value\":\"94043\",\n      \"column_id\":\"POSTAL_CODE\"\n    }\n  ],\n  \"api_version\":\"1.0\",\n  \"form_id\":1234,\n  \"Google_key\":\"xfdgdgsgfchgvhgfchg\",\n  \"is_test\":true\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:50.165Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":3,"totalLines":85,"estimatedTokens":517}}61{"id":"doc-shipping_module-95bfde61","source":"documentation","title":"Shipping Module","url":"https://developer.paypal.com/braintree/docs/guides/paypal/features/shipping_module/","text":"Braintree a PayPal ServiceSDK Docs SDK DocsAPI & In-Person DocsSupport ArticlesSearchGet HelpContact SalesCreate AccountLoginProduction Control PanelLoginBecome a MerchantContact SalesAboutGet StartedGuidesReference\n\nExample:\n```bash\n// 1. Create a Braintree client instance\nbraintree.client.create(\n  { authorization: \"CLIENT_TOKEN_FROM_SERVER\" },\n  function (clientErr, clientInstance) {\n    if (clientErr) { console.error(\"Error creating client:\", clientErr); return; }\n\n    // 2. Create a PayPal Checkout component\n    braintree.paypalCheckout.create(\n      { client: clientInstance },\n      function (paypalCheckoutErr, paypalCheckoutInstance) {\n        if (paypalCheckoutErr) { console.error(\"Error:\", paypalCheckoutErr); return; }\n\n        // 3. Load the PayPal JS SDK\n        // IMPORTANT: currency and intent must match createPayment() below\n        paypalCheckoutInstance.loadPayPalSDK(\n          { currency: \"USD\", intent: \"capture\" },\n          function () {\n            // 4. Render PayPal buttons\n            paypal.Buttons({\n              fundingSource: paypal.FUNDING.PAYPAL,\n\n              createOrder: function () {\n                return paypalCheckoutInstance.createPayment({\n                  flow: \"checkout\",           // Required: must be 'checkout'\n                  amount: \"10.00\",            // Order subtotal\n                  currency: \"USD\",            // Must match loadPayPalSDK currency\n                  intent: \"capture\",          // Must match loadPayPalSDK intent\n                  enableShippingAddress: true,    // Required: displays shipping in paysheet\n                  shippingAddressEditable: true,  // Required: allows address changes\n                  shippingCallbackUrl: \"https://merchant.example.com/shipping-callback\",\n                });\n              },\n\n              onApprove: function (data, actions) {\n                return paypalCheckoutInstance.tokenizePayment(data, function (err, payload) {\n                  if (err) { console.error(\"Error tokenizing:\", err); return; }\n                  // Send payload.nonce to your server to create a transaction\n                  console.log(\"Payment nonce:\", payload.nonce);\n                });\n              },\n\n              onCancel: function (data) { console.log(\"Payment cancelled\", data); },\n              onError: function (err) { console.error(\"PayPal error:\", err); },\n            }).render(\"#paypal-button-container\");\n          }\n        );\n      }\n    );\n  }\n);\n```\n\nExample:\n```bash\n{\n  \"id\": \"2SM98888S4900545P\",\n  \"amount\": { \"value\": \"10.00\", \"currency_code\": \"USD\" },\n  \"item_total\": \"10.00\",\n  \"tax_total\": \"0.00\",\n  \"shipping\": \"0.00\",\n  \"shipping_address\": {\n    \"admin_area_2\": \"San Jose\",\n    \"admin_area_1\": \"CA\",\n    \"postal_code\": \"95131\",\n    \"country_code\": \"US\"\n  }\n}\n```\n\nExample:\n```bash\n{\n  \"id\": \"2SM98888S4900545P\",\n  \"amount\": { \"value\": \"15.00\", \"currency_code\": \"USD\" },\n  \"item_total\": \"10.00\",\n  \"tax_total\": \"2.00\",\n  \"shipping\": \"3.00\",\n  \"shipping_address\": {\n    \"admin_area_2\": \"San Jose\",\n    \"admin_area_1\": \"CA\",\n    \"postal_code\": \"95131\",\n    \"country_code\": \"US\"\n  },\n  \"shipping_option\": {\n    \"id\": \"standard\",\n    \"description\": \"Standard Shipping\",\n    \"type\": \"SHIPPING\",\n    \"amount\": { \"value\": \"3.00\", \"currency_code\": \"USD\" }\n  }\n}\n```\n\nExample:\n```json\n{\n  \"id\": \"2SM98888S4900545P\",\n  \"amount\": {\n    \"currency_code\": \"USD\",\n    \"value\": \"20.00\"\n  },\n  \"item_total\": \"20.00\",\n  \"shipping\": \"0.00\",\n  \"handling\": \"0.00\",\n  \"tax_total\": \"0.00\",\n  \"insurance\": \"0.00\",\n  \"shipping_discount\": \"0.00\",\n  \"discount\": \"0.00\",\n  \"shipping_options\": [\n    {\n      \"id\": \"1\",\n      \"description\": \"Free Shipping\",\n      \"type\": \"SHIPPING\",\n      \"selected\": true,\n      \"amount\": {\n        \"currency_code\": \"USD\",\n        \"value\": \"0.00\"\n      }\n    },\n    {\n      \"id\": \"2\",\n      \"description\": \"USPS Priority Shipping\",\n      \"type\": \"SHIPPING\",\n      \"selected\": false,\n      \"amount\": {\n        \"currency_code\": \"USD\",\n        \"value\": \"7.00\"\n      }\n    },\n    {\n      \"id\": \"3\",\n      \"description\": \"1-Day Shipping\",\n      \"type\": \"SHIPPING\",\n      \"selected\": false,\n      \"amount\": {\n        \"currency_code\": \"USD\",\n        \"value\": \"10.00\"\n      }\n    }\n  ]\n}\n```\n\nExample:\n```bash\nconst express = require(\"express\");\nconst app = express();\napp.use(express.json());\n\nconst SHIPPING_RATES = {\n  US: [\n    { id: \"free\",     description: \"Free Shipping (5-7 business days)\",     amount: \"0.00\",  type: \"SHIPPING\" },\n    { id: \"standard\", description: \"Standard Shipping (3-5 business days)\", amount: \"3.00\",  type: \"SHIPPING\" },\n    { id: \"express\",  description: \"Express Shipping (1-2 business days)\",  amount: \"10.00\", type: \"SHIPPING\" },\n  ],\n  CA: [\n    { id: \"standard_ca\", description: \"Standard to Canada (7-10 business days)\", amount: \"8.00\",  type: \"SHIPPING\" },\n    { id: \"express_ca\",  description: \"Express to Canada (3-5 business days)\",   amount: \"18.00\", type: \"SHIPPING\" },\n  ],\n};\n\nconst BLOCKED_COUNTRIES = [\"CU\", \"IR\", \"KP\", \"SY\"];\n\nfunction getTaxRate(state) {\n  return { CA: 0.0725, NY: 0.08, TX: 0.0625 }[state] || 0.05;\n}\n\napp.post(\"/shipping-callback\", (req, res) => {\n  const { id, amount, item_total, shipping_address, shipping_option } = req.body;\n\n  const country = shipping_address.country_code;\n\n  if (BLOCKED_COUNTRIES.includes(country)) {\n    return res.status(422).json({ name: \"UNPROCESSABLE_ENTITY\", details: [{ issue: \"COUNTRY_ERROR\" }] });\n  }\n\n  const options = SHIPPING_RATES[country];\n  if (!options) {\n    return res.status(422).json({ name: \"UNPROCESSABLE_ENTITY\", details: [{ issue: \"ADDRESS_ERROR\" }] });\n  }\n\n  // On the first callback, shipping_option is absent — default to first option\n  const selectedId = shipping_option?.id || options[0].id;\n  const selectedOption = options.find((o) => o.id === selectedId) || options[0];\n  const shippingCost = parseFloat(selectedOption.amount);\n\n  const itemTotal = parseFloat(item_total || amount.value);\n  const taxTotal = (itemTotal * getTaxRate(shipping_address.admin_area_1)).toFixed(2);\n  const total = (itemTotal + shippingCost + parseFloat(taxTotal)).toFixed(2);\n\n  return res.status(200).json({\n    id,\n    amount: { value: total, currency_code: amount.currency_code },\n    item_total: itemTotal.toFixed(2),\n    shipping: shippingCost.toFixed(2),\n    tax_total: taxTotal,\n    shipping_options: options.map((opt) => ({\n      id: opt.id,\n      description: opt.description,\n      selected: opt.id === selectedOption.id,\n      type: opt.type,\n      amount: { value: opt.amount, currency_code: amount.currency_code },\n    })),\n  });\n});\n\napp.listen(3000);\n```\n\nExample:\n```bash\n{\n  \"name\": \"UNPROCESSABLE_ENTITY\",\n  \"details\": [{ \"issue\": \"ADDRESS_ERROR\" }]\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:43.713Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":6,"totalLines":221,"estimatedTokens":1683}}62{"id":"doc-paypal_developer-174d5529","source":"documentation","title":"PayPal Developer","url":"https://developer.paypal.com/braintree/graphql/explorer","text":"Braintree a PayPal ServiceAPI & In-PersonAPI ExplorerSDK DocsAPI & In-Person DocsSupport ArticlesSearchGet HelpContact SalesCreate AccountLoginProduction Control PanelLoginBecome a MerchantContact SalesOnlineIn-Person\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:43.726Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":0,"totalLines":3,"estimatedTokens":58}}63{"id":"doc-locale_codes_paypal_developer-619124eb","source":"documentation","title":"Locale codes | PayPal Developer","url":"https://developer.paypal.com/api/codes/locale","text":"Copy for LLMView as MarkdownLocale codesLast 1, 2026You can use any PayPal-supported language and locale to localize PayPal checkout pages. Localize the checkout experience Pass a locale code to PayPal to customize the locale of the buyer's checkout experience. To determine the locale for the checkout page, PayPal uses the locale code and these other shipping address country provided by the merchant in the request. The country taken from the locale code parameter passed by the merchant. The country of the currently logged-in user. The merchant's country. When this information is not available, PayPal uses these default locales in this fr_XC es_XC zh_XC Supported locale codes PayPal supports these , Region code, Language support priority, Locale code, BCP-47 code for REST APIsRegionRegion codeLanguage support priorityLocale codeBCP-47 code for REST APIsALBANIAAL0en_USen-ALALGERIADZ0ar_EGar-DZALGERIADZ1en_USen-DZALGERIADZ2fr_XCfr-DZALGERIADZ3es_XCes-DZALGERIADZ4zh_XCzh-DZANDORRAAD0en_USen-ADANDORRAAD1fr_XCfr-ADANDORRAAD2es_XCes-ADANDORRAAD3zh_XCzh-ADANGOLAAO0en_USen-AOANGOLAAO1fr_XCfr-AOANGOLAAO2es_XCes-AOANGOLAAO3zh_XCzh-AOANGUILLAAI0en_USen-AIANGUILLAAI1fr_XCfr-AIANGUILLAAI2es_XCes-AIANGUILLAAI3zh_XCzh-AIANTIGUA & BARBUDAAG0en_USen-AGANTIGUA & BARBUDAAG1fr_XCfr-AGANTIGUA & BARBUDAAG2es_XCes-AGANTIGUA & BARBUDAAG3zh_XCzh-AGARGENTINAAR0es_XCes-ARARGENTINAAR1en_USen-ARARMENIAAM0en_USen-AMARMENIAAM1fr_XCfr-AMARMENIAAM2es_XCes-AMARMENIAAM3zh_XCzh-AMARUBAAW0en_USen-AWARUBAAW1fr_XCfr-AWARUBAAW2es_XCes-AWARUBAAW3zh_XCzh-AWAUSTRALIAAU0en_AUen-AUAUSTRIAAT0de_DEde-ATAUSTRIAAT1en_USen-ATAZERBAIJANAZ0en_USen-AZAZERBAIJANAZ1fr_XCfr-AZAZERBAIJANAZ2es_XCes-AZAZERBAIJANAZ3zh_XCzh-AZBAHAMASBS0en_USen-BSBAHAMASBS1fr_XCfr-BSBAHAMASBS2es_XCes-BSBAHAMASBS3zh_XCzh-BSBAHRAINBH0ar_EGar-BHBAHRAINBH1en_USen-BHBAHRAINBH2fr_XCfr-BHBAHRAINBH3es_XCes-BHBAHRAINBH4zh_XCzh-BHBARBADOSBB0en_USen-BBBARBADOSBB1fr_XCfr-BBBARBADOSBB2es_XCes-BBBARBADOSBB3zh_XCzh-BBBELARUSBY0en_USen-BYBELGIUMBE0en_USen-BEBELGIUMBE1nl_NLnl-BEBELGIUMBE2fr_FRfr-BEBELIZEBZ0es_XCes-BZBELIZEBZ1en_USen-BZBELIZEBZ2fr_XCfr-BZBELIZEBZ3zh_XCzh-BZBENINBJ0fr_XCfr-BJBENINBJ1en_USen-BJBENINBJ2es_XCes-BJBENINBJ3zh_XCzh-BJBERMUDABM0en_USen-BMBERMUDABM1fr_XCfr-BMBERMUDABM2es_XCes-BMBERMUDABM3zh_XCzh-BMBHUTANBT0en_USen-BTBOLIVIABO0es_XCes-BOBOLIVIABO1en_USen-BOBOLIVIABO2fr_XCfr-BOBOLIVIABO3zh_XCzh-BOBOSNIA & HERZEGOVINABA0en_USen-BABOTSWANABW0en_USen-BWBOTSWANABW1fr_XCfr-BWBOTSWANABW2es_XCes-BWBOTSWANABW3zh_XCzh-BWBRAZILBR0pt_BRpt-BRBRAZILBR1en_USen-BRBRITISH VIRGIN ISLANDSVG0en_USen-VGBRITISH VIRGIN ISLANDSVG1fr_XCfr-VGBRITISH VIRGIN ISLANDSVG2es_XCes-VGBRITISH VIRGIN ISLANDSVG3zh_XCzh-VGBRUNEIBN0en_USen-BNBULGARIABG0en_USen-BGBURKINA FASOBF0fr_XCfr-BFBURKINA FASOBF1en_USen-BFBURKINA FASOBF2es_XCes-BFBURKINA FASOBF3zh_XCzh-BFBURUNDIBI0fr_XCfr-BIBURUNDIBI1en_USen-BIBURUNDIBI2es_XCes-BIBURUNDIBI3zh_XCzh-BICAMBODIAKH0en_USen-KHCAMEROONCM0fr_XCfr-CMCAMEROONCM1en_USen-CMCANADACA0en_USen-CACANADACA1fr_CAfr-CACAPE VERDECV0en_USen-CVCAPE VERDECV1fr_XCfr-CVCAPE VERDECV2es_XCes-CVCAPE VERDECV3zh_XCzh-CVCAYMAN ISLANDSKY0en_USen-KYCAYMAN ISLANDSKY1fr_XCfr-KYCAYMAN ISLANDSKY2es_XCes-KYCAYMAN ISLANDSKY3zh_XCzh-KYCHADTD0fr_XCfr-TDCHADTD1en_USen-TDCHADTD2es_XCes-TDCHADTD3zh_XCzh-TDCHILECL0es_XCes-CLCHILECL1en_USen-CLCHILECL2fr_XCfr-CLCHILECL3zh_XCzh-CLCHINACN0zh_CNzh-CNCHINA WORLDWIDEC20zh_XCzh-CNCHINA WORLDWIDEC21en_USen-CNCOLOMBIACO0es_XCes-COCOLOMBIACO1en_USen-COCOLOMBIACO2fr_XCfr-COCOLOMBIACO3zh_XCzh-COCOMOROSKM0fr_XCfr-KMCOMOROSKM1en_USen-KMCOMOROSKM2es_XCes-KMCOMOROSKM3zh_XCzh-KMCONGO - BRAZZAVILLECG0en_USen-CGCONGO - BRAZZAVILLECG1fr_XCfr-CGCONGO - BRAZZAVILLECG2es_XCes-CGCONGO - BRAZZAVILLECG3zh_XCzh-CGCONGO - KINSHASACD0fr_XCfr-CDCONGO - KINSHASACD1en_USen-CDCONGO - KINSHASACD2es_XCes-CDCONGO - KINSHASACD3zh_XCzh-CDCOOK ISLANDSCK0en_USen-CKCOOK ISLANDSCK1fr_XCfr-CKCOOK ISLANDSCK2es_XCes-CKCOOK ISLANDSCK3zh_XCzh-CKCOSTA RICACR0es_XCes-CRCOSTA RICACR1en_USen-CRCOSTA RICACR2fr_XCfr-CRCOSTA RICACR3zh_XCzh-CRCÔTE D'IVOIRECI0fr_XCfr-CICÔTE D'IVOIRECI1en_USen-CICROATIAHR0en_USen-HRCYPRUSCY0en_USen-CYCZECH REPUBLICCZ0cs_CZcs-CZCZECH REPUBLICCZ1en_USen-CZCZECH REPUBLICCZ2fr_XCfr-CZCZECH REPUBLICCZ3es_XCes-CZCZECH REPUBLICCZ4zh_XCzh-CZDENMARKDK0da_DKda-DKDENMARKDK1en_USen-DKDJIBOUTIDJ0fr_XCfr-DJDJIBOUTIDJ1en_USen-DJDJIBOUTIDJ2es_XCes-DJDJIBOUTIDJ3zh_XCzh-DJDOMINICADM0en_USen-DMDOMINICADM1fr_XCfr-DMDOMINICADM2es_XCes-DMDOMINICADM3zh_XCzh-DMDOMINICAN REPUBLICDO0es_XCes-DODOMINICAN REPUBLICDO1en_USen-DODOMINICAN REPUBLICDO2fr_XCfr-DODOMINICAN REPUBLICDO3zh_XCzh-DOECUADOREC0es_XCes-ECECUADOREC1en_USen-ECECUADOREC2fr_XCfr-ECECUADOREC3zh_XCzh-ECEGYPTEG0ar_EGar-EGEGYPTEG1en_USen-EGEGYPTEG2fr_XCfr-EGEGYPTEG3es_XCes-EGEGYPTEG4zh_XCzh-EGEL SALVADORSV0es_XCes-SVEL SALVADORSV1en_USen-SVEL SALVADORSV2fr_XCfr-SVEL SALVADORSV3zh_XCzh-SVERITREAER0en_USen-ERERITREAER1fr_XCfr-ERERITREAER2es_XCes-ERERITREAER3zh_XCzh-ERESTONIAEE0en_USen-EEESTONIAEE1ru_RUru-EEESTONIAEE2fr_XCfr-EEESTONIAEE3es_XCes-EEESTONIAEE4zh_XCzh-EEETHIOPIAET0en_USen-ETETHIOPIAET1fr_XCfr-ETETHIOPIAET2es_XCes-ETETHIOPIAET3zh_XCzh-ETFALKLAND ISLANDSFK0en_USen-FKFALKLAND ISLANDSFK1fr_XCfr-FKFALKLAND ISLANDSFK2es_XCes-FKFALKLAND ISLANDSFK3zh_XCzh-FKFAROE ISLANDSFO0da_DKda-FOFAROE ISLANDSFO1en_USen-FOFAROE ISLANDSFO2fr_XCfr-FOFAROE ISLANDSFO3es_XCes-FOFAROE ISLANDSFO4zh_XCzh-FOFIJIFJ0en_USen-FJFIJIFJ1fr_XCfr-FJFIJIFJ2es_XCes-FJFIJIFJ3zh_XCzh-FJFINLANDFI0fi_FIfi-FIFINLANDFI1en_USen-FIFINLANDFI2fr_XCfr-FIFINLANDFI3es_XCes-FIFINLANDFI4zh_XCzh-FIFRANCEFR0fr_FRfr-FRFRANCEFR1en_USen-FRFRENCH GUIANAGF0en_USen-GFFRENCH GUIANAGF1fr_XCfr-GFFRENCH GUIANAGF2es_XCes-GFFRENCH GUIANAGF3zh_XCzh-GFFRENCH POLYNESIAPF0en_USen-PFFRENCH POLYNESIAPF1fr_XCfr-PFFRENCH POLYNESIAPF2es_XCes-PFFRENCH POLYNESIAPF3zh_XCzh-PFGABONGA0fr_XCfr-GAGABONGA1en_USen-GAGABONGA2es_XCes-GAGABONGA3zh_XCzh-GAGAMBIAGM0en_USen-GMGAMBIAGM1fr_XCfr-GMGAMBIAGM2es_XCes-GMGAMBIAGM3zh_XCzh-GMGEORGIAGE0en_USen-GEGEORGIAGE1fr_XCfr-GEGEORGIAGE2es_XCes-GEGEORGIAGE3zh_XCzh-GEGERMANYDE0de_DEde-DEGERMANYDE1en_USen-DEGIBRALTARGI0en_USen-GIGIBRALTARGI1fr_XCfr-GIGIBRALTARGI2es_XCes-GIGIBRALTARGI3zh_XCzh-GIGREECEGR0el_GRel-GRGREECEGR1en_USen-GRGREECEGR2fr_XCfr-GRGREECEGR3es_XCes-GRGREECEGR4zh_XCzh-GRGREENLANDGL0da_DKda-GLGREENLANDGL1en_USen-GLGREENLANDGL2fr_XCfr-GLGREENLANDGL3es_XCes-GLGREENLANDGL4zh_XCzh-GLGRENADAGD0en_USen-GDGRENADAGD1fr_XCfr-GDGRENADAGD2es_XCes-GDGRENADAGD3zh_XCzh-GDGUADELOUPEGP0en_USen-GPGUADELOUPEGP1fr_XCfr-GPGUADELOUPEGP2es_XCes-GPGUADELOUPEGP3zh_XCzh-GPGUATEMALAGT0es_XCes-GTGUATEMALAGT1en_USen-GTGUATEMALAGT2fr_XCfr-GTGUATEMALAGT3zh_XCzh-GTGUINEAGN0fr_XCfr-GNGUINEAGN1en_USen-GNGUINEAGN2es_XCes-GNGUINEAGN3zh_XCzh-GNGUINEA-BISSAUGW0en_USen-GWGUINEA-BISSAUGW1fr_XCfr-GWGUINEA-BISSAUGW2es_XCes-GWGUINEA-BISSAUGW3zh_XCzh-GWGUYANAGY0en_USen-GYGUYANAGY1fr_XCfr-GYGUYANAGY2es_XCes-GYGUYANAGY3zh_XCzh-GYHONDURASHN0es_XCes-HNHONDURASHN1en_USen-HNHONDURASHN2fr_XCfr-HNHONDURASHN3zh_XCzh-HNHONG KONG SAR CHINAHK0en_GBen-HKHONG KONG SAR CHINAHK1zh_HKzh-HKHUNGARYHU0hu_HUhu-HUHUNGARYHU1en_USen-HUHUNGARYHU2fr_XCfr-HUHUNGARYHU3es_XCes-HUHUNGARYHU4zh_XCzh-HUICELANDIS0en_USen-ISINDIAIN0en_INen-ININDONESIAID0id_IDid-IDINDONESIAID1en_USen-IDIRELANDIE0en_USen-IEIRELANDIE1fr_XCfr-IEIRELANDIE2es_XCes-IEIRELANDIE3zh_XCzh-IEISRAELIL0he_ILhe-ILISRAELIL1en_USen-ILITALYIT0it_ITit-ITITALYIT1en_USen-ITJAMAICAJM0es_XCes-JMJAMAICAJM1en_USen-JMJAMAICAJM2fr_XCfr-JMJAMAICAJM3zh_XCzh-JMJAPANJP0ja_JPja-JPJAPANJP1en_USen-JPJORDANJO0ar_EGar-JOJORDANJO1en_USen-JOJORDANJO2fr_XCfr-JOJORDANJO3es_XCes-JOJORDANJO4zh_XCzh-JOKAZAKHSTANKZ0en_USen-KZKAZAKHSTANKZ1fr_XCfr-KZKAZAKHSTANKZ2es_XCes-KZKAZAKHSTANKZ3zh_XCzh-KZKENYAKE0en_USen-KEKENYAKE1fr_XCfr-KEKENYAKE2es_XCes-KEKENYAKE3zh_XCzh-KEKIRIBATIKI0en_USen-KIKIRIBATIKI1fr_XCfr-KIKIRIBATIKI2es_XCes-KIKIRIBATIKI3zh_XCzh-KIKUWAITKW0ar_EGar-KWKUWAITKW1en_USen-KWKUWAITKW2fr_XCfr-KWKUWAITKW3es_XCes-KWKUWAITKW4zh_XCzh-KWKYRGYZSTANKG0en_USen-KGKYRGYZSTANKG1fr_XCfr-KGKYRGYZSTANKG2es_XCes-KGKYRGYZSTANKG3zh_XCzh-KGLAOSLA0en_USen-LALATVIALV0en_USen-LVLATVIALV1ru_RUru-LVLATVIALV2fr_XCfr-LVLATVIALV3es_XCes-LVLATVIALV4zh_XCzh-LVLESOTHOLS0en_USen-LSLESOTHOLS1fr_XCfr-LSLESOTHOLS2es_XCes-LSLESOTHOLS3zh_XCzh-LSLIECHTENSTEINLI0en_USen-LILIECHTENSTEINLI1fr_XCfr-LILIECHTENSTEINLI2es_XCes-LILIECHTENSTEINLI3zh_XCzh-LILITHUANIALT0en_USen-LTLITHUANIALT1ru_RUru-LTLITHUANIALT2fr_XCfr-LTLITHUANIALT3es_XCes-LTLITHUANIALT4zh_XCzh-LTLUXEMBOURGLU0en_USen-LULUXEMBOURGLU1de_DEde-LULUXEMBOURGLU2fr_XCfr-LULUXEMBOURGLU3es_XCes-LULUXEMBOURGLU4zh_XCzh-LUMACEDONIAMK0en_USen-MKMADAGASCARMG0en_USen-MGMADAGASCARMG1fr_XCfr-MGMADAGASCARMG2es_XCes-MGMADAGASCARMG3zh_XCzh-MGMALAWIMW0en_USen-MWMALAWIMW1fr_XCfr-MWMALAWIMW2es_XCes-MWMALAWIMW3zh_XCzh-MWMALAYSIAMY0en_USen-MYMALDIVESMV0en_USen-MVMALIML0fr_XCfr-MLMALIML1en_USen-MLMALIML2es_XCes-MLMALIML3zh_XCzh-MLMALTAMT0en_USen-MTMARSHALL ISLANDSMH0en_USen-MHMARSHALL ISLANDSMH1fr_XCfr-MHMARSHALL ISLANDSMH2es_XCes-MHMARSHALL ISLANDSMH3zh_XCzh-MHMARTINIQUEMQ0en_USen-MQMARTINIQUEMQ1fr_XCfr-MQMARTINIQUEMQ2es_XCes-MQMARTINIQUEMQ3zh_XCzh-MQMAURITANIAMR0en_USen-MRMAURITANIAMR1fr_XCfr-MRMAURITANIAMR2es_XCes-MRMAURITANIAMR3zh_XCzh-MRMAURITIUSMU0en_USen-MUMAURITIUSMU1fr_XCfr-MUMAURITIUSMU2es_XCes-MUMAURITIUSMU3zh_XCzh-MUMAYOTTEYT0en_USen-YTMAYOTTEYT1fr_XCfr-YTMAYOTTEYT2es_XCes-YTMAYOTTEYT3zh_XCzh-YTMEXICOMX0es_XCes-MXMEXICOMX1en_USen-MXMICRONESIAFM0en_USen-FMMOLDOVAMD0en_USen-MDMONACOMC0fr_XCfr-MCMONACOMC1en_USen-MCMONGOLIAMN0en_USen-MNMONTENEGROME0en_USen-MEMONTSERRATMS0en_USen-MSMONTSERRATMS1fr_XCfr-MSMONTSERRATMS2es_XCes-MSMONTSERRATMS3zh_XCzh-MSMOROCCOMA0ar_EGar-MAMOROCCOMA1en_USen-MAMOROCCOMA2fr_XCfr-MAMOROCCOMA3es_XCes-MAMOROCCOMA4zh_XCzh-MAMOZAMBIQUEMZ0en_USen-MZMOZAMBIQUEMZ1fr_XCfr-MZMOZAMBIQUEMZ2es_XCes-MZMOZAMBIQUEMZ3zh_XCzh-MZNAMIBIANA0en_USen-NANAMIBIANA1fr_XCfr-NANAMIBIANA2es_XCes-NANAMIBIANA3zh_XCzh-NANAURUNR0en_USen-NRNAURUNR1fr_XCfr-NRNAURUNR2es_XCes-NRNAURUNR3zh_XCzh-NRNEPALNP0en_USen-NPNETHERLANDSNL0nl_NLnl-NLNETHERLANDSNL1en_USen-NLNEW CALEDONIANC0en_USen-NCNEW CALEDONIANC1fr_XCfr-NCNEW CALEDONIANC2es_XCes-NCNEW CALEDONIANC3zh_XCzh-NCNEW ZEALANDNZ0en_USen-NZNEW ZEALANDNZ1fr_XCfr-NZNEW ZEALANDNZ2es_XCes-NZNEW ZEALANDNZ3zh_XCzh-NZNICARAGUANI0es_XCes-NINICARAGUANI1en_USen-NINICARAGUANI2fr_XCfr-NINICARAGUANI3zh_XCzh-NINIGERNE0fr_XCfr-NENIGERNE1en_USen-NENIGERNE2es_XCes-NENIGERNE3zh_XCzh-NENIGERIANG0en_USen-NGNIUENU0en_USen-NUNIUENU1fr_XCfr-NUNIUENU2es_XCes-NUNIUENU3zh_XCzh-NUNORFOLK ISLANDNF0en_USen-NFNORFOLK ISLANDNF1fr_XCfr-NFNORFOLK ISLANDNF2es_XCes-NFNORFOLK ISLANDNF3zh_XCzh-NFNORWAYNO0no_NOno-NONORWAYNO1en_USen-NOOMANOM0ar_EGar-OMOMANOM1en_USen-OMOMANOM2fr_XCfr-OMOMANOM3es_XCes-OMOMANOM4zh_XCzh-OMPALAUPW0en_USen-PWPALAUPW1fr_XCfr-PWPALAUPW2es_XCes-PWPALAUPW3zh_XCzh-PWPANAMAPA0es_XCes-PAPANAMAPA1en_USen-PAPANAMAPA2fr_XCfr-PAPANAMAPA3zh_XCzh-PAPAPUA NEW GUINEAPG0en_USen-PGPAPUA NEW GUINEAPG1fr_XCfr-PGPAPUA NEW GUINEAPG2es_XCes-PGPAPUA NEW GUINEAPG3zh_XCzh-PGPARAGUAYPY0es_XCes-PYPARAGUAYPY1en_USen-PYPERUPE0es_XCes-PEPERUPE1en_USen-PEPERUPE2fr_XCfr-PEPERUPE3zh_XCzh-PEPHILIPPINESPH0en_USen-PHPITCAIRN ISLANDSPN0en_USen-PNPITCAIRN ISLANDSPN1fr_XCfr-PNPITCAIRN ISLANDSPN2es_XCes-PNPITCAIRN ISLANDSPN3zh_XCzh-PNPOLANDPL0pl_PLpl-PLPOLANDPL1en_USen-PLPORTUGALPT0pt_PTpt-PTPORTUGALPT1en_USen-PTQATARQA0en_USen-QAQATARQA1fr_XCfr-QAQATARQA2es_XCes-QAQATARQA3zh_XCzh-QAQATARQA4ar_EGar-QARÉUNIONRE0en_USen-RERÉUNIONRE1fr_XCfr-RERÉUNIONRE2es_XCes-RERÉUNIONRE3zh_XCzh-REROMANIARO0en_USen-ROROMANIARO1fr_XCfr-ROROMANIARO2es_XCes-ROROMANIARO3zh_XCzh-RORUSSIARU0ru_RUru-RURUSSIARU1en_USen-RURWANDARW0fr_XCfr-RWRWANDARW1en_USen-RWRWANDARW2es_XCes-RWRWANDARW3zh_XCzh-RWSAMOAWS0en_USen-WSSAN MARINOSM0en_USen-SMSAN MARINOSM1fr_XCfr-SMSAN MARINOSM2es_XCes-SMSAN MARINOSM3zh_XCzh-SMSÃO TOMÉ & PRÍNCIPEST0en_USen-STSÃO TOMÉ & PRÍNCIPEST1fr_XCfr-STSÃO TOMÉ & PRÍNCIPEST2es_XCes-STSÃO TOMÉ & PRÍNCIPEST3zh_XCzh-STSAUDI ARABIASA0ar_EGar-SASAUDI ARABIASA1en_USen-SASAUDI ARABIASA2fr_XCfr-SASAUDI ARABIASA3es_XCes-SASAUDI ARABIASA4zh_XCzh-SASENEGALSN0fr_XCfr-SNSENEGALSN1en_USen-SNSENEGALSN2es_XCes-SNSENEGALSN3zh_XCzh-SNSERBIARS0en_USen-RSSERBIARS1fr_XCfr-RSSERBIARS2es_XCes-RSSERBIARS3zh_XCzh-RSSEYCHELLESSC0fr_XCfr-SCSEYCHELLESSC1en_USen-SCSEYCHELLESSC2es_XCes-SCSEYCHELLESSC3zh_XCzh-SCSIERRA LEONESL0en_USen-SLSIERRA LEONESL1fr_XCfr-SLSIERRA LEONESL2es_XCes-SLSIERRA LEONESL3zh_XCzh-SLSINGAPORESG0en_GBen-SGSLOVAKIASK0sk_SKsk-SKSLOVAKIASK1en_USen-SKSLOVAKIASK2fr_XCfr-SKSLOVAKIASK3es_XCes-SKSLOVAKIASK4zh_XCzh-SKSLOVENIASI0en_USen-SISLOVENIASI1fr_XCfr-SISLOVENIASI2es_XCes-SISLOVENIASI3zh_XCzh-SISOLOMON ISLANDSSB0en_USen-SBSOLOMON ISLANDSSB1fr_XCfr-SBSOLOMON ISLANDSSB2es_XCes-SBSOLOMON ISLANDSSB3zh_XCzh-SBSOMALIASO0en_USen-SOSOMALIASO1fr_XCfr-SOSOMALIASO2es_XCes-SOSOMALIASO3zh_XCzh-SOSOUTH AFRICAZA0en_USen-ZASOUTH AFRICAZA1fr_XCfr-ZASOUTH AFRICAZA2es_XCes-ZASOUTH AFRICAZA3zh_XCzh-ZASOUTH KOREAKR0ko_KRko-KRSOUTH KOREAKR1en_USen-KRSPAINES0es_ESes-ESSPAINES1en_USen-ESSRI LANKALK0en_USen-LKST. HELENASH0en_USen-SHST. HELENASH1fr_XCfr-SHST. HELENASH2es_XCes-SHST. HELENASH3zh_XCzh-SHST. KITTS & NEVISKN0en_USen-KNST. KITTS & NEVISKN1fr_XCfr-KNST. KITTS & NEVISKN2es_XCes-KNST. KITTS & NEVISKN3zh_XCzh-KNST. LUCIALC0en_USen-LCST. LUCIALC1fr_XCfr-LCST. LUCIALC2es_XCes-LCST. LUCIALC3zh_XCzh-LCST. PIERRE & MIQUELONPM0en_USen-PMST. PIERRE & MIQUELONPM1fr_XCfr-PMST. PIERRE & MIQUELONPM2es_XCes-PMST. PIERRE & MIQUELONPM3zh_XCzh-PMST. VINCENT & GRENADINESVC0en_USen-VCST. VINCENT & GRENADINESVC1fr_XCfr-VCST. VINCENT & GRENADINESVC2es_XCes-VCST. VINCENT & GRENADINESVC3zh_XCzh-VCSURINAMESR0en_USen-SRSURINAMESR1fr_XCfr-SRSURINAMESR2es_XCes-SRSURINAMESR3zh_XCzh-SRSVALBARD & JAN MAYENSJ0en_USen-SJSVALBARD & JAN MAYENSJ1fr_XCfr-SJSVALBARD & JAN MAYENSJ2es_XCes-SJSVALBARD & JAN MAYENSJ3zh_XCzh-SJSWAZILANDSZ0en_USen-SZSWAZILANDSZ1fr_XCfr-SZSWAZILANDSZ2es_XCes-SZSWAZILANDSZ3zh_XCzh-SZSWEDENSE0sv_SEsv-SESWEDENSE1en_USen-SESWITZERLANDCH0de_DEde-CHSWITZERLANDCH1fr_FRfr-CHSWITZERLANDCH2en_USen-CHTAIWANTW0zh_TWzh-TWTAIWANTW1en_USen-TWTAJIKISTANTJ0en_USen-TJTAJIKISTANTJ1fr_XCfr-TJTAJIKISTANTJ2es_XCes-TJTAJIKISTANTJ3zh_XCzh-TJTANZANIATZ0en_USen-TZTANZANIATZ1fr_XCfr-TZTANZANIATZ2es_XCes-TZTANZANIATZ3zh_XCzh-TZTHAILANDTH0th_THth-THTHAILANDTH1en_GBen-THTOGOTG0fr_XCfr-TGTOGOTG1en_USen-TGTOGOTG2es_XCes-TGTOGOTG3zh_XCzh-TGTONGATO0en_USen-TOTRINIDAD & TOBAGOTT0en_USen-TTTRINIDAD & TOBAGOTT1fr_XCfr-TTTRINIDAD & TOBAGOTT2es_XCes-TTTRINIDAD & TOBAGOTT3zh_XCzh-TTTUNISIATN0ar_EGar-TNTUNISIATN1en_USen-TNTUNISIATN2fr_XCfr-TNTUNISIATN3es_XCes-TNTUNISIATN4zh_XCzh-TNTURKMENISTANTM0en_USen-TMTURKMENISTANTM1fr_XCfr-TMTURKMENISTANTM2es_XCes-TMTURKMENISTANTM3zh_XCzh-TMTURKS & CAICOS ISLANDSTC0en_USen-TCTURKS & CAICOS ISLANDSTC1fr_XCfr-TCTURKS & CAICOS ISLANDSTC2es_XCes-TCTURKS & CAICOS ISLANDSTC3zh_XCzh-TCTUVALUTV0en_USen-TVTUVALUTV1fr_XCfr-TVTUVALUTV2es_XCes-TVTUVALUTV3zh_XCzh-TVUGANDAUG0en_USen-UGUGANDAUG1fr_XCfr-UGUGANDAUG2es_XCes-UGUGANDAUG3zh_XCzh-UGUKRAINEUA0en_USen-UAUKRAINEUA1ru_RUru-UAUKRAINEUA2fr_XCfr-UAUKRAINEUA3es_XCes-UAUKRAINEUA4zh_XCzh-UAUNITED ARAB EMIRATESAE0en_USen-AEUNITED ARAB EMIRATESAE1fr_XCfr-AEUNITED ARAB EMIRATESAE2es_XCes-AEUNITED ARAB EMIRATESAE3zh_XCzh-AEUNITED ARAB EMIRATESAE4ar_EGar-AEUNITED KINGDOMGB0en_GBen-GBUNITED STATESUS0en_USen-USUNITED STATESUS1fr_XCfr-USUNITED STATESUS2es_XCes-USUNITED STATESUS3zh_XCzh-USURUGUAYUY0es_XCes-UYURUGUAYUY1en_USen-UYURUGUAYUY2fr_XCfr-UYURUGUAYUY3zh_XCzh-UYVANUATUVU0en_USen-VUVANUATUVU1fr_XCfr-VUVANUATUVU2es_XCes-VUVANUATUVU3zh_XCzh-VUVATICAN CITYVA0en_USen-VAVATICAN CITYVA1fr_XCfr-VAVATICAN CITYVA2es_XCes-VAVATICAN CITYVA3zh_XCzh-VAVENEZUELAVE0es_XCes-VEVENEZUELAVE1en_USen-VEVENEZUELAVE2fr_XCfr-VEVENEZUELAVE3zh_XCzh-VEVIETNAMVN0en_USen-VNWALLIS & FUTUNAWF0en_USen-WFWALLIS & FUTUNAWF1fr_XCfr-WFWALLIS & FUTUNAWF2es_XCes-WFWALLIS & FUTUNAWF3zh_XCzh-WFYEMENYE0ar_EGar-YEYEMENYE1en_USen-YEYEMENYE2fr_XCfr-YEYEMENYE3es_XCes-YEYEMENYE4zh_XCzh-YEZAMBIAZM0en_USen-ZMZAMBIAZM1fr_XCfr-ZMZAMBIAZM2es_XCes-ZMZAMBIAZM3zh_XCzh-ZMZIMBABWEZW0en_USen-ZWOn this pageOn this pageLocalize the checkout experienceSupported locale codes\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:43.738Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":0,"totalLines":3,"estimatedTokens":4000}}64{"id":"doc-manage_catalogs_cloudflare_r2_data_catalog_docs-5ac87dfd","source":"documentation","title":"Manage catalogs · Cloudflare R2 Data Catalog docs","url":"https://developers.cloudflare.com/r2-data-catalog/manage-catalogs/","text":"Documentation IndexFetch the complete documentation index ://developers.cloudflare.com/r2-data-catalog/llms.txtUse this file to discover all available pages before exploring further.\n\nExample:\n```text\nnpx wrangler r2 bucket catalog enable <BUCKET_NAME>\n```\n\nExample:\n```text\nnpx wrangler r2 bucket catalog disable <BUCKET_NAME>\n```\n\nExample:\n```text\n# Enable catalog-level compaction (all tables)\nnpx wrangler r2 bucket catalog compaction enable <BUCKET_NAME> --target-size 128 --token <API_TOKEN>\n\n# Enable compaction for a specific table\nnpx wrangler r2 bucket catalog compaction enable <BUCKET_NAME> <NAMESPACE> <TABLE> --target-size 128\n```\n\nExample:\n```text\n# Disable catalog-level compaction (all tables)\nnpx wrangler r2 bucket catalog compaction disable <BUCKET_NAME>\n\n# Disable compaction for a specific table\nnpx wrangler r2 bucket catalog compaction disable <BUCKET_NAME> <NAMESPACE> <TABLE>\n```\n\nExample:\n```text\n# Enable catalog-level snapshot expiration (all tables)\nnpx wrangler r2 bucket catalog snapshot-expiration enable <BUCKET_NAME> \\\n  --token <API_TOKEN> \\\n  --older-than-days 7 \\\n  --retain-last 10\n\n# Enable snapshot expiration for a specific table\nnpx wrangler r2 bucket catalog snapshot-expiration enable <BUCKET_NAME> <NAMESPACE> <TABLE> \\\n  --older-than-days 2 \\\n  --retain-last 5\n```\n\nExample:\n```text\n# Disable catalog-level snapshot expiration (all tables)\nnpx wrangler r2 bucket catalog snapshot-expiration disable <BUCKET_NAME>\n\n# Disable snapshot expiration for a specific table\nnpx wrangler r2 bucket catalog snapshot-expiration disable <BUCKET_NAME> <NAMESPACE> <TABLE>\n```\n\nExample:\n```text\n[\n\t{\n\t\t\"id\": \"f267e341f3dd4697bd3b9f71dd96247f\",\n\t\t\"effect\": \"allow\",\n\t\t\"resources\": {\n\t\t\t\"com.cloudflare.edge.r2.bucket.4793d734c0b8e484dfc37ec392b5fa8a_default_my-bucket\": \"*\",\n\t\t\t\"com.cloudflare.edge.r2.bucket.4793d734c0b8e484dfc37ec392b5fa8a_eu_my-eu-bucket\": \"*\"\n\t\t},\n\t\t\"permission_groups\": [\n\t\t\t{\n\t\t\t\t\"id\": \"d229766a2f7f4d299f20eaa8c9b1fde9\",\n\t\t\t\t\"name\": \"Workers R2 Data Catalog Write\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"id\": \"2efd5506f9c8494dacb1fa10a3e7d5b6\",\n\t\t\t\t\"name\": \"Workers R2 Storage Bucket Item Write\"\n\t\t\t}\n\t\t]\n\t}\n]\n```\n\nExample:\n```text\n[\n\t{\n\t\t\"id\": \"f267e341f3dd4697bd3b9f71dd96247f\",\n\t\t\"effect\": \"allow\",\n\t\t\"resources\": {\n\t\t\t\"com.cloudflare.edge.r2.bucket.4793d734c0b8e484dfc37ec392b5fa8a_default_my-bucket\": \"*\",\n\t\t\t\"com.cloudflare.edge.r2.bucket.4793d734c0b8e484dfc37ec392b5fa8a_eu_my-eu-bucket\": \"*\"\n\t\t},\n\t\t\"permission_groups\": [\n\t\t\t{\n\t\t\t\t\"id\": \"45db74139a62490b9b60eb7c4f34994b\",\n\t\t\t\t\"name\": \"Workers R2 Data Catalog Read\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"id\": \"6a018a9f2fc74eb6b293b0c548f38b39\",\n\t\t\t\t\"name\": \"Workers R2 Storage Bucket Item Read\"\n\t\t\t}\n\t\t]\n\t}\n]\n```\n\nExample:\n```text\nnpx wrangler r2 bucket catalog local-uploads enable <R2_Data_Catalog_BUCKET_NAME>\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:47.117Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":9,"totalLines":107,"estimatedTokens":700}}65{"id":"doc-models_openai_api-0e5ba652","source":"documentation","title":"Models | OpenAI API","url":"https://developers.openai.com/api/docs/models","text":"For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.\n\nChatGPT Home API Codex Docs Guides, concepts, and product docs for Codex Use cases Example workflows and tasks teams can take on with ChatGPT or Codex Docs Use cases Resources ChatGPT Plugins Extend ChatGPT and Codex Workspace Agents Trigger published ChatGPT workspace agents Commerce Build commerce flows in ChatGPT Ads Publish and measure ads in ChatGPT Resources Showcase Demo apps to get inspired Blog Learnings and experiences from developers Cookbook Notebook examples for building with OpenAI models Learn Docs, videos, and demo apps for building with OpenAI Community Programs, meetups, and support for builders Start searching API Dashboard Try ChatGPT\n\nOverview Models Agents Tools Voice & Audio Production API reference\n\nSearch the API docs Search docsSuggestedresponses createreasoning_effortrealtimeprompt caching\n\nPrimary navigation API Codex ChatGPT Docs Use cases Resources Resources Search docsSuggestedresponses createreasoning_effortrealtimeprompt caching Overview Models Agents Tools Voice & Audio Production API reference OverviewModelsAgentsToolsVoice & AudioProductionAPI referenceDocs sectionModels Home Get started Quickstart Using GPT-5.6 Key concepts Core concepts Responses API Conversation state Background mode Streaming WebSocket mode Multi-agent Webhooks File inputs Compaction Counting tokens SDKs and CLI OpenAI SDK OpenAI CLI Resources Changelog Deprecations Supported countries OpenAI Crawlers Terms and policies Legacy APIs Agent Builder Overview Migration guide Node reference Safety in building agents Evals Getting started Working with evals Prompt optimizer External models Best practices Graders Fine-tuning Optimization cycle Supervised fine-tuning Vision fine-tuning Direct preference optimization Reinforcement fine-tuning RFT use cases Best practices Assistants API Migration guide Deep dive Tools Model catalog Choose a model Pricing Model selection Text and code Text generation Code generation Structured output Prompting Overview Prompt engineering Citation formatting Migration guide Prompt generation Frontend prompting Reasoning Reasoning models Reasoning best practices Images and video Images and vision Image generation Video generation Realtime and audio Audio and speech Overview Voice agents Specialized models Deep research Embeddings Moderation Overview Agents SDK Quickstart Agent definitions Models and providers Running agents Sandbox agents Orchestration Guardrails Results and state Integrations and observability Evaluate agent workflows ChatKit Overview Customize Widgets Actions Advanced integrations Overview Function calling Search and retrieval Web search File search Retrieval Connect tools and data MCP and Connectors Secure MCP Tunnel Build tool workflows Skills Tool search Programmatic tool calling Computer and code Shell Computer use Apply Patch Local shell Code interpreter Media Image generation Overview Get started Voice agents Live translation Realtime prompting guide Audio Audio and speech Transcription File transcription Realtime transcription Speech generation Connection methods WebRTC WebSocket SIP Sessions and operations Managing conversations Voice activity detection Realtime with tools Webhooks and server-side controls Managing costs Go live Production best practices Deployment checklist Performance and quality Latency optimization Predicted Outputs Fast mode Accuracy optimization Cost and throughput Cost optimization Prompt caching Batch Flex processing Safety and governance Safety best practices Red teaming Safety checks Cybersecurity checks Under 18 API Guidance Content provenance Your data Permissions Infrastructure and access Terraform provider Overview Projects and access Service accounts Rate limits and spend Model, tool, and data controls Import and reconciliation Private Link IP allowlist Workload identity federation X.509 certificates (beta) Kubernetes AWS Microsoft Azure Google Cloud Oracle Cloud Infrastructure GitHub Actions SPIFFE IP egress ranges Amazon Bedrock Operations Rate limits Spend limits Admin APIs Error codes Docs Use cases DocsUse casesDocs sectionDocs Plugins Workspace Agents Commerce Ads PluginsWorkspace AgentsCommerceAdsDocs sectionSelect... Home Quickstart Core concepts Plugin architecture Skills MCP server Plan Brainstorm use cases Define tools Build Build an MCP server Add UI to your MCP server (optional) Authenticate users Build skills Package your plugin Examples Test and publish Connect and test your plugin Submit and publish Submission error reference Conversion specs Restaurant reservation spec Get Quote spec Product checkout spec Guides UI guidelines Optimize Metadata Submit a Claude Code plugin Security & Privacy Troubleshooting Resources Changelog Plugin guidelines MCP server review requirements Plugin UI reference Checkout API reference Home Get started Trigger workspace agent runs Authenticate with Workspace Agent access tokens Home Guides Get started Best practices File Upload Overview Products API Overview Feeds Products Promotions Ads Overview Measurement Measurement Pixel Multiple Pixels (Advanced) Image Tag Conversions API Supported Events Advertiser API Overview API Partner Setup Quickstart Bulk API Product Feeds Delta Feeds API Campaign Targeting Conversion-Optimized Campaigns API Reference Authentication Ad Account Campaigns Ad Groups Ads Insights Files Conversion Setup Overview Features Configuration Developers Security Administration Use Cases Resources OverviewFeaturesConfigurationDevelopersSecurityAdministrationUse CasesResourcesDocs sectionOverview Home Get started Quickstart Use ChatGPT Get started with Work Import from another agent Foundations Prompting Personalize ChatGPT Skills & Plugins Permissions Explore What's new Models Pricing Glossary Available on ChatGPT desktop app Remote ChatGPT on the web Codex CLI Codex IDE extension Codex cloud Releases Changelog Feature Maturity Open Source Overview Workflows Projects and chats Sites Visualizations Scheduled tasks Long-running work Notifications Pets Codex Micro Capabilities Browser Computer use Voice Plugins Web search Image generation Image inputs Appshots Chrome extension Work with files Reference Commands Slash commands Settings Troubleshooting Overview Customization Overview Memories Computer History Config file Config Basics Advanced Config Config Reference Environment Variables Sample Config Agent configuration AGENTS.md Subagents Speed Rules Extend ChatGPT and Codex Record & Replay MCP Linux Desktop app Windows Desktop app Windows sandbox WSL Overview Development workflows Code review Integrated terminal Extend and automate Build skills Build plugins Hooks Environments Modes Local environments Cloud environment Git worktrees Build with Codex Codex SDK App Server MCP Server GitHub Action Non-interactive mode Third-party integrations GitHub Slack Linear Reference CLI customization Developer commands Developer settings Overview Permissions Profiles Sandboxing Auto-review Agent approvals & security Internet access Codex Security Overview Codex Security plugin Quickstart Run a security scan Run a deep scan Review code changes Use the Security workbench Triage a backlog Fix findings Propose security hardening Write vulnerability reports Export and track findings Changelog Codex Security CLI Quickstart Run bulk scans Run scans in CI Reference FAQ TypeScript SDK Codex Security cloud Setup Security Review Improving the threat model FAQ Cyber safety Models & Trusted Access Recommended configuration Overview Getting started Admin rollout guide ChatGPT Work Overview ChatGPT Work admin FAQ Identity and authentication Authentication overview Personal Access Tokens Service accounts Workspace access, policy, and models Groups and provisioning Roles and workspace permissions GPTs and Sharing Managed configuration Prisma AIRS HIPAA configuration Workspace model availability Plugin and connector controls Plugin controls Skill controls Usage, governance, and compliance Governance Workspace analytics Analytics API Compliance API and audit events Deployment and model providers Manage app updates Windows app deployment Remote connections Amazon Bedrock Explore use cases Collections Home Videos Showcase OpenAI Academy Online trainings Community Codex Ambassadors Codex for Students Codex for Open Source Meetups Blog Company blog Developer blog Explore use cases Collections Home Videos Showcase OpenAI Academy Online trainings Community Codex Ambassadors Codex for Students Codex for Open Source Meetups Blog Company blog Developer blog Showcase Blog Cookbook Learn Community ShowcaseBlogCookbookLearnCommunityDocs sectionSelect... All posts Recent Custom Code Review rules for Codex Mastering remote engineering work from your phone Making private MCP servers reachable without making them public How Perplexity Brought Voice Search to Millions Using the Realtime API Designing delightful frontends with GPT-5.4 Topics General API Apps SDK Audio Codex Home Topics Agents Evals Multimodal Text Guardrails Optimization ChatGPT Codex gpt-oss Contribute Cookbook on GitHub Home OpenAI Developers plugin Docs MCP Categories Demo apps Videos Topics Agents Audio & Voice Computer Use Codex Evals gpt-oss Fine-tuning Image generation Scaling Tools Video generation Community Programs Codex Ambassadors Codex for Students Codex for Open Source OpenAI for Startups Events Meetups Spaces Developer Forum Discord Reddit X API Dashboard Try ChatGPT\n\nModel catalog Choose a model Pricing Model selection Text and code Text generation Code generation Structured output Prompting Overview Prompt engineering Citation formatting Migration guide Prompt generation Frontend prompting Reasoning Reasoning models Reasoning best practices Images and video Images and vision Image generation Video generation Realtime and audio Audio and speech Overview Voice agents Specialized models Deep research Embeddings Moderation ModelsChoosing a modelIf you're not sure where to start, use GPT-5.6 Sol, our flagship model for complex reasoning and coding. Choose GPT-5.6 Terra to balance intelligence and cost, or GPT-5.6 Luna for cost-sensitive, high-volume workloads.All latest OpenAI models support text and image input, text output, multilingual capabilities, and vision. Models are available via the Responses API and our Client SDKs.Frontier modelsStart with GPT-5.6 Sol for complex reasoning and coding, choose GPT-5.6 Terra to balance intelligence and cost, or use GPT-5.6 Luna for cost-sensitive, high-volume workloads.View allCompare modelsGPT-5.6 SolFrontier model for complex professional workModel IDgpt-5.6-solAliasgpt-5.6ReasoningnonelowmediumhighxhighmaxInput price$5 / Input MTokOutput price$30 / Output MTokMax output128K tokensContext window1.05MKnowledge cutoffFeb 16, 2026ToolsFunctions, Web search, File search, Computer useGPT-5.6 TerraGPT-5.6 model that balances intelligence and costModel IDgpt-5.6-terraReasoningnonelowmediumhighxhighmaxInput price$2 / Input MTokOutput price$12 / Output MTokMax output128K tokensContext window1.05MKnowledge cutoffFeb 16, 2026ToolsFunctions, Web search, File search, Computer useGPT-5.6 LunaGPT-5.6 model optimized for cost-sensitive workloadsModel IDgpt-5.6-lunaReasoningnonelowmediumhighxhighmaxInput price$0.20 / Input MTokOutput price$1.20 / Output MTokMax output128K tokensContext window1.05MKnowledge cutoffFeb 16, 2026ToolsFunctions, Web search, File search, Computer useView moreSpecialized modelsPurpose-built for specific tasks.OpenAI DaybreakFrontier cyber models for defendersGPT-5.6 CyberOur most advanced cybersecurity model for authorized vulnerability research and security testing.Daybreak RedAn alias for advanced cybersecurity models for authorized vulnerability research and security testing.Daybreak BlueAn alias for frontier general-purpose models with safeguards for defensive cybersecurity work.ImageModels for image generation and editingGPT Image 2State-of-the-art image generation modelRealtimeModels for realtime speech and translationGPT-Realtime-2.1Reasoning model with tool useGPT-Realtime-2.1 miniReasoning model with tool useGPT-Realtime-2Reasoning model with tool useGPT-Realtime-TranslateStreaming speech-to-speech translation modelGPT-Realtime-1.5The best voice model for audio in, audio outGPT-Realtime miniDeprecatedA cost-efficient version of GPT-RealtimeSpeech generationModels for generating natural-sounding speech from textGPT-4o mini TTSText-to-speech model powered by GPT-4o miniTranscriptionModels for transcribing speech into textGPT TranscribeHigh-accuracy speech-to-text model for file and Realtime input transcriptionGPT Live TranscribeLow-latency speech-to-text model for realtime transcriptionGPT-Realtime-WhisperStreaming speech-to-text model for realtime transcriptionGPT-4o TranscribeSpeech-to-text model powered by GPT-4oGPT-4o mini TranscribeSpeech-to-text model powered by GPT-4o miniBrowse our full catalog of modelsDiverse models for a variety of tasksView all modelsCompare modelsHow we use your data·Deprecated models\n\nAsk AI Docs agent Loading docs agent...\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:57.649Z","totalSectionsIncluded":7,"totalCodeBlocksIncluded":0,"totalLines":15,"estimatedTokens":3299}}66{"id":"doc-manage_bid_modifiers_google_ads_api_google_for_d-6af54c16","source":"documentation","title":"Manage Bid Modifiers | Google Ads API | Google for Developers","url":"https://developers.google.com/google-ads/api/docs/campaigns/bidding/manage-bid-modifiers","text":"Example:\n```text\nprivate void runExample(\n    GoogleAdsClient googleAdsClient, long customerId, long adGroupId, double bidModifier) {\n\n  // Creates an ad group bid modifier for mobile devices with the specified ad group ID and\n  // bid modifier value.\n  AdGroupBidModifier adGroupBidModifier =\n      AdGroupBidModifier.newBuilder()\n          .setAdGroup(ResourceNames.adGroup(customerId, adGroupId))\n          .setBidModifier(bidModifier)\n          .setDevice(DeviceInfo.newBuilder().setType(Device.MOBILE))\n          .build();\n\n  // Creates an ad group bid modifier operation for creating an ad group bid modifier.\n  AdGroupBidModifierOperation adGroupBidModifierOperation =\n      AdGroupBidModifierOperation.newBuilder().setCreate(adGroupBidModifier).build();\n\n  // Issues a mutate request to add the ad group bid modifier.\n  try (AdGroupBidModifierServiceClient adGroupBidModifierServiceClient =\n      googleAdsClient.getLatestVersion().createAdGroupBidModifierServiceClient()) {\n    MutateAdGroupBidModifiersResponse response =\n        adGroupBidModifierServiceClient.mutateAdGroupBidModifiers(\n            Long.toString(customerId), ImmutableList.of(adGroupBidModifierOperation));\n\n    System.out.printf(\"Added %d ad group bid modifiers:%n\", response.getResultsCount());\n    for (MutateAdGroupBidModifierResult mutateAdGroupBidModifierResult :\n        response.getResultsList()) {\n      System.out.printf(\"\\t%s%n\", mutateAdGroupBidModifierResult.getResourceName());\n    }\n  }\n}AddAdGroupBidModifier.java\n```\n\nExample:\n```text\npublic void Run(GoogleAdsClient client, long customerId, long adGroupId,\n    double bidModifierValue)\n{\n    // Get the AdGroupBidModifierService.\n    AdGroupBidModifierServiceClient adGroupBidModifierService =\n        client.GetService(Services.V25.AdGroupBidModifierService);\n\n    // Creates an ad group bid modifier for mobile devices with the specified ad group\n    // ID and bid modifier value.\n    AdGroupBidModifier adGroupBidModifier = new AdGroupBidModifier()\n    {\n        AdGroup = ResourceNames.AdGroup(customerId, adGroupId),\n        BidModifier = bidModifierValue,\n        Device = new DeviceInfo()\n        {\n            Type = Device.Mobile\n        }\n    };\n\n    // Creates an ad group bid modifier operation for creating an ad group bid modifier.\n    AdGroupBidModifierOperation adGroupBidModifierOperation =\n        new AdGroupBidModifierOperation()\n        {\n            Create = adGroupBidModifier\n        };\n\n    // Send the operation in a mutate request.\n    try\n    {\n        MutateAdGroupBidModifiersResponse response =\n            adGroupBidModifierService.MutateAdGroupBidModifiers(customerId.ToString(),\n                new AdGroupBidModifierOperation[] { adGroupBidModifierOperation });\n        Console.WriteLine(\"Added {0} ad group bid modifiers:\", response.Results.Count);\n        foreach (MutateAdGroupBidModifierResult result in response.Results)\n        {\n            Console.WriteLine($\"\\t{result.ResourceName}\");\n        }\n    }\n    catch (GoogleAdsException e)\n    {\n        Console.WriteLine(\"Failure:\");\n        Console.WriteLine($\"Message: {e.Message}\");\n        Console.WriteLine($\"Failure: {e.Failure}\");\n        Console.WriteLine($\"Request ID: {e.RequestId}\");\n        throw;\n    }\n}AddAdGroupBidModifier.cs\n```\n\nExample:\n```text\npublic static function runExample(\n    GoogleAdsClient $googleAdsClient,\n    int $customerId,\n    int $adGroupId,\n    float $bidModifierValue\n) {\n    // Creates an ad group bid modifier for mobile devices with the specified ad group ID and\n    // bid modifier value.\n    $adGroupBidModifier = new AdGroupBidModifier([\n        'ad_group' => ResourceNames::forAdGroup($customerId, $adGroupId),\n        'bid_modifier' => $bidModifierValue,\n        'device' => new DeviceInfo(['type' => Device::MOBILE])\n    ]);\n\n    // Creates an ad group bid modifier operation for creating an ad group bid modifier.\n    $adGroupBidModifierOperation = new AdGroupBidModifierOperation();\n    $adGroupBidModifierOperation->setCreate($adGroupBidModifier);\n\n    // Issues a mutate request to add the ad group bid modifier.\n    $adGroupBidModifierServiceClient = $googleAdsClient->getAdGroupBidModifierServiceClient();\n    $response = $adGroupBidModifierServiceClient->mutateAdGroupBidModifiers(\n        MutateAdGroupBidModifiersRequest::build($customerId, [$adGroupBidModifierOperation])\n    );\n\n    printf(\"Added %d ad group bid modifier:%s\", $response->getResults()->count(), PHP_EOL);\n\n    foreach ($response->getResults() as $addedAdGroupBidModifier) {\n        /** @var AdGroupBidModifier $addedAdGroupBidModifier */\n        print $addedAdGroupBidModifier->getResourceName() . PHP_EOL;\n    }\n}AddAdGroupBidModifier.php\n```\n\nExample:\n```text\ndef main(\n    client: GoogleAdsClient,\n    customer_id: str,\n    ad_group_id: str,\n    bid_modifier_value: float,\n) -> None:\n    ad_group_service: AdGroupServiceClient = client.get_service(\n        \"AdGroupService\"\n    )\n    ad_group_bm_service: AdGroupBidModifierServiceClient = client.get_service(\n        \"AdGroupBidModifierService\"\n    )\n\n    # Create ad group bid modifier for mobile devices with the specified ad\n    # group ID and bid modifier value.\n    ad_group_bid_modifier_operation: AdGroupBidModifierOperation = (\n        client.get_type(\"AdGroupBidModifierOperation\")\n    )\n    ad_group_bid_modifier: AdGroupBidModifier = (\n        ad_group_bid_modifier_operation.create\n    )\n\n    # Set the ad group.\n    ad_group_bid_modifier.ad_group = ad_group_service.ad_group_path(\n        customer_id, ad_group_id\n    )\n\n    # Set the bid modifier.\n    ad_group_bid_modifier.bid_modifier = bid_modifier_value\n\n    # Sets the device.\n    device_enum: DeviceEnum = client.enums.DeviceEnum\n    ad_group_bid_modifier.device.type_ = device_enum.MOBILE\n\n    # Add the ad group bid modifier.\n    ad_group_bm_response: MutateAdGroupBidModifiersResponse = (\n        ad_group_bm_service.mutate_ad_group_bid_modifiers(\n            customer_id=customer_id,\n            operations=[ad_group_bid_modifier_operation],\n        )\n    )add_ad_group_bid_modifier.py\n```\n\nExample:\n```text\ndef add_ad_group_bid_modifier(customer_id, ad_group_id, bid_modifier_value)\n  # GoogleAdsClient will read a config file from\n  # ENV['HOME']/google_ads_config.rb when called without parameters\n  client = Google::Ads::GoogleAds::GoogleAdsClient.new\n\n  # Creates an ad group bid modifier for mobile devices with the specified\n  # ad group ID and bid modifier value.\n  ad_group_bid_modifier = client.resource.ad_group_bid_modifier do |mod|\n    # Sets the ad group.\n    mod.ad_group = client.path.ad_group(customer_id, ad_group_id)\n\n    # Sets the Bid Modifier.\n    mod.bid_modifier = bid_modifier_value\n\n    # Sets the Device.\n    mod.device = client.resource.device_info do |device|\n      device.type = :MOBILE\n    end\n  end\n\n  # Create the operation.\n  operation = client.operation.create_resource.ad_group_bid_modifier(ad_group_bid_modifier)\n\n  # Add the ad group ad.\n  response = client.service.ad_group_bid_modifier.mutate_ad_group_bid_modifiers(\n    customer_id: customer_id,\n    operations: [operation]\n  )\n\n  puts \"Added #{response.results.size} ad group bid modifiers:\"\n  response.results.each do |added_ad_group_bid_modifier|\n    puts \"\\t#{added_ad_group_bid_modifier.resource_name}\"\n  end\nendadd_ad_group_bid_modifier.rb\n```\n\nExample:\n```text\nsub add_ad_group_bid_modifier {\n  my ($api_client, $customer_id, $ad_group_id, $bid_modifier_value) = @_;\n\n  # Create an ad group bid modifier for mobile devices with the specified ad group ID and\n  # bid modifier value.\n  my $ad_group_bid_modifier =\n    Google::Ads::GoogleAds::V25::Resources::AdGroupBidModifier->new({\n      adGroup => Google::Ads::GoogleAds::V25::Utils::ResourceNames::ad_group(\n        $customer_id, $ad_group_id\n      ),\n      bidModifier => $bid_modifier_value,\n      device      => Google::Ads::GoogleAds::V25::Common::DeviceInfo->new({\n          type => MOBILE\n        })});\n\n  # Create an ad group bid modifier operation.\n  my $ad_group_bid_modifier_operation =\n    Google::Ads::GoogleAds::V25::Services::AdGroupBidModifierService::AdGroupBidModifierOperation\n    ->new({\n      create => $ad_group_bid_modifier\n    });\n\n  # Add the ad group bid modifier.\n  my $ad_group_bid_modifiers_response =\n    $api_client->AdGroupBidModifierService()->mutate({\n      customerId => $customer_id,\n      operations => [$ad_group_bid_modifier_operation]});\n\n  printf \"Created ad group bid modifier '%s'.\\n\",\n    $ad_group_bid_modifiers_response->{results}[0]{resourceName};\n\n  return 1;\n}add_ad_group_bid_modifier.pl\n```\n\nExample:\n```text\nSELECT\n  campaign.id,\n  ad_group.id,\n  ad_group_bid_modifier.bid_modifier,\n  ad_group_bid_modifier.criterion_id\nFROM ad_group_bid_modifier\nWHERE ad_group.id = ad_group_id\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:50.317Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":7,"totalLines":252,"estimatedTokens":2197}}67{"id":"doc-paypal_developer_upgrade_hub-cb143f4c","source":"documentation","title":"PayPal Developer Upgrade Hub","url":"https://developer.paypal.com/upgrade/platforms/WooCommerce","text":"Back to Platform SelectionWooCommercePayPal Upgrade GuideUpdate your plugin from PayPal Standard to the latest version of WooCommerce PayPal Payments, or upgrade to PayPal Expanded Checkout for more payment methods, enhanced customization, and greater control of your risk management. This guide is intended for WooCommerce developers and site administrators.DocsOnlineIn-PersonMultiparty3rd-partyPayoutsDisputesReportsIdentityTrackingArchiveToolsSandbox API executorDemo portalNegative testingCodespacesVS Code ExtensionCredit card generatorWebhooksAPI StatusSecure file transferAPIs & SDKsREST APIsJavaScript SDKNVP/SOAP APIsDonate SDKBraintree GraphCommunityCommunity homeBlogEventsChampionsVideos© PayPal 1999–2024ReferencePayPal.comPrivacyCookiesSupportLegalContact\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:43.836Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":0,"totalLines":3,"estimatedTokens":196}}68{"id":"doc-paypal_developer_upgrade_hub-d12912d6","source":"documentation","title":"PayPal Developer Upgrade Hub","url":"https://developer.paypal.com/upgrade/platforms/Wix","text":"Back to Platform SelectionWixPayPal Upgrade GuideThis document guides you on the process of moving to the recommended PayPal Payments extension. This is a newer, free extension that has the same and more features than older extensions.DocsOnlineIn-PersonMultiparty3rd-partyPayoutsDisputesReportsIdentityTrackingArchiveToolsSandbox API executorDemo portalNegative testingCodespacesVS Code ExtensionCredit card generatorWebhooksAPI StatusSecure file transferAPIs & SDKsREST APIsJavaScript SDKNVP/SOAP APIsDonate SDKBraintree GraphCommunityCommunity homeBlogEventsChampionsVideos© PayPal 1999–2024ReferencePayPal.comPrivacyCookiesSupportLegalContact\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:43.839Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":0,"totalLines":3,"estimatedTokens":165}}69{"id":"doc-onboard_sellers_after_payment_paypal_developer-2a7c190e","source":"documentation","title":"Onboard sellers after payment | PayPal Developer","url":"https://developer.paypal.com/platforms/seller-onboarding/after-payment/","text":"Example:\n```text\ncurl -v -X POST https://api-m.sandbox.paypal.com/v2/checkout/orders \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer ACCESS-TOKEN' \\\n -H 'PayPal-Partner-Attribution-Id: BN-CODE' \\\n -d '{\n \"intent\": \"CAPTURE\",\n \"purchase_units\": [{\n   \"amount\": {\n     \"currency_code\": \"USD\",\n     \"value\": \"100.00\"\n   },\n   \"payee\": {\n     \"email_address\": \"seller@example.com\"\n   },\n   \"payment_instruction\": {\n     \"disbursement_mode\": \"INSTANT\",\n     \"platform_fees\": [{\n       \"amount\": {\n         \"currency_code\": \"USD\",\n         \"value\": \"25.00\"\n       }\n     }]\n   }\n }]\n}'\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:43.866Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":1,"totalLines":30,"estimatedTokens":155}}70{"id":"doc-performance_max_optimizations_google_ads_api_goo-a618f3ff","source":"documentation","title":"Performance Max Optimizations | Google Ads API | Google for Developers","url":"https://developers.google.com/google-ads/api/performance-max/optimizations","text":"Example:\n```text\nSELECT\n  asset_group.ad_strength,\n  asset_group.asset_coverage\nFROM asset_group\nWHERE asset_group.resource_name = \"customers/CUSTOMER_ID/assetGroups/ASSET_GROUP_ID\"\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:50.362Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":1,"totalLines":10,"estimatedTokens":50}}71{"id":"doc-import_conversion_adjustments_google_ads_api_goo-90ca2285","source":"documentation","title":"Import conversion adjustments | Google Ads API | Google for Developers","url":"https://developers.google.com/google-ads/api/docs/conversions/upload-adjustments","text":"Example:\n```text\nprivate void runExample(\n    GoogleAdsClient googleAdsClient,\n    long customerId,\n    long conversionActionId,\n    String orderId,\n    String adjustmentType,\n    String adjustmentDateTime,\n    @Nullable Float restatementValue)\n    throws InvalidProtocolBufferException {\n  // Gets the conversion adjustment enum value from the adjustmentType String.\n  ConversionAdjustmentType conversionAdjustmentType =\n      ConversionAdjustmentType.valueOf(adjustmentType);\n\n  // Applies the conversion adjustment to the existing conversion.\n  ConversionAdjustment conversionAdjustment =\n      ConversionAdjustment.newBuilder()\n          .setConversionAction(ResourceNames.conversionAction(customerId, conversionActionId))\n          .setAdjustmentType(conversionAdjustmentType)\n          // Sets the orderId to identify the conversion to adjust.\n          .setOrderId(orderId)\n          // As an alternative to setting orderId, you can provide a GclidDateTimePair, but\n          // setting orderId instead is strongly recommended.\n          // .setGclidDateTimePair(\n          //     GclidDateTimePair.newBuilder()\n          //         .setGclid(gclid)\n          //         .setConversionDateTime(conversionDateTime)\n          //         .build())\n          .setAdjustmentDateTime(adjustmentDateTime)\n          .build();\n\n  // Sets adjusted value for adjustment type RESTATEMENT.\n  if (restatementValue != null\n      && conversionAdjustmentType == ConversionAdjustmentType.RESTATEMENT) {\n    conversionAdjustment =\n        conversionAdjustment.toBuilder()\n            .setRestatementValue(\n                RestatementValue.newBuilder().setAdjustedValue(restatementValue).build())\n            .build();\n  }\n\n  // Creates the conversion upload service client.\n  try (ConversionAdjustmentUploadServiceClient conversionUploadServiceClient =\n      googleAdsClient.getLatestVersion().createConversionAdjustmentUploadServiceClient()) {\n    // Uploads the click conversion. Partial failure should always be set to true.\n    UploadConversionAdjustmentsRequest request =\n        UploadConversionAdjustmentsRequest.newBuilder()\n            .setCustomerId(Long.toString(customerId))\n            // Enables partial failure (must be true).\n            .setPartialFailure(true)\n            .addConversionAdjustments(conversionAdjustment)\n            .build();\n    UploadConversionAdjustmentsResponse response =\n        conversionUploadServiceClient.uploadConversionAdjustments(request);\n\n    // Extracts the partial failure error if present on the response.\n    ErrorUtils errorUtils = ErrorUtils.getInstance();\n    GoogleAdsFailure googleAdsFailure =\n        response.hasPartialFailureError()\n            ? errorUtils.getGoogleAdsFailure(response.getPartialFailureError())\n            : null;\n\n    // Constructs a protocol buffer printer that will print error details in a concise format.\n    final Printer errorPrinter = JsonFormat.printer().omittingInsignificantWhitespace();\n    // Prints the results for each adjustment, including any partial errors returned.\n    for (int opIndex = 0; opIndex < request.getConversionAdjustmentsCount(); opIndex++) {\n      ConversionAdjustmentResult result = response.getResults(opIndex);\n      if (errorUtils.isPartialFailureResult(result)) {\n        // The operation failed. Prints the error details.\n        for (GoogleAdsError googleAdsError :\n            errorUtils.getGoogleAdsErrors(opIndex, googleAdsFailure)) {\n          System.out.printf(\n              \"%4d: Partial failure occurred: %s%n\", opIndex, errorPrinter.print(googleAdsError));\n        }\n      } else {\n        System.out.printf(\n            \"%4d: Uploaded conversion adjustment for conversion action '%s' and order ID '%s'.%n\",\n            opIndex, result.getConversionAction(), result.getOrderId());\n      }\n    }\n  }\n}UploadConversionAdjustment.java\n```\n\nExample:\n```text\npublic void Run(GoogleAdsClient client, long customerId, long conversionActionId,\n    string orderId, string adjustmentDateTime,\n    ConversionAdjustmentType adjustmentType,\n    double? restatementValue)\n{\n    // Get the ConversionAdjustmentUploadService.\n    ConversionAdjustmentUploadServiceClient conversionAdjustmentUploadService =\n        client.GetService(Services.V25.ConversionAdjustmentUploadService);\n\n    // Associate conversion adjustments with the existing conversion action.\n    ConversionAdjustment conversionAdjustment = new ConversionAdjustment()\n    {\n        ConversionAction = ResourceNames.ConversionAction(customerId, conversionActionId),\n        AdjustmentType = adjustmentType,\n        // Sets the orderId to identify the conversion to adjust.\n        OrderId = orderId,\n        // As an alternative to setting orderId, you can provide a GclidDateTimePair,\n        // but setting orderId instead is strongly recommended.\n        //GclidDateTimePair = new GclidDateTimePair()\n        //{\n        //    Gclid = gclid,\n        //    ConversionDateTime = conversionDateTime,\n        //},\n        AdjustmentDateTime = adjustmentDateTime,\n    };\n\n    // Set adjusted value for adjustment type RESTATEMENT.\n    if (adjustmentType == ConversionAdjustmentType.Restatement)\n    {\n        conversionAdjustment.RestatementValue = new RestatementValue()\n        {\n            AdjustedValue = restatementValue.Value\n        };\n    }\n\n    try\n    {\n        // Issue a request to upload the conversion adjustment.\n        UploadConversionAdjustmentsResponse response =\n            conversionAdjustmentUploadService.UploadConversionAdjustments(\n                new UploadConversionAdjustmentsRequest()\n                {\n                    CustomerId = customerId.ToString(),\n                    ConversionAdjustments = { conversionAdjustment },\n                    // Enables partial failure (must be true).\n                    PartialFailure = true,\n                    ValidateOnly = false\n                });\n\n        // Prints any partial errors returned.\n        // To review the overall health of your recent uploads, see:\n        // https://developers.google.com/google-ads/api/docs/conversions/upload-summaries\n        if (response.PartialFailureError != null)\n        {\n            // Extracts the partial failure from the response status.\n            GoogleAdsFailure partialFailure = response.PartialFailure;\n            Console.WriteLine($\"{partialFailure.Errors.Count} partial failure error(s) \" +\n                $\"occurred\");\n        }\n        else\n        {\n            ConversionAdjustmentResult result = response.Results[0];\n            // Print the result.\n            Console.WriteLine($\"Uploaded conversion adjustment value of\" +\n                $\" '{result.ConversionAction}' for Google Click ID \" +\n                $\"'{result.GclidDateTimePair.Gclid}'\");\n        }\n    }\n    catch (GoogleAdsException e)\n    {\n        Console.WriteLine(\"Failure:\");\n        Console.WriteLine($\"Message: {e.Message}\");\n        Console.WriteLine($\"Failure: {e.Failure}\");\n        Console.WriteLine($\"Request ID: {e.RequestId}\");\n        throw;\n    }\n}UploadConversionAdjustment.cs\n```\n\nExample:\n```text\npublic static function runExample(\n    GoogleAdsClient $googleAdsClient,\n    int $customerId,\n    int $conversionActionId,\n    string $orderId,\n    string $adjustmentType,\n    string $adjustmentDateTime,\n    ?float $restatementValue\n) {\n    $conversionAdjustmentType = ConversionAdjustmentType::value($adjustmentType);\n\n    // Applies the conversion adjustment to the existing conversion.\n    $conversionAdjustment = new ConversionAdjustment([\n        'conversion_action' =>\n            ResourceNames::forConversionAction($customerId, $conversionActionId),\n        'adjustment_type' => $conversionAdjustmentType,\n        // Sets the orderId to identify the conversion to adjust.\n        'order_id' => $orderId,\n        // As an alternative to setting orderId, you can provide a 'gclid_date_time_pair', but\n        // setting 'order_id' instead is strongly recommended.\n        // 'conversion_date_time' must be in \"yyyy-mm-dd hh:mm:ss+|-hh:mm\" format.\n        /*\n        'gclid_date_time_pair' => new GclidDateTimePair([\n            'gclid' => 'INSERT_YOUR_GCLID_HERE',\n            'conversion_date_time' => 'INSERT_YOUR_CONVERSION_DATE_TIME_HERE'\n        ]),\n        */\n        'adjustment_date_time' => $adjustmentDateTime\n    ]);\n\n    // Sets adjusted value for adjustment type RESTATEMENT.\n    if (\n        $restatementValue !== null\n        && $conversionAdjustmentType === ConversionAdjustmentType::RESTATEMENT\n    ) {\n        $conversionAdjustment->setRestatementValue(new RestatementValue([\n            'adjusted_value' => $restatementValue\n        ]));\n    }\n\n    // Issues a request to upload the conversion adjustment.\n    $conversionAdjustmentUploadServiceClient =\n        $googleAdsClient->getConversionAdjustmentUploadServiceClient();\n    $response = $conversionAdjustmentUploadServiceClient->uploadConversionAdjustments(\n        // Enables partial failure (must be true).\n        UploadConversionAdjustmentsRequest::build($customerId, [$conversionAdjustment], true)\n    );\n\n    // Prints the status message if any partial failure error is returned.\n    // Note: The details of each partial failure error are not printed here, you can refer to\n    // the example HandlePartialFailure.php to learn more.\n    if ($response->hasPartialFailureError()) {\n        printf(\n            \"Partial failures occurred: '%s'.%s\",\n            $response->getPartialFailureError()->getMessage(),\n            PHP_EOL\n        );\n    } else {\n        // Prints the result if exists.\n        /** @var ConversionAdjustmentResult $uploadedConversionAdjustment */\n        $uploadedConversionAdjustment = $response->getResults()[0];\n        printf(\n            \"Uploaded conversion adjustment of '%s' for order ID '%s'.%s\",\n            $uploadedConversionAdjustment->getConversionAction(),\n            $uploadedConversionAdjustment->getOrderId(),\n            PHP_EOL\n        );\n    }\n}UploadConversionAdjustment.php\n```\n\nExample:\n```text\ndef main(\n    client: GoogleAdsClient,\n    customer_id: str,\n    conversion_action_id: str,\n    adjustment_type: str,\n    order_id: str,\n    adjustment_date_time: str,\n    restatement_value: Optional[str] = None,\n) -> None:\n    \"\"\"The main method that creates all necessary entities for the example.\n\n    Args:\n        client: an initialized GoogleAdsClient instance.\n        customer_id: a client customer ID.\n        conversion_action_id: the ID of the conversion action to upload the\n            adjustment to.\n        adjustment_type: the adjustment type, e.g. \" \"RETRACTION, RESTATEMENT.\n        order_id: the transaction ID of the conversion to adjust. Strongly\n            recommended instead of using gclid and conversion_date_time.\n        adjustment_date_time: the date and time of the adjustment.\n        restatement_value: the adjusted value for adjustment type RESTATEMENT.\n    \"\"\"\n    conversion_adjustment_type_enum: ConversionAdjustmentTypeEnum = (\n        client.enums.ConversionAdjustmentTypeEnum\n    )\n    # Determine the adjustment type.\n    conversion_adjustment_type: int = conversion_adjustment_type_enum[\n        adjustment_type\n    ].value\n\n    # Applies the conversion adjustment to the existing conversion.\n    conversion_adjustment: ConversionAdjustment = client.get_type(\n        \"ConversionAdjustment\"\n    )\n    conversion_action_service: ConversionActionServiceClient = (\n        client.get_service(\"ConversionActionService\")\n    )\n    conversion_adjustment.conversion_action = (\n        conversion_action_service.conversion_action_path(\n            customer_id, conversion_action_id\n        )\n    )\n    conversion_adjustment.adjustment_type = conversion_adjustment_type\n    conversion_adjustment.adjustment_date_time = adjustment_date_time\n\n    # Sets the order_id to identify the conversion to adjust.\n    conversion_adjustment.order_id = order_id\n\n    # As an alternative to setting order_id, you can provide a\n    # gclid_date_time_pair, but setting order_id instead is strongly recommended.\n    # conversion_adjustment.gclid_date_time_pair.gclid = gclid\n    # conversion_adjustment.gclid_date_time_pair.conversion_date_time = (\n    #     conversion_date_time\n    # )\n\n    # Sets adjusted value for adjustment type RESTATEMENT.\n    if (\n        restatement_value\n        and conversion_adjustment_type\n        == conversion_adjustment_type_enum.RESTATEMENT.value\n    ):\n        conversion_adjustment.restatement_value.adjusted_value = float(\n            restatement_value\n        )\n\n    # Uploads the click conversion. Partial failure should always be set to\n    # true.\n    service: ConversionAdjustmentUploadServiceClient = client.get_service(\n        \"ConversionAdjustmentUploadService\"\n    )\n    request: UploadConversionAdjustmentsRequest = client.get_type(\n        \"UploadConversionAdjustmentsRequest\"\n    )\n    request.customer_id = customer_id\n    request.conversion_adjustments.append(conversion_adjustment)\n    # Enables partial failure (must be true)\n    request.partial_failure = True\n\n    response: UploadConversionAdjustmentsResponse = (\n        service.upload_conversion_adjustments(request=request)\n    )\n\n    # Extracts the partial failure error if present on the response.\n    error_details = None\n    if response.partial_failure_error:\n        error_details: Iterable[Any] = response.partial_failure_error.details\n\n    i: int\n    conversion_adjustment_result: ConversionAdjustmentResult\n    for i, conversion_adjustment_result in enumerate(response.results):\n        # If there's a GoogleAdsFailure in error_details at this position then\n        # the uploaded operation failed and we print the error message.\n        if error_details and error_details[i]:\n            error_detail: Any = error_details[i]\n            failure_message: GoogleAdsFailure = client.get_type(\n                \"GoogleAdsFailure\"\n            )\n            # Parse the string into a GoogleAdsFailure message instance.\n            # To access class-only methods on the message we retrieve its type.\n            google_ads_failure_class: GoogleAdsFailure = type(failure_message)\n            failure_object: GoogleAdsFailure = (\n                google_ads_failure_class.deserialize(error_detail.value)\n            )\n\n            error: GoogleAdsError\n            for error in failure_object.errors:\n                # Construct and print a string that details which element in\n                # the operation list failed (by index number) as well as the\n                # error message and error code.\n                print(\n                    \"A partial failure at index \"\n                    f\"{error.location.field_path_elements[0].index} occurred \"\n                    f\"\\nError message: {error.message}\\nError code: \"\n                    f\"{error.error_code}\"\n                )\n        else:\n            print(\n                \"Uploaded conversion adjustment for conversion action \"\n                f\"'{conversion_adjustment_result.conversion_action}' and order \"\n                f\"ID '{conversion_adjustment_result.order_id}'.\"\n            )upload_conversion_adjustment.py\n```\n\nExample:\n```text\ndef upload_conversion_adjustment(\n  customer_id,\n  conversion_action_id,\n  order_id,\n  adjustment_type,\n  adjustment_date_time,\n  restatement_value\n)\n  # GoogleAdsClient will read a config file from\n  # ENV['HOME']/google_ads_config.rb when called without parameters\n  client = Google::Ads::GoogleAds::GoogleAdsClient.new\n\n  # Applies the conversion adjustment to the existing conversion.\n  conversion_adjustment = client.resource.conversion_adjustment do |ca|\n    ca.conversion_action = client.path.conversion_action(customer_id, conversion_action_id)\n    ca.adjustment_type = adjustment_type\n    ca.order_id = order_id\n    ca.adjustment_date_time = adjustment_date_time\n\n    # Set adjusted value for adjustment type RESTATEMENT.\n    if adjustment_type == :RESTATEMENT\n      ca.restatement_value = client.resource.restatement_value do |ra|\n        ra.adjusted_value = restatement_value.to_f\n      end\n    end\n  end\n\n  # Issue a request to upload the conversion adjustment(s).\n  response = client.service.conversion_adjustment_upload.upload_conversion_adjustments(\n    customer_id: customer_id,\n    # This example shows just one adjustment but you may upload multiple ones.\n    conversion_adjustments: [conversion_adjustment],\n    partial_failure: true\n  )\n\n  if response.partial_failure_error.nil?\n    # Process and print all results for multiple adjustments\n    response.results.each do |result|\n      puts \"Uploaded conversion adjustment for conversion action #{result.conversion_action} \"\\\n        \"and order ID #{result.order_id}.\"\n    end\n  else\n    # Print any partial errors returned.\n    failures = client.decode_partial_failure_error(response.partial_failure_error)\n    puts 'Request failed. Failure details:'\n    failures.each do |failure|\n      failure.errors.each do |error|\n        index = error.location.field_path_elements.first.index\n        puts \"\\toperation[#{index}] #{error.error_code.error_code}: #{error.message}\"\n      end\n    end\n  end\nendupload_conversion_adjustment.rb\n```\n\nExample:\n```text\nsub upload_conversion_adjustment {\n  my ($api_client, $customer_id, $conversion_action_id, $order_id,\n    $adjustment_type, $adjustment_date_time, $restatement_value)\n    = @_;\n\n  # Applies the conversion adjustment to the existing conversion.\n  my $conversion_adjustment =\n    Google::Ads::GoogleAds::V25::Services::ConversionAdjustmentUploadService::ConversionAdjustment\n    ->new({\n      conversionAction =>\n        Google::Ads::GoogleAds::V25::Utils::ResourceNames::conversion_action(\n        $customer_id, $conversion_action_id\n        ),\n      adjustmentType => $adjustment_type,\n      # Sets the orderId to identify the conversion to adjust.\n      orderId => $order_id,\n      # As an alternative to setting orderId, you can provide a 'gclid_date_time_pair',\n      # but setting 'order_id' instead is strongly recommended.\n      # gclidDateTimePair =>\n      #  Google::Ads::GoogleAds::V25::Services::ConversionAdjustmentUploadService::GclidDateTimePair\n      #  ->new({\n      #    gclid              => $gclid,\n      #    conversionDateTime => $conversion_date_time\n      #  }\n      #  ),\n      adjustmentDateTime => $adjustment_date_time,\n    });\n\n  # Set adjusted value for adjustment type RESTATEMENT.\n  $conversion_adjustment->{restatementValue} =\n    Google::Ads::GoogleAds::V25::Services::ConversionAdjustmentUploadService::RestatementValue\n    ->new({\n      adjustedValue => $restatement_value\n    }) if defined $restatement_value && $adjustment_type eq RESTATEMENT;\n\n  # Issue a request to upload the conversion adjustment.\n  my $upload_conversion_adjustments_response =\n    $api_client->ConversionAdjustmentUploadService()\n    ->upload_conversion_adjustments({\n      customerId            => $customer_id,\n      conversionAdjustments => [$conversion_adjustment],\n      partialFailure        => \"true\"\n    });\n\n  # Print any partial errors returned.\n  if ($upload_conversion_adjustments_response->{partialFailureError}) {\n    printf \"Partial error encountered: '%s'.\\n\",\n      $upload_conversion_adjustments_response->{partialFailureError}{message};\n  }\n\n  # Print the result if valid.\n  my $uploaded_conversion_adjustment =\n    $upload_conversion_adjustments_response->{results}[0];\n  if (%$uploaded_conversion_adjustment) {\n    printf \"Uploaded conversion adjustment of the conversion action \" .\n      \"with resource name '%s' for order ID '%s'.\\n\",\n      $uploaded_conversion_adjustment->{conversionAction},\n      $uploaded_conversion_adjustment->{orderId};\n  }\n\n  return 1;\n}upload_conversion_adjustment.pl\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:50.468Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":6,"totalLines":488,"estimatedTokens":4926}}72{"id":"doc-templates_django_documentation_django-72e5f45d","source":"documentation","title":"Templates | Django documentation | Django","url":"https://docs.djangoproject.com/en/stable/topics/templates/","text":"Django The web framework for perfectionists with deadlines. Menu Main navigation Overview Download Documentation News Code Issues Community Foundation ♥ Donate Search Submit Toggle theme (current ) Toggle theme (current ) Toggle theme (current ) Toggle Light / Dark / Auto color theme\n\nExample:\n```text\nMy first name is {{ first_name }}. My last name is {{ last_name }}.\n```\n\nExample:\n```text\nMy first name is John. My last name is Doe.\n```\n\nExample:\n```text\n{{ my_dict.key }}\n{{ my_object.attribute }}\n{{ my_list.0 }}\n```\n\nExample:\n```text\n{% csrf_token %}\n```\n\nExample:\n```text\n{% cycle 'odd' 'even' %}\n```\n\nExample:\n```text\n{% if user.is_authenticated %}Hello, {{ user.username }}.{% endif %}\n```\n\nExample:\n```text\n{{ django|title }}\n```\n\nExample:\n```text\nThe Web Framework For Perfectionists With Deadlines\n```\n\nExample:\n```text\n{{ my_date|date:\"Y-m-d\" }}\n```\n\nExample:\n```text\n{# this won't be rendered #}\n```\n\nExample:\n```text\nTEMPLATES = [\n    {\n        \"BACKEND\": \"django.template.backends.django.DjangoTemplates\",\n        \"DIRS\": [],\n        \"APP_DIRS\": True,\n        \"OPTIONS\": {\n            # ... some options here ...\n        },\n    },\n]\n```\n\nExample:\n```text\nfrom django.template.loader import get_template\n\n# Load an entire template.\ntemplate = get_template(\"template.html\")\n\n# Load a specific fragment from a template.\npartial = get_template(\"template.html#partial_name\")\n```\n\nExample:\n```text\nTEMPLATES = [\n    {\n        \"BACKEND\": \"django.template.backends.django.DjangoTemplates\",\n        \"DIRS\": [\n            \"/home/html/example.com\",\n            \"/home/html/default\",\n        ],\n    },\n    {\n        \"BACKEND\": \"django.template.backends.jinja2.Jinja2\",\n        \"DIRS\": [\n            \"/home/html/jinja2\",\n        ],\n    },\n]\n```\n\nExample:\n```text\nget_template(\"news/story_detail.html\")\n```\n\nExample:\n```text\nfrom django.template.loader import render_to_string\n\nrendered = render_to_string(\"my_template.html\", {\"foo\": \"bar\"})\n```\n\nExample:\n```text\nfrom django.template import engines\n\ndjango_engine = engines[\"django\"]\ntemplate = django_engine.from_string(\"Hello {{ name }}!\")\n```\n\nExample:\n```text\nOPTIONS = {\n    \"libraries\": {\n        \"myapp_tags\": \"path.to.myapp.tags\",\n        \"admin.urls\": \"django.contrib.admin.templatetags.admin_urls\",\n    },\n}\n```\n\nExample:\n```text\nOPTIONS = {\n    \"builtins\": [\"myapp.builtins\"],\n}\n```\n\nExample:\n```text\n$ python -m pip install Jinja2\n```\n\nExample:\n```text\n...\\> py -m pip install Jinja2\n```\n\nExample:\n```text\n{{ function(request) }}\n```\n\nExample:\n```text\nfrom django.templatetags.static import static\nfrom django.urls import reverse\n\nfrom jinja2 import Environment\n\n\ndef environment(**options):\n    env = Environment(**options)\n    env.globals.update(\n        {\n            \"static\": static,\n            \"url\": reverse,\n        }\n    )\n    return env\n```\n\nExample:\n```text\n<img src=\"{{ static('path/to/company-logo.png') }}\" alt=\"Company Logo\">\n\n<a href=\"{{ url('admin:index') }}\">Administration</a>\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:59.913Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":23,"totalLines":177,"estimatedTokens":745}}73{"id":"doc-aya_vision_cohere-ebe5b198","source":"documentation","title":"Aya Vision | Cohere","url":"https://docs.cohere.com/docs/aya-vision","text":"For AI documentation index is available at the root level at /llms.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.\n\nExample:\n```text\n1import cohere2import base643import os456def generate_text(image_path, message):78    model = \"c4ai-aya-vision-32b\"910    co = cohere.ClientV2(\"<YOUR_API_KEY>\")1112    with open(image_path, \"rb\") as img_file:13        base64_image_url = f\"data:image/jpeg;base64,{base64.b64encode(img_file.read()).decode('utf-8')}\"1415    response = co.chat(16        model=model,17        messages=[18            {19                \"role\": \"user\",20                \"content\": [21                    {\"type\": \"text\", \"text\": message},22                    {23                        \"type\": \"image_url\",24                        \"image_url\": {\"url\": base64_image_url},25                    },26                ],27            }28        ],29        temperature=0.3,30    )3132    print(response.message.content[0].text)\n```\n\nExample:\n```text\nThe wall in this room showcases a collection of musical instruments and related items, creating a unique and personalized atmosphere. Here's a breakdown of the items featured:1. **Guitar Wall Mount**: The centerpiece of the wall is a collection of guitars mounted on a wall. There are three main guitars visible:   - A blue electric guitar with a distinctive design.   - An acoustic guitar with a turquoise color and a unique shape.   - A red electric guitar with a sleek design.2. **Ukulele Display**: Above the guitars, there is a display featuring a ukulele and its case. The ukulele has a traditional wooden body and a colorful design.3. **Artwork and Posters**:   - A framed poster or artwork depicting a scene from *The Matrix*, featuring the iconic green pill and red pill.   - A framed picture or album artwork of *Fleetwood Mac McDonald*, including *Rumours*, *Tusk*, and *Dreams*.   - A framed image of the *Dark Side of the Moon* album cover by Pink Floyd.   - A framed poster or artwork of *Star Wars* featuring *R2-D2* (Robotic Man).4. **Album Collection**: Along the floor, there is a collection of vinyl records or album artwork displayed on a carpeted area. Some notable albums include:   - *Dark Side of the Moon* by Pink Floyd.   - *The Beatles* (White Album).   - *Abbey Road* by The Beatles.   - *Nevermind* by Nirvana.5. **Lighting and Accessories**:   - A blue lamp with a distinctive design, possibly serving as a floor lamp.   - A small table lamp with a warm-toned shade.\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:59.302Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":2,"totalLines":13,"estimatedTokens":632}}74{"id":"doc-deploying_models_in_private_environments_cohere-7324345d","source":"documentation","title":"Deploying Models in Private Environments | Cohere","url":"https://docs.cohere.com/docs/single-container-on-private-clouds","text":"For AI documentation index is available at the root level at /llms.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.\n\nExample:\n```text\nLICENSE_ID=\"<YOUR LICENSE ID>\"cat <<EOF > ~/.docker/config.json {    \"auths\": {        \"proxy.replicated.com\": {            \"auth\": \"$(echo -n \"${LICENSE_ID}:${LICENSE_ID}\" | base64 | tr -d '\\n')\"        }    }}EOF\n```\n\nExample:\n```text\nLICENSE_ID=\"<YOUR LICENSE ID>\"export DOCKER_CONFIG=$(mktemp -d)cat <<EOF > \"${DOCKER_CONFIG}/config.json\"{    \"auths\": {        \"proxy.replicated.com\": {            \"auth\": \"$(echo -n \"${LICENSE_ID}:${LICENSE_ID}\" | base64 | tr -d '\\n')\"        }    }}EOF\n```\n\nExample:\n```text\nCUSTOMER_TAG=image_tag_from_cohere # provided by Coheredocker pull $CUSTOMER_TAG\n```\n\nExample:\n```text\ndocker run -d --rm --name embed-v4 --gpus=1 --net=host $IMAGE_TAG# wait 5-10 seconds for the container to start# you can use `curl http://localhost:8080/ping` to check for readinesscurl --header \"Content-Type: application/json\" --request POST http://localhost:8080/embed --data-raw '{\"input_type\": \"search_query\", \"texts\":[\"Why are embeddings good\"], \"embedding_types\": [\"float\"]}'{\"id\":\"6d54d453-f2c8-44da-aab8-39e3c11d29d5\",\"texts\":[\"Why are embeddings good\"],\"embeddings\":{\"float\":[[0.033935547,0.06347656,0.020263672,-0.020507812,0.014160156,0.0038757324,-0.07421875,-0.05859375,...docker stop embed-v4\n```\n\nExample:\n```text\n1kubectl create secret generic cohere-pull-secret \\2    --from-file=.dockerconfigjson=\"~/.docker/config.json\" \\3    --type=kubernetes.io/dockerconfigjson\n```\n\nExample:\n```text\nAPP=cohere # or any other name you want to useIMAGE= <IMAGE_TAG_FROM_COHERE> # replace with the image cohere providedGPUS= <Number of GPUs for the target model> cat <<EOF > cohere.yaml---apiVersion: apps/v1kind: Deploymentmetadata:  labels:    app: ${APP}  name: ${APP}spec:  replicas: 1  selector:    matchLabels:      app: ${APP}  strategy: {}  template:    metadata:      labels:        app: ${APP}    spec:      imagePullSecrets:        - name: cohere-pull-secret      containers:      - image: ${IMAGE}        name: ${APP}        resources:          limits:            nvidia.com/gpu: ${GPUS}---apiVersion: v1kind: Servicemetadata:  labels:    app: ${APP}  name: ${APP}spec:  ports:  - name: http    port: 8080    protocol: TCP    targetPort: 8080  selector:    app: ${APP}  type: ClusterIP---EOF\n```\n\nExample:\n```text\nkubectl apply -f cohere.yaml\n```\n\nExample:\n```text\n# once the pod is runningkubectl port-forward svc/${APP} 8080:8080# Forwarding from 127.0.0.1:8080 -> 8080# Forwarding from [::1]:8080 -> 8080# Handling connection for 8080\n```\n\nExample:\n```text\ncurl --header \"Content-Type: application/json\" --request POST http://localhost:8080/embed --data-raw '{\"texts\": [\"testing embeddings in english\"], \"input_type\": \"classification\"}'# {\"id\":\"2ffe4bca-8664-4456-b858-1b3b15411f2c\",\"embeddings\":[[-0.5019531,-2.0917969,-1.6220703,-1.2919922,-0.80029297,1.3173828,1.4677734,-1.7763672,0.03869629,1.9033203...}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:59.320Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":9,"totalLines":48,"estimatedTokens":763}}75{"id":"doc-list_embed_jobs_cohere-771cdadc","source":"documentation","title":"List Embed Jobs | Cohere","url":"https://docs.cohere.com/reference/list-embed-jobs","text":"For AI documentation index is available at the root level at /llms.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.\n\nExample:\n```text\n1import cohere23co = cohere.Client()45# list embed jobs6response = co.embed_jobs.list()78print(response)\n```\n\nExample:\n```text\n1{2  \"embed_jobs\": [3    {4      \"job_id\": \"e7a1f3b2-4c9d-4f8a-9b2e-3d5f7a1c2b4e\",5      \"status\": \"processing\",6      \"created_at\": \"2024-01-15T09:30:00Z\",7      \"input_dataset_id\": \"dataset_987654321\",8      \"model\": \"embed-multilingual-v2.0\",9      \"truncate\": \"START\",10      \"name\": \"User123 Text Embedding Job\",11      \"output_dataset_id\": \"dataset_123456789\",12      \"meta\": {13        \"api_version\": {14          \"version\": \"1.0.0\",15          \"is_deprecated\": false,16          \"is_experimental\": false17        },18        \"billed_units\": {19          \"images\": 0,20          \"input_tokens\": 1500,21          \"image_tokens\": 0,22          \"output_tokens\": 1536,23          \"search_units\": 0,24          \"classifications\": 025        },26        \"tokens\": {27          \"input_tokens\": 1500,28          \"output_tokens\": 153629        },30        \"cached_tokens\": 0,31        \"warnings\": []32      }33    }34  ]35}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:59.336Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":2,"totalLines":13,"estimatedTokens":314}}76{"id":"doc-configuration-1e94290f","source":"documentation","title":"Configuration","url":"https://developer.paypal.com/braintree/docs/guides/extend/forward-api/configuration/","text":"Braintree a PayPal ServiceSDK DocsConfigurationSDK DocsAPI & In-Person DocsSupport ArticlesSearchGet HelpContact SalesCreate AccountLoginProduction Control PanelLoginBecome a MerchantContact SalesAboutGet StartedGuidesReference\n\nExample:\n```bash\ncurl https://forwarding.sandbox.braintreegateway.com/ \\\n  -H \"Content-Type: application/json\" \\\n  -X POST \\\n  -u \"${BRAINTREE_PUBLIC_KEY}:${BRAINTREE_PRIVATE_KEY}\" \\\n  -d '{\n    \"merchant_id\": \"'\"$BRAINTREE_MERCHANT_ID\"'\",\n    \"payment_method_nonce\": \"fake-valid-nonce\",\n    \"url\": \"https://httpbin.org/post\",\n    \"method\": \"POST\",\n    \"config\": {\n      \"name\": \"inline_example\",\n      \"methods\": [\"POST\"],\n      \"url\": \"^https://httpbin\\.org/post$\",\n      \"request_format\": {\"/body\": \"urlencode\"},\n      \"types\": [\"CreditCard\"],\n      \"transformations\": [{\n        \"path\": \"/body/card[number]\",\n        \"value\": \"$number\"\n      }]\n    }\n  }'\n```\n\nExample:\n```json\n{\n    \"status\": 200, // (httpbin.org status code)\n    \"headers\": (headers from httpbin.org),\n    \"body\": (raw body from httpbin.org),\n    \"request-time\": (in milliseconds)\n}\n```\n\nExample:\n```bash\n# sample usage of the 'braintree' config\ncurl https://forwarding.sandbox.braintreegateway.com/ \\\n  -H \"Content-Type: application/json\" \\\n  -X POST \\\n  -u \"${BRAINTREE_PUBLIC_KEY}:${BRAINTREE_PRIVATE_KEY}\" \\\n  -d '{\n    \"merchant_id\": \"'\"$BRAINTREE_MERCHANT_ID\"'\",\n    \"payment_method_nonce\": \"fake-valid-nonce\",\n    \"name\": \"braintree\",\n    \"url\": \"https://sandbox.braintreegateway.com/merchants/'$BRAINTREE_MERCHANT_ID'/transactions\",\n    \"method\": \"POST\",\n    \"data\": {\"public_key\": \"'\"$BRAINTREE_PUBLIC_KEY\"'\", \"amount\": \"1.00\"},\n    \"sensitive_data\": {\"private_key\": \"'\"$BRAINTREE_PRIVATE_KEY\"'\"}\n  }'\n```\n\nExample:\n```bash\ncurl https://forwarding.sandbox.braintreegateway.com/ \\\n    -H \"Content-Type: application/json\" \\\n    -X POST \\\n    -u \"$\\{BRAINTREE_PUBLIC_KEY}:$\\{BRAINTREE_PRIVATE_KEY}\" \\\n    -d '{\n        \"merchant_id\": \"'$BRAINTREE_MERCHANT_ID'\",\n        \"payment_method_nonce\": \"fake-valid-nonce\",\n        \"debug_transformations\": true,\n        \"url\": \"https://httpbin.org/post\",\n        \"method\": \"POST\",\n        \"config\": {\n            \"name\": \"inline_example_debug\",\n            \"methods\": [\"POST\"],\n            \"url\": \"^https://httpbin\\\\.org/post$\",\n            \"request_format\": {\"/body\": \"json\"},\n            \"types\": [\"CreditCard\"],\n            \"transformations\": [{\n                \"path\": \"/body/card/number\",\n                \"value\": \"$number\"\n            }]\n        }\n    }'\n```\n\nExample:\n```json\n{\n    \"card\": {\n        \"number\": \"4012888888881881\"\n    }\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:44.085Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":5,"totalLines":91,"estimatedTokens":653}}77{"id":"doc-braintree_sdk_docs-31ed5da8","source":"documentation","title":"Braintree SDK Docs","url":"https://developer.paypal.com/braintree/articles/control-panel/transactions/create","text":"Braintree a PayPal ServiceSupport ArticlesCreate TransactionsSDK DocsAPI & In-Person DocsSupport ArticlesSearchGet HelpContact SalesCreate AccountLoginProduction Control PanelLoginBecome a MerchantContact SalesAboutGet StartedControl PanelGuidesRisk and Security\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:44.118Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":0,"totalLines":3,"estimatedTokens":69}}78{"id":"doc-braintree_sdk_docs-2b2f1fd9","source":"documentation","title":"Braintree SDK Docs","url":"https://developer.paypal.com/braintree/articles/guides/payment-methods/secure-remote-commerce","text":"Braintree a PayPal ServiceSupport ArticlesSecure Remote CommerceSDK DocsAPI & In-Person DocsSupport ArticlesSearchGet HelpContact SalesCreate AccountLoginProduction Control PanelLoginBecome a MerchantContact SalesAboutGet StartedControl PanelGuidesRisk and Security\n\nGuidesAccount UpdaterDisbursement Fee ReportOverviewReport StructureField ReferenceSettlement ModelsReconciliation WalkthroughTransaction TypesSpecial SituationsFraud ToolsOverviewBasic Fraud ToolsOverviewAVS and CVV RulesRisk Threshold RulesPremium Fraud Management ToolsOverviewFraud Protection LiteFraud Protection AdvancedChargeback Protection ToolsBest Practices3D SecurePayment MethodsACH Direct DebitApple PayGoogle PayPayPalOverviewBest PracticesSetup GuideProcessingDisputesFunding and ReconciliationPayPal Pay Later OffersLocal Payment MethodsSecure Remote CommerceSEPA Direct DebitVenmoRecurring BillingOverviewPlansSubscriptionsBilling CyclesAdd-ons and DiscountsTrial PeriodsEmail NotificationsAdvanced SettingsMastercard RequirementsUpdating Account InformationRefund AuthorizationsSingle Sign-On (SSO)MFAGuides/Payment Methods/Secure Remote CommerceAsk ChatGPTNote Effective January 20, 2026, Visa Click to Pay (Secure Remote Commerce) will no longer be supported. After this date, any transaction attempted with Visa Click to Pay will receive a \"Payment method not supported\" error and risk payment decline. Secure Remote CommerceAvailability Amex Express Checkout, Masterpass, and Visa Checkout have been replaced with the latest unified checkout experience offered through Visa known as Secure Remote Commerce (SRC). If you were previously using Amex Express Checkout or Masterpass, you will need to integrate with SRC following the instructions below. If you were using Visa Checkout, you do not have to change your integration as SRC is an updated version of Visa Checkout. As such, you may see Visa Checkout referenced elsewhere in our documentation. SRC is currently in a limited release. Learn more. Secure Remote Commerce, which your customers will experience as Click to Pay, is a digital wallet that allows customers to store all of their major debit and credit cards in one account. With this single sign-in experience through Visa, customers can easily make purchases on your website or mobile app using any of the cards saved in their wallet. Availability SRC is currently in limited release and is only available for merchants that are based in the following *Hong KongIrelandMalaysiaNew ZealandPolandSingaporeSpainUnited KingdomUnited StatesEligible merchants must be using our iOS v4 or JavaScript v3 SDKs.Contact us to request access to the limited release.Customer availabilityCustomers can store the following card types in their SRC ExpressDiscoverUnionPayProcessing Transactions using SRC process and settle just like credit card transactions. You can identify SRC transactions in the Control Panel by their unique payment type logo, which includes the credit card brand name at the bottom. Fees There are no additional fees for processing SRC transactions – pricing for these transactions are the same as your other credit card transactions. DisputesChargebacks, retrievals, and pre-arbs on SRC transactions behave the same way as your credit card disputes, and should be responded to according to your merchant account setup. If you’re unsure how to handle a dispute, Contact us for assistance. Fraud tools SRC transactions are compatible with our AVS and risk threshold Basic Fraud Tools, our Premium Fraud Management Tools, and 3D Secure. Recurring billing and vaulting SRC payment methods can be vaulted and used for recurring billing. Setup SRC is currently in a limited release. Contact us if you're interested in accepting SRC using PayPal Braintree. Full integration instructions are available in our developer docs. On this pageGet help from a humanSubmit a request for help with your PayPal Braintree sandbox or production account.Get HelpGet StartedOverviewPayment MethodsCurrenciesTransaction LifecycleGet PaidTry It OutData MigrationExploreControl PanelOverviewUsers and RolesImportant Gateway CredentialsSearchTransactionsVaultReportingWebhooksCustom FieldsToolsAccount UpdaterBraintree MarketplaceConfiguring SPF RecordsFraud ToolsPayment MethodsPayPal HereRecurring BillingUpdating Account InformationRisk and SecurityOverviewChargebacks and RetrievalsComplianceControl Panel SecurityRisk FactorsUnderwritingAllowlistingBraintreepayments.comStatusSDK DocsAPIIn-PersonPrivacy PolicyLegalBraintree is a service of PayPal. © 2026 PayPal\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:44.128Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":0,"totalLines":5,"estimatedTokens":1142}}79{"id":"doc-multi_container_applications_docker_docs-1c85555b","source":"documentation","title":"Multi-container applications | Docker Docs","url":"https://docs.docker.com/get-started/docker-concepts/running-containers/multi-container-applications/","text":"Get startedGuidesManualsReference GordonGordon, your AI assistant for Docker docs Search\n\nExample:\n```console\n$ git clone https://github.com/dockersamples/nginx-node-redis\n```\n\nExample:\n```console\n$ cd nginx-node-redis\n```\n\nExample:\n```console\n$ cd nginx-node-redis-main\n```\n\nExample:\n```console\n$ docker build -t nginx .\n```\n\nExample:\n```console\n$ docker build -t web .\n```\n\nExample:\n```console\n$ docker network create sample-app\n```\n\nExample:\n```console\n$ docker run -d  --name redis --network sample-app --network-alias redis redis\n```\n\nExample:\n```console\n$ docker run -d --name web1 -h web1 --network sample-app --network-alias web1 web\n```\n\nExample:\n```console\n$ docker run -d --name web2 -h web2 --network sample-app --network-alias web2 web\n```\n\nExample:\n```console\n$ docker run -d --name nginx --network sample-app  -p 80:80 nginx\n```\n\nExample:\n```console\n$ docker ps\n```\n\nExample:\n```text\nCONTAINER ID   IMAGE     COMMAND                  CREATED              STATUS              PORTS                NAMES\n2cf7c484c144   nginx     \"/docker-entrypoint.…\"   9 seconds ago        Up 8 seconds        0.0.0.0:80->80/tcp   nginx\n7a070c9ffeaa   web       \"docker-entrypoint.s…\"   19 seconds ago       Up 18 seconds                            web2\n6dc6d4e60aaf   web       \"docker-entrypoint.s…\"   34 seconds ago       Up 33 seconds                            web1\n008e0ecf4f36   redis     \"docker-entrypoint.s…\"   About a minute ago   Up About a minute   6379/tcp             redis\n```\n\nExample:\n```console\nweb2: Number of visits is: 9\nweb1: Number of visits is: 10\nweb2: Number of visits is: 11\nweb1: Number of visits is: 12\n```\n\nExample:\n```console\n$ docker compose up -d --build\n```\n\nExample:\n```console\n✔ Network nginx-node-redis_default   Created                                                                                                   0.0s\n ✔ Container nginx-node-redis-web2-1  Created                                                                                                   0.1s\n ✔ Container nginx-node-redis-web1-1  Created                                                                                                   0.1s\n ✔ Container nginx-node-redis-redis-1 Created                                                                                                   0.1s\n ✔ Container nginx-node-redis-nginx-1 Created\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:59.983Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":15,"totalLines":89,"estimatedTokens":593}}80{"id":"doc-finetuning_on_cohere_s_platform_cohere-785b157e","source":"documentation","title":"Finetuning on Cohere's Platform | Cohere","url":"https://docs.cohere.com/page/convfinqa-finetuning-wandb","text":"For AI documentation index is available at the root level at /llms.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.\n\nExample:\n```text\n1# ! pip install cohere\n```\n\nExample:\n```text\n1import os2import cohere3from cohere.finetuning import (4    Hyperparameters,5    Settings,6    WandbConfig,7    FinetunedModel,8    BaseModel,9)1011# fill in your Cohere API key here12os.environ[\"COHERE_API_KEY\"] = \"<COHERE_API_KEY>\"1314# instantiate the Cohere client15co = cohere.ClientV2(os.environ[\"COHERE_API_KEY\"])\n```\n\nExample:\n```text\n1{2    \"messages\": [3        {4            \"role\": \"System\",5            \"content\": \"stock-based awards under the plan stock options 2013 marathon grants stock options under the 2007 plan and previously granted options under the 2003 plan .\\nmarathon 2019s stock options represent the right to purchase shares of common stock at the fair market value of the common stock on the date of grant .\\nthrough 2004 , certain stock options were granted under the 2003 plan with a tandem stock appreciation right , which allows the recipient to instead elect to receive cash and/or common stock equal to the excess of the fair market value of shares of common stock , as determined in accordance with the 2003 plan , over the option price of the shares .\\nin general , stock options granted under the 2007 plan and the 2003 plan vest ratably over a three-year period and have a maximum term of ten years from the date they are granted .\\nstock appreciation rights 2013 prior to 2005 , marathon granted sars under the 2003 plan .\\nno stock appreciation rights have been granted under the 2007 plan .\\nsimilar to stock options , stock appreciation rights represent the right to receive a payment equal to the excess of the fair market value of shares of common stock on the date the right is exercised over the grant price .\\nunder the 2003 plan , certain sars were granted as stock-settled sars and others were granted in tandem with stock options .\\nin general , sars granted under the 2003 plan vest ratably over a three-year period and have a maximum term of ten years from the date they are granted .\\nstock-based performance awards 2013 prior to 2005 , marathon granted stock-based performance awards under the 2003 plan .\\nno stock-based performance awards have been granted under the 2007 plan .\\nbeginning in 2005 , marathon discontinued granting stock-based performance awards and instead now grants cash-settled performance units to officers .\\nall stock-based performance awards granted under the 2003 plan have either vested or been forfeited .\\nas a result , there are no outstanding stock-based performance awards .\\nrestricted stock 2013 marathon grants restricted stock and restricted stock units under the 2007 plan and previously granted such awards under the 2003 plan .\\nin 2005 , the compensation committee began granting time-based restricted stock to certain u.s.-based officers of marathon and its consolidated subsidiaries as part of their annual long-term incentive package .\\nthe restricted stock awards to officers vest three years from the date of grant , contingent on the recipient 2019s continued employment .\\nmarathon also grants restricted stock to certain non-officer employees and restricted stock units to certain international employees ( 201crestricted stock awards 201d ) , based on their performance within certain guidelines and for retention purposes .\\nthe restricted stock awards to non-officers generally vest in one-third increments over a three-year period , contingent on the recipient 2019s continued employment .\\nprior to vesting , all restricted stock recipients have the right to vote such stock and receive dividends thereon .\\nthe non-vested shares are not transferable and are held by marathon 2019s transfer agent .\\ncommon stock units 2013 marathon maintains an equity compensation program for its non-employee directors under the 2007 plan and previously maintained such a program under the 2003 plan .\\nall non-employee directors other than the chairman receive annual grants of common stock units , and they are required to hold those units until they leave the board of directors .\\nwhen dividends are paid on marathon common stock , directors receive dividend equivalents in the form of additional common stock units .\\nstock-based compensation expense 2013 total employee stock-based compensation expense was $ 80 million , $ 83 million and $ 111 million in 2007 , 2006 and 2005 .\\nthe total related income tax benefits were $ 29 million , $ 31 million and $ 39 million .\\nin 2007 and 2006 , cash received upon exercise of stock option awards was $ 27 million and $ 50 million .\\ntax benefits realized for deductions during 2007 and 2006 that were in excess of the stock-based compensation expense recorded for options exercised and other stock-based awards vested during the period totaled $ 30 million and $ 36 million .\\ncash settlements of stock option awards totaled $ 1 million and $ 3 million in 2007 and 2006 .\\nstock option awards granted 2013 during 2007 , 2006 and 2005 , marathon granted stock option awards to both officer and non-officer employees .\\nthe weighted average grant date fair value of these awards was based on the following black-scholes assumptions: .\\nThe weighted average exercise price per share of 2007, 2006, 2005 are $ 60.94, $ 37.84, $ 25.14. The expected annual dividends per share of 2007, 2006, 2005 are $ 0.96, $ 0.80, $ 0.66. The expected life in years of 2007, 2006, 2005 are 5.0, 5.1, 5.5. The expected volatility of 2007, 2006, 2005 are 27% ( 27 % ), 28% ( 28 % ), 28% ( 28 % ). The risk-free interest rate of 2007, 2006, 2005 are 4.1% ( 4.1 % ), 5.0% ( 5.0 % ), 3.8% ( 3.8 % ). The weighted average grant date fair value of stock option awards granted of 2007, 2006, 2005 are $ 17.24, $ 10.19, $ 6.15.\\n.\",6        },7        {8            \"role\": \"User\",9            \"content\": \"what was the weighted average exercise price per share in 2007?\",10        },11        {\"role\": \"Chatbot\", \"content\": \"60.94\"},12        {\"role\": \"User\", \"content\": \"and what was it in 2005?\"},13        {\"role\": \"Chatbot\", \"content\": \"25.14\"},14        {15            \"role\": \"User\",16            \"content\": \"what was, then, the change over the years?\",17        },18        {\"role\": \"Chatbot\", \"content\": \"subtract(60.94, 25.14)\"},19        {20            \"role\": \"User\",21            \"content\": \"what was the weighted average exercise price per share in 2005?\",22        },23        {\"role\": \"Chatbot\", \"content\": \"25.14\"},24        {25            \"role\": \"User\",26            \"content\": \"and how much does that change represent in relation to this 2005 weighted average exercise price?\",27        },28        {29            \"role\": \"Chatbot\",30            \"content\": \"subtract(60.94, 25.14), divide(#0, 25.14)\",31        },32    ]33}\n```\n\nExample:\n```text\n1chat_dataset = co.datasets.create(2    name=\"cfqa-ft-dataset\",3    data=open(\"data/convfinqa-train-chat.jsonl\", \"rb\"),4    eval_data=open(\"data/convfinqa-eval-chat.jsonl\", \"rb\"),5    type=\"chat-finetune-input\",6)7print(8    chat_dataset.id9)  # we will use this id to refer to the dataset when creating a finetuning job\n```\n\nExample:\n```text\n1co.wait(2    chat_dataset3)  # wait for the dataset to be processed and validated\n```\n\nExample:\n```text\n1hp_config = Hyperparameters(2    train_batch_size=16,3    train_epochs=1,4    learning_rate=0.0001,5)\n```\n\nExample:\n```text\n1wnb_config = WandbConfig(2    project=\"test-project\",3    api_key=\"<wandb_api_key>\",4    entity=\"test-entity\",  # must be a valid enitity associated with the provided API key5)\n```\n\nExample:\n```text\n1cfqa_finetune = co.finetuning.create_finetuned_model(2    request=FinetunedModel(3        name=\"cfqa-command-r-ft\",4        settings=Settings(5            base_model=BaseModel(6                base_type=\"BASE_TYPE_CHAT\",  # specifies this is a chat finetuning7            ),8            dataset_id=chat_dataset.id,  # the id of the dataset we created above9            hyperparameters=hp_config,10            wandb=wnb_config,11        ),12    ),13)14print(15    cfqa_finetune.finetuned_model.id16)  # we will use this id to refer to the finetuned model when making predictions/getting status/etc.\n```\n\nExample:\n```text\n1response = co.finetuning.get_finetuned_model(2    cfqa_finetune.finetuned_model.id3)4print(5    response.finetuned_model.status6)  # when the job finished this will be STATUS_READY\n```\n\nExample:\n```text\n1train_step_metrics = co.finetuning.list_training_step_metrics(2    finetuned_model_id=cfqa_finetune.finetuned_model.id3)45for metric in train_step_metrics.step_metrics:6    print(metric.metrics)\n```\n\nExample:\n```text\n1response = co.chat(2    model=cfqa_finetune.finetuned_model.id + \"-ft\",3    messages=[4        {5            \"role\": \"system\",6            \"content\": \"in the ordinary course of business , based on our evaluations of certain geologic trends and prospective economics , we have allowed certain lease acreage to expire and may allow additional acreage to expire in the future .\\nif production is not established or we take no other action to extend the terms of the leases , licenses or concessions , undeveloped acreage listed in the table below will expire over the next three years .\\nwe plan to continue the terms of certain of these licenses and concession areas or retain leases through operational or administrative actions ; however , the majority of the undeveloped acres associated with other africa as listed in the table below pertains to our licenses in ethiopia and kenya , for which we executed agreements in 2015 to sell .\\nthe kenya transaction closed in february 2016 and the ethiopia transaction is expected to close in the first quarter of 2016 .\\nsee item 8 .\\nfinancial statements and supplementary data - note 5 to the consolidated financial statements for additional information about this disposition .\\nnet undeveloped acres expiring year ended december 31 .\\nThe u.s . of net undeveloped acres expiring year ended december 31 , 2016, net undeveloped acres expiring year ended december 31 , 2017, net undeveloped acres expiring year ended december 31 , 2018 are 68, 89, 128. The e.g . of net undeveloped acres expiring year ended december 31 , 2016, net undeveloped acres expiring year ended december 31 , 2017, net undeveloped acres expiring year ended december 31 , 2018 are 2014, 92, 36. The other africa of net undeveloped acres expiring year ended december 31 , 2016, net undeveloped acres expiring year ended december 31 , 2017, net undeveloped acres expiring year ended december 31 , 2018 are 189, 4352, 854. The total africa of net undeveloped acres expiring year ended december 31 , 2016, net undeveloped acres expiring year ended december 31 , 2017, net undeveloped acres expiring year ended december 31 , 2018 are 189, 4444, 890. The other international of net undeveloped acres expiring year ended december 31 , 2016, net undeveloped acres expiring year ended december 31 , 2017, net undeveloped acres expiring year ended december 31 , 2018 are 2014, 2014, 2014. The total of net undeveloped acres expiring year ended december 31 , 2016, net undeveloped acres expiring year ended december 31 , 2017, net undeveloped acres expiring year ended december 31 , 2018 are 257, 4533, 1018.\\n.\",7        },8        {9            \"role\": \"user\",10            \"content\": \"what percentage of undeveloped acres were in the us in 2018?\",11        },12        {13            \"role\": \"assistant\",14            \"content\": \"divide(128, 1018)\",15        },16        {17            \"role\": \"user\",18            \"content\": \"what was the total african and us net undeveloped acres expiring in 2016?\",19        },20    ],21)22print(\"#### Model response ####\")23print(response.text)24print(\"########################\")\n```\n\nExample:\n```text\n#### Model response ####add(189, 68)########################\n```\n\nExample:\n```text\n1response = co.chat(2    model=\"command-r-08-24\",3    messages=[4        {5            \"role\": \"system\",6            \"content\": \"in the ordinary course of business , based on our evaluations of certain geologic trends and prospective economics , we have allowed certain lease acreage to expire and may allow additional acreage to expire in the future .\\nif production is not established or we take no other action to extend the terms of the leases , licenses or concessions , undeveloped acreage listed in the table below will expire over the next three years .\\nwe plan to continue the terms of certain of these licenses and concession areas or retain leases through operational or administrative actions ; however , the majority of the undeveloped acres associated with other africa as listed in the table below pertains to our licenses in ethiopia and kenya , for which we executed agreements in 2015 to sell .\\nthe kenya transaction closed in february 2016 and the ethiopia transaction is expected to close in the first quarter of 2016 .\\nsee item 8 .\\nfinancial statements and supplementary data - note 5 to the consolidated financial statements for additional information about this disposition .\\nnet undeveloped acres expiring year ended december 31 .\\nThe u.s . of net undeveloped acres expiring year ended december 31 , 2016, net undeveloped acres expiring year ended december 31 , 2017, net undeveloped acres expiring year ended december 31 , 2018 are 68, 89, 128. The e.g . of net undeveloped acres expiring year ended december 31 , 2016, net undeveloped acres expiring year ended december 31 , 2017, net undeveloped acres expiring year ended december 31 , 2018 are 2014, 92, 36. The other africa of net undeveloped acres expiring year ended december 31 , 2016, net undeveloped acres expiring year ended december 31 , 2017, net undeveloped acres expiring year ended december 31 , 2018 are 189, 4352, 854. The total africa of net undeveloped acres expiring year ended december 31 , 2016, net undeveloped acres expiring year ended december 31 , 2017, net undeveloped acres expiring year ended december 31 , 2018 are 189, 4444, 890. The other international of net undeveloped acres expiring year ended december 31 , 2016, net undeveloped acres expiring year ended december 31 , 2017, net undeveloped acres expiring year ended december 31 , 2018 are 2014, 2014, 2014. The total of net undeveloped acres expiring year ended december 31 , 2016, net undeveloped acres expiring year ended december 31 , 2017, net undeveloped acres expiring year ended december 31 , 2018 are 257, 4533, 1018.\\n.\",7        },8        {9            \"role\": \"user\",10            \"content\": \"what percentage of undeveloped acres were in the us in 2018?\",11        },12        {13            \"role\": \"assistant\",14            \"content\": \"divide(128, 1018)\",15        },16        {17            \"role\": \"user\",18            \"content\": \"what was the total african and us net undeveloped acres expiring in 2016?\",19        },20    ],21)2223print(\"#### Model response ####\")24print(base_response.text)25print(\"########################\")\n```\n\nExample:\n```text\n#### Model response ####The total African undeveloped acres expiring in 2016 is 189 acres, while the US undeveloped acres expiring in the same year is 68 acres. Adding these together gives a total of 257 acres.########################\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:59.386Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":14,"totalLines":73,"estimatedTokens":3839}}81{"id":"doc-integrate_vpon_with_mediation_ios_google_for_dev-dd710f74","source":"documentation","title":"Integrate Vpon with mediation | iOS | Google for Developers","url":"https://developers.google.com/admob/ios/mediation/vpon","text":"Example:\n```text\nfunc adViewDidReceiveAd(_ bannerView: GADBannerView) {\n  print(\"Banner adapter class name: \\(bannerView.adNetworkClassName)\")\n}\n```\n\nExample:\n```text\n- (void)adViewDidReceiveAd:(GADBannerView *)bannerView {\n  NSLog(@\"Banner adapter class name: %@\", bannerView.adNetworkClassName);\n}\n```\n\nExample:\n```text\nfunc interstitialDidReceiveAd(_ ad: GADInterstitialAd) {\n  print(\"Interstitial adapter class name: \\(ad.adNetworkClassName)\")\n}\n```\n\nExample:\n```text\n- (void)interstitialDidReceiveAd:(GADInterstitialAd *)interstitial {\n  NSLog(@\"Interstitial adapter class name: %@\", interstitial.adNetworkClassName);\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:50.712Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":4,"totalLines":29,"estimatedTokens":161}}82{"id":"doc-integrate_i_mobile_with_mediation_android_google-d0da951b","source":"documentation","title":"Integrate i-mobile with mediation | Android | Google for Developers","url":"https://developers.google.com/admob/android/next-gen/mediation/imobile","text":"Example:\n```text\ndependencyResolutionManagement {\n  repositories {\n    google()\n    mavenCentral()\n    maven {\n      url = uri(\"https://imobile.github.io/adnw-sdk-android\")\n    }\n  }\n}\n```\n\nExample:\n```devsite-click-to-copy\ndependencies {\n    implementation(\"com.google.android.libraries.ads.mobile.sdk:ads-mobile-sdk:1.3.1\")\n    implementation(\"com.google.ads.mediation:imobile:2.3.2.4\")\n}\n\nconfigurations.configureEach {\n    exclude(group = \"com.google.android.gms\", module = \"play-services-ads\")\n    exclude(group = \"com.google.android.gms\", module = \"play-services-ads-lite\")\n}\n```\n\nExample:\n```devsite-click-to-copy\ndependencies {\n    implementation 'com.google.android.libraries.ads.mobile.sdk:ads-mobile-sdk:1.3.1'\n    implementation 'com.google.ads.mediation:imobile:2.3.2.4'\n}\n\nconfigurations.configureEach {\n    exclude group: 'com.google.android.gms', module: 'play-services-ads'\n    exclude group: 'com.google.android.gms', module: 'play-services-ads-lite'\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:50.789Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":3,"totalLines":40,"estimatedTokens":247}}83{"id":"doc-out_of_band_oob_flow_migration_guide_authorizati-406eac1e","source":"documentation","title":"Out-Of-Band (OOB) flow Migration Guide | Authorization Resources | Google for Developers","url":"https://developers.google.com/identity/protocols/oauth2/resources/oob-migration","text":"Example:\n```text\nhttps://accounts.google.com/o/oauth2/v2/auth?\nresponse_type=code&\nscope=<SCOPES>&\nstate=<STATE>&\nredirect_uri=urn:ietf:wg:oauth:2.0:oob&\nclient_id=<CLIENT_ID>\n```\n\nExample:\n```text\nList requestedScopes = Arrays.asList(DriveScopes.DRIVE_APPDATA);\n    AuthorizationRequest authorizationRequest = AuthorizationRequest.builder().setRequestedScopes(requestedScopes).build();\n    Identity.getAuthorizationClient(activity)\n            .authorize(authorizationRequest)\n            .addOnSuccessListener(\n                authorizationResult -> {\n                  if (authorizationResult.hasResolution()) {\n                    // Access needs to be granted by the user\n                    PendingIntent pendingIntent = authorizationResult.getPendingIntent();\n                    try {\n    startIntentSenderForResult(pendingIntent.getIntentSender(),\n    REQUEST_AUTHORIZE, null, 0, 0, 0, null);\n                    } catch (IntentSender.SendIntentException e) {\n                    Log.e(TAG, \"Couldn't start Authorization UI: \" + e.getLocalizedMessage());\n                    }\n                  } else {\n                    // Access already granted, continue with user action\n                    saveToDriveAppFolder(authorizationResult);\n                  }\n                })\n            .addOnFailureListener(e -> Log.e(TAG, \"Failed to authorize\", e));\n```\n\nExample:\n```devsite-click-to-copy\nList requestedScopes = Arrays.asList(DriveScopes.DRIVE_APPDATA);\n    AuthorizationRequest authorizationRequest = AuthorizationRequest.builder()\n    .requestOfflineAccess(webClientId)\n            .setRequestedScopes(requestedScopes)\n            .build();\n    Identity.getAuthorizationClient(activity)\n            .authorize(authorizationRequest)\n            .addOnSuccessListener(\n                authorizationResult -> {\n                  if (authorizationResult.hasResolution()) {\n                    // Access needs to be granted by the user\n                    PendingIntent pendingIntent = authorizationResult.getPendingIntent();\n                    try {\n    startIntentSenderForResult(pendingIntent.getIntentSender(),\n    REQUEST_AUTHORIZE, null, 0, 0, 0, null);\n                    } catch (IntentSender.SendIntentException e) {\n                    Log.e(TAG, \"Couldn't start Authorization UI: \" + e.getLocalizedMessage());\n                    }\n                  } else {\n                    String authCode = authorizationResult.getServerAuthCode();\n                  }\n                })\n            .addOnFailureListener(e -> Log.e(TAG, \"Failed to authorize\", e));\n```\n\nExample:\n```devsite-click-to-copy\nuser.authentication.do { authentication, error in\n  guard error == nil else { return }\n  guard let authentication = authentication else { return }\n  \n  // Get the access token to attach it to a REST or gRPC request.\n  let accessToken = authentication.accessToken\n  \n  // Or, get an object that conforms to GTMFetcherAuthorizationProtocol for\n  // use with GTMAppAuth and the Google APIs client library.\n  let authorizer = authentication.fetcherAuthorizer()\n}\n```\n\nExample:\n```devsite-click-to-copy\nGIDSignIn.sharedInstance.signIn(with: signInConfig, presenting: self) { user, error in\n  guard error == nil else { return }\n  guard let user = user else { return }\n  \n  // request a one-time authorization code that your server exchanges for\n  // an access token and refresh token\n  let authCode = user.serverAuthCode\n}\n```\n\nExample:\n```devsite-click-to-copy\nwindow.onload = function() {\n  document.querySelector('button').addEventListener('click', function() {\n\n  \n  // retrieve access token\n  chrome.identity.getAuthToken({interactive: true}, function(token) {\n  \n  // ..........\n\n\n  // the example below shows how to use a retrieved access token with an appropriate scope\n  // to call the Google People API contactGroups.get endpoint\n\n  fetch(\n    'https://people.googleapis.com/v1/contactGroups/all?maxMembers=20&key=API_KEY',\n    init)\n    .then((response) => response.json())\n    .then(function(data) {\n      console.log(data)\n    });\n   });\n });\n};\n```\n\nExample:\n```devsite-click-to-copy\nasync function main() {\n  const server = http.createServer(async function (req, res) {\n\n  if (req.url.startsWith('/oauth2callback')) {\n    let q = url.parse(req.url, true).query;\n\n    if (q.error) {\n      console.log('Error:' + q.error);\n    } else {\n      \n      // Get access and refresh tokens (if access_type is offline)\n      let { tokens } = await oauth2Client.getToken(q.code);\n      oauth2Client.setCredentials(tokens);\n\n      // Example of using Google Drive API to list filenames in user's Drive.\n      const drive = google.drive('v3');\n      drive.files.list({\n        auth: oauth2Client,\n        pageSize: 10,\n        fields: 'nextPageToken, files(id, name)',\n      }, (err1, res1) => {\n        // TODO(developer): Handle response / error.\n      });\n    }\n  }\n}\n```\n\nExample:\n```devsite-click-to-copy\n// initTokenClient() initializes a new token client with your\n// web app's client ID and the scope you need access to\n\nconst client = google.accounts.oauth2.initTokenClient({\n  client_id: 'YOUR_GOOGLE_CLIENT_ID',\n  scope: 'https://www.googleapis.com/auth/calendar.readonly',\n  \n  // callback function to handle the token response\n  callback: (tokenResponse) => {\n    if (tokenResponse && tokenResponse.access_token) { \n      gapi.client.setApiKey('YOUR_API_KEY');\n      gapi.client.load('calendar', 'v3', listUpcomingEvents);\n    }\n  },\n});\n\nfunction listUpcomingEvents() {\n  gapi.client.calendar.events.list(...);\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:50.829Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":8,"totalLines":170,"estimatedTokens":1390}}84{"id":"doc-set_up_admob_mediation_android_google_for_develo-8eb78a4e","source":"documentation","title":"Set up AdMob Mediation | Android | Google for Developers","url":"https://developers.google.com/admob/android/mediation","text":"Example:\n```text\npublic void initialize(Context context) {\n  new Thread(\n          () ->\n              // Initialize the Google Mobile Ads SDK on a background thread.\n              MobileAds.initialize(context, this::logAdapterStatus))\n      .start();\n}\n\nprivate void logAdapterStatus(InitializationStatus initializationStatus) {\n  // Check each adapter's initialization status.\n  Map<String, AdapterStatus> statusMap = initializationStatus.getAdapterStatusMap();\n  for (Map.Entry<String, AdapterStatus> entry : statusMap.entrySet()) {\n    String adapterClass = entry.getKey();\n    AdapterStatus status = entry.getValue();\n    Log.d(\n        TAG,\n        String.format(\n            \"Adapter name: %s, Description: %s, Latency: %d\",\n            adapterClass, status.getDescription(), status.getLatency()));\n  }\n}MediationSnippets.java\n```\n\nExample:\n```text\nfun initialize(context: Context) {\n  CoroutineScope(Dispatchers.IO).launch {\n    // Initialize the Google Mobile Ads SDK on a background thread.\n    MobileAds.initialize(context, ::logAdapterStatus)\n  }\n}\n\nprivate fun logAdapterStatus(initializationStatus: InitializationStatus) {\n  // Check each adapter's initialization status.\n  for ((adapterClass, status) in initializationStatus.adapterStatusMap) {\n    Log.d(\n      TAG,\n      \"Adapter: $adapterClass, Status: ${status.description}, Latency: ${status.latency}ms\",\n    )\n  }\n}\nMediationSnippets.kt\n```\n\nExample:\n```text\nResponseInfo responseInfo = ad.getResponseInfo();\nString adapterClassName = null;\nif (responseInfo != null) {\n  adapterClassName = responseInfo.getMediationAdapterClassName();\n}\nLog.d(TAG, \"Adapter class name: \" + adapterClassName);ResponseInfoSnippets.java\n```\n\nExample:\n```text\nLog.d(TAG, \"Adapter class name:\" + ad.responseInfo?.mediationAdapterClassName)ResponseInfoSnippets.kt\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:50.864Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":4,"totalLines":62,"estimatedTokens":458}}85{"id":"doc-integrate_tapjoy_with_mediation_deprecated_andro-b9ea6453","source":"documentation","title":"Integrate Tapjoy with mediation (Deprecated) | Android | Google for Developers","url":"https://developers.google.com/admob/android/mediation/tapjoy","text":"Example:\n```text\nrepositories {\n    google()\n    maven {\n       url 'https://sdk.tapjoy.com/'\n    }\n}\n\n// ...\ndependencies {\n    implementation 'com.google.android.gms:play-services-ads:25.4.0'\n    implementation 'com.google.ads.mediation:tapjoy:13.2.1.0'\n}\n// ...\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:50.870Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":1,"totalLines":18,"estimatedTokens":71}}86{"id":"doc-updating_credentials_from_the_macos_keychain_git-f7948411","source":"documentation","title":"Updating credentials from the macOS Keychain - GitHub Docs","url":"https://docs.github.com/en/get-started/git-basics/updating-credentials-from-the-macos-keychain","text":"Example:\n```shell\n$ git credential-osxkeychain erase\nhost=github.com\nprotocol=https\n> [Press Return]\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:00.325Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":1,"totalLines":9,"estimatedTokens":30}}87{"id":"doc-troubleshooting_the_2_gib_push_limit_github_docs-3079a7be","source":"documentation","title":"Troubleshooting the 2 GiB push limit - GitHub Docs","url":"https://docs.github.com/en/get-started/using-git/troubleshooting-the-2-gb-push-limit","text":"Example:\n```shell\ngit log --oneline --reverse refs/heads/BRANCH-NAME | awk 'NR % 1000 == 0'\n```\n\nExample:\n```shell\ngit push REMOTE-NAME +<YOUR_COMMIT_SHA_NUMBER>:refs/heads/BRANCH-NAME\n```\n\nExample:\n```shell\ngit push REMOTE-NAME --mirror\n```\n\nExample:\n```shell\nstep_commits=$(git log --oneline --reverse refs/heads/BRANCH-NAME | awk 'NR % 1000 == 0')\necho \"$step_commits\" | while read commit message; do git push REMOTE-NAME +$commit:refs/heads/BRANCH-NAME; done\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:00.332Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":4,"totalLines":22,"estimatedTokens":120}}88{"id":"doc-forward-77dd6507","source":"documentation","title":"Forward","url":"https://developer.paypal.com/braintree/docs/reference/forward-api/forward/","text":"Braintree a PayPal ServiceSDK DocsForwardSDK DocsAPI & In-Person DocsSupport ArticlesSearchGet HelpContact SalesCreate AccountLoginProduction Control PanelLoginBecome a MerchantContact SalesAboutGet StartedGuidesReference\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:44.176Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":0,"totalLines":3,"estimatedTokens":59}}89{"id":"doc-payment_methods-41bab6d9","source":"documentation","title":"Payment Methods","url":"https://developer.paypal.com/braintree/docs/guides/payment-methods/dotnet/","text":"Braintree a PayPal ServiceSDK Docs SDK DocsAPI & In-Person DocsSupport ArticlesSearchGet HelpContact SalesCreate AccountLoginProduction Control PanelLoginBecome a MerchantContact SalesAboutGet StartedGuidesReference\n\nBasicsClient AuthorizationOverviewTokenization KeyClient TokenPayment Method NoncesTransactionsCustomersPayment MethodsCheckout UIsDrop-in UIOverviewSetup and IntegrationCustomizationHosted FieldsOverviewSetup and IntegrationStylingEventsTroubleshooting and FAQExamplesFastlaneOverviewSetup and IntegrationClient-sideServer-sideTest your IntegrationAppendixAdvanced OptionsStylingBest Practice GuideTroubleshooting And FAQReference TypesFlexible Payment IntegrationPayment Method TypesOverviewACH Direct DebitOverviewConfigurationClient-sideServer-sideTesting and Go LiveInstant VerificationOverviewInstant Verification Client-sideInstant Verification Server-sideTesting Instant VerificationApple PayOverviewConfigurationClient-sideServer-sideTesting and Go LiveCredit CardsOverviewConfigurationClient-sideServer-sideTesting and Go LiveLocal Payment MethodsOverviewConfigurationClient-sideServer-sideTesting and Go LiveBoleto Bancário (Non-Instant)Multibanco (Non-Instant)OXXO (Non-Instant)Trustly (Non-Instant)SwishGoogle PayOverviewConfigurationClient-sideServer-sideTesting and Go LivePayPalOverviewClient-sidePayment FlowOne-time PaymentsRecurring PaymentsVaulted PaymentsCheckout with VaultPay Later OffersMobile CheckoutFeaturesApp SwitchShipping ModuleServer-sideTesting and Go LiveSamsung PayOverviewSEPA Direct DebitOverviewConfigurationClient-sideServer-sideVaultingTesting and Go LiveVenmoOverviewConfigurationClient-sideServer-sideTesting and Go LivePayment OrchestrationOverviewAdyendLocalEBANXFat ZebraFlexFactorFlutterwaveStripeTools3D SecureOverviewOnboardingStep by Step IntegrationApplying 3DS to Transactions and VerificationsMerchant Initiated Authentication (3RI)Rules ManagerAdvanced OptionsAuthentication InsightTestingPremium Fraud Management ToolsOverviewConfigurationClient-sideServer-sideWebhooksTesting and Go LiveData LensOverviewGetting StartedData Schema ReferenceSample QueriesIntegration PatternsBest Practices and SecurityTroubleshootingSupport and ResourcesFX OptimizerOverviewServer-sideTesting and Go LiveClient SDKSetupMigrationDeprecation PolicyDisputesOverviewManagingEvidence RequirementsAutomatingTesting and Go LiveNetwork TokensOverviewValue to MerchantsHow it WorksGetting StartedBring Your Own TokenPayment Request APIOverviewSetup and IntegrationReportsOverviewSettlement Batch SummariesCustom ReportsWebhooksWebhooksOverviewCreateParseTesting and Go LiveBraintree ExtendOAuthOverviewConfigurationConnect URLsClient-side Connect FlowAccess TokensShared VaultReferenceForward APIConfigurationTransformationsTokenization SupportHyperwallet IntegrationWorldpayExamplesCryptographyPGP Public KeyAdditional FeaturesOptimized Debit RoutingOverviewTransaction WorkflowEligibilityIntegrationManaging AuthorizationNetwork Response CodesTest and Go LiveCode SamplesSDKGraphQLBraintree Auth (Beta)OverviewConfigurationMerchant Connect FlowServer-side Connect FlowClient-side Connect FlowOAuth FlowWebhooksMerchant APIMulti-currencyTesting and Go LiveBrandingReferencePackage TrackingOverviewClient-sideServer-sideRecurring BillingOverviewPlansCreating SubscriptionsManaging SubscriptionsTesting and Go LiveBasics/Payment MethodsAsk ChatGPTPayment Methods.NETSDKCurrent Braintree LanguagesJava.NETNode.jsPHPPythonRuby A payment method represents transactable payment information such as credit card details or a customer's authorization to charge a PayPal or Venmo account. Payment methods belong to a customer, are securely stored in the Braintree Vault, and have a PaymentMethodToken attribute that you can store on your servers with reduced PCI compliance burden and later use to create transactions. Create Use Payment to create a payment method for an existing customer using a payment method single-object token received from the #Copyvar request = new PaymentMethodRequest { CustomerId = \"131866\", PaymentMethodNonce = NonceFromTheClient }; Result<PaymentMethod> result = gateway.PaymentMethod.Create(request); Alternatively, you can create a new customer with a payment method using with the PaymentMethodNonce parameter. After the payment method is successfully created, you can use with the PaymentMethodToken parameter to create a transaction. Note Braintree strongly recommends verifying all cards before they are stored in your Vault by enabling card verification for your entire account in the Control Panel. Update Use Payment to update an existing payment method. Make default Use the MakeDefault option to set a payment method as the default for its #Copyvar updateRequest = new PaymentMethodRequest { Options = new PaymentMethodOptionsRequest { MakeDefault = true } }; Result<PaymentMethod> result = gateway.PaymentMethod.Update(\"the_token\", updateRequest);Billing addressUpdate the billing #Copyvar updateRequest = new PaymentMethodRequest { BillingAddress = new PaymentMethodAddressRequest { StreetAddress = \"100 Maple Lane\", Options = new PaymentMethodAddressOptionsRequest { UpdateExisting = true } } }; Result<paymentmethod> result = gateway.PaymentMethod.Update(\"the_token\", updateRequest); You can also omit the UpdateExisting option to create a new billing address for the payment method. See the reference and more examples of updating a payment method . If you want to update both payment method and customer information together, use Find Use Payment to find a payment #CopyPaymentMethod paymentMethod = gateway.PaymentMethod.Find(\"token\"); The return value of the Payment call will be a PaymentMethod response object. Delete Use Payment to delete a payment #Copyvar result = gateway.PaymentMethod.Delete(\"the_token\"); result.IsSuccess(); // trueSee alsoCard verificationOn this pageGet help from a humanSubmit a request for help with your PayPal Braintree sandbox or production account.Get HelpGet StartedIntegration GuideTutorial (Preview)Checkout UIsExample IntegrationsBasicsClient AuthorizationSingle-use TokenCustomersPayment MethodsTransactionsPayment Method TypesOverviewACH Direct DebitApple PayCredit CardsGoogle PayPayPalVenmoSecure Remote CommerceTools3D SecurePremium Fraud Management ToolsClient SDKDisputesPayment Request APIReportsWebhooksCheckout UIDrop-in UIHosted FieldsAdditional FeaturesBraintree Auth (Beta)Braintree MarketplaceGrant API (Beta)OAuth (Beta)PayPal HereRecurring BillingAPI ReferenceClient ReferencesServer-side API RequestsServer-side Response ObjectsGeneralBraintreepayments.comStatusAPIIn-PersonSupport ArticlesPrivacy PolicyLegalBraintree is a service of PayPal. © 2026 PayPal\n\nExample:\n```cs\nvar request = new PaymentMethodRequest\n{\n    CustomerId = \"131866\",\n    PaymentMethodNonce = NonceFromTheClient\n};\n\nResult<PaymentMethod> result = gateway.PaymentMethod.Create(request);\n```\n\nExample:\n```cs\nvar updateRequest = new PaymentMethodRequest\n{\n    Options = new PaymentMethodOptionsRequest\n    {\n        MakeDefault = true\n    }\n};\n\nResult<PaymentMethod> result = gateway.PaymentMethod.Update(\"the_token\", updateRequest);\n```\n\nExample:\n```cs\nvar updateRequest = new PaymentMethodRequest {\n    BillingAddress = new PaymentMethodAddressRequest {\n        StreetAddress = \"100 Maple Lane\",\n        Options = new PaymentMethodAddressOptionsRequest {\n            UpdateExisting = true\n        }\n    }\n};\n\nResult<paymentmethod> result = gateway.PaymentMethod.Update(\"the_token\", updateRequest);\n```\n\nExample:\n```cs\nPaymentMethod paymentMethod = gateway.PaymentMethod.Find(\"token\");\n```\n\nExample:\n```cs\nvar result = gateway.PaymentMethod.Delete(\"the_token\");\nresult.IsSuccess(); // true\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:44.211Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":5,"totalLines":54,"estimatedTokens":1930}}90{"id":"doc-get_started_organizing_work_with_projects_gitlab-6cfbbdce","source":"documentation","title":"Get started organizing work with projects | GitLab Docs","url":"https://docs.gitlab.com/user/get_started/get_started_projects/","text":"Getting startedTutorialsManage your organizationOrganize work with projectsGetting startedCreate a projectManage projectsProject visibilityProject settingsDescription templatesDeploy keysDeploy tokensReserved project and group namesSearchBadgesProject topicsCode intelligenceSystem notesUse a project as a Go a protected workflow for your projectTroubleshootingPlan and track workManage authentication and authorizationUse GitManage your codeUse CI/CD to build your applicationSecure your applicationDeploy and release your applicationManage your infrastructureMonitor your applicationAnalyze GitLab usageRelease notesFeature supportFind your GitLab versionGitLab Docs /Use GitLab /Organize work with proje… /Getting startedHelp us learn about your current experience with the documentation. Take the survey.Get started organizing work with projectsProjects in GitLab organize all the data for a specific development project. A project is where you work with your team, store your files, and manage your tasks.Use projects and save codeTrack issues and tasksCollaborate on code changesTest and deploy your appProject creation and maintenance is part of a larger a projectStart by creating a new project in GitLab to contain your codebase, documentation, and related resources.A project contains a repository. A repository contains all the files, directories, and data related to your work.When you create the project, review and configure the following settings to align with your development workflow and collaboration levelMerge request approvalsIssue trackingCI/CD pipelinesDescription templates for entities like issues or merge requestsFor more information, a projectManage projectsProject visibilityProject settingsDescription templatesStep and control access to projectsUse the following tools to manage secure access to your access specific access rights to automated tools or external systems for secure integration.Deploy read-only access to your repositories to securely deploy your project to external systems.Deploy temporary, limited access to your project’s repository and registry for secure deployments and automation.For more information, access tokensDeploy keysDeploy tokensStep and share projectsYou can invite multiple projects to a group, sometimes called sharing a project with a group. Each project has its own repository, issues, merge requests, and other features.With multiple projects in a group, team members can collaborate on individual projects while having a high-level view of all the work done in the group.To further refine access to your projects, you can add subgroups to your group.For more information, projectsSubgroupsStep project discoverability and recognitionUse the search box to quickly find specific projects, issues, merge requests, or code snippets across your GitLab instance.To make projects easier to a consistent and recognizable naming scheme for your projects with reserved project and group names.Add badges to your project’s README file. Badges can display important information, like build status, project health, test coverage, or version number.Assign project topics. Topics are labels that help you organize and find projects.For more information, project and group namesSearchBadgesProject topicsStep development efficiency and maintain code qualityUse code intelligence features to enhance your productivity and maintain a high-quality codebase, such navigationHover informationAuto-completionCode intelligence is a range of tools that help you efficiently explore, analyze, and maintain your codebase.To quickly locate and go to specific files in your project, use the file finder.For more information, intelligenceFilesStep projects into GitLabUse file exports to migrate projects to GitLab from other systems or GitLab instances.When you migrate a frequently accessed repository to GitLab, you can use a project alias to continue to access it by its original name.On GitLab.com, you can transfer a project from one namespace to another. A transfer essentially moves a project to another group so its members have access or ownership.For more information, and migrate to GitLabProject aliasesTransfer a project to another namespaceStep a projectStep and control access to projectsStep and share projectsStep project discoverability and recognitionStep development efficiency and maintain code qualityStep projects into GitLab\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:04.230Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":0,"totalLines":3,"estimatedTokens":1102}}91{"id":"doc-get_started_with_monitoring_your_application_in_-91096d90","source":"documentation","title":"Get started with monitoring your application in GitLab | GitLab Docs","url":"https://docs.gitlab.com/user/get_started/get_started_monitoring/","text":"Getting startedTutorialsManage your organizationOrganize work with projectsPlan and track workManage authentication and authorizationUse GitManage your codeUse CI/CD to build your applicationSecure your applicationDeploy and release your applicationManage your infrastructureMonitor your applicationGetting startedError trackingIncident managementObservabilityAnalyze GitLab usageRelease notesFeature supportFind your GitLab versionGitLab Docs /Use GitLab /Monitor your application /Getting startedHelp us learn about your current experience with the documentation. Take the survey.Get started with monitoring your application in GitLabMonitoring is a crucial part of maintaining and optimizing your applications. GitLab observability features help you track errors, analyze application performance, and respond to incidents.These capabilities are part of the larger DevOps of these features can be used independently. For example, you can use tracing or incidents without using error tracking. However, for the best experience, use all of these features together.Step which project to useYou can use the same project for monitoring that you already use to store your application’s source code.For large applications with multiple services and repositories, you should create a dedicated project to centralize all telemetry data collected from the different components of the system. This approach offers several is accessible to all development and operations teams, which facilitates collaboration.Data from different sources can be queried and correlated in one place, which accelerates investigations.It provides a single source of truth for all observability data, making it easier to maintain and update.It simplifies access management for administrators by centralizing user permissions in a single project.To enable observability features, you need administrator or the Owner role for the project.For more information, a projectStep application errors with error trackingError tracking helps you identify, prioritize, and debug errors in your application. Errors generated by your application are collected by the Sentry SDK, then stored on either GitLab or Sentry back ends.For more information, error tracking worksStep alerts and incidentsSet up incident management features to troubleshoot issues and resolve incidents collaboratively.For more information, ManagementStep and improveUse the data and insights gathered to continuously improve your application and the monitoring insight dashboards to analyze issues or incidents created and closed, and assess the performance of your incident response.Create executable runbooks to help engineers on-call remediate incidents autonomously.Regularly review your monitoring setup and adjust sampling thresholds, or add new metrics as your application evolves.Conduct post-incident reviews to identify areas for improvement in both your application and your incident response process.Use the insights gained from monitoring to inform your development priorities and technical debt reduction efforts.For more information, dashboardsExecutable runbooksStep which project to useStep application errors with error trackingStep alerts and incidentsStep and improve\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:04.239Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":0,"totalLines":3,"estimatedTokens":808}}92{"id":"doc-managing_costs_openai_api-c783b1c7","source":"documentation","title":"Managing costs | OpenAI API","url":"https://developers.openai.com/api/docs/guides/realtime-costs","text":"For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.\n\nChatGPT Home API Codex Docs Guides, concepts, and product docs for Codex Use cases Example workflows and tasks teams can take on with ChatGPT or Codex Docs Use cases Resources ChatGPT Plugins Extend ChatGPT and Codex Workspace Agents Trigger published ChatGPT workspace agents Commerce Build commerce flows in ChatGPT Ads Publish and measure ads in ChatGPT Resources Showcase Demo apps to get inspired Blog Learnings and experiences from developers Cookbook Notebook examples for building with OpenAI models Learn Docs, videos, and demo apps for building with OpenAI Community Programs, meetups, and support for builders Start searching API Dashboard Try ChatGPT\n\nOverview Models Agents Tools Voice & Audio Production API reference\n\nSearch the API docs Search docsSuggestedresponses createreasoning_effortrealtimeprompt caching\n\nPrimary navigation API Codex ChatGPT Docs Use cases Resources Resources Search docsSuggestedresponses createreasoning_effortrealtimeprompt caching Overview Models Agents Tools Voice & Audio Production API reference OverviewModelsAgentsToolsVoice & AudioProductionAPI referenceDocs sectionVoice & Audio Home Get started Quickstart Using GPT-5.6 Key concepts Core concepts Responses API Conversation state Background mode Streaming WebSocket mode Multi-agent Webhooks File inputs Compaction Counting tokens SDKs and CLI OpenAI SDK OpenAI CLI Resources Changelog Deprecations Supported countries OpenAI Crawlers Terms and policies Legacy APIs Agent Builder Overview Migration guide Node reference Safety in building agents Evals Getting started Working with evals Prompt optimizer External models Best practices Graders Fine-tuning Optimization cycle Supervised fine-tuning Vision fine-tuning Direct preference optimization Reinforcement fine-tuning RFT use cases Best practices Assistants API Migration guide Deep dive Tools Model catalog Choose a model Pricing Model selection Text and code Text generation Code generation Structured output Prompting Overview Prompt engineering Citation formatting Migration guide Prompt generation Frontend prompting Reasoning Reasoning models Reasoning best practices Images and video Images and vision Image generation Video generation Realtime and audio Audio and speech Overview Voice agents Specialized models Deep research Embeddings Moderation Overview Agents SDK Quickstart Agent definitions Models and providers Running agents Sandbox agents Orchestration Guardrails Results and state Integrations and observability Evaluate agent workflows ChatKit Overview Customize Widgets Actions Advanced integrations Overview Function calling Search and retrieval Web search File search Retrieval Connect tools and data MCP and Connectors Secure MCP Tunnel Build tool workflows Skills Tool search Programmatic tool calling Computer and code Shell Computer use Apply Patch Local shell Code interpreter Media Image generation Overview Get started Voice agents Live translation Realtime prompting guide Audio Audio and speech Transcription File transcription Realtime transcription Speech generation Connection methods WebRTC WebSocket SIP Sessions and operations Managing conversations Voice activity detection Realtime with tools Webhooks and server-side controls Managing costs Go live Production best practices Deployment checklist Performance and quality Latency optimization Predicted Outputs Fast mode Accuracy optimization Cost and throughput Cost optimization Prompt caching Batch Flex processing Safety and governance Safety best practices Red teaming Safety checks Cybersecurity checks Under 18 API Guidance Content provenance Your data Permissions Infrastructure and access Terraform provider Overview Projects and access Service accounts Rate limits and spend Model, tool, and data controls Import and reconciliation Private Link IP allowlist Workload identity federation X.509 certificates (beta) Kubernetes AWS Microsoft Azure Google Cloud Oracle Cloud Infrastructure GitHub Actions SPIFFE IP egress ranges Amazon Bedrock Operations Rate limits Spend limits Admin APIs Error codes Docs Use cases DocsUse casesDocs sectionDocs Plugins Workspace Agents Commerce Ads PluginsWorkspace AgentsCommerceAdsDocs sectionSelect... Home Quickstart Core concepts Plugin architecture Skills MCP server Plan Brainstorm use cases Define tools Build Build an MCP server Add UI to your MCP server (optional) Authenticate users Build skills Package your plugin Examples Test and publish Connect and test your plugin Submit and publish Submission error reference Conversion specs Restaurant reservation spec Get Quote spec Product checkout spec Guides UI guidelines Optimize Metadata Submit a Claude Code plugin Security & Privacy Troubleshooting Resources Changelog Plugin guidelines MCP server review requirements Plugin UI reference Checkout API reference Home Get started Trigger workspace agent runs Authenticate with Workspace Agent access tokens Home Guides Get started Best practices File Upload Overview Products API Overview Feeds Products Promotions Ads Overview Measurement Measurement Pixel Multiple Pixels (Advanced) Image Tag Conversions API Supported Events Advertiser API Overview API Partner Setup Quickstart Bulk API Product Feeds Delta Feeds API Campaign Targeting Conversion-Optimized Campaigns API Reference Authentication Ad Account Campaigns Ad Groups Ads Insights Files Conversion Setup Overview Features Configuration Developers Security Administration Use Cases Resources OverviewFeaturesConfigurationDevelopersSecurityAdministrationUse CasesResourcesDocs sectionOverview Home Get started Quickstart Use ChatGPT Get started with Work Import from another agent Foundations Prompting Personalize ChatGPT Skills & Plugins Permissions Explore What's new Models Pricing Glossary Available on ChatGPT desktop app Remote ChatGPT on the web Codex CLI Codex IDE extension Codex cloud Releases Changelog Feature Maturity Open Source Overview Workflows Projects and chats Sites Visualizations Scheduled tasks Long-running work Notifications Pets Codex Micro Capabilities Browser Computer use Voice Plugins Web search Image generation Image inputs Appshots Chrome extension Work with files Reference Commands Slash commands Settings Troubleshooting Overview Customization Overview Memories Computer History Config file Config Basics Advanced Config Config Reference Environment Variables Sample Config Agent configuration AGENTS.md Subagents Speed Rules Extend ChatGPT and Codex Record & Replay MCP Linux Desktop app Windows Desktop app Windows sandbox WSL Overview Development workflows Code review Integrated terminal Extend and automate Build skills Build plugins Hooks Environments Modes Local environments Cloud environment Git worktrees Build with Codex Codex SDK App Server MCP Server GitHub Action Non-interactive mode Third-party integrations GitHub Slack Linear Reference CLI customization Developer commands Developer settings Overview Permissions Profiles Sandboxing Auto-review Agent approvals & security Internet access Codex Security Overview Codex Security plugin Quickstart Run a security scan Run a deep scan Review code changes Use the Security workbench Triage a backlog Fix findings Propose security hardening Write vulnerability reports Export and track findings Changelog Codex Security CLI Quickstart Run bulk scans Run scans in CI Reference FAQ TypeScript SDK Codex Security cloud Setup Security Review Improving the threat model FAQ Cyber safety Models & Trusted Access Recommended configuration Overview Getting started Admin rollout guide ChatGPT Work Overview ChatGPT Work admin FAQ Identity and authentication Authentication overview Personal Access Tokens Service accounts Workspace access, policy, and models Groups and provisioning Roles and workspace permissions GPTs and Sharing Managed configuration Prisma AIRS HIPAA configuration Workspace model availability Plugin and connector controls Plugin controls Skill controls Usage, governance, and compliance Governance Workspace analytics Analytics API Compliance API and audit events Deployment and model providers Manage app updates Windows app deployment Remote connections Amazon Bedrock Explore use cases Collections Home Videos Showcase OpenAI Academy Online trainings Community Codex Ambassadors Codex for Students Codex for Open Source Meetups Blog Company blog Developer blog Explore use cases Collections Home Videos Showcase OpenAI Academy Online trainings Community Codex Ambassadors Codex for Students Codex for Open Source Meetups Blog Company blog Developer blog Showcase Blog Cookbook Learn Community ShowcaseBlogCookbookLearnCommunityDocs sectionSelect... All posts Recent Custom Code Review rules for Codex Mastering remote engineering work from your phone Making private MCP servers reachable without making them public How Perplexity Brought Voice Search to Millions Using the Realtime API Designing delightful frontends with GPT-5.4 Topics General API Apps SDK Audio Codex Home Topics Agents Evals Multimodal Text Guardrails Optimization ChatGPT Codex gpt-oss Contribute Cookbook on GitHub Home OpenAI Developers plugin Docs MCP Categories Demo apps Videos Topics Agents Audio & Voice Computer Use Codex Evals gpt-oss Fine-tuning Image generation Scaling Tools Video generation Community Programs Codex Ambassadors Codex for Students Codex for Open Source OpenAI for Startups Events Meetups Spaces Developer Forum Discord Reddit X API Dashboard Try ChatGPT\n\nOverview Get started Voice agents Live translation Realtime prompting guide Audio Audio and speech Transcription File transcription Realtime transcription Speech generation Connection methods WebRTC WebSocket SIP Sessions and operations Managing conversations Voice activity detection Realtime with tools Webhooks and server-side controls Managing costs Copy Page Managing costs Understanding and managing token costs with the Realtime API. Copy Page This document describes how Realtime API billing works and offers strategies for optimizing costs. Voice-agent sessions accrue input and output tokens across text, audio, and image modalities. Streaming translation and streaming transcription sessions are billed by audio duration. Prices vary per model, with prices listed on the model pages (for example, gpt-realtime-2, gpt-realtime-translate, gpt-realtime-whisper, and gpt-realtime). Conversational Realtime API sessions are a series of turns, where the user adds input that triggers a Response to produce the model output. The server maintains a Conversation, which is a list of Items that form the input for the next turn. When a Response is returned, the output is automatically added to the Conversation. Translation and transcription sessions use a different streaming architecture. The client streams audio continuously and receives translated audio, transcript deltas, or transcript events as the source audio arrives. These sessions don’t use the normal Response lifecycle, so estimate and monitor them with their duration-based rates instead of per-Response token usage. Per-Response costs Realtime API costs are accrued when a Response is created, and is charged based on the numbers of input and output tokens (except for input transcription costs, see below). There is no cost currently for network bandwidth or connections. A Response can be created manually or automatically if voice activity detection (VAD) is turned on. VAD will effectively filter out empty input audio, so empty audio doesn’t count as input tokens unless the client manually adds it as conversation input. The entire conversation is sent to the model for each Response. The output from a turn will be added as Items to the server Conversation and become the input to subsequent turns, thus turns later in the session will be more expensive. Text token costs can be estimated using our tokenization tools. Audio tokens in user messages are 1 token per 100 ms of audio, while audio tokens in assistant messages are 1 token per 50ms of audio. Note that token counts include special tokens aside from the content of a message which will surface as small variations in these counts, for example a user message with 10 text tokens of content may count as 12 tokens. Example Here’s a simple example to illustrate token costs over a multi-turn Realtime API session. For the first turn in the conversation we’ve added 100 tokens of instructions, a user message of 20 audio tokens (for example added by VAD based on the user speaking), for a total of 120 input tokens. Creating a Response generates an assistant output message (20 audio, 10 text tokens). Then we create a second turn with another user audio message. What will the tokens for turn 2 look like? The Conversation at this point includes the initial instructions, first user message, the output assistant message from the first turn, plus the second user message (25 audio tokens). This turn will have 110 text and 64 audio tokens for input, plus the output tokens of another assistant output message. The messages from the first turn are likely to be cached for turn 2, which reduces the input cost. See below for more information on caching. The tokens used for a Response can be read from the response.done event, which looks like the following. 1234567891011121314151617181920212223242526 { \"type\": \"response.done\", \"response\": { ... \"usage\": { \"total_tokens\": 253, \"input_tokens\": 132, \"output_tokens\": 121, \"input_token_details\": { \"text_tokens\": 119, \"audio_tokens\": 13, \"image_tokens\": 0, \"cached_tokens\": 64, \"cached_tokens_details\": { \"text_tokens\": 64, \"audio_tokens\": 0, \"image_tokens\": 0 } }, \"output_token_details\": { \"text_tokens\": 30, \"audio_tokens\": 91 } } } } Input transcription costs Aside from conversational Responses, the Realtime API bills for input transcriptions, if enabled. Input transcription uses a different model than the speech2speech model, such as whisper-1 or gpt-4o-transcribe, and thus are billed from a different rate card. Transcription is performed when audio is written to the input audio buffer and then committed, either manually or by VAD. Input transcription token counts can be read from the conversation.item.input_audio_transcription.completed event, as in the following example. 123456789101112131415 { \"type\": \"conversation.item.input_audio_transcription.completed\", ... \"transcript\": \"Hi, can you hear me?\", \"usage\": { \"type\": \"tokens\", \"total_tokens\": 26, \"input_tokens\": 17, \"input_token_details\": { \"text_tokens\": 0, \"audio_tokens\": 17 }, \"output_tokens\": 9 } } Caching Realtime API supports prompt caching, which is applied automatically and can dramatically reduce the costs of input tokens during multi-turn sessions. Caching applies when the input tokens of a Response match tokens from a previous Response, though this is best-effort and not guaranteed. The best strategy for maximizing cache rate is keep a session’s history static. Removing or changing content in the conversation will “bust” the cache up to the point of the change — the input no longer matches as much as before. Note that instructions and tool definitions are at the beginning of a conversation, thus changing these mid-session will reduce the cache rate for subsequent turns. Truncation When the number of tokens in a conversation exceeds the model’s input token limit the conversation be truncated, meaning messages (starting from the oldest) will be dropped from the Response input. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs. Clients can set a smaller token window than the model’s maximum, which is a good way to control token usage and cost. This is controlled with the token_limits.post_instructions configuration (if you configure truncation with a retention_ratio type as shown below). As the name indicates, this controls the maximum number of input tokens for a Response, except for the instruction tokens. Setting post_instructions to 1,000 means that items over the 1,000 input token limit won’t be sent to the model for a Response. Truncation busts the cache near the beginning of the conversation, and if truncation occurs on every turn then cache rate will be very low. To mitigate this issue clients can configure truncation to drop more messages than necessary, which will extend the headroom before another truncation is needed. This can be controlled with the session.truncation.retention_ratio setting. The server defaults to a value of 1.0 , meaning truncation will remove only the items necessary. A value of 0.8 means a truncation would retain 80% of the maximum, dropping an additional 20%. If you’re attempting to reduce Realtime API cost per session (for a given model), we recommend reducing limiting the number of tokens and setting a retention_ratio less than 1, as in the following example. Remember that there may be a tradeoff here in terms of lower cost but lower model memory for a given turn. 123456789101112 { \"event\": \"session.update\", \"session\": { \"truncation\": { \"type\": \"retention_ratio\", \"retention_ratio\": 0.8, \"token_limits\": { \"post_instructions\": 8000 } } } } Truncation can also be completely disabled, as shown below. When disabled an error will be returned if the Conversation is too long to create a Response. This may be useful if you intend to manage the Conversation size manually. 123456 { \"event\": \"session.update\", \"session\": { \"truncation\": \"disabled\" } } Other optimization strategies Using a mini model The Realtime speech2speech models come in a “normal” size and a mini size, which is significantly cheaper. The tradeoff here tends to be intelligence related to instruction following and function calling, which won’t be as effective in the mini model. We recommend first testing applications with the larger model, refining your application and prompt, then attempting to optimize using the mini model. Editing the Conversation While truncation will occur automatically on the server, another cost management strategy is to manually edit the Conversation. A principle of the API is to allow full client control of the server-side Conversation, allowing the client to add and remove items at will. 1234 { \"type\": \"conversation.item.delete\", \"item_id\": \"item_CCXLecNJVIVR2HUy3ABLj\" } Clearing out old messages is a good way to reduce input token sizes and cost. This might remove important content, but a common strategy is to replace these old messages with a summary. Items can be deleted from the Conversation with a conversation.item.delete message as above, and can be added with a conversation.item.create message. Estimating costs Given the complexity in Realtime API token usage it can be difficult to estimate your costs ahead of time. A good approach is to use the Realtime Playground with your intended prompts and functions, and measure the token usage over a sample session. The token usage for a session can be found under the Logs tab in the Realtime Playground next to the session id.\n\nAsk AI Docs agent Loading docs agent...\n\nExample:\n```text\n{\n  \"type\": \"response.done\",\n  \"response\": {\n    ...\n    \"usage\": {\n      \"total_tokens\": 253,\n      \"input_tokens\": 132,\n      \"output_tokens\": 121,\n      \"input_token_details\": {\n        \"text_tokens\": 119,\n        \"audio_tokens\": 13,\n        \"image_tokens\": 0,\n        \"cached_tokens\": 64,\n        \"cached_tokens_details\": {\n          \"text_tokens\": 64,\n          \"audio_tokens\": 0,\n          \"image_tokens\": 0\n        }\n      },\n      \"output_token_details\": {\n        \"text_tokens\": 30,\n        \"audio_tokens\": 91\n      }\n    }\n  }\n}\n```\n\nExample:\n```text\n{\n  \"type\": \"conversation.item.input_audio_transcription.completed\",\n  ...\n  \"transcript\": \"Hi, can you hear me?\",\n  \"usage\": {\n    \"type\": \"tokens\",\n    \"total_tokens\": 26,\n    \"input_tokens\": 17,\n    \"input_token_details\": {\n      \"text_tokens\": 0,\n      \"audio_tokens\": 17\n    },\n    \"output_tokens\": 9\n  }\n}\n```\n\nExample:\n```text\n{\n  \"event\": \"session.update\",\n  \"session\": {\n    \"truncation\": {\n      \"type\": \"retention_ratio\",\n      \"retention_ratio\": 0.8,\n      \"token_limits\": {\n        \"post_instructions\": 8000\n      }\n    }\n  }\n}\n```\n\nExample:\n```text\n{\n  \"event\": \"session.update\",\n  \"session\": {\n    \"truncation\": \"disabled\"\n  }\n}\n```\n\nExample:\n```text\n{\n  \"type\": \"conversation.item.delete\",\n  \"item_id\": \"item_CCXLecNJVIVR2HUy3ABLj\"\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:57.991Z","totalSectionsIncluded":7,"totalCodeBlocksIncluded":5,"totalLines":98,"estimatedTokens":5118}}93{"id":"doc-integrate_inmobi_with_mediation_flutter_google_f-97fcda38","source":"documentation","title":"Integrate InMobi with mediation | Flutter | Google for Developers","url":"https://developers.google.com/admob/flutter/mediation/inmobi","text":"Example:\n```text\ndependencies:\n  gma_mediation_inmobi: ^2.3.0\n```\n\nExample:\n```text\ndependencies:\n  gma_mediation_inmobi:\n    path: path/to/local/package\n```\n\nExample:\n```text\n<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\" />\n<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\" />\n<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\" />\n```\n\nExample:\n```text\ncom.google.ads.mediation.inmobi.InMobiAdapter\ncom.google.ads.mediation.inmobi.InMobiMediationAdapter\n```\n\nExample:\n```text\nGADMAdapterInMobi\nGADMediationAdapterInMobi\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:55.472Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":5,"totalLines":33,"estimatedTokens":151}}94{"id":"doc-integrate_applovin_with_mediation_flutter_google-8f1a4d9d","source":"documentation","title":"Integrate AppLovin with mediation | Flutter | Google for Developers","url":"https://developers.google.com/admob/flutter/mediation/applovin","text":"Example:\n```text\ndependencies:\n  gma_mediation_applovin: ^2.6.2\n```\n\nExample:\n```text\ndependencies:\n  gma_mediation_applovin:\n    path: path/to/local/package\n```\n\nExample:\n```text\nimport 'package:gma_mediation_applovin/gma_mediation_applovin.dart';\n// ...\n\nGmaMediationApplovin.setHasUserConsent(true);\nGmaMediationApplovin.setIsAgeRestrictedUser(true);\n```\n\nExample:\n```text\nimport 'package:gma_mediation_applovin/gma_mediation_applovin.dart';\n// ...\n\nGmaMediationApplovin.setDoNotSell(true);\n```\n\nExample:\n```text\nAppLovinMediationExtras applovinExtras = AppLovinMediationExtras(isMuted: true)\n\nAdRequest request = AdRequest(\n    keywords: <String>['foo', 'bar'],\n    contentUrl: 'http://foo.com/bar.html',\n    mediationExtras: [applovinExtras],\n);\n```\n\nExample:\n```text\ncom.google.ads.mediation.applovin.mediation.ApplovinAdapter\ncom.google.ads.mediation.applovin.AppLovinMediationAdapter\n```\n\nExample:\n```text\nGADMAdapterAppLovin\nGADMAdapterAppLovinRewardBasedVideoAd\nGADMediationAdapterAppLovin\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:55.475Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":7,"totalLines":55,"estimatedTokens":255}}95{"id":"doc-autocomplete_suggestions_for_text_inputs_google_-4ba25679","source":"documentation","title":"Autocomplete suggestions for text inputs | Google Workspace add-ons | Google for Developers","url":"https://developers.google.com/workspace/add-ons/how-tos/suggestions","text":"Example:\n```text\n// Create an input with a static suggestion list.\nvar textInput1 = CardService.newTextInput()\n    .setFieldName('colorInput')\n    .setTitle('Color choice')\n    .setSuggestions(CardService.newSuggestions()\n        .addSuggestion('Red')\n        .addSuggestion('Yellow')\n        .addSuggestions(['Blue', 'Black', 'Green']));\n\n// Create an input with a dynamic suggestion list.\nvar action = CardService.newAction()\n    .setFunctionName('refreshSuggestions');\nvar textInput2 = CardService.newTextInput()\n    .setFieldName('emailInput')\n    .setTitle('Email')\n    .setSuggestionsAction(action);\n\n// ...\n\n/**\n *  Build and return a suggestion response. In this case, the suggestions\n *  are a list of emails taken from the To: and CC: lists of the open\n *  message in Gmail, filtered by the text that the user has already\n *  entered. This method assumes the Google Workspace\n *  add-on extends Gmail; the add-on only calls this method for cards\n *  displayed when the user has entered a message context.\n *\n *  @param {Object} e the event object containing data associated with\n *      this text input widget.\n *  @return {SuggestionsResponse}\n */\n function refreshSuggestions(e) {\n   // Activate temporary Gmail scopes, in this case so that the\n   // open message metadata can be read.\n   var accessToken = e.gmail.accessToken;\n   GmailApp.setCurrentMessageAccessToken(accessToken);\n\n   var userInput = e && e.formInput['emailInput'].toLowerCase();\n   var messageId = e.gmail.messageId;\n   var message = GmailApp.getMessageById(messageId);\n\n   // Combine the comma-separated returned by these methods.\n   var addresses = message.getTo() + ',' + message.getCc();\n\n   // Filter the address list to those containing the text the user\n   // has already entered.\n   var suggestionList = [];\n   addresses.split(',').forEach(function(email) {\n     if (email.toLowerCase().indexOf(userInput) !== -1) {\n       suggestionList.push(email);\n     }\n   });\n   suggestionList.sort();\n\n   return CardService.newSuggestionsResponseBuilder()\n       .setSuggestions(CardService.newSuggestions()\n           .addSuggestions(suggestionList))\n       .build();  // Don't forget to build the response!\n }\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:55.511Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":1,"totalLines":64,"estimatedTokens":553}}96{"id":"doc-build_a_google_chat_add_on_with_dialogflow_es_go-8f2ad1f6","source":"documentation","title":"Build a Google Chat add-on with Dialogflow ES | Google Workspace add-ons | Google for Developers","url":"https://developers.google.com/workspace/add-ons/chat/quickstart-dialogflow-es","text":"Example:\n```text\n\"fulfillmentMessages\": [\n{\n   \"text\": {\n   \"text\": [\n        \"This is a test.\"\n   ]\n},\n  \"platform\": \"GOOGLE_HANGOUTS\"\n},\n```\n\nExample:\n```text\n{ \"hangouts\": { \"hostAppDataAction\": { \"chatDataAction\": {\n  \"createMessageAction\": { \"message\": { \"cardsV2\": [{\n    \"cardId\": \"pizza\",\n    \"card\": {\n      \"header\": {\n        \"title\": \"Pizza Delivery Customer Support\",\n        \"subtitle\": \"pizzadelivery@example.com\",\n        \"imageUrl\": \"https://goo.gl/aeDtrS\"\n      },\n      \"sections\": [{ \"widgets\": [{ \"textParagraph\": {\n        \"text\": \" Your pizza is here!\"\n      }}]}]\n    }\n  }]}}\n}}}}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:55.528Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":2,"totalLines":33,"estimatedTokens":156}}97{"id":"doc-unset_a_label_field_on_a_file_google_drive_googl-0025b2c5","source":"documentation","title":"Unset a label field on a file | Google Drive | Google for Developers","url":"https://developers.google.com/workspace/drive/api/guides/unset-label","text":"Example:\n```text\nLabelFieldModification fieldModification = new LabelFieldModification()\n    .setFieldId(\"FIELD_ID\")\n    .setUnsetValues(true);\n\nModifyLabelsRequest modifyLabelsRequest = new ModifyLabelsRequest()\n    .setLabelModifications(ImmutableList.of(\n        new LabelModification()\n            .setLabelId(\"LABEL_ID\")\n            .setFieldModifications(ImmutableList.of(fieldModification))));\n\nModifyLabelsResponse modifyLabelsResponse = driveService.files()\n    .modifyLabels(\"FILE_ID\", modifyLabelsRequest)\n    .execute();\n```\n\nExample:\n```text\nfield_modification = {\n    'fieldId': 'FIELD_ID',\n    'unsetValues': True\n}\n\nlabel_modification = {\n    'labelId': 'LABEL_ID',\n    'fieldModifications': [field_modification]\n}\n\nmodified_labels = drive_service.files().modifyLabels(\n    fileId=\"FILE_ID\",\n    body={'labelModifications': [label_modification]}\n).execute()\n```\n\nExample:\n```text\n/**\n * Unset a label with a field on a Drive file\n * @return{obj} updated label data\n **/\nasync function unsetLabelField() {\n  // Get credentials and build service\n  // TODO (developer) - Use appropriate auth mechanism for your app\n\n  const {GoogleAuth} = require('google-auth-library');\n  const {google} = require('googleapis');\n\n  const auth = new GoogleAuth({\n    scopes: 'https://www.googleapis.com/auth/drive',\n  });\n  const service = google.drive({version: 'v3', auth});\n  const fieldModification = {\n    'fieldId': 'FIELD_ID',\n    'unsetValues': true,\n  };\n  const labelModification = {\n    'labelId': 'LABEL_ID',\n    'fieldModifications': [fieldModification],\n  };\n  const labelModificationRequest = {\n    'labelModifications': [labelModification],\n  };\n  try {\n    const updateResponse = await service.files.modifyLabels({\n      fileId: 'FILE_ID',\n      requestBody: labelModificationRequest,\n    });\n    return updateResponse;\n  } catch (err) {\n    // TODO (developer) - Handle error\n    throw err;\n  }\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:55.638Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":3,"totalLines":77,"estimatedTokens":482}}98{"id":"doc-enable_pay_later_messaging_on_magento_2_paypal_d-7060b2ed","source":"documentation","title":"Enable Pay Later messaging on Magento 2 | PayPal Developer","url":"https://developer.paypal.com/v5/pay-later/magento-2/au/","text":"Copy for LLMView as MarkdownEnable Pay Later messaging on Magento 2Last 5, 2026DOCSCURRENTCountry or regionAustraliaCanadaFranceGermanyItalySpainUnited KingdomUnited StatesAustraliaCountry or regionPromote PayPal Pay Later offers using messaging and buttons on your Magento 2 store using either the Gene Commerce, IWD, or Magento PayPal Express Checkout plugins. PayPal offers short-term, interest-free payments and other special financing options that buyers can use to buy now and pay later. You get paid up-front, and there are no additional costs. IWD If you are a merchant using the IWD plugin, visit here. Gene Commerce If you are a merchant using the Gene Commerce plugin, visit here. Magento PayPal Express Checkout If you are a merchant using the Magento PayPal Express Checkout plugin, visit here. Magento Braintree If you are a merchant using the Magento Braintree plugin, visit here. Return to Commerce PlatformsOn this pageOn this pageIWDGene CommerceMagento PayPal Express CheckoutMagento Braintree\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:44.350Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":0,"totalLines":3,"estimatedTokens":257}}99{"id":"doc-currency_codes_paypal_developer-d96795fb","source":"documentation","title":"Currency codes | PayPal Developer","url":"https://developer.paypal.com/reference/currency-codes","text":"Copy for LLMView as MarkdownCurrency codesUse these currency codes when you specify currency in API requests and interpret currency fields in reports.Last 11, 2026The PayPal REST API supports merchants in a number of countries and supports currencies depending on the payment type, PayPal payments or direct credit card payments. Specifying the correct currency code in your API requests ensures transactions are processed and settled in the intended currency. For country-specific offerings and limitations, see PayPal Offerings Worldwide and visit your country-specific site. To specify currencies in request URI and body parameters, use three-character ISO-4217 codes. To receive payments in a currency that you do not hold in your PayPal account, you must configure your Payment Receiving Preferences within your account. Otherwise, the payment status remains pending until you manually approve the payment in your PayPal account. Currency, Code, NotesCurrencyCodeNotesAustralian DollarAUDBrazilian Real ¹BRLCanadian DollarCADChinese Renminbi ¹CNYCzech KorunaCZKDanish KroneDKKEuroEURHong Kong DollarHKDHungarian ForintHUFZero-digit currency — no decimal places or fractionsIsraeli New ShekelILSJapanese YenJPYZero-digit currency — no decimal places or fractionsMalaysian Ringgit ¹MYRMexican PesoMXNNew Taiwan DollarTWDZero-digit currency — no decimal places or fractionsNew Zealand DollarNZDNorwegian KroneNOKPhilippine PesoPHPPolish ZłotyPLNPound SterlingGBPSingapore DollarSGDSwedish KronaSEKSwiss FrancCHFThai BahtTHBUnited States DollarUSD ¹ This currency is supported as a payment currency (buyer currency) or settlement currency (holding currency) only for in-country PayPal accounts. If the settlement account is based outside the country, PayPal converts money into the account's primary currency with the applicable currency conversion rate, which includes a spread or fee. Payment Receiving Preferences If you have a PayPal Premier or Business account, configure your Payment Receiving Preferences to handle payments automatically. You can convert any payment into your primary currency or block certain types of payments. You set these preferences in your PayPal account under Account Settings > Payment preferences. Related resources For a list of countries that PayPal supports, see Country codes. For country-specific offerings and limitations, see PayPal Offerings Worldwide. On this pageOn this pagePayment Receiving PreferencesRelated resources\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:45.518Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":0,"totalLines":3,"estimatedTokens":620}}100{"id":"doc-integrate_fastlane_by_paypal-a09c78c0","source":"documentation","title":"Integrate | Fastlane by PayPal","url":"http://developer.paypal.com/studio/checkout/fastlane/integrate?type=flexible","text":"Example:\n```html\n1<!DOCTYPE html>\n2<html lang=\"en\">\n3    <title>{{title}}</title>\n4\n5    <head>\n6        <link rel=\"stylesheet\" href=\"{{stylesheetPath}}\" />\n7\n8       \n9        <script\n10            src=\"https://www.paypal.com/sdk/js?client-id=AYOeyCQvilLVKJGjslZfFSi_Nkl7A6OfXNarj5lS55iUcQXMhpp3AypVjAVkS_qvPcO5D415b9SnBFuN&components=buttons%2Cfastlane\"\n11            data-sdk-client-token=\"eyJraWQiOiJjMDg0YjA0NDQwMjE0YzFkYTQ1ZDgwNDE1YjJlZmI5MiIsInR5cCI6IkpXVCIsImFsZyI6IkVTMjU2In0.eyJpc3MiOiJodHRwczovL2FwaS5zYW5kYm94LnBheXBhbC5jb20iLCJhdWQiOlsiaHR0cHM6Ly9hcGkuYnJhaW50cmVlZ2F0ZXdheS5jb20iLCJwYXlwYWwuY29tIl0sInN1YiI6IjJUSFY2R0VSVFZRRUUiLCJhY3IiOlsiY2xpZW50Il0sInNjb3BlIjpbIkJyYWludHJlZTpWYXVsdCJdLCJvcHRpb25zIjp7fSwiYXoiOiJjY2cxOC5zbGMiLCJleHRlcm5hbF9pZCI6WyJQYXlQYWw6MlRIVjZHRVJUVlFFRSIsIkJyYWludHJlZTozMms4amNqNnJ5MnF2YmZ0Il0sImV4cCI6MTc4NzA2NTMzMywiaWF0IjoxNzg3MDY0NDMzLCJqdGkiOiJVMkFBTC1uQnU0b3d3UURXUzlRdlBzUXNSY1hFWHlUTjFHOVhXWXNjVVlUNXJVcng1NnhiY2FsSG5KTmZKRV9hUTJGLVJ6YlZTVi15NDJMQzFqTHc1UEk2Smx4cVlVYjhMY1RQUFJJcGhMTnlnTGpCRHgtdzI0T2ptZ01YNjVNZyIsImNsaWVudF9pZCI6IkFZT2V5Q1F2aWxMVktKR2pzbFpmRlNpX05rbDdBNk9mWE5hcmo1bFM1NWlVY1FYTWhwcDNBeXBWakFWa1NfcXZQY081RDQxNWI5U25CRnVOIn0.Si-HG0C_YQ4J-9JohDd8QYozMilSynrQMDSrWnLcC8oJVMWUrjy60ylEwhrYz_Ci9Pkxtq4nZk7kIz44J5c6hA\"\n12            data-sdk-integration-source=\"developer-studio\"\n13            defer\n14        ></script>\n15       \n16        <!-- Uncomment to inject from server side -->\n17        <!-- {{&prerequisiteScripts}} -->\n18        <script src=\"{{initScriptPath}}\" defer></script>\n19    </head>\n20\n21    <body>\n22        <form>\n23            <h1>{{title}}</h1>\n24\n25            <section id=\"customer\" class=\"active visited\">\n26                <div class=\"header\">\n27                    <h2>Customer</h2>\n28                    <button\n29                        id=\"email-edit-button\"\n30                        type=\"button\"\n31                        class=\"edit-button\"\n32                    >\n33                        Edit\n34                    </button>\n35                </div>\n36                <div class=\"summary\"></div>\n37                <div class=\"email-container\">\n38                    <fieldset class=\"email-input-with-watermark\">\n39                        <input\n40                            id=\"email-input\"\n41                            name=\"email\"\n42                            type=\"email\"\n43                            placeholder=\"Email\"\n44                            autocomplete=\"email\"\n45                        />\n46                        <div id=\"watermark-container\"></div>\n47                    </fieldset>\n48                    <button\n49                        id=\"email-submit-button\"\n50                        type=\"button\"\n51                        class=\"submit-button\"\n52                        disabled\n53                    >\n54                        Continue\n55                    </button>\n56                </div>\n57            </section>\n58\n59            <hr />\n60\n61           \n62            <section id=\"shipping\">\n63                <div class=\"header\">\n64                    <h2>Shipping</h2>\n65                    <button\n66                        id=\"shipping-edit-button\"\n67                        type=\"button\"\n68                        class=\"edit-button\"\n69                    >\n70                        Edit\n71                    </button>\n72                </div>\n73                <div class=\"summary\"></div>\n74                <fieldset>\n75                    <span>\n76                        <input\n77                            id=\"shipping-required-checkbox\"\n78                            name=\"shipping-required\"\n79                            type=\"checkbox\"\n80                            checked\n81                        />\n82                        <label for=\"shipping-required-checkbox\"\n83                            >This purchase requires shipping</label\n84                        >\n85                    </span>\n86                    <input\n87                        name=\"given-name\"\n88                        placeholder=\"First name\"\n89                        autocomplete=\"given-name\"\n90                    />\n91                    <input\n92                        name=\"family-name\"\n93                        placeholder=\"Last name\"\n94                        autocomplete=\"family-name\"\n95                    />\n96                    <input\n97                        name=\"address-line1\"\n98                        placeholder=\"Street address\"\n99                        autocomplete=\"address-line1\"\n100                    />\n101                    <input\n102                        name=\"address-line2\"\n103                        placeholder=\"Apt., ste., bldg. (optional)\"\n104                        autocomplete=\"address-line2\"\n105                    />\n106                    <input\n107                        name=\"address-level2\"\n108                        placeholder=\"City\"\n109                        autocomplete=\"address-level2\"\n110                    />\n111                    <input\n112                        name=\"address-level1\"\n113                        placeholder=\"State\"\n114                        autocomplete=\"address-level1\"\n115                    />\n116                    <input\n117                        name=\"postal-code\"\n118                        placeholder=\"ZIP code\"\n119                        autocomplete=\"postal-code\"\n120                    />\n121                    <input\n122                        name=\"country\"\n123                        placeholder=\"Country\"\n124                        autocomplete=\"country\"\n125                    />\n126                    <input\n127                        name=\"tel-country-code\"\n128                        placeholder=\"Country calling code\"\n129                        autocomplete=\"tel-country-code\"\n130                    />\n131                    <input\n132                        name=\"tel-national\"\n133                        type=\"tel\"\n134                        placeholder=\"Phone number\"\n135                        autocomplete=\"tel-national\"\n136                    />\n137                </fieldset>\n138                <button\n139                    id=\"shipping-submit-button\"\n140                    type=\"button\"\n141                    class=\"submit-button\"\n142                >\n143                    Continue\n144                </button>\n145            </section>\n146           \n147\n148            <hr />\n149\n150            <section id=\"billing\">\n151                <div class=\"header\">\n152                    <h2>Billing</h2>\n153                    <button\n154                        id=\"billing-edit-button\"\n155                        type=\"button\"\n156                        class=\"edit-button\"\n157                    >\n158                        Edit\n159                    </button>\n160                </div>\n161                <div class=\"summary\"></div>\n162                <fieldset>\n163                    <input\n164                        name=\"billing-address-line1\"\n165                        placeholder=\"Street address\"\n166                        autocomplete=\"address-line1\"\n167                    />\n168                    <input\n169                        name=\"billing-address-line2\"\n170                        placeholder=\"Apt., ste., bldg. (optional)\"\n171                        autocomplete=\"address-line2\"\n172                    />\n173                    <input\n174                        name=\"billing-address-level2\"\n175                        placeholder=\"City\"\n176                        autocomplete=\"address-level2\"\n177                    />\n178                    <input\n179                        name=\"billing-address-level1\"\n180                        placeholder=\"State\"\n181                        autocomplete=\"address-level1\"\n182                    />\n183                    <input\n184                        name=\"billing-postal-code\"\n185                        placeholder=\"ZIP code\"\n186                        autocomplete=\"postal-code\"\n187                    />\n188                    <input\n189                        name=\"billing-country\"\n190                        placeholder=\"Country\"\n191                        autocomplete=\"country\"\n192                    />\n193                </fieldset>\n194                <button\n195                    id=\"billing-submit-button\"\n196                    type=\"button\"\n197                    class=\"submit-button\"\n198                >\n199                    Continue\n200                </button>\n201            </section>\n202\n203            <hr />\n204\n205            <section id=\"payment\">\n206                <div class=\"header\">\n207                    <h2>Payment</h2>\n208                    <button\n209                        id=\"payment-edit-button\"\n210                        type=\"button\"\n211                        class=\"edit-button\"\n212                    >\n213                        Edit\n214                    </button>\n215                </div>\n216                <fieldset>\n217                    <div id=\"selected-card\"></div>\n218                    <div id=\"payment-watermark\"></div>\n219                    <div id=\"card-component\"></div>\n220                </fieldset>\n221            </section>\n222\n223            <button id=\"checkout-button\" type=\"button\" class=\"submit-button\">\n224                Checkout\n225            </button>\n226        </form>\n227    </body>\n228</html>\n229\n230\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:45.601Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":1,"totalLines":235,"estimatedTokens":2357}}101{"id":"doc-manage_your_code_gitlab_docs-e70c3f7e","source":"documentation","title":"Manage your code | GitLab Docs","url":"https://docs.gitlab.com/topics/manage_code/","text":"Getting startedTutorialsManage your organizationOrganize work with projectsPlan and track workManage authentication and authorizationUse GitManage your codeGetting startedRepositoriesMerge requestsRemote developmentUse CI/CD to build your applicationSecure your applicationDeploy and release your applicationManage your infrastructureMonitor your applicationAnalyze GitLab usageRelease notesFeature supportFind your GitLab versionGitLab Docs /Use GitLab /Manage your codeHelp us learn about your current experience with the documentation. Take the survey.Manage your codeStore your source files in a repository and create merge requests. Write, debug, and collaborate on code.Getting startedBuild, track, and deliver the code for your project.RepositoriesHow to create, clone, and use GitLab repositories.Merge requestsCreate merge requests to review code changes, manage discussions, and merge branches.Remote developmentUse your web browser to write code in a secure environment.\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:04.251Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":0,"totalLines":3,"estimatedTokens":249}}102{"id":"doc-support_for_features_in_different_stages_of_deve-1beb4de1","source":"documentation","title":"Support for features in different stages of development | GitLab Docs","url":"https://docs.gitlab.com/policy/development_stages_support/","text":"Getting startedTutorialsManage your organizationOrganize work with projectsPlan and track workManage authentication and authorizationUse GitManage your codeUse CI/CD to build your applicationSecure your applicationDeploy and release your applicationManage your infrastructureMonitor your applicationAnalyze GitLab usageRelease notesFeature supportFind your GitLab versionGitLab Docs /Use GitLab /Feature supportHelp us learn about your current experience with the documentation. Take the survey.Support for features in different stages of developmentGitLab sometimes releases features at different development stages, such as experimental or beta. Users can opt in and test the new experience. Some reasons for these kinds of feature releases the edge-cases of scale, support, and maintenance burden of features in their current form for every designed use case.Features not complete enough to be considered an MVC, but added to the codebase as part of the development process.Some features may not be aligned to these recommendations if they were developed before the recommendations were in place, or if a team determined an alternative implementation approach was needed.All other features are considered to be publicly available.ExperimentExperimental not ready for production use.Have no support available. Issues regarding such features should be opened in the GitLab issue tracker.Might be unstable.Could be removed at any time.Might not mature to general availability.Might have a risk of data loss.Might have no documentation, or information limited to just GitLab issues or a blog.Might not have a finalized user experience, and might only be accessible through quick actions or API requests.BetaBeta not be ready for production use.Are supported on a commercially-reasonable effort basis, but with the expectation that issues require extra time and assistance from development to troubleshoot.Might be unstable.Have configuration and dependencies that are unlikely to change.Have features and functions that are unlikely to change. However, breaking changes can occur outside of major releases or with less notice than for generally available features.Have a low risk of data loss.Have a user experience that is complete or near completion.Can be equivalent to partner “Public Preview” status.Public availabilityTwo types of public releases are availabilityGenerally availableBoth types are production-ready, but have different scopes.Limited availabilityLimited availability features follow the same security requirements as generally available features but may be deployed on a subset of platforms or with scale limitations during initial rollout.Limited availability ready for production use at a reduced scale.Can be initially available on one or more GitLab platforms (GitLab.com, GitLab Self-Managed, GitLab Dedicated).Might initially be free, then become paid when generally available.Might be offered at a discount before becoming generally available.Might have commercial terms that change for new contracts when generally available.Are fully supported and documented.Have a complete user experience aligned with GitLab design standards.Generally availableGenerally available ready for production use at any scale.Are fully supported and documented.Have a complete user experience aligned with GitLab design standards.Must be available on all GitLab offerings (GitLab.com, GitLab.com Cells, GitLab Self-Managed, GitLab Dedicated, GitLab Dedicated for Government).Feature release requirementsBefore making a feature available to users, GitLab teams developing the feature must consider the status guidance above, and the requirements for each stage of development.TerminologyFor clarity, these guidelines use the following feature is disabled by default and requires a deliberate enablement action by an authorized user (such as an instance administrator, group owner, or individual user, depending on feature scope). Features that are available to enable but remain disabled unless activated are considered to require explicit opt-in.Enabled by feature is active for users or instances without requiring an opt-in action. Features must not be enabled by default during Experimental or Beta stages.Production to production workloads (features that users depend on for business operations)GitLab-managed production infrastructure (shared services affecting platform reliability or security) supporting GitLab.com, Dedicated, and Dedicated for FederalInternal of pre-GA features by GitLab team members for validation purposes, also known as Customer Zero.Feature Maturity Transition PrincipleWhen evaluating whether a feature is ready to advance maturity stages, apply the incident response test:“If this feature were already at the target maturity level and this risk manifested, would we declare an incident and push an urgent fix?”Features should not transition to GA with risks that would trigger incident response if they occurred post-GA, (S1/S2) security vulnerabilitiesPerformance degradations that would breach SLA commitmentsData integrity issues requiring customer notificationAvailability impacts affecting platform stabilityThis principle ensures features reach production maturity with appropriate risk posture rather than creating predictable future incidents.Experimental featuresMust be disabled by default and require explicit opt-in. Cannot be automatically enabled for users or instances without customer action.On multi-tenant platforms, must maintain tenant isolation such that users who opt in do not create risk for other tenants.May have security fixes released in canonical (in the open) depending on the current state of release maturity. Standard vulnerability remediation SLOs do not apply to experimental features.Require VP approval for exceptions to move to Beta without meeting stated Beta requirements.Internal testing (Customer Zero) may use Experimental features for engineering validation. Features affecting company-wide business processes (such as onboarding, access management, or compliance workflows) require documented risk acceptance from Engineering and Security leadership.Beta featuresMust be disabled by default and require explicit opt-in. Cannot be automatically enabled for users or instances without customer action.On multi-tenant platforms, must maintain tenant isolation such that users who opt in do not create risk for other tenants.Must have a documented and stakeholder-aligned plan for establishing a security release process before general availability. This process must enable secure vulnerability remediation without premature public disclosure, including how vulnerabilities are identified, tracked, prioritized, fixed, and communicated through coordinated disclosure.May have security fixes released in canonical (in the open) depending on the current state of release maturity. Standard vulnerability remediation SLOs do not apply to beta features.Must have a documented and stakeholder-aligned plan for implementing audit logging before general availability. This plan must specify what events are logged, log format and retention, how security teams will access logs, and integration points with existing audit systems.Require e-group approval for exceptions to move to GA without meeting stated GA requirements.Limited availability featuresMust have an operational security release process that enables secure vulnerability remediation without premature public disclosure.Must have operational audit logging that enables security teams (internal and customer) to detect anomalous behavior, investigate security incidents, and answer fundamental questions about who, what, where, and when. Audit logging does not require a polished UI experience but must provide programmatic access to security-relevant events.Must have operational runbook documentation.Generally available featuresMust have a completed security review before moving to GA. Security review scope is determined by feature characteristics (customer-facing functionality, infrastructure impact, data access patterns). Features moving to GA with partially complete security reviews require E-Group approval.Adhere to vulnerability remediation SLOs and do not ship with any S1/S2 vulnerabilities without documented risk acceptance from E-Group. Apply the incident response must not ship with risks that would trigger urgent patching if discovered post-GA.Must have an operational security release process that enables secure vulnerability remediation without premature public disclosure.Must have operational audit logging that enables security teams (internal and customer) to detect anomalous behavior, investigate security incidents, and answer fundamental questions about who, what, where, and when. Audit logging does not require a polished UI experience but must provide programmatic access to security-relevant events.Exception GovernanceIn exceptional circumstances where business needs require deviation from these requirements, GitLab follows a documented exception process with executive approval and risk acceptance.ExperimentBetaPublic availabilityLimited availabilityGenerally availableFeature release requirementsTerminologyFeature Maturity Transition PrincipleExperimental featuresBeta featuresLimited availability featuresGenerally available featuresException Governance\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:04.314Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":0,"totalLines":3,"estimatedTokens":2338}}103{"id":"doc-gitlab_com_settings_gitlab_docs-fa0d99b4","source":"documentation","title":"GitLab.com settings | GitLab Docs","url":"https://docs.gitlab.com/user/gitlab_com/","text":"Example:\n```plaintext\nHost gitlab.com\n  Hostname altssh.gitlab.com\n  User git\n  Port 443\n  PreferredAuthentications publickey\n  IdentityFile ~/.ssh/gitlab\n```\n\nExample:\n```plaintext\ngitlab.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAfuCHKVTjquxvt6CM6tdG4SLp1Btn/nOeHHE5UOzRdf\ngitlab.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCsj2bNKTBSpIYDEGk9KxsGh3mySTRgMtXL583qmBpzeQ+jqCMRgBqB98u3z++J1sKlXHWfM9dyhSevkMwSbhoR8XIq/U0tCNyokEi/ueaBMCvbcTHhO7FcwzY92WK4Yt0aGROY5qX2UKSeOvuP4D6TPqKF1onrSzH9bx9XUf2lEdWT/ia1NEKjunUqu1xOB/StKDHMoX4/OKyIzuS0q/T1zOATthvasJFoPrAjkohTyaDUz2LN5JoH839hViyEG82yB+MjcFV5MU3N1l1QL3cVUCh93xSaua1N85qivl+siMkPGbO5xR/En4iEY6K2XPASUEMaieWVNTRCtJ4S8H+9\ngitlab.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFSMqzJeV9rUzU4kWitGjeR4PWSa29SPqJ1fVkhtj3Hw9xjLVXVYrU9QlYWrOLXBpQ6KWjbjTDTdDkoohFzgbEY=\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:04.325Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":2,"totalLines":18,"estimatedTokens":214}}104{"id":"doc-investigating_a_regression_jax_documentation-8d4bd3de","source":"documentation","title":"Investigating a regression — JAX documentation","url":"https://docs.jax.dev/en/latest/investigating_a_regression.html","text":"Example:\n```text\nfor m in 7 8 9; do\n    for d in `seq -w 1 30`; do\n      docker run -v $PWD:/dir --gpus=all ghcr.io/nvidia/jax:nightly-2023-0${m}-${d} /bin/bash /dir/test.sh &> OUT-0${m}-${d}\n    done\n  Done\n```\n\nExample:\n```text\npip install jmp pyvista numpy matplotlib Rtree trimesh jmp termcolor orbax\n  git clone https://github.com/Autodesk/XLB\n  cd XLB\n  export PYTHONPATH=.\n  export CUDA_VISIBLE_DEVICES=0 # only 1 GPU is needed\n\n  python3 examples/performance/MLUPS3d.py 256 200\n```\n\nExample:\n```text\nOUT-07-06:MLUPS: 587.9240990200157\nOUT-07-07:MLUPS: 587.8907972116419\nOUT-07-08:MLUPS: 587.3186499464459\nOUT-07-09:MLUPS: 587.3130127722537\nOUT-07-10:MLUPS: 587.8526619429658\nOUT-07-17:MLUPS: 570.1631097290182\nOUT-07-18:MLUPS: 570.2819775617064\nOUT-07-19:MLUPS: 570.1672213357352\nOUT-07-20:MLUPS: 587.437153685251\nOUT-07-21:MLUPS: 587.6702557143142\nOUT-07-25:MLUPS: 577.3063618431178\nOUT-07-26:MLUPS: 577.2362978080912\nOUT-07-27:MLUPS: 577.2101850145785\nOUT-07-28:MLUPS: 577.0716349809895\nOUT-07-29:MLUPS: 577.4223280707176\nOUT-07-30:MLUPS: 577.2255967221336\nOUT-08-01:MLUPS: 577.277685388252\nOUT-08-02:MLUPS: 577.0137874289354\nOUT-08-03:MLUPS: 577.1333281553946\nOUT-08-04:MLUPS: 577.305012020407\nOUT-08-05:MLUPS: 577.2143988866626\nOUT-08-06:MLUPS: 577.2409145495443\nOUT-08-07:MLUPS: 577.2602819927345\nOUT-08-08:MLUPS: 577.2823738293221\nOUT-08-09:MLUPS: 577.3453199728248\nOUT-08-11:MLUPS: 577.3161423260563\nOUT-08-12:MLUPS: 577.1697775786824\nOUT-08-13:MLUPS: 577.3049883393633\nOUT-08-14:MLUPS: 576.9051978525331\nOUT-08-15:MLUPS: 577.5331743016213\nOUT-08-16:MLUPS: 577.5117505070573\nOUT-08-18:MLUPS: 577.5930698237612\nOUT-08-19:MLUPS: 577.3539885757353\nOUT-08-20:MLUPS: 577.4190113959127\nOUT-08-21:MLUPS: 577.300394253605\nOUT-08-22:MLUPS: 577.4263792037783\nOUT-08-23:MLUPS: 577.4087536357031\nOUT-08-24:MLUPS: 577.1094728438082\nOUT-08-25:  File \"/XLB/examples/performance/MLUPS3d.py\", line 5, in <module>\nOUT-08-26:MLUPS: 537.0164618489928\nOUT-08-27:MLUPS: 536.9545448661609\nOUT-08-28:MLUPS: 536.2887650464874\nOUT-08-29:MLUPS: 536.7178471720636\nOUT-08-30:MLUPS: 536.6978912984252\nOUT-09-01:MLUPS: 536.7030899164106\nOUT-09-04:MLUPS: 536.5339818238837\nOUT-09-05:MLUPS: 536.6507808565617\nOUT-09-06:MLUPS: 536.7144494518315\nOUT-09-08:MLUPS: 536.7376612408998\nOUT-09-09:MLUPS: 536.7798324141778\nOUT-09-10:MLUPS: 536.726157440174\nOUT-09-11:MLUPS: 536.7446210750584\nOUT-09-12:MLUPS: 536.6707332269023\nOUT-09-13:MLUPS: 536.6777936517823\nOUT-09-14:MLUPS: 536.7581523280307\nOUT-09-15:MLUPS: 536.6156273667873\nOUT-09-16:MLUPS: 536.7320935035265\nOUT-09-17:MLUPS: 536.7104991444398\nOUT-09-18:MLUPS: 536.7492269469092\nOUT-09-19:MLUPS: 536.6760131792959\nOUT-09-20:MLUPS: 536.7361260076634\n```\n\nExample:\n```text\n# Execute this script inside the container:\n  # docker run -v $PWD:/dir --gpus=all ghcr.io/nvidia/jax:nightly-2023-08-24 /bin/bash\n  cd /opt/xla-source\n  git remote update\n  cd /opt/jax-source\n  git remote update\n  pip install jmp pyvista numpy matplotlib Rtree trimesh jmp termcolor orbax\n  cd /tmp\n  git clone https://github.com/Autodesk/XLB\n  cd XLB\n\n  for d in `seq -w 24 26`; do\n      for h in `seq -w 0 24`; do\n          echo $m $d $h\n          /bin/bash /dir/test2.sh Aug $d 2023 $h:00:00 &> OUT-08-${d}-$h\n      done\n  done\n```\n\nExample:\n```text\necho \"param: $@\"\n  cd /opt/xla-source\n  git checkout `git rev-list -1 --before=\"$*\" origin/main`\n  git show -q\n  cd /opt/jax-source\n  git checkout `git rev-list -1 --before=\"$*\" origin/main`\n  git show -q\n\n  rm /opt/jax-source/dist/jax*.whl\n  build-jax.sh # The script is in the nightly container\n\n  export PYTHONPATH=.\n  export CUDA_VISIBLE_DEVICES=0 # only 1 GPU is needed\n\n  python3 examples/performance/MLUPS3d.py 256 200\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:14.739Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":5,"totalLines":126,"estimatedTokens":925}}105{"id":"doc-external_callbacks_jax_documentation-10de1315","source":"documentation","title":"External callbacks — JAX documentation","url":"https://docs.jax.dev/en/latest/external-callbacks.html","text":"Example:\n```text\nimport jax\n\n@jax.jit\ndef f(x):\n  y = x + 1\n  print(\"intermediate value: {}\".format(y))\n  return y * 2\n\nresult = f(2)\n```\n\nExample:\n```text\nintermediate value: JitTracer(~int32[])\n```\n\nExample:\n```text\n@jax.jit\ndef f(x):\n  y = x + 1\n  jax.debug.print(\"intermediate value: {}\", y)\n  return y * 2\n\nresult = f(2)\n```\n\nExample:\n```text\nintermediate value: 3\n```\n\nExample:\n```text\nimport jax\nimport jax.numpy as jnp\nimport numpy as np\n\ndef f_host(x):\n  # call a numpy (not jax.numpy) operation:\n  return np.sin(x).astype(x.dtype)\n\ndef f(x):\n  result_shape = jax.ShapeDtypeStruct.like(x)\n  return jax.pure_callback(f_host, result_shape, x, vmap_method='sequential')\n\nx = jnp.arange(5.0)\nf(x)\n```\n\nExample:\n```text\nArray([ 0.       ,  0.841471 ,  0.9092974,  0.14112  , -0.7568025],      dtype=float32)\n```\n\nExample:\n```text\njax.jit(f)(x)\n```\n\nExample:\n```text\ndef body_fun(_, x):\n  return _, f(x)\njax.lax.scan(body_fun, None, jnp.arange(5.0))[1]\n```\n\nExample:\n```text\njax.vmap(f)(x)\n```\n\nExample:\n```text\njax.grad(f)(x)\n```\n\nExample:\n```text\nValueError: Pure callbacks do not support JVP. Please use `jax.custom_jvp` to use callbacks while taking gradients.\n```\n\nExample:\n```text\ndef print_something():\n  print('printing something')\n  return np.int32(0)\n\n@jax.jit\ndef f1():\n  return jax.pure_callback(print_something, np.int32(0))\nf1();\n```\n\nExample:\n```text\nprinting something\n```\n\nExample:\n```text\n@jax.jit\ndef f2():\n  jax.pure_callback(print_something, np.int32(0))\n  return 1.0\nf2();\n```\n\nExample:\n```text\nimport jax\nimport jax.numpy as jnp\n\ndef raise_via_callback(x):\n  def _raise(x):\n    raise ValueError(f\"value of x is {x}\")\n  return jax.pure_callback(_raise, x, x)\n\ndef raise_if_negative(x):\n  return jax.lax.cond(x < 0, raise_via_callback, lambda x: x, x)\n\nx_batch = jnp.arange(4)\n\n[raise_if_negative(x) for x in x_batch]  # does not raise\n\njax.vmap(raise_if_negative)(x_batch)  # ValueError: value of x is 0\n```\n\nExample:\n```text\nfrom jax.experimental import io_callback\nfrom functools import partial\n\nglobal_rng = np.random.default_rng(0)\n\ndef host_side_random_like(x):\n  \"\"\"Generate a random array like x using the global_rng state\"\"\"\n  # We have two side-effects here:\n  # - printing the shape and dtype\n  # - calling global_rng, thus updating its state\n  print(f'generating {x.dtype}{list(x.shape)}')\n  return global_rng.uniform(size=x.shape).astype(x.dtype)\n\n@jax.jit\ndef numpy_random_like(x):\n  return io_callback(host_side_random_like, x, x)\n\nx = jnp.zeros(5)\nnumpy_random_like(x)\n```\n\nExample:\n```text\ngenerating float32[5]\n```\n\nExample:\n```text\nArray([0.6369617 , 0.26978672, 0.04097353, 0.01652764, 0.8132702 ],      dtype=float32)\n```\n\nExample:\n```text\njax.vmap(numpy_random_like)(x)\n```\n\nExample:\n```text\ngenerating float32[]\ngenerating float32[]\ngenerating float32[]\ngenerating float32[]\ngenerating float32[]\n```\n\nExample:\n```text\nArray([0.91275555, 0.60663575, 0.72949654, 0.543625  , 0.9350724 ],      dtype=float32)\n```\n\nExample:\n```text\n@jax.jit\ndef numpy_random_like_ordered(x):\n  return io_callback(host_side_random_like, x, x, ordered=True)\n\njax.vmap(numpy_random_like_ordered)(x)\n```\n\nExample:\n```text\nValueError: Cannot `vmap` ordered IO callback.\n```\n\nExample:\n```text\ndef body_fun(_, x):\n  return _, numpy_random_like_ordered(x)\njax.lax.scan(body_fun, None, jnp.arange(5.0))[1]\n```\n\nExample:\n```text\nArray([0.81585354, 0.0027385 , 0.8574043 , 0.03358557, 0.72965544],      dtype=float32)\n```\n\nExample:\n```text\njax.grad(numpy_random_like)(x)\n```\n\nExample:\n```text\nValueError: IO callbacks do not support JVP.\n```\n\nExample:\n```text\n@jax.jit\ndef f(x):\n  io_callback(lambda: print('hello'), None)\n  return x\n\njax.grad(f)(1.0);\n```\n\nExample:\n```text\nhello\n```\n\nExample:\n```text\nfrom jax import debug\n\ndef log_value(x):\n  # This could be an actual logging call; we'll use\n  # print() for demonstration\n  print(\"log:\", x)\n\n@jax.jit\ndef f(x):\n  debug.callback(log_value, x)\n  return x\n\nf(1.0);\n```\n\nExample:\n```text\nlog: 1.0\n```\n\nExample:\n```text\nx = jnp.arange(5.0)\njax.vmap(f)(x);\n```\n\nExample:\n```text\nlog: 0.0\nlog: 1.0\nlog: 2.0\nlog: 3.0\nlog: 4.0\n```\n\nExample:\n```text\njax.grad(f)(1.0);\n```\n\nExample:\n```text\nimport jax\nimport jax.numpy as jnp\nimport scipy.special\n\ndef jv(v, z):\n  v, z = jnp.asarray(v), jnp.asarray(z)\n\n  # Require the order v to be integer type: this simplifies\n  # the JVP rule below.\n  assert jnp.issubdtype(v.dtype, jnp.integer)\n\n  # Promote the input to inexact (float/complex).\n  # Note that jnp.result_type() accounts for the enable_x64 flag.\n  z = z.astype(jnp.result_type(float, z.dtype))\n\n  # Wrap scipy function to return the expected dtype.\n  _scipy_jv = lambda v, z: scipy.special.jv(v, z).astype(z.dtype)\n\n  # Define the expected shape & dtype of output.\n  result_shape_dtype = jax.ShapeDtypeStruct(\n      shape=jnp.broadcast_shapes(v.shape, z.shape),\n      dtype=z.dtype)\n\n  # Use vmap_method=\"broadcast_all\" because scipy.special.jv handles broadcasted inputs.\n  return jax.pure_callback(_scipy_jv, result_shape_dtype, v, z, vmap_method=\"broadcast_all\")\n```\n\nExample:\n```text\nfrom functools import partial\nj1 = partial(jv, 1)\nz = jnp.arange(5.0)\n```\n\nExample:\n```text\nprint(j1(z))\n```\n\nExample:\n```text\n[ 0.          0.44005057  0.5767248   0.33905897 -0.06604332]\n```\n\nExample:\n```text\nprint(jax.jit(j1)(z))\n```\n\nExample:\n```text\nprint(jax.vmap(j1)(z))\n```\n\nExample:\n```text\njax.grad(j1)(z)\n```\n\nExample:\n```text\njv = jax.custom_jvp(jv)\n\n@jv.defjvp\ndef _jv_jvp(primals, tangents):\n  v, z = primals\n  _, z_dot = tangents  # Note: v_dot is always 0 because v is integer.\n  jv_minus_1, jv_plus_1 = jv(v - 1, z), jv(v + 1, z)\n  djv_dz = jnp.where(v == 0, -jv_plus_1, 0.5 * (jv_minus_1 - jv_plus_1))\n  return jv(v, z), z_dot * djv_dz\n```\n\nExample:\n```text\nj1 = partial(jv, 1)\nprint(jax.grad(j1)(2.0))\n```\n\nExample:\n```text\n-0.06447162\n```\n\nExample:\n```text\njax.hessian(j1)(2.0)\n```\n\nExample:\n```text\nArray(-0.4003078, dtype=float32, weak_type=True)\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:14.817Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":46,"totalLines":371,"estimatedTokens":1484}}106{"id":"doc-google_chat_api_client_libraries_google_for_deve-6243d654","source":"documentation","title":"Google Chat API client libraries | Google for Developers","url":"https://developers.google.com/workspace/chat/libraries","text":"Example:\n```text\nnpm install @google-apps/chat\n```\n\nExample:\n```text\npython -m venv <your-env>source <your-env>/bin/activatepip install google-apps-chat\n```\n\nExample:\n```text\n<dependencyManagement>\n    <dependencies>\n      <dependency>\n        <groupId>com.google.cloud</groupId>\n        <artifactId>libraries-bom</artifactId>\n        <version>26.42.0</version>\n        <type>pom</type>\n        <scope>import</scope>\n      </dependency>\n    </dependencies>\n  </dependencyManagement>\n\n  <dependencies>\n    <dependency>\n      <groupId>com.google.cloud</groupId>\n      <artifactId>google-cloud-chat</artifactId>\n    </dependency>\n```\n\nExample:\n```text\n<dependency>\n  <groupId>com.google.cloud</groupId>\n  <artifactId>google-cloud-chat</artifactId>\n  <version>0.10.0</version>\n</dependency>\n```\n\nExample:\n```text\n<dependency>\n  <groupId>com.google.cloud</groupId>\n  <artifactId>google-cloud-chat</artifactId>\n  <version>0.9.0</version>\n</dependency>\n```\n\nExample:\n```text\nimplementation 'com.google.cloud:google-cloud-chat:0.10.0'\n```\n\nExample:\n```text\nlibraryDependencies += \"com.google.cloud\" % \"google-cloud-chat\" % \"0.10.0\"\n```\n\nExample:\n```text\nimport \"cloud.google.com/go\"\n```\n\nExample:\n```text\ngo get cloud.google.com/go/chat\n```\n\nExample:\n```text\ngem install google-apps-chat\n```\n\nExample:\n```text\ncomposer require google/apps-chat\n```\n\nExample:\n```text\npip install --upgrade google-api-python-client\n```\n\nExample:\n```text\neasy_install --upgrade google-api-python-client\n```\n\nExample:\n```text\npython setup.py install\n```\n\nExample:\n```text\ngem install google-api-client\n```\n\nExample:\n```text\ngem update -y google-api-client\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:55.722Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":16,"totalLines":105,"estimatedTokens":411}}107{"id":"doc-class_debugerror_apps_script_google_for_develope-729a7b73","source":"documentation","title":"Class DebugError | Apps Script | Google for Developers","url":"https://developers.google.com/apps-script/reference/data-studio/debug-error","text":"Example:\n```text\nconst cc = DataStudioApp.createCommunityConnector();\n\ncc.newDebugError().setText('This is the debug error text.').throwException();\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:56.094Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":1,"totalLines":8,"estimatedTokens":42}}108{"id":"doc-npm_prefix_npm_docs-2a9e6464","source":"documentation","title":"npm-prefix | npm Docs","url":"https://docs.npmjs.com/cli/v12/commands/npm-prefix","text":"Example:\n```bash\nnpm prefix\n```\n\nExample:\n```bash\nnpm prefix/usr/local/projects/foo\n```\n\nExample:\n```bash\nnpm prefix -g/usr/local\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:19.388Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":3,"totalLines":16,"estimatedTokens":37}}109{"id":"doc-npm_stage_npm_docs-67558392","source":"documentation","title":"npm-stage | npm Docs","url":"https://docs.npmjs.com/cli/v12/commands/npm-stage","text":"Example:\n```bash\nnpm stage\n```\n\nExample:\n```bash\nnpm stage publish <package-spec>\n```\n\nExample:\n```bash\nnpm stage list [<package-spec>]\n```\n\nExample:\n```bash\nnpm stage view <stage-id>\n```\n\nExample:\n```bash\nnpm stage approve <stage-id>\n```\n\nExample:\n```bash\nnpm stage reject <stage-id>\n```\n\nExample:\n```bash\nnpm stage download <stage-id>\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:19.390Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":7,"totalLines":36,"estimatedTokens":89}}110{"id":"doc-npm_explain_npm_docs-609197f3","source":"documentation","title":"npm-explain | npm Docs","url":"https://docs.npmjs.com/cli/v12/commands/npm-explain","text":"Example:\n```bash\nnpm explain <package-spec>\nalias: why\n```\n\nExample:\n```bash\nglob@7.1.6node_modules/glob  glob@\"^7.1.4\" from the root project\nglob@7.1.1 devnode_modules/tacks/node_modules/glob  glob@\"^7.0.5\" from rimraf@2.6.2  node_modules/tacks/node_modules/rimraf    rimraf@\"^2.6.2\" from tacks@1.3.0    node_modules/tacks      dev tacks@\"^1.3.0\" from the root project\n```\n\nExample:\n```bash\n$ npm explain node_modules/nyc/node_modules/find-upfind-up@3.0.0 devnode_modules/nyc/node_modules/find-up  find-up@\"^3.0.0\" from nyc@14.1.1  node_modules/nyc    nyc@\"^14.1.1\" from tap@14.10.8    node_modules/tap      dev tap@\"^14.10.8\" from the root project\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:19.398Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":3,"totalLines":18,"estimatedTokens":167}}111{"id":"doc-list_to_map_processor_opensearch_documentation-fcf651bc","source":"documentation","title":"List to map processor | OpenSearch Documentation","url":"https://docs.opensearch.org/latest/data-prepper/pipelines/configuration/processors/list-to-map/","text":"OpenSearch Menu About Releases Roadmap FAQ Platform Search Observability Security Analytics Vector Database Playground Demo Performance Benchmarks Community Forum Slack Events Solutions Providers Projects Members Documentation OpenSearch and Dashboards Data Prepper Clients Benchmark Migration Assistant Blog Download\n\nOpenSearch Links Get Involved Code of Conduct Forum GitHub Slack Resources About Release Schedule Maintenance Policy FAQ Testimonials Trademark and Brand Policy Privacy Contact Us Connect Twitter LinkedIn YouTube Meetup Facebook Copyright © OpenSearch Project a Series of LF Projects, LLC For web site terms of use, trademark policy and other project policies please see https://lfprojects.org.\n\nExample:\n```text\n{\"mylist\":[{\"name\":\"a\",\"value\":\"val-a\"},{\"name\":\"b\",\"value\":\"val-b1\"},{\"name\":\"b\",  \"value\":\"val-b2\"},{\"name\":\"c\",\"value\":\"val-c\"}]}\n```\n\nExample:\n```text\npipeline:\n  source:\n    file:\n      path: \"/full/path/to/logs_json.log\"\n      record_type: \"event\"\n      format: \"json\"\n  processor:\n    - list_to_map:\n        key: \"name\"\n        source: \"mylist\"\n        value_key: \"value\"\n        flatten: true\n  sink:\n    - stdout:\n```\n\nExample:\n```text\n{\n  \"mylist\": [\n    {\n      \"name\": \"a\",\n      \"value\": \"val-a\"\n    },\n    {\n      \"name\": \"b\",\n      \"value\": \"val-b1\"\n    },\n    {\n      \"name\": \"b\",\n      \"value\": \"val-b2\"\n    },\n    {\n      \"name\": \"c\",\n      \"value\": \"val-c\"\n    }\n  ],\n  \"a\": \"val-a\",\n  \"b\": \"val-b1\",\n  \"c\": \"val-c\"\n}\n```\n\nExample:\n```text\npipeline:\n  source:\n    file:\n      path: \"/full/path/to/logs_json.log\"\n      record_type: \"event\"\n      format: \"json\"\n  processor:\n    - list_to_map:\n        key: \"name\"\n        source: \"mylist\"\n        target: \"mymap\"\n        value_key: \"value\"\n        flatten: true\n  sink:\n    - stdout:\n```\n\nExample:\n```text\n{\n  \"mylist\": [\n    {\n      \"name\": \"a\",\n      \"value\": \"val-a\"\n    },\n    {\n      \"name\": \"b\",\n      \"value\": \"val-b1\"\n    },\n    {\n      \"name\": \"b\",\n      \"value\": \"val-b2\"\n    },\n    {\n      \"name\": \"c\",\n      \"value\": \"val-c\"\n    }\n  ],\n  \"mymap\": {\n    \"a\": \"val-a\",\n    \"b\": \"val-b1\",\n    \"c\": \"val-c\"\n  }\n}\n```\n\nExample:\n```text\npipeline:\n  source:\n    file:\n      path: \"/full/path/to/logs_json.log\"\n      record_type: \"event\"\n      format: \"json\"\n  processor:\n    - list_to_map:\n        key: \"name\"\n        source: \"mylist\"\n        flatten: true\n  sink:\n    - stdout:\n```\n\nExample:\n```text\n{\n  \"mylist\": [\n    {\n      \"name\": \"a\",\n      \"value\": \"val-a\"\n    },\n    {\n      \"name\": \"b\",\n      \"value\": \"val-b1\"\n    },\n    {\n      \"name\": \"b\",\n      \"value\": \"val-b2\"\n    },\n    {\n      \"name\": \"c\",\n      \"value\": \"val-c\"\n    }\n  ],\n  \"a\": {\n    \"name\": \"a\",\n    \"value\": \"val-a\"\n  },\n  \"b\": {\n    \"name\": \"b\",\n    \"value\": \"val-b1\"\n  },\n  \"c\": {\n    \"name\": \"c\",\n    \"value\": \"val-c\"\n  }\n}\n```\n\nExample:\n```text\npipeline:\n  source:\n    file:\n      path: \"/full/path/to/logs_json.log\"\n      record_type: \"event\"\n      format: \"json\"\n  processor:\n    - list_to_map:\n        key: \"name\"\n        source: \"mylist\"\n        target: \"mymap\"\n        value_key: \"value\"\n        flatten: true\n        flattened_element: \"last\"\n  sink:\n    - stdout:\n```\n\nExample:\n```text\n{\n  \"mylist\": [\n    {\n      \"name\": \"a\",\n      \"value\": \"val-a\"\n    },\n    {\n      \"name\": \"b\",\n      \"value\": \"val-b1\"\n    },\n    {\n      \"name\": \"b\",\n      \"value\": \"val-b2\"\n    },\n    {\n      \"name\": \"c\",\n      \"value\": \"val-c\"\n    }\n  ],\n  \"a\": \"val-a\",\n  \"b\": \"val-b2\",\n  \"c\": \"val-c\"\n}\n```\n\nExample:\n```text\npipeline:\n  source:\n    file:\n      path: \"/full/path/to/logs_json.log\"\n      record_type: \"event\"\n      format: \"json\"\n  processor:\n    - list_to_map:\n        key: \"name\"\n        source: \"mylist\"\n        target: \"mymap\"\n        value_key: \"value\"\n        flatten: false\n  sink:\n    - stdout:\n```\n\nExample:\n```text\n{\n  \"mylist\": [\n    {\n      \"name\": \"a\",\n      \"value\": \"val-a\"\n    },\n    {\n      \"name\": \"b\",\n      \"value\": \"val-b1\"\n    },\n    {\n      \"name\": \"b\",\n      \"value\": \"val-b2\"\n    },\n    {\n      \"name\": \"c\",\n      \"value\": \"val-c\"\n    }\n  ],\n  \"a\": [\n    \"val-a\"\n  ],\n  \"b\": [\n    \"val-b1\",\n    \"val-b2\"\n  ],\n  \"c\": [\n    \"val-c\"\n  ]\n}\n```\n\nExample:\n```text\npipeline:\n  source:\n    file:\n      path: \"/full/path/to/logs_json.log\"\n      record_type: \"event\"\n      format: \"json\"\n  processor:\n    - list_to_map:\n        source: \"mylist\"\n        use_source_key: true\n        extract_value: true\n  sink:\n    - stdout:\n```\n\nExample:\n```text\n{\n  \"mylist\": [\n    {\n      \"name\": \"a\",\n      \"value\": \"val-a\"\n    },\n    {\n      \"name\": \"b\",\n      \"value\": \"val-b1\"\n    },\n    {\n      \"name\": \"b\",\n      \"value\": \"val-b2\"\n    },\n    {\n      \"name\": \"c\",\n      \"value\": \"val-c\"\n    }\n  ],\n  \"name\": [\"a\", \"b\", \"b\", \"c\"],\n  \"value\": [\"val-a\", \"val-b1\", \"val-b2\", \"val-c\"]\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:22.227Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":13,"totalLines":299,"estimatedTokens":1196}}112{"id":"doc-model_access_control_opensearch_documentation-9fafc101","source":"documentation","title":"Model access control | OpenSearch Documentation","url":"https://docs.opensearch.org/latest/ml-commons-plugin/model-access-control/","text":"OpenSearch Menu About Releases Roadmap FAQ Platform Search Observability Security Analytics Vector Database Playground Demo Performance Benchmarks Community Forum Slack Events Solutions Providers Projects Members Documentation OpenSearch and Dashboards Data Prepper Clients Benchmark Migration Assistant Blog Download\n\nOpenSearch Links Get Involved Code of Conduct Forum GitHub Slack Resources About Release Schedule Maintenance Policy FAQ Testimonials Trademark and Brand Policy Privacy Contact Us Connect Twitter LinkedIn YouTube Meetup Facebook Copyright © OpenSearch Project a Series of LF Projects, LLC For web site terms of use, trademark policy and other project policies please see https://lfprojects.org.\n\nExample:\n```text\nPUT _plugins/_security/api/internalusers/alice\n{\n  \"password\": \"alice\",\n  \"backend_roles\": [\n    \"analyst\"\n  ],\n  \"attributes\": {}\n}\n```\n\nExample:\n```text\nPUT _plugins/_security/api/internalusers/bob\n{\n  \"password\": \"bob\",\n  \"backend_roles\": [\n    \"human-resources\"\n  ],\n  \"attributes\": {}\n}\n```\n\nExample:\n```text\nPUT _plugins/_security/api/rolesmapping/ml_full_access\n{\n  \"backend_roles\": [],\n  \"hosts\": [],\n  \"users\": [\n    \"alice\",\n    \"bob\"\n  ]\n}\n```\n\nExample:\n```text\nPUT _cluster/settings\n{\n  \"transient\": {\n    \"plugins.ml_commons.model_access_control_enabled\": \"true\"\n  }\n}\n```\n\nExample:\n```text\ncurl -k --cert ./kirk.pem --key ./kirk-key.pem -XGET 'https://localhost:9200/.opendistro_security/_search'\n```\n\nExample:\n```text\ncurl -k --cert ./kirk.pem --key ./kirk-key.pem -X POST 'https://localhost:9200/_plugins/_ml/models/_register' -H 'Content-Type: application/json' -d '\n{\n    \"name\": \"OPENSEARCH_ASSISTANT_MODEL\",\n    \"function_name\": \"remote\",\n    \"description\": \"OpenSearch Assistant Model\",\n    \"connector\": {\n        \"name\": \"Bedrock Claude Connector\",\n        \"description\": \"The connector to Bedrock Claude\",\n        \"version\": 1,\n        \"protocol\": \"aws_sigv4\",\n        \"parameters\": {\n          \"region\": \"us-east-1\",\n          \"service_name\": \"bedrock\"\n        },\n        \"credential\": {\n            \"access_key\": \"<YOUR_ACCESS_KEY>\",\n            \"secret_key\": \"<YOUR_SECRET_KEY>\",\n            \"session_token\": \"<YOUR_SESSION_TOKEN>\"\n        },\n        \"actions\": [\n           {\n            \"action_type\": \"predict\",\n            \"method\": \"POST\",\n            \"headers\": {\n                \"content-type\": \"application/json\"\n            },\n            \"url\": \"https://bedrock-runtime.us-east-1.amazonaws.com/model/anthropic.claude-v2/invoke\",\n            \"request_body\": \"{\\\"prompt\\\":\\\"\\\\n\\\\nHuman: ${parameters.inputs}\\\\n\\\\nAssistant:\\\",\\\"max_tokens_to_sample\\\":300,\\\"temperature\\\":0.5,\\\"top_k\\\":250,\\\"top_p\\\":1,\\\"stop_sequences\\\":[\\\"\\\\\\\\n\\\\\\\\nHuman:\\\"]}\"\n          }\n       ]\n    }\n}'\n```\n\nExample:\n```text\ncurl -k --cert ./kirk.pem --key ./kirk-key.pem -X POST 'https://localhost:9200/_plugins/_ml/models/q7wLt4sBaDRBsUkl9BJV/_deploy'\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:22.228Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":7,"totalLines":98,"estimatedTokens":728}}113{"id":"doc-tutorials_secure_your_application_and_check_comp-4ab6482e","source":"documentation","title":"Tutorials: Secure your application and check compliance | GitLab Docs","url":"https://docs.gitlab.com/tutorials/secure_application/","text":"Getting startedTutorialsManage your organizationOrganize work with projectsPlan and track workManage authentication and authorizationUse GitManage your codeUse CI/CD to build your applicationSecure your applicationGetting startedTutorialsApplication securityComplianceDetectTriageAnalyzeRemediateGitLab advisory databaseCVE ID requestsPoliciesSecurity glossaryDeploy and release your applicationManage your infrastructureMonitor your applicationAnalyze GitLab usageRelease notesFeature supportFind your GitLab versionGitLab Docs /Use GitLab /Secure your application /TutorialsHelp us learn about your current experience with the documentation. Take the survey.Tutorials: Secure your application and check complianceGitLab can check your application for security vulnerabilities and that it meets compliance requirements.Learn security fundamentalsStart here to understand the security basics at GitLab.TopicDescriptionGood for beginnersGitLab Security EssentialsLearn about the essential security capabilities of GitLab in this self-paced course. Estimated hours.Set up basic security detectionCreate fundamental scans to identify vulnerabilities.TopicDescriptionGood for beginnersSet up dependency scanningLearn how to detect vulnerabilities in an application’s dependencies. Estimated minutes.Set up dependency scanning using the SBOM methodLearn how to detect vulnerabilities in an application’s dependencies using the SBOM method. Estimated minutes.Scan a Docker container for vulnerabilitiesLearn how to use container scanning templates to add container scanning to your projects. Estimated minutes.A comprehensive guide to GitLab DASTLearn how to configure dynamic application security testing, perform scans, and implement security policies. Estimated minutes.Protect against secret exposurePrevent sensitive data from being committed to your repository.TopicDescriptionGood for beginnersProtect your project with secret push protectionEnable secret push protection in your project. Estimated minutes.Detect secrets committed to a projectLearn how to detect and remediate secrets committed to your project’s repository. Estimated minutes.Remove a secret from your commitsLearn how to remove a secret from your commit history. Estimated minutes.Implement security policies and governanceEnforce security requirements across your projects.TopicDescriptionGood for beginnersSet up a scan execution policyLearn how to create a scan execution policy to enforce security scanning of your project. Estimated minutes.Set up a pipeline execution policyLearn how to create a pipeline execution policy to enforce security scanning across projects as part of the pipeline. Estimated minutes.Set up a merge request approval policyLearn how to configure a merge request approval policy that takes action based on scan results. Estimated minutes.Establish compliance and reportingMeet regulatory requirements and generate compliance documentation.TopicDescriptionGood for beginnersGenerate a software bill of materials with GitLab package registryLearn how to generate an SBOM across all projects in a group. Estimated hour.Export dependency list in SBOM formatLearn how to export an application’s dependencies to the CycloneDX SBOM format. Estimated minutes.Learn security fundamentalsSet up basic security detectionProtect against secret exposureImplement security policies and governanceEstablish compliance and reporting\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:04.531Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":0,"totalLines":3,"estimatedTokens":858}}114{"id":"doc-customize_pipeline_configuration_gitlab_docs-995ba1e4","source":"documentation","title":"Customize pipeline configuration | GitLab Docs","url":"https://docs.gitlab.com/ci/pipelines/settings/","text":"Getting startedTutorialsManage your organizationOrganize work with projectsPlan and track workManage authentication and authorizationUse GitManage your codeUse CI/CD to build your applicationGetting startedTutorialsCI/CD YAML syntax referenceRunnersPipelinesTypes of pipelinesScheduled pipelinesTrigger a pipelineExternal commit statusesCustomize pipeline configurationPipeline architecturesPipeline efficiencyCompute minutesPipeline resource groupsDownstream pipelinesJobsCI/CD componentsCI/CD inputsCI/CD variablesPipeline securityGitLab Secrets ManagerExternal secretsDebuggingAuto DevOpsTestingCI/CD sustainabilityGoogle Cloud integrationMigrate to GitLab CI/CDExternal repository integrationsMobile DevOpsSecure your applicationDeploy and release your applicationManage your infrastructureMonitor your applicationAnalyze GitLab usageRelease notesFeature supportFind your GitLab versionGitLab Docs /Use GitLab /Use CI/CD to build your … /Pipelines /Customize pipeline configurationHelp us learn about your current experience with the documentation. Take the survey.Customize pipeline , Premium, , GitLab Self-Managed, GitLab DedicatedYou can customize how pipelines run for your project.Change which users can view your pipelinesFor public and internal projects, you can change who can see output logsJob artifactsPipeline security resultsTo change the visibility of your pipelines and related the top bar, select Search or go to and find your project.In the left sidebar, select Settings > CI/CD.Expand General pipelines.Select or clear the Project-based pipeline visibility checkbox. When it is selected, pipelines and related features are Public projects, to everyone.For Internal projects, to all authenticated users except external users.For Private projects, to all project members (Guest or higher).When it is Public projects, job logs, job artifacts, the pipeline security dashboard, and the CI/CD menu items are visible only to project members (Reporter or higher). Other users, including guest users, can only view the status of pipelines and jobs, and only when viewing merge requests or commits.For Internal projects, pipelines are visible to all authenticated users except external users. Related features are visible only to project members (Reporter or higher).For Private projects, pipelines and related features are visible to project members (Reporter or higher) only.Change pipeline visibility for non-project members in public projectsYou can control the visibility of pipelines for non-project members in public projects.This setting has no effect visibility is set to Internal or Private, because non-project members cannot access internal or private projects.The Project-based pipeline visibility setting is disabled.To change the pipeline visibility for non-project the top bar, select Search or go to and find your project.In the left sidebar, select Settings > General.Expand Visibility, project features, permissions.For CI/CD, project project members can view pipelines.Everyone With members can also view pipelines.Select Save changes.The CI/CD permissions table lists the pipeline features non-project members can access when Everyone With Access is selected.Auto-cancel redundant pipelinesYou can set pending or running pipelines to cancel automatically when a pipeline for new changes runs on the same branch. You can enable this in the project the top bar, select Search or go to and find your project.In the left sidebar, select Settings > CI/CD.Expand General Pipelines.Select the Auto-cancel redundant pipelines checkbox.Select Save changes.Use the interruptible keyword to indicate if a running job can be canceled before it completes. After a job with starts, the entire pipeline is no longer considered interruptible.Skip branch pipelines for merge as a beta in GitLab 19.2.This feature is in beta.When you push to a branch with an open merge request, GitLab tries to create both a branch pipeline and a merge request pipeline by default. This can waste CI/CD resources and cause confusion about which pipeline determines merge readiness. For more information about this problem, see avoid duplicate pipelines.To create only a merge request pipeline when pushing to a branch with an open merge the top bar, select Search or go to and find your project.In the left sidebar, select Settings > CI/CD.Expand General pipelines.Select the Skip branch pipelines for merge requests checkbox.Select Save changes.When this setting is does not try to create a branch pipeline when you git push to a branch that is the source branch of a merge request. GitLab only tries to create a merge request pipeline.If the branch is not the source branch of an open or previously closed merge request, then GitLab does try to create a branch pipeline.On the first push that creates a merge request, a branch pipeline is still created because the pipeline starts before the merge request is created. Starting from the next push, branch pipelines are skipped.Mergeability checks, like Pipelines must succeed, only consider merge request pipelines. Branch pipelines do not affect merge readiness.Jobs without explicit rules, only, or except sections are automatically included in merge request pipelines. The implicit only: [branches, tags] default is removed for these jobs.Only push-triggered pipelines are affected. All other pipeline types, including manual, API, scheduled, and triggered pipelines are not affected.If you configure your pipeline or jobs to run only branch pipelines, enabling this setting can cause no pipelines to run for your merge requests.Prevent outdated deployment jobsYour project may have multiple concurrent deployment jobs that are scheduled to run in the same time frame.This can lead to a situation where an older deployment job runs after a newer one, which may not be what you want.To avoid this the top bar, select Search or go to and find your project.In the left sidebar, select Settings > CI/CD.Expand General pipelines.Select the Prevent outdated deployment jobs checkbox.Optional. Clear the Allow job retries for rollback deployments checkbox.Select Save changes.For more information, see Deployment safety.Restrict roles that can cancel pipelines or , , GitLab Self-Managed, GitLab DedicatedYou can customize which roles have permission to cancel pipelines or jobs.By default, users with the Developer, Maintainer, or Owner role can cancel pipelines or jobs. You can restrict cancellation permission to only users with the Maintainer or Owner role, or completely prevent cancellation of any pipelines or jobs.To change the permissions to cancel pipelines or the top bar, select Search or go to and find your project.In the left sidebar, select Settings > CI/CD.Expand General pipelines.Select an option from Minimum role required to cancel a pipeline or job.Select Save changes.Specify a custom CI/CD configuration fileGitLab expects to find the CI/CD configuration file (.gitlab-ci.yml) in the project’s root directory. However, you can specify an alternate filename path, including locations outside the project.To customize the the top bar, select Search or go to and find your project.In the left sidebar, select Settings > CI/CD.Expand General pipelines.In the CI/CD configuration file field, enter the filename. If the not in the root directory, include the path.Is in a different project, include the group and project name.Is on an external site, enter the full URL.Select Save changes.You cannot use your project’s pipeline editor to edit CI/CD configuration files in other projects or on an external site.Custom CI/CD configuration file examplesIf the CI/CD configuration file is not in the root directory, the path must be relative to it. For /path/.gitlab-ci.ymlmy/path/.my-custom-file.ymlIf the CI/CD configuration file is on an external site, the URL must end with .yml:http://example.com/generate/ci/config.ymlIf the CI/CD configuration file is in a different file must exist on its default branch, or specify the branch as refname.The path must be relative to the root directory in the other project.The path must be followed by an @ symbol and the full group and project path.For @namespace/another-projectmy/path/.my-custom-file.yml@namespace/subgroup/another-projectmy/path/.my-custom-file.yml@namespace/subgroup1/subgroup2/another-project:refnameIf the configuration file is in a separate project, you can set more granular permissions. For a public project to host the configuration file.Give write permissions on the project only to users who are allowed to edit the file.Then other users and projects can access, but not edit, the configuration file.Choose the default Git strategyYou can choose how your repository is fetched from GitLab when a job runs.In the top bar, select Search or go to and find your project.In the left sidebar, select Settings > CI/CD.Expand General pipelines.Under Git strategy, select an clone is slower because it clones the repository from scratch for every job. However, the local working copy is always pristine.git fetch is faster because it re-uses the local working copy (and falls back to clone if it doesn’t exist). Use this command, especially for large repositories.The configured Git strategy can be overridden by the GIT_STRATEGY variable in the .gitlab-ci.yml file.Limit the number of changes fetched during cloneYou can limit the number of changes that GitLab CI/CD fetches when it clones a repository.In the top bar, select Search or go to and find your project.In the left sidebar, select Settings > CI/CD.Expand General pipelines.Under Git strategy, under Git shallow clone, enter a value. The maximum value is 1000. To disable shallow clone and make GitLab CI/CD fetch all branches and tags each time, keep the value empty or set to 0.Newly created projects have a default git depth value of 20.This value can be overridden by the GIT_DEPTH variable in the .gitlab-ci.yml file.Set a limit for how long jobs can runYou can define how long a job can run before it times out.In the top bar, select Search or go to and find your project.In the left sidebar, select Settings > CI/CD.Expand General pipelines.In the Timeout field, enter the number of minutes, or a human-readable value like 2 hours. Must be 10 minutes or more, and less than one month. Default is 60 minutes. Pending jobs are dropped after 24 hours of inactivity.Jobs that exceed the timeout are marked as failed.When both a project timeout and a runner timeout are set, the lower value takes precedence.Jobs without an output for one hour are dropped regardless of the timeout. To prevent this from happening, add a script to continuously output progress. For more information, see issue 25359.Pipeline badgesYou can use pipeline badges to indicate the pipeline status and test coverage of your projects. These badges are determined by the latest successful pipeline.Disable GitLab CI/CD pipelinesGitLab CI/CD pipelines are enabled by default on all new projects. If you use an external CI/CD server like Jenkins or Drone CI, you can disable GitLab CI/CD to avoid conflicts with the commits status API.You can disable GitLab CI/CD per project or for all new projects on an instance.When you disable GitLab CI/CD:The CI/CD item in the left sidebar is removed.The /pipelines and /jobs pages are no longer available.Existing jobs and pipelines are hidden, not removed.To disable GitLab CI/CD in your the top bar, select Search or go to and find your project.In the left sidebar, select Settings > General.Expand Visibility, project features, permissions.In the Repository section, turn off CI/CD.Select Save changes.These changes do not apply to projects in an external integration.Automatic pipeline , Premium, , GitLab Self-Managed, GitLab DedicatedHistoryIntroduced in GitLab 17.7 with a feature flag named ci_delete_old_pipelines. Disabled by default.Feature flag ci_delete_old_pipelines removed in GitLab 17.9.Set a retention period to help manage pipeline storage and improve system performance. Pipelines older than the configured duration are deleted automatically by a background job. Cleanup runs periodically in the background, not immediately when a pipeline becomes eligible. Projects with a large backlog of old pipelines are cleaned up gradually over multiple runs.When a pipeline is deleted, its jobs, job logs, and artifacts are also permanently deleted. All pipelines older than the configured retention period are eligible for deletion, regardless of their status or whether they are the most recent pipeline for a given branch or tag.Prerequisites:The Owner role for the project.To configure automatic pipeline the top bar, select Search or go to and find your project.In the left sidebar, select Settings > CI/CD.Expand General pipelines.In the Automatic pipeline cleanup field, enter a duration, for example 2 weeks or 30 days. The value must be at least one day, and no more than the instance maximum (1 year by default). Leave empty to never delete pipelines automatically.Select Save changes.For GitLab Self-Managed, administrators can increase the upper limit for automatic pipeline cleanup.Change which users can view your pipelinesChange pipeline visibility for non-project members in public projectsAuto-cancel redundant pipelinesSkip branch pipelines for merge requestsPrevent outdated deployment jobsRestrict roles that can cancel pipelines or jobsSpecify a custom CI/CD configuration fileCustom CI/CD configuration file examplesChoose the default Git strategyLimit the number of changes fetched during cloneSet a limit for how long jobs can runPipeline badgesDisable GitLab CI/CD pipelinesAutomatic pipeline cleanup\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:04.565Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":0,"totalLines":3,"estimatedTokens":3413}}115{"id":"doc-ci_cd_limits_gitlab_docs-7857a526","source":"documentation","title":"CI/CD limits | GitLab Docs","url":"https://docs.gitlab.com/administration/cicd/limits/","text":"Getting startedConfigure GitLabAdmin areaGitLab Relay (KAS)Application cache intervalCellsCI/CDCI/CD limitsCompute minutesJob artifactsJob logsSecure filesExternal pipeline validationMaintenance console commandsClickHouse for analyticsConsulCronCustom HTML header tagsEnvironment variablesFile hooksGeoDisaster recovery (Geo)Geo sitesGit LFS administrationGit protocol v2Health checkHost the product documentationIncoming emailInstance limitsInstance reviewInvalidate Markdown cacheIssue closing patternLabelsLoad balancerLog systemMerge request approvalsMerge request diffs storageNFSObject storagePackagesPostfixPostgreSQLRedisReply by emailRepository storageSecrets ManagerServer hooksSidekiqSnippetsS/MIME signingStatic objects external storageTerraform stateTerraform state settingsTimezoneUploadsWeb terminalsWhat's newWikisConfigure GitLab DuoUpdate your settingsEnable features behind feature flagsMaintain GitLabMonitor GitLabSecure GitLabAdminister usersAdminister GitLab DedicatedAdminister GitLab RunnerGitLab Docs /Administer /Configure GitLab /CI/CD /CI/CD limitsHelp us learn about your current experience with the documentation. Take the survey.CI/CD Self-Managed, GitLab DedicatedYou can manage many CI/CD-related instance limits through the admin area. The other limits can only be changed by modifying the instance configuration through the GitLab Rails console.GitLab.com might have different values than the defaults for GitLab Self-Managed. Review the CI/CD limits and settings for GitLab.com.Instance CI/CD variable limitHistoryIntroduced in GitLab 17.1.The number of CI/CD variables that can be defined in instance settings is limited. This limit is checked each time a new variable is created. If a new variable would cause the total number of variables to exceed the limit, the new variable is not created.To configure this the upper-right corner, select Admin.In the left sidebar, select Settings > CI/CD.Expand Continuous Integration and Deployment.Under CI/CD limits, set a value for Maximum number of Instance-level CI/CD variables that can be defined. The default is 25.Select Save changes.Limit dotenv file sizeHistoryIntroduced in GitLab 17.1.You can set a limit on the maximum size of a dotenv artifact. This limit is checked every time a dotenv file is exported as an artifact.To configure this the upper-right corner, select Admin.In the left sidebar, select Settings > CI/CD.Expand Continuous Integration and Deployment.Under CI/CD limits, set a value for Maximum size of a dotenv artifact in bytes.Select Save changes.Set the limit to 0 to disable it. Defaults to 5 KB.Limit dotenv variablesHistoryIntroduced in GitLab 17.1.You can set a limit on the maximum number of variables inside of a dotenv artifact. This limit is checked every time a dotenv file is exported as an artifact.To configure this the upper-right corner, select Admin.In the left sidebar, select Settings > CI/CD.Expand Continuous Integration and Deployment.Under CI/CD limits, set a value for Maximum number of variables in a dotenv artifact.Select Save changes.Set the limit to 0 to disable it. Defaults to 20.You can also set this limit by using the Plan limits API.Limit CycloneDX artifact sizeHistoryIntroduced in GitLab 19.3.You can set a limit on the maximum size of a CycloneDX SBOM artifact. This limit is checked every time a CycloneDX report is uploaded as an artifact.To configure this the upper-right corner, select Admin.In the left sidebar, select Settings > CI/CD.Expand Continuous Integration and Deployment.Under CI/CD limits, set a value for Maximum size of a CycloneDX artifact in MB.Select Save changes.Set the limit to 0 to use the maximum artifacts size instead. Defaults to 1 MB.Maximum number of jobs in a pipelineHistorySetting moved from GitLab Enterprise Edition to GitLab Community Edition in 17.6.You can limit the maximum number of jobs in a pipeline. The number of jobs in a pipeline is checked at pipeline creation and when new commit statuses are created. Pipelines that have too many jobs fail with a size_limit_exceeded error.To configure this the upper-right corner, select Admin.In the left sidebar, select Settings > CI/CD.Expand Continuous Integration and Deployment.Under CI/CD limits, set a value for Maximum number of jobs in a single pipeline.Select Save changes.Set the limit to 0 to disable it. Disabled by default.Number of jobs in active pipelinesThe total number of jobs in active pipelines can be limited per project. This limit is checked each time a new pipeline is created. An active pipeline is any pipeline in one of the following a new pipeline would cause the total number of jobs to exceed the limit, the pipeline fails with a job_activity_limit_exceeded error.To configure this the upper-right corner, select Admin.In the left sidebar, select Settings > CI/CD.Expand Continuous Integration and Deployment.Under CI/CD limits, set a value for Total number of jobs in currently active pipelines.Select Save changes.Set the limit to 0 to disable it. Disabled by default.Number of CI/CD subscriptions to a projectThe total number of subscriptions can be limited per project. This limit is checked each time a new subscription is created.If a new subscription would cause the total number of subscriptions to exceed the limit, the subscription is considered invalid.To configure this the upper-right corner, select Admin.In the left sidebar, select Settings > CI/CD.Expand Continuous Integration and Deployment.Under CI/CD limits, set a value for Maximum number of pipeline subscriptions to and from a project.Select Save changes.By default, there is a limit of 2 subscriptions. Set the limit to 0 to disable it.Number of pipeline schedulesThe total number of pipeline schedules can be limited per project. This limit is checked each time a new pipeline schedule is created. If a new pipeline schedule would cause the total number of pipeline schedules to exceed the limit, the pipeline schedule is not created.To configure this the upper-right corner, select Admin.In the left sidebar, select Settings > CI/CD.Expand Continuous Integration and Deployment.Under CI/CD limits, set a value for Maximum number of pipeline schedules.Select Save changes.By default, there is a limit of 10 pipeline schedules.You can also use the Plan Limits API.Maximum number of needs dependenciesYou can set a maximum number of needs dependencies that a single job can have.To configure this the upper-right corner, select Admin.In the left sidebar, select Settings > CI/CD.Expand Continuous Integration and Deployment.Under CI/CD limits, set a value for Maximum number of needs dependencies that a job can haveSelect Save changes.This limit cannot be disabled. Defaults to 50.Set to 0 to block all needs dependencies. Pipelines with jobs configured to use needs then return the error job can only need 0 others.Number of registered runners for groups and projectsHistoryRunner stale timeout changed from 3 months to 7 days in GitLab 17.1.The total number of registered runners is limited for groups and projects. Each time a new runner is registered, GitLab checks these limits against runners created or active in the last 7 days. A runner’s registration fails if it exceeds the limit for the scope determined by the runner registration token.To configure this the upper-right corner, select Admin.In the left sidebar, select Settings > CI/CD.Expand Continuous Integration and Deployment.Under CI/CD limits, set a value for number of runners created or active in a group during the past seven daysMaximum number of runners created or active in a project during the past seven daysSelect Save changes.Set the limit to 0 to disable it.Limit pipeline hierarchy sizeBy default, a pipeline hierarchy can contain up to 1000 downstream pipelines. When this limit is exceeded, pipeline creation fails with the error downstream pipeline tree is too large.Increasing this limit is not recommended. The default limit protects your GitLab instance from excessive resource consumption, potential pipeline recursion, and database overload.Instead of increasing the limit, restructure your CI/CD configuration by splitting large pipeline hierarchies into smaller pipelines. Consider using needs between jobs or dependent stages in a single pipeline.To configure this the upper-right corner, select Admin.In the left sidebar, select Settings > CI/CD.Expand Continuous Integration and Deployment.Under CI/CD limits, set a value for Maximum number of downstream pipelines in a pipeline’s hierarchy tree.Select Save changes.You can also use the Plan Limits API.Merge train parallel pipeline limitHistoryIntroduced in GitLab 19.0.By default, each merge train can run a maximum of 20 pipelines in parallel. When this limit is reached, additional merge requests are queued until a pipeline slot is available.To configure this the upper-right corner, select Admin.In the left sidebar, select Settings > CI/CD.Expand Continuous Integration and Deployment.Under CI/CD limits, set a value for Maximum parallel pipelines per merge train. The minimum value is 1. A value of 1 processes merge requests sequentially with no parallelism.Select Save changes.You can also use the Plan Limits API.You can set a different value for a specific project.Maximum time jobs can runThe default maximum time that jobs can run for is 60 minutes. Jobs that run for more than 60 minutes time out.You can change the maximum time a job can run before it times a project in the project’s CI/CD settings for a given project. This limit must be between 10 minutes and 1 month.For a runner. This limit must be 10 minutes or longer.Regardless of configured timeout limits, GitLab terminates any job that has been inactive for 60 minutes. An inactive job is one that has produced no new logs or trace updates.Number of pipelines per Git pushHistoryIntroduced in GitLab 18.0.Increasing this limit is not recommended. It can cause excessive load on your GitLab instance if many changes are pushed simultaneously, potentially creating a flood of pipelines.When pushing multiple changes with a single Git push, like multiple tags or branches, only four tag or branch pipelines can be triggered by default. This limit prevents the accidental creation of a large number of pipelines when using git push --all or git push --mirror.Merge request pipelines are limited. If the Git push updates multiple merge requests at the same time, a merge request pipeline can trigger for every updated merge request before reaching the limit.The default value is 4 for GitLab Self-Managed and GitLab.com.To change this limit on your GitLab Self-Managed the upper-right corner, select Admin.In the left sidebar, select Settings > CI/CD.Expand Continuous Integration and Deployment.Change the value of Pipeline limit per Git push.Select Save changes.Pipeline creation rate limitsHistoryIntroduced in GitLab 15.0 with a feature flag named ci_enforce_throttle_pipelines_creation. Disabled by default. Enabled on GitLab.comEnabled by default in 18.3.You can set limits so that users and processes can’t request more than a certain number of pipelines each minute. These limits can help save resources and improve stability.GitLab enforces two types of rate limits for pipeline project, commit, and pipelines created for the same combination of project, commit SHA, and user. Set to 0 (no limit) by default.Per total pipelines created by a user across all projects. Set to 0 (no limit) by default.For example, if you set a per-user limit of 100, and a user sends 101 pipeline creation requests to the trigger API within one minute across different projects, the 101st request is blocked. Access to the endpoint is allowed again after one minute.These limits are not applied per IP address.Requests that exceed the limits are logged in the application_json.log file.Set pipeline request access.To limit the number of pipeline the upper-right corner, select Admin.In the left sidebar, select Settings > Network.Expand Pipelines Rate Limits.Under Max requests per minute per project, user, and commit, enter a value greater than 0 to limit pipelines for the same project, commit, and user combination. Set to 0 for unlimited requests per minute.Under Max requests per minute per user, enter a value greater than 0 to limit total pipelines created by each user. Set to 0 for unlimited requests per minute.Select Save changes.Both rate limits are evaluated user creating multiple pipelines for the same commit SHA in a project is subject to the per project, user, and commit limit.A user creating pipelines across different projects or commits is subject to the per user limit.If either limit is exceeded, the pipeline creation request is blocked.Limit downstream pipeline trigger rateRestrict how many downstream pipelines can be triggered per minute from a single source.The maximum downstream pipeline trigger rate limits how many downstream pipelines can be triggered per minute for a given combination of project, user, and commit. The default value is 0, which means there is no restriction.To configure this the upper-right corner, select Admin.In the left sidebar, select Settings > CI/CD.Expand Continuous Integration and Deployment.Set a value for Maximum downstream pipeline trigger rate.Select Save changes.Maximum artifacts sizeSet size limits for job artifacts to control storage use. Each artifact file in a job has a default maximum size of 100 MB.Job artifacts defined with can have different limits. When different limits apply, the smaller value is used.This setting applies to the size of the final archive file, not individual files in a job.You can configure artifact size limits base setting that applies to all projects and groups.A the instance setting for all projects in the group.A both instance and group settings for a specific project.For GitLab.com limits, see Artifacts maximum size.To change the maximum artifact size for an the upper-right corner, select Admin.In the left sidebar, select Settings > CI/CD.Expand Continuous Integration and Deployment.Enter a value in the Maximum artifacts size (MB) text box.Select Save changes.Maximum number of includesLimit how many external YAML files a pipeline can include using the include keyword. This limit prevents performance issues when pipelines include too many files.By default, a pipeline can include up to 150 files. When a pipeline exceeds this limit, it fails with an error.To set the maximum number of included files per the upper-right corner, select Admin.In the left sidebar, select Settings > CI/CD.Expand Continuous Integration and Deployment.Enter a value in the Maximum includes text box.Select Save changes.Maximum size of the CI artifacts archiveThis setting restricts YAML sizes for dynamic child pipelines.The default maximum size of the CI artifacts archive is 5 megabytes.To change this limit in the Admin the upper-right corner, select Admin.In the left sidebar, select Settings > CI/CD.Expand Continuous Integration and Deployment.Enter a value in the Maximum artifact size for dynamic child pipelines (bytes) text box.Select Save changes.To change this limit using the GitLab Rails console, update max_artifacts_content_include_size with the new value. For example, to set it to 20 (max_artifacts_content_include_size: 20.megabytes)Maximum number of caches per jobHistoryIntroduced as a beta in GitLab 18.10.8, 18.11.5, 19.0.2, and 19.1.Generally available in GitLab 19.2.Limit how many cache entries a single CI/CD job can define. This limit caps the number of Gitaly calls a job can trigger during pipeline creation when caches use :files.By default, a job can define up to 4 caches. When a job exceeds this limit, the configuration fails to parse with an error.The value must be at least 1. Raising the limit above the default can impact pipeline creation performance.To change the maximum number of caches per the upper-right corner, select Admin.In the left sidebar, select Settings > CI/CD.Expand Continuous Integration and Deployment.Enter a value in the Maximum caches per job text box.Select Save changes.CI/CD limits instance Self-ManagedSome CI/CD limits can only be changed by editing the instance configuration.Prerequisites:You must have access to the GitLab Rails console for the instance.Maximum number of deployment jobs in a pipelineYou can limit the maximum number of deployment jobs in a pipeline. A deployment is any job with an environment specified. The number of deployments in a pipeline is checked at pipeline creation. Pipelines that have too many deployments fail with a deployments_limit_exceeded error.To change the limit, change the default plan’s limit with the following GitLab Rails console command:# If limits don't exist for the default plan, you can create one with: # Plan.default.create_limits! Plan.default.actual_limits.update!(ci_pipeline_deployments: 500)The default limit is 500. Set the limit to 0 to disable it.Limit the number of pipeline triggersYou can set a limit on the maximum number of pipeline triggers per project. This limit is checked every time a new trigger is created.If a new trigger would cause the total number of pipeline triggers to exceed the limit, the trigger is considered invalid.Set the limit to 0 to disable it. Defaults to 25000.To set this limit to 100, run the following in the GitLab Rails !(pipeline_triggers: 100)Limit the number of pipelines created by a pipeline schedule each dayYou can limit the number of pipelines that each individual pipeline schedule can trigger per day.Schedules that try to run pipelines more frequently than the limit are slowed to a maximum frequency. The frequency is calculated by dividing 1440 (the number minutes in a day) by the limit value. For example, for a maximum frequency per minute, the limit must be 1440.Once per 10 minutes, the limit must be 144.Once per 60 minutes, the limit must be 24The minimum value is 24, or one pipeline per 60 minutes. There is no maximum value.To set this limit to 1440 on a GitLab Self-Managed instance, run the following in the GitLab Rails !(ci_daily_pipeline_schedule_triggers: 1440)Maximum scheduled pipeline frequencyScheduled pipelines can be configured with any cron value, but they do not always run exactly when scheduled. An internal process, called the “pipeline schedule worker”, queues all the scheduled pipelines, but does not run continuously. The worker runs on its own schedule, and scheduled pipelines that are ready to start are only queued the next time the worker runs. Scheduled pipelines can’t run more frequently than the worker.The default frequency of the pipeline schedule worker is 3-59/10 * * * * (every ten minutes, starting with , , , and so on). The default frequency for GitLab.com is listed in the GitLab.com settings.To change the frequency of the pipeline schedule the gitlab_rails['pipeline_schedule_worker_cron'] value in your instance’s gitlab.rb file.Reconfigure GitLab for the changes to take effect.For example, to set the maximum frequency of pipelines to twice a day, set pipeline_schedule_worker_cron to a cron value of 0 */12 * * * (00:00 and every day).When many pipeline schedules run at the same time, additional delays can occur. The pipeline schedule worker processes pipelines in batches with a small delay between each batch to distribute system load. This can cause pipeline schedules to start several minutes to over an hour after their scheduled time, depending on system load.Limit the number of schedule rules defined for security policy projectYou can limit the total number of schedule rules per security policy project. This limit is checked each time policies with schedule rules are updated. If a new schedule rule would cause the total number of schedule rules to exceed the limit, the new schedule rule is not processed.By default, GitLab does not limit the number of processable schedule rules.To set this limit, run the following in the GitLab Rails !(security_policy_scan_execution_schedules: 100)Group and project CI/CD variable limitsThe number of CI/CD variables that can be defined in groups and projects is limited for the entire instance. These limits are checked each time a new variable is created. If a new variable would cause the total number of variables to exceed the respective limit, the new variable is not created.To update the default plan of one of these limits, in the GitLab Rails console run the following CI/CD variable limit per group (default: 30000):Plan.default.actual_limits.update!(group_ci_variables: 40000)Project-level CI/CD variable limit per project (default: 8000):Plan.default.actual_limits.update!(project_ci_variables: 10000)Maximum file size per type of artifactHistoryci_max_artifact_size_jacoco limit introduced in GitLab 17.3ci_max_artifact_size_lsif limit increased in GitLab 17.8.Job artifacts defined with that are uploaded by the runner are rejected if the file size exceeds the maximum file size limit. The limit is determined by comparing the project’s maximum artifact size setting with the instance limit for the given artifact type, and choosing the smaller value.Limits are set in megabytes, so the smallest possible value that can be defined is 1 MB.Each type of artifact has a size limit that can be set. A default of 0 means there is no limit for that specific artifact type, and the project’s maximum artifact size setting is limit nameDefault valueci_max_artifact_size_accessibility0ci_max_artifact_size_annotations0ci_max_artifact_size_api_fuzzing0ci_max_artifact_size_archive0ci_max_artifact_size_browser_performance0ci_max_artifact_size_cluster_applications0ci_max_artifact_size_cobertura0ci_max_artifact_size_codequality0ci_max_artifact_size_container_scanning0ci_max_artifact_size_coverage_fuzzing0ci_max_artifact_size_dast0ci_max_artifact_size_dependency_scanning0ci_max_artifact_size_dotenv0ci_max_artifact_size_jacoco0ci_max_artifact_size_junit0ci_max_artifact_size_license_management0ci_max_artifact_size_license_scanning0ci_max_artifact_size_load_performance0ci_max_artifact_size_lsif200 MBci_max_artifact_size_metadata0ci_max_artifact_size_metrics_referee0ci_max_artifact_size_metrics0ci_max_artifact_size_network_referee0ci_max_artifact_size_performance0ci_max_artifact_size_requirements0ci_max_artifact_size_requirements_v20ci_max_artifact_size_sarif10 MBci_max_artifact_size_sast0ci_max_artifact_size_secret_detection0ci_max_artifact_size_terraform5 MBci_max_artifact_size_trace0ci_max_artifact_size_cyclonedx1 MBFor example, to set the ci_max_artifact_size_junit limit to 10 MB on GitLab Self-Managed, run the following in the GitLab Rails !(ci_max_artifact_size_junit: 10)You can also set ci_max_artifact_size_cyclonedx in the Admin area. For more information, see Limit CycloneDX artifact size.Maximum file size for job logsThe job log file size limit in GitLab is 100 megabytes by default. Any job that exceeds the limit is marked as failed, and dropped by the runner.You can change the limit in the GitLab Rails console. Update ci_jobs_trace_size_limit with the new value in !(ci_jobs_trace_size_limit: 125)GitLab Runner also has an output_limit setting that configures the maximum log size in a runner. Jobs that exceed the runner limit continue to run, but the log is truncated when it hits the limit.Maximum number of active DAST profile schedules per projectLimit the number of active DAST profile schedules per project. A DAST profile schedule can be active or inactive.You can change the limit in the GitLab Rails console. Update dast_profile_schedules with the new !(dast_profile_schedules: 50)Maximum size and depth of CI/CD configuration YAML filesHistoryDefault value for max_yaml_size_bytes changed in GitLab 17.3.The default maximum size of a single CI/CD configuration YAML file is 2 megabytes and the default depth is 100.You can change these limits in the GitLab Rails update the maximum YAML size, update max_yaml_size_bytes with the new value in (max_yaml_size_bytes: 4.megabytes)The max_yaml_size_bytes value is not directly tied to the size of the YAML file, but rather the memory allocated for the relevant objects.To update the maximum YAML depth, update max_yaml_depth with the new value in number of (max_yaml_depth: 125)Maximum size of the entire CI/CD configurationHistoryDefault value for max_yaml_size_bytes changed in GitLab 17.3.Default value for ci_max_total_yaml_size_bytes changed in GitLab 17.3.The maximum amount of memory, in bytes, that can be allocated for the full pipeline configuration, with all included YAML configuration files.The default value is calculated by multiplying max_yaml_size_bytes (default 2 MB) with ci_max_includes (default 150):In GitLab 17.2 and MB × 150 = 157286400 bytes (150 MB).In GitLab 17.3 and MB × 150 = 314572800 bytes (314.6 MB).You can change this limit by using the GitLab Rails console. To update the maximum memory that can be allocated for the CI/CD configuration, update ci_max_total_yaml_size_bytes with the new value. For example, to set it to 20 (ci_max_total_yaml_size_bytes: 20.megabytes)This limit also bounds the compiled configuration stored for a single CI/CD job when a pipeline is created. A single job’s configuration is always a subset of the entire pipeline configuration, so it cannot exceed this limit.Limit CI/CD job annotationsYou can set a limit on the maximum number of annotations per CI/CD job.Set the limit to 0 to disable it. Defaults to 20.To set this limit to 100 on your instance, run the following command in the GitLab Rails !(ci_job_annotations_num: 100)Limit CI/CD job annotations file sizeYou can set a limit on the maximum size of a CI/CD job annotation.Set the limit to 0 to disable it. Defaults to 80 KB.To set this limit to 100 KB, run the following in the GitLab Rails !(ci_job_annotations_size: 100.kilobytes)Maximum database partition size for CI/CD tablesHistoryIntroduced in GitLab 18.0.Removed in GitLab 18.11.The maximum amount of disk space, in bytes, that can be used by a partition of a partitioned table, before new partitions are automatically created. Defaults to 100 GB.You can change this limit by using the GitLab Rails console. To change the limit, update ci_partitions_size_limit with the new value. For example, to set it to 20 (ci_partitions_size_limit: 20.gigabytes)Maximum time window for CI/CD partitionsHistoryIntroduced in GitLab 18.10.The time window, in seconds, before new CI partitions are created and the system switches to the next set of partitions. Must be between 1 month and 6 months. Defaults to 1 month (2592000 seconds).You can change this limit by using the GitLab Rails console. To change the limit, update ci_partitions_in_seconds_limit with the new value. For example, to set it to 3 (ci_partitions_in_seconds_limit: ChronicDuration.parse('3 months'))Maximum retention period for automatic pipeline cleanupHistoryIntroduced in GitLab 18.0.Configures the upper limit for automatic pipeline cleanup. Defaults to 1 year.You can change this limit by using the GitLab Rails console. To change the limit, update ci_delete_pipelines_in_seconds_limit_human_readable with the new value. For example, to set it to 3 (ci_delete_pipelines_in_seconds_limit_human_readable: '3 years')Instance CI/CD variable limitLimit dotenv file sizeLimit dotenv variablesLimit CycloneDX artifact sizeMaximum number of jobs in a pipelineNumber of jobs in active pipelinesNumber of CI/CD subscriptions to a projectNumber of pipeline schedulesMaximum number of needs dependenciesNumber of registered runners for groups and projectsLimit pipeline hierarchy sizeMerge train parallel pipeline limitMaximum time jobs can runNumber of pipelines per Git pushPipeline creation rate limitsSet pipeline request limitsLimit downstream pipeline trigger rateMaximum artifacts sizeMaximum number of includesMaximum size of the CI artifacts archiveMaximum number of caches per jobCI/CD limits instance configurationMaximum number of deployment jobs in a pipelineLimit the number of pipeline triggersLimit the number of pipelines created by a pipeline schedule each dayMaximum scheduled pipeline frequencyLimit the number of schedule rules defined for security policy projectGroup and project CI/CD variable limitsMaximum file size per type of artifactMaximum file size for job logsMaximum number of active DAST profile schedules per projectMaximum size and depth of CI/CD configuration YAML filesMaximum size of the entire CI/CD configurationLimit CI/CD job annotationsLimit CI/CD job annotations file sizeMaximum database partition size for CI/CD tablesMaximum time window for CI/CD partitionsMaximum retention period for automatic pipeline cleanup\n\nExample:\n```ruby\nApplicationSetting.update(max_artifacts_content_include_size: 20.megabytes)\n```\n\nExample:\n```ruby\n# If limits don't exist for the default plan, you can create one with:\n# Plan.default.create_limits!\n\nPlan.default.actual_limits.update!(ci_pipeline_deployments: 500)\n```\n\nExample:\n```ruby\nPlan.default.actual_limits.update!(pipeline_triggers: 100)\n```\n\nExample:\n```ruby\nPlan.default.actual_limits.update!(ci_daily_pipeline_schedule_triggers: 1440)\n```\n\nExample:\n```ruby\nPlan.default.actual_limits.update!(security_policy_scan_execution_schedules: 100)\n```\n\nExample:\n```ruby\nPlan.default.actual_limits.update!(group_ci_variables: 40000)\n```\n\nExample:\n```ruby\nPlan.default.actual_limits.update!(project_ci_variables: 10000)\n```\n\nExample:\n```ruby\nPlan.default.actual_limits.update!(ci_max_artifact_size_junit: 10)\n```\n\nExample:\n```ruby\nPlan.default.actual_limits.update!(ci_jobs_trace_size_limit: 125)\n```\n\nExample:\n```ruby\nPlan.default.actual_limits.update!(dast_profile_schedules: 50)\n```\n\nExample:\n```ruby\nApplicationSetting.update(max_yaml_size_bytes: 4.megabytes)\n```\n\nExample:\n```ruby\nApplicationSetting.update(max_yaml_depth: 125)\n```\n\nExample:\n```ruby\nApplicationSetting.update(ci_max_total_yaml_size_bytes: 20.megabytes)\n```\n\nExample:\n```ruby\nPlan.default.actual_limits.update!(ci_job_annotations_num: 100)\n```\n\nExample:\n```ruby\nPlan.default.actual_limits.update!(ci_job_annotations_size: 100.kilobytes)\n```\n\nExample:\n```ruby\nApplicationSetting.update(ci_partitions_size_limit: 20.gigabytes)\n```\n\nExample:\n```ruby\nApplicationSetting.update(ci_partitions_in_seconds_limit: ChronicDuration.parse('3 months'))\n```\n\nExample:\n```ruby\nApplicationSetting.update(ci_delete_pipelines_in_seconds_limit_human_readable: '3 years')\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:06.509Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":18,"totalLines":96,"estimatedTokens":7594}}116{"id":"doc-gpt_realtime_1_5_model_openai_api-47c77572","source":"documentation","title":"GPT-Realtime-1.5 Model | OpenAI API","url":"https://developers.openai.com/api/docs/models/gpt-realtime-1.5","text":"For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.\n\nChatGPT Home API Codex Docs Guides, concepts, and product docs for Codex Use cases Example workflows and tasks teams can take on with ChatGPT or Codex Docs Use cases Resources ChatGPT Plugins Extend ChatGPT and Codex Workspace Agents Trigger published ChatGPT workspace agents Commerce Build commerce flows in ChatGPT Ads Publish and measure ads in ChatGPT Resources Showcase Demo apps to get inspired Blog Learnings and experiences from developers Cookbook Notebook examples for building with OpenAI models Learn Docs, videos, and demo apps for building with OpenAI Community Programs, meetups, and support for builders Start searching API Dashboard Try ChatGPT\n\nOverview Models Agents Tools Voice & Audio Production API reference\n\nSearch the API docs Search docsSuggestedresponses createreasoning_effortrealtimeprompt caching\n\nPrimary navigation API Codex ChatGPT Docs Use cases Resources Resources Search docsSuggestedresponses createreasoning_effortrealtimeprompt caching Overview Models Agents Tools Voice & Audio Production API reference OverviewModelsAgentsToolsVoice & AudioProductionAPI referenceDocs sectionModels Home Get started Quickstart Using GPT-5.6 Key concepts Core concepts Responses API Conversation state Background mode Streaming WebSocket mode Multi-agent Webhooks File inputs Compaction Counting tokens SDKs and CLI OpenAI SDK OpenAI CLI Resources Changelog Deprecations Supported countries OpenAI Crawlers Terms and policies Legacy APIs Agent Builder Overview Migration guide Node reference Safety in building agents Evals Getting started Working with evals Prompt optimizer External models Best practices Graders Fine-tuning Optimization cycle Supervised fine-tuning Vision fine-tuning Direct preference optimization Reinforcement fine-tuning RFT use cases Best practices Assistants API Migration guide Deep dive Tools Model catalog Choose a model Pricing Model selection Text and code Text generation Code generation Structured output Prompting Overview Prompt engineering Citation formatting Migration guide Prompt generation Frontend prompting Reasoning Reasoning models Reasoning best practices Images and video Images and vision Image generation Video generation Realtime and audio Audio and speech Overview Voice agents Specialized models Deep research Embeddings Moderation Overview Agents SDK Quickstart Agent definitions Models and providers Running agents Sandbox agents Orchestration Guardrails Results and state Integrations and observability Evaluate agent workflows ChatKit Overview Customize Widgets Actions Advanced integrations Overview Function calling Search and retrieval Web search File search Retrieval Connect tools and data MCP and Connectors Secure MCP Tunnel Build tool workflows Skills Tool search Programmatic tool calling Computer and code Shell Computer use Apply Patch Local shell Code interpreter Media Image generation Overview Get started Voice agents Live translation Realtime prompting guide Audio Audio and speech Transcription File transcription Realtime transcription Speech generation Connection methods WebRTC WebSocket SIP Sessions and operations Managing conversations Voice activity detection Realtime with tools Webhooks and server-side controls Managing costs Go live Production best practices Deployment checklist Performance and quality Latency optimization Predicted Outputs Fast mode Accuracy optimization Cost and throughput Cost optimization Prompt caching Batch Flex processing Safety and governance Safety best practices Red teaming Safety checks Cybersecurity checks Under 18 API Guidance Content provenance Your data Permissions Infrastructure and access Terraform provider Overview Projects and access Service accounts Rate limits and spend Model, tool, and data controls Import and reconciliation Private Link IP allowlist Workload identity federation X.509 certificates (beta) Kubernetes AWS Microsoft Azure Google Cloud Oracle Cloud Infrastructure GitHub Actions SPIFFE IP egress ranges Amazon Bedrock Operations Rate limits Spend limits Admin APIs Error codes Docs Use cases DocsUse casesDocs sectionDocs Plugins Workspace Agents Commerce Ads PluginsWorkspace AgentsCommerceAdsDocs sectionSelect... Home Quickstart Core concepts Plugin architecture Skills MCP server Plan Brainstorm use cases Define tools Build Build an MCP server Add UI to your MCP server (optional) Authenticate users Build skills Package your plugin Examples Test and publish Connect and test your plugin Submit and publish Submission error reference Conversion specs Restaurant reservation spec Get Quote spec Product checkout spec Guides UI guidelines Optimize Metadata Submit a Claude Code plugin Security & Privacy Troubleshooting Resources Changelog Plugin guidelines MCP server review requirements Plugin UI reference Checkout API reference Home Get started Trigger workspace agent runs Authenticate with Workspace Agent access tokens Home Guides Get started Best practices File Upload Overview Products API Overview Feeds Products Promotions Ads Overview Measurement Measurement Pixel Multiple Pixels (Advanced) Image Tag Conversions API Supported Events Advertiser API Overview API Partner Setup Quickstart Bulk API Product Feeds Delta Feeds API Campaign Targeting Conversion-Optimized Campaigns API Reference Authentication Ad Account Campaigns Ad Groups Ads Insights Files Conversion Setup Overview Features Configuration Developers Security Administration Use Cases Resources OverviewFeaturesConfigurationDevelopersSecurityAdministrationUse CasesResourcesDocs sectionOverview Home Get started Quickstart Use ChatGPT Get started with Work Import from another agent Foundations Prompting Personalize ChatGPT Skills & Plugins Permissions Explore What's new Models Pricing Glossary Available on ChatGPT desktop app Remote ChatGPT on the web Codex CLI Codex IDE extension Codex cloud Releases Changelog Feature Maturity Open Source Overview Workflows Projects and chats Sites Visualizations Scheduled tasks Long-running work Notifications Pets Codex Micro Capabilities Browser Computer use Voice Plugins Web search Image generation Image inputs Appshots Chrome extension Work with files Reference Commands Slash commands Settings Troubleshooting Overview Customization Overview Memories Computer History Config file Config Basics Advanced Config Config Reference Environment Variables Sample Config Agent configuration AGENTS.md Subagents Speed Rules Extend ChatGPT and Codex Record & Replay MCP Linux Desktop app Windows Desktop app Windows sandbox WSL Overview Development workflows Code review Integrated terminal Extend and automate Build skills Build plugins Hooks Environments Modes Local environments Cloud environment Git worktrees Build with Codex Codex SDK App Server MCP Server GitHub Action Non-interactive mode Third-party integrations GitHub Slack Linear Reference CLI customization Developer commands Developer settings Overview Permissions Profiles Sandboxing Auto-review Agent approvals & security Internet access Codex Security Overview Codex Security plugin Quickstart Run a security scan Run a deep scan Review code changes Use the Security workbench Triage a backlog Fix findings Propose security hardening Write vulnerability reports Export and track findings Changelog Codex Security CLI Quickstart Run bulk scans Run scans in CI Reference FAQ TypeScript SDK Codex Security cloud Setup Security Review Improving the threat model FAQ Cyber safety Models & Trusted Access Recommended configuration Overview Getting started Admin rollout guide ChatGPT Work Overview ChatGPT Work admin FAQ Identity and authentication Authentication overview Personal Access Tokens Service accounts Workspace access, policy, and models Groups and provisioning Roles and workspace permissions GPTs and Sharing Managed configuration Prisma AIRS HIPAA configuration Workspace model availability Plugin and connector controls Plugin controls Skill controls Usage, governance, and compliance Governance Workspace analytics Analytics API Compliance API and audit events Deployment and model providers Manage app updates Windows app deployment Remote connections Amazon Bedrock Explore use cases Collections Home Videos Showcase OpenAI Academy Online trainings Community Codex Ambassadors Codex for Students Codex for Open Source Meetups Blog Company blog Developer blog Explore use cases Collections Home Videos Showcase OpenAI Academy Online trainings Community Codex Ambassadors Codex for Students Codex for Open Source Meetups Blog Company blog Developer blog Showcase Blog Cookbook Learn Community ShowcaseBlogCookbookLearnCommunityDocs sectionSelect... All posts Recent Custom Code Review rules for Codex Mastering remote engineering work from your phone Making private MCP servers reachable without making them public How Perplexity Brought Voice Search to Millions Using the Realtime API Designing delightful frontends with GPT-5.4 Topics General API Apps SDK Audio Codex Home Topics Agents Evals Multimodal Text Guardrails Optimization ChatGPT Codex gpt-oss Contribute Cookbook on GitHub Home OpenAI Developers plugin Docs MCP Categories Demo apps Videos Topics Agents Audio & Voice Computer Use Codex Evals gpt-oss Fine-tuning Image generation Scaling Tools Video generation Community Programs Codex Ambassadors Codex for Students Codex for Open Source OpenAI for Startups Events Meetups Spaces Developer Forum Discord Reddit X API Dashboard Try ChatGPT\n\nModel catalog Choose a model Pricing Model selection Text and code Text generation Code generation Structured output Prompting Overview Prompt engineering Citation formatting Migration guide Prompt generation Frontend prompting Reasoning Reasoning models Reasoning best practices Images and video Images and vision Image generation Video generation Realtime and audio Audio and speech Overview Voice agents Specialized models Deep research Embeddings Moderation ModelsGPT-Realtime-1.5DefaultThe best voice model for audio in, audio outThe best voice model for audio in, audio outCompareTry in PlaygroundPerformanceHighestSpeedFastPrice$4•$16Input•OutputInputText, audio, imageOutputText, audioGPT-Realtime-1.5 is our flagship audio model for voice agents and customer support.32,000 context window4,096 max output tokensSep 30, 2024 knowledge cutoffPricingPricing is based on the number of tokens used, or other metrics based on the model type. For tool-specific models, like search and computer use, there’s a fee per tool call. See details in the pricing page.Text tokensPer 1M tokensInput$4.00Cached input$0.40Output$16.00Audio tokensPer 1M tokensInput$32.00Cached input$0.40Output$64.00Image tokensPer 1M tokensInput$5.00Cached input$0.50ModalitiesTextInput and outputImageInput onlyAudioInput and outputVideoNot supportedEndpointsChat Completionsv1/chat/completionsResponsesv1/responsesRealtimev1/realtimeRealtime translationv1/realtime/translationsRealtime transcriptionv1/realtime/transcription_sessionsAssistantsv1/assistantsBatchv1/batchFine-tuningv1/fine-tuningEmbeddingsv1/embeddingsImage generationv1/images/generationsVideosv1/videosImage editv1/images/editsSpeech generationv1/audio/speechTranscriptionv1/audio/transcriptionsTranslationv1/audio/translationsModerationv1/moderationsCompletions (legacy)v1/completionsFeaturesStreamingNot supportedFunction callingSupportedStructured outputsNot supportedFine-tuningNot supportedPredicted outputsNot supportedSnapshotsSnapshots let you lock in a specific version of the model so that performance and behavior remain consistent. Below is a list of all available snapshots and aliases for GPT-Realtime-1.5.gpt-realtime-1.5gpt-realtime-1.5gpt-realtime-1.5Rate limitsRate limits ensure fair and reliable access to the API by placing specific caps on requests, tokens, audio duration, or other usage within a given time period. Your usage tier determines how high these limits are set and automatically increases as you send more requests and spend more on the API.TierRPMRPDTPMFreeNot supportedTier 12001,00040,000Tier 2400-200,000Tier 35,000-800,000Tier 410,000-4,000,000Tier 520,000-15,000,000\n\nAsk AI Docs agent Loading docs agent...\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:58.317Z","totalSectionsIncluded":7,"totalCodeBlocksIncluded":0,"totalLines":15,"estimatedTokens":3068}}117{"id":"doc-connectors_in_workflows_mistral_ai_cookbook_mist-3c522381","source":"documentation","title":"Connectors in Workflows - Mistral AI Cookbook | Mistral Docs","url":"https://docs.mistral.ai/resources/cookbooks/mistral-connectors-07-connectors-in-workflow","text":"Example:\n```text\nuvx mistralai-workflows-cli setup\n```\n\nExample:\n```text\nfrom mistralai.workflows.plugins.mistralai.connectors import connector\n\ngithub_connector = connector(\"github_app\")\nnotion_connector = connector(\"notion\")\n```\n\nExample:\n```text\nfrom typing import Any\n\nimport mistralai.workflows as workflows\nfrom mistralai.workflows import Depends\nfrom mistralai.workflows.plugins.mistralai.connectors import ToolCallClient, connector\n\ngithub_connector = connector(\"github_app\")\n\n\n@workflows.activity(name=\"create-github-issue\")\nasync def create_github_issue(\n    owner: str,\n    repo: str,\n    title: str,\n    body: str,\n    github: ToolCallClient = Depends(github_connector),\n) -> None:\n    await github.call_tool(\n        tool_name=\"issue_write\",\n        arguments={\n            \"method\": \"create\",\n            \"owner\": owner,\n            \"repo\": repo,\n            \"title\": title,\n            \"body\": body,\n        },\n    )\n```\n\nExample:\n```text\nimport pydantic\nimport mistralai.workflows as workflows\nfrom mistralai.workflows.plugins.mistralai.connectors import connector, uses_connectors\n\ngithub_connector = connector(\"github_app\")\n\n\nclass GitHubIssuePrompt(pydantic.BaseModel):\n    owner: str\n    repo: str\n    title: str\n    body: str\n\n\n@workflows.workflow.define(name=\"github-issue-creator\", on_behalf_of=True)\n@uses_connectors(github_connector)\nclass GitHubIssueCreatorWorkflow:\n    @workflows.workflow.entrypoint\n    async def run(self, prompt: GitHubIssuePrompt) -> None:\n        await create_github_issue(\n            prompt.owner,\n            prompt.repo,\n            prompt.title,\n            prompt.body,\n        )\n```\n\nExample:\n```text\nfrom __future__ import annotations\n\nimport asyncio\n\nimport pydantic\nimport structlog\n\nimport mistralai.workflows as workflows\nfrom mistralai.workflows import Depends\nfrom mistralai.workflows.core.config.config import config\nfrom mistralai.workflows.core.logging import setup_logging\nfrom mistralai.workflows.plugins.mistralai.connectors import (\n    ToolCallClient,\n    connector,\n    uses_connectors,\n)\n\nlogger = structlog.get_logger(__name__)\n\ngithub_connector = connector(\"github_app\")\n\n\nclass GitHubIssuePrompt(pydantic.BaseModel):\n    owner: str\n    repo: str\n    title: str\n    body: str\n\n\n@workflows.activity(name=\"create-github-issue\")\nasync def create_github_issue(\n    owner: str,\n    repo: str,\n    title: str,\n    body: str,\n    github: ToolCallClient = Depends(github_connector),\n) -> None:\n    await github.call_tool(\n        tool_name=\"issue_write\",\n        arguments={\n            \"method\": \"create\",\n            \"owner\": owner,\n            \"repo\": repo,\n            \"title\": title,\n            \"body\": body,\n        },\n    )\n\n\n@workflows.workflow.define(name=\"github-issue-creator\", on_behalf_of=True)\n@uses_connectors(github_connector)\nclass GitHubIssueCreatorWorkflow:\n    @workflows.workflow.entrypoint\n    async def run(self, prompt: GitHubIssuePrompt) -> None:\n        await create_github_issue(\n            prompt.owner,\n            prompt.repo,\n            prompt.title,\n            prompt.body,\n        )\n\n\nif __name__ == \"__main__\":\n    setup_logging(\n        log_format=config.common.log_format,\n        log_level=config.common.log_level,\n        app_version=config.common.app_version,\n    )\n    asyncio.run(workflows.run_worker([GitHubIssueCreatorWorkflow]))\n```\n\nExample:\n```text\nmake start-worker\n```\n\nExample:\n```text\nimport asyncio\nimport os\n\nimport pydantic\nfrom mistralai import Mistral\nfrom mistralai.extra.workflows.connector_auth import (\n    ConnectorAuthTaskState,\n    execute_with_connector_auth_async,\n)\nfrom mistralai.extra.workflows.connector_slot import ConnectorSlot\n\n\nclass GitHubIssuePrompt(pydantic.BaseModel):\n    owner: str\n    repo: str\n    title: str\n    body: str\n\n\nasync def on_auth_required(state: ConnectorAuthTaskState) -> None:\n    \"\"\"Default callback: opens the OAuth URL in the browser and waits.\"\"\"\n    if state.auth_url:\n        logger.info(\n            \"Auth required — opening browser (connector=%s, auth_url=%s)\",\n            state.connector_name,\n            state.auth_url,\n        )\n        webbrowser.open(state.auth_url)\n    else:\n        logger.info(\n            \"Auth required — authenticate the connector manually (connector=%s)\",\n            state.connector_name,\n        )\n    input(\"Press Enter after completing the OAuth flow...\")\n\n\n\nasync def main(args) -> None:\n    bindings = json.loads(args.bindings) if args.bindings else []\n    connector_slots: Sequence[ConnectorSlot] = [\n        ConnectorSlot(**binding) for binding in bindings\n    ]\n\n    logger.info(\"Running workflow with connector slots: %s\", connector_slots)\n    async with Mistral(api_key=args.api_key, server_url=args.server_url) as client:\n        response = await execute_with_connector_auth_async(\n            client=client,\n            workflow_identifier=\"github-issue-creator\",\n            input_data=GitHubIssuePrompt(\n                owner=\"my-org\",\n                repo=\"my-repo\",\n                title=\"Bug: something is broken\",\n                body=\"Steps to reproduce...\",\n            ),\n            deployment_name=args.deployment_name,\n            connectors=connector_slots,\n            on_auth_required=on_auth_required,\n        )\n        print(response)\n\nif __name__ == \"__main__\":\n    parser = argparse.ArgumentParser(description=\"Search meetings\")\n    parser.add_argument(\"--api-key\", required=True, help=\"Mistral API key\")\n    parser.add_argument(\n        \"--server_url\",\n        required=False,\n        default=\"https://api.mistral.ai\",\n        help=\"Mistral server URL\",\n    )\n    parser.add_argument(\"--deployment-name\", required=True, help=\"Deployment name\")\n    parser.add_argument(\"--workflow_name\", required=True, help=\"workflow to execute\")\n    parser.add_argument(\n        \"--bindings\",\n        default=None,\n        help=\"dict containing connector bindings\",\n    )\n    asyncio.run(main(parser.parse_args()))\n```\n\nExample:\n```text\nmake execute workflow=github-issue-creator input='{\"owner\": \"your-username\", \"repo\": \"your-repo\", \"title\": \"Hello World\", \"body\": \"Hello World\"}'\n```\n\nExample:\n```text\nuv run python -m 09_workflow_executor_with_connectors --api-key <your_api_key> --query meeting  --bindings '[{\"connector_name\": \"github_app\", \"credentials_name\": \"galilou\"}]' --workflow_name github-issue-creator --deployment-name default\n```\n\nExample:\n```text\nConnector 'Notion' requires authorization.\nOpen this URL in your browser to authenticate:\n  https://api.notion.com/v1/oauth/authorize?client_id=...\n\nWaiting for authorization... (press Ctrl+C to cancel)\n✓ Authorization complete.\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:17.600Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":10,"totalLines":253,"estimatedTokens":1659}}118{"id":"doc-workers_mistral_docs-b7d88bf1","source":"documentation","title":"Workers | Mistral Docs","url":"https://docs.mistral.ai/studio/workflows/getting-started/core_concepts/workers","text":"Example:\n```text\nimport asyncio\nimport mistralai.workflows as workflows\n\nasync def main():\n    await workflows.run_worker([MyWorkflow])\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n```\n\nExample:\n```text\nMISTRAL_API_KEY=your_key DEPLOYMENT_NAME=invoice-service uv run python my_worker.py\n```\n\nExample:\n```text\ncurl -H \"Authorization: Bearer $MISTRAL_API_KEY\" \\\n  https://api.mistral.ai/v1/workflows/workers/whoami\n```\n\nExample:\n```text\n{\n  \"scheduler_url\": \"...\",\n  \"namespace\": \"mistral-workflows\",\n  \"tls\": false\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:17.625Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":4,"totalLines":33,"estimatedTokens":135}}119{"id":"doc-manage_workspaces_mistral_docs-0ea5323d","source":"documentation","title":"Manage Workspaces | Mistral Docs","url":"https://docs.mistral.ai/admin/admin-api/manage-workspaces","text":"Manage usersManage groups and roles\n\nExample:\n```text\ncurl \"https://api.mistral.ai/v1/admin/workspaces?page=1&page_size=50\" \\\n  -H \"x-api-key: $ADMIN_API_KEY\"\n```\n\nExample:\n```text\ncurl -X POST https://api.mistral.ai/v1/admin/workspaces \\\n  -H \"Content-Type: application/json\" \\\n  -H \"x-api-key: $ADMIN_API_KEY\" \\\n  -d '{\n    \"name\": \"MySpace\",\n    \"description\": \"Small Workspace\",\n    \"icon\": \"\",\n    \"add_all_org_members\": false,\n    \"admin_user_id\": \"<USER_UUID>\"\n  }'\n```\n\nExample:\n```text\ncurl -X PATCH https://api.mistral.ai/v1/admin/workspaces/<WORKSPACE_UUID> \\\n  -H \"Content-Type: application/json\" \\\n  -H \"x-api-key: $ADMIN_API_KEY\" \\\n  -d '{\"name\": \"Renamed Workspace\", \"description\": \"Updated description\"}'\n```\n\nExample:\n```text\ncurl -X DELETE https://api.mistral.ai/v1/admin/workspaces/<WORKSPACE_UUID> \\\n  -H \"x-api-key: $ADMIN_API_KEY\"\n```\n\nExample:\n```text\n# Add members\ncurl -X POST https://api.mistral.ai/v1/admin/workspaces/<WORKSPACE_UUID>/add-users \\\n  -H \"Content-Type: application/json\" \\\n  -H \"x-api-key: $ADMIN_API_KEY\" \\\n  -d '{\"members\": [{\"user_uuid\": \"<USER_UUID>\", \"role_names\": [\"user\"]}]}'\n\n# Add or update members (idempotent)\ncurl -X PATCH https://api.mistral.ai/v1/admin/workspaces/<WORKSPACE_UUID>/users \\\n  -H \"Content-Type: application/json\" \\\n  -H \"x-api-key: $ADMIN_API_KEY\" \\\n  -d '{\"members\": [{\"user_uuid\": \"<USER_UUID>\", \"role_names\": [\"workspace_admin\"]}]}'\n```\n\nExample:\n```text\ncurl -X DELETE https://api.mistral.ai/v1/admin/workspaces/<WORKSPACE_UUID>/remove-users \\\n  -H \"Content-Type: application/json\" \\\n  -H \"x-api-key: $ADMIN_API_KEY\" \\\n  -d '{\"members\": [{\"user_uuid\": \"<USER_UUID_1>\"}, {\"user_uuid\": \"<USER_UUID_2>\"}]}'\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:17.660Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":6,"totalLines":60,"estimatedTokens":424}}120{"id":"doc-citations_references_mistral_docs-8a099a2e","source":"documentation","title":"Citations & References | Mistral Docs","url":"https://docs.mistral.ai/studio/conversations/citations","text":"Example:\n```text\nreferences = {\n  \"0\": {\n    \"url\": \"https://en.wikipedia.org/wiki/2024_Nobel_Peace_Prize\",\n    \"title\": \"2024 Nobel Peace Prize\",\n    \"snippets\": [\n      [\n        \"The 2024 Nobel Peace Prize, an international peace prize established according to Alfred Nobel's will, was awarded to Nihon Hidankyo (the Japan Confederation of A- and H-Bomb Sufferers Organizations), for their activism against nuclear weapons, assisted by victim/survivors (known as Hibakusha) of the atomic bombings of Hiroshima and Nagasaki in 1945.\",\n        \"They will receive the prize at a ceremony on 10 December 2024 at Oslo, Norway.\"\n      ]\n    ],\n    \"description\": None,\n    \"date\": \"2024-11-26T17:39:55.057454\",\n    \"source\": \"wikipedia\"\n  },\n  \"1\": {\n    \"url\": \"https://en.wikipedia.org/wiki/Climate_Change\",\n    \"title\": \"Climate Change\",\n    \"snippets\": [\n      [\n        \"Present-day climate change includes both global warming—the ongoing increase in global average temperature—and its wider effects on Earth’s climate system. Climate change in a broader sense also includes previous long-term changes to Earth's climate. The current rise in global temperatures is driven by human activities, especially fossil fuel burning since the Industrial Revolution. Fossil fuel use, deforestation, and some agricultural and industrial practices release greenhouse gases. These gases absorb some of the heat that the Earth radiates after it warms from sunlight, warming the lower atmosphere. Carbon dioxide, the primary gas driving global warming, has increased in concentration by about 50% since the pre-industrial era to levels not seen for millions of years.\"\n      ]\n    ],\n    \"description\": None,\n    \"date\": \"2024-11-26T17:39:55.057454\",\n    \"source\": \"wikipedia\"\n  },\n  \"2\": {\n    \"url\": \"https://en.wikipedia.org/wiki/Artificial_Intelligence\",\n    \"title\": \"Artificial Intelligence\",\n    \"snippets\": [\n      [\n        \"Artificial intelligence (AI) refers to the capability of computational systems to perform tasks typically associated with human intelligence, such as learning, reasoning, problem-solving, perception, and decision-making. It is a field of research in computer science that develops and studies methods and software that enable machines to perceive their environment and use learning and intelligence to take actions that maximize their chances of achieving defined goals. Such machines may be called AIs.\"\n      ]\n    ],\n    \"description\": None,\n    \"date\": \"2024-11-26T17:39:55.057454\",\n    \"source\": \"wikipedia\"\n  }\n}\n```\n\nExample:\n```text\nget_information_tool = {\n    \"type\": \"function\",\n    \"function\": {\n        \"name\": \"get_information\",\n        \"description\": \"Get information from external source.\",\n        \"parameters\": {\n          \"type\": \"object\",\n          \"properties\": {},\n          \"additionalProperties\": False\n        },\n        \"strict\": True\n    },\n}\n\ndef get_information():\n    return json.dumps(references)\n```\n\nExample:\n```text\nimport os\nfrom mistralai.client import Mistral, ToolMessage\nimport json\n\napi_key = os.environ[\"MISTRAL_API_KEY\"]\nmodel = \"mistral-small-latest\"\n\nclient = Mistral(api_key=api_key)\n```\n\nExample:\n```text\nchat_history = [\n    {\n        \"role\": \"system\",\n        \"content\": \"Answer the user by providing references to the source of the information.\"\n    },\n    {\n        \"role\": \"user\",\n        \"content\": \"Who won the Nobel Prize in 2024?\"\n    }\n]\n```\n\nExample:\n```text\nchat_response = client.chat.complete(\n    model=model,\n    messages=chat_history,\n    tools=[get_information_tool],\n)\n\ntool_call = chat_response.choices[0].message.tool_calls[0]\nchat_history.append(chat_response.choices[0].message)\n```\n\nExample:\n```text\nresult = get_information()\n\ntool_call_result = ToolMessage(\n    content=result,\n    tool_call_id=tool_call.id,\n    name=tool_call.function.name,\n)\n\n# Append the tool call message to the chat_history\nchat_history.append(tool_call_result)\n```\n\nExample:\n```text\nchat_response = client.chat.complete(\n    model=model,\n    messages=chat_history,\n    tools=[get_information_tool],\n)\n```\n\nExample:\n```text\nfrom mistralai.client.models import TextChunk, ReferenceChunk\n\nrefs_used = []\n\n# Print the main response and save each reference\nfor chunk in chat_response.choices[0].message.content:\n    if isinstance(chunk, TextChunk):\n        print(chunk.text, end=\"\")\n    elif isinstance(chunk, ReferenceChunk):\n        refs_used += chunk.reference_ids\n\n# Print references only\nif refs_used:\n    print(\"\\n\\nSources:\")\n    for i, ref in enumerate(set(refs_used), 1):\n        reference = json.loads(result)[str(ref)]\n        print(f\"\\n{i}. {reference['title']}: {reference['url']}\")\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:17.664Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":8,"totalLines":146,"estimatedTokens":1169}}121{"id":"doc-http_method_netlify_docs-85da5e58","source":"documentation","title":"HTTP method | Netlify Docs","url":"https://docs.netlify.com/manage/monitoring/observability/reference/http-method/","text":"Netlify Docs Start Build Fundamentals Build with AI Configure builds Git workflows Environment variables Frameworks Post-processing User-Agent categories Primitives AI Gateway Serverless Functions Edge Functions Image CDN Blobs Database Caching Async Workloads Deploy Manage Accounts & Billing Projects Domains Data & Storage Security & access Monitoring & Insights Preview Servers Forms Visual Editor Routing & Redirects Extend Install & use Develop & share Netlify SDK for extensions Building code agents Framework adapter API Reference Error reference Netlify skills Request processing order CLI reference Netlify SDK for extensions Visual Editor reference APIs Netlify API Database API Frameworks API Cache API Blobs API Serverless Functions API Edge Functions API Dev Tool Guides API and CLI guides Terraform provider Command Palette Resources Troubleshooting Changelog Examples Migrate Support Checklists Release phases Enterprise credits AI Monitoring & Insights Monitoring & Insights Overview Observability Overview Reference Content type Cache status Block reason Functions Edge functions HTTP method Status codes Status group User agent category Web analytics Overview How web analytics works Real user monitoring Lighthouse Log drains Logs Split testing Function metrics Monitor builds Status badges Notifications On this page Overview Common examples Further reference On this page Overview Common examples Further reference For the complete Netlify documentation index, see llms.txt. Markdown versions of any documentation page are available by appending .md to its URL. More flexibility and credits now available for Pro plans 🎉 Manage / Monitoring / Observability / Reference / HTTP method Copy page View as Markdown Copy as Markdown View as Markdown Filter requests by the HTTP method. Learn more about HTTP methods in the Web MDN docs. Common examplesSection titled “Common examples” HTTP methodUse caseGETRequest for a resourcePOSTRequest to create a resource, such as a form submissionPUTRequest to update a resource, such as a file uploadDELETERequest to delete a resource, such as a filePATCHRequest to update a resource, such as a fileHEADRequest to retrieve the headers for a resource, commonly used for troubleshooting Further referenceSection titled “Further reference” For a comprehensive list of HTTP methods, check out the IANA HTTP Method Registry. Last 16, 2025 PreviousEdge functionsNextStatus codes Did you find this doc useful? Your feedback helps us improve our docs. Do not fill in this field Email (optional) What else would you like to tell us about this doc? I consent to being contacted regarding my feedback Send Netlify Careers Blog Terms Privacy Reading these docs with an AI agent? Append .md to any docs URL for its Markdown source, or start from the full llms.txt index. © 2026 Netlify Ask Netlify Help\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:18.269Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":0,"totalLines":3,"estimatedTokens":716}}122{"id":"doc-preview_controls_netlify_docs-4e77230c","source":"documentation","title":"Preview Controls | Netlify Docs","url":"https://docs.netlify.com/manage/visual-editor/preview-controls/","text":"Netlify Docs Start Build Fundamentals Build with AI Configure builds Git workflows Environment variables Frameworks Post-processing User-Agent categories Primitives AI Gateway Serverless Functions Edge Functions Image CDN Blobs Database Caching Async Workloads Deploy Manage Accounts & Billing Projects Domains Data & Storage Security & access Monitoring & Insights Preview Servers Forms Visual Editor Routing & Redirects Extend Install & use Develop & share Netlify SDK for extensions Building code agents Framework adapter API Reference Error reference Netlify skills Request processing order CLI reference Netlify SDK for extensions Visual Editor reference APIs Netlify API Database API Frameworks API Cache API Blobs API Serverless Functions API Edge Functions API Dev Tool Guides API and CLI guides Terraform provider Command Palette Resources Troubleshooting Changelog Examples Migrate Support Checklists Release phases Enterprise credits AI Visual editing Visual editing Visual editor overview Get started Get started overview Visual editor quickstart Set up visual editor locally Customize editing experience Manage visual editing Visual editor walkthrough help Troubleshoot visual editor setup Visual editor glossary Concepts Concepts overview How visual editor works Structured content Content-driven development Reusable content Two-way content sync Configuration Analytics Automatic content reload Content presets Custom actions Document hooks Editorial permissions Global styles Local development Localization Personalization Preview controls Sitemap navigator Tree view Version control Asset sources Overview Aprimo Bynder Cloudinary Cloud setup Overview Container Git branching Import Previewing Publishing Content sources Overview Contentful Contentstack Custom DatoCMS Git Hygraph Sanity Frameworks Overview Angular Astro Custom Eleventy Gatsby Hydrogen Next.js Nuxt 3 SvelteKit Visual editing Overview Content editor Custom fields Field controls Field groups Inline editor Page editor Sidebar buttons Status labels Troubleshoot On this page Overview How preview controls work Control contexts Global context Field context Usage example Light/Dark toggle with React On this page Overview How preview controls work Control contexts Global context Field context Usage example Light/Dark toggle with React For the complete Netlify documentation index, see llms.txt. Markdown versions of any documentation page are available by appending from '@stackbit/types'import { useEffect, useState } from 'react'import 'styles.css' function MyApp({ Component, pageProps }) { const [currentTheme, setCurrentTheme] = useState<'light' | 'dark'>('light') useEffect(() => { if (typeof window === 'undefined') return const = { name: 'theme', label: 'Theme', context: 'global', type: 'enum', options: [ { value: 'light', label: 'Light' }, { value: 'dark', label: 'Dark' }, ], , , onChange: (value) => { console.log('theme changed to', value) setCurrentTheme(value as 'light' | 'dark') }, } const myWindow = window as any myWindow.stackbitPreviewControls = [themeControl] return () => { myWindow.stackbitPreviewControls = [] } }, [currentTheme]) return ( <div style={{ === 'dark' ? '#444444' : '#ffffff', }} > {/* ... */} </div> )} export default MyApp Tip This example was written for simplicity. In a production-ready application, it's typically a better practice to define a custom hook to abstract the common properties, making it easier to add controls throughout the application. Last 23, 2025 PreviousPersonalizationNextSitemap navigator Did you find this doc useful? Your feedback helps us improve our docs. Do not fill in this field Email (optional) What else would you like to tell us about this doc? I consent to being contacted regarding my feedback Send Netlify Careers Blog Terms Privacy Reading these docs with an AI agent? Append .md to any docs URL for its Markdown source, or start from the full llms.txt index. © 2026 Netlify Ask Netlify Help\n\nExample:\n```text\n//_app.tsimport type { PreviewControl } from '@stackbit/types'import { useEffect, useState } from 'react'import 'styles.css'\nfunction MyApp({ Component, pageProps }) {  const [currentTheme, setCurrentTheme] = useState<'light' | 'dark'>('light')\n  useEffect(() => {    if (typeof window === 'undefined') return\n    const themeControl: PreviewControl = {      name: 'theme',      label: 'Theme',      context: 'global',      type: 'enum',      options: [        { value: 'light', label: 'Light' },        { value: 'dark', label: 'Dark' },      ],      required: true,      value: currentTheme,      onChange: (value) => {        console.log('theme changed to', value)        setCurrentTheme(value as 'light' | 'dark')      },    }\n    const myWindow = window as any    myWindow.stackbitPreviewControls = [themeControl]\n    return () => {      myWindow.stackbitPreviewControls = []    }  }, [currentTheme])\n  return (    <div      style={{        backgroundColor: currentTheme === 'dark' ? '#444444' : '#ffffff',      }}    >      {/* ... */}    </div>  )}\nexport default MyApp\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:18.437Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":1,"totalLines":15,"estimatedTokens":1267}}123{"id":"doc-use_contentstack_with_visual_editor_netlify_docs-abc3960d","source":"documentation","title":"Use Contentstack with Visual Editor | Netlify Docs","url":"https://docs.netlify.com/manage/visual-editor/content-sources/contentstack/","text":"Example:\n```text\n// stackbit.config.tsimport process from \"process\";import path from \"path\";import {  defineStackbitConfig,  DocumentStringLikeFieldNonLocalized,  SiteMapEntry} from \"@stackbit/types\";import { ContentstackContentSource } from \"@stackbit/cms-contentstack\";\nrequire(\"dotenv\").config({ path: path.resolve(process.cwd(), \".env\") });\nexport default defineStackbitConfig({  stackbitVersion: \"~0.5.0\",  ssgName: \"nextjs\",  nodeVersion: \"18\",  styleObjectModelName: \"siteConfig\",  contentSources: [    new ContentstackContentSource({      apiKey: process.env.CONTENTSTACK_API_KEY!,      managementToken: process.env.CONTENTSTACK_MANAGEMENT_TOKEN!,      authtoken: process.env.CONTENTSTACK_AUTHTOKEN,      branch: process.env.CONTENTSTACK_BRANCH!,      publishEnvironmentName: \"production\",      skipFetchOnStartIfCache: true    })  ],  sitemap: ({ documents }) => {    return documents.reduce((sitemap: SiteMapEntry[], document) => {      if (\"url\" in document.fields) {        const titleValue = (document.fields.title as          | DocumentStringLikeFieldNonLocalized          | undefined)?.value;        const urlValue = (document.fields          .url as DocumentStringLikeFieldNonLocalized).value;        sitemap.push({          label: titleValue,          urlPath: urlValue,          document: document        });      }      return sitemap;    }, []);  }});\n```\n\nExample:\n```text\nnpm install -D @stackbit/types @stackbit/cms-contentstack\n```\n\nExample:\n```text\nimport { ContentstackContentSource } from \"@stackbit/cms-contentstack\";\nnew ContentstackContentSource({  apiKey: \"...\",  managementToken: \"...\",  authtoken: \"...\",  branch: \"...\",  publishEnvironmentName: \"...\",  skipFetchOnStartIfCache: \"...\"});\n```\n\nExample:\n```text\n# .envCONTENTSTACK_API_KEY=\"...\"CONTENTSTACK_MANAGEMENT_TOKEN=\"...\"CONTENTSTACK_AUTHTOKEN=\"...\"CONTENTSTACK_BRANCH=\"...\"\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:18.452Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":4,"totalLines":24,"estimatedTokens":471}}124{"id":"doc-class_calendar_apps_script_google_for_developers-86898507","source":"documentation","title":"Class Calendar | Apps Script | Google for Developers","url":"https://developers.google.com/apps-script/reference/calendar/calendar","text":"Example:\n```text\n// Creates an all-day event for the moon landing and logs the ID.\nconst event = CalendarApp.getDefaultCalendar().createAllDayEvent(\n    'Apollo 11 Landing',\n    new Date('July 20, 1969'),\n);\nLogger.log(`Event ID: ${event.getId()}`);\n```\n\nExample:\n```text\n// Creates an all-day event for the Woodstock festival (August 15th to 17th) and\n// logs the ID.\nconst event = CalendarApp.getDefaultCalendar().createAllDayEvent(\n    'Woodstock Festival',\n    new Date('August 15, 1969'),\n    new Date('August 18, 1969'),\n);\nLogger.log(`Event ID: ${event.getId()}`);\n```\n\nExample:\n```text\n// Creates an all-day event for the Woodstock festival (August 15th to 17th) and\n// logs the ID.\nconst event = CalendarApp.getDefaultCalendar().createAllDayEvent(\n    'Woodstock Festival',\n    new Date('August 15, 1969'),\n    new Date('August 18, 1969'),\n    {location: 'Bethel, White Lake, New York, U.S.', sendInvites: true},\n);\nLogger.log(`Event ID: ${event.getId()}`);\n```\n\nExample:\n```text\n// Creates an all-day event for the moon landing and logs the ID.\nconst event = CalendarApp.getDefaultCalendar().createAllDayEvent(\n    'Apollo 11 Landing',\n    new Date('July 20, 1969'),\n    {location: 'The Moon'},\n);\nLogger.log(`Event ID: ${event.getId()}`);\n```\n\nExample:\n```text\n// Creates an event series for a no-meetings day, taking place every Wednesday\n// in 2013.\nconst eventSeries = CalendarApp.getDefaultCalendar().createAllDayEventSeries(\n    'No Meetings',\n    new Date('January 2, 2013 03:00:00 PM EST'),\n    CalendarApp.newRecurrence()\n        .addWeeklyRule()\n        .onlyOnWeekday(CalendarApp.Weekday.WEDNESDAY)\n        .until(new Date('January 1, 2014')),\n);\nLogger.log(`Event Series ID: ${eventSeries.getId()}`);\n```\n\nExample:\n```text\n// Creates an event series for a no-meetings day, taking place every Wednesday\n// in 2013.\nconst eventSeries = CalendarApp.getDefaultCalendar().createAllDayEventSeries(\n    'No Meetings',\n    new Date('January 2, 2013 03:00:00 PM EST'),\n    CalendarApp.newRecurrence()\n        .addWeeklyRule()\n        .onlyOnWeekday(CalendarApp.Weekday.WEDNESDAY)\n        .until(new Date('January 1, 2014')),\n    {guests: 'everyone@example.com'},\n);\nLogger.log(`Event Series ID: ${eventSeries.getId()}`);\n```\n\nExample:\n```text\n// Creates an event for the moon landing and logs the ID.\nconst event = CalendarApp.getDefaultCalendar().createEvent(\n    'Apollo 11 Landing',\n    new Date('July 20, 1969 20:00:00 UTC'),\n    new Date('July 21, 1969 21:00:00 UTC'),\n);\nLogger.log(`Event ID: ${event.getId()}`);\n```\n\nExample:\n```text\n// Creates an event for the moon landing and logs the ID.\nconst event = CalendarApp.getDefaultCalendar().createEvent(\n    'Apollo 11 Landing',\n    new Date('July 20, 1969 20:00:00 UTC'),\n    new Date('July 20, 1969 21:00:00 UTC'),\n    {location: 'The Moon'},\n);\nLogger.log(`Event ID: ${event.getId()}`);\n```\n\nExample:\n```text\n// Creates a new event and logs its ID.\nconst event = CalendarApp.getDefaultCalendar().createEventFromDescription(\n    'Lunch with Mary, Friday at 1PM',\n);\nLogger.log(`Event ID: ${event.getId()}`);\n```\n\nExample:\n```text\n// Creates an event series for a team meeting, taking place every Tuesday and\n// Thursday in 2013.\nconst eventSeries = CalendarApp.getDefaultCalendar().createEventSeries(\n    'Team Meeting',\n    new Date('January 1, 2013 03:00:00 PM EST'),\n    new Date('January 1, 2013 04:00:00 PM EST'),\n    CalendarApp.newRecurrence()\n        .addWeeklyRule()\n        .onlyOnWeekdays(\n            [CalendarApp.Weekday.TUESDAY, CalendarApp.Weekday.THURSDAY])\n        .until(new Date('January 1, 2014')),\n);\nLogger.log(`Event Series ID: ${eventSeries.getId()}`);\n```\n\nExample:\n```text\n// Creates an event series for a team meeting, taking place every Tuesday and\n// Thursday in 2013.\nconst eventSeries = CalendarApp.getDefaultCalendar().createEventSeries(\n    'Team Meeting',\n    new Date('January 1, 2013 03:00:00 PM EST'),\n    new Date('January 1, 2013 04:00:00 PM EST'),\n    CalendarApp.newRecurrence()\n        .addWeeklyRule()\n        .onlyOnWeekdays(\n            [CalendarApp.Weekday.TUESDAY, CalendarApp.Weekday.THURSDAY])\n        .until(new Date('January 1, 2014')),\n    {location: 'Conference Room'},\n);\nLogger.log(`Event Series ID: ${eventSeries.getId()}`);\n```\n\nExample:\n```text\n// Creates a calendar to delete.\nconst calendar = CalendarApp.createCalendar('Test');\n\n// Deletes the 'Test' calendar permanently.\ncalendar.deleteCalendar();\n```\n\nExample:\n```text\n// Opens the calendar by its ID.\n// TODO(developer): Replace the ID with your own.\nconst calendar = CalendarApp.getCalendarById('222larabrown@gmail.com');\n\n// Gets the color of the calendar and logs it to the console.\n// For the default calendar, you can use CalendarApp.getColor() instead.\nconst calendarColor = calendar.getColor();\nconsole.log(calendarColor);\n```\n\nExample:\n```text\n// Opens the calendar by its ID.\n// TODO(developer): Replace the ID with your own.\nconst calendar = CalendarApp.getCalendarById('222larabrown@gmail.com');\n\n// Sets the description of the calendar to 'Test description.'\ncalendar.setDescription('Test description');\n\n// Gets the description of the calendar and logs it to the console.\n// For the default calendar, you can use CalendarApp.getDescription() instead.\nconst description = calendar.getDescription();\nconsole.log(description);\n```\n\nExample:\n```text\n// Opens the calendar by its ID.\n// TODO(developer): Replace the ID with your own.\nconst calendar = CalendarApp.getCalendarById('222larabrown@gmail.com');\n\n// Creates an event for the moon landing.\nconst event = calendar.createEvent(\n    'Apollo 11 Landing',\n    new Date('July 20, 1969 20:05:00 UTC'),\n    new Date('July 20, 1969 20:17:00 UTC'),\n);\n\n// Gets the calendar event ID and logs it to the console.\nconst iCalId = event.getId();\nconsole.log(iCalId);\n\n// Gets the event by its ID and logs the title of the event to the console.\n// For the default calendar, you can use CalendarApp.getEventById(iCalId)\n// instead.\nconst myEvent = calendar.getEventById(iCalId);\nconsole.log(myEvent.getTitle());\n```\n\nExample:\n```text\n// Opens the calendar by its ID.\n// TODO(developer): Replace the ID with your own.\nconst calendar = CalendarApp.getCalendarById('222larabrown@gmail.com');\n\n// Creates an event series for a daily team meeting from 1 PM to 2 PM.\n// The series adds the daily event from January 1, 2023 through December 31,\n// 2023.\nconst eventSeries = calendar.createEventSeries(\n    'Team meeting',\n    new Date('Jan 1, 2023 13:00:00'),\n    new Date('Jan 1, 2023 14:00:00'),\n    CalendarApp.newRecurrence().addDailyRule().until(new Date('Jan 1, 2024')),\n);\n\n// Gets the ID of the event series.\nconst iCalId = eventSeries.getId();\n\n// Gets the event series by its ID and logs the series title to the console.\n// For the default calendar, you can use CalendarApp.getEventSeriesById(iCalId)\n// instead.\nconsole.log(calendar.getEventSeriesById(iCalId).getTitle());\n```\n\nExample:\n```text\n// Determines how many events are happening in the next two hours.\nconst now = new Date();\nconst twoHoursFromNow = new Date(now.getTime() + 2 * 60 * 60 * 1000);\nconst events = CalendarApp.getDefaultCalendar().getEvents(now, twoHoursFromNow);\nLogger.log(`Number of events: ${events.length}`);\n```\n\nExample:\n```text\n// Determines how many events are happening in the next two hours that contain\n// the term \"meeting\".\nconst now = new Date();\nconst twoHoursFromNow = new Date(now.getTime() + 2 * 60 * 60 * 1000);\nconst events = CalendarApp.getDefaultCalendar().getEvents(\n    now,\n    twoHoursFromNow,\n    {search: 'meeting'},\n);\nLogger.log(`Number of events: ${events.length}`);\n```\n\nExample:\n```text\n// Determines how many events are happening today.\nconst today = new Date();\nconst events = CalendarApp.getDefaultCalendar().getEventsForDay(today);\nLogger.log(`Number of events: ${events.length}`);\n```\n\nExample:\n```text\n// Determines how many events are happening today and contain the term\n// \"meeting\".\nconst today = new Date();\nconst events = CalendarApp.getDefaultCalendar().getEventsForDay(today, {\n  search: 'meeting',\n});\nLogger.log(`Number of events: ${events.length}`);\n```\n\nExample:\n```text\n// Opens the calendar by its ID.\n// To get the user's default calendar, use CalendarApp.getDefaultCalendar().\n// TODO(developer): Replace the ID with your own.\nconst calendar = CalendarApp.getCalendarById('222larabrown@gmail.com');\n\n// Gets the ID of the calendar and logs it to the console.\nconst calendarId = calendar.getId();\nconsole.log(calendarId);\n```\n\nExample:\n```text\n// Opens the calendar by its ID.\n// TODO(developer): Replace the ID with your own.\nconst calendar = CalendarApp.getCalendarById('222larabrown@gmail.com');\n\n// Gets the name of the calendar and logs it to the console.\n// For the default calendar, you can use CalendarApp.getName() instead.\nconst calendarName = calendar.getName();\nconsole.log(calendarName);\n```\n\nExample:\n```text\n// Opens the calendar by its ID.\n// TODO(developer): Replace the ID with your own.\nconst calendar = CalendarApp.getCalendarById('222larabrown@gmail.com');\n\n// Gets the time zone of the calendar and logs it to the console.\n// For the default calendar, you can use CalendarApp.getTimeZone() instead.\nconst timeZone = calendar.getTimeZone();\nconsole.log(timeZone);\n```\n\nExample:\n```text\n// Opens the calendar by its ID.\n// TODO(developer): Replace the ID with your own.\nconst calendar = CalendarApp.getCalendarById('222larabrown@gmail.com');\n\n// Determines whether the calendar is hidden in the user interface and logs it\n// to the console. For the default calendar, you can use CalendarApp.isHidden()\n// instead.\nconst isHidden = calendar.isHidden();\nconsole.log(isHidden);\n```\n\nExample:\n```text\n// Opens the calendar by its ID.\n// TODO(developer): Replace the ID with your own.\nconst calendar = CalendarApp.getCalendarById('222larabrown@gmail.com');\n\n// Determines whether the calendar is the default calendar for\n// the effective user and logs it to the console.\n// For the default calendar, you can use CalendarApp.isMyPrimaryCalendar()\n// instead.\nconst isMyPrimaryCalendar = calendar.isMyPrimaryCalendar();\nconsole.log(isMyPrimaryCalendar);\n```\n\nExample:\n```text\n// Gets a calendar by its ID. To get the user's default calendar, use\n// CalendarApp.getDefault() instead.\n// TODO(developer): Replace the ID with the calendar ID that you want to use.\nconst calendar = CalendarApp.getCalendarById(\n    'abc123456@group.calendar.google.com',\n);\n\n// Determines whether the calendar is owned by you and logs it.\nconsole.log(calendar.isOwnedByMe());\n```\n\nExample:\n```text\n// Gets the user's default calendar. To get a different calendar,\n// use getCalendarById() instead.\nconst calendar = CalendarApp.getDefaultCalendar();\n\n// Determines whether the calendar's events are displayed in the user interface\n// and logs it.\nconsole.log(calendar.isSelected());\n```\n\nExample:\n```text\n// Opens the calendar by its ID.\n// TODO(developer): Replace the ID with your own.\nconst calendar = CalendarApp.getCalendarById('222larabrown@gmail.com');\n\n// Sets the color of the calendar to pink using the Calendar Color enum.\n// For the default calendar, you can use CalendarApp.setColor() instead.\ncalendar.setColor(CalendarApp.Color.PINK);\n```\n\nExample:\n```text\n// Gets the user's default calendar. To get a different calendar,\n// use getCalendarById() instead.\nconst calendar = CalendarApp.getDefaultCalendar();\n\n// Sets the description of the calendar.\n// TODO(developer): Update the string with the description that you want to use.\ncalendar.setDescription('Updated calendar description.');\n```\n\nExample:\n```text\n// Gets the user's default calendar. To get a different calendar,\n// use getCalendarById() instead.\nconst calendar = CalendarApp.getDefaultCalendar();\n\n// Sets the name of the calendar.\n// TODO(developer): Update the string with the name that you want to use.\ncalendar.setName('Example calendar name');\n```\n\nExample:\n```text\n// Gets the user's default calendar. To get a different calendar,\n// use getCalendarById() instead.\nconst calendar = CalendarApp.getDefaultCalendar();\n\n// Selects the calendar so that its events are displayed in the user interface.\n// To unselect the calendar, set the parameter to false.\ncalendar.setSelected(true);\n```\n\nExample:\n```text\n// Gets the user's default calendar. To get a different calendar,\n// use getCalendarById() instead.\nconst calendar = CalendarApp.getDefaultCalendar();\n\n// Sets the time zone of the calendar to America/New York (US/Eastern) time.\ncalendar.setTimeZone('America/New_York');\n```\n\nExample:\n```text\n// Gets the calendar by its ID.\n// TODO(developer): Replace the calendar ID with the calendar ID that you want\n// to get.\nconst calendar = CalendarApp.getCalendarById(\n    'abc123456@group.calendar.google.com',\n);\n\n// Unsubscribes the user from the calendar.\nconst result = calendar.unsubscribeFromCalendar();\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:56.245Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":33,"totalLines":426,"estimatedTokens":3217}}125{"id":"doc-content_service_apps_script_google_for_developer-54b0a446","source":"documentation","title":"Content Service | Apps Script | Google for Developers","url":"https://developers.google.com/apps-script/service_content","text":"Example:\n```text\nfunction doGet() {\n  return ContentService.createTextOutput('Hello, world!');\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:56.264Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":1,"totalLines":8,"estimatedTokens":29}}126{"id":"doc-work_with_comments_and_suggestions_google_docs_g-ebc59813","source":"documentation","title":"Work with comments and suggestions | Google Docs | Google for Developers","url":"https://developers.google.com/workspace/docs/api/how-tos/suggestions","text":"Example:\n```text\n{\n \"tabs\": [\n  {\n   \"documentTab\": {\n    \"body\": {\n     \"content\": [\n      {\n       \"startIndex\": 1,\n       \"endIndex\": 31,\n       \"paragraph\": {\n        \"elements\": [\n         {\n          \"startIndex\": 1,\n          \"endIndex\": 31,\n          \"textRun\": {\n           \"content\": \"Text preceding the suggestion\\n\",\n           \"textStyle\": {}\n          }\n         }\n        ],\n        \"paragraphStyle\": {\n         \"namedStyleType\": \"NORMAL_TEXT\",\n         \"direction\": \"LEFT_TO_RIGHT\"\n        }\n       }\n      },\n      {\n       \"startIndex\": 31,\n       \"endIndex\": 51,\n       \"paragraph\": {\n        \"elements\": [\n         {\n          \"startIndex\": 31,\n          \"endIndex\": 50,\n          \"textRun\": {\n           \"content\": \"Suggested insertion\",\n           \"suggestedInsertionIds\": [\n            \"suggest.vcti8ewm4mww\"\n           ],\n           \"textStyle\": {}\n          }\n         },\n         {\n          \"startIndex\": 50,\n          \"endIndex\": 51,\n          \"textRun\": {\n           \"content\": \"\\n\",\n           \"textStyle\": {}\n          }\n         }\n        ],\n        \"paragraphStyle\": {\n         \"namedStyleType\": \"NORMAL_TEXT\",\n         \"direction\": \"LEFT_TO_RIGHT\"\n        }\n       }\n      },\n      {\n       \"startIndex\": 51,\n       \"endIndex\": 81,\n       \"paragraph\": {\n        \"elements\": [\n         {\n          \"startIndex\": 51,\n          \"endIndex\": 81,\n          \"textRun\": {\n           \"content\": \"Text following the suggestion\\n\",\n           \"textStyle\": {}\n          }\n         }\n        ],\n        \"paragraphStyle\": {\n         \"namedStyleType\": \"NORMAL_TEXT\",\n         \"direction\": \"LEFT_TO_RIGHT\"\n        }\n       }\n      }\n     ]\n    }\n   }\n  }\n ]\n},\n```\n\nExample:\n```text\n{\n \"tabs\": [\n  {\n   \"documentTab\": {\n    \"body\": {\n     \"content\": [\n      {\n       \"startIndex\": 1,\n       \"endIndex\": 31,\n       \"paragraph\": {\n        \"elements\": [\n         {\n          \"startIndex\": 1,\n          \"endIndex\": 31,\n          \"textRun\": {\n           \"content\": \"Text preceding the suggestion\\n\",\n           \"textStyle\": {}\n          }\n         }\n        ],\n        \"paragraphStyle\": {\n         \"namedStyleType\": \"NORMAL_TEXT\",\n         \"direction\": \"LEFT_TO_RIGHT\"\n        }\n       }\n      },\n      {\n       \"startIndex\": 31,\n       \"endIndex\": 32,\n       \"paragraph\": {\n        \"elements\": [\n         {\n          \"startIndex\": 31,\n          \"endIndex\": 32,\n          \"textRun\": {\n           \"content\": \"\\n\",\n           \"textStyle\": {}\n          }\n         }\n        ],\n        \"paragraphStyle\": {\n         \"namedStyleType\": \"NORMAL_TEXT\",\n         \"direction\": \"LEFT_TO_RIGHT\"\n        }\n       }\n      },\n      {\n       \"startIndex\": 32,\n       \"endIndex\": 62,\n       \"paragraph\": {\n        \"elements\": [\n         {\n          \"startIndex\": 32,\n          \"endIndex\": 62,\n          \"textRun\": {\n           \"content\": \"Text following the suggestion\\n\",\n           \"textStyle\": {}\n          }\n         }\n        ],\n        \"paragraphStyle\": {\n         \"namedStyleType\": \"NORMAL_TEXT\",\n         \"direction\": \"LEFT_TO_RIGHT\"\n        }\n       }\n      }\n     ]\n    }\n   }\n  }\n ]\n},\n```\n\nExample:\n```text\nfinal string SUGGEST_MODE = \"PREVIEW_WITHOUT_SUGGESTIONS\";\nDocument doc =\n    service\n        .documents()\n        .get(DOCUMENT_ID)\n        .setIncludeTabsContent(true)\n        .setSuggestionsViewMode(SUGGEST_MODE)\n        .execute();\n```\n\nExample:\n```text\nSUGGEST_MODE = \"PREVIEW_WITHOUT_SUGGESTIONS\"\nresult = (\n  service.documents()\n  .get(\n      documentId=DOCUMENT_ID,\n      includeTabsContent=True,\n      suggestionsViewMode=SUGGEST_MODE,\n  )\n  .execute()\n)\n```\n\nExample:\n```text\n[01] \"paragraph\": {\n[02]    \"elements\": [\n[03]        {\n[04]            \"endIndex\": 106,\n[05]            \"startIndex\": 82,\n[06]            \"textRun\": {\n[07]                \"content\": \"Some text that does not \",\n[08]                \"textStyle\": {}\n[09]            }\n[10]        },\n[11]        {\n[12]            \"endIndex\": 115,\n[13]            \"startIndex\": 106,\n[14]            \"textRun\": {\n[15]                \"content\": \"initially\",\n[16]                \"suggestedTextStyleChanges\": {\n[17]                    \"suggest.xymysbs9zldp\": {\n[18]                        \"textStyle\": {\n[19]                            \"backgroundColor\": {},\n[20]                            \"baselineOffset\": \"NONE\",\n[21]                            \"bold\": true,\n[22]                            \"fontSize\": {\n[23]                                \"magnitude\": 11,\n[24]                                \"unit\": \"PT\"\n[25]                            },\n[26]                            \"foregroundColor\": {\n[27]                                \"color\": {\n[28]                                    \"rgbColor\": {}\n[29]                                }\n[30]                            },\n[31]                            \"italic\": false,\n[32]                            \"smallCaps\": false,\n[33]                            \"strikethrough\": false,\n[34]                            \"underline\": false\n[35]                        },\n[36]                        \"textStyleSuggestionState\": {\n[37]                            \"boldSuggested\": true,\n[38]                            \"weightedFontFamilySuggested\": true\n[39]                        }\n[40]                    }\n[41]                },\n[42]                \"textStyle\": {\n[43]                    \"italic\": true\n[44]                }\n[45]            }\n[46]        },\n[47]        {\n[48]            \"endIndex\": 143,\n[49]            \"startIndex\": 115,\n[50]            \"textRun\": {\n[51]                \"content\": \" contain any boldface text.\\n\",\n[52]                \"textStyle\": {}\n[53]            }\n[54]        }\n[55]    ],\n[56]    \"paragraphStyle\": {\n[57]        \"direction\": \"LEFT_TO_RIGHT\",\n[58]        \"namedStyleType\": \"NORMAL_TEXT\"\n[59]    }\n[60] }\n```\n\nExample:\n```text\n{\n  \"requests\": [\n    {\n      \"insertComment\": {\n        \"content\": \"This is a comment added via the API.\",\n        \"range\": {\n          \"startIndex\": 10,\n          \"endIndex\": 25\n        }\n      }\n    }\n  ]\n}\n```\n\nExample:\n```text\n{\n  \"requests\": [\n    {\n      \"insertComment\": {\n        \"content\": \"Please review this paragraph.\",\n        \"assigneeEmailAddress\": \"user@example.com\",\n        \"range\": {\n          \"startIndex\": 10,\n          \"endIndex\": 25\n        }\n      }\n    }\n  ]\n}\n```\n\nExample:\n```text\n{\n  \"requests\": [\n    {\n      \"addCommentReply\": {\n        \"commentId\": \"comment_thread_id\",\n        \"post\": {\n          \"content\": \"Replying to the comment thread.\"\n        }\n      }\n    }\n  ]\n}\n```\n\nExample:\n```text\n{\n  \"requests\": [\n    {\n      \"addCommentReply\": {\n        \"commentId\": \"comment_thread_id\",\n        \"post\": {\n          \"commentAction\": \"RESOLVE\"\n        }\n      }\n    }\n  ]\n}\n```\n\nExample:\n```text\n{\n  \"requests\": [\n    {\n      \"addCommentReply\": {\n        \"commentId\": \"comment_thread_id\",\n        \"post\": {\n          \"content\": \"Replying to the comment thread.\",\n          \"assigneeEmail\": \"user@example.com\"\n        }\n      }\n    }\n  ]\n}\n```\n\nExample:\n```text\n{\n  \"requests\": [\n    {\n      \"updateCommentPost\": {\n        \"commentId\": \"comment_thread_id\",\n        \"postId\": \"post_id\",\n        \"content\": \"This is the updated comment text.\"\n      }\n    }\n  ]\n}\n```\n\nExample:\n```text\n{\n  \"requests\": [\n    {\n      \"deleteComment\": {\n        \"commentId\": \"comment_thread_id\"\n      }\n    }\n  ]\n}\n```\n\nExample:\n```text\n{\n  \"requests\": [\n    {\n      \"insertText\": {\n        \"text\": \"suggested insertion text\",\n        \"location\": {\n          \"index\": 1\n        }\n      }\n    }\n  ],\n  \"writeControl\": {\n    \"writeMode\": \"SUGGEST\"\n  }\n}\n```\n\nExample:\n```text\n{\n  \"requests\": [\n    {\n      \"acceptSuggestion\": {\n        \"suggestionId\": \"suggestion_thread_id\"\n      }\n    }\n  ]\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:56.353Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":14,"totalLines":398,"estimatedTokens":1926}}127{"id":"doc-npm_stars_npm_docs-274f5bb5","source":"documentation","title":"npm-stars | npm Docs","url":"https://docs.npmjs.com/cli/v11/commands/npm-stars","text":"Example:\n```bash\nnpm stars [<user>]\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:19.431Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":1,"totalLines":6,"estimatedTokens":14}}128{"id":"doc-run_command_opensearch_documentation-b7bd761e","source":"documentation","title":"run command | OpenSearch Documentation","url":"https://docs.opensearch.org/latest/benchmark/reference/commands/run/","text":"OpenSearch Menu About Releases Roadmap FAQ Platform Search Observability Security Analytics Vector Database Playground Demo Performance Benchmarks Community Forum Slack Events Solutions Providers Projects Members Documentation OpenSearch and Dashboards Data Prepper Clients Benchmark Migration Assistant Blog Download\n\nOpenSearch Links Get Involved Code of Conduct Forum GitHub Slack Resources About Release Schedule Maintenance Policy FAQ Testimonials Trademark and Brand Policy Privacy Contact Us Connect Twitter LinkedIn YouTube Meetup Facebook Copyright © OpenSearch Project a Series of LF Projects, LLC For web site terms of use, trademark policy and other project policies please see https://lfprojects.org.\n\nExample:\n```text\nopensearch-benchmark run --workload=geonames --test-mode\n```\n\nExample:\n```text\n------------------------------------------------------\n    _______             __   _____\n   / ____(_)___  ____ _/ /  / ___/_________  ________\n  / /_  / / __ \\/ __ `/ /   \\__ \\/ ___/ __ \\/ ___/ _ \\\n / __/ / / / / / /_/ / /   ___/ / /__/ /_/ / /  /  __/\n/_/   /_/_/ /_/\\__,_/_/   /____/\\___/\\____/_/   \\___/\n------------------------------------------------------\n\n|                         Metric |                 Task |     Value |   Unit |\n|-------------------------------:|---------------------:|----------:|-------:|\n|            Total indexing time |                      |   28.0997 |    min |\n|               Total merge time |                      |   6.84378 |    min |\n|             Total refresh time |                      |   3.06045 |    min |\n|               Total flush time |                      |  0.106517 |    min |\n|      Total merge throttle time |                      |   1.28193 |    min |\n|               Median CPU usage |                      |     471.6 |      % |\n|             Total Young Gen GC |                      |    16.237 |      s |\n|               Total Old Gen GC |                      |     1.796 |      s |\n|                     Index size |                      |   2.60124 |     GB |\n|                  Total written |                      |   11.8144 |     GB |\n|         Heap used for segments |                      |   14.7326 |     MB |\n|       Heap used for doc values |                      |  0.115917 |     MB |\n|            Heap used for terms |                      |   13.3203 |     MB |\n|            Heap used for norms |                      | 0.0734253 |     MB |\n|           Heap used for points |                      |    0.5793 |     MB |\n|    Heap used for stored fields |                      |  0.643608 |     MB |\n|                  Segment count |                      |        97 |        |\n|                 Min Throughput |         index-append |   31925.2 | docs/s |\n|              Median Throughput |         index-append |   39137.5 | docs/s |\n|                 Max Throughput |         index-append |   39633.6 | docs/s |\n|      50.0th percentile latency |         index-append |   872.513 |     ms |\n|      90.0th percentile latency |         index-append |   1457.13 |     ms |\n|      99.0th percentile latency |         index-append |   1874.89 |     ms |\n|       100th percentile latency |         index-append |   2711.71 |     ms |\n| 50.0th percentile service time |         index-append |   872.513 |     ms |\n| 90.0th percentile service time |         index-append |   1457.13 |     ms |\n| 99.0th percentile service time |         index-append |   1874.89 |     ms |\n|  100th percentile service time |         index-append |   2711.71 |     ms |\n|                           ...  |                  ... |       ... |    ... |\n|                           ...  |                  ... |       ... |    ... |\n|                 Min Throughput |     painless_dynamic |   2.53292 |  ops/s |\n|              Median Throughput |     painless_dynamic |   2.53813 |  ops/s |\n|                 Max Throughput |     painless_dynamic |   2.54401 |  ops/s |\n|      50.0th percentile latency |     painless_dynamic |    172208 |     ms |\n|      90.0th percentile latency |     painless_dynamic |    310401 |     ms |\n|      99.0th percentile latency |     painless_dynamic |    341341 |     ms |\n|      99.9th percentile latency |     painless_dynamic |    344404 |     ms |\n|       100th percentile latency |     painless_dynamic |    344754 |     ms |\n| 50.0th percentile service time |     painless_dynamic |    393.02 |     ms |\n| 90.0th percentile service time |     painless_dynamic |   407.579 |     ms |\n| 99.0th percentile service time |     painless_dynamic |   430.806 |     ms |\n| 99.9th percentile service time |     painless_dynamic |   457.352 |     ms |\n|  100th percentile service time |     painless_dynamic |   459.474 |     ms |\n\n-------------------------------------\n[INFO] ✅ SUCCESS (took 2634 seconds)\n-------------------------------------\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:22.303Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":2,"totalLines":71,"estimatedTokens":1216}}129{"id":"doc-aws_lambda_processor_opensearch_documentation-6f4b43c4","source":"documentation","title":"AWS Lambda processor | OpenSearch Documentation","url":"https://docs.opensearch.org/latest/data-prepper/pipelines/configuration/processors/aws-lambda/","text":"OpenSearch Menu About Releases Roadmap FAQ Platform Search Observability Security Analytics Vector Database Playground Demo Performance Benchmarks Community Forum Slack Events Solutions Providers Projects Members Documentation OpenSearch and Dashboards Data Prepper Clients Benchmark Migration Assistant Blog Download\n\nOpenSearch Links Get Involved Code of Conduct Forum GitHub Slack Resources About Release Schedule Maintenance Policy FAQ Testimonials Trademark and Brand Policy Privacy Contact Us Connect Twitter LinkedIn YouTube Meetup Facebook Copyright © OpenSearch Project a Series of LF Projects, LLC For web site terms of use, trademark policy and other project policies please see https://lfprojects.org.\n\nExample:\n```text\nprocessors:\n  - aws_lambda:\n      function_name: my-lambda-function\n      response_events_match: false\n      response_mode: replace\n      aws:\n        region: us-east-1\n        sts_role_arn: arn:aws:iam::123456789012:role/my-lambda-role\n      client:\n        max_retries: 3\n        api_call_timeout: PT60S\n        api_call_attempt_timeout: PT30S  # Optional: per-attempt timeout\n        connection_timeout: PT60S\n        read_timeout: PT15M              # Optional: for long-running Lambda functions\n        max_concurrency: 200\n        base_delay: \"PT0.1S\"\n        max_backoff: \"PT20S\"\n      batch:\n        key_name: events\n        threshold:\n          event_count: 100\n          maximum_size: 5mb\n          event_collect_timeout: PT10S\n      lambda_when: \"/some_key == null\"\n      keys: [\"key1\", \"key2\"]\n      cache:\n        ttl: 3600\n        max_size: 5242880\n      circuit_breaker_retries: 0\n      circuit_breaker_wait_interval: 1000\n      tags_on_failure: [\"lambda_failed\"]\n```\n\nExample:\n```text\n{\n  \"events\": [\n    {\"field1\": \"value1\", \"field2\": \"value2\"},\n    {\"field1\": \"value3\", \"field2\": \"value4\"}\n  ]\n}\n```\n\nExample:\n```text\ndef lambda_handler(event, context):\n    # Process all input events and return new events\n    return [\n        {\"result\": \"processed_data_1\"},\n        {\"result\": \"processed_data_2\"}\n    ]\n```\n\nExample:\n```text\ndef lambda_handler(event, context):\n    input_events = event.get('events', [])\n    output = []\n\n    # Process each event and maintain order\n    for input_event in input_events:\n        processed_event = input_event.copy()\n        processed_event[\"status\"] = \"processed\"\n        # Transform data as needed\n        for key, value in input_event.items():\n            if isinstance(value, str):\n                processed_event[key] = value.upper()\n        output.append(processed_event)\n\n    # Must return same count as input\n    return output\n```\n\nExample:\n```text\ndef lambda_handler(event, context):\n    # Get events from the configured key_name (default: \"events\")\n    input_events = event.get('events', [])\n    output_events = []\n\n    for input_event in input_events:\n        # Add transformation marker\n        input_event[\"_transformed_\"] = True\n\n        # Transform string fields to uppercase\n        for key, value in input_event.items():\n            if isinstance(value, str):\n                input_event[key] = value.upper()\n\n        output_events.append(input_event)\n\n    return output_events\n```\n\nExample:\n```text\n./gradlew :data-prepper-plugins:aws-lambda:integrationTest -Dtests.processor.lambda.region=\"us-east-1\" -Dtests.processor.lambda.functionName=\"lambda_test_function\"  -Dtests.processor.lambda.sts_role_arn=\"arn:aws:iam::123456789012:role/dataprepper-role\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:22.333Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":6,"totalLines":106,"estimatedTokens":867}}130{"id":"doc-kinesis_source_opensearch_documentation-db8b8e4e","source":"documentation","title":"Kinesis source | OpenSearch Documentation","url":"https://docs.opensearch.org/latest/data-prepper/pipelines/configuration/sources/kinesis/","text":"OpenSearch Menu About Releases Roadmap FAQ Platform Search Observability Security Analytics Vector Database Playground Demo Performance Benchmarks Community Forum Slack Events Solutions Providers Projects Members Documentation OpenSearch and Dashboards Data Prepper Clients Benchmark Migration Assistant Blog Download\n\nOpenSearch Links Get Involved Code of Conduct Forum GitHub Slack Resources About Release Schedule Maintenance Policy FAQ Testimonials Trademark and Brand Policy Privacy Contact Us Connect Twitter LinkedIn YouTube Meetup Facebook Copyright © OpenSearch Project a Series of LF Projects, LLC For web site terms of use, trademark policy and other project policies please see https://lfprojects.org.\n\nExample:\n```text\nversion: \"2\"\nkinesis-pipeline:\n  source:\n    kinesis:\n      streams:\n        - stream_name: \"stream1\"\n          initial_position: \"LATEST\"\n        - stream_name: \"stream2\"\n          initial_position: \"LATEST\"\n      aws:\n        region: \"us-west-2\"\n        sts_role_arn: \"arn:aws:iam::123456789012:role/my-iam-role\"\n```\n\nExample:\n```text\n{\n  \"Version\": \"2012-10-17\",\n  \"Statement\": [\n    {\n      \"Effect\": \"Allow\",\n      \"Action\": [\n        \"kinesis:DescribeStream\",\n        \"kinesis:DescribeStreamConsumer\",\n        \"kinesis:DescribeStreamSummary\",\n        \"kinesis:GetRecords\",\n        \"kinesis:GetShardIterator\",\n        \"kinesis:ListShards\",\n        \"kinesis:ListStreams\",\n        \"kinesis:ListStreamConsumers\",\n        \"kinesis:RegisterStreamConsumer\",\n        \"kinesis:SubscribeToShard\"\n      ],\n      \"Resource\": [\n        \"arn:aws:kinesis:us-east-1:{account-id}:stream/stream1\",\n        \"arn:aws:kinesis:us-east-1:{account-id}:stream/stream2\"\n      ]\n    },\n    {\n      \"Sid\": \"allowCreateTable\",\n      \"Effect\": \"Allow\",\n      \"Action\": [\n        \"dynamodb:CreateTable\",\n        \"dynamodb:PutItem\",\n        \"dynamodb:DescribeTable\",\n        \"dynamodb:DeleteItem\",\n        \"dynamodb:GetItem\",\n        \"dynamodb:Scan\",\n        \"dynamodb:UpdateItem\",\n        \"dynamodb:Query\"\n      ],\n      \"Resource\": [\n        \"arn:aws:dynamodb:us-east-1:{account-id}:table/kinesis-pipeline\"\n      ]\n    }\n  ]\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:22.344Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":2,"totalLines":66,"estimatedTokens":538}}131{"id":"doc-sampling_opensearch_documentation-3204d5f0","source":"documentation","title":"Sampling | OpenSearch Documentation","url":"https://docs.opensearch.org/latest/data-prepper/common-use-cases/sampling/","text":"OpenSearch Menu About Releases Roadmap FAQ Platform Search Observability Security Analytics Vector Database Playground Demo Performance Benchmarks Community Forum Slack Events Solutions Providers Projects Members Documentation OpenSearch and Dashboards Data Prepper Clients Benchmark Migration Assistant Blog Download\n\nOpenSearch Links Get Involved Code of Conduct Forum GitHub Slack Resources About Release Schedule Maintenance Policy FAQ Testimonials Trademark and Brand Policy Privacy Contact Us Connect Twitter LinkedIn YouTube Meetup Facebook Copyright © OpenSearch Project a Series of LF Projects, LLC For web site terms of use, trademark policy and other project policies please see https://lfprojects.org.\n\nExample:\n```text\n...\n  processor:\n   - aggregate:                                                                                                                                          \n        identification_keys: [\"clientip\"]                                                                                                      \n        action:                                                                                                                                           \n          rate_limiter:                                                                                                                                   \n            events_per_second: 100                                                                                                                        \n            when_exceeds: drop\n        when: \"/status == 200\"  \n...\n```\n\nExample:\n```text\n...\n  processor:\n  - aggregate:                                                                                                                                          \n        identification_keys: [\"clientip\"]  \n        duration :                                                                                                    \n        action:                                                                                                                                           \n          percent_sampler:                                                                                                                                   \n            percent: 20                                                                                                                        \n        when: \"/status == 200\" \n...\n```\n\nExample:\n```text\n...\n  processor:\n   - aggregate:                                                                                                                                          \n        identification_keys: [\"traceId\"]                                                                                                                   \n        action:                                                                                                                                           \n          tail_sampler:                                                                                                                                   \n            percent: 20                                                                                                                                   \n            wait_period: \"10s\"                                                                                                                            \n            condition: \"/status == 2\"                                                                                                              \n          \n...\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:22.347Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":3,"totalLines":48,"estimatedTokens":895}}132{"id":"doc-create_or_update_memory_api_opensearch_documenta-d038475a","source":"documentation","title":"Create Or Update Memory API | OpenSearch Documentation","url":"https://docs.opensearch.org/latest/ml-commons-plugin/api/memory-apis/create-memory/","text":"OpenSearch Menu About Releases Roadmap FAQ Platform Search Observability Security Analytics Vector Database Playground Demo Performance Benchmarks Community Forum Slack Events Solutions Providers Projects Members Documentation OpenSearch and Dashboards Data Prepper Clients Benchmark Migration Assistant Blog Download\n\nOpenSearch Links Get Involved Code of Conduct Forum GitHub Slack Resources About Release Schedule Maintenance Policy FAQ Testimonials Trademark and Brand Policy Privacy Contact Us Connect Twitter LinkedIn YouTube Meetup Facebook Copyright © OpenSearch Project a Series of LF Projects, LLC For web site terms of use, trademark policy and other project policies please see https://lfprojects.org.\n\nExample:\n```text\nPOST /_plugins/_ml/memory/\nPUT /_plugins/_ml/memory/{memory_id}\n```\n\nExample:\n```text\nPOST /_plugins/_ml/memory/\n{\n  \"name\": \"Conversation for a RAG pipeline\"\n}\n```\n\nExample:\n```text\n{\n  \"memory_id\": \"gW8Aa40BfUsSoeNTvOKI\"\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:22.382Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":3,"totalLines":26,"estimatedTokens":244}}133{"id":"doc-undeploy_model_api_opensearch_documentation-4e86ab3a","source":"documentation","title":"Undeploy Model API | OpenSearch Documentation","url":"https://docs.opensearch.org/latest/ml-commons-plugin/api/model-apis/undeploy-model/","text":"OpenSearch Menu About Releases Roadmap FAQ Platform Search Observability Security Analytics Vector Database Playground Demo Performance Benchmarks Community Forum Slack Events Solutions Providers Projects Members Documentation OpenSearch and Dashboards Data Prepper Clients Benchmark Migration Assistant Blog Download\n\nOpenSearch Links Get Involved Code of Conduct Forum GitHub Slack Resources About Release Schedule Maintenance Policy FAQ Testimonials Trademark and Brand Policy Privacy Contact Us Connect Twitter LinkedIn YouTube Meetup Facebook Copyright © OpenSearch Project a Series of LF Projects, LLC For web site terms of use, trademark policy and other project policies please see https://lfprojects.org.\n\nExample:\n```text\nPOST /_plugins/_ml/models/{model_id}/_undeploy\n```\n\nExample:\n```text\nPOST /_plugins/_ml/models/MGqJhYMBbbh0ushjm8p_/_undeploy\n```\n\nExample:\n```text\nPOST /_plugins/_ml/models/_undeploy\n{\n  \"node_ids\": [\"sv7-3CbwQW-4PiIsDOfLxQ\"],\n  \"model_ids\": [\"KDo2ZYQB-v9VEDwdjkZ4\"]\n}\n```\n\nExample:\n```text\n{\n  \"model_ids\": [\"KDo2ZYQB-v9VEDwdjkZ4\"]\n}\n```\n\nExample:\n```text\n{\n  \"sv7-3CbwQW-4PiIsDOfLxQ\" : {\n    \"stats\" : {\n      \"KDo2ZYQB-v9VEDwdjkZ4\" : \"UNDEPLOYED\"\n    }\n  }\n}\n```\n\nExample:\n```text\nPUT /_cluster/settings\n{\n    \"persistent\": {\n        \"plugins.ml_commons.sync_up_job_interval_in_seconds\": 10\n    }\n}\n```\n\nExample:\n```text\nPOST /_plugins/_ml/models/_register\n {\n   \"name\": \"Sample Model Name\",\n   \"function_name\": \"remote\",\n   \"description\": \"test model\",\n   \"connector_id\": \"-g1nOo8BOaAC5MIJ3_4R\",\n   \"deploy_setting\": {\"model_ttl_minutes\": 100}\n }\n```\n\nExample:\n```text\nPUT /_plugins/_ml/models/COj7K48BZzNMh1sWedLK\n{\n    \"deploy_setting\": {\"model_ttl_minutes\" : 100}\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:22.432Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":8,"totalLines":72,"estimatedTokens":431}}134{"id":"doc-ml_commons_stats_api_opensearch_documentation-1d3eef05","source":"documentation","title":"ML Commons Stats API | OpenSearch Documentation","url":"https://docs.opensearch.org/latest/ml-commons-plugin/api/stats/","text":"OpenSearch Menu About Releases Roadmap FAQ Platform Search Observability Security Analytics Vector Database Playground Demo Performance Benchmarks Community Forum Slack Events Solutions Providers Projects Members Documentation OpenSearch and Dashboards Data Prepper Clients Benchmark Migration Assistant Blog Download\n\nOpenSearch Links Get Involved Code of Conduct Forum GitHub Slack Resources About Release Schedule Maintenance Policy FAQ Testimonials Trademark and Brand Policy Privacy Contact Us Connect Twitter LinkedIn YouTube Meetup Facebook Copyright © OpenSearch Project a Series of LF Projects, LLC For web site terms of use, trademark policy and other project policies please see https://lfprojects.org.\n\nExample:\n```text\nGET /_plugins/_ml/stats\nGET /_plugins/_ml/stats/{stat}\nGET /_plugins/_ml/{nodeId}/stats/\nGET /_plugins/_ml/{nodeId}/stats/{stat}\n```\n\nExample:\n```text\nGET /_plugins/_ml/stats\n```\n\nExample:\n```text\n{\n  \"zbduvgCCSOeu6cfbQhTpnQ\" : {\n    \"ml_executing_task_count\" : 0\n  },\n  \"54xOe0w8Qjyze00UuLDfdA\" : {\n    \"ml_executing_task_count\" : 0\n  },\n  \"UJiykI7bTKiCpR-rqLYHyw\" : {\n    \"ml_executing_task_count\" : 0\n  },\n  \"zj2_NgIbTP-StNlGZJlxdg\" : {\n    \"ml_executing_task_count\" : 0\n  },\n  \"jjqFrlW7QWmni1tRnb_7Dg\" : {\n    \"ml_executing_task_count\" : 0\n  },\n  \"3pSSjl5PSVqzv5-hBdFqyA\" : {\n    \"ml_executing_task_count\" : 0\n  },\n  \"A_IiqoloTDK01uZvCjREaA\" : {\n    \"ml_executing_task_count\" : 0\n  }\n}\n```\n\nExample:\n```text\nGET /_plugins/_ml/{nodeId}/stats/\n```\n\nExample:\n```text\nGET /_plugins/_ml/{nodeId}/stats/{stat}\n```\n\nExample:\n```text\nGET /_plugins/_ml/stats/{stat}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:22.525Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":6,"totalLines":60,"estimatedTokens":403}}135{"id":"doc-using_query_workbench_opensearch_documentation-97ae78bd","source":"documentation","title":"Using Query Workbench | OpenSearch Documentation","url":"https://docs.opensearch.org/latest/dashboards/query-workbench/","text":"OpenSearch Menu About Releases Roadmap FAQ Platform Search Observability Security Analytics Vector Database Playground Demo Performance Benchmarks Community Forum Slack Events Solutions Providers Projects Members Documentation OpenSearch and Dashboards Data Prepper Clients Benchmark Migration Assistant Blog Download\n\nOpenSearch Links Get Involved Code of Conduct Forum GitHub Slack Resources About Release Schedule Maintenance Policy FAQ Testimonials Trademark and Brand Policy Privacy Contact Us Connect Twitter LinkedIn YouTube Meetup Facebook Copyright © OpenSearch Project a Series of LF Projects, LLC For web site terms of use, trademark policy and other project policies please see https://lfprojects.org.\n\nExample:\n```text\nPUT accounts/_bulk?refresh\n{\"index\":{\"_id\":\"1\"}}\n{\"account_number\":1,\"balance\":39225,\"firstname\":\"Amber\",\"lastname\":\"Duke\",\"age\":32,\"gender\":\"M\",\"address\":\"880 Holmes Lane\",\"employer\":\"Pyrami\",\"email\":\"amberduke@pyrami.com\",\"city\":\"Brogan\",\"state\":\"IL\"}\n{\"index\":{\"_id\":\"6\"}}\n{\"account_number\":6,\"balance\":5686,\"firstname\":\"Hattie\",\"lastname\":\"Bond\",\"age\":36,\"gender\":\"M\",\"address\":\"671 Bristol Street\",\"employer\":\"Netagy\",\"email\":\"hattiebond@netagy.com\",\"city\":\"Dante\",\"state\":\"TN\"}\n{\"index\":{\"_id\":\"13\"}}\n{\"account_number\":13,\"balance\":32838,\"firstname\":\"Nanette\",\"lastname\":\"Bates\",\"age\":28,\"gender\":\"F\",\"address\":\"789 Madison Street\",\"employer\":\"Quility\",\"email\":\"nanettebates@quility.com\",\"city\":\"Nogal\",\"state\":\"VA\"}\n{\"index\":{\"_id\":\"18\"}}\n{\"account_number\":18,\"balance\":4180,\"firstname\":\"Dale\",\"lastname\":\"Adams\",\"age\":33,\"gender\":\"M\",\"address\":\"467 Hutchinson Court\",\"email\":\"daleadams@boink.com\",\"city\":\"Orick\",\"state\":\"MD\"}\n```\n\nExample:\n```text\nSELECT\n   firstname,\n   lastname,\n   balance\n FROM\n   accounts\n WHERE\n   balance > 10000\n ORDER BY\n   balance DESC;\n```\n\nExample:\n```text\nsearch source=accounts\n | where age > 18\n | fields firstname, lastname\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:22.551Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":3,"totalLines":39,"estimatedTokens":479}}136{"id":"doc-using_flow_agents_for_agentic_search_opensearch_-c3b65d52","source":"documentation","title":"Using flow agents for agentic search | OpenSearch Documentation","url":"https://docs.opensearch.org/latest/vector-search/ai-search/agentic-search/flow-agent/","text":"OpenSearch Menu About Releases Roadmap FAQ Platform Search Observability Security Analytics Vector Database Playground Demo Performance Benchmarks Community Forum Slack Events Solutions Providers Projects Members Documentation OpenSearch and Dashboards Data Prepper Clients Benchmark Migration Assistant Blog Download\n\nOpenSearch Links Get Involved Code of Conduct Forum GitHub Slack Resources About Release Schedule Maintenance Policy FAQ Testimonials Trademark and Brand Policy Privacy Contact Us Connect Twitter LinkedIn YouTube Meetup Facebook Copyright © OpenSearch Project a Series of LF Projects, LLC For web site terms of use, trademark policy and other project policies please see https://lfprojects.org.\n\nExample:\n```text\nPOST /_plugins/_flow_framework/workflow?use_case=agentic_search_with_flow_agent&provision=true\n{\n  \"create_connector.credential.access_key\": \"<your-aws-access-key>\",\n  \"create_connector.credential.secret_key\": \"<your-aws-secret-key>\",\n  \"create_connector.credential.session_token\": \"<your-aws-session-token>\"\n}\n```\n\nExample:\n```text\n{\n  \"workflow_id\" : \"abc123\"\n}\n```\n\nExample:\n```text\nGET /_plugins/_flow_framework/workflow/abc123/_status\n```\n\nExample:\n```text\nPUT /products-index\n{\n  \"settings\": {\n    \"number_of_shards\": \"4\",\n    \"number_of_replicas\": \"2\"\n  },\n  \"mappings\": {\n    \"properties\": {\n      \"product_name\": { \"type\": \"text\" },\n      \"description\": { \"type\": \"text\" },\n      \"price\": { \"type\": \"float\" },\n      \"currency\": { \"type\": \"keyword\" },\n      \"rating\": { \"type\": \"float\" },\n      \"review_count\": { \"type\": \"integer\" },\n      \"in_stock\": { \"type\": \"boolean\" },\n      \"color\": { \"type\": \"keyword\" },\n      \"size\": { \"type\": \"keyword\" },\n      \"category\": { \"type\": \"keyword\" },\n      \"brand\": { \"type\": \"keyword\" },\n      \"tags\": { \"type\": \"keyword\" }\n    }\n  }\n}\n```\n\nExample:\n```text\nPOST _bulk\n{ \"index\": { \"_index\": \"products-index\", \"_id\": \"1\" } }\n{ \"product_name\": \"Nike Air Max 270\", \"description\": \"Comfortable running shoes with Air Max technology\", \"price\": 150.0, \"currency\": \"USD\", \"rating\": 4.5, \"review_count\": 1200, \"in_stock\": true, \"color\": \"white\", \"size\": \"10\", \"category\": \"shoes\", \"brand\": \"Nike\", \"tags\": [\"running\", \"athletic\", \"comfortable\"] }\n{ \"index\": { \"_index\": \"products-index\", \"_id\": \"2\" } }\n{ \"product_name\": \"Adidas Ultraboost 22\", \"description\": \"Premium running shoes with Boost midsole\", \"price\": 180.0, \"currency\": \"USD\", \"rating\": 4.7, \"review_count\": 850, \"in_stock\": true, \"color\": \"black\", \"size\": \"9\", \"category\": \"shoes\", \"brand\": \"Adidas\", \"tags\": [\"running\", \"premium\", \"boost\"] }\n{ \"index\": { \"_index\": \"products-index\", \"_id\": \"3\" } }\n{ \"product_name\": \"Converse Chuck Taylor\", \"description\": \"Classic canvas sneakers\", \"price\": 65.0, \"currency\": \"USD\", \"rating\": 4.2, \"review_count\": 2100, \"in_stock\": true, \"color\": \"white\", \"size\": \"8\", \"category\": \"shoes\", \"brand\": \"Converse\", \"tags\": [\"casual\", \"classic\", \"canvas\"] }\n{ \"index\": { \"_index\": \"products-index\", \"_id\": \"4\" } }\n{ \"product_name\": \"Puma RS-X\", \"description\": \"Retro-inspired running shoes with modern comfort\", \"price\": 120.0, \"currency\": \"USD\", \"rating\": 4.3, \"review_count\": 750, \"in_stock\": true, \"color\": \"black\", \"size\": \"9\", \"category\": \"shoes\", \"brand\": \"Puma\", \"tags\": [\"retro\", \"running\", \"comfortable\"] }\n```\n\nExample:\n```text\nPOST /_plugins/_ml/models/_register\n{\n  \"name\": \"My OpenAI model: gpt-5\",\n  \"function_name\": \"remote\",\n  \"description\": \"test model\",\n  \"connector\": {\n    \"name\": \"My openai connector: gpt-5\",\n    \"description\": \"The connector to openai chat model\",\n    \"version\": 1,\n    \"protocol\": \"http\",\n    \"parameters\": {\n      \"model\": \"gpt-5\"\n    },\n    \"credential\": {\n      \"openAI_key\": \"<OPEN AI KEY>\"\n    },\n    \"actions\": [\n      {\n        \"action_type\": \"predict\",\n        \"method\": \"POST\",\n        \"url\": \"https://api.openai.com/v1/chat/completions\",\n        \"headers\": {\n          \"Authorization\": \"Bearer ${credential.openAI_key}\"\n        },\n        \"request_body\": \"{ \\\"model\\\": \\\"${parameters.model}\\\", \\\"messages\\\": [{\\\"role\\\":\\\"developer\\\",\\\"content\\\":\\\"${parameters.system_prompt}\\\"},${parameters._chat_history:-}{\\\"role\\\":\\\"user\\\",\\\"content\\\":\\\"${parameters.user_prompt}\\\"}${parameters._interactions:-}], \\\"reasoning_effort\\\":\\\"low\\\"${parameters.tool_configs:-}}\"\n      }\n    ]\n  }\n}\n```\n\nExample:\n```text\nPOST /_plugins/_ml/agents/_register\n{\n  \"name\": \"Flow Agent for Agentic Search\",\n  \"type\": \"flow\",\n  \"description\": \"Flow agent for agentic search\",\n  \"tools\": [\n    {\n      \"type\": \"QueryPlanningTool\",\n      \"parameters\": {\n        \"model_id\": \"your_model_id_from_step_3\",\n        \"response_filter\": \"<response-filter-based-on-model-type>\"\n      }\n    }\n  ]\n}\n```\n\nExample:\n```text\nPUT _search/pipeline/agentic-pipeline\n{\n  \"request_processors\": [\n    {\n      \"agentic_query_translator\": {\n        \"agent_id\": \"your_flow_agentId_from_step_4\"\n      }\n    }\n  ],\n  \"response_processors\": [\n    {\n      \"agentic_context\": {\n        \"dsl_query\": true\n      }\n    }\n  ]\n}\n```\n\nExample:\n```text\nGET products-index/_search?search_pipeline=agentic-pipeline\n{\n  \"query\": {\n    \"agentic\": {\n      \"query_text\": \"Find me white shoes under 150 dollars\"\n    }\n  }\n}\n```\n\nExample:\n```text\n{\n  \"took\": 3965,\n  \"timed_out\": false,\n  \"_shards\": {\n    \"total\": 1,\n    \"successful\": 1,\n    \"skipped\": 0,\n    \"failed\": 0\n  },\n  \"hits\": {\n    \"total\": {\n      \"value\": 1,\n      \"relation\": \"eq\"\n    },\n    \"max_score\": null,\n    \"hits\": [\n      {\n        \"_index\": \"products-index\",\n        \"_id\": \"3\",\n        \"_score\": null,\n        \"_source\": {\n          \"product_name\": \"Converse Chuck Taylor\",\n          \"description\": \"Classic canvas sneakers\",\n          \"price\": 65.0,\n          \"currency\": \"USD\",\n          \"rating\": 4.2,\n          \"review_count\": 2100,\n          \"in_stock\": true,\n          \"color\": \"white\",\n          \"size\": \"8\",\n          \"category\": \"shoes\",\n          \"brand\": \"Converse\",\n          \"tags\": [\n            \"casual\",\n            \"classic\",\n            \"canvas\"\n          ]\n        },\n        \"sort\": [\n          4.2,\n          2100\n        ]\n      }\n    ]\n  },\n  \"ext\": {\n    \"dsl_query\": \"{\\\"size\\\":10.0,\\\"query\\\":{\\\"bool\\\":{\\\"filter\\\":[{\\\"term\\\":{\\\"category\\\":\\\"shoes\\\"}},{\\\"term\\\":{\\\"color\\\":\\\"white\\\"}},{\\\"range\\\":{\\\"price\\\":{\\\"lt\\\":150.0}}}]}},\\\"sort\\\":[{\\\"rating\\\":{\\\"order\\\":\\\"desc\\\"}},{\\\"review_count\\\":{\\\"order\\\":\\\"desc\\\"}}]}\"\n  }\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:22.678Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":10,"totalLines":205,"estimatedTokens":1597}}137{"id":"doc-server_side_implementation-979bf880","source":"documentation","title":"Server-Side Implementation","url":"https://developer.paypal.com/braintree/docs/guides/paypal/server-side/java/","text":"Braintree a PayPal ServiceSDK Docs SDK DocsAPI & In-Person DocsSupport ArticlesSearchGet HelpContact SalesCreate AccountLoginProduction Control PanelLoginBecome a MerchantContact SalesAboutGet StartedGuidesReference\n\nExample:\n```java\nTransactionLineItemRequest lineItem = new TransactionLineItemRequest().\n            description(\"Shoes\").\n            imageUrl(\"https://example.com/products/23434/pic.png\").\n            kind(TransactionLineItem.Kind.DEBIT).\n            name(\"Name #1\").\n            productCode(\"23434\").\n            quantity(new BigDecimal(\"1\")).\n            totalAmount(new BigDecimal(\"45.00\")).\n            unitAmount(new BigDecimal(\"45.00\")).\n            unitTaxAmount(new BigDecimal(\"10.00\")).\n            url(\"https://example.com/products/23434\");\n \n        PayPalPaymentResourceRequest request = new PayPalPaymentResourceRequest().\n            paymentMethodNonce(originalNonce).\n            amount(new BigDecimal(\"55.00\")).\n            amountBreakdown().\n                discount(new BigDecimal(\"15.00\")).\n                handling(new BigDecimal(\"0.00\")).\n                insurance(new BigDecimal(\"5.00\")).\n                itemTotal(new BigDecimal(\"45.00\")).\n                shipping(new BigDecimal(\"10.00\")).\n                shippingDiscount(new BigDecimal(\"0.00\")).\n                taxTotal(new BigDecimal(\"10.00\")).\n                done().\n            currencyIsoCode(\"USD\").\n            customField(\"0437\").\n            description(\"This is a test\").\n            addLineItem(lineItem).\n            orderId(\"order-123456789\").\n            payeeEmail(\"[email protected]\").\n                       shipping().\n                firstName(\"John\").\n                lastName(\"Doe\").\n                streetAddress(\"123 Division Street\").\n                extendedAddress(\"Apt. #1\").\n                locality(\"Chicago\").\n                region(\"IL\").\n                postalCode(\"60618\").\n                countryName(\"United States\").\n                countryCodeAlpha2(\"US\").\n                countryCodeAlpha3(\"USA\").\n                countryCodeNumeric(\"484\").\n                internationalPhone().\n                    countryCode(\"1\").\n                    nationalNumber(\"4081111111\").\n                    done().\n                done().\n            shippingOption().\n                amount(new BigDecimal(\"10.00\")).\n                id(\"option1\").\n                label(\"fast\").\n                selected(true).\n                type(\"SHIPPING\").\n                done();\n \n \n        Result<PaymentMethodNonce> result = gateway.paypalPaymentResource().update(request);\n        result.isSuccess(); // true\n \n        CustomerRequest request = new CustomerRequest()\n             .firstName(\"Fred\")\n             .lastName(\"Jones\")\n             .paymentMethodNonce(result.getTarget());\n```\n\nExample:\n```java\nTransactionRequest request = new TransactionRequest()\n  .amount(request.queryParams(\"amount\"))\n  .paymentMethodNonce(request.queryParams(\"paymentMethodNonce\"))\n  .deviceData(request.queryParams(\"device_data\"))\n  .orderId(\"Mapped to PayPal Invoice Number\")\n  .options()\n    .submitForSettlement(true)\n    .paypal()\n      .customField(\"PayPal custom field\")\n      .description(\"Description for PayPal email receipt\")\n      .done()\n    .storeInVaultOnSuccess(true)\n    .done();\n\nResult<Transaction> saleResult = gateway.transaction().sale(request);\n\nif (result.isSuccess()) {\n  Transaction transaction = result.getTarget();\n  System.out.println(\"Success ID: \" + transaction.getId());\n} else {\n  System.out.println(\"Message: \" + result.getMessage());\n}\n```\n\nExample:\n```java\nTransaction transaction = gateway.transaction().find(\"the_transaction_id\");\n\ntransaction.getPayPalDetails().getSellerProtectionStatus();\n// \"ELIGIBLE\"\n```\n\nExample:\n```java\nTransactionRequest transactionRequest = new TransactionRequest()\n  .amount(new BigDecimal(\"1000.00\"))\n  .paymentMethodToken(\"the_token\")\n  .transactionSource(\"recurring\")\n  .options()\n    .submitForSettlement(true);\n\nResult<Transaction> result = gateway.transaction().sale(transactionRequest);\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:45.977Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":4,"totalLines":116,"estimatedTokens":1018}}138{"id":"doc-trigger_pipelines_with_the_api_gitlab_docs-d7099c1f","source":"documentation","title":"Trigger pipelines with the API | GitLab Docs","url":"https://docs.gitlab.com/ci/triggers/","text":"Getting startedTutorialsManage your organizationOrganize work with projectsPlan and track workManage authentication and authorizationUse GitManage your codeUse CI/CD to build your applicationGetting startedTutorialsCI/CD YAML syntax referenceRunnersPipelinesTypes of pipelinesScheduled pipelinesTrigger a pipelineExternal commit statusesCustomize pipeline configurationPipeline architecturesPipeline efficiencyCompute minutesPipeline resource groupsDownstream pipelinesJobsCI/CD componentsCI/CD inputsCI/CD variablesPipeline securityGitLab Secrets ManagerExternal secretsDebuggingAuto DevOpsTestingCI/CD sustainabilityGoogle Cloud integrationMigrate to GitLab CI/CDExternal repository integrationsMobile DevOpsSecure your applicationDeploy and release your applicationManage your infrastructureMonitor your applicationAnalyze GitLab usageRelease notesFeature supportFind your GitLab versionGitLab Docs /Use GitLab /Use CI/CD to build your … /Pipelines /Trigger a pipelineHelp us learn about your current experience with the documentation. Take the survey.Trigger pipelines with the , Premium, , GitLab Self-Managed, GitLab DedicatedYou can use an API call to the pipeline triggers API endpoint to trigger a pipeline for a specific branch or tag.You can also trigger a downstream pipeline from a CI/CD job with the trigger keyword.If you are migrating to GitLab CI/CD, you can trigger GitLab CI/CD pipelines by calling the API endpoint from the other provider’s jobs. For example, as part of a migration from Jenkins or CircleCI.When authenticating with the API, you can pipeline trigger token to trigger a branch or tag pipeline with the pipeline triggers API endpoint.A CI/CD job token to trigger a multi-project pipeline.Another token with API access to create a new pipeline with the project pipeline API endpoint.Create a pipeline trigger tokenYou can trigger a pipeline for a branch or tag by generating a pipeline trigger token and using it to authenticate an API call. The token impersonates a user’s project access and permissions.Prerequisites:You must have the Maintainer or Owner role for the project.To create a trigger the top bar, select Search or go to and find your project.In the left sidebar, select Settings > CI/CD.Expand Pipeline trigger tokens.Select Add new tokenEnter a description and select Create pipeline trigger token.You can view and copy the full token for all triggers you have created.You can only see the first 4 characters for tokens created by other project members.It is a security risk to save tokens in plain text in public projects, or store them in a way that malicious users could access them. A leaked trigger token could be used to force an unscheduled deployment, attempt to access CI/CD variables, or other malicious uses. Masked CI/CD variables help improve the security of trigger tokens. For more information about keeping tokens secure, see the security considerations.Trigger a pipelineAfter you create a pipeline trigger token, you can use it to trigger pipelines with a tool that can access the API, or a webhook.Use cURLYou can use cURL to trigger pipelines with the pipeline triggers API endpoint. For a multiline cURL --request POST \\ --form token=<token> \\ --form ref=<ref_name> \\ \"https://gitlab.example.com/api/v4/projects/<project_id>/trigger/pipeline\"Use cURL and pass the <token> and <ref_name> in the query --request POST \\ \"https://gitlab.example.com/api/v4/projects/<project_id>/trigger/pipeline?token=<token>&ref=<ref_name>\"In each example, URL with https://gitlab.com or the URL of your instance.<token> with your trigger token.<ref_name> with a branch or tag name, like main.<project_id> with your project ID, like 123456. The project ID is displayed on the project overview page.Use a CI/CD jobYou can use a CI/CD job with a pipeline trigger token to trigger pipelines when another pipeline runs.For example, to trigger a pipeline on the main branch of project-B when a tag is created in project-A, add the following job to project A’s /projects/123456/trigger/pipeline\"' if: $CI_COMMIT_TAG this is the project ID for project-B. The project ID is displayed on the project overview page.The rules cause the job to run every time a tag is added to project-A.MY_TRIGGER_TOKEN is a masked CI/CD variable that contains the trigger token.Use a webhookTo trigger a pipeline from another project’s webhook, use a webhook URL like the following for push and tag ://gitlab.example.com/api/v4/projects/<project_id>/ref/<ref_name>/trigger/pipeline?token=<token>Replace:The URL with https://gitlab.com or the URL of your instance.<project_id> with your project ID, like 123456. The project ID is displayed on the project overview page.<ref_name> with a branch or tag name, like main. This value takes precedence over the ref_name in the webhook payload. The payload’s ref is the branch that fired the trigger in the source repository. You must URL-encode the ref_name if it contains slashes.<token> with your pipeline trigger token.Access webhook payloadIf you trigger a pipeline by using a webhook, you can access the webhook payload with the TRIGGER_PAYLOAD predefined CI/CD variable. The payload is exposed as a file-type variable, so you can access the data with cat $TRIGGER_PAYLOAD or a similar command.Pass CI/CD variables in the API callYou can pass any number of CI/CD variables in the trigger API call, though using inputs to control pipeline behavior offers improved security and flexibility over CI/CD variables.These variables have the highest precedence, and override all variables with the same name.The parameter is of the form variables[key]=value, for --request POST \\ --form token=TOKEN \\ --form ref=main \\ --form \"variables[UPLOAD_TO_S3]=true\" \\ \"https://gitlab.example.com/api/v4/projects/123456/trigger/pipeline\"CI/CD variables in triggered pipelines display on each job’s page, but only users with the Owner and Maintainer role can view the values.Using inputs to control pipeline behavior offers improved security and flexibility over CI/CD variables.Pass pipeline inputs in the API callYou can pass pipeline inputs in the trigger API call. Inputs provide a structured way to parameterize your pipelines with built-in validation and documentation.The parameter format is inputs[name]=value, for --request POST \\ --form token=TOKEN \\ --form ref=main \\ --form \"inputs[environment]=production\" \\ \"https://gitlab.example.com/api/v4/projects/123456/trigger/pipeline\"Input values are validated according to the type and constraints defined in your pipeline’s : : description: \"Deployment environment\" options: [dev, staging, production] a pipeline trigger tokenTo revoke a pipeline trigger the top bar, select Search or go to and find your project.In the left sidebar, select Settings > CI/CD.Expand Pipeline triggers.To the left of the trigger token you want to revoke, select Revoke ( ).A revoked trigger token cannot be added back.Configure CI/CD jobs to run in triggered pipelinesTo configure when to run jobs in triggered pipelines, you rules with the $CI_PIPELINE_SOURCE predefined CI/CD variable.Use only/except keywords, though rules is the preferred keyword.$CI_PIPELINE_SOURCE valueonly/except keywordsTrigger methodtriggertriggersIn pipelines triggered with the pipeline triggers API by using a trigger token.pipelinepipelinesIn multi-project pipelines triggered with the pipeline triggers API by using the $CI_JOB_TOKEN, or by using the trigger keyword in the CI/CD configuration file.Additionally, the $CI_PIPELINE_TRIGGERED predefined CI/CD variable is set to true in pipelines triggered with a pipeline trigger token.See which pipeline trigger token was usedYou can see which pipeline trigger token caused a job to run by visiting the single job page. A part of the trigger token displays in the right sidebar, under Job details.In pipelines triggered with a trigger token, jobs are labeled as triggered in Build > Jobs.Troubleshooting403 Forbidden when you trigger a pipeline with a webhookWhen you trigger a pipeline with a webhook, the API might return a {\"message\":\"403 Forbidden\"} response. To avoid trigger loops, do not use pipeline events to trigger pipelines.404 Not Found when triggering a pipelineA response of {\"message\":\"404 Not Found\"} when triggering a pipeline might be caused by using a personal access token instead of a pipeline trigger token. Create a new trigger token and use it instead of the personal access token.A response of {\"message\":\"404 Not Found\"} when triggering a pipeline might also be caused by using a GET request. Pipelines can only be triggered using a POST request.The requested URL returned when triggering a pipelineIf you attempt to trigger a pipeline by using a ref that is a branch name that doesn’t exist, GitLab returns The requested URL returned example, you might accidentally use main for the branch name in a project that uses a different branch name for its default branch.Another possible cause for this error is a rule that prevents creation of the pipelines when CI_PIPELINE_SOURCE value is trigger, such : - if: $CI_PIPELINE_SOURCE == \"trigger\" your to ensure a pipeline can be created when CI_PIPELINE_SOURCE value is trigger.Create a pipeline trigger tokenTrigger a pipelineUse cURLUse a CI/CD jobUse a webhookAccess webhook payloadPass CI/CD variables in the API callPass pipeline inputs in the API callRevoke a pipeline trigger tokenConfigure CI/CD jobs to run in triggered pipelinesSee which pipeline trigger token was usedTroubleshooting403 Forbidden when you trigger a pipeline with a webhook404 Not Found when triggering a pipelineThe requested URL returned when triggering a pipeline\n\nExample:\n```shell\ncurl --request POST \\\n     --form token=<token> \\\n     --form ref=<ref_name> \\\n     \"https://gitlab.example.com/api/v4/projects/<project_id>/trigger/pipeline\"\n```\n\nExample:\n```shell\ncurl --request POST \\\n     \"https://gitlab.example.com/api/v4/projects/<project_id>/trigger/pipeline?token=<token>&ref=<ref_name>\"\n```\n\nExample:\n```yaml\ntrigger_pipeline:\n  stage: deploy\n  script:\n    - 'curl --fail --request POST --form token=$MY_TRIGGER_TOKEN --form ref=main \"${CI_API_V4_URL}/projects/123456/trigger/pipeline\"'\n  rules:\n    - if: $CI_COMMIT_TAG\n  environment: production\n```\n\nExample:\n```plaintext\nhttps://gitlab.example.com/api/v4/projects/<project_id>/ref/<ref_name>/trigger/pipeline?token=<token>\n```\n\nExample:\n```shell\ncurl --request POST \\\n     --form token=TOKEN \\\n     --form ref=main \\\n     --form \"variables[UPLOAD_TO_S3]=true\" \\\n     \"https://gitlab.example.com/api/v4/projects/123456/trigger/pipeline\"\n```\n\nExample:\n```shell\ncurl --request POST \\\n     --form token=TOKEN \\\n     --form ref=main \\\n     --form \"inputs[environment]=production\" \\\n     \"https://gitlab.example.com/api/v4/projects/123456/trigger/pipeline\"\n```\n\nExample:\n```yaml\nspec:\n  inputs:\n    environment:\n      type: string\n      description: \"Deployment environment\"\n      options: [dev, staging, production]\n      default: dev\n```\n\nExample:\n```yaml\nrules:\n  - if: $CI_PIPELINE_SOURCE == \"trigger\"\n    when: never\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:06.680Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":8,"totalLines":69,"estimatedTokens":2768}}139{"id":"doc-configuring_redis_gitlab_docs-fa5194df","source":"documentation","title":"Configuring Redis | GitLab Docs","url":"https://docs.gitlab.com/omnibus/settings/redis/","text":"RequirementsInstallation methodsLinux packageUbuntuDebianAlmaLinuxSUSEAmazon Linux 2Amazon Linux 2023JiHu EditionPackage informationMaintainConfigureAction CableBackupsConfiguration optionsCustom environment variablesDatabaseHigh availability rolesLogsAmazon SES MailerMicrosoft Graph MailerNGINXGitaly ClusterPrometheusPumaRaspberry PiRedisSMTPSSLDNSImage scalingMemory-constrained environmentsRepository mirroringTroubleshootingHelm chartOperatorDockerSelf-compiledCloud providersOffline GitLabReference architecturesSteps after installingUpgrade GitLabInstall GitLab RunnerConfigure GitLab RunnerGitLab Docs /Install /Installation methods /Linux package /Configure /RedisHelp us learn about your current experience with the documentation. Take the survey.Configuring , Premium, Self-ManagedUsing an alternate local Redis instanceLinux package installations include Redis by default. To direct the GitLab application to your own locally running Redis /etc/gitlab/gitlab.rb:# Disable the bundled Redis redis['enable'] = false # Redis via TCP gitlab_rails['redis_host'] = '127.0.0.1' gitlab_rails['redis_port'] = 6379 # OR Redis via Unix domain sockets gitlab_rails['redis_socket'] = '/tmp/redis.sock' # defaults to /var/opt/gitlab/redis/redis.socket # Password to Authenticate to alternate local Redis if required gitlab_rails['redis_password'] = '<redis_password>'Reconfigure GitLab for the changes to take gitlab-ctl reconfigureMaking the bundled Redis reachable via TCPUse the following settings if you want to make the Redis instance managed by the Linux package reachable via /etc/gitlab/gitlab.rb:redis['port'] = 6379 redis['bind'] = '127.0.0.1' redis['password'] = 'redis-password-goes-here'Save the file and reconfigure GitLab for the changes to take gitlab-ctl reconfigureSetting up a Redis-only server using the Linux packageIf you’d like to set up Redis in a separate server than the GitLab application, you can use the bundled Redis from a Linux package installation.Running with multiple Redis instancesSee https://docs.gitlab.com/administration/redis/replication_and_failover/#running-multiple-redis-clusters.Redis SentinelSee https://docs.gitlab.com/administration/redis/replication_and_failover/.Using Redis in a failover setupSee https://docs.gitlab.com/administration/redis/replication_and_failover/.Using Google Cloud MemorystoreGoogle Cloud Memorystore does not support the Redis CLIENT command. By default, Sidekiq will attempt to set the CLIENT for debugging purposes. This can be disabled via the following configuration ['redis_enable_client'] = falseIncreasing the number of Redis connections beyond the defaultBy default Redis will only accept 10,000 client connections. If you need more that 10,000 connections set the maxclients attribute to suit your needs. Be advised that adjusting the maxclients attribute means that you will also need to take into account your systems settings for fs.file-max (for example sysctl -w fs.file-max=20000)redis['maxclients'] = 20000Tuning the TCP stack for RedisThe following settings are to enable a more performant Redis server instance. tcp_timeout is a value set in seconds that the Redis server waits before terminating an idle TCP connection. The tcp_keepalive is a tunable setting in seconds to TCP ACKs to clients in absence of communication.redis['tcp_timeout'] = \"60\" redis['tcp_keepalive'] = \"300\"Announce IP from hostnameCurrently the only way to enable hostnames in Redis is by setting redis['announce_ip']. However, this would need to be set uniquely per Redis instance. announce_ip_from_hostname is a boolean that allows us to turn this on or off. It fetches the hostname dynamically, inferring the hostname from hostname -f command.redis['announce_ip_from_hostname'] = trueSetting the Redis Cache instance as an LRUUsing multiple Redis instances allows you to configure Redis as a Least Recently Used cache. Note you should only do this for the Redis cache, rate-limiting, and repository cache instances; the Redis queues, shared state instances, and tracechunks instances should never be configured as an LRU, since they contain data (e.g. Sidekiq jobs) that is expected to be persistent.To cap memory usage at 32 GB, you can ['maxmemory'] = \"32gb\" redis['maxmemory_policy'] = \"allkeys-lru\" redis['maxmemory_samples'] = 5Using Secure Sockets Layer (SSL)You can configure Redis to run behind SSL.Running Redis server behind SSLTo run Redis server behind SSL, you can use the following settings in /etc/gitlab/gitlab.rb. See the TLS/SSL section of redis.conf.erb to learn about the possible ['tls_port'] redis['tls_cert_file'] redis['tls_key_file']After specifying the required values, reconfigure GitLab for the changes to take gitlab-ctl reconfigureSome redis-cli binaries are not built with support for directly connecting to a Redis server over TLS. If your redis-cli doesn’t support the --tls flag, you will have to use something like stunnel to connect to the Redis server using redis-cli for any debugging purposes.Make GitLab client connect to Redis server over SSLTo activate GitLab client support for the following line to /etc/gitlab/gitlab.rb:gitlab_rails['redis_ssl'] = trueReconfigure GitLab for the changes to take gitlab-ctl reconfigureSSL certificatesIf you’re using custom SSL certificates for Redis, be sure to add them to the trusted certificates.Renamed commandsBy default, the KEYS command is disabled as a security measure.If you’d like to obfuscate or disable this command, or other commands, edit the redis['rename_commands'] setting in /etc/gitlab/gitlab.rb to look ['rename_commands'] = { 'KEYS': '', 'OTHER_COMMAND': 'VALUE' }OTHER_COMMAND is the command you want to modifyVALUE should be one new command name.'', which completely disables the command.To disable this redis['rename_commands'] = {} in your /etc/gitlab/gitlab.rb fileRun sudo gitlab-ctl reconfigureLazy freeingRedis 4 introduced lazy freeing. This can improve performance when freeing large values.This setting defaults to false. To enable it, you can ['lazyfree_lazy_eviction'] = true redis['lazyfree_lazy_expire'] = true redis['lazyfree_lazy_server_del'] = true redis['replica_lazy_flush'] = trueThreaded I/ORedis 6 introduced threaded I/O. This allow writes to scale across multiple cores.This setting is disabled by default. To enable it, you can ['io_threads'] = 4 redis['io_threads_do_reads'] = trueClient TimeoutsBy default, the Ruby client for Redis uses a 1-second default for the connect, read, and write timeouts. You may need to tune these values to account for local network latency. For example, if you see Connection timed out - user specified timeout errors, you may need to raise ['redis_connect_timeout'] = 3 gitlab_rails['redis_read_timeout'] = 1 gitlab_rails['redis_write_timeout'] = 1Provide sensitive configuration to Redis clients without plain text storageFor more information, see the example in configuration documentation.Using Valkey instead of RedisHistoryIntroduced in GitLab 18.9 as a beta.Generally available in GitLab 19.0.Valkey is a Redis-compatible key-value store that can be used as a drop-in replacement for Redis. Valkey is compatible with Redis OSS 7.2 and all earlier open source Redis versions.When using service name remains redis. Use gitlab-ctl restart redis to manage the service, not gitlab-ctl restart valkey.Log files are written to /var/log/gitlab/redis/, not a separate valkey directory.The data directory remains /var/opt/gitlab/redis/.The configuration file remains redis.conf.gitlab-ctl toolings still use redis-cli for Redis interactions.When using valkey-cli for troubleshooting, use the same socket, host, and port as you would with /opt/gitlab/embedded/bin/valkey-cli -s /var/opt/gitlab/redis/redis.socketFor more information about migrating from Redis to Valkey, see the Valkey migration documentation.Switch to ValkeyTo use Valkey instead of /etc/gitlab/gitlab.rb:redis['backend'] = 'valkey'Reconfigure GitLab for the changes to take gitlab-ctl reconfigureWhen redis['backend'] is set to Redis service uses valkey-server instead of redis-server.The Sentinel service uses valkey-sentinel instead of redis-sentinel.All other Redis settings (ports, passwords, paths, etc.) remain the same.Service managementTo ensure backward compatibility and a seamless transition, the service structure remains consistent regardless of whether you use Redis or Valkey as the service name is redis. Use gitlab-ctl restart redis to manage the service.Log files are written to /var/log/gitlab/redis/.The data directory is /var/opt/gitlab/redis/.The configuration file is redis.conf.gitlab-ctl commands use the appropriate CLI tool (redis-cli or valkey-cli) based on the configured backend.For troubleshooting, use the wrapper script which automatically detects the active gitlab-redis-cliFor more information about migrating from Redis to Valkey, see the Valkey migration documentation.Troubleshootingx509: certificate signed by unknown authorityThis error message suggests that the SSL certificates have not been properly added to the list of trusted certificates for the server. To check whether this is an Workhorse logs in /var/log/gitlab/gitlab-workhorse/current.If you see messages that look :52:16.71123 time=\"2018-11-14T05:52:16Z\" level=info msg=\"redis: dialing\" address=\"redis-server:6379\" scheme=rediss :16.74397 time=\"2018-11-14T05:52:16Z\" level=error msg=\"unknown error\" error=\"keywatcher: signed by unknown authority\"The first line should show rediss as the scheme with the address of the Redis server. The second line indicates the certificate is not properly trusted on this server. See the previous section.Verify that the SSL certificate is working via these troubleshooting steps.NOAUTH Authentication requiredA Redis server may require a password sent via an AUTH message before commands are accepted. A NOAUTH Authentication required error message suggests the client is not sending a password. GitLab logs may help troubleshoot this Workhorse logs in /var/log/gitlab/gitlab-workhorse/current.If you see messages that look :18:43.81636 time=\"2018-11-14T06:18:43Z\" level=info msg=\"redis: dialing\" address=\"redis-server:6379\" scheme=rediss :43.86929 time=\"2018-11-14T06:18:43Z\" level=error msg=\"unknown error\" error=\"keywatcher: pubsub Authentication required.\"Check that the Redis client password specified in /etc/gitlab/gitlab.rb is ['redis_password'] = 'your-password-here'If you are using the Linux package-provided Redis server, check that the server has the same ['password'] = 'your-password-here'Redis connection reset (ECONNRESET)If you see Redis::ConnectionError: Connection lost (ECONNRESET) in the GitLab Rails logs (/var/log/gitlab-rails/production.log), this might indicate that the server is expecting SSL but the client is not configured to use it.Check that the server is actually listening to the port via SSL. For example:/opt/gitlab/embedded/bin/openssl s_client -connect /var/opt/gitlab/gitlab-rails/etc/resque.yml. You should see something : ://:mypassword@redis-server:6379/If redis:// is present instead of rediss://, the redis_ssl parameter may not have been configured properly, or the reconfigure step may not have been run.Connecting to Redis via the CLIWhen connecting to Redis for troubleshooting you can via Unix domain /opt/gitlab/embedded/bin/redis-cli -s /var/opt/gitlab/redis/redis.socketRedis via /opt/gitlab/embedded/bin/redis-cli -h 127.0.0.1 -p 6379Password to authenticate to Redis if /opt/gitlab/embedded/bin/redis-cli -h 127.0.0.1 -p 6379 -a <password>Using an alternate local Redis instanceMaking the bundled Redis reachable via TCPSetting up a Redis-only server using the Linux packageRunning with multiple Redis instancesRedis SentinelUsing Redis in a failover setupUsing Google Cloud MemorystoreIncreasing the number of Redis connections beyond the defaultTuning the TCP stack for RedisAnnounce IP from hostnameSetting the Redis Cache instance as an LRUUsing Secure Sockets Layer (SSL)Running Redis server behind SSLMake GitLab client connect to Redis server over SSLSSL certificatesRenamed commandsLazy freeingThreaded I/OClient TimeoutsProvide sensitive configuration to Redis clients without plain text storageUsing Valkey instead of RedisSwitch to ValkeyService signed by unknown authorityNOAUTH Authentication requiredRedis connection reset (ECONNRESET)Connecting to Redis via the CLI\n\nExample:\n```ruby\n# Disable the bundled Redis\nredis['enable'] = false\n\n# Redis via TCP\ngitlab_rails['redis_host'] = '127.0.0.1'\ngitlab_rails['redis_port'] = 6379\n\n# OR Redis via Unix domain sockets\ngitlab_rails['redis_socket'] = '/tmp/redis.sock' # defaults to /var/opt/gitlab/redis/redis.socket\n\n# Password to Authenticate to alternate local Redis if required\ngitlab_rails['redis_password'] = '<redis_password>'\n```\n\nExample:\n```shell\nsudo gitlab-ctl reconfigure\n```\n\nExample:\n```ruby\nredis['port'] = 6379\nredis['bind'] = '127.0.0.1'\nredis['password'] = 'redis-password-goes-here'\n```\n\nExample:\n```ruby\ngitlab_rails['redis_enable_client'] = false\n```\n\nExample:\n```ruby\nredis['maxclients'] = 20000\n```\n\nExample:\n```ruby\nredis['tcp_timeout'] = \"60\"\nredis['tcp_keepalive'] = \"300\"\n```\n\nExample:\n```ruby\nredis['announce_ip_from_hostname'] = true\n```\n\nExample:\n```ruby\nredis['maxmemory'] = \"32gb\"\nredis['maxmemory_policy'] = \"allkeys-lru\"\nredis['maxmemory_samples'] = 5\n```\n\nExample:\n```ruby\nredis['tls_port']\nredis['tls_cert_file']\nredis['tls_key_file']\n```\n\nExample:\n```ruby\ngitlab_rails['redis_ssl'] = true\n```\n\nExample:\n```ruby\nredis['rename_commands'] = {\n  'KEYS': '',\n  'OTHER_COMMAND': 'VALUE'\n}\n```\n\nExample:\n```ruby\nredis['lazyfree_lazy_eviction'] = true\nredis['lazyfree_lazy_expire'] = true\nredis['lazyfree_lazy_server_del'] = true\nredis['replica_lazy_flush'] = true\n```\n\nExample:\n```ruby\nredis['io_threads'] = 4\nredis['io_threads_do_reads'] = true\n```\n\nExample:\n```ruby\ngitlab_rails['redis_connect_timeout'] = 3\ngitlab_rails['redis_read_timeout'] = 1\ngitlab_rails['redis_write_timeout'] = 1\n```\n\nExample:\n```shell\nsudo /opt/gitlab/embedded/bin/valkey-cli -s /var/opt/gitlab/redis/redis.socket\n```\n\nExample:\n```ruby\nredis['backend'] = 'valkey'\n```\n\nExample:\n```shell\nsudo gitlab-redis-cli\n```\n\nExample:\n```plaintext\n2018-11-14_05:52:16.71123 time=\"2018-11-14T05:52:16Z\" level=info msg=\"redis: dialing\" address=\"redis-server:6379\" scheme=rediss\n2018-11-14_05:52:16.74397 time=\"2018-11-14T05:52:16Z\" level=error msg=\"unknown error\" error=\"keywatcher: x509: certificate signed by unknown authority\"\n```\n\nExample:\n```plaintext\n2018-11-14_06:18:43.81636 time=\"2018-11-14T06:18:43Z\" level=info msg=\"redis: dialing\" address=\"redis-server:6379\" scheme=rediss\n2018-11-14_06:18:43.86929 time=\"2018-11-14T06:18:43Z\" level=error msg=\"unknown error\" error=\"keywatcher: pubsub receive: NOAUTH Authentication required.\"\n```\n\nExample:\n```ruby\ngitlab_rails['redis_password'] = 'your-password-here'\n```\n\nExample:\n```ruby\nredis['password'] = 'your-password-here'\n```\n\nExample:\n```shell\n/opt/gitlab/embedded/bin/openssl s_client -connect redis-server:6379\n```\n\nExample:\n```yaml\nproduction:\n  url: rediss://:mypassword@redis-server:6379/\n```\n\nExample:\n```shell\nsudo /opt/gitlab/embedded/bin/redis-cli -s /var/opt/gitlab/redis/redis.socket\n```\n\nExample:\n```shell\nsudo /opt/gitlab/embedded/bin/redis-cli -h 127.0.0.1 -p 6379\n```\n\nExample:\n```shell\nsudo /opt/gitlab/embedded/bin/redis-cli -h 127.0.0.1 -p 6379 -a <password>\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:07.225Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":26,"totalLines":163,"estimatedTokens":3848}}140{"id":"doc-configure_system_params_mistral_docs-6d6f10b5","source":"documentation","title":"Configure system params | Mistral Docs","url":"https://docs.mistral.ai/studio/observability/evaluations/system-params","text":"Example:\n```text\nfrom mistralai.observability import Evaluation, Evaluator, Goal, Mistral, System, TaskContext\n\nclient = Mistral(api_key=os.environ[\"MISTRAL_API_KEY\"])\n\nasync def task(ctx: TaskContext) -> str:\n    response = await client.chat.complete_async(\n        model=str(ctx.system.params[\"model\"]),\n        temperature=float(ctx.system.params[\"temperature\"]),\n        messages=[\n            {\"role\": \"system\", \"content\": str(ctx.system.params[\"system_prompt\"])},\n            {\"role\": \"user\", \"content\": ctx.input_record[\"prompt\"]},\n        ],\n    )\n    return str(response.choices[0].message.content)\n\nrun = await client.evaluation.run(\n    evaluation=Evaluation(name=\"My Eval\"),\n    dataset=dataset,\n    task=task,\n    system=System(name=\"small-t0\", params={\n        \"model\": \"mistral-small-latest\",\n        \"temperature\": 0,\n        \"system_prompt\": \"Answer concisely in one sentence.\",\n    }),\n    evaluators=[Evaluator(name=\"accuracy\", description=\"1 if the expected answer is in the output.\", scorer=scorer, goal=Goal.gte(0.5))],\n)\n```\n\nExample:\n```text\nimport asyncio\nimport os\n\nfrom mistralai.observability import Evaluation, Evaluator, Goal, Mistral, System, TaskContext, ScorerContext\n\nclient = Mistral(api_key=os.environ[\"MISTRAL_API_KEY\"])\n\nasync def task(ctx: TaskContext) -> str:\n    response = await client.chat.complete_async(\n        model=str(ctx.system.params[\"model\"]),\n        messages=[{\"role\": \"user\", \"content\": ctx.input_record[\"prompt\"]}],\n    )\n    return str(response.choices[0].message.content)\n\ndef scorer(ctx: ScorerContext) -> int:\n    return 1 if ctx.input_record[\"expected\"].lower() in str(ctx.output).lower() else 0\n\nasync def main():\n    for model in [\"mistral-small-latest\", \"mistral-large-latest\"]:\n        run = await client.evaluation.run(\n            evaluation=Evaluation(name=\"Model Comparison\"),\n            dataset=dataset,\n            task=task,\n            system=System(name=model, params={\n                \"model\": model,\n                \"temperature\": 0,\n                \"system_prompt\": \"Answer concisely.\",\n            }),\n            evaluators=[Evaluator(name=\"accuracy\", description=\"1 if the expected answer is in the output.\", scorer=scorer, goal=Goal.gte(0.5))],\n        )\n        run.show(level=\"run\")\n\nasyncio.run(main())\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:17.741Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":2,"totalLines":68,"estimatedTokens":577}}141{"id":"doc-cloud_agents_railway_docs-4ce1074c","source":"documentation","title":"Cloud agents | Railway Docs","url":"https://docs.railway.app/cloud-agents","text":"Example:\n```text\ncurl -fsSL agents.railway.com | sh\n```\n\nExample:\n```text\nrailway ca setup\n```\n\nExample:\n```text\nrailway ca\n```\n\nExample:\n```text\nrailway code\n```\n\nExample:\n```text\nrailway code --claude\n```\n\nExample:\n```text\nrailway code --codex -- exec \"explain this codebase\"\n```\n\nExample:\n```text\nrailway code --claude --new --name reviews\n```\n\nExample:\n```text\nrailway code --claude --refresh-auth\n```\n\nExample:\n```text\nrailway code --codex --new --variable DATABASE_URL=postgres.DATABASE_URL\n```\n\nExample:\n```text\nrailway code --codex --new --env-file .env\n```\n\nExample:\n```text\nssh agent:<environment-id>:<agent-id>@ssh.railway.com\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:24.968Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":11,"totalLines":56,"estimatedTokens":164}}142{"id":"doc-custom-78d47fbb","source":"documentation","title":"Custom","url":"https://developer.paypal.com/braintree/docs/guides/reports/custom/dotnet/","text":"Braintree a PayPal ServiceSDK Docs SDK DocsAPI & In-Person DocsSupport ArticlesSearchGet HelpContact SalesCreate AccountLoginProduction Control PanelLoginBecome a MerchantContact SalesAboutGet StartedGuidesReference\n\nExample:\n```cs\nusing Braintree;\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Web;\nusing System.Web.UI;\nusing System.Web.UI.WebControls;\n\nnamespace PP.BT.BootCamp.Web.Reporting {\n    public partial class WebForm1 : System.Web.UI.Page {\n        protected void Page_Load(object sender, EventArgs e) {\n            BraintreeGateway gateway = new BraintreeGateway {\n                Environment = Braintree.Environment.SANDBOX,\n                MerchantId = \"\", //the_merchant_id\n                PublicKey = \"\", //a_public_key\n                PrivateKey = \"\" //a_private_key\n            };\n\n            //year: The year (1 through 9999).\n            //month: The month (1 through 12).\n            //day: The day (1 through the number of days in month).\n            var startDate = new DateTime(2014, 3, 16);\n            var endDate = startDate.AddHours(23).AddMinutes(59).AddSeconds(59);\n\n            var result = gateway.Transaction.Search(new TransactionSearchRequest()\n                .CreatedAt.Between(startDate, endDate));\n\n            var sb = new StringBuilder();\n            foreach (var row in result.Cast<transaction>().ToList()) {\n                sb.AppendLine(string.Format(\"{0},{1},{2},{3},{4},{5},{6}\", row.Id, row.Type, row.Amount, row.Status, row.CreatedAt, row.ServiceFeeAmount, row.MerchantAccountId));\n            }\n\n            Response.Write(sb.ToString());\n        }\n    }\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:46.191Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":1,"totalLines":44,"estimatedTokens":420}}143{"id":"doc-testing_and_go_live-3e4b61e8","source":"documentation","title":"Testing and Go Live","url":"https://developer.paypal.com/braintree/docs/guides/braintree-auth/testing-go-live/java/","text":"Braintree a PayPal ServiceSDK Docs SDK DocsAPI & In-Person DocsSupport ArticlesSearchGet HelpContact SalesCreate AccountLoginProduction Control PanelLoginBecome a MerchantContact SalesAboutGet StartedGuidesReference\n\nExample:\n```java\nBraintreeGateway gateway = new BraintreeGateway(\"use_your_client_id\", \"use_your_client_secret\");\n\nOAuthCredentialsRequest request = new OAuthCredentialsRequest()\n        .code(\"fake-valid-auth-code\");\n\nResult<oauthcredentials> result = gateway.oauth().createTokenFromCode(request);\n\nString accessToken = result.getTarget().getAccessToken();\nCalendar expiresAt = result.getTarget().getExpiresAt();\nString refreshToken = result.getTarget().getRefreshToken();\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:46.227Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":1,"totalLines":17,"estimatedTokens":177}}144{"id":"doc-manage_subscriptions-f801d107","source":"documentation","title":"Manage Subscriptions","url":"https://developer.paypal.com/braintree/docs/guides/recurring-billing/manage/python/","text":"Braintree a PayPal ServiceSDK Docs SDK DocsAPI & In-Person DocsSupport ArticlesSearchGet HelpContact SalesCreate AccountLoginProduction Control PanelLoginBecome a MerchantContact SalesAboutGet StartedGuidesReference\n\nBasicsClient AuthorizationOverviewTokenization KeyClient TokenPayment Method NoncesTransactionsCustomersPayment MethodsCheckout UIsDrop-in UIOverviewSetup and IntegrationCustomizationHosted FieldsOverviewSetup and IntegrationStylingEventsTroubleshooting and FAQExamplesFastlaneOverviewSetup and IntegrationClient-sideServer-sideTest your IntegrationAppendixAdvanced OptionsStylingBest Practice GuideTroubleshooting And FAQReference TypesFlexible Payment IntegrationPayment Method TypesOverviewACH Direct DebitOverviewConfigurationClient-sideServer-sideTesting and Go LiveInstant VerificationOverviewInstant Verification Client-sideInstant Verification Server-sideTesting Instant VerificationApple PayOverviewConfigurationClient-sideServer-sideTesting and Go LiveCredit CardsOverviewConfigurationClient-sideServer-sideTesting and Go LiveLocal Payment MethodsOverviewConfigurationClient-sideServer-sideTesting and Go LiveBoleto Bancário (Non-Instant)Multibanco (Non-Instant)OXXO (Non-Instant)Trustly (Non-Instant)SwishGoogle PayOverviewConfigurationClient-sideServer-sideTesting and Go LivePayPalOverviewClient-sidePayment FlowOne-time PaymentsRecurring PaymentsVaulted PaymentsCheckout with VaultPay Later OffersMobile CheckoutFeaturesApp SwitchShipping ModuleServer-sideTesting and Go LiveSamsung PayOverviewSEPA Direct DebitOverviewConfigurationClient-sideServer-sideVaultingTesting and Go LiveVenmoOverviewConfigurationClient-sideServer-sideTesting and Go LivePayment OrchestrationOverviewAdyendLocalEBANXFat ZebraFlexFactorFlutterwaveStripeTools3D SecureOverviewOnboardingStep by Step IntegrationApplying 3DS to Transactions and VerificationsMerchant Initiated Authentication (3RI)Rules ManagerAdvanced OptionsAuthentication InsightTestingPremium Fraud Management ToolsOverviewConfigurationClient-sideServer-sideWebhooksTesting and Go LiveData LensOverviewGetting StartedData Schema ReferenceSample QueriesIntegration PatternsBest Practices and SecurityTroubleshootingSupport and ResourcesFX OptimizerOverviewServer-sideTesting and Go LiveClient SDKSetupMigrationDeprecation PolicyDisputesOverviewManagingEvidence RequirementsAutomatingTesting and Go LiveNetwork TokensOverviewValue to MerchantsHow it WorksGetting StartedBring Your Own TokenPayment Request APIOverviewSetup and IntegrationReportsOverviewSettlement Batch SummariesCustom ReportsWebhooksWebhooksOverviewCreateParseTesting and Go LiveBraintree ExtendOAuthOverviewConfigurationConnect URLsClient-side Connect FlowAccess TokensShared VaultReferenceForward APIConfigurationTransformationsTokenization SupportHyperwallet IntegrationWorldpayExamplesCryptographyPGP Public KeyAdditional FeaturesOptimized Debit RoutingOverviewTransaction WorkflowEligibilityIntegrationManaging AuthorizationNetwork Response CodesTest and Go LiveCode SamplesSDKGraphQLBraintree Auth (Beta)OverviewConfigurationMerchant Connect FlowServer-side Connect FlowClient-side Connect FlowOAuth FlowWebhooksMerchant APIMulti-currencyTesting and Go LiveBrandingReferencePackage TrackingOverviewClient-sideServer-sideRecurring BillingOverviewPlansCreating SubscriptionsManaging SubscriptionsTesting and Go LiveAdditional Features/Recurring Billing/Managing SubscriptionsAsk ChatGPTManage SubscriptionsPythonSDKCurrent Braintree LanguagesJava.NETNode.jsPHPPythonRubyManage subscription scenariosUpdating subscriptions The following details can be updated for eligible Pending and Active IDPricePlanPayment methodAdd-on and discount detailsNumber of billing cyclesMerchant accountDescriptorImportant Merchants operating in the European Union must give customers 4 weeks' notice before changing the price of their recurring billing plan; 4 weeks' notice is also required before billing customers if it has been 6+ months since their last payment. If you don't operate in the EU, these notices aren't required (but they're still good practice). PythonCopyresult = gateway.subscription.update( \"a_subscription_id\", { \"id\": \"new_id\", \"payment_method_token\": \"new_payment_method_token\", \"price\": \"14.00\", \"plan_id\": \"new_plan\", \"merchant_account_id\": \"new_merchant_account\" } ) If the subscription can't be found, it will throw a NotFoundError exception. NoteCanceled and Expired subscriptions can't be changed. Select details can be updated for Past Due subscriptions. Plans If you update a subscription's plan and the new plan's billing frequency is the same, the subscription will not inherit the new plan's price. If you update a subscription's plan and the billing frequency is different, the subscription will inherit the new plan's price (such as update from a yearly plan to a monthly plan and vice versa will change price automatically). Also, you'll be able to pass in a price to override in either scenario. Payment methods You can update the payment method associated with a Pending, Active, or Past Due subscription using either of the method token* Payment method nonce*If you delete a payment method using its payment method token, all associated subscriptions will be canceled immediately and the customer will forfeit any remaining days they've already paid for. When you update a Past Due subscription's payment method and you have proration enabled, the subscription will be automatically retried. NoteCanceled and Expired subscriptions can't be changed. Select details can be updated for Past Due subscriptions. Add-ons and discounts When updating a subscription, you can modify the add-ons and discounts in 3 add-ons/discounts can be addedExisting add-ons/discounts associated with the subscription can be updatedExisting add-ons/discounts associated with the subscription can be removedPythonCopyresult = gateway.subscription.update( \"the_subscription_id\", { \"add_ons\": { \"add\": [ { \"inherited_from_id\": \"add_on_id_1\", \"amount\": Decimal(\"25.00\") } ], \"update\": [ { \"existing_id\": \"add_on_id_2\", \"amount\": Decimal(\"50.00\") } ], \"remove\": [ \"add_on_id_3\" ] }, \"discounts\": { \"add\": [ { \"inherited_from_id\": \"discount_id_1\", \"amount\": Decimal(\"7.00\") } ], \"update\": [ { \"existing_id\": \"discount_id_2\", \"amount\": Decimal(\"15.00\") } ], \"remove\": [ \"discount_id_3\" ] } } )Note You can only add an add-on or discount to a subscription once. If you'd like to apply an add-on or discount to a subscription several times, you can pass quantity when creating or updating the add-on/discount. See additional examples of how to update or remove add-ons and discounts on a subscription.Proration You can use proration to charge or credit a customer if a change is made to the subscription price in the middle of a billing cycle. Enabling proration adjusts the price based on how many days are left in the billing cycle, and charges the customer the newly-calculated rate immediately. Without proration enabled, any changes made to a customer's subscription mid-cycle will go into effect at the beginning of the next cycle. Note The number of days that have passed in a billing cycle is updated each day at 12am in the time zone specified in your Control Panel. The time zone for your account was established during the application process; to see your current time zone settings, navigate to Account > Merchant Account Info > Time Zone. Proration can be configured to run automatically on upgrades and/or downgrades in the Control Panel, or you can pass the option prorate_charges as true. By default, if the transaction for the prorated amount fails, the update to the subscription no longer goes through. If you would like to continue with the update to the subscription and add the prorated amount to the balance even though the transaction failed, you can set this preference in the Control Panel or pass the option revert_subscription_on_proration_failure . Proration with add-ons and discounts Add-ons and discounts will only be prorated when you pass the option prorate_charges as true. If existing add-ons or discounts were not originally passed with this option set to true, they will not be prorated. For example, if a request is sent to update an add-on's quantity from 4 to 6 with prorate_charges set to true, and the original add-ons did not also pass this option as true, the subscriber will only be charged a prorated amount for the additional 2 add-ons. Merchant accounts Since merchant_account_id determines currency, updating the merchant account used to process transactions for a subscription may change which currency the subscription is processed in. Past Due subscriptions A subscription's balance represents the amount of outstanding charges associated with that subscription. If a customer's payment method fails or is declined, their subscription status will change to Past Due, and the subscription's balance is incremented by the amount of the transaction that failed. This amount includes the subscription base price as well as any associated add-ons and/or discounts. If the subscription has add-ons and discounts with a specified number of billing cycles, the number of billing cycles are also reflected in the subscription's balance. For example, let's say that a subscription was created with these price: $12 for 12 billing cycles Add-on price: $10 for 2 billing cycles The subscription and the first add-on were charged successfully when it was created, but it is now 2 billing cycles past due. The balance is $34. 2 failed billing cycles, $12 each = $24 1 failed billing cycle for the add-on charge for $10 Total balance = $34 Since the add-on was designated to apply for 2 billing cycles and we already had one successful billing cycle, it will only count one billing cycle for the add-on in the balance. This same logic also applies to discounts. The balance on Past Due subscriptions will continue to increase every billing cycle—either indefinitely or until the number of cycles in the subscription is reached. Updating Past Due subscriptions When updating a subscription that is Past Due, you can only update fields that do not change the IDPayment methodMerchant accountDescriptorRetry logicNoteSee also the detailed breakdown and an example of our retry logic. We will automatically attempt to charge past due subscriptions at the beginning of each new billing cycle. You can also customize our retry logic in the Control Panel if you would like to charge past due subscriptions in-between billing cycles. Depending on the processor response code, some declines are not retried because they suggest that it's unlikely the transaction will ever be successful. A subscription's balance will only be adjusted by our retry logic at the beginning of a new billing cycle. In other words, if the automatic retry attempts during one billing cycle are not successful, the subscription's balance will increase in the next billing cycle to incorporate the missed payment. You can also retry transactions manually, either on a one-off basis or as a part of your own recurring logic. Negative balance A negative balance indicates that credit is owed to the customer on that subscription. A subscription's balance can go into the negative if you have configured your processing options to allow proration on downgrades. If a subscription has a negative balance that is enough to cover the charge, the subscription will bill successfully without actually charging the payment method. Retrying transactions manuallyImportant When handling declined transactions, keep in mind that there are rules around retrying recurring transactions. By default, we will use the subscription balance when retrying the transaction. If you would like to use a different amount you can optionally specify the amount for the transaction. A successful manual retry of a past due subscription will always reduce the balance of that subscription to $0, regardless of the amount of the retry. Submitting for settlement When retrying a declined transaction via the API, pass [true] in the argument to automatically submit the transaction for settlement if the retry request is = gateway.subscription.retry_charge( subscription.id, \"24.00\", true )Availability Submitting transactions for settlement in the Charge call is supported in the latest versions of our server SDKs. In older versions, you must submit for settlement separately . When the transaction is authorized, the subscription status will return to Active unless the number of billing cycles in the subscription has been reached. If the subscription has no further billing cycles, it will become Expired. Refunding a subscription Refunds for subscriptions work the same as refunds for individual transactions. You can only issue a refund against an existing sale transaction, and that transaction must have a status of settled or settling. You can specify the refund amount if you don't want to refund the full amount of an existing sale transaction. If a customer has an annual subscription and you want to refund them for six months, issue a refund by reversing the original transaction for half the amount paid in a single transaction. use to issue a refund via the API. You can also issue a refund within the Control Panel. If you do not want to continue charging the customer for their subscription in the future, be sure to cancel the subscription as well. See AlsoCanceling subscriptionsSearching for subscriptionsAdvanced recurring billing settingsSubscription validationsSubscription objectOn this pageGet help from a humanSubmit a request for help with your PayPal Braintree sandbox or production account.Get HelpGet StartedIntegration GuideTutorial (Preview)Checkout UIsExample IntegrationsBasicsClient AuthorizationSingle-use TokenCustomersPayment MethodsTransactionsPayment Method TypesOverviewACH Direct DebitApple PayCredit CardsGoogle PayPayPalVenmoSecure Remote CommerceTools3D SecurePremium Fraud Management ToolsClient SDKDisputesPayment Request APIReportsWebhooksCheckout UIDrop-in UIHosted FieldsAdditional FeaturesBraintree Auth (Beta)Braintree MarketplaceGrant API (Beta)OAuth (Beta)PayPal HereRecurring BillingAPI ReferenceClient ReferencesServer-side API RequestsServer-side Response ObjectsGeneralBraintreepayments.comStatusAPIIn-PersonSupport ArticlesPrivacy PolicyLegalBraintree is a service of PayPal. © 2026 PayPal\n\nExample:\n```python\nresult = gateway.subscription.update(\n    \"a_subscription_id\",\n    {\n        \"id\": \"new_id\",\n        \"payment_method_token\": \"new_payment_method_token\",\n        \"price\": \"14.00\",\n        \"plan_id\": \"new_plan\",\n        \"merchant_account_id\": \"new_merchant_account\"\n    }\n)\n```\n\nExample:\n```python\nresult = gateway.subscription.update(\n    \"the_subscription_id\",\n    {\n        \"add_ons\": {\n            \"add\": [\n                {\n                    \"inherited_from_id\": \"add_on_id_1\",\n                    \"amount\": Decimal(\"25.00\")\n                }\n            ],\n            \"update\": [\n                {\n                    \"existing_id\": \"add_on_id_2\",\n                    \"amount\": Decimal(\"50.00\")\n                }\n            ],\n            \"remove\": [\n                \"add_on_id_3\"\n            ]\n        },\n        \"discounts\": {\n            \"add\": [\n                {\n                    \"inherited_from_id\": \"discount_id_1\",\n                    \"amount\": Decimal(\"7.00\")\n                }\n            ],\n            \"update\": [\n                {\n                    \"existing_id\": \"discount_id_2\",\n                    \"amount\": Decimal(\"15.00\")\n                }\n            ],\n            \"remove\": [\n                \"discount_id_3\"\n            ]\n        }\n    }\n)\n```\n\nExample:\n```python\nretry_result = gateway.subscription.retry_charge(\n    subscription.id,\n    \"24.00\",\n    true\n)\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:46.275Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":3,"totalLines":71,"estimatedTokens":3948}}145{"id":"doc-client_side_implementation-3f6f5f2a","source":"documentation","title":"Client-Side Implementation","url":"https://developer.paypal.com/braintree/docs/guides/premium-fraud-management-tools/client-side/javascript/v2","text":"Braintree a PayPal ServiceSDK Docs SDK DocsAPI & In-Person DocsSupport ArticlesSearchGet HelpContact SalesCreate AccountLoginProduction Control PanelLoginBecome a MerchantContact SalesAboutGet StartedGuidesReference\n\nExample:\n```javascript\nbraintree.setup(CLIENT_AUTHORIZATION, 'custom', {\n  dataCollector: {\n    kount: {environment: 'sandbox'}\n  },\n  onReady: function (braintreeInstance) {\n    // At this point, you should access the braintreeInstance.deviceData value\n    // and provide it to your server, e.g. by injecting it into your form as a\n    // hidden input.\n    deviceData = braintreeInstance.deviceData;\n  }\n  /* ... */\n});\n```\n\nExample:\n```javascript\nbraintree.setup(CLIENT_AUTHORIZATION, 'custom', {\n  dataCollector: {\n    kount: {environment: 'sandbox'}\n  },\n  onReady: function (braintreeInstance) {\n    var form = document.getElementById('my-form-id');\n    var deviceDataInput = form['device_data'];\n\n    if (deviceDataInput == null) {\n      deviceDataInput = document.createElement('input');\n      deviceDataInput.name = 'device_data';\n      deviceDataInput.type = 'hidden';\n      form.appendChild(deviceDataInput);\n    }\n\n    deviceDataInput.value = braintreeInstance.deviceData;\n  }\n  /* ... */\n});\n```\n\nExample:\n```javascript\nvar dataCollector = braintree.data.setup({\n  kount: {environment: 'sandbox'},\n});\n\ndataCollector.deviceData; /* for use in transaction creation */\n```\n\nExample:\n```javascript\ndataCollector.teardown(); /* for cleanly resetting your integration */\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:16:46.697Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":4,"totalLines":56,"estimatedTokens":378}}146{"id":"doc-editing_duckdb-2bd91634","source":"documentation","title":"Editing – DuckDB","url":"https://duckdb.org/docs/current/clients/cli/editing","text":"⌘K ctrl+k 1.5 current 1.5current 1.4LTS 1.3 1.2\n\nExample:\n```text\nrlwrap --substitute-prompt=\"D \" duckdb -batch\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:30.892Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":1,"totalLines":8,"estimatedTokens":33}}147{"id":"doc-text_types_duckdb-380435b3","source":"documentation","title":"Text Types – DuckDB","url":"https://duckdb.org/docs/current/sql/data_types/text","text":"⌘K ctrl+k 1.5 current 1.5current 1.4LTS 1.3 1.2 1.1 1.0 0.10\n\nExample:\n```text\nCREATE TABLE strings (\n    val VARCHAR CHECK (length(val) <= 10) -- val has a maximum length of 10\n);\n```\n\nExample:\n```text\nCREATE TABLE tbl (s VARCHAR USING COMPRESSION zstd);\n```\n\nExample:\n```text\nSELECT 'Hello' || chr(10) || 'world' AS msg;\n```\n\nExample:\n```text\n┌──────────────┐\n│     msg      │\n│   varchar    │\n├──────────────┤\n│ Hello\\nworld │\n└──────────────┘\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:30.918Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":4,"totalLines":30,"estimatedTokens":116}}148{"id":"doc-order_preservation_duckdb-1581eb0b","source":"documentation","title":"Order Preservation – DuckDB","url":"https://duckdb.org/docs/current/sql/dialect/order_preservation","text":"⌘K ctrl+k 1.5 current 1.5current 1.4LTS 1.3 1.2 1.1 1.0\n\nExample:\n```text\nCREATE TABLE tbl AS\n    SELECT *\n    FROM (VALUES (1, 'a'), (2, 'b'), (3, 'c')) t(x, y);\n\nSELECT *\nFROM tbl;\n```\n\nExample:\n```text\nSELECT *\nFROM tbl\nWHERE x % 2 == 1;\n```\n\nExample:\n```text\nSET preserve_insertion_order = false;\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:30.959Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":3,"totalLines":25,"estimatedTokens":80}}149{"id":"doc-migrate_gitlab_data_by_using_file_exports_gitlab-c0efaff7","source":"documentation","title":"Migrate GitLab data by using file exports | GitLab Docs","url":"https://docs.gitlab.com/user/project/settings/import_export/","text":"Getting startedTutorialsManage your up your organizationNamespacesMembersOrganizationsGroupsImport and migrate to GitLabContribution and membership mappingMigrate between GitLab instancesUse direct transferUse offline transferUse file exportsTroubleshootingMigrate from third-party systemsTroubleshootingSharing projects and groupsUser account optionsGitLab.com settingsLogs on GitLab.comOrganize work with projectsPlan and track workManage authentication and authorizationUse GitManage your codeUse CI/CD to build your applicationSecure your applicationDeploy and release your applicationManage your infrastructureMonitor your applicationAnalyze GitLab usageRelease notesFeature supportFind your GitLab versionGitLab Docs /Use GitLab /Manage your organization /Import and migrate to Gi… /Migrate between GitLab i… /Use file exportsHelp us learn about your current experience with the documentation. Take the survey.Migrate GitLab data by using file , Premium, , GitLab Self-Managed, GitLab DedicatedHistoryRenaming milestone titles to avoid clashes on destination instances introduced in GitLab 18.6.7 and later, 18.7.5 and later, and 18.8.5 and later.File exports give you a portable package of your GitLab data that works in offline environments. This migration method preserves most project data, including repositories, issues, merge requests, and comments.Use file exports between offline environments.Move specific projects without their entire group structure.Direct transfer remains the recommended migration method for most situations.You should not use project export files to back up your data. Using project export files for backups does not always work, and not all items are exported.Known issuesDue to a known issue, you might encounter a PG::QueryCanceled: statement due to statement timeout error. For more information, see the troubleshooting documentation.In GitLab 17.0, 17.1, and 17.2, imported epics and work items are mapped to the importing user rather than the original author.For merge requests, only the latest diff is preserved during import or export. After importing or exporting a project, only the latest diff version and the latest pipeline in merge requests are visible.Imported milestones with titles matching existing milestones within the destination namespace will have titles updated upon import. The new title will be appended with a unique suffix, e.g. 18.0 will become 18.0 (imported-3d-1770206299). To avoid this, rename the milestone in the source group or project before initiating a direct transfer.Migrate projects by uploading an export fileExisting projects can be exported to a file and then imported into another GitLab instance.Preserving user contributionsThe requirements for preserving user contribution depends on whether you’re migrating to GitLab.com or to a GitLab Self-Managed instance.When migrating from GitLab Self-Managed to GitLab.comWhen migrating projects by using file exports, an administrator’s access token is required for user contributions to map correctly.Therefore, user contributions never map correctly when importing file exports from a GitLab Self-Managed instance to GitLab.com. Instead, all GitLab user associations (such as comment author) are changed to the user importing the project. To preserve contribution history, do one of the by using direct transfer.Consider engaging Professional Services. For more information, see the Professional Services catalog.When migrating to GitLab Self-ManagedTo ensure GitLab maps users and their contributions owner of the project’s top-level group should export the project so that the information of all members (direct and inherited) with access to the project can be included in the exported file. Project maintainers and owners can initiate the project export. However, only direct members of a project are then exported.An administrator must perform the import.Required users must exist on the destination GitLab instance. An administrator can create confirmed users either in bulk in a Rails console or one by one in the UI.Users must set a public email in their profiles on the source GitLab instance that matches their primary email address on the destination GitLab instance. You can also manually add users' public emails by editing project export files.In GitLab 18.4 and later, when you create direct memberships while importing a project directly into an existing group, the Users cannot be added to projects in this group setting is respected.When the email of an existing user matches the email of an imported user, that user is added as a direct member to the imported project.If any of the previous conditions are not met, user contributions are not mapped correctly. Instead, all GitLab user associations are changed to the user who performed the import. That user becomes an author of merge requests created by other users. Supplementary comments mentioning original authors for comments, merge request approvals, linked tasks, and items.Not added for the merge request or issue creator, added or removed labels, and merged-by information.Edit project export filesYou can add or remove data from export files. For example, you add users public emails to the project_members.ndjson file.Trim CI pipelines by removing lines from the ci_pipelines.ndjson file.To edit a project export the exported .tar.gz file.Edit the appropriate file. For example, tree/project/project_members.ndjson.Compress the files back to a .tar.gz file.You can also make sure that all members were exported by checking the project_members.ndjson file.CompatibilityProject file exports are in NDJSON format.You can import project file exports that were exported from a version of GitLab up to two minor versions behind.For versionCompatible source versions13.013.0, 12.10, 12.913.113.1, 13.0, 12.10Configure file exports as an import Self-Managed, GitLab DedicatedBefore you can migrate projects on GitLab Self-Managed using file exports, GitLab administrators file exports on the source instance.Enable file exports as an import source for the destination instance. On GitLab.com, file exports are already enabled as an import source.To enable file exports as an import source for the destination the upper-right corner, select Admin.In the left sidebar, select Settings > General.Expand Import and export settings.Scroll to Import sources.Select the GitLab export checkbox.Between CE and EEYou can export projects from the Community Edition to the Enterprise Edition and vice versa, assuming compatibility is met.If you’re exporting a project from the Enterprise Edition to the Community Edition, you may lose data that is retained only in the Enterprise Edition. For more information, see reverting from EE to CE.Export a project and its dataBefore you can import a project, you must export it.Prerequisites:Review the list of items that are exported. Not all items are exported.You must have the Maintainer or Owner role for the project.For significantly improved performance for repositories with a large number of Git references, use GitLab 18.0 or later. For more information, see our blog post about decreasing GitLab repository backup times.To export a project and its data, follow these the top bar, select Search or go to and find your project.In the left sidebar, select Settings > General.Expand Advanced.Select Export project.After the export is generated, you a link contained in an email that you should receive.Refresh the project settings page and in the Export project area, select Download export.The export is generated in your configured shared_path, a temporary shared directory (by default, <shared_path>/tmp/gitlab_exports), and then to your configured uploads_directory.Uploaded to object storage.Every 24 hours, a worker deletes these export files.On GitLab instances with separate Sidekiq, Gitaly, and GitLab application (Rails) nodes, the directory specified in the shared_path setting must be available to all nodes.Project items that are exportedExported project items depend on the version of GitLab you use. To determine if a specific project item is the exporters array.Check the project/import_export.yml file for projects for your GitLab version. For example, https://gitlab.com/gitlab-org/gitlab/-/blob/19-2-stable-ee/lib/gitlab/import_export/project/import_export.yml for GitLab 19.2.For a quick overview, items that are exported and wiki repositoriesProject uploadsProject configuration, excluding integrationsIssuesIssue commentsIssue iterationsIssue resource state eventsIssue resource milestone eventsIssue resource iteration eventsMerge requestsMerge request diffsMerge request commentsMerge request resource state eventsMerge request multiple assigneesMerge request reviewersMerge request approversCommit commentsLabelsMilestonesSnippetsReleasesTime tracking and other project entitiesDesign management files and dataLFS objectsIssue boardsCI/CD pipelines (archived)Pipeline schedules (inactive and assigned to the user who initiated the import)Protected branches and tagsPush rulesEmoji reactionsEmoji reactions that use custom emoji are imported only if a custom emoji with the same name exists on the destination. Reactions that reference a custom emoji missing from the destination are skipped.Direct project members (if you have the Maintainer or Owner role for the exported project’s group)Inherited project members as direct project members (if you have the Owner role for the exported project’s group or administrator access to the instance)Some merge request approval for protected branchesEligible approversVulnerability report (introduced in GitLab 17.7)Project items that are not exportedItems that are not exported pipeline historyPipeline triggersCI/CD job traces and artifactsPackage and container registry imagesCI/CD variablesCI/CD job token allowlistWebhooksAny encrypted tokensNumber of required approvalsRepository size limitsDeploy keys allowed to push to protected branchesSecure filesActivity logs for Git-related events (for example, pushing and creating tags)Security policies associated with your projectLinks between issues and linked itemsLinks to related merge requestsPipeline schedule variablesImport a project and its dataYou can import a project and its data. The amount of data you can import depends on the maximum import file GitLab Self-Managed, administrators can set maximum import file size.On GitLab.com, the value is set to 5 GB.Only import projects from sources you trust. If you import a project from an untrusted source, it may be possible for an attacker to steal your sensitive data.PrerequisitesYou must have exported the project and its data.Compare GitLab versions and ensure you are importing to a GitLab version that is the same or later than the GitLab version you exported from.Review compatibility for any issues.The Maintainer or Owner role on the destination group to migrate to.The tar command must be installed on both the source and destination GitLab instances.Import a projectTo import a the upper-right corner, select Create new ( ) and New project/repository.Select Import project.In Import project from, select GitLab export.Enter your project name and URL. Then select the file you exported previously.Select Import project.You can query the status of an import by using the API. The query might return an import error or exceptions.Changes to imported itemsExported items are imported with the following members with the Owner role are imported with the Maintainer role.If an imported project contains merge requests originating from forks, new branches associated with these merge requests are created in the project. Therefore, the number of branches in the new project can be more than in the source project.If the Internal visibility level is restricted, all imported projects are given Private visibility.Protected branch and protected tag access levels are reset to Maintainers. For example, Allowed to merge set to Developers + Maintainers becomes Maintainers. Access levels set to No one are preserved.To preserve the original access levels, the user who performs the import must have the Owner role for the destination project’s top-level group, or be a GitLab administrator.Access levels are always reset when the destination project is in a personal namespace.Deploy keys aren’t imported. To use deploy keys, you must enable them in your imported project and update protected branches.Import large Self-Managed, GitLab DedicatedIf you have a larger project, consider using a Rake task.Set maximum import file Self-Managed, GitLab DedicatedAdministrators can set the maximum import file size one of two the max_import_size option in the Application settings API.In the Admin area UI.The default is 0 (unlimited).Rate limitsTo help avoid abuse, by default, users are rate limited typeLimitExport6 projects per minuteDownload export1 download per project per minuteImport6 projects per minuteMigrate groups by uploading an export file (deprecated)HistoryDeprecated in GitLab 14.6.This feature was deprecated in GitLab 14.6 and replaced by migrating groups by direct transfer. However, this feature is still recommended for migrations in offline environments. Support for migration between offline instances is proposed in epic 8985.Prerequisites:Owner role on the group to migrate.Using file exports, you any group to a file and upload that file to another GitLab instance or to another location on the same instance.Use either the GitLab UI or the API.Migrate groups one by one, then export and import each project for the groups one by one.GitLab maps user contributions correctly when an admin access token is used to perform the import. GitLab does not map user contributions correctly when you are importing from a GitLab Self-Managed instance to GitLab.com. Correct mapping of user contributions when importing from a GitLab Self-Managed instance to GitLab.com can be preserved with paid involvement of Professional Services team.Additional informationExports are stored in a temporary directory and are deleted every 24 hours by a specific worker.To preserve group-level relationships from imported projects, export and import groups first so that projects can be imported into the desired group structure.Imported groups are given a private visibility level, unless imported into a parent group.If imported into a parent group, a subgroup inherits the same level of visibility unless otherwise restricted.You can export groups from the Community Edition to the Enterprise Edition and vice versa. The Enterprise Edition retains some group data that isn’t part of the Community Edition. If you’re exporting a group from the Enterprise Edition to the Community Edition, you may lose this data. For more information, see reverting from EE to CE.The maximum import file size depends on whether you import to GitLab Self-Managed or GitLab.com:If importing to a GitLab Self-Managed instance, you can import a import file of any size. Administrators can change this behavior using max_import_size option in the Application settings API.The Admin area.On GitLab.com, you can import groups using import files of no more than 5 GB in size.CompatibilityGroup file exports are in NDJSON format.You can import group file exports that were exported from a version of GitLab up to two minor versions behind.For versionCompatible source versions13.013.0, 12.10, 12.913.113.1, 13.0, 12.10Group items that are exportedThe import_export.yml file for groups lists items exported and imported when migrating groups using file exports. View this file in the branch for your version of GitLab to check which items can be imported to the destination GitLab instance. For example, import_export.yml on the 19-2-stable-ee branch.Group items that are exported Labels (without associated label priorities)Boards and Board ListsBadgesSubgroups (including all the aforementioned data)EpicsEpic resource state events.EventsWikisIterations cadences.Group items that are not exportedItems that are not exported tokensSAML discovery tokensUploadsPreparationTo preserve the member list and their respective permissions on imported groups, review the users in these groups. Make sure these users exist before importing the desired groups.Users must set a public email in the source GitLab instance that matches their confirmed primary email in the destination GitLab instance. Most users receive an email asking them to confirm their email address.Export a must have the Owner role for the group.To export the contents of a the top bar, select Search or go to and find your group.In the left sidebar, select Settings > General.In the Advanced section, select Export group.After the export is generated, you a link contained in an email that you should receive.Refresh the group settings page and in the Export project area, select Download export.Import the groupTo import the the upper-right corner, select Create new ( ) and New group.Select Import group.In the Import group from file section, enter a group name and accept or modify the associated group URL.Select Choose file.Select the GitLab export file you want to import.To begin importing, select Import.Rate limitsTo help avoid abuse, by default, users are rate limited TypeLimitExport6 groups per minuteDownload export1 download per group per minuteImport6 groups per minuteRelated topicsProject import and export APIProject import and export administration Rake tasksMigrating GitLab groupsGroup import and export APIMigrate groups by direct transfer.Known issuesMigrate projects by uploading an export filePreserving user contributionsWhen migrating from GitLab Self-Managed to GitLab.comWhen migrating to GitLab Self-ManagedEdit project export filesCompatibilityConfigure file exports as an import sourceBetween CE and EEExport a project and its dataProject items that are exportedProject items that are not exportedImport a project and its dataPrerequisitesImport a projectChanges to imported itemsImport large projectsSet maximum import file sizeRate limitsMigrate groups by uploading an export file (deprecated)Additional informationCompatibilityGroup items that are exportedGroup items that are not exportedPreparationExport a groupImport the groupRate limitsRelated topics\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:07.532Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":0,"totalLines":3,"estimatedTokens":4565}}150{"id":"doc-gitlab_duo_and_sdlc_trends_gitlab_docs-2ef75852","source":"documentation","title":"GitLab Duo and SDLC trends | GitLab Docs","url":"https://docs.gitlab.com/user/analytics/duo_and_sdlc_trends/","text":"Getting startedTutorialsManage your organizationOrganize work with projectsPlan and track workManage authentication and authorizationUse GitManage your codeUse CI/CD to build your applicationSecure your applicationDeploy and release your applicationManage your infrastructureMonitor your applicationAnalyze GitLab usageValue streams dashboardValue stream analyticsGitLab Duo and SDLC trendsDevOps adoption by instanceDevOps adoption by groupUsage trendsInsightsAnalytics dashboardsIssue analyticsMerge request analyticsProductivity analyticsCode review analyticsContribution analyticsContributor analyticsRepository analytics for projectsRepository analytics for groupsCI/CD analyticsDORA metricsDORA metrics chartsRelease notesFeature supportFind your GitLab versionGitLab Docs /Use GitLab /Analyze GitLab usage /GitLab Duo and SDLC trendsHelp us learn about your current experience with the documentation. Take the survey.GitLab Duo and SDLC , , GitLab Self-Managed, GitLab for GitLab Self-ManagedHistoryIntroduced in GitLab 16.11 with a feature flag named ai_impact_analytics_dashboard. Disabled by default.Generally available in GitLab 17.2. Feature flag ai_impact_analytics_dashboard removed.Changed to require GitLab Duo add-on in GitLab 17.6.Moved from GitLab Ultimate to GitLab Premium in 18.2.Changed to support Amazon Q in GitLab 18.2.1.Pipeline metrics table added in GitLab 18.4.Renamed from AI impact analytics to GitLab Duo and SDLC trends in GitLab 18.4.Changed to not require add-ons in GitLab 18.7.This feature is in beta for GitLab Self-Managed. For more information, see epic 51.GitLab Duo and SDLC trends measure the impact of GitLab Duo on software development lifecycle (SDLC) performance. This dashboard provides visibility into key SDLC metrics in the context of AI adoption for projects or groups. You can use the dashboard to measure which metrics have improved from your AI investments.Use GitLab Duo and SDLC trends SDLC trends in relation to your GitLab Duo how trends in GitLab Duo usage in a project or group influence other crucial productivity metrics such as mean time to merge and CI/CD statistics. GitLab Duo usage metrics are displayed for the last six months, including the current one.Monitor GitLab Duo feature the use of seats and features in a project or group over the last 30 days.The following table lists the availability of GitLab Duo and SDLC ClickHouseGitLab Duo and SDLC trends dashboardAiMetrics APIAiUserMetrics APIAiUsageData APINo (PostgreSQL only)To learn how you can optimize your license utilization, see GitLab Duo add-ons.To learn more about GitLab Duo and SDLC trends, see the blog post Developing GitLab impact analytics dashboard measures the ROI of AI. For an overview, see GitLab Duo AI Impact Dashboard.Key metricsHistoryGitLab Duo Chat usage metric replaced with GitLab Duo Agentic Chat sessions in GitLab 18.10.Assigned GitLab Duo seat engagement metric replaced with GitLab Duo users in GitLab 18.10.GitLab Duo Code Suggestions usage metric changed from percentage rate to absolute user count in GitLab 18.10.Code Suggestions acceptance rate metric replaced with GitLab Duo agent/flow users in GitLab 18.11.Trend indicators introduced in GitLab 19.0.Code Suggestions users metric replaced with GitLab Duo power users in GitLab 19.0.Pipelines using GitLab Duo features metric introduced in GitLab 19.2.GitLab Duo of users who used at least one GitLab Duo or GitLab Duo Agent Platform feature in the last 30 days.GitLab Duo power of users who used at least three GitLab Duo features in the last 30 days.GitLab Duo agent/flow of users who used at least one GitLab Duo agent or flow in the last 30 days.GitLab Duo Agent chat of chat sessions initiated in GitLab Duo Agent Platform in the last 30 days.Pipelines using GitLab Duo of CI/CD pipelines that used one or more GitLab Duo features during execution in the last 30 days.Metric trendsThe Metric trends table displays metrics for the last six months, with monthly values, percentage changes in the past six months, and trend sparklines.The metrics display a trend indicator showing the percentage change compared to the previous time period. If no data is available for the previous time period, the percentage change displays n/a.Values in green indicate positive changes, and values in red indicate negative changes. The icons next to the values indicate upward trends or downward trends .Upward trends are positive (green) for some metrics (like deployment frequency), but negative (red) for others (like mean time to merge).GitLab Duo usage metricsHistoryGitLab Duo Root Cause Analysis usage introduced in GitLab 18.1 with a feature flag named duo_rca_usage_rate. Disabled by default.GitLab Duo Root Cause Analysis usage enabled on GitLab.com, GitLab Self-Managed, and GitLab Dedicated in GitLab 18.3.GitLab Duo Root Cause Analysis usage generally available in GitLab 18.4. Feature flag duo_rca_usage_rate removed.GitLab Duo features usage introduced in GitLab 18.6.GitLab Duo Code Review requests and comments introduced in GitLab 18.7.GitLab Duo Agent Platform chats and flows introduced in GitLab 18.7.GitLab Duo Code Suggestions, Non-Agentic Chat, and Root Cause Analysis metrics changed from percentage rates to absolute user counts in GitLab 18.10.Feature of users who used at least one GitLab Duo or GitLab Duo Agent Platform feature.Agent Platform of chat sessions initiated through GitLab Duo Agent Platform.Agent Platform of agent flows (excluding chats) executed through GitLab Duo Agent Platform.Non-Agentic Chat of users who used Non-Agentic Chat.Root Cause Analysis of users who used Root Cause Analysis.Code Review of Code Review requests made on merge requests. This includes requests initiated by both merge request authors and non-authors.Code Review of Code Review comments posted on merge request diffs.Code Suggestions of users who used Code Suggestions. On GitLab.com, data updates every five minutes. GitLab counts Code Suggestions usage only if the user has pushed code to the project in the current month.Code Suggestions acceptance of code suggestions provided by GitLab Duo that have been accepted by code contributors.Development metricsLead timeMedian time to mergeDeployment frequencyMerge request throughputCritical vulnerabilities over timeContributor countPipeline metricsThe Pipeline metrics table displays metrics for the pipelines run in the selected project.Total pipeline of pipeline runs in the project.Median duration (in minutes) of a pipeline run.Success of pipeline runs that completed successfully.Failure of pipeline runs that completed with failures.Pipelines using GitLab Duo Agent PlatformHistoryIntroduced in GitLab 19.0.The Pipelines using GitLab Duo Agent Platform chart displays the number of pipelines run over the last 180 days, aggregated by month. The chart Agent of pipelines triggered by GitLab Duo Agent Platform.All number of pipelines run in the namespace.GitLab Duo Code Suggestions acceptance by languageHistoryIntroduced in GitLab 18.5.The GitLab Duo Code Suggestions acceptance by language chart displays the number of Code Suggestions accepted by programming language for the last 30 days.Hover over a bar to view for each of suggestions accepted by users.Suggestions of suggestions shown to users.Acceptance of suggestions accepted. Calculated as the number of accepted code suggestions divided by the total number of code suggestions shown.GitLab Duo Code Suggestions acceptance by IDEHistoryIntroduced in GitLab 18.7.The GitLab Duo Code Suggestions acceptance by IDE chart displays the number of Code Suggestions accepted by IDE for the last 30 days.Hover over a bar to view for each of suggestions accepted by users.Suggestions of suggestions shown to users.Acceptance of suggestions accepted. Calculated as the number of accepted code suggestions divided by the total number of code suggestions shown.Code generation volume trendsHistoryIntroduced in GitLab 18.5.The Code generation volume trends chart displays the volume of code generated through Code Suggestions over the last 180 days, aggregated by month. The chart of code of code from Code Suggestions that were accepted.Lines of code of code displayed in Code Suggestions.GitLab Duo Code Review requests by roleHistoryIntroduced in GitLab 18.7.The GitLab Duo Code Review requests by role chart displays the number of Code Review requests over the last 180 days, aggregated by month. The chart requests by of Code Review requests made by the merge request author. This includes code reviews requested automatically through the project setting and manually in the merge request by the author.Review requests by of Code Review requests made by users other than the merge request author. For example, reviewers who ask GitLab Duo to review the merge request changes.Higher author adoption indicates teams embracing automated review workflows.GitLab Duo Code Review comments sentimentHistoryIntroduced in GitLab 18.8.The GitLab Duo Code Review comments sentiment chart displays the sentiment of Code Review comments over the last 180 days, measured by positive (👍) and negative (👎) reaction rates. The chart percentage of Code Review comments that received positive (👍) reactions.Disapproval percentage of Code Review comments that received negative (👎) reactions.When interpreting your analytics, keep in mind bias is expected. Users tend to flag problems, but rarely acknowledge good suggestions, even when applying them.Low reaction rates are common. Focus on whether code improves and reviews complete faster.Rising disapproval (👎) rates signal issues. Stable or declining disapproval rates indicate healthy adoption of GitLab Duo Code Review.Returning GitLab Duo users by featureHistoryIntroduced in GitLab 19.2.The Returning GitLab Duo users by feature chart displays the retention rate over the last 180 days for each GitLab Duo Suggestions, GitLab Duo Chat, Root cause analysis, and GitLab Duo Code Review.Hover over a point to view for the selected feature and of users from the previous period who use the feature again in the selected period. Calculated as the number of returning users in the selected period divided by the number of users in the previous period.The chart starts from the second period in the selected date range. The first period doesn’t show a retention rate because there is no earlier period to compare against.GitLab Duo metrics by userHistoryIntroduced in GitLab 18.7.The user metrics tables display usage of different GitLab Duo features by individual users over the last 30 days.GitLab Duo Code Suggestions usage by of code suggestions accepted, and the code suggestions acceptance rate.GitLab Duo Code Review usage by of code reviews requested as the merge request author from GitLab Duo, and number of reactions (:thumbsup: :) to code review comments.GitLab Duo Root Cause Analysis usage by of troubleshooting requests from GitLab Duo.GitLab Duo usage by of GitLab Duo events made by the user.Flows usage by of times a user triggers a specific flow.View GitLab Duo and SDLC must have at least the Reporter role for the group.The group must be a top-level group.GitLab Duo Code Suggestions must be enabled.For GitLab Self-Managed, ClickHouse for contribution analytics must be configured.In the top bar, select Search or go to and find your project or group.In the left sidebar, select Analyze > Analytics dashboards.Select GitLab Duo and SDLC trends.To retrieve GitLab Duo and SDLC metrics, you can also use the AiMetrics, AiUserMetrics, and AiUsageData GraphQL APIs.Metric data availabilityThe following table displays the GitLab versions when usage data calculation started for GitLab Duo Duo metricData calculation startCode Suggestions usageGitLab 16.11Root Cause Analysis usageGitLab 18.0Code Review requests and commentsGitLab 18.3Agent Platform chats and flowsGitLab 18.7Key metricsMetric trendsGitLab Duo usage metricsDevelopment metricsPipeline metricsPipelines using GitLab Duo Agent PlatformGitLab Duo Code Suggestions acceptance by languageGitLab Duo Code Suggestions acceptance by IDECode generation volume trendsGitLab Duo Code Review requests by roleGitLab Duo Code Review comments sentimentReturning GitLab Duo users by featureGitLab Duo metrics by userView GitLab Duo and SDLC trendsMetric data availability\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:09.055Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":0,"totalLines":3,"estimatedTokens":3082}}151{"id":"doc-self_hosted_models_gitlab_docs-41e54114","source":"documentation","title":"Self-hosted models | GitLab Docs","url":"https://docs.gitlab.com/administration/gitlab_duo_self_hosted/","text":"Getting startedConfigure GitLabConfigure GitLab DuoAI GatewayGitLab Dedicated for GovernmentModel selectionSemantic code searchSelf-hosted modelsConfiguration types and authenticationSupported models and hardware requirementsDeploy to an offline environmentConfigure LLM platformsConfigure self-hosted to the Agent PlatformUpdate your settingsEnable features behind feature flagsMaintain GitLabMonitor GitLabSecure GitLabAdminister usersAdminister GitLab DedicatedAdminister GitLab RunnerGitLab Docs /Administer /Configure GitLab Duo /Self-hosted modelsHelp us learn about your current experience with the documentation. Take the survey.Self-hosted , Self-Managed, GitLab Dedicated for GovernmentHistoryIntroduced in GitLab 17.1 with a feature flag named ai_custom_model. Disabled by default.Enabled on GitLab Self-Managed in GitLab 17.6.Changed to require GitLab Duo add-on in GitLab 17.6 and later.Feature flag ai_custom_model removed in GitLab 17.8.Generally available in GitLab 17.9.Changed to include Premium in GitLab 18.0.Enabled on GitLab Dedicated for Government in GitLab 18.5.Changed to require the GitLab Duo Agent Platform Self-Hosted add-on for offline licenses in GitLab 18.8Changed to usage billing of features in GitLab Duo Agent Platform for online licenses in GitLab 18.9Host your own AI infrastructure to use GitLab Duo features with the LLMs of your choice. Use a self-hosted AI Gateway to keep all request and response data in your own environment, avoid external API calls, and manage the full lifecycle of requests to your LLM backends.Deployment optionsYou can use self-hosted models with different deployment options.GitLab Duo Agent PlatformUse GitLab Duo Agent Platform Self-Hosted for on-premise models or private cloud-hosted models in the GitLab Duo Agent Platform.For customers with an offline license, billing uses an Enterprise License Agreement for GitLab Duo, and you must have the GitLab Duo Agent Platform Self-Hosted add-on.For customers with an online license, billing is usage based. You can also use GitLab-managed models in a hybrid deployment.GitLab DuoGitLab Duo Self-Hosted is for customers with GitLab Duo Enterprise who are using GitLab Duo features. You can models or private cloud-hosted modelsGitLab-managed models in a hybrid deploymentThis option uses seat-based pricing.Feature versions and statusThe following table GitLab version required to use the feature.The feature status. A feature status in the deployment might be different to the status listed in the feature.To use GitLab Duo features with GitLab Duo Self-Hosted, you must have the GitLab Duo Enterprise add-on. This applies even if you can use these features with GitLab Duo Core or GitLab Duo Pro when GitLab hosts and connects to those models through the cloud-based AI Gateway.FeatureGitLab versionStatusGitLab Duo Agent PlatformGitLab 18.8 and laterGenerally availableGitLab DuoCode SuggestionsGitLab 17.9 and laterGenerally availableGitLab Duo Non-Agentic ChatGitLab 17.9 and laterGenerally availableCode ExplanationGitLab 17.9 and laterGenerally availableTest GenerationGitLab 17.9 and laterGenerally availableRefactor CodeGitLab 17.9 and laterGenerally availableFix CodeGitLab 17.9 and laterGenerally availableCode ReviewGitLab 18.3 and laterGenerally availableRoot Cause AnalysisGitLab 17.10 and laterBetaVulnerability ExplanationGitLab 18.1.2 and laterBetaMerge Commit Message GenerationGitLab 18.1.2 and laterBetaMerge Request SummaryGitLab 18.1.2 and laterBetaDiscussion SummaryGitLab 18.1.2 and laterBetaGitLab Duo for the CLIGitLab 18.1.2 and laterBetaVulnerability ResolutionGitLab 18.1.2 and laterBetaGitLab Duo and SDLC trends DashboardGitLab 17.9 and laterBetaCode Review SummaryGitLab 18.1.2 and laterExperimentInternet connectivity requirements for the Agent PlatformRequirements for internet connectivity depend on whether your subscription has an online or offline license.If your subscription has an online license, usage billing requires outbound internet connectivity. If your firewall or network policy blocks any of the following components, usage billing fails and you cannot use GitLab Duo Agent Platform features.If your subscription has an offline license, your instance does not connect to the following components. You are billed based on your Enterprise License Agreement instead of usage billing. For more information, see offline deployment.ComponentEndpointPortPurposeCustomersDotcustomers.gitlab.com443Keep license and subscription information in sync.Cloud AI Gatewaycloud.gitlab.com443Perform usage quota checks for Agent Platform features.Cloud GitLab Duo Workflow Service 1duo-workflow-svc.runway.gitlab.net443Send usage billing metadata for GitLab Duo Agent Platform features.Footnotes:Requires HTTP/2Only billing metadata is sent to these components. Prompts, code inputs, and model responses do not leave your network. For more information about the type of data that is transmitted, see Data transmission.Data transmissionThe following billing metadata is sent to GitLab for usage billing in a JSON IDUser IDCall countTimestampFor example:{ \"InstanceId\": \"ccbb3949-9836-471c-b2nb-32a38e8cca99\", \"GlobalUserId\": \"KWDTe17sGSADiAzEGJ6IuL1D7RAzsXqa2wun3aX1YuA=\", \"Quantity\": 1, \"Timestamp\": \"2026-05-04 :30.969000000\" }GlobalUserId is a deterministic but de-identified identifier. The GlobalUserId is generated from the instance ID and user ID in the GitLab code with SHA-256. It is possible for customers to map it back to a specific user if the customer builds the lookup.Inference data, including code inputs, model prompts, and model responses, does not leave the customer network.GitLab does not capture which model or model provider the customer uses.AI Gateway configurationsAfter you choose a product option, configure how your AI Gateway connects to AI Gateway and your own AI Gateway and models for full control over your AI infrastructure.Hybrid AI Gateway and model each feature, use either your self-hosted AI Gateway with self-hosted models, or the GitLab.com AI Gateway with GitLab-managed models.GitLab.com AI Gateway with default GitLab external vendor GitLab managed AI infrastructure.ConfigurationSelf-hosted AI GatewayHybrid AI Gateway and model configurationGitLab.com AI GatewayInfrastructure requirementsRequires hosting your own AI Gateway and modelsRequires hosting your own AI Gateway and modelsNo additional infrastructure neededModel optionsChoose from supported self-hosted modelsChoose from supported self-hosted models or GitLab-managed models for each GitLab Duo featureUses the default GitLab-managed modelsNetwork requirementsCan operate in fully isolated networksRequires internet connectivity for GitLab Duo features that use GitLab-managed modelsRequires internet connectivityResponsibilitiesYou set up your infrastructure, and do your own maintenanceYou set up your infrastructure, do your own maintenance, and choose which features use GitLab-managed models and AI GatewayGitLab does the set up and maintenanceSelf-hosted AI Gateway and LLMsIn a fully self-hosted configuration, you deploy your own AI Gateway and use only supported LLMs in your infrastructure, without using GitLab infrastructure or AI vendor models. This gives you full control over your data and security.This configuration only includes models configured through your self-hosted AI Gateway. If you use GitLab-managed models for any features, those features connect to the GitLab-hosted AI Gateway instead of your self-hosted gateway, making it a hybrid configuration rather than fully self-hosted.While you deploy your own AI Gateway, you can still use cloud-based LLM services like AWS Bedrock or Azure OpenAI as your model backend and they will continue to connect through your self-hosted AI Gateway.If you have an offline environment with physical barriers or security policies that prevent or limit internet access, and comprehensive LLM controls, you should use this fully self-hosted configuration.For more information, self-hosted AI Gateway configuration diagram.Hybrid AI Gateway and model configurationHistoryIntroduced in GitLab 18.3 as a beta with a feature flag named ai_self_hosted_vendored_features. Disabled by default.Enabled by default in GitLab 18.7Generally available in GitLab 18.9. Feature flag ai_self_hosted_vendored_features removed.In this hybrid configuration, you deploy your own AI Gateway and self-hosted models for most features, but configure specific features to use GitLab-managed models. When a feature is configured to use a GitLab-managed model, requests for that feature are sent to the GitLab-hosted AI Gateway instead of your self-hosted AI Gateway.This option provides flexibility by allowing you your own self-hosted models for features where you want full control.Use GitLab-managed vendor models for specific features where you prefer the models GitLab has curated.When features are configured to use GitLab-managed calls to those features use the GitLab-hosted AI Gateway, not the self-hosted AI Gateway.Internet connectivity is required for these features.This is not a fully self-hosted or isolated configuration.GitLab-managed modelsUse GitLab-managed models to connect to AI models without the need to self-host infrastructure. These models are managed entirely by GitLab.You can select the default GitLab model to use with an AI-native feature. For the default model, GitLab uses the best model based on availability, quality, and reliability. The model used for a feature can change without notice.When you select a specific GitLab-managed model, all requests for that feature use that model exclusively. If the model becomes unavailable, requests to the AI Gateway fail and users cannot use that feature until another model is selected.When you configure a feature to use GitLab-managed to those features use the GitLab-hosted AI Gateway, not the self-hosted AI Gateway.Internet connectivity is required for these features.The configuration is not fully self-hosted or isolated.GitLab.com AI Gateway with default GitLab external vendor Duo Core, Pro, or EnterpriseIf you do not meet the use case criteria for GitLab Duo Self-Hosted, you can use the GitLab.com AI Gateway with default GitLab external vendor LLMs.The GitLab.com AI Gateway is the default Enterprise offering and is not self-hosted. In this configuration, you connect your instance to the GitLab-hosted AI Gateway, which integrates with external vendor LLM providers, AIGoogle VertexThese LLMs communicate through the GitLab Cloud Connector, offering a ready-to-use AI solution without the need for on-premise infrastructure.For more information, see the GitLab.com AI Gateway configuration diagram.To set up this infrastructure, see how to configure GitLab Duo on a GitLab Self-Managed instance.Set up private infrastructureIf you have an offline license, you can set up fully private a Large Language Model (LLM) serving infrastructure.Review the supported LLM platforms to choose a serving and hosting platform, such as vLLM, AWS Bedrock, or Azure OpenAI.Check the supported models and hardware requirements to confirm your model and hardware choices.Install the AI Gateway to access GitLab Duo features.Configure your GitLab instance to use self-hosted models.Enable logging to track and manage your system’s performance.Related topicsTroubleshootingInstall the GitLab AI GatewaySupported modelsSupported Bedrock BYOM deployment guideDeployment optionsGitLab Duo Agent PlatformGitLab DuoFeature versions and statusInternet connectivity requirements for the Agent PlatformData transmissionAI Gateway configurationsSelf-hosted AI Gateway and LLMsHybrid AI Gateway and model configurationGitLab-managed modelsGitLab.com AI Gateway with default GitLab external vendor LLMsSet up private infrastructureRelated topics\n\nExample:\n```json\n{\n  \"InstanceId\": \"ccbb3949-9836-471c-b2nb-32a38e8cca99\",\n  \"GlobalUserId\": \"KWDTe17sGSADiAzEGJ6IuL1D7RAzsXqa2wun3aX1YuA=\",\n  \"Quantity\": 1,\n  \"Timestamp\": \"2026-05-04 18:04:30.969000000\"\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:09.274Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":1,"totalLines":13,"estimatedTokens":3007}}152{"id":"doc-user_management_rake_tasks_gitlab_docs-f95442a3","source":"documentation","title":"User management Rake tasks | GitLab Docs","url":"https://docs.gitlab.com/administration/raketasks/user_management/","text":"Example:\n```shell\n# omnibus-gitlab\nsudo gitlab-rake gitlab:import:user_to_projects[username@domain.tld]\n\n# installation from source\nbundle exec rake gitlab:import:user_to_projects[username@domain.tld] RAILS_ENV=production\n```\n\nExample:\n```shell\n# omnibus-gitlab\nsudo gitlab-rake gitlab:import:all_users_to_all_projects\n\n# installation from source\nbundle exec rake gitlab:import:all_users_to_all_projects RAILS_ENV=production\n```\n\nExample:\n```shell\n# omnibus-gitlab\nsudo gitlab-rake gitlab:import:user_to_groups[username@domain.tld]\n\n# installation from source\nbundle exec rake gitlab:import:user_to_groups[username@domain.tld] RAILS_ENV=production\n```\n\nExample:\n```shell\n# omnibus-gitlab\nsudo gitlab-rake gitlab:import:all_users_to_all_groups\n\n# installation from source\nbundle exec rake gitlab:import:all_users_to_all_groups RAILS_ENV=production\n```\n\nExample:\n```shell\n# omnibus-gitlab\nsudo gitlab-rake gitlab:user_management:disable_project_and_group_creation\\[:group_id\\]\n\n# installation from source\nbundle exec rake gitlab:user_management:disable_project_and_group_creation\\[:group_id\\] RAILS_ENV=production\n```\n\nExample:\n```plaintext\nblock_auto_created_users: false\n```\n\nExample:\n```shell\n# omnibus-gitlab\nsudo gitlab-rake gitlab:two_factor:disable_for_all_users\n\n# installation from source\nbundle exec rake gitlab:two_factor:disable_for_all_users RAILS_ENV=production\n```\n\nExample:\n```yaml\nproduction:\n  otp_key_base: fffffffffffffffffffffffffffffffffffffffffffffff\n```\n\nExample:\n```shell\n# omnibus-gitlab\nsudo gitlab-rake secret\n\n# installation from source\nbundle exec rake secret RAILS_ENV=production\n```\n\nExample:\n```shell\n# omnibus-gitlab\nsudo gitlab-ctl stop\nsudo cp config/secrets.yml config/secrets.yml.bak\nsudo gitlab-rake gitlab:two_factor:rotate_key:apply filename=backup.csv old_key=<old key> new_key=<new key>\n\n# installation from source\nsudo /etc/init.d/gitlab stop\ncp config/secrets.yml config/secrets.yml.bak\nbundle exec rake gitlab:two_factor:rotate_key:apply filename=backup.csv old_key=<old key> new_key=<new key> RAILS_ENV=production\n```\n\nExample:\n```shell\n# omnibus-gitlab\nsudo gitlab-ctl start\n\n# installation from source\nsudo /etc/init.d/gitlab start\n```\n\nExample:\n```shell\n# omnibus-gitlab\nsudo gitlab-ctl stop\nsudo gitlab-rake gitlab:two_factor:rotate_key:rollback filename=backup.csv\nsudo cp config/secrets.yml.bak config/secrets.yml\nsudo gitlab-ctl start\n\n# installation from source\nsudo /etc/init.d/gitlab start\nbundle exec rake gitlab:two_factor:rotate_key:rollback filename=backup.csv RAILS_ENV=production\ncp config/secrets.yml.bak config/secrets.yml\nsudo /etc/init.d/gitlab start\n```\n\nExample:\n```plaintext\nusername\nuser1\nuser2\nuser3\nuser4\n```\n\nExample:\n```shell\nbundle exec rake duo_pro:bulk_user_assignment DUO_PRO_BULK_USER_FILE_PATH=path/to/your/file.csv\n```\n\nExample:\n```shell\nbundle exec rake duo_pro:bulk_user_assignment\\['path/to/your/file.csv'\\]\n# or\nbundle exec rake \"duo_pro:bulk_user_assignment[path/to/your/file.csv]\"\n```\n\nExample:\n```shell\nbundle exec rake gitlab_subscriptions:duo:bulk_user_assignment DUO_BULK_USER_FILE_PATH=path/to/your/file.csv\n```\n\nExample:\n```shell\nbundle exec rake gitlab_subscriptions:duo:bulk_user_assignment\\['path/to/your/file.csv'\\]\n# or\nbundle exec rake \"gitlab_subscriptions:duo:bulk_user_assignment[path/to/your/file.csv]\"\n```\n\nExample:\n```shell\nbundle exec rake gitlab_subscriptions:duo:bulk_user_assignment DUO_BULK_USER_FILE_PATH=path/to/your/file.csv NAMESPACE_ID=<namespace_id>\n```\n\nExample:\n```shell\nbundle exec rake gitlab_subscriptions:duo:bulk_user_assignment\\['path/to/your/file.csv','<namespace_id>'\\]\n# or\nbundle exec rake \"gitlab_subscriptions:duo:bulk_user_assignment[path/to/your/file.csv,<namespace_id>]\"\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:09.327Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":19,"totalLines":157,"estimatedTokens":930}}153{"id":"doc-railway_sandbox_railway_docs-95f01b42","source":"documentation","title":"railway sandbox | Railway Docs","url":"https://docs.railway.app/cli/sandbox","text":"Example:\n```text\nrailway sandbox <COMMAND> [OPTIONS]\n```\n\nExample:\n```text\nrailway sandbox create\n```\n\nExample:\n```text\nrailway sandbox create --idle-timeout-minutes 30\n```\n\nExample:\n```text\nrailway sandbox create --private-network\n```\n\nExample:\n```text\nrailway sandbox fork\n```\n\nExample:\n```text\nrailway sandbox fork sbx_abc123\n```\n\nExample:\n```text\nrailway sandbox list\n```\n\nExample:\n```text\nrailway sandbox ssh\n```\n\nExample:\n```text\nrailway sandbox ssh --id sbx_abc123\n```\n\nExample:\n```text\nrailway sandbox ssh -- ls -la\n```\n\nExample:\n```text\nrailway sandbox exec -- npm run build\n```\n\nExample:\n```text\ncat seed.sql | railway sandbox exec -- psql\n```\n\nExample:\n```text\nrailway sandbox exec --id sbx_abc123 --timeout 120 -- npm test\n```\n\nExample:\n```text\nrailway sandbox exec --detach -- npm run build\n```\n\nExample:\n```text\nrailway sandbox exec --session <session-name>\n```\n\nExample:\n```text\nrailway sandbox forward 3000\n```\n\nExample:\n```text\nrailway sandbox forward 8080:3000\n```\n\nExample:\n```text\nrailway sandbox forward 3000 5432\n```\n\nExample:\n```text\nrailway sandbox destroy\n```\n\nExample:\n```text\nrailway sandbox destroy sbx_abc123\n```\n\nExample:\n```text\nrailway sandbox template build --name dev -c \"npm i -g pnpm\" --wait\n```\n\nExample:\n```text\nrailway sandbox create --template dev\n```\n\nExample:\n```text\nrailway sandbox checkpoint create after-deps\n```\n\nExample:\n```text\nrailway sandbox create --checkpoint after-deps\n```\n\nExample:\n```text\nrailway sandbox checkpoint list\nrailway sandbox checkpoint rename after-deps node-base\nrailway sandbox checkpoint delete node-base\n```\n\nExample:\n```text\nrailway sandbox create --variable NODE_ENV=production --variable PORT=8080\nrailway sandbox create --variable NODE_ENV=production,PORT=8080\n```\n\nExample:\n```text\nrailway sandbox create --variable GH_TOKEN=$(gh auth token)\n```\n\nExample:\n```text\nrailway sandbox create --env-file .env\n```\n\nExample:\n```text\nrailway sandbox create \\\n  --variable DATABASE_URL=Postgres.DATABASE_URL \\\n  --private-network\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:24.989Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":29,"totalLines":151,"estimatedTokens":504}}154{"id":"doc-railway_logs_railway_docs-32319998","source":"documentation","title":"railway logs | Railway Docs","url":"https://docs.railway.app/cli/logs","text":"Example:\n```text\nrailway logs [DEPLOYMENT_ID] [OPTIONS]\n```\n\nExample:\n```text\nrailway logs\n```\n\nExample:\n```text\nrailway logs --lines 100\n```\n\nExample:\n```text\nrailway logs --since 1h\n```\n\nExample:\n```text\nrailway logs --since 30m --until 10m\n```\n\nExample:\n```text\nrailway logs --since 2024-01-15T10:00:00Z\n```\n\nExample:\n```text\nrailway logs --lines 10 --filter \"@level:error\"\n```\n\nExample:\n```text\nrailway logs --lines 10 --filter \"@level:warn AND rate limit\"\n```\n\nExample:\n```text\nrailway logs --service backend --environment production\n```\n\nExample:\n```text\nrailway logs --latest\n```\n\nExample:\n```text\nrailway logs --json\n```\n\nExample:\n```text\nrailway logs --build\n```\n\nExample:\n```text\nrailway logs 7422c95b-c604-46bc-9de4-b7a43e1fd53d --build\n```\n\nExample:\n```text\nrailway logs --build --filter \"error\"\n```\n\nExample:\n```text\nrailway logs --http\n```\n\nExample:\n```text\nrailway logs --http --method GET --status 200\n```\n\nExample:\n```text\nrailway logs --http --method POST --path /api/users\n```\n\nExample:\n```text\nrailway logs --http --status \">=400\" --lines 50\n```\n\nExample:\n```text\nrailway logs --http --status 500..599\n```\n\nExample:\n```text\nrailway logs --http --request-id abc123\n```\n\nExample:\n```text\nrailway logs --http --method GET --filter \"@totalDuration:>=1000\"\n```\n\nExample:\n```text\nrailway logs --http --filter \"-@method:OPTIONS\"\n```\n\nExample:\n```text\nrailway logs --http --json --lines 1\n```\n\nExample:\n```text\n{\n  \"timestamp\": \"2026-06-16T00:15:14.000Z\",\n  \"method\": \"GET\",\n  \"path\": \"/api/users\",\n  \"httpStatus\": 200,\n  \"totalDuration\": 42,\n  \"requestId\": \"string\",\n  \"host\": \"myapp.up.railway.app\",\n  \"clientUa\": \"Mozilla/5.0\",\n  \"srcIp\": \"203.0.113.1\",\n  \"edgeRegion\": \"us-east-1\",\n  \"txBytes\": 512,\n  \"rxBytes\": 128,\n  \"upstreamRqDuration\": 38,\n  \"upstreamAddress\": \"10.202.164.239:8080\",\n  \"upstreamProto\": \"HTTP/1.1\",\n  \"downstreamProto\": \"HTTP/2\",\n  \"upstreamErrors\": 0,\n  \"responseDetails\": \"\",\n  \"deploymentId\": \"string\",\n  \"deploymentInstanceId\": \"string\"\n}\n```\n\nExample:\n```text\nrailway logs --network\n```\n\nExample:\n```text\nrailway logs --network --lines 100\n```\n\nExample:\n```text\nrailway logs --network --direction egress --protocol tcp\n```\n\nExample:\n```text\nrailway logs --network --peer postgres --port 5432\n```\n\nExample:\n```text\nrailway logs --network --status dropped\n```\n\nExample:\n```text\nrailway logs --network --protocol tcp --filter \"@drop_cause:NO_SOCKET\"\n```\n\nExample:\n```text\nrailway logs --network --json --lines 1\n```\n\nExample:\n```text\n{\n  \"timestamp\": \"2026-06-16T00:15:14.000Z\",\n  \"flowId\": \"string\",\n  \"captureStart\": \"2026-06-16T00:15:14.000Z\",\n  \"captureEnd\": \"2026-06-16T00:15:14.000Z\",\n  \"flowState\": \"complete\",\n  \"direction\": \"ingress\",\n  \"l4Protocol\": \"tcp\",\n  \"srcAddr\": \"10.202.164.239\",\n  \"srcPort\": 8080,\n  \"dstAddr\": \"100.64.0.2\",\n  \"dstPort\": 51222,\n  \"peerKind\": \"internet\",\n  \"peerServiceId\": null,\n  \"byteCount\": 418,\n  \"packetCount\": 6,\n  \"l4LatencyMs\": 0,\n  \"dropCause\": null,\n  \"serviceId\": \"string\",\n  \"deploymentId\": \"string\",\n  \"deploymentInstanceId\": \"string\"\n}\n```\n\nExample:\n```text\nrailway logs --dns\n```\n\nExample:\n```text\nrailway logs --dns --status failed\n```\n\nExample:\n```text\nrailway logs --dns --rcode NXDOMAIN\n```\n\nExample:\n```text\nrailway logs --dns --zone internal\n```\n\nExample:\n```text\nrailway logs --dns --domain example.com --qtype AAAA\n```\n\nExample:\n```text\nrailway logs --dns --qname backend.railway.internal --lines 50\n```\n\nExample:\n```text\nrailway logs --dns --json --lines 1\n```\n\nExample:\n```text\n{\n  \"timestamp\": \"2026-07-27T10:30:00.000Z\",\n  \"queriedAt\": \"2026-07-27T10:30:00.000Z\",\n  \"qname\": \"api.example.com\",\n  \"qtype\": \"A\",\n  \"rcode\": \"NOERROR\",\n  \"queryZone\": \"external\",\n  \"answers\": [\"203.0.113.10\"],\n  \"cnameChain\": [],\n  \"serviceId\": \"string\",\n  \"deploymentId\": \"string\",\n  \"deploymentInstanceId\": \"string\"\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:24.990Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":40,"totalLines":255,"estimatedTokens":955}}155{"id":"doc-railway_whoami_railway_docs-3c298169","source":"documentation","title":"railway whoami | Railway Docs","url":"https://docs.railway.app/cli/whoami","text":"Example:\n```text\nrailway whoami [OPTIONS]\n```\n\nExample:\n```text\nrailway whoami\n```\n\nExample:\n```text\nLogged in as John Doe (john@example.com) 👋\n```\n\nExample:\n```text\nrailway whoami --json\n```\n\nExample:\n```text\n{\n  \"name\": \"John Doe\",\n  \"email\": \"john@example.com\",\n  \"workspaces\": [\n    {\n      \"id\": \"workspace-id\",\n      \"name\": \"My Team\"\n    }\n  ]\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:24.993Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":5,"totalLines":35,"estimatedTokens":93}}156{"id":"doc-connect_the_best_mcp_servers_to_your_coding_agen-f580fc40","source":"documentation","title":"Connect the Best MCP Servers to Your Coding Agent | Railway Guides","url":"https://docs.railway.app/guides/best-mcp-servers-coding-agents","text":"Example:\n```text\n# Local (stdio) server\nclaude mcp add <name> -- <command> [args...]\n\n# Remote (HTTP) server\nclaude mcp add --transport http <name> <url>\n```\n\nExample:\n```text\n{\n  \"mcpServers\": {\n    \"my-server\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"some-mcp-package\"]\n    },\n    \"my-remote-server\": {\n      \"url\": \"https://example.com/mcp\"\n    }\n  }\n}\n```\n\nExample:\n```text\n{\n  \"servers\": {\n    \"my-server\": {\n      \"type\": \"stdio\",\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"some-mcp-package\"]\n    },\n    \"my-remote-server\": {\n      \"type\": \"http\",\n      \"url\": \"https://example.com/mcp\"\n    }\n  }\n}\n```\n\nExample:\n```text\nclaude mcp add --transport http github https://api.githubcopilot.com/mcp/\n```\n\nExample:\n```text\n{\n  \"mcpServers\": {\n    \"github\": {\n      \"url\": \"https://api.githubcopilot.com/mcp/\"\n    }\n  }\n}\n```\n\nExample:\n```text\nclaude mcp add filesystem -- npx -y @modelcontextprotocol/server-filesystem ~/notes ~/other-repo\n```\n\nExample:\n```text\n{\n  \"mcpServers\": {\n    \"filesystem\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"-y\",\n        \"@modelcontextprotocol/server-filesystem\",\n        \"/Users/you/notes\",\n        \"/Users/you/other-repo\"\n      ]\n    }\n  }\n}\n```\n\nExample:\n```text\nclaude mcp add postgres \\\n  --env DATABASE_URI=postgresql://user:pass@localhost:5432/mydb \\\n  -- uvx postgres-mcp --access-mode=restricted\n```\n\nExample:\n```text\n{\n  \"mcpServers\": {\n    \"postgres\": {\n      \"command\": \"uvx\",\n      \"args\": [\"postgres-mcp\", \"--access-mode=restricted\"],\n      \"env\": {\n        \"DATABASE_URI\": \"postgresql://user:pass@localhost:5432/mydb\"\n      }\n    }\n  }\n}\n```\n\nExample:\n```text\nclaude mcp add playwright -- npx -y @playwright/mcp@latest\n```\n\nExample:\n```text\n{\n  \"mcpServers\": {\n    \"playwright\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@playwright/mcp@latest\"]\n    }\n  }\n}\n```\n\nExample:\n```text\nclaude mcp add fetch -- uvx mcp-server-fetch\n```\n\nExample:\n```text\n{\n  \"mcpServers\": {\n    \"fetch\": {\n      \"command\": \"uvx\",\n      \"args\": [\"mcp-server-fetch\"]\n    }\n  }\n}\n```\n\nExample:\n```text\nrailway setup agent          # local MCP through the CLI\nrailway setup agent --remote # hosted remote MCP\n```\n\nExample:\n```text\nclaude mcp add --transport http railway https://mcp.railway.com\n```\n\nExample:\n```text\n{\n  \"mcpServers\": {\n    \"railway\": {\n      \"url\": \"https://mcp.railway.com\"\n    }\n  }\n}\n```\n\nExample:\n```text\nclaude mcp add --transport http context7 https://mcp.context7.com/mcp\n```\n\nExample:\n```text\n{\n  \"mcpServers\": {\n    \"context7\": {\n      \"url\": \"https://mcp.context7.com/mcp\"\n    }\n  }\n}\n```\n\nExample:\n```text\nclaude mcp add --transport http sentry https://mcp.sentry.dev/mcp\n```\n\nExample:\n```text\n{\n  \"mcpServers\": {\n    \"sentry\": {\n      \"url\": \"https://mcp.sentry.dev/mcp\"\n    }\n  }\n}\n```\n\nExample:\n```text\nclaude mcp add memory -- npx -y @modelcontextprotocol/server-memory\n```\n\nExample:\n```text\n{\n  \"mcpServers\": {\n    \"memory\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@modelcontextprotocol/server-memory\"]\n    }\n  }\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:25.546Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":22,"totalLines":207,"estimatedTokens":756}}157{"id":"doc-torchrl_objectives_coding_a_ddpg_loss_pytorch_tu-e421a8e6","source":"documentation","title":"TorchRL objectives: Coding a DDPG loss — PyTorch Tutorials 2.13.0+cu130 documentation","url":"https://docs.pytorch.org/tutorials/advanced/coding_ddpg.html","text":"Example:\n```js\nDocs Access comprehensive developer documentation for PyTorch View Docs Tutorials Get in-depth tutorials for beginners and advanced developers View Tutorials Resources Find development resources and get your questions answered View Resources\n```\n\nTo analyze traffic and optimize your experience, we serve cookies on this site. By clicking or navigating, you agree to allow our usage of cookies. As the current maintainers of this site, Facebook’s Cookies Policy applies. Learn more, including about available Policy.\n\nExample:\n```text\n%%bash\npip3 install torchrl mujoco glfw\n```\n\nExample:\n```text\nimport torch\nimport tqdm\n```\n\nExample:\n```text\nis_fork = multiprocessing.get_start_method() == \"fork\"\ndevice = (\n    torch.device(0)\n    if torch.cuda.is_available() and not is_fork\n    else torch.device(\"cpu\")\n)\ncollector_device = torch.device(\"cpu\")  # Change the device to ``cuda`` to use CUDA\n```\n\nExample:\n```text\n>>> data = replay_buffer.sample()\n>>> loss_dict = loss_module(data)\n```\n\nExample:\n```text\n>>> loss_val = sum(loss for key, loss in loss_dict.items() if key.startswith(\"loss_\"))\n```\n\nExample:\n```text\nfrom tensordict.nn import TensorDictModule, TensorDictSequential\n\n\ndef _init(\n    self,\n    actor_network: TensorDictModule,\n    value_network: TensorDictModule,\n) -> None:\n    super(type(self), self).__init__()\n\n    self.convert_to_functional(\n        actor_network,\n        \"actor_network\",\n        create_target_params=True,\n    )\n    self.convert_to_functional(\n        value_network,\n        \"value_network\",\n        create_target_params=True,\n        compare_against=list(actor_network.parameters()),\n    )\n\n    self.actor_in_keys = actor_network.in_keys\n\n    # Since the value we'll be using is based on the actor and value network,\n    # we put them together in a single actor-critic container.\n    actor_critic = ActorCriticWrapper(actor_network, value_network)\n    self.actor_critic = actor_critic\n    self.loss_function = \"l2\"\n```\n\nExample:\n```text\nfrom torchrl.objectives.utils import ValueEstimators\n\ndefault_value_estimator = ValueEstimators.TD0\n```\n\nExample:\n```text\nfrom torchrl.objectives.utils import default_value_kwargs\nfrom torchrl.objectives.value import TD0Estimator, TD1Estimator, TDLambdaEstimator\n\n\ndef make_value_estimator(self, value_type: ValueEstimators, **hyperparams):\n    hp = dict(default_value_kwargs(value_type))\n    if hasattr(self, \"gamma\"):\n        hp[\"gamma\"] = self.gamma\n    hp.update(hyperparams)\n    value_key = \"state_action_value\"\n    if value_type == ValueEstimators.TD1:\n        self._value_estimator = TD1Estimator(value_network=self.actor_critic, **hp)\n    elif value_type == ValueEstimators.TD0:\n        self._value_estimator = TD0Estimator(value_network=self.actor_critic, **hp)\n    elif value_type == ValueEstimators.GAE:\n        raise NotImplementedError(\n            f\"Value type {value_type} it not implemented for loss {type(self)}.\"\n        )\n    elif value_type == ValueEstimators.TDLambda:\n        self._value_estimator = TDLambdaEstimator(value_network=self.actor_critic, **hp)\n    else:\n        raise NotImplementedError(f\"Unknown value type {value_type}\")\n    self._value_estimator.set_keys(value=value_key)\n```\n\nExample:\n```text\ndef _loss_actor(\n    self,\n    tensordict,\n) -> torch.Tensor:\n    td_copy = tensordict.select(*self.actor_in_keys)\n    # Get an action from the actor network: since we made it functional, we need to pass the params\n    with self.actor_network_params.to_module(self.actor_network):\n        td_copy = self.actor_network(td_copy)\n    # get the value associated with that action\n    with self.value_network_params.detach().to_module(self.value_network):\n        td_copy = self.value_network(td_copy)\n    return -td_copy.get(\"state_action_value\")\n```\n\nExample:\n```text\nfrom torchrl.objectives.utils import distance_loss\n\n\ndef _loss_value(\n    self,\n    tensordict,\n):\n    td_copy = tensordict.clone()\n\n    # V(s, a)\n    with self.value_network_params.to_module(self.value_network):\n        self.value_network(td_copy)\n    pred_val = td_copy.get(\"state_action_value\").squeeze(-1)\n\n    # we manually reconstruct the parameters of the actor-critic, where the first\n    # set of parameters belongs to the actor and the second to the value function.\n    target_params = TensorDict(\n        {\n            \"module\": {\n                \"0\": self.target_actor_network_params,\n                \"1\": self.target_value_network_params,\n            }\n        },\n        batch_size=self.target_actor_network_params.batch_size,\n        device=self.target_actor_network_params.device,\n    )\n    with target_params.to_module(self.actor_critic):\n        target_value = self.value_estimator.value_estimate(tensordict).squeeze(-1)\n\n    # Computes the value loss: L2, L1 or smooth L1 depending on `self.loss_function`\n    loss_value = distance_loss(pred_val, target_value, loss_function=self.loss_function)\n    td_error = (pred_val - target_value).pow(2)\n\n    return loss_value, td_error, pred_val, target_value\n```\n\nExample:\n```text\nfrom tensordict import TensorDict, TensorDictBase\n\n\ndef _forward(self, input_tensordict: TensorDictBase) -> TensorDict:\n    loss_value, td_error, pred_val, target_value = self.loss_value(\n        input_tensordict,\n    )\n    td_error = td_error.detach()\n    td_error = td_error.unsqueeze(input_tensordict.ndimension())\n    if input_tensordict.device is not None:\n        td_error = td_error.to(input_tensordict.device)\n    input_tensordict.set(\n        \"td_error\",\n        td_error,\n        inplace=True,\n    )\n    loss_actor = self.loss_actor(input_tensordict)\n    return TensorDict(\n        source={\n            \"loss_actor\": loss_actor.mean(),\n            \"loss_value\": loss_value.mean(),\n            \"pred_value\": pred_val.mean().detach(),\n            \"target_value\": target_value.mean().detach(),\n            \"pred_value_max\": pred_val.max().detach(),\n            \"target_value_max\": target_value.max().detach(),\n        },\n        batch_size=[],\n    )\n\n\nfrom torchrl.objectives import LossModule\n\n\nclass DDPGLoss(LossModule):\n    default_value_estimator = default_value_estimator\n    make_value_estimator = make_value_estimator\n\n    __init__ = _init\n    forward = _forward\n    loss_value = _loss_value\n    loss_actor = _loss_actor\n```\n\nExample:\n```text\nenv = GymEnv(\"HalfCheetah-v4\")\n```\n\nExample:\n```text\nenv = DMControlEnv(\"cheetah\", \"run\")\n```\n\nExample:\n```text\nenv = GymEnv(\"HalfCheetah-v4\", from_pixels=True, pixels_only=True)\n```\n\nExample:\n```text\nfrom torchrl.envs.libs.dm_control import DMControlEnv\nfrom torchrl.envs.libs.gym import GymEnv\n\nenv_library = None\nenv_name = None\n\n\ndef make_env(from_pixels=False):\n    \"\"\"Create a base ``env``.\"\"\"\n    global env_library\n    global env_name\n\n    if backend == \"dm_control\":\n        env_name = \"cheetah\"\n        env_task = \"run\"\n        env_args = (env_name, env_task)\n        env_library = DMControlEnv\n    elif backend == \"gym\":\n        env_name = \"HalfCheetah-v4\"\n        env_args = (env_name,)\n        env_library = GymEnv\n    else:\n        raise NotImplementedError\n\n    env_kwargs = {\n        \"device\": device,\n        \"from_pixels\": from_pixels,\n        \"pixels_only\": from_pixels,\n        \"frame_skip\": 2,\n    }\n    env = env_library(*env_args, **env_kwargs)\n    return env\n```\n\nExample:\n```text\nfrom torchrl.envs import (\n    CatTensors,\n    DoubleToFloat,\n    EnvCreator,\n    InitTracker,\n    ObservationNorm,\n    ParallelEnv,\n    RewardScaling,\n    StepCounter,\n    TransformedEnv,\n)\n\n\ndef make_transformed_env(\n    env,\n):\n    \"\"\"Apply transforms to the ``env`` (such as reward scaling and state normalization).\"\"\"\n\n    env = TransformedEnv(env)\n\n    # we append transforms one by one, although we might as well create the\n    # transformed environment using the `env = TransformedEnv(base_env, transforms)`\n    # syntax.\n    env.append_transform(RewardScaling(loc=0.0, scale=reward_scaling))\n\n    # We concatenate all states into a single \"observation_vector\"\n    # even if there is a single tensor, it'll be renamed in \"observation_vector\".\n    # This facilitates the downstream operations as we know the name of the\n    # output tensor.\n    # In some environments (not half-cheetah), there may be more than one\n    # observation vector: in this case this code snippet will concatenate them\n    # all.\n    selected_keys = list(env.observation_spec.keys())\n    out_key = \"observation_vector\"\n    env.append_transform(CatTensors(in_keys=selected_keys, out_key=out_key))\n\n    # we normalize the states, but for now let's just instantiate a stateless\n    # version of the transform\n    env.append_transform(ObservationNorm(in_keys=[out_key], standard_normal=True))\n\n    env.append_transform(DoubleToFloat())\n\n    env.append_transform(StepCounter(max_frames_per_traj))\n\n    # We need a marker for the start of trajectories for our Ornstein-Uhlenbeck (OU)\n    # exploration:\n    env.append_transform(InitTracker())\n\n    return env\n```\n\nExample:\n```text\nenv = ParallelEnv(\n    lambda: TransformedEnv(GymEnv(\"HalfCheetah-v4\"), transforms),\n    num_workers=4\n)\nenv = TransformedEnv(\n    ParallelEnv(lambda: GymEnv(\"HalfCheetah-v4\"), num_workers=4),\n    transforms\n)\n```\n\nExample:\n```text\ndef parallel_env_constructor(\n    env_per_collector,\n    transform_state_dict,\n):\n    if env_per_collector == 1:\n\n        def make_t_env():\n            env = make_transformed_env(make_env())\n            env.transform[2].init_stats(3)\n            env.transform[2].loc.copy_(transform_state_dict[\"loc\"])\n            env.transform[2].scale.copy_(transform_state_dict[\"scale\"])\n            return env\n\n        env_creator = EnvCreator(make_t_env)\n        return env_creator\n\n    parallel_env = ParallelEnv(\n        num_workers=env_per_collector,\n        create_env_fn=EnvCreator(lambda: make_env()),\n        create_env_kwargs=None,\n        pin_memory=False,\n    )\n    env = make_transformed_env(parallel_env)\n    # we call `init_stats` for a limited number of steps, just to instantiate\n    # the lazy buffers.\n    env.transform[2].init_stats(3, cat_dim=1, reduce_dim=[0, 1])\n    env.transform[2].load_state_dict(transform_state_dict)\n    return env\n\n\n# The backend can be ``gym`` or ``dm_control``\nbackend = \"gym\"\n```\n\nExample:\n```text\nreward_scaling = 5.0\n```\n\nExample:\n```text\nmax_frames_per_traj = 500\n```\n\nExample:\n```text\ndef get_env_stats():\n    \"\"\"Gets the stats of an environment.\"\"\"\n    proof_env = make_transformed_env(make_env())\n    t = proof_env.transform[2]\n    t.init_stats(init_env_steps)\n    transform_state_dict = t.state_dict()\n    proof_env.close()\n    return transform_state_dict\n```\n\nExample:\n```text\ninit_env_steps = 5000\n\ntransform_state_dict = get_env_stats()\n```\n\nExample:\n```text\nGym has been unmaintained since 2022 and does not support NumPy 2.0 amongst other critical functionality.\nPlease upgrade to Gymnasium, the maintained drop-in replacement of Gym, or contact the authors of your software and request that they upgrade.\nUsers of this version of Gym should be able to simply replace 'import gym' with 'import gymnasium as gym' in the vast majority of cases.\nSee the migration guide at https://gymnasium.farama.org/introduction/migration_guide/ for additional information.\n```\n\nExample:\n```text\nenv_per_collector = 4\n```\n\nExample:\n```text\nparallel_env = parallel_env_constructor(\n    env_per_collector=env_per_collector,\n    transform_state_dict=transform_state_dict,\n)\n\n\nfrom torchrl.data import CompositeSpec\n```\n\nExample:\n```text\nfrom torchrl.modules import (\n    ActorCriticWrapper,\n    DdpgMlpActor,\n    DdpgMlpQNet,\n    OrnsteinUhlenbeckProcessModule,\n    ProbabilisticActor,\n    TanhDelta,\n    ValueOperator,\n)\n\n\ndef make_ddpg_actor(\n    transform_state_dict,\n    device=\"cpu\",\n):\n    proof_environment = make_transformed_env(make_env())\n    proof_environment.transform[2].init_stats(3)\n    proof_environment.transform[2].load_state_dict(transform_state_dict)\n\n    out_features = proof_environment.action_spec.shape[-1]\n\n    actor_net = DdpgMlpActor(\n        action_dim=out_features,\n    )\n\n    in_keys = [\"observation_vector\"]\n    out_keys = [\"param\"]\n\n    actor = TensorDictModule(\n        actor_net,\n        in_keys=in_keys,\n        out_keys=out_keys,\n    )\n\n    actor = ProbabilisticActor(\n        actor,\n        distribution_class=TanhDelta,\n        in_keys=[\"param\"],\n        spec=CompositeSpec(action=proof_environment.action_spec),\n    ).to(device)\n\n    q_net = DdpgMlpQNet()\n\n    in_keys = in_keys + [\"action\"]\n    qnet = ValueOperator(\n        in_keys=in_keys,\n        module=q_net,\n    ).to(device)\n\n    # initialize lazy modules\n    qnet(actor(proof_environment.reset().to(device)))\n    return actor, qnet\n\n\nactor, qnet = make_ddpg_actor(\n    transform_state_dict=transform_state_dict,\n    device=device,\n)\n```\n\nExample:\n```text\n/usr/local/lib/python3.10/dist-packages/torchrl/data/tensor_specs.py:7085: DeprecationWarning: The CompositeSpec has been deprecated and will be removed in v0.8. Please use Composite instead.\n  warnings.warn(\n```\n\nExample:\n```text\nannealing_frames = 1_000_000\n\nactor_model_explore = TensorDictSequential(\n    actor,\n    OrnsteinUhlenbeckProcessModule(\n        spec=actor.spec.clone(),\n        annealing_num_steps=annealing_frames,\n    ).to(device),\n)\nif device == torch.device(\"cpu\"):\n    actor_model_explore.share_memory()\n```\n\nExample:\n```text\ntotal_frames = 10_000  # 1_000_000\n```\n\nExample:\n```text\ntraj_len = 200\nframes_per_batch = env_per_collector * traj_len\ninit_random_frames = 5000\nnum_collectors = 2\n\nfrom torchrl.collectors import SyncDataCollector\nfrom torchrl.envs import ExplorationType\n\ncollector = SyncDataCollector(\n    parallel_env,\n    policy=actor_model_explore,\n    total_frames=total_frames,\n    frames_per_batch=frames_per_batch,\n    init_random_frames=init_random_frames,\n    reset_at_each_iter=False,\n    split_trajs=False,\n    device=collector_device,\n    exploration_type=ExplorationType.RANDOM,\n)\n```\n\nExample:\n```text\nfrom torchrl.trainers import Recorder\n\n\ndef make_recorder(actor_model_explore, transform_state_dict, record_interval):\n    base_env = make_env()\n    environment = make_transformed_env(base_env)\n    environment.transform[2].init_stats(\n        3\n    )  # must be instantiated to load the state dict\n    environment.transform[2].load_state_dict(transform_state_dict)\n\n    recorder_obj = Recorder(\n        record_frames=1000,\n        policy_exploration=actor_model_explore,\n        environment=environment,\n        exploration_type=ExplorationType.DETERMINISTIC,\n        record_interval=record_interval,\n    )\n    return recorder_obj\n```\n\nExample:\n```text\nrecord_interval = 10\n\nrecorder = make_recorder(\n    actor_model_explore, transform_state_dict, record_interval=record_interval\n)\n\nfrom torchrl.data.replay_buffers import (\n    LazyMemmapStorage,\n    PrioritizedSampler,\n    RandomSampler,\n    TensorDictReplayBuffer,\n)\n```\n\nExample:\n```text\nfrom torchrl.envs import RandomCropTensorDict\n\n\ndef make_replay_buffer(buffer_size, batch_size, random_crop_len, prefetch=3, prb=False):\n    if prb:\n        sampler = PrioritizedSampler(\n            max_capacity=buffer_size,\n            alpha=0.7,\n            beta=0.5,\n        )\n    else:\n        sampler = RandomSampler()\n    replay_buffer = TensorDictReplayBuffer(\n        storage=LazyMemmapStorage(\n            buffer_size,\n            scratch_dir=buffer_scratch_dir,\n        ),\n        batch_size=batch_size,\n        sampler=sampler,\n        pin_memory=False,\n        prefetch=prefetch,\n        transform=RandomCropTensorDict(random_crop_len, sample_dim=1),\n    )\n    return replay_buffer\n```\n\nExample:\n```text\nimport tempfile\n\ntmpdir = tempfile.TemporaryDirectory()\nbuffer_scratch_dir = tmpdir.name\n```\n\nExample:\n```text\ndef ceil_div(x, y):\n    return -x // (-y)\n\n\nbuffer_size = 1_000_000\nbuffer_size = ceil_div(buffer_size, traj_len)\n```\n\nExample:\n```text\nprb = False\n```\n\nExample:\n```text\nupdate_to_data = 64\n```\n\nExample:\n```text\nrandom_crop_len = 25\n```\n\nExample:\n```text\nbatch_size = ceil_div(64 * frames_per_batch, update_to_data * random_crop_len)\n\nreplay_buffer = make_replay_buffer(\n    buffer_size=buffer_size,\n    batch_size=batch_size,\n    random_crop_len=random_crop_len,\n    prefetch=3,\n    prb=prb,\n)\n```\n\nExample:\n```text\ngamma = 0.99\nlmbda = 0.9\ntau = 0.001  # Decay factor for the target network\n\nloss_module = DDPGLoss(actor, qnet)\n```\n\nExample:\n```text\nloss_module.make_value_estimator(ValueEstimators.TDLambda, gamma=gamma, lmbda=lmbda, device=device)\n```\n\nExample:\n```text\nfrom torchrl.objectives.utils import SoftUpdate\n\ntarget_net_updater = SoftUpdate(loss_module, eps=1 - tau)\n```\n\nExample:\n```text\nfrom torch import optim\n\noptimizer_actor = optim.Adam(\n    loss_module.actor_network_params.values(True, True), lr=1e-4, weight_decay=0.0\n)\noptimizer_value = optim.Adam(\n    loss_module.value_network_params.values(True, True), lr=1e-3, weight_decay=1e-2\n)\ntotal_collection_steps = total_frames // frames_per_batch\n```\n\nExample:\n```text\nrewards = []\nrewards_eval = []\n\n# Main loop\n\ncollected_frames = 0\npbar = tqdm.tqdm(total=total_frames)\nr0 = None\nfor i, tensordict in enumerate(collector):\n\n    # update weights of the inference policy\n    collector.update_policy_weights_()\n\n    if r0 is None:\n        r0 = tensordict[\"next\", \"reward\"].mean().item()\n    pbar.update(tensordict.numel())\n\n    # extend the replay buffer with the new data\n    current_frames = tensordict.numel()\n    collected_frames += current_frames\n    replay_buffer.extend(tensordict.cpu())\n\n    # optimization steps\n    if collected_frames >= init_random_frames:\n        for _ in range(update_to_data):\n            # sample from replay buffer\n            sampled_tensordict = replay_buffer.sample().to(device)\n\n            # Compute loss\n            loss_dict = loss_module(sampled_tensordict)\n\n            # optimize\n            loss_dict[\"loss_actor\"].backward()\n            gn1 = torch.nn.utils.clip_grad_norm_(\n                loss_module.actor_network_params.values(True, True), 10.0\n            )\n            optimizer_actor.step()\n            optimizer_actor.zero_grad()\n\n            loss_dict[\"loss_value\"].backward()\n            gn2 = torch.nn.utils.clip_grad_norm_(\n                loss_module.value_network_params.values(True, True), 10.0\n            )\n            optimizer_value.step()\n            optimizer_value.zero_grad()\n\n            gn = (gn1**2 + gn2**2) ** 0.5\n\n            # update priority\n            if prb:\n                replay_buffer.update_tensordict_priority(sampled_tensordict)\n            # update target network\n            target_net_updater.step()\n\n    rewards.append(\n        (\n            i,\n            tensordict[\"next\", \"reward\"].mean().item(),\n        )\n    )\n    td_record = recorder(None)\n    if td_record is not None:\n        rewards_eval.append((i, td_record[\"r_evaluation\"].item()))\n    if len(rewards_eval) and collected_frames >= init_random_frames:\n        target_value = loss_dict[\"target_value\"].item()\n        loss_value = loss_dict[\"loss_value\"].item()\n        loss_actor = loss_dict[\"loss_actor\"].item()\n        rn = sampled_tensordict[\"next\", \"reward\"].mean().item()\n        rs = sampled_tensordict[\"next\", \"reward\"].std().item()\n        pbar.set_description(\n            f\"reward: {rewards[-1][1]: 4.2f} (r0 = {r0: 4.2f}), \"\n            f\"reward eval: reward: {rewards_eval[-1][1]: 4.2f}, \"\n            f\"reward normalized={rn :4.2f}/{rs :4.2f}, \"\n            f\"grad norm={gn: 4.2f}, \"\n            f\"loss_value={loss_value: 4.2f}, \"\n            f\"loss_actor={loss_actor: 4.2f}, \"\n            f\"target value: {target_value: 4.2f}\"\n        )\n\n    # update the exploration strategy\n    actor_model_explore[1].step(current_frames)\n\ncollector.shutdown()\ndel collector\n```\n\nExample:\n```text\n0%|          | 0/10000 [00:00<?, ?it/s]\n  8%|▊         | 800/10000 [00:00<00:06, 1518.83it/s]\n 16%|█▌        | 1600/10000 [00:02<00:15, 525.09it/s]\n 24%|██▍       | 2400/10000 [00:03<00:09, 769.60it/s]\n 32%|███▏      | 3200/10000 [00:03<00:06, 988.31it/s]\n 40%|████      | 4000/10000 [00:04<00:05, 1169.93it/s]\n 48%|████▊     | 4800/10000 [00:04<00:03, 1370.36it/s]\n 56%|█████▌    | 5600/10000 [00:04<00:02, 1537.45it/s]\nreward: -1.27 (r0 = -2.37), reward eval: reward: -0.00, reward normalized=-3.16/6.28, grad norm= 315.33, loss_value= 479.11, loss_actor= 14.76, target value: -20.10:  56%|█████▌    | 5600/10000 [00:06<00:02, 1537.45it/s]\nreward: -1.27 (r0 = -2.37), reward eval: reward: -0.00, reward normalized=-3.16/6.28, grad norm= 315.33, loss_value= 479.11, loss_actor= 14.76, target value: -20.10:  64%|██████▍   | 6400/10000 [00:07<00:05, 705.09it/s]\nreward: -1.38 (r0 = -2.37), reward eval: reward: -0.00, reward normalized=-2.20/5.79, grad norm= 103.54, loss_value= 276.23, loss_actor= 13.86, target value: -14.13:  64%|██████▍   | 6400/10000 [00:09<00:05, 705.09it/s]\nreward: -1.38 (r0 = -2.37), reward eval: reward: -0.00, reward normalized=-2.20/5.79, grad norm= 103.54, loss_value= 276.23, loss_actor= 13.86, target value: -14.13:  72%|███████▏  | 7200/10000 [00:09<00:05, 521.82it/s]\nreward: -4.92 (r0 = -2.37), reward eval: reward: -0.00, reward normalized=-2.33/5.56, grad norm= 46.19, loss_value= 204.95, loss_actor= 15.30, target value: -15.06:  72%|███████▏  | 7200/10000 [00:11<00:05, 521.82it/s]\nreward: -4.92 (r0 = -2.37), reward eval: reward: -0.00, reward normalized=-2.33/5.56, grad norm= 46.19, loss_value= 204.95, loss_actor= 15.30, target value: -15.06:  80%|████████  | 8000/10000 [00:12<00:04, 442.94it/s]\nreward: -5.06 (r0 = -2.37), reward eval: reward: -0.00, reward normalized=-3.37/5.25, grad norm= 58.25, loss_value= 198.39, loss_actor= 23.00, target value: -21.62:  80%|████████  | 8000/10000 [00:13<00:04, 442.94it/s]\nreward: -5.06 (r0 = -2.37), reward eval: reward: -0.00, reward normalized=-3.37/5.25, grad norm= 58.25, loss_value= 198.39, loss_actor= 23.00, target value: -21.62:  88%|████████▊ | 8800/10000 [00:14<00:02, 401.79it/s]\nreward: -4.84 (r0 = -2.37), reward eval: reward: -4.94, reward normalized=-2.67/4.86, grad norm= 85.27, loss_value= 241.12, loss_actor= 14.91, target value: -17.81:  88%|████████▊ | 8800/10000 [00:18<00:02, 401.79it/s]\nreward: -4.84 (r0 = -2.37), reward eval: reward: -4.94, reward normalized=-2.67/4.86, grad norm= 85.27, loss_value= 241.12, loss_actor= 14.91, target value: -17.81:  96%|█████████▌| 9600/10000 [00:18<00:01, 305.66it/s]\nreward: -3.67 (r0 = -2.37), reward eval: reward: -4.94, reward normalized=-2.98/5.30, grad norm= 127.11, loss_value= 272.35, loss_actor= 17.36, target value: -21.72:  96%|█████████▌| 9600/10000 [00:20<00:01, 305.66it/s]\nreward: -3.67 (r0 = -2.37), reward eval: reward: -4.94, reward normalized=-2.98/5.30, grad norm= 127.11, loss_value= 272.35, loss_actor= 17.36, target value: -21.72: : 10400it [00:21, 302.42it/s]\nreward: -4.51 (r0 = -2.37), reward eval: reward: -4.94, reward normalized=-3.49/4.76, grad norm= 212.69, loss_value= 206.50, loss_actor= 21.81, target value: -24.66: : 10400it [00:23, 302.42it/s]\n```\n\nExample:\n```text\nfrom matplotlib import pyplot as plt\n\nplt.figure()\nplt.plot(*zip(*rewards), label=\"training\")\nplt.plot(*zip(*rewards_eval), label=\"eval\")\nplt.legend()\nplt.xlabel(\"iter\")\nplt.ylabel(\"reward\")\nplt.tight_layout()\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:23.790Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":46,"totalLines":797,"estimatedTokens":5793}}158{"id":"doc-beta_building_a_simple_cpu_performance_profiler_-91077b6a","source":"documentation","title":"(beta) Building a Simple CPU Performance Profiler with FX — PyTorch Tutorials 2.13.0+cu130 documentation","url":"https://docs.pytorch.org/tutorials/intermediate/fx_profiling_tutorial.html","text":"Example:\n```js\nDocs Access comprehensive developer documentation for PyTorch View Docs Tutorials Get in-depth tutorials for beginners and advanced developers View Tutorials Resources Find development resources and get your questions answered View Resources\n```\n\nTo analyze traffic and optimize your experience, we serve cookies on this site. By clicking or navigating, you agree to allow our usage of cookies. As the current maintainers of this site, Facebook’s Cookies Policy applies. Learn more, including about available Policy.\n\nExample:\n```text\nimport torch\nimport torch.fx\nimport torchvision.models as models\n\nrn18 = models.resnet18()\nrn18.eval()\n```\n\nExample:\n```text\nResNet(\n  (conv1): Conv2d(3, 64, kernel_size=(7, 7), stride=(2, 2), padding=(3, 3), bias=False)\n  (bn1): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, bias=True, track_running_stats=True)\n  (relu): ReLU(inplace=True)\n  (maxpool): MaxPool2d(kernel_size=3, stride=2, padding=1, dilation=1, ceil_mode=False)\n  (layer1): Sequential(\n    (0): BasicBlock(\n      (conv1): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n      (bn1): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, bias=True, track_running_stats=True)\n      (relu): ReLU(inplace=True)\n      (conv2): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n      (bn2): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, bias=True, track_running_stats=True)\n    )\n    (1): BasicBlock(\n      (conv1): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n      (bn1): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, bias=True, track_running_stats=True)\n      (relu): ReLU(inplace=True)\n      (conv2): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n      (bn2): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, bias=True, track_running_stats=True)\n    )\n  )\n  (layer2): Sequential(\n    (0): BasicBlock(\n      (conv1): Conv2d(64, 128, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), bias=False)\n      (bn1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, bias=True, track_running_stats=True)\n      (relu): ReLU(inplace=True)\n      (conv2): Conv2d(128, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n      (bn2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, bias=True, track_running_stats=True)\n      (downsample): Sequential(\n        (0): Conv2d(64, 128, kernel_size=(1, 1), stride=(2, 2), bias=False)\n        (1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, bias=True, track_running_stats=True)\n      )\n    )\n    (1): BasicBlock(\n      (conv1): Conv2d(128, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n      (bn1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, bias=True, track_running_stats=True)\n      (relu): ReLU(inplace=True)\n      (conv2): Conv2d(128, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n      (bn2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, bias=True, track_running_stats=True)\n    )\n  )\n  (layer3): Sequential(\n    (0): BasicBlock(\n      (conv1): Conv2d(128, 256, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), bias=False)\n      (bn1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, bias=True, track_running_stats=True)\n      (relu): ReLU(inplace=True)\n      (conv2): Conv2d(256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n      (bn2): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, bias=True, track_running_stats=True)\n      (downsample): Sequential(\n        (0): Conv2d(128, 256, kernel_size=(1, 1), stride=(2, 2), bias=False)\n        (1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, bias=True, track_running_stats=True)\n      )\n    )\n    (1): BasicBlock(\n      (conv1): Conv2d(256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n      (bn1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, bias=True, track_running_stats=True)\n      (relu): ReLU(inplace=True)\n      (conv2): Conv2d(256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n      (bn2): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, bias=True, track_running_stats=True)\n    )\n  )\n  (layer4): Sequential(\n    (0): BasicBlock(\n      (conv1): Conv2d(256, 512, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), bias=False)\n      (bn1): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, bias=True, track_running_stats=True)\n      (relu): ReLU(inplace=True)\n      (conv2): Conv2d(512, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n      (bn2): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, bias=True, track_running_stats=True)\n      (downsample): Sequential(\n        (0): Conv2d(256, 512, kernel_size=(1, 1), stride=(2, 2), bias=False)\n        (1): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, bias=True, track_running_stats=True)\n      )\n    )\n    (1): BasicBlock(\n      (conv1): Conv2d(512, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n      (bn1): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, bias=True, track_running_stats=True)\n      (relu): ReLU(inplace=True)\n      (conv2): Conv2d(512, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n      (bn2): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, bias=True, track_running_stats=True)\n    )\n  )\n  (avgpool): AdaptiveAvgPool2d(output_size=(1, 1))\n  (fc): Linear(in_features=512, out_features=1000, bias=True)\n)\n```\n\nExample:\n```text\ninput = torch.randn(5, 3, 224, 224)\noutput = rn18(input)\n```\n\nExample:\n```text\nimport statistics, tabulate, time\nfrom typing import Any, Dict, List\nfrom torch.fx import Interpreter\n```\n\nExample:\n```text\ntraced_rn18 = torch.fx.symbolic_trace(rn18)\nprint(traced_rn18.graph)\n```\n\nExample:\n```text\ngraph():\n    %x : torch.Tensor [num_users=1] = placeholder[target=x]\n    %conv1 : [num_users=1] = call_module[target=conv1](args = (%x,), kwargs = {})\n    %bn1 : [num_users=1] = call_module[target=bn1](args = (%conv1,), kwargs = {})\n    %relu : [num_users=1] = call_module[target=relu](args = (%bn1,), kwargs = {})\n    %maxpool : [num_users=2] = call_module[target=maxpool](args = (%relu,), kwargs = {})\n    %layer1_0_conv1 : [num_users=1] = call_module[target=layer1.0.conv1](args = (%maxpool,), kwargs = {})\n    %layer1_0_bn1 : [num_users=1] = call_module[target=layer1.0.bn1](args = (%layer1_0_conv1,), kwargs = {})\n    %layer1_0_relu : [num_users=1] = call_module[target=layer1.0.relu](args = (%layer1_0_bn1,), kwargs = {})\n    %layer1_0_conv2 : [num_users=1] = call_module[target=layer1.0.conv2](args = (%layer1_0_relu,), kwargs = {})\n    %layer1_0_bn2 : [num_users=1] = call_module[target=layer1.0.bn2](args = (%layer1_0_conv2,), kwargs = {})\n    %add : [num_users=1] = call_function[target=operator.add](args = (%layer1_0_bn2, %maxpool), kwargs = {})\n    %layer1_0_relu_1 : [num_users=2] = call_module[target=layer1.0.relu](args = (%add,), kwargs = {})\n    %layer1_1_conv1 : [num_users=1] = call_module[target=layer1.1.conv1](args = (%layer1_0_relu_1,), kwargs = {})\n    %layer1_1_bn1 : [num_users=1] = call_module[target=layer1.1.bn1](args = (%layer1_1_conv1,), kwargs = {})\n    %layer1_1_relu : [num_users=1] = call_module[target=layer1.1.relu](args = (%layer1_1_bn1,), kwargs = {})\n    %layer1_1_conv2 : [num_users=1] = call_module[target=layer1.1.conv2](args = (%layer1_1_relu,), kwargs = {})\n    %layer1_1_bn2 : [num_users=1] = call_module[target=layer1.1.bn2](args = (%layer1_1_conv2,), kwargs = {})\n    %add_1 : [num_users=1] = call_function[target=operator.add](args = (%layer1_1_bn2, %layer1_0_relu_1), kwargs = {})\n    %layer1_1_relu_1 : [num_users=2] = call_module[target=layer1.1.relu](args = (%add_1,), kwargs = {})\n    %layer2_0_conv1 : [num_users=1] = call_module[target=layer2.0.conv1](args = (%layer1_1_relu_1,), kwargs = {})\n    %layer2_0_bn1 : [num_users=1] = call_module[target=layer2.0.bn1](args = (%layer2_0_conv1,), kwargs = {})\n    %layer2_0_relu : [num_users=1] = call_module[target=layer2.0.relu](args = (%layer2_0_bn1,), kwargs = {})\n    %layer2_0_conv2 : [num_users=1] = call_module[target=layer2.0.conv2](args = (%layer2_0_relu,), kwargs = {})\n    %layer2_0_bn2 : [num_users=1] = call_module[target=layer2.0.bn2](args = (%layer2_0_conv2,), kwargs = {})\n    %layer2_0_downsample_0 : [num_users=1] = call_module[target=layer2.0.downsample.0](args = (%layer1_1_relu_1,), kwargs = {})\n    %layer2_0_downsample_1 : [num_users=1] = call_module[target=layer2.0.downsample.1](args = (%layer2_0_downsample_0,), kwargs = {})\n    %add_2 : [num_users=1] = call_function[target=operator.add](args = (%layer2_0_bn2, %layer2_0_downsample_1), kwargs = {})\n    %layer2_0_relu_1 : [num_users=2] = call_module[target=layer2.0.relu](args = (%add_2,), kwargs = {})\n    %layer2_1_conv1 : [num_users=1] = call_module[target=layer2.1.conv1](args = (%layer2_0_relu_1,), kwargs = {})\n    %layer2_1_bn1 : [num_users=1] = call_module[target=layer2.1.bn1](args = (%layer2_1_conv1,), kwargs = {})\n    %layer2_1_relu : [num_users=1] = call_module[target=layer2.1.relu](args = (%layer2_1_bn1,), kwargs = {})\n    %layer2_1_conv2 : [num_users=1] = call_module[target=layer2.1.conv2](args = (%layer2_1_relu,), kwargs = {})\n    %layer2_1_bn2 : [num_users=1] = call_module[target=layer2.1.bn2](args = (%layer2_1_conv2,), kwargs = {})\n    %add_3 : [num_users=1] = call_function[target=operator.add](args = (%layer2_1_bn2, %layer2_0_relu_1), kwargs = {})\n    %layer2_1_relu_1 : [num_users=2] = call_module[target=layer2.1.relu](args = (%add_3,), kwargs = {})\n    %layer3_0_conv1 : [num_users=1] = call_module[target=layer3.0.conv1](args = (%layer2_1_relu_1,), kwargs = {})\n    %layer3_0_bn1 : [num_users=1] = call_module[target=layer3.0.bn1](args = (%layer3_0_conv1,), kwargs = {})\n    %layer3_0_relu : [num_users=1] = call_module[target=layer3.0.relu](args = (%layer3_0_bn1,), kwargs = {})\n    %layer3_0_conv2 : [num_users=1] = call_module[target=layer3.0.conv2](args = (%layer3_0_relu,), kwargs = {})\n    %layer3_0_bn2 : [num_users=1] = call_module[target=layer3.0.bn2](args = (%layer3_0_conv2,), kwargs = {})\n    %layer3_0_downsample_0 : [num_users=1] = call_module[target=layer3.0.downsample.0](args = (%layer2_1_relu_1,), kwargs = {})\n    %layer3_0_downsample_1 : [num_users=1] = call_module[target=layer3.0.downsample.1](args = (%layer3_0_downsample_0,), kwargs = {})\n    %add_4 : [num_users=1] = call_function[target=operator.add](args = (%layer3_0_bn2, %layer3_0_downsample_1), kwargs = {})\n    %layer3_0_relu_1 : [num_users=2] = call_module[target=layer3.0.relu](args = (%add_4,), kwargs = {})\n    %layer3_1_conv1 : [num_users=1] = call_module[target=layer3.1.conv1](args = (%layer3_0_relu_1,), kwargs = {})\n    %layer3_1_bn1 : [num_users=1] = call_module[target=layer3.1.bn1](args = (%layer3_1_conv1,), kwargs = {})\n    %layer3_1_relu : [num_users=1] = call_module[target=layer3.1.relu](args = (%layer3_1_bn1,), kwargs = {})\n    %layer3_1_conv2 : [num_users=1] = call_module[target=layer3.1.conv2](args = (%layer3_1_relu,), kwargs = {})\n    %layer3_1_bn2 : [num_users=1] = call_module[target=layer3.1.bn2](args = (%layer3_1_conv2,), kwargs = {})\n    %add_5 : [num_users=1] = call_function[target=operator.add](args = (%layer3_1_bn2, %layer3_0_relu_1), kwargs = {})\n    %layer3_1_relu_1 : [num_users=2] = call_module[target=layer3.1.relu](args = (%add_5,), kwargs = {})\n    %layer4_0_conv1 : [num_users=1] = call_module[target=layer4.0.conv1](args = (%layer3_1_relu_1,), kwargs = {})\n    %layer4_0_bn1 : [num_users=1] = call_module[target=layer4.0.bn1](args = (%layer4_0_conv1,), kwargs = {})\n    %layer4_0_relu : [num_users=1] = call_module[target=layer4.0.relu](args = (%layer4_0_bn1,), kwargs = {})\n    %layer4_0_conv2 : [num_users=1] = call_module[target=layer4.0.conv2](args = (%layer4_0_relu,), kwargs = {})\n    %layer4_0_bn2 : [num_users=1] = call_module[target=layer4.0.bn2](args = (%layer4_0_conv2,), kwargs = {})\n    %layer4_0_downsample_0 : [num_users=1] = call_module[target=layer4.0.downsample.0](args = (%layer3_1_relu_1,), kwargs = {})\n    %layer4_0_downsample_1 : [num_users=1] = call_module[target=layer4.0.downsample.1](args = (%layer4_0_downsample_0,), kwargs = {})\n    %add_6 : [num_users=1] = call_function[target=operator.add](args = (%layer4_0_bn2, %layer4_0_downsample_1), kwargs = {})\n    %layer4_0_relu_1 : [num_users=2] = call_module[target=layer4.0.relu](args = (%add_6,), kwargs = {})\n    %layer4_1_conv1 : [num_users=1] = call_module[target=layer4.1.conv1](args = (%layer4_0_relu_1,), kwargs = {})\n    %layer4_1_bn1 : [num_users=1] = call_module[target=layer4.1.bn1](args = (%layer4_1_conv1,), kwargs = {})\n    %layer4_1_relu : [num_users=1] = call_module[target=layer4.1.relu](args = (%layer4_1_bn1,), kwargs = {})\n    %layer4_1_conv2 : [num_users=1] = call_module[target=layer4.1.conv2](args = (%layer4_1_relu,), kwargs = {})\n    %layer4_1_bn2 : [num_users=1] = call_module[target=layer4.1.bn2](args = (%layer4_1_conv2,), kwargs = {})\n    %add_7 : [num_users=1] = call_function[target=operator.add](args = (%layer4_1_bn2, %layer4_0_relu_1), kwargs = {})\n    %layer4_1_relu_1 : [num_users=1] = call_module[target=layer4.1.relu](args = (%add_7,), kwargs = {})\n    %avgpool : [num_users=1] = call_module[target=avgpool](args = (%layer4_1_relu_1,), kwargs = {})\n    %flatten : [num_users=1] = call_function[target=torch.flatten](args = (%avgpool, 1), kwargs = {})\n    %fc : [num_users=1] = call_module[target=fc](args = (%flatten,), kwargs = {})\n    return fc\n```\n\nExample:\n```text\nclass ProfilingInterpreter(Interpreter):\n    def __init__(self, mod : torch.nn.Module):\n        # Rather than have the user symbolically trace their model,\n        # we're going to do it in the constructor. As a result, the\n        # user can pass in any ``Module`` without having to worry about\n        # symbolic tracing APIs\n        gm = torch.fx.symbolic_trace(mod)\n        super().__init__(gm)\n\n        # We are going to store away two things here:\n        #\n        # 1. A list of total runtimes for ``mod``. In other words, we are\n        #    storing away the time ``mod(...)`` took each time this\n        #    interpreter is called.\n        self.total_runtime_sec : List[float] = []\n        # 2. A map from ``Node`` to a list of times (in seconds) that\n        #    node took to run. This can be seen as similar to (1) but\n        #    for specific sub-parts of the model.\n        self.runtimes_sec : Dict[torch.fx.Node, List[float]] = {}\n\n    ######################################################################\n    # Next, let's override our first method: ``run()``. ``Interpreter``'s ``run``\n    # method is the top-level entry point for execution of the model. We will\n    # want to intercept this so that we can record the total runtime of the\n    # model.\n\n    def run(self, *args) -> Any:\n        # Record the time we started running the model\n        t_start = time.time()\n        # Run the model by delegating back into Interpreter.run()\n        return_val = super().run(*args)\n        # Record the time we finished running the model\n        t_end = time.time()\n        # Store the total elapsed time this model execution took in the\n        # ``ProfilingInterpreter``\n        self.total_runtime_sec.append(t_end - t_start)\n        return return_val\n\n    ######################################################################\n    # Now, let's override ``run_node``. ``Interpreter`` calls ``run_node`` each\n    # time it executes a single node. We will intercept this so that we\n    # can measure and record the time taken for each individual call in\n    # the model.\n\n    def run_node(self, n : torch.fx.Node) -> Any:\n        # Record the time we started running the op\n        t_start = time.time()\n        # Run the op by delegating back into Interpreter.run_node()\n        return_val = super().run_node(n)\n        # Record the time we finished running the op\n        t_end = time.time()\n        # If we don't have an entry for this node in our runtimes_sec\n        # data structure, add one with an empty list value.\n        self.runtimes_sec.setdefault(n, [])\n        # Record the total elapsed time for this single invocation\n        # in the runtimes_sec data structure\n        self.runtimes_sec[n].append(t_end - t_start)\n        return return_val\n\n    ######################################################################\n    # Finally, we are going to define a method (one which doesn't override\n    # any ``Interpreter`` method) that provides us a nice, organized view of\n    # the data we have collected.\n\n    def summary(self, should_sort : bool = False) -> str:\n        # Build up a list of summary information for each node\n        node_summaries : List[List[Any]] = []\n        # Calculate the mean runtime for the whole network. Because the\n        # network may have been called multiple times during profiling,\n        # we need to summarize the runtimes. We choose to use the\n        # arithmetic mean for this.\n        mean_total_runtime = statistics.mean(self.total_runtime_sec)\n\n        # For each node, record summary statistics\n        for node, runtimes in self.runtimes_sec.items():\n            # Similarly, compute the mean runtime for ``node``\n            mean_runtime = statistics.mean(runtimes)\n            # For easier understanding, we also compute the percentage\n            # time each node took with respect to the whole network.\n            pct_total = mean_runtime / mean_total_runtime * 100\n            # Record the node's type, name of the node, mean runtime, and\n            # percent runtime.\n            node_summaries.append(\n                [node.op, str(node), mean_runtime, pct_total])\n\n        # One of the most important questions to answer when doing performance\n        # profiling is \"Which op(s) took the longest?\". We can make this easy\n        # to see by providing sorting functionality in our summary view\n        if should_sort:\n            node_summaries.sort(key=lambda s: s[2], reverse=True)\n\n        # Use the ``tabulate`` library to create a well-formatted table\n        # presenting our summary information\n        headers : List[str] = [\n            'Op type', 'Op', 'Average runtime (s)', 'Pct total runtime'\n        ]\n        return tabulate.tabulate(node_summaries, headers=headers)\n```\n\nExample:\n```text\ninterp = ProfilingInterpreter(rn18)\ninterp.run(input)\nprint(interp.summary(True))\n```\n\nExample:\n```text\nOp type        Op                       Average runtime (s)    Pct total runtime\n-------------  ---------------------  ---------------------  -------------------\ncall_module    maxpool                          0.00464988             8.09609\ncall_module    conv1                            0.00462317             8.0496\ncall_module    layer4_0_conv2                   0.00343394             5.97898\ncall_module    layer1_0_conv1                   0.00325155             5.66141\ncall_module    layer4_1_conv1                   0.00315166             5.48748\ncall_module    layer4_1_conv2                   0.0029633              5.15953\ncall_module    layer1_0_conv2                   0.00277114             4.82494\ncall_module    layer1_1_conv2                   0.0026927              4.68837\ncall_module    layer1_1_conv1                   0.00240898             4.19438\ncall_module    layer2_1_conv1                   0.00229764             4.00051\ncall_module    layer2_1_conv2                   0.00222158             3.86809\ncall_module    layer3_1_conv2                   0.00219321             3.81869\ncall_module    layer3_0_conv2                   0.00216413             3.76805\ncall_module    layer3_1_conv1                   0.00208664             3.63313\ncall_module    layer2_0_conv2                   0.0020802              3.62192\ncall_module    layer4_0_conv1                   0.00187969             3.27281\ncall_module    layer3_0_conv1                   0.00143385             2.49653\ncall_module    bn1                              0.00141859             2.46997\ncall_module    layer2_0_conv1                   0.00136638             2.37905\ncall_module    layer2_0_downsample_0            0.000776529            1.35205\ncall_module    layer3_0_downsample_0            0.000502586            0.875074\ncall_module    layer4_0_downsample_0            0.000483036            0.841034\ncall_function  add                              0.000467062            0.813221\ncall_function  add_1                            0.000400543            0.697402\ncall_module    layer1_0_bn1                     0.000333548            0.580753\ncall_module    relu                             0.000330925            0.576187\ncall_module    layer1_0_bn2                     0.000306368            0.53343\ncall_module    layer1_1_bn2                     0.000281572            0.490257\ncall_function  add_3                            0.000212431            0.369872\ncall_module    fc                               0.00020051             0.349116\ncall_module    layer1_1_bn1                     0.000149965            0.261111\ncall_module    layer2_0_downsample_1            0.000136137            0.237034\ncall_module    layer2_0_bn1                     0.00013113             0.228316\ncall_module    layer4_1_bn2                     0.000129461            0.22541\ncall_module    avgpool                          0.000120163            0.209221\ncall_module    layer3_0_bn1                     0.000117064            0.203824\ncall_module    layer3_1_bn2                     0.000115871            0.201748\ncall_module    layer4_0_bn2                     0.000108004            0.18805\ncall_module    layer4_1_bn1                     0.000104189            0.181408\ncall_module    layer1_0_relu_1                  0.00010252             0.178502\ncall_module    layer1_0_relu                    9.46522e-05            0.164803\ncall_module    layer2_0_bn2                     8.46386e-05            0.147368\ncall_module    layer1_1_relu_1                  8.22544e-05            0.143217\ncall_module    layer2_1_bn2                     8.15392e-05            0.141971\ncall_module    layer2_1_bn1                     8.10623e-05            0.141141\ncall_function  add_2                            8.01086e-05            0.13948\ncall_module    layer4_0_bn1                     7.86781e-05            0.13699\ncall_module    layer3_0_downsample_1            7.77245e-05            0.135329\ncall_function  add_5                            7.70092e-05            0.134084\ncall_module    layer1_1_relu                    7.27177e-05            0.126612\ncall_module    layer3_0_bn2                     7.15256e-05            0.124536\ncall_module    layer4_0_downsample_1            7.05719e-05            0.122876\ncall_module    layer3_1_bn1                     6.84261e-05            0.11914\ncall_function  add_7                            6.74725e-05            0.117479\ncall_function  add_4                            6.17504e-05            0.107516\ncall_function  add_6                            6.05583e-05            0.105441\ncall_module    layer4_1_relu                    5.76973e-05            0.100459\ncall_module    layer4_0_relu                    5.48363e-05            0.0954777\ncall_module    layer2_0_relu                    5.24521e-05            0.0913265\ncall_module    layer2_0_relu_1                  5.00679e-05            0.0871753\ncall_module    layer2_1_relu_1                  4.76837e-05            0.0830241\ncall_module    layer4_1_relu_1                  4.673e-05              0.0813636\ncall_module    layer3_0_relu                    4.62532e-05            0.0805333\ncall_module    layer4_0_relu_1                  4.55379e-05            0.079288\ncall_module    layer2_1_relu                    4.29153e-05            0.0747217\ncall_module    layer3_0_relu_1                  4.1008e-05             0.0714007\ncall_module    layer3_1_relu                    4.05312e-05            0.0705705\ncall_module    layer3_1_relu_1                  3.76701e-05            0.065589\nplaceholder    x                                3.26633e-05            0.0568715\ncall_function  flatten                          2.67029e-05            0.0464935\noutput         output                           1.04904e-05            0.0182653\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:23.817Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":9,"totalLines":386,"estimatedTokens":6080}}159{"id":"doc-getting_started_with_distributed_data_parallel_p-3321723a","source":"documentation","title":"Getting Started with Distributed Data Parallel — PyTorch Tutorials 2.13.0+cu130 documentation","url":"https://docs.pytorch.org/tutorials/intermediate/ddp_tutorial.html","text":"Example:\n```js\nDocs Access comprehensive developer documentation for PyTorch View Docs Tutorials Get in-depth tutorials for beginners and advanced developers View Tutorials Resources Find development resources and get your questions answered View Resources\n```\n\nTo analyze traffic and optimize your experience, we serve cookies on this site. By clicking or navigating, you agree to allow our usage of cookies. As the current maintainers of this site, Facebook’s Cookies Policy applies. Learn more, including about available Policy.\n\nExample:\n```text\nimport os\nimport sys\nimport tempfile\nimport torch\nimport torch.distributed as dist\nimport torch.nn as nn\nimport torch.optim as optim\nimport torch.multiprocessing as mp\n\nfrom torch.nn.parallel import DistributedDataParallel as DDP\n\n# On Windows platform, the torch.distributed package only\n# supports Gloo backend, FileStore and TcpStore.\n# For FileStore, set init_method parameter in init_process_group\n# to a local file. Example as follow:\n# init_method=\"file:///f:/libtmp/some_file\"\n# dist.init_process_group(\n#    \"gloo\",\n#    rank=rank,\n#    init_method=init_method,\n#    world_size=world_size)\n# For TcpStore, same way as on Linux.\n\ndef setup(rank, world_size):\n    os.environ['MASTER_ADDR'] = 'localhost'\n    os.environ['MASTER_PORT'] = '12355'\n\n    # We want to be able to train our model on an `accelerator <https://pytorch.org/docs/stable/torch.html#accelerators>`__\n    # such as CUDA, MPS, MTIA, or XPU.\n    acc = torch.accelerator.current_accelerator()\n    backend = torch.distributed.get_default_backend_for_device(acc)\n    # initialize the process group\n    dist.init_process_group(backend, rank=rank, world_size=world_size)\n\ndef cleanup():\n    dist.destroy_process_group()\n```\n\nExample:\n```text\nclass ToyModel(nn.Module):\n    def __init__(self):\n        super(ToyModel, self).__init__()\n        self.net1 = nn.Linear(10, 10)\n        self.relu = nn.ReLU()\n        self.net2 = nn.Linear(10, 5)\n\n    def forward(self, x):\n        return self.net2(self.relu(self.net1(x)))\n\n\ndef demo_basic(rank, world_size):\n    print(f\"Running basic DDP example on rank {rank}.\")\n    setup(rank, world_size)\n\n    # create model and move it to GPU with id rank\n    model = ToyModel().to(rank)\n    ddp_model = DDP(model, device_ids=[rank])\n\n    loss_fn = nn.MSELoss()\n    optimizer = optim.SGD(ddp_model.parameters(), lr=0.001)\n\n    optimizer.zero_grad()\n    outputs = ddp_model(torch.randn(20, 10))\n    labels = torch.randn(20, 5).to(rank)\n    loss_fn(outputs, labels).backward()\n    optimizer.step()\n\n    cleanup()\n    print(f\"Finished running basic DDP example on rank {rank}.\")\n\n\ndef run_demo(demo_fn, world_size):\n    mp.spawn(demo_fn,\n             args=(world_size,),\n             nprocs=world_size,\n             join=True)\n```\n\nExample:\n```text\ndef demo_checkpoint(rank, world_size):\n    print(f\"Running DDP checkpoint example on rank {rank}.\")\n    setup(rank, world_size)\n\n    model = ToyModel().to(rank)\n    ddp_model = DDP(model, device_ids=[rank])\n\n\n    CHECKPOINT_PATH = tempfile.gettempdir() + \"/model.checkpoint\"\n    if rank == 0:\n        # All processes should see same parameters as they all start from same\n        # random parameters and gradients are synchronized in backward passes.\n        # Therefore, saving it in one process is sufficient.\n        torch.save(ddp_model.state_dict(), CHECKPOINT_PATH)\n\n    # Use a barrier() to make sure that process 1 loads the model after process\n    # 0 saves it.\n    dist.barrier()\n    # We want to be able to train our model on an `accelerator <https://pytorch.org/docs/stable/torch.html#accelerators>`__\n    # such as CUDA, MPS, MTIA, or XPU.\n    acc = torch.accelerator.current_accelerator()\n    # configure map_location properly\n    map_location = {f'{acc}:0': f'{acc}:{rank}'}\n    ddp_model.load_state_dict(\n        torch.load(CHECKPOINT_PATH, map_location=map_location, weights_only=True))\n\n    loss_fn = nn.MSELoss()\n    optimizer = optim.SGD(ddp_model.parameters(), lr=0.001)\n\n    optimizer.zero_grad()\n    outputs = ddp_model(torch.randn(20, 10))\n    labels = torch.randn(20, 5).to(rank)\n\n    loss_fn(outputs, labels).backward()\n    optimizer.step()\n\n    # Not necessary to use a dist.barrier() to guard the file deletion below\n    # as the AllReduce ops in the backward pass of DDP already served as\n    # a synchronization.\n\n    if rank == 0:\n        os.remove(CHECKPOINT_PATH)\n\n    cleanup()\n    print(f\"Finished running DDP checkpoint example on rank {rank}.\")\n```\n\nExample:\n```text\nclass ToyMpModel(nn.Module):\n    def __init__(self, dev0, dev1):\n        super(ToyMpModel, self).__init__()\n        self.dev0 = dev0\n        self.dev1 = dev1\n        self.net1 = torch.nn.Linear(10, 10).to(dev0)\n        self.relu = torch.nn.ReLU()\n        self.net2 = torch.nn.Linear(10, 5).to(dev1)\n\n    def forward(self, x):\n        x = x.to(self.dev0)\n        x = self.relu(self.net1(x))\n        x = x.to(self.dev1)\n        return self.net2(x)\n```\n\nExample:\n```text\ndef demo_model_parallel(rank, world_size):\n    print(f\"Running DDP with model parallel example on rank {rank}.\")\n    setup(rank, world_size)\n\n    # setup mp_model and devices for this process\n    dev0 = rank * 2\n    dev1 = rank * 2 + 1\n    mp_model = ToyMpModel(dev0, dev1)\n    ddp_mp_model = DDP(mp_model)\n\n    loss_fn = nn.MSELoss()\n    optimizer = optim.SGD(ddp_mp_model.parameters(), lr=0.001)\n\n    optimizer.zero_grad()\n    # outputs will be on dev1\n    outputs = ddp_mp_model(torch.randn(20, 10))\n    labels = torch.randn(20, 5).to(dev1)\n    loss_fn(outputs, labels).backward()\n    optimizer.step()\n\n    cleanup()\n    print(f\"Finished running DDP with model parallel example on rank {rank}.\")\n\n\nif __name__ == \"__main__\":\n    n_gpus = torch.accelerator.device_count()\n    assert n_gpus >= 2, f\"Requires at least 2 GPUs to run, but got {n_gpus}\"\n    world_size = n_gpus\n    run_demo(demo_basic, world_size)\n    run_demo(demo_checkpoint, world_size)\n    world_size = n_gpus//2\n    run_demo(demo_model_parallel, world_size)\n```\n\nExample:\n```text\nimport os\nimport torch\nimport torch.distributed as dist\nimport torch.nn as nn\nimport torch.optim as optim\n\nfrom torch.nn.parallel import DistributedDataParallel as DDP\n\nclass ToyModel(nn.Module):\n    def __init__(self):\n        super(ToyModel, self).__init__()\n        self.net1 = nn.Linear(10, 10)\n        self.relu = nn.ReLU()\n        self.net2 = nn.Linear(10, 5)\n\n    def forward(self, x):\n        return self.net2(self.relu(self.net1(x)))\n\n\ndef demo_basic():\n    torch.accelerator.set_device_index(int(os.environ[\"LOCAL_RANK\"]))\n    acc = torch.accelerator.current_accelerator()\n    backend = torch.distributed.get_default_backend_for_device(acc)\n    dist.init_process_group(backend)\n    rank = dist.get_rank()\n    print(f\"Start running basic DDP example on rank {rank}.\")\n    # create model and move it to GPU with id rank\n    device_id = rank % torch.accelerator.device_count()\n    model = ToyModel().to(device_id)\n    ddp_model = DDP(model, device_ids=[device_id])\n    loss_fn = nn.MSELoss()\n    optimizer = optim.SGD(ddp_model.parameters(), lr=0.001)\n\n    optimizer.zero_grad()\n    outputs = ddp_model(torch.randn(20, 10))\n    labels = torch.randn(20, 5).to(device_id)\n    loss_fn(outputs, labels).backward()\n    optimizer.step()\n    dist.destroy_process_group()\n    print(f\"Finished running basic DDP example on rank {rank}.\")\n\nif __name__ == \"__main__\":\n    demo_basic()\n```\n\nExample:\n```text\ntorchrun --nnodes=2 --nproc_per_node=8 --rdzv_id=100 --rdzv_backend=c10d --rdzv_endpoint=$MASTER_ADDR:29400 elastic_ddp.py\n```\n\nExample:\n```text\nexport MASTER_ADDR=$(scontrol show hostname ${SLURM_NODELIST} | head -n 1)\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:23.825Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":8,"totalLines":249,"estimatedTokens":1915}}160{"id":"doc-wasm_c_filter_envoy_1_40_0_dev_743baa_documentat-9069ead5","source":"documentation","title":"Wasm C++ filter — envoy 1.40.0-dev-743baa documentation","url":"https://www.envoyproxy.io/docs/envoy/latest/start/sandboxes/wasm-cc","text":"Example:\n```text\n$ pwd\nexamples/wasm-cc\n$ docker compose pull\n$ docker compose up --build -d\n$ docker compose ps\n\n    Name                     Command                State             Ports\n-----------------------------------------------------------------------------------------------\nwasm_proxy_1         /docker-entrypoint.sh /usr ... Up      10000/tcp, 0.0.0.0:8000->8000/tcp, 0.0.0.0:8001->8001/tcp\nwasm_web_service_1   node ./index.js                Up\n```\n\nExample:\n```text\n$ curl -s http://localhost:8000 | grep \"Hello, world\"\n}Hello, world\n```\n\nExample:\n```text\n$ curl -v http://localhost:8000 | grep \"content-type: \"\ncontent-type: text/plain; charset=utf-8\n\n$ curl -v http://localhost:8000 | grep \"x-wasm-custom: \"\nx-wasm-custom: FOO\n```\n\nExample:\n```text\n$ curl -s http://localhost:8001 | grep \"Hello, world\"\n}Hello, world\n\n$ curl -v http://localhost:8001 | grep \"content-type: \"\ncontent-type: text/plain; charset=utf-8\n\n$ curl -v http://localhost:8001 | grep \"x-wasm-custom: \"\nx-wasm-custom: FOO\n```\n\nExample:\n```text\n--- /tmp/tmpsdc118c7/generated/rst/start/sandboxes/_include/wasm-cc/envoy_filter_http_wasm_example.cc\n+++ /tmp/tmpsdc118c7/generated/rst/start/sandboxes/_include/wasm-cc/envoy_filter_http_wasm_updated_example.cc\n@@ -65,8 +65,8 @@\n   for (auto& p : pairs) {\n     LOG_INFO(std::string(p.first) + std::string(\" -> \") + std::string(p.second));\n   }\n-  addResponseHeader(\"X-Wasm-custom\", \"FOO\");\n-  replaceResponseHeader(\"content-type\", \"text/plain; charset=utf-8\");\n+  addResponseHeader(\"X-Wasm-custom\", \"BAR\");\n+  replaceResponseHeader(\"content-type\", \"text/html; charset=utf-8\");\n   removeResponseHeader(\"content-length\");\n   return FilterHeadersStatus::Continue;\n }\n@@ -78,9 +78,9 @@\n   return FilterDataStatus::Continue;\n }\n \n-FilterDataStatus ExampleContext::onResponseBody(size_t body_buffer_length,\n+FilterDataStatus ExampleContext::onResponseBody(size_t /* body_buffer_length */,\n                                                 bool /* end_of_stream */) {\n-  setBuffer(WasmBufferType::HttpResponseBody, 0, body_buffer_length, \"Hello, world\\n\");\n+  setBuffer(WasmBufferType::HttpResponseBody, 0, 17, \"Hello, Wasm world\");\n   return FilterDataStatus::Continue;\n }\n```\n\nExample:\n```text\n$ export UID\n```\n\nExample:\n```text\n$ docker compose stop proxy\n$ docker compose -f docker-compose-wasm.yaml up --remove-orphans wasm_compile_update\n```\n\nExample:\n```text\n$ ls -l lib\ntotal 120\n-r-xr-xr-x 1 root root 59641 Oct 20 00:00 envoy_filter_http_wasm_example.wasm\n-r-xr-xr-x 1 root root 59653 Oct 20 10:16 envoy_filter_http_wasm_updated_example.wasm\n```\n\nExample:\n```text\n1FROM envoyproxy/envoy:dev\n2COPY ./envoy.yaml /etc/envoy.yaml\n3COPY ./lib/envoy_filter_http_wasm_example.wasm /lib/envoy_filter_http_wasm_example.wasm\n4RUN chmod go+r /etc/envoy.yaml /lib/envoy_filter_http_wasm_example.wasm\n5CMD [\"/usr/local/bin/envoy\", \"-c\", \"/etc/envoy.yaml\", \"--service-cluster\", \"proxy\"]\n```\n\nExample:\n```text\nCOPY ./lib/envoy_filter_http_wasm_updated_example.wasm /lib/envoy_filter_http_wasm_example.wasm\n```\n\nExample:\n```text\n$ docker compose up --build -d proxy\n```\n\nExample:\n```text\n$ curl -s http://localhost:8000 | grep \"Hello, Wasm world\"\n}Hello, Wasm world\n```\n\nExample:\n```text\n$ curl -v http://localhost:8000 | grep \"content-type: \"\ncontent-type: text/html; charset=utf-8\n\n$ curl -v http://localhost:8000 | grep \"x-wasm-custom: \"\nx-wasm-custom: BAR\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:31.327Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":13,"totalLines":123,"estimatedTokens":849}}161{"id":"doc-local_reply_modification_envoy_1_40_0_dev_743baa-342e5eb3","source":"documentation","title":"Local reply modification — envoy 1.40.0-dev-743baa documentation","url":"https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_conn_man/local_reply","text":"Example:\n```text\nmappers:\n- filter:\n    status_code_filter:\n      comparison:\n        op: EQ\n        value:\n          default_value: 400\n          runtime_key: key_b\n  headers_to_add:\n    - header:\n        key: \"foo\"\n        value: \"bar\"\n      append_action: OVERWRITE_IF_EXISTS_OR_ADD\n  status_code: 401\n  body:\n    inline_string: \"not allowed\"\n```\n\nExample:\n```text\nmappers:\n- filter:\n    status_code_filter:\n      comparison:\n        op: EQ\n        value:\n          default_value: 400\n          runtime_key: key_b\n  status_code: 401\n  body_format_override:\n    text_format: \"<h1>%LOCAL_REPLY_BODY% %REQ(:path)%</h1>\"\n    content_type: \"text/html; charset=UTF-8\"\n- filter:\n    status_code_filter:\n      comparison:\n        op: EQ\n        value:\n          default_value: 500\n          runtime_key: key_b\n  status_code: 501\nbody_format:\n  text_format: \"%LOCAL_REPLY_BODY% %RESPONSE_CODE%\"\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:31.328Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":2,"totalLines":47,"estimatedTokens":227}}162{"id":"doc-dynamic_forward_proxy_envoy_1_40_0_dev_743baa_do-afd802cd","source":"documentation","title":"Dynamic forward proxy — envoy 1.40.0-dev-743baa documentation","url":"https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/dynamic_forward_proxy_filter","text":"Example:\n```text\nadmin:\n  address:\n    socket_address:\n      protocol: TCP\n      address: 127.0.0.1\n      port_value: 9901\nstatic_resources:\n  listeners:\n  - name: listener_0\n    address:\n      socket_address:\n        protocol: TCP\n        address: 0.0.0.0\n        port_value: 10000\n    filter_chains:\n    - filters:\n      - name: envoy.filters.network.http_connection_manager\n        typed_config:\n          \"@type\": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager\n          stat_prefix: ingress_http\n          route_config:\n            name: local_route\n            virtual_hosts:\n            - name: local_service\n              domains: [\"*\"]\n              routes:\n              - match:\n                  prefix: \"/force-host-rewrite\"\n                route:\n                  cluster: dynamic_forward_proxy_cluster\n                typed_per_filter_config:\n                  envoy.filters.http.dynamic_forward_proxy:\n                    \"@type\": type.googleapis.com/envoy.extensions.filters.http.dynamic_forward_proxy.v3.PerRouteConfig\n                    host_rewrite_literal: www.example.org\n              - match:\n                  prefix: \"/\"\n                route:\n                  cluster: dynamic_forward_proxy_cluster\n          http_filters:\n          - name: envoy.filters.http.dynamic_forward_proxy\n            typed_config:\n              \"@type\": type.googleapis.com/envoy.extensions.filters.http.dynamic_forward_proxy.v3.FilterConfig\n              dns_cache_config:\n                name: dynamic_forward_proxy_cache_config\n                dns_lookup_family: V4_ONLY\n                # DNS Cache Circuit Breaker Configuration\n                dns_cache_circuit_breaker:\n                  max_pending_requests: 1024\n                typed_dns_resolver_config:\n                  name: envoy.network.dns_resolver.cares\n                  typed_config:\n                    \"@type\": type.googleapis.com/envoy.extensions.network.dns_resolver.cares.v3.CaresDnsResolverConfig\n                    resolvers:\n                    - socket_address:\n                        address: \"8.8.8.8\"\n                        port_value: 53\n                    dns_resolver_options:\n                      use_tcp_for_dns_lookups: true\n                      no_default_search_domain: true\n          - name: envoy.filters.http.router\n            typed_config:\n              \"@type\": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router\n  clusters:\n  - name: dynamic_forward_proxy_cluster\n    lb_policy: CLUSTER_PROVIDED\n    # Standard Cluster Circuit Breaker Configuration\n    circuit_breakers:\n      thresholds:\n      - priority: DEFAULT\n        max_connections: 1024\n        max_pending_requests: 1024\n        max_requests: 1024\n        max_retries: 3\n    cluster_type:\n      name: envoy.clusters.dynamic_forward_proxy\n      typed_config:\n        \"@type\": type.googleapis.com/envoy.extensions.clusters.dynamic_forward_proxy.v3.ClusterConfig\n        dns_cache_config:\n          name: dynamic_forward_proxy_cache_config\n          dns_lookup_family: V4_ONLY\n          # DNS Cache Circuit Breaker Configuration (same as above)\n          dns_cache_circuit_breaker:\n            max_pending_requests: 1024\n          typed_dns_resolver_config:\n            name: envoy.network.dns_resolver.cares\n            typed_config:\n              \"@type\": type.googleapis.com/envoy.extensions.network.dns_resolver.cares.v3.CaresDnsResolverConfig\n              resolvers:\n              - socket_address:\n                  address: \"8.8.8.8\"\n                  port_value: 53\n              dns_resolver_options:\n                use_tcp_for_dns_lookups: true\n                no_default_search_domain: true\n    transport_socket:\n      name: envoy.transport_sockets.tls\n      typed_config:\n        \"@type\": type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext\n        common_tls_context:\n          validation_context:\n            trusted_ca: {filename: /etc/ssl/certs/ca-certificates.crt}\n```\n\nExample:\n```text\ntyped_dns_resolver_config:\n  name: envoy.network.dns_resolver.apple\n  typed_config:\n    \"@type\": type.googleapis.com/envoy.extensions.network.dns_resolver.apple.v3.AppleDnsResolverConfig\n```\n\nExample:\n```text\nhttp_filters:\n- name: envoy.filters.http.set_filter_state\n  typed_config:\n    \"@type\": type.googleapis.com/envoy.extensions.filters.http.set_filter_state.v3.Config\n    on_request_headers:\n    - object_key: \"envoy.upstream.dynamic_host\"\n      format_string:\n        text_format_source:\n          inline_string: \"example.com\"\n    - object_key: \"envoy.upstream.dynamic_port\"\n      format_string:\n        text_format_source:\n          inline_string: \"443\"\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:31.329Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":3,"totalLines":131,"estimatedTokens":1187}}163{"id":"doc-custom_stripe_tax_api_stripe_documentation-3dd393c5","source":"documentation","title":"Custom Stripe Tax API | Stripe Documentation","url":"https://docs.stripe.com/tax/payment-intent/custom","text":"Example:\n```text\ncurl https://api.stripe.com/v1/tax/calculations \\\n  -u \"sk_test_BQokikJOvBiI2HlWgH4olfQ2:\" \\\n  -d currency=usd \\\n  -d \"line_items[0][amount]=1000\" \\\n  -d \"line_items[0][reference]=L1\" \\\n  -d \"customer_details[address][line1]=920 5th Ave\" \\\n  -d \"customer_details[address][city]=Seattle\" \\\n  -d \"customer_details[address][state]=WA\" \\\n  -d \"customer_details[address][postal_code]=98104\" \\\n  -d \"customer_details[address][country]=US\" \\\n  -d \"customer_details[address_source]=shipping\"\n```\n\nExample:\n```text\n{\n  \"error\": {\n    \"doc_url\": \"https://docs.stripe.com/error-codes#customer-tax-location-invalid\",\n    \"code\": \"customer_tax_location_invalid\",\n    \"message\": \"We could not determine the customer's tax location based on the provided customer address.\",\n    \"param\": \"customer_details[address]\",\n    \"type\": \"invalid_request_error\"\n  }\n}\n```\n\nExample:\n```text\ncurl https://api.stripe.com/v1/tax/transactions/create_from_calculation \\\n  -u \"sk_test_BQokikJOvBiI2HlWgH4olfQ2:\" \\\n  -d calculation={{TAX_CALCULATION}} \\\n  -d reference=order_12345 \\\n  -d \"expand[]=line_items\"\n```\n\nExample:\n```text\ncurl https://api.stripe.com/v1/tax/transactions/create_reversal \\\n  -u \"sk_test_BQokikJOvBiI2HlWgH4olfQ2:\" \\\n  -d mode=full \\\n  -d original_transaction=tax_1MEFAAI6rIcR421eB1YOzACZ \\\n  -d reference=order_123456789-cancel \\\n  -d \"expand[]=line_items\"\n```\n\nExample:\n```text\n{\n  \"id\": \"tax_1MEFtXI6rIcR421e0KTGXvCK\",\n  \"object\": \"tax.transaction\",\n  \"created\": 1670866467,\n  \"currency\": \"eur\",\n  \"customer\": null,\n  \"customer_details\": {\n    \"address\": {\n      \"city\": null,\n      \"country\": \"IE\",\n```\n\nExample:\n```text\ncurl https://api.stripe.com/v1/tax/transactions/create_reversal \\\n  -u \"sk_test_BQokikJOvBiI2HlWgH4olfQ2:\" \\\n  -d mode=partial \\\n  -d original_transaction=tax_1MEFAAI6rIcR421eB1YOzACZ \\\n  -d reference=order_123456789-refund_1 \\\n  -d \"line_items[0][original_line_item]=tax_li_MyBXPByrSUwm6r\" \\\n  -d \"line_items[0][reference]=L1\" \\\n  -d \"line_items[0][amount]=-4999\" \\\n  -d \"line_items[0][amount_tax]=-1150\" \\\n  -d \"metadata[refund]={{REFUND_ID}}\" \\\n  --data-urlencode \"metadata[refund_reason]=Refunded line 1 of order_123456789 (customer was unhappy)\" \\\n  -d \"expand[0]=line_items\"\n```\n\nExample:\n```text\n{\n  \"id\": \"tax_1MEFACI6rIcR421eHrjXCSmD\",\n  \"object\": \"tax.transaction\",\n  \"created\": 1670863656,\n  \"currency\": \"eur\",\n  ...\n  \"line_items\": {\n    \"object\": \"list\",\n    \"data\": [\n      {\n```\n\nExample:\n```text\ncurl https://api.stripe.com/v1/tax/transactions/create_reversal \\\n  -u \"sk_test_BQokikJOvBiI2HlWgH4olfQ2:\" \\\n  -d mode=partial \\\n  -d original_transaction=tax_1NVcKqBUZ691iUZ4xMZtcGYt \\\n  -d reference=order_234567890-refund_1 \\\n  -d flat_amount=-1650 \\\n  -d \"metadata[refund]={{REFUND_ID}}\" \\\n  --data-urlencode \"metadata[refund_reason]=Refunded 16.50 USD of order_234567890 (customer was unhappy)\" \\\n  -d \"expand[]=line_items\"\n```\n\nExample:\n```text\n{\n  \"id\": \"tax_1NVcQYBUZ691iUZ4SBPukGa6\",\n  \"object\": \"tax.transaction\",\n  \"created\": 1689780994,\n  \"currency\": \"usd\",\n  ...\n  \"line_items\": {\n    \"object\": \"list\",\n    \"data\": [\n      {\n```\n\nExample:\n```text\ncurl https://api.stripe.com/v1/tax/transactions/create_reversal \\\n  -u \"sk_test_BQokikJOvBiI2HlWgH4olfQ2:\" \\\n  -d mode=partial \\\n  -d original_transaction=tax_1NVcKqBUZ691iUZ4xMZtcGYt \\\n  -d reference=order_234567890-refund_1 \\\n  -d \"line_items[0][original_line_item]=tax_li_OICmRXkFuWr8Df\" \\\n  -d \"line_items[0][reference]=partial_refund_l1\" \\\n  -d \"line_items[0][amount]=-1000\" \\\n  -d \"line_items[0][amount_tax]=-100\" \\\n  -d \"metadata[refund]={{REFUND_ID}}\" \\\n  --data-urlencode \"metadata[refund_reason]=Refunded line 1 of order_234567890 (customer was unhappy)\" \\\n  -d \"expand[0]=line_items\"\n```\n\nExample:\n```text\ncurl https://api.stripe.com/v1/tax/transactions/create_reversal \\\n  -u \"sk_test_BQokikJOvBiI2HlWgH4olfQ2:\" \\\n  -d mode=partial \\\n  -d original_transaction=tax_1NVcKqBUZ691iUZ4xMZtcGYt \\\n  -d reference=order_234567890-refund_2 \\\n  -d flat_amount=-1650 \\\n  -d \"metadata[refund]={{REFUND_ID}}\" \\\n  --data-urlencode \"metadata[refund_reason]=Refunded 16.50 USD of order_234567890 (customer was still unhappy)\" \\\n  -d \"expand[]=line_items\"\n```\n\nExample:\n```text\n{\n  \"id\": \"tax_1NVxFIBUZ691iUZ4saOIloxB\",\n  \"object\": \"tax.transaction\",\n  \"created\": 1689861020,\n  \"currency\": \"usd\",\n  ...\n  \"line_items\": {\n    \"object\": \"list\",\n    \"data\": [\n      {\n```\n\nExample:\n```text\ncurl https://api.stripe.com/v1/tax/transactions/create_reversal \\\n  -u \"sk_test_BQokikJOvBiI2HlWgH4olfQ2:\" \\\n  -d mode=full \\\n  -d original_transaction=tax_1MEFACI6rIcR421eHrjXCSmD \\\n  -d reference=order_123456789-refund_1-cancel \\\n  -d \"metadata[refund_reason]=User called to cancel because they selected the wrong item\" \\\n  -d \"expand[]=line_items\"\n```\n\nExample:\n```text\n{\n  \"id\": \"tax_1MEFADI6rIcR421e94fNTOCK\",\n  \"object\": \"tax.transaction\",\n  \"created\": 1670863657,\n  \"currency\": \"eur\",\n  ...\n  \"line_items\": {\n    \"object\": \"list\",\n    \"data\": [\n      {\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:27.218Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":14,"totalLines":187,"estimatedTokens":1241}}164{"id":"doc-idempotent_requests_stripe_api_reference-037177a4","source":"documentation","title":"Idempotent requests | Stripe API Reference","url":"https://docs.stripe.com/api/idempotent_requests","text":"Example:\n```text\ncurl https://api.stripe.com/v1/customers \\  -u sk_test_BQokikJOvBiI2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2: \\  -H \"Idempotency-Key: KG5LxwFBepaKHyUD\" \\  -d description=\"My First Test Customer (created for API docs at https://docs.stripe.com/api)\"\n```\n\nExample:\n```text\ncurl -X POST https://api.stripe.com/v2/core/accounts \\  -H \"Authorization: Bearer sk_test_BQokikJOvBiI2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2\" \\  -H \"Stripe-Version: 2026-07-29.preview\" \\  --json '{    \"include\": [        \"identity\",        \"configuration.customer\"    ]  }'\n```\n\nExample:\n```text\n{  \"id\": \"acct_123\",  \"object\": \"v2.core.account\",  \"applied_configurations\": [    \"customer\",    \"merchant\"  ],  \"configuration\": {    \"customer\": {      \"automatic_indirect_tax\": {        ...      },      \"billing\": {        ...      },      \"capabilities\": {        ...      },      ...    },    \"merchant\": null,    \"recipient\": null  },  \"contact_email\": \"furever@example.com\",  \"created\": \"2025-06-09T21:16:03.000Z\",  \"dashboard\": \"full\",  \"defaults\": null,  \"display_name\": \"Furever\",  \"identity\": {    \"business_details\": {      \"doing_business_as\": \"FurEver\",      \"id_numbers\": [        {          \"type\": \"us_ein\"        }      ],      \"product_description\": \"Saas pet grooming platform at furever.dev using Connect embedded components\",      \"structure\": \"sole_proprietorship\",      \"url\": \"http://accessible.stripe.com\"    },    \"country\": \"US\"  },  \"livemode\": true,  \"metadata\": {},  \"requirements\": null}\n```\n\nExample:\n```text\ncurl https://api.stripe.com/v1/customers \\  -u \"sk_test_BQokikJOvBiI2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2:\" \\  -d \"metadata[order_id]=6735\"\n```\n\nExample:\n```text\n{  \"id\": \"cus_123456789\",  \"object\": \"customer\",  \"address\": {    \"city\": \"city\",    \"country\": \"US\",    \"line1\": \"line 1\",    \"line2\": \"line 2\",    \"postal_code\": \"90210\",    \"state\": \"CA\"  },  \"balance\": 0,  \"created\": 1483565364,  \"currency\": null,  \"default_source\": null,  \"delinquent\": false,  \"description\": null,  \"discount\": null,  \"email\": null,  \"invoice_prefix\": \"C11F7E1\",  \"invoice_settings\": {    \"custom_fields\": null,    \"default_payment_method\": null,    \"footer\": null,    \"rendering_options\": null  },  \"livemode\": false,  \"metadata\": {    \"order_id\": \"6735\"  },  \"name\": null,  \"next_invoice_sequence\": 1,  \"phone\": null,  \"preferred_locales\": [],  \"shipping\": null,  \"tax_exempt\": \"none\"}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:27.250Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":5,"totalLines":26,"estimatedTokens":609}}165{"id":"doc-elements_with_checkout_sessions_api_beta_changel-49d773a1","source":"documentation","title":"Elements with Checkout Sessions API beta changelog | Stripe Documentation","url":"https://docs.stripe.com/checkout/elements-with-checkout-sessions-api/changelog","text":"Example:\n```text\n<head>\n  <title>Checkout</title>\n  <script src=\"https://js.stripe.com/basil/stripe.js\"></script>\n  <script src=\"https://js.stripe.com/clover/stripe.js\"></script>\n</head>\n```\n\nExample:\n```text\nconst clientSecret = fetch(\"/create-checkout-session\", {\n  method: \"POST\",\n  headers: { \"Content-Type\": \"application/json\" },\n})\n  .then((r) => r.json())\n  .then((r) => r.clientSecret);\n\nconst checkout = await stripe.initCheckout({\n  fetchClientSecret: () => clientSecret\n});\nconst checkout = stripe.initCheckout({\n  clientSecret\n});\nconst paymentElement = checkout.createPaymentElement();\npaymentElement.mount(\"#payment-element\");\n\nconst session = checkout.session();\nconst loadActionsResult = await checkout.loadActions();\nif (loadActionsResult.type === 'success') {\n  const session = loadActionsResult.actions.getSession();\n}\n```\n\nExample:\n```text\n<head>\n  <title>Checkout</title>\n  <script src=\"https://js.stripe.com/v3/stripe.js\"></script>\n  <script src=\"https://js.stripe.com/basil/stripe.js\"></script>\n</head>\n```\n\nExample:\n```text\nconst stripe = Stripe(\n  'pk_test_TYooMQauvdEDq54NiTphI7jx', {\n  betas: ['custom_checkout_beta_6'],\n  }\n);\n```\n\nExample:\n```text\n// Set your secret key. Remember to switch to your live secret key in production.\n// See your keys here: https://dashboard.stripe.com/apikeys\nimport Stripe from 'stripe';\n// Don't put any keys in code. See https://docs.stripe.com/keys-best-practices.\nconst stripe = new Stripe('sk_test_BQokikJOvBiI2HlWgH4olfQ2', {\n  apiVersion: '2026-07-29.dahlia; custom_checkout_beta=v1' as any,\n});\n```\n\nExample:\n```text\n// Set your secret key. Remember to switch to your live secret key in production.\n// See your keys here: https://dashboard.stripe.com/apikeys\nimport Stripe from 'stripe';\n// Don't put any keys in code. See https://docs.stripe.com/keys-best-practices.\nconst stripe = new Stripe('sk_test_BQokikJOvBiI2HlWgH4olfQ2', {\n  apiVersion: '2025-03-31.basil' as any,\n});\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:27.287Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":6,"totalLines":75,"estimatedTokens":491}}166{"id":"doc-issuing_lifecycle_controls_stripe_documentation-1ef6800d","source":"documentation","title":"Issuing lifecycle controls | Stripe Documentation","url":"https://docs.stripe.com/issuing/controls/lifecycle-controls","text":"Example:\n```text\ncurl https://api.stripe.com/v1/issuing/cards \\\n  -u \"sk_test_BQokikJOvBiI2HlWgH4olfQ2:\" \\\n  -d currency=usd \\\n  -d type=virtual \\\n  -d \"cardholder={{CARDHOLDER_ID}}\" \\\n  -d \"lifecycle_controls[cancel_after][payment_count]=1\"\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:27.306Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":1,"totalLines":11,"estimatedTokens":65}}167{"id":"doc-retrieve_an_account_capability_stripe_api_refere-f63c1c88","source":"documentation","title":"Retrieve an Account Capability | Stripe API Reference","url":"https://docs.stripe.com/api/capabilities/retrieve","text":"Example:\n```text\ncurl https://api.stripe.com/v1/accounts/{{ACCOUNT_ID}}/capabilities/card_payments \\  -u \"sk_test_BQokikJOvBiI2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2:\"\n```\n\nExample:\n```text\n{  \"id\": \"card_payments\",  \"object\": \"capability\",  \"account\": \"acct_1032D82eZvKYlo2C\",  \"future_requirements\": {    \"alternatives\": [],    \"current_deadline\": null,    \"currently_due\": [],    \"disabled_reason\": null,    \"errors\": [],    \"eventually_due\": [],    \"past_due\": [],    \"pending_verification\": []  },  \"requested\": true,  \"requested_at\": 1688491010,  \"requirements\": {    \"alternatives\": [],    \"current_deadline\": null,    \"currently_due\": [],    \"disabled_reason\": null,    \"errors\": [],    \"eventually_due\": [],    \"past_due\": [],    \"pending_verification\": []  },  \"status\": \"inactive\"}\n```\n\nExample:\n```text\ncurl https://api.stripe.com/v1/accounts/{{ACCOUNT_ID}}/capabilities \\  -u \"sk_test_BQokikJOvBiI2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2:\"\n```\n\nExample:\n```text\n{  \"object\": \"list\",  \"url\": \"/v1/accounts/acct_1032D82eZvKYlo2C/capabilities\",  \"has_more\": false,  \"data\": [    {      \"id\": \"card_payments\",      \"object\": \"capability\",      \"account\": \"acct_1032D82eZvKYlo2C\",      \"future_requirements\": {        \"alternatives\": [],        \"current_deadline\": null,        \"currently_due\": [],        \"disabled_reason\": null,        \"errors\": [],        \"eventually_due\": [],        \"past_due\": [],        \"pending_verification\": []      },      \"requested\": true,      \"requested_at\": 1693951912,      \"requirements\": {        \"alternatives\": [],        \"current_deadline\": null,        \"currently_due\": [],        \"disabled_reason\": null,        \"errors\": [],        \"eventually_due\": [],        \"past_due\": [],        \"pending_verification\": []      },      \"status\": \"inactive\"    }  ]}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:27.345Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":4,"totalLines":21,"estimatedTokens":458}}168{"id":"doc-shared_payment_granted_tokens_stripe_api_referen-80dce31c","source":"documentation","title":"Shared Payment Granted Tokens | Stripe API Reference","url":"https://docs.stripe.com/api/shared-payment/granted-token","text":"Example:\n```text\n{  \"id\": \"spt_1RgaZcFPC5QUO6ZCDVZuVA8q\",  \"object\": \"shared_payment.granted_token\",  \"agent_details\": {    \"network_business_profile\": \"profile_test_61U92KWAstyE3VYhXA6U91t01FSQ3ByrZzKJOCR0y5ey\"  },  \"created\": 1751500820,  \"deactivated_at\": null,  \"deactivated_reason\": null,  \"livemode\": false,  \"payment_method_details\": {    \"type\": \"card\",    \"billing_details\": {      \"address\": {        \"city\": null,        \"country\": null,        \"line1\": null,        \"line2\": null,        \"postal_code\": null,        \"state\": null      },      \"email\": null,      \"name\": \"John Doe\",      \"phone\": null    },    \"card\": {      \"brand\": \"visa\",      \"country\": \"US\",      \"display_brand\": \"visa\",      \"exp_month\": 9,      \"exp_year\": 2029,      \"fingerprint\": \"dyRcYjZNxnHpC51l\",      \"funding\": \"credit\",      \"last4\": \"4242\",      \"networks\": {        \"available\": [          \"visa\"        ],        \"preferred\": null      },      \"wallet\": null    }  },  \"shared_metadata\": {},  \"usage_details\": {    \"amount_captured\": {      \"value\": 0,      \"currency\": \"usd\"    }  },  \"usage_limits\": {    \"currency\": \"usd\",    \"expires_at\": 1751587220,    \"max_amount\": 1000  }}\n```\n\nExample:\n```text\ncurl https://api.stripe.com/v1/shared_payment/granted_tokens/spt_1RgaZcFPC5QUO6ZCDVZuVA8q \\  -u \"sk_test_BQokikJOvBiI2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2:\"\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:27.368Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":2,"totalLines":11,"estimatedTokens":346}}169{"id":"doc-transfers_stripe_api_reference-d3250d28","source":"documentation","title":"Transfers | Stripe API Reference","url":"https://docs.stripe.com/api/transfers","text":"Example:\n```text\n{  \"id\": \"tr_1MiN3gLkdIwHu7ixNCZvFdgA\",  \"object\": \"transfer\",  \"amount\": 400,  \"amount_reversed\": 0,  \"balance_transaction\": \"txn_1MiN3gLkdIwHu7ixxapQrznl\",  \"created\": 1678043844,  \"currency\": \"usd\",  \"description\": null,  \"destination\": \"acct_1MTfjCQ9PRzxEwkZ\",  \"destination_payment\": \"py_1MiN3gQ9PRzxEwkZWTPGNq9o\",  \"livemode\": false,  \"metadata\": {},  \"reversals\": {    \"object\": \"list\",    \"data\": [],    \"has_more\": false,    \"total_count\": 0,    \"url\": \"/v1/transfers/tr_1MiN3gLkdIwHu7ixNCZvFdgA/reversals\"  },  \"reversed\": false,  \"source_transaction\": null,  \"source_type\": \"card\",  \"transfer_group\": \"ORDER_95\"}\n```\n\nExample:\n```text\ncurl https://api.stripe.com/v1/transfers \\  -u \"sk_test_BQokikJOvBiI2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2:\" \\  -d amount=400 \\  -d currency=usd \\  -d destination={{ACCOUNT_ID}} \\  -d transfer_group=ORDER_95\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:27.376Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":2,"totalLines":11,"estimatedTokens":224}}170{"id":"doc-multi_currency_customers_stripe_documentation-5a2af8cc","source":"documentation","title":"Multi-currency customers | Stripe Documentation","url":"https://docs.stripe.com/invoicing/multi-currency-customers","text":"Example:\n```text\ncurl https://api.stripe.com/v1/invoiceitems \\\n  -u \"sk_test_BQokikJOvBiI2HlWgH4olfQ2:\" \\\n  -d \"customer_account={{CUSTOMER_ACCOUNT_ID}}\" \\\n  -d amount=1000 \\\n  -d currency=cad\n```\n\nExample:\n```text\ncurl https://api.stripe.com/v1/invoices \\\n  -u \"sk_test_BQokikJOvBiI2HlWgH4olfQ2:\" \\\n  -d \"customer_account={{CUSTOMER_ACCOUNT_ID}}\" \\\n  -d collection_method=send_invoice \\\n  -d days_until_due=30 \\\n  -d pending_invoice_items_behavior=include \\\n  -d currency=cad\n```\n\nExample:\n```text\ncurl https://api.stripe.com/v1/credit_notes \\\n  -u \"sk_test_BQokikJOvBiI2HlWgH4olfQ2:\" \\\n  -d invoice={{INVOICE_ID}} \\\n  -d reason=duplicate \\\n  -d amount=1000 \\\n  -d credit_amount=1000\n```\n\nExample:\n```text\ncurl -G https://api.stripe.com/v1/customers/{{CUSTOMER_ID}} \\\n  -u \"sk_test_BQokikJOvBiI2HlWgH4olfQ2:\" \\\n  -d \"expand[]=invoice_credit_balance\"\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:27.411Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":4,"totalLines":38,"estimatedTokens":217}}171{"id":"doc-handle_payment_events_with_webhooks_stripe_docum-e50f6346","source":"documentation","title":"Handle payment events with webhooks | Stripe Documentation","url":"https://docs.stripe.com/webhooks/handling-payment-events","text":"Example:\n```text\n# Don't put any keys in code. See https://docs.stripe.com/keys-best-practices.\n# Find your keys at https://dashboard.stripe.com/apikeys.\nclient = Stripe::StripeClient.new('sk_test_BQokikJOvBiI2HlWgH4olfQ2')\n\nrequire 'stripe'\nrequire 'sinatra'\nrequire 'json'\n\n# Using the Sinatra framework\nset :port, 4242\n\npost '/webhook' do\n  payload = request.body.read\n  event = nil\n\n  begin\n    event = Stripe::Event.construct_from(\n      JSON.parse(payload, symbolize_names: true)\n    )\n  rescue JSON::ParserError => e\n    # Invalid payload\n    status 400\n    return\n  end\n\n  # Handle the event\n  case event.type\n  when 'payment_intent.succeeded'\n    payment_intent = event.data.object # contains a Stripe::PaymentIntent\n    puts 'PaymentIntent was successful!'\n  when 'payment_method.attached'\n    payment_method = event.data.object # contains a Stripe::PaymentMethod\n    puts 'PaymentMethod was attached to a Customer!'\n  # ... handle other event types\n  else\n    puts \"Unhandled event type: #{event.type}\"\n  end\n\n  status 200\nend\n```\n\nExample:\n```text\nnpm install --global @stripe/cli\n```\n\nExample:\n```text\nstripe login\n```\n\nExample:\n```text\nstripe listen --forward-to http://localhost:4242/webhook\n```\n\nExample:\n```text\nstripe trigger payment_intent.succeeded\n```\n\nExample:\n```text\n[200 POST] OK payment_intent.succeeded\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:27.446Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":6,"totalLines":70,"estimatedTokens":337}}172{"id":"doc-accept_in_app_payments_stripe_documentation-3936348a","source":"documentation","title":"Accept in-app payments | Stripe Documentation","url":"https://docs.stripe.com/payments/mobile/accept-payment?integration=paymentsheet&type=paymentsfu","text":"Example:\n```text\n# Available as a gem\nsudo gem install stripe\n```\n\nExample:\n```text\n# If you use bundler, you can add this line to your Gemfile\ngem 'stripe'\n```\n\nExample:\n```text\n// Set your publishable key: remember to change this to your live publishable key in production\n// See your keys here: https://dashboard.stripe.com/apikeys\nSTPAPIClient.shared.publishableKey = \"pk_test_TYooMQauvdEDq54NiTphI7jx\"\n```\n\nExample:\n```text\n// This method handles opening custom URL schemes (for example, \"your-app://stripe-redirect\")\nfunc scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {\n    guard let url = URLContexts.first?.url else {\n        return\n    }\n    let stripeHandled = StripeAPI.handleURLCallback(with: url)\n    if (!stripeHandled) {\n        // This was not a Stripe url – handle the URL normally as you would\n    }\n}\n```\n\nExample:\n```text\nvar configuration = PaymentSheet.Configuration()\nconfiguration.returnURL = \"your-app://stripe-redirect\"\n```\n\nExample:\n```text\ncurl -X POST https://api.stripe.com/v1/customers \\\n  -u \"sk_test_BQokikJOvBiI2HlWgH4olfQ2:\"\n```\n\nExample:\n```text\nimport StripePaymentSheet\n\nclass MyCheckoutVC: UIViewController {\n  func didTapCheckoutButton() {\n    let intentConfig = PaymentSheet.IntentConfiguration(\n      mode: .payment(amount: 1099, currency: \"USD\", setupFutureUsage: .offSession)\n    ) { [weak self] confirmationToken in\n      try await self?.handleConfirmationToken(confirmationToken)\n    }\n    var configuration = PaymentSheet.Configuration()\n    configuration.returnURL = \"your-app://stripe-redirect\" // Use the return url you set up in the previous step\n    let paymentSheet = PaymentSheet(intentConfiguration: intentConfig, configuration: configuration)\n  }\n\n  func handleConfirmationToken(_ confirmationToken: STPConfirmationToken) async throws -> String {\n    // ...explained later\n  }\n}\n```\n\nExample:\n```text\nclass MyCheckoutVC: UIViewController {\n  func didTapCheckoutButton() {\n    // ...\n    paymentSheet.present(from: self) { result in\n      switch result {\n        case .completed:\n          // Payment completed - show a confirmation screen.\n        case .failed(let error):\n          print(error)\n          // PaymentSheet encountered an unrecoverable error. You can display the error to the user, log it, and so on\n        case .canceled:\n          // Customer canceled - you should probably do nothing.\n      }\n    }\n  }\n}\n```\n\nExample:\n```text\nclass MyCheckoutVC: UIViewController {\n  // ...\n\n  func handleConfirmationToken(_ confirmationToken: STPConfirmationToken) async throws -> String {\n    // Make a request to your own server. Pass confirmationToken.stripeId if using server-side confirmation.\n    // Return the client secret or throw an error.\n    return try await MyAPIClient.shared.createIntent(confirmationTokenId: confirmationToken.stripeId)\n  }\n}\n```\n\nExample:\n```text\nrequire 'stripe'\n# Don't put any keys in code. See https://docs.stripe.com/keys-best-practices.\nclient = Stripe::StripeClient.new('sk_test_BQokikJOvBiI2HlWgH4olfQ2')\n\npost '/create-intent' do\n  data = JSON.parse request.body.read\n  params = {\n    customer: ..., # The Customer ID you previously created\n    amount: 1099,\n    currency: 'usd',\n    setup_future_usage: 'off_session',\n    automatic_payment_methods: {enabled: true},\n  }\n  begin\n    intent = client.v1.payment_intents.create(params)\n    {client_secret: intent.client_secret}.to_json\n  rescue Stripe::StripeError => e\n    {error: e.error.message}.to_json\n  end\nend\n```\n\nExample:\n```text\ncurl -G https://api.stripe.com/v1/payment_methods \\\n  -u \"sk_test_BQokikJOvBiI2HlWgH4olfQ2:\" \\\n  -d \"customer_account={{CUSTOMER_ACCOUNT_ID}}\" \\\n  -d type=card\n```\n\nExample:\n```text\ncurl https://api.stripe.com/v1/payment_intents \\\n  -u \"sk_test_BQokikJOvBiI2HlWgH4olfQ2:\" \\\n  -d amount=1099 \\\n  -d currency=usd \\\n  -d \"automatic_payment_methods[enabled]=true\" \\\n  -d \"customer_account={{CUSTOMER_ACCOUNT_ID}}\" \\\n  -d payment_method={{PAYMENT_METHOD_ID}} \\\n  --data-urlencode \"return_url=https://example.com/order/123/complete\" \\\n  -d off_session=true \\\n  -d confirm=true\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:27.451Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":12,"totalLines":147,"estimatedTokens":1027}}173{"id":"doc-payment_method_rules_stripe_documentation-5818764b","source":"documentation","title":"Payment method rules | Stripe Documentation","url":"https://docs.stripe.com/payments/payment-method-rules","text":"Example:\n```text\ncurl https://api.stripe.com/v1/checkout/sessions \\\n  -u sk_test_BQokikJOvBiI2HlWgH4olfQ2: \\\n  -d \"line_items[0][price]\"=\"{{PRICE_ID}}\" \\\n  -d \"line_items[0][quantity]\"=1 \\\n  -d mode=payment \\\n  -d success_url=\"https://example.com/success\" \\\n  --data-urlencode customer_email=\"test+location_FR@example.com\"\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:27.456Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":1,"totalLines":12,"estimatedTokens":85}}174{"id":"doc-invoice_line_item_stripe_api_reference-c4619ebb","source":"documentation","title":"Invoice Line Item | Stripe API Reference","url":"https://docs.stripe.com/api/invoice-line-item?api-version=2025-09-30.preview","text":"Example:\n```text\n{  \"id\": \"il_tmp_1Nzo1ZGgdF1VjufLzD1UUn9R\",  \"object\": \"line_item\",  \"amount\": 1000,  \"currency\": \"usd\",  \"description\": \"My First Invoice Item (created for API docs)\",  \"discount_amounts\": [],  \"discountable\": true,  \"discounts\": [],  \"livemode\": false,  \"metadata\": {},  \"parent\": {    \"type\": \"invoice_item_details\",    \"invoice_item_details\": {      \"invoice_item\": \"ii_1NpHiK2eZvKYlo2C9NdV8VrI\",      \"proration\": false,      \"proration_details\": {        \"credited_items\": null      },      \"subscription\": null    }  },  \"period\": {    \"end\": 1696975413,    \"start\": 1696975413  },  \"pricing\": {    \"price_details\": {      \"price\": \"price_1NzlYfGgdF1VjufL0cVjLJVI\",      \"product\": \"prod_OnMHDH6VBmYlTr\"    },    \"type\": \"price_details\",    \"unit_amount_decimal\": \"1000\"  },  \"quantity\": 1,  \"tax_amounts\": [],  \"tax_rates\": [],  \"unit_amount_excluding_tax\": \"1000\"}\n```\n\nExample:\n```text\ncurl -X POST https://api.stripe.com/v1/invoices/{{INVOICE_ID}}/lines/il_tmp_1Nzo1ZGgdF1VjufLzD1UUn9R \\  -u \"sk_test_BQokikJOvBiI2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2:\" \\  -H \"Stripe-Version: 2025-09-30.preview\"\n```\n\nExample:\n```text\n{  \"id\": \"il_tmp_1Nzo1ZGgdF1VjufLzD1UUn9R\",  \"object\": \"line_item\",  \"amount\": 1000,  \"currency\": \"usd\",  \"description\": \"My First Invoice Item (created for API docs)\",  \"discount_amounts\": [],  \"discountable\": true,  \"discounts\": [],  \"livemode\": false,  \"metadata\": {},  \"parent\": {    \"type\": \"invoice_item_details\",    \"invoice_item_details\": {      \"invoice_item\": \"ii_1Nzo1ZGgdF1VjufLzD1UUn9R\",      \"proration\": false,      \"proration_details\": {        \"credited_items\": null      },      \"subscription\": null    }  },  \"period\": {    \"end\": 1696975413,    \"start\": 1696975413  },  \"pricing\": {    \"price_details\": {      \"price\": \"price_1NzlYfGgdF1VjufL0cVjLJVI\",      \"product\": \"prod_OnMHDH6VBmYlTr\"    },    \"type\": \"price_details\",    \"unit_amount_decimal\": \"1000\"  },  \"quantity\": 1,  \"taxes\": []}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:29.064Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":3,"totalLines":16,"estimatedTokens":496}}175{"id":"doc-azure_extension_duckdb-a994d7af","source":"documentation","title":"Azure Extension – DuckDB","url":"https://duckdb.org/docs/current/core_extensions/azure","text":"⌘K ctrl+k 1.5 current 1.5current 1.4LTS 1.3\n\nExample:\n```text\nINSTALL azure;\nLOAD azure;\n```\n\nExample:\n```text\nSELECT count(*)\nFROM 'az://my_container/path/my_file.parquet_or_csv';\n```\n\nExample:\n```text\nSELECT *\nFROM 'az://my_container/path/*.csv';\n```\n\nExample:\n```text\nSELECT *\nFROM 'az://my_container/path/**';\n```\n\nExample:\n```text\nSELECT count(*)\nFROM 'az://my_storage_account.blob.core.windows.net/my_container/path/my_file.parquet_or_csv';\n```\n\nExample:\n```text\nSELECT *\nFROM 'az://my_storage_account.blob.core.windows.net/my_container/path/*.csv';\n```\n\nExample:\n```text\nSELECT count(*)\nFROM 'abfss://my_filesystem/path/my_file.parquet_or_csv';\n```\n\nExample:\n```text\nSELECT *\nFROM 'abfss://my_filesystem/path/*.csv';\n```\n\nExample:\n```text\nSELECT *\nFROM 'abfss://my_filesystem/path/**';\n```\n\nExample:\n```text\nSELECT count(*)\nFROM 'abfss://my_storage_account.dfs.core.windows.net/my_filesystem/path/my_file.parquet_or_csv';\n```\n\nExample:\n```text\nSELECT *\nFROM 'abfss://my_storage_account.dfs.core.windows.net/my_filesystem/path/*.csv';\n```\n\nExample:\n```text\n-- Write query results to a Parquet file on Blob Storage\nCOPY (SELECT * FROM my_table)\nTO 'az://my_container/path/output.parquet';\n```\n\nExample:\n```text\n-- Write a table to a CSV file on ADLSv2 Storage\nCOPY my_table\nTO 'abfss://my_container/path/output.csv';\n```\n\nExample:\n```text\nCOPY my_table\nTO 'az://my_storage_account.blob.core.windows.net/my_container/path/output.parquet';\n```\n\nExample:\n```text\nSET azure_http_stats = false;\nSET azure_read_transfer_concurrency = 5;\nSET azure_read_transfer_chunk_size = 1_048_576;\nSET azure_read_buffer_size = 1_048_576;\n```\n\nExample:\n```text\nCREATE SECRET secret1 (\n    TYPE azure,\n    CONNECTION_STRING 'value'\n);\n```\n\nExample:\n```text\nCREATE SECRET secret2 (\n    TYPE azure,\n    PROVIDER config,\n    ACCOUNT_NAME 'storage_account_name'\n);\n```\n\nExample:\n```text\nCREATE SECRET secret3 (\n    TYPE azure,\n    PROVIDER credential_chain,\n    ACCOUNT_NAME 'storage_account_name'\n);\n```\n\nExample:\n```text\nCREATE SECRET secret4 (\n    TYPE azure,\n    PROVIDER credential_chain,\n    CHAIN 'cli;env',\n    ACCOUNT_NAME 'storage_account_name'\n);\n```\n\nExample:\n```text\nCREATE SECRET secret1 (\n    TYPE AZURE,\n    PROVIDER MANAGED_IDENTITY,\n    ACCOUNT_NAME 'storage account name',\n    CLIENT_ID 'used-assigned managed identity client id'\n);\n```\n\nExample:\n```text\nCREATE SECRET azure_spn (\n    TYPE azure,\n    PROVIDER service_principal,\n    TENANT_ID 'tenant_id',\n    CLIENT_ID 'client_id',\n    CLIENT_SECRET 'client_secret',\n    ACCOUNT_NAME 'storage_account_name'\n);\n```\n\nExample:\n```text\nCREATE SECRET azure_spn_cert (\n    TYPE azure,\n    PROVIDER service_principal,\n    TENANT_ID 'tenant_id',\n    CLIENT_ID 'client_id',\n    CLIENT_CERTIFICATE_PATH 'client_cert_path',\n    ACCOUNT_NAME 'storage_account_name'\n);\n```\n\nExample:\n```text\nCREATE SECRET secret5 (\n    TYPE azure,\n    CONNECTION_STRING 'value',\n    HTTP_PROXY 'http://localhost:3128',\n    PROXY_USER_NAME 'john',\n    PROXY_PASSWORD 'doe'\n);\n```\n\nExample:\n```text\nSET variable_name = variable_value;\n```\n\nExample:\n```text\nimport os\nimport duckdb\n\nos.environ[\"AZURE_LOG_LEVEL\"] = \"verbose\"\n\nduckdb.sql(\"CREATE SECRET myaccount (TYPE azure, PROVIDER credential_chain, SCOPE 'az://myaccount.blob.core.windows.net/')\")\nduckdb.sql(\"SELECT count(*) FROM 'az://myaccount.blob.core.windows.net/path/to/blob.parquet'\")\n```\n\nExample:\n```text\nroot\n├── l_receipmonth=1997-10\n│   ├── l_shipmode=AIR\n│   │   └── data_0.csv\n│   ├── l_shipmode=SHIP\n│   │   └── data_0.csv\n│   └── l_shipmode=TRUCK\n│       └── data_0.csv\n├── l_receipmonth=1997-11\n│   ├── l_shipmode=AIR\n│   │   └── data_0.csv\n│   ├── l_shipmode=SHIP\n│   │   └── data_0.csv\n│   └── l_shipmode=TRUCK\n│       └── data_0.csv\n└── l_receipmonth=1997-12\n    ├── l_shipmode=AIR\n    │   └── data_0.csv\n    ├── l_shipmode=SHIP\n    │   └── data_0.csv\n    └── l_shipmode=TRUCK\n        └── data_0.csv\n```\n\nExample:\n```text\nSELECT count(*)\nFROM 'az://root/l_receipmonth=1997-*/l_shipmode=SHIP/*.csv';\n```\n\nExample:\n```text\nSELECT count(*)\nFROM 'abfss://root/l_receipmonth=1997-*/l_shipmode=SHIP/*.csv';\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:30.977Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":28,"totalLines":232,"estimatedTokens":1028}}176{"id":"doc-writing_json_duckdb-7c5ed751","source":"documentation","title":"Writing JSON – DuckDB","url":"https://duckdb.org/docs/current/data/json/writing_json","text":"⌘K ctrl+k 1.5 current 1.5current 1.4LTS 1.3 1.2 1.1\n\nExample:\n```text\nCREATE TABLE cities AS\n    FROM (VALUES ('Amsterdam', 1), ('London', 2)) cities(name, id);\nCOPY cities TO 'cities.json';\n```\n\nExample:\n```text\n{\"name\":\"Amsterdam\",\"id\":1}\n{\"name\":\"London\",\"id\":2}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:30.995Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":2,"totalLines":16,"estimatedTokens":71}}177{"id":"doc-querying_parquet_metadata_duckdb-2718195a","source":"documentation","title":"Querying Parquet Metadata – DuckDB","url":"https://duckdb.org/docs/current/data/parquet/metadata","text":"⌘K ctrl+k 1.5 current 1.5current 1.4LTS 1.3 1.2 1.1 1.0 0.10\n\nExample:\n```text\nSELECT *\nFROM parquet_metadata('test.parquet');\n```\n\nExample:\n```text\nSELECT *\nFROM parquet_metadata('data/*.parquet');\n```\n\nExample:\n```text\nDESCRIBE SELECT * FROM 'test.parquet';\n```\n\nExample:\n```text\nSELECT *\nFROM parquet_schema('test.parquet');\n```\n\nExample:\n```text\nSELECT *\nFROM parquet_file_metadata('test.parquet');\n```\n\nExample:\n```text\nSELECT *\nFROM parquet_kv_metadata('test.parquet');\n```\n\nExample:\n```text\nSELECT *\nFROM parquet_full_metadata('test.parquet');\n```\n\nExample:\n```text\nFROM parquet_bloom_probe('my_file.parquet', 'my_col', 500);\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:31.005Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":8,"totalLines":49,"estimatedTokens":163}}178{"id":"doc-data_chunks_duckdb-eeb308fa","source":"documentation","title":"Data Chunks – DuckDB","url":"https://duckdb.org/docs/current/clients/c/data_chunk","text":"⌘K ctrl+k 1.5 current 1.5current 1.4LTS 1.3 1.2\n\nExample:\n```text\nduckdb_data_chunk duckdb_create_data_chunk(duckdb_logical_type *types, idx_t column_count);\nvoid duckdb_destroy_data_chunk(duckdb_data_chunk *chunk);\nvoid duckdb_data_chunk_reset(duckdb_data_chunk chunk);\nidx_t duckdb_data_chunk_get_column_count(duckdb_data_chunk chunk);\nduckdb_vector duckdb_data_chunk_get_vector(duckdb_data_chunk chunk, idx_t col_idx);\nidx_t duckdb_data_chunk_get_size(duckdb_data_chunk chunk);\nvoid duckdb_data_chunk_set_size(duckdb_data_chunk chunk, idx_t size);\n```\n\nExample:\n```text\nduckdb_data_chunk duckdb_create_data_chunk(\n  duckdb_logical_type *types,\n  idx_t column_count\n);\n```\n\nExample:\n```text\nvoid duckdb_destroy_data_chunk(\n  duckdb_data_chunk *chunk\n);\n```\n\nExample:\n```text\nvoid duckdb_data_chunk_reset(\n  duckdb_data_chunk chunk\n);\n```\n\nExample:\n```text\nidx_t duckdb_data_chunk_get_column_count(\n  duckdb_data_chunk chunk\n);\n```\n\nExample:\n```text\nduckdb_vector duckdb_data_chunk_get_vector(\n  duckdb_data_chunk chunk,\n  idx_t col_idx\n);\n```\n\nExample:\n```text\nidx_t duckdb_data_chunk_get_size(\n  duckdb_data_chunk chunk\n);\n```\n\nExample:\n```text\nvoid duckdb_data_chunk_set_size(\n  duckdb_data_chunk chunk,\n  idx_t size\n);\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:31.009Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":8,"totalLines":66,"estimatedTokens":311}}179{"id":"doc-output_formats_duckdb-468be362","source":"documentation","title":"Output Formats – DuckDB","url":"https://duckdb.org/docs/current/clients/cli/output_formats","text":"⌘K ctrl+k 1.5 current 1.5current 1.4LTS 1.3 1.2\n\nExample:\n```text\n.pager '\"C:\\Program Files\\Git\\usr\\bin\\less.exe\" -R'\n```\n\nExample:\n```text\n.mode\n```\n\nExample:\n```text\ncurrent output mode: duckbox\n```\n\nExample:\n```text\n.mode markdown\nSELECT 'quacking intensifies' AS incoming_ducks;\n```\n\nExample:\n```text\n|    incoming_ducks    |\n|----------------------|\n| quacking intensifies |\n```\n\nExample:\n```text\n.mode csv\nSELECT 1 AS col_1, 2 AS col_2\nUNION ALL\nSELECT 10 AS col1, 20 AS col_2;\n```\n\nExample:\n```csv\ncol_1,col_2\n1,2\n10,20\n```\n\nExample:\n```text\n.separator \"|\"\nSELECT 1 AS col_1, 2 AS col_2\nUNION ALL\nSELECT 10 AS col1, 20 AS col_2;\n```\n\nExample:\n```csv\ncol_1|col_2\n1|2\n10|20\n```\n\nExample:\n```text\n.pager on\n```\n\nExample:\n```text\n.pager off\n```\n\nExample:\n```text\n.pager automatic\n```\n\nExample:\n```text\n.pager set_row_threshold 50\n.pager set_column_threshold 5\n```\n\nExample:\n```text\n.pager less -RS\n```\n\nExample:\n```text\n.large_number_rendering off\nSELECT pi() * 1_000_000_000 AS x;\n```\n\nExample:\n```text\n┌───────────────────┐\n│         x         │\n│      double       │\n├───────────────────┤\n│ 3141592653.589793 │\n└───────────────────┘\n```\n\nExample:\n```text\n.large_number_rendering footer\nSELECT pi() * 1_000_000_000 AS x;\n```\n\nExample:\n```text\n┌───────────────────┐\n│         x         │\n│      double       │\n├───────────────────┤\n│ 3141592653.589793 │\n│  (3.14 billion)   │\n└───────────────────┘\n```\n\nExample:\n```text\n.large_number_rendering all\nSELECT pi() * 1_000_000_000 AS x;\n```\n\nExample:\n```text\n┌──────────────┐\n│      x       │\n│    double    │\n├──────────────┤\n│ 3.14 billion │\n└──────────────┘\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:31.028Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":20,"totalLines":136,"estimatedTokens":407}}180{"id":"doc-out_of_memory_errors_duckdb-f5eb4ce1","source":"documentation","title":"Out of Memory Errors – DuckDB","url":"https://duckdb.org/docs/current/guides/troubleshooting/oom_errors","text":"⌘K ctrl+k 1.5 current 1.5current 1.4LTS 1.3\n\nExample:\n```text\nduckdb.duckdb.OutOfMemoryException: Out of Memory Error: failed to pin block of size 256.0 KiB (476.7 MiB/476.8 MiB used)\n```\n\nExample:\n```text\nKilled\n```\n\nExample:\n```text\nsudo dmesg\n```\n\nExample:\n```text\n[Fri Apr 18 02:04:10 2025] Out of memory: Killed process 54400 (duckdb) total-vm:1037911068kB, anon-rss:770031964kB, file-rss:0kB, shmem-rss:0kB, UID:1000 pgtables:1814612kB oom_score_adj:0\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:31.141Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":4,"totalLines":23,"estimatedTokens":119}}181{"id":"doc-importing_duckbox_tables_duckdb-4c7c9f1a","source":"documentation","title":"Importing Duckbox Tables – DuckDB","url":"https://duckdb.org/docs/current/guides/snippets/importing_duckbox_tables","text":"⌘K ctrl+k 1.5 current 1.5current 1.4LTS 1.3 1.2\n\nExample:\n```text\n┌─────────┬───────┐\n│    a    │   b   │\n│ varchar │ int64 │\n├─────────┼───────┤\n│ hello   │    42 │\n│ world   │    84 │\n└─────────┴───────┘\n```\n\nExample:\n```text\necho -n > duckbox-cleaned.csv\nsed -n \"2s/^│ *//;s/ *│$//;s/ *│ */│/p;2q\" duckbox.csv >> duckbox-cleaned.csv\nsed \"1,4d;\\$d;s/^│ *//;s/ *│$//;s/ *│ */│/g\" duckbox.csv >> duckbox-cleaned.csv\n```\n\nExample:\n```text\na│b\nhello│42\nworld│84\n```\n\nExample:\n```text\nFROM read_csv('duckbox-cleaned.csv', delim = '│');\n```\n\nExample:\n```text\nCOPY (FROM read_csv('duckbox-cleaned.csv', delim = '│')) TO 'out.csv';\n```\n\nExample:\n```text\na,b\nhello,42\nworld,84\n```\n\nExample:\n```text\nINSTALL shellfs FROM community;\nLOAD shellfs;\nFROM read_csv(\n        '(sed -n \"2s/^│ *//;s/ *│$//;s/ *│ */│/p;2q\" duckbox.csv; ' ||\n        'sed \"1,4d;\\$d;s/^│ *//;s/ *│$//;s/ *│ */│/g\" duckbox.csv) |',\n        delim = '│'\n    );\n```\n\nExample:\n```text\nCREATE MACRO read_duckbox(path) AS TABLE\n    FROM read_csv(\n            printf(\n                '(sed -n \"2s/^│ *//;s/ *│$//;s/ *│ */│/p;2q\" %s; ' ||\n                'sed \"1,4d;\\$d;s/^│ *//;s/ *│$//;s/ *│ */│/g\" %s) |',\n                path, path\n            ),\n            delim = '│'\n        );\n```\n\nExample:\n```text\nFROM read_duckbox('duckbox.csv');\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:31.142Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":9,"totalLines":74,"estimatedTokens":329}}182{"id":"doc-core_concepts_eslint_pluggable_javascript_linter-a74231bf","source":"documentation","title":"Core Concepts - ESLint - Pluggable JavaScript Linter","url":"https://eslint.org/docs/latest/use/core-concepts/","text":"Donate Team Blog Docs Store Playground Code Explorer Versions Version Switcher Selecting a version will take you to the chosen version of the ESLint docs. Version HEAD v10.8.1 v9.39.5 v8.57.1 Previous Versions Team Blog Docs Store Playground Code Explorer Versions Version Switcher Selecting a version will take you to the chosen version of the ESLint docs. Version HEAD v10.8.1 v9.39.5 v8.57.1 Previous Versions\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:31.696Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":0,"totalLines":3,"estimatedTokens":107}}183{"id":"doc-glossary_eslint_pluggable_javascript_linter-af88a371","source":"documentation","title":"Glossary - ESLint - Pluggable JavaScript Linter","url":"https://eslint.org/docs/latest/use/core-concepts/glossary","text":"Donate Team Blog Docs Store Playground Code Explorer Versions Version Switcher Selecting a version will take you to the chosen version of the ESLint docs. Version HEAD v10.8.1 v9.39.5 v8.57.1 Previous Versions Team Blog Docs Store Playground Code Explorer Versions Version Switcher Selecting a version will take you to the chosen version of the ESLint docs. Version HEAD v10.8.1 v9.39.5 v8.57.1 Previous Versions\n\nExample:\n```js\nimport { defineConfig } from \"eslint/config\";\n\nexport default defineConfig([\n\t{\n\t\trules: {\n\t\t\t\"prefer-const\": \"error\",\n\t\t},\n\t},\n]);\n```\n\nExample:\n```json\n{\n\t\"type\": \"ExpressionStatement\",\n\t\"expression\": {\n\t\t\"type\": \"BinaryExpression\",\n\t\t\"left\": {\n\t\t\t\"type\": \"Literal\",\n\t\t\t\"value\": 1,\n\t\t\t\"raw\": \"1\"\n\t\t},\n\t\t\"operator\": \"+\",\n\t\t\"right\": {\n\t\t\t\"type\": \"Literal\",\n\t\t\t\"value\": 2,\n\t\t\t\"raw\": \"2\"\n\t\t}\n\t}\n}\n```\n\nExample:\n```js\n/* eslint eqeqeq: \"off\", curly: \"error\" */\n```\n\nExample:\n```js\nimport { defineConfig } from \"eslint/config\";\n\nexport default defineConfig([\n\t{\n\t\trules: {\n\t\t\t\"no-unused-expressions\": \"error\",\n\t\t},\n\t},\n\t{\n\t\tfiles: [\"*.test.js\"],\n\t\trules: {\n\t\t\t\"no-unused-expressions\": \"off\",\n\t\t},\n\t},\n]);\n```\n\nExample:\n```js\n/* eslint no-unused-expressions: \"error\" */\n```\n\nExample:\n```js\nimport { defineConfig } from \"eslint/config\";\nimport js from \"@eslint/js\";\nimport solid from \"eslint-plugin-solid/configs/recommended\";\n\nexport default defineConfig([js.configs.recommended, solid]);\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:31.699Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":6,"totalLines":75,"estimatedTokens":358}}184{"id":"doc-custom_rule_tutorial_eslint_pluggable_javascript-86c96953","source":"documentation","title":"Custom Rule Tutorial - ESLint - Pluggable JavaScript Linter","url":"https://eslint.org/docs/latest/extend/custom-rule-tutorial","text":"Donate Team Blog Docs Store Playground Code Explorer Versions Version Switcher Selecting a version will take you to the chosen version of the ESLint docs. Version HEAD v10.8.1 v9.39.5 v8.57.1 Previous Versions Team Blog Docs Store Playground Code Explorer Versions Version Switcher Selecting a version will take you to the chosen version of the ESLint docs. Version HEAD v10.8.1 v9.39.5 v8.57.1 Previous Versions\n\nExample:\n```javascript\n// foo.js\n\nconst foo = \"baz123\";\n```\n\nExample:\n```javascript\n// foo.js\n\nconst foo = \"bar\";\n```\n\nExample:\n```shell\nmkdir eslint-custom-rule-example # create directory\ncd eslint-custom-rule-example # enter the directory\nnpm init -y # init new npm project\ntouch enforce-foo-bar.js # create file enforce-foo-bar.js\n```\n\nExample:\n```javascript\n// enforce-foo-bar.js\n\nmodule.exports = {\n\tmeta: {\n\t\t// TODO: add metadata\n\t},\n\tcreate(context) {\n\t\treturn {\n\t\t\t// TODO: add callback function(s)\n\t\t};\n\t},\n};\n```\n\nExample:\n```javascript\n// enforce-foo-bar.js\n\nmodule.exports = {\n\tmeta: {\n\t\ttype: \"problem\",\n\t\tdocs: {\n\t\t\tdescription:\n\t\t\t\t\"Enforce that a variable named `foo` can only be assigned a value of 'bar'.\",\n\t\t},\n\t\tfixable: \"code\",\n\t\tschema: [],\n\t\tlanguages: [\"js/js\"],\n\t},\n\tcreate(context) {\n\t\treturn {\n\t\t\t// TODO: add callback function(s)\n\t\t};\n\t},\n};\n```\n\nExample:\n```javascript\n// enforce-foo-bar.js\n\nmodule.exports = {\n    meta: {\n        type: \"problem\",\n        docs: {\n            description: \"Enforce that a variable named `foo` can only be assigned a value of 'bar'.\"\n        },\n        fixable: \"code\",\n        schema: [],\n        languages: [\"js/js\"]\n    },\n    create(context) {\n        return {\n\n            // Performs action in the function on every variable declarator\n            VariableDeclarator(node) {\n\n                // Check if a `const` variable declaration\n                if (node.parent.kind === \"const\") {\n\n                    // Check if variable name is `foo`\n                    if (node.id.type === \"Identifier\" && node.id.name === \"foo\") {\n\n                        // Check if value of variable is \"bar\"\n                        if (node.init && node.init.type === \"Literal\" && node.init.value !== \"bar\") {\n\n                            /*\n                             * Report error to ESLint. Error message uses\n                             * a message placeholder to include the incorrect value\n                             * in the error message.\n                             * Also includes a `fix(fixer)` function that replaces\n                             * any values assigned to `const foo` with \"bar\".\n                             */\n                            context.report({\n                                node,\n                                message: 'Value other than \"bar\" assigned to `const foo`. Unexpected value: {{ notBar }}.',\n                                data: {\n                                    notBar: node.init.value\n                                },\n                                fix(fixer) {\n                                    return fixer.replaceText(node.init, '\"bar\"');\n                                }\n                            });\n                        }\n                    }\n                }\n            }\n        };\n    }\n};\n```\n\nExample:\n```shell\ntouch enforce-foo-bar.test.js\n```\n\nExample:\n```shell\nnpm install --save-dev eslint\n```\n\nExample:\n```shell\nyarn add --dev eslint\n```\n\nExample:\n```shell\npnpm add --save-dev eslint\n```\n\nExample:\n```shell\nbun add --dev eslint\n```\n\nExample:\n```javascript\n// package.json\n{\n    // ...other configuration\n    \"scripts\": {\n        \"test\": \"node enforce-foo-bar.test.js\"\n    },\n    // ...other configuration\n}\n```\n\nExample:\n```javascript\n// enforce-foo-bar.test.js\nconst { RuleTester } = require(\"eslint\");\nconst fooBarRule = require(\"./enforce-foo-bar\");\n\nconst ruleTester = new RuleTester({\n\t// Must use at least ecmaVersion 2015 because\n\t// that's when `const` variables were introduced.\n\tlanguageOptions: { ecmaVersion: 2015 },\n});\n\n// Throws error if the tests in ruleTester.run() do not pass\nruleTester.run(\n\t\"enforce-foo-bar\", // rule name\n\tfooBarRule, // rule code\n\t{\n\t\t// checks\n\t\t// 'valid' checks cases that should pass\n\t\tvalid: [\n\t\t\t{\n\t\t\t\tcode: \"const foo = 'bar';\",\n\t\t\t},\n\t\t],\n\t\t// 'invalid' checks cases that should not pass\n\t\tinvalid: [\n\t\t\t{\n\t\t\t\tcode: \"const foo = 'baz';\",\n\t\t\t\toutput: 'const foo = \"bar\";',\n\t\t\t\terrors: 1,\n\t\t\t},\n\t\t],\n\t},\n);\n\nconsole.log(\"All tests passed!\");\n```\n\nExample:\n```shell\nnpm test\n```\n\nExample:\n```shell\nAll tests passed!\n```\n\nExample:\n```shell\ntouch eslint-plugin-example.js\n```\n\nExample:\n```javascript\n// eslint-plugin-example.js\n\nconst fooBarRule = require(\"./enforce-foo-bar\");\nconst plugin = { rules: { \"enforce-foo-bar\": fooBarRule } };\nmodule.exports = plugin;\n```\n\nExample:\n```shell\ntouch eslint.config.js\n```\n\nExample:\n```javascript\n// eslint.config.js\n\"use strict\";\n\n// Import the `defineConfig` helper function\nconst { defineConfig } = require(\"eslint/config\");\n// Import the ESLint plugin locally\nconst eslintPluginExample = require(\"./eslint-plugin-example\");\n\nmodule.exports = defineConfig([\n\t{\n\t\tfiles: [\"**/*.js\"],\n\t\tlanguageOptions: {\n\t\t\tsourceType: \"commonjs\",\n\t\t\tecmaVersion: \"latest\",\n\t\t},\n\t\t// Using the eslint-plugin-example plugin defined locally\n\t\tplugins: { example: eslintPluginExample },\n\t\trules: {\n\t\t\t\"example/enforce-foo-bar\": \"error\",\n\t\t},\n\t},\n]);\n```\n\nExample:\n```shell\ntouch example.js\n```\n\nExample:\n```javascript\n// example.js\n\nfunction correctFooBar() {\n\tconst foo = \"bar\";\n}\n\nfunction incorrectFoo() {\n\tconst foo = \"baz\"; // Problem!\n}\n```\n\nExample:\n```shell\nnpx eslint example.js\n```\n\nExample:\n```shell\nyarn dlx eslint example.js\n```\n\nExample:\n```shell\npnpm dlx eslint example.js\n```\n\nExample:\n```shell\nbunx eslint example.js\n```\n\nExample:\n```text\n/<path-to-directory>/eslint-custom-rule-example/example.js\n  8:11  error  Value other than \"bar\" assigned to `const foo`. Unexpected value: baz  example/enforce-foo-bar\n\n✖ 1 problem (1 error, 0 warnings)\n  1 error and 0 warnings potentially fixable with the `--fix` option.\n```\n\nExample:\n```javascript\n// package.json\n{\n  // Name npm package.\n  // Add your own package name. eslint-plugin-example is taken!\n  \"name\": \"eslint-plugin-example\",\n  \"version\": \"1.0.0\",\n  \"description\": \"ESLint plugin for enforce-foo-bar rule.\",\n  \"main\": \"eslint-plugin-example.js\", // plugin entry point\n  \"scripts\": {\n    \"test\": \"node enforce-foo-bar.test.js\"\n  },\n  // Add eslint>=10.0.0 as a peer dependency.\n  \"peerDependencies\": {\n    \"eslint\": \">=10.0.0\"\n  },\n  // Add these standard keywords to make plugin easy to find!\n  \"keywords\": [\n    \"eslint\",\n    \"eslintplugin\",\n    \"eslint-plugin\"\n  ],\n  \"author\": \"\",\n  \"license\": \"ISC\",\n  \"devDependencies\": {\n    \"eslint\": \"^10.0.0\"\n  }\n}\n```\n\nExample:\n```shell\n# Add your package name here\nnpm install --save-dev eslint-plugin-example\n```\n\nExample:\n```shell\n# Add your package name here\nyarn add --dev eslint-plugin-example\n```\n\nExample:\n```shell\n# Add your package name here\npnpm add --save-dev eslint-plugin-example\n```\n\nExample:\n```shell\n# Add your package name here\nbun add --dev eslint-plugin-example\n```\n\nExample:\n```javascript\n// eslint.config.js\n\"use strict\";\n\n// Import the plugin downloaded from npm\nconst eslintPluginExample = require(\"eslint-plugin-example\");\n\n// ... rest of configuration\n```\n\nExample:\n```shell\nnpx eslint example.js --fix\n```\n\nExample:\n```shell\nyarn dlx eslint example.js --fix\n```\n\nExample:\n```shell\npnpm dlx eslint example.js --fix\n```\n\nExample:\n```shell\nbunx eslint example.js --fix\n```\n\nExample:\n```javascript\n// example.js\n\n// ... rest of file\n\nfunction incorrectFoo() {\n\tconst foo = \"bar\"; // Fixed!\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:31.717Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":37,"totalLines":393,"estimatedTokens":1919}}185{"id":"doc-including_wsgi_flask_django_others_fastapi-c4a96e05","source":"documentation","title":"Including WSGI - Flask, Django, others - FastAPI","url":"https://fastapi.tiangolo.com/advanced/wsgi/","text":"FastAPI Including WSGI - Flask, Django, others en - English de - Deutsch es - español fr - français hi - हिन्दी ja - 日本語 ko - 한국어 pt - português ru - русский язык tr - Türkçe uk - українська мова zh - 简体中文 zh-hant - 繁體中文 Search fastapi/fastapi FastAPI Features Learn Reference Resources About Release Notes\n\nExample:\n```text\nfrom a2wsgi import WSGIMiddleware\nfrom fastapi import FastAPI\nfrom flask import Flask, request\nfrom markupsafe import escape\n\nflask_app = Flask(__name__)\n\n\n@flask_app.route(\"/\")\ndef flask_main():\n    name = request.args.get(\"name\", \"World\")\n    return f\"Hello, {escape(name)} from Flask!\"\n\n\napp = FastAPI()\n\n\n@app.get(\"/v2\")\ndef read_main():\n    return {\"message\": \"Hello World\"}\n\n\napp.mount(\"/v1\", WSGIMiddleware(flask_app))\n```\n\nExample:\n```text\nHello, World from Flask!\n```\n\nExample:\n```text\n{\n    \"message\": \"Hello World\"\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:32.406Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":3,"totalLines":42,"estimatedTokens":218}}186{"id":"doc-httpconnection_class_fastapi-26ea2b3d","source":"documentation","title":"HTTPConnection class - FastAPI","url":"https://fastapi.tiangolo.com/reference/httpconnection/","text":"FastAPI HTTPConnection class en - English de - Deutsch es - español fr - français hi - हिन्दी ja - 日本語 ko - 한국어 pt - português ru - русский язык tr - Türkçe uk - українська мова zh - 简体中文 zh-hant - 繁體中文 Search fastapi/fastapi FastAPI Features Learn Reference Resources About Release Notes\n\nExample:\n```text\nfrom fastapi.requests import HTTPConnection\n```\n\nExample:\n```text\nHTTPConnection(scope, receive=None)\n```\n\nExample:\n```text\ndef __init__(self, scope: Scope, receive: Receive | None = None) -> None:\n    assert scope[\"type\"] in (\"http\", \"websocket\")\n    self.scope = scope\n```\n\nExample:\n```text\nscope = scope\n```\n\nExample:\n```text\napp\n```\n\nExample:\n```text\nurl\n```\n\nExample:\n```text\nbase_url\n```\n\nExample:\n```text\nheaders\n```\n\nExample:\n```text\nquery_params\n```\n\nExample:\n```text\npath_params\n```\n\nExample:\n```text\ncookies\n```\n\nExample:\n```text\nclient\n```\n\nExample:\n```text\nsession\n```\n\nExample:\n```text\nauth\n```\n\nExample:\n```text\nuser\n```\n\nExample:\n```text\nstate\n```\n\nExample:\n```text\nurl_for(name, /, **path_params)\n```\n\nExample:\n```text\ndef url_for(self, name: str, /, **path_params: Any) -> URL:\n    url_path_provider: Router | Starlette | None = self.scope.get(\"router\") or self.scope.get(\"app\")\n    if url_path_provider is None:\n        raise RuntimeError(\"The `url_for` method can only be used inside a Starlette application or with a router.\")\n    url_path = url_path_provider.url_path_for(name, **path_params)\n    return url_path.make_absolute_url(base_url=self.base_url)\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:32.429Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":18,"totalLines":100,"estimatedTokens":376}}187{"id":"doc-async_with_gevent_flask_documentation_3_1_x-56d4ef27","source":"documentation","title":"Async with Gevent — Flask Documentation (3.1.x)","url":"https://flask.palletsprojects.com/en/stable/gevent/","text":"Async with Gevent¶ Gevent patches Python’s standard library to run within special async workers called greenlets. Gevent has existed since long before Python’s native asyncio was available, and Flask has always worked with it. Gevent is a reliable way to handle numerous, long lived, concurrent connections, and to achieve similar capabilities to ASGI and asyncio. This works without needing to write async def or await anywhere, but relies on gevent and greenlet’s low level manipulation of the Python interpreter. Deciding whether you should use gevent with Flask, or Quart, or something else, is ultimately up to understanding the specific needs of your project. Enabling gevent¶ You need to apply gevent’s patching as early as possible in your code. This enables gevent’s underlying event loop and converts many Python internals to run inside it. Add the following at the top of your project’s module or top __init__.py: import gevent.monkey gevent.monkey.patch_all() When deploying in production, use Gunicorn or uWSGI with a gevent worker, as described on those pages. To run concurrent tasks within your own code, such as views, use gevent.spawn(): @app.post(\"/send\") def send_email(): gevent.spawn(email.send, to=\"example@example.example\", text=\"example\") return \"Email is being sent.\" If you need to access request or other Flask context globals within the spawned function, decorate the function with stream_with_context() or copy_current_request_context(). Prefer passing the exact data you need when spawning the function, rather than using the decorators. Note When using gevent, greenlet>=1.0 is required. When using PyPy, PyPy>=7.3.7 is required. Combining with async/await¶ Gevent’s patching does not interact well with Flask’s built-in asyncio support. If you want to use Gevent and asyncio in the same app, you’ll need to override flask.Flask.async_to_sync() to run async functions inside gevent. import gevent.monkey gevent.monkey.patch_all() import asyncio from flask import Flask, request loop = asyncio.EventLoop() gevent.spawn(loop.run_forever) class GeventFlask(Flask): def async_to_sync(self, func): def run(*args, **kwargs): coro = func(*args, **kwargs) future = asyncio.run_coroutine_threadsafe(coro, loop) return future.result() return run app = GeventFlask(__name__) @app.get(\"/\") async def greet(): await asyncio.sleep(1) return f\"Hello, {request.args.get(\"name\", \"World\")}!\" This starts an asyncio event loop in a gevent worker. Async functions are scheduled on that event loop. This may still have limitations, and may need to be modified further when using other asyncio implementations. libuv¶ libuv is another event loop implementation that gevent supports. There’s also a project called uvloop that enables libuv in asyncio. If you want to use libuv, use gevent’s support, not uvloop. It may be possible to further modify the async_to_sync code from the previous section to work with uvloop, but that’s not currently known. To enable gevent’s libuv support, add the following at the very top of your code, before gevent.monkey.patch_all(): import gevent gevent.config.loop = \"libuv\" import gevent.monkey gevent.monkey.patch_all() Contents Async with Gevent Enabling gevent Combining with async/await libuv Navigation Overview httpd async and await Quick search\n\nExample:\n```text\nimport gevent.monkey\ngevent.monkey.patch_all()\n```\n\nExample:\n```text\n@app.post(\"/send\")\ndef send_email():\n    gevent.spawn(email.send, to=\"example@example.example\", text=\"example\")\n    return \"Email is being sent.\"\n```\n\nExample:\n```text\nimport gevent.monkey\ngevent.monkey.patch_all()\n\nimport asyncio\nfrom flask import Flask, request\n\nloop = asyncio.EventLoop()\ngevent.spawn(loop.run_forever)\n\nclass GeventFlask(Flask):\n    def async_to_sync(self, func):\n        def run(*args, **kwargs):\n            coro = func(*args, **kwargs)\n            future = asyncio.run_coroutine_threadsafe(coro, loop)\n            return future.result()\n\n        return run\n\napp = GeventFlask(__name__)\n\n@app.get(\"/\")\nasync def greet():\n    await asyncio.sleep(1)\n    return f\"Hello, {request.args.get(\"name\", \"World\")}!\"\n```\n\nExample:\n```text\nimport gevent\ngevent.config.loop = \"libuv\"\n\nimport gevent.monkey\ngevent.monkey.patch_all()\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:32.728Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":4,"totalLines":54,"estimatedTokens":1061}}188{"id":"doc-publishing_a_module_the_go_programming_language-5a48d124","source":"documentation","title":"Publishing a module - The Go Programming Language","url":"https://go.dev/doc/modules/publishing","text":"Publishing a module When you want to make a module available for other developers, you publish it so that it’s visible to Go tools. Once you’ve published the module, developers importing its packages will be able to resolve a dependency on the module by running commands such as go get. ’t change a tagged version of a module after publishing it. For developers using the module, Go tools authenticate a downloaded module against the first downloaded copy. If the two differ, Go tools will return a security error. Instead of changing the code for a previously published version, publish a new version. See also For an overview of module development, see Developing and publishing modules For a high-level module development workflow – which includes publishing – see Module release and versioning workflow. Publishing steps Use the following steps to publish a module. Open a command prompt and change to your module’s root directory in the local repository. Run go mod tidy, which removes any dependencies the module might have accumulated that are no longer necessary. $ go mod tidy Run go test ./... a final time to make sure everything is working. This runs the unit tests you’ve written to use the Go testing framework. $ go test ./... ok example.com/mymodule 0.015s Tag the project with a new version number using the git tag command. For the version number, use a number that signals to users the nature of changes in this release. For more, see Module version numbering. $ git commit -m \"mymodule: changes for v0.1.0\" $ git tag v0.1.0 Push the new tag to the origin repository. $ git push origin v0.1.0 Make the module available by running the go list command to prompt Go to update its index of modules with information about the module you’re publishing. Precede the command with a statement to set the GOPROXY environment variable to a Go proxy. This will ensure that your request reaches the proxy. $ GOPROXY=proxy.golang.org go list -m example.com/mymodule@v0.1.0 Developers interested in your module import a package from it and run the go get command just as they would with any other module. They can run the go get command for latest versions or they can specify a particular version, as in the following example: $ go get example.com/mymodule@v0.1.0\n\ngo.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic. Learn more. Okay\n\nExample:\n```text\n$ go mod tidy\n```\n\nExample:\n```text\n$ go test ./...\nok      example.com/mymodule       0.015s\n```\n\nExample:\n```text\n$ git commit -m \"mymodule: changes for v0.1.0\"\n$ git tag v0.1.0\n```\n\nExample:\n```text\n$ git push origin v0.1.0\n```\n\nExample:\n```text\n$ GOPROXY=proxy.golang.org go list -m example.com/mymodule@v0.1.0\n```\n\nExample:\n```text\n$ go get example.com/mymodule@v0.1.0\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:45.373Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":6,"totalLines":37,"estimatedTokens":701}}189{"id":"doc-merge_your_branch_into_the_main_branch_gitlab_do-ed2495e4","source":"documentation","title":"Merge your branch into the main branch | GitLab Docs","url":"https://docs.gitlab.com/topics/git/merge/","text":"Getting startedTutorialsManage your organizationOrganize work with projectsPlan and track workManage authentication and authorizationUse GitGetting startedTutorialsBasic operationsCreate a projectClone a repositoryCreate a branchStage, commit, and push changesStash changesAdd files to your branchMerge your branchUpdate a forkAdvanced operationsTroubleshootingManage your codeUse CI/CD to build your applicationSecure your applicationDeploy and release your applicationManage your infrastructureMonitor your applicationAnalyze GitLab usageRelease notesFeature supportFind your GitLab versionGitLab Docs /Use GitLab /Use Git /Basic operations /Merge your branchHelp us learn about your current experience with the documentation. Take the survey.Merge your branch into the main branchAfter you have created a branch, made the required changes, and committed them locally, you push your branch and its commits to GitLab.In the response to the git push, GitLab provides a direct link to create the merge request. For create a merge request for my-new-branch, : https://gitlab.example.com/my-group/my-project/merge_requests/new?merge_request%5Bsource_branch%5D=my-new-branchTo get your branch merged into the main to the page provided in the link that was provided by Git and create your merge request. The merge request’s Source branch is your branch and the Target branch should be the main branch.If necessary, have your merge request reviewed.Have someone merge your merge request, or merge the merge request yourself, depending on your process.Related topicsMerge requestsMerge methodsMerge conflictsRelated topics\n\nExample:\n```plaintext\n...\nremote: To create a merge request for my-new-branch, visit:\nremote:   https://gitlab.example.com/my-group/my-project/merge_requests/new?merge_request%5Bsource_branch%5D=my-new-branch\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:09.357Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":1,"totalLines":10,"estimatedTokens":461}}190{"id":"doc-custom_response_classes_file_html_redirect_strea-035822ba","source":"documentation","title":"Custom Response Classes - File, HTML, Redirect, Streaming, etc. - FastAPI","url":"https://fastapi.tiangolo.com/reference/responses/","text":"FastAPI Custom Response Classes - File, HTML, Redirect, Streaming, etc. en - English de - Deutsch es - español fr - français hi - हिन्दी ja - 日本語 ko - 한국어 pt - português ru - русский язык tr - Türkçe uk - українська мова zh - 简体中文 zh-hant - 繁體中文 Search fastapi/fastapi FastAPI Features Learn Reference Resources About Release Notes\n\nExample:\n```text\nfrom fastapi.responses import (\n    FileResponse,\n    HTMLResponse,\n    JSONResponse,\n    ORJSONResponse,\n    PlainTextResponse,\n    RedirectResponse,\n    Response,\n    StreamingResponse,\n    UJSONResponse,\n)\n```\n\nExample:\n```text\nUJSONResponse(\n    content,\n    status_code=200,\n    headers=None,\n    media_type=None,\n    background=None,\n)\n```\n\nExample:\n```text\ndef __init__(\n    self,\n    content: Any,\n    status_code: int = 200,\n    headers: Mapping[str, str] | None = None,\n    media_type: str | None = None,\n    background: BackgroundTask | None = None,\n) -> None:\n    super().__init__(content, status_code, headers, media_type, background)\n```\n\nExample:\n```text\ncharset = 'utf-8'\n```\n\nExample:\n```text\nstatus_code = status_code\n```\n\nExample:\n```text\nmedia_type = 'application/json'\n```\n\nExample:\n```text\nbody = render(content)\n```\n\nExample:\n```text\nbackground = background\n```\n\nExample:\n```text\nheaders\n```\n\nExample:\n```text\nrender(content)\n```\n\nExample:\n```text\ndef render(self, content: Any) -> bytes:\n    assert ujson is not None, \"ujson must be installed to use UJSONResponse\"\n    return ujson.dumps(content, ensure_ascii=False).encode(\"utf-8\")\n```\n\nExample:\n```text\ninit_headers(headers=None)\n```\n\nExample:\n```text\ndef init_headers(self, headers: Mapping[str, str] | None = None) -> None:\n    if headers is None:\n        raw_headers: list[tuple[bytes, bytes]] = []\n        populate_content_length = True\n        populate_content_type = True\n    else:\n        raw_headers = [(k.lower().encode(\"latin-1\"), v.encode(\"latin-1\")) for k, v in headers.items()]\n        keys = [h[0] for h in raw_headers]\n        populate_content_length = b\"content-length\" not in keys\n        populate_content_type = b\"content-type\" not in keys\n\n    body = getattr(self, \"body\", None)\n    if (\n        body is not None\n        and populate_content_length\n        and not (self.status_code < 200 or self.status_code in (204, 304))\n    ):\n        content_length = str(len(body))\n        raw_headers.append((b\"content-length\", content_length.encode(\"latin-1\")))\n\n    content_type = self.media_type\n    if content_type is not None and populate_content_type:\n        if content_type.startswith(\"text/\") and \"charset=\" not in content_type.lower():\n            content_type += \"; charset=\" + self.charset\n        raw_headers.append((b\"content-type\", content_type.encode(\"latin-1\")))\n\n    self.raw_headers = raw_headers\n```\n\nExample:\n```text\nset_cookie(\n    key,\n    value=\"\",\n    max_age=None,\n    expires=None,\n    path=\"/\",\n    domain=None,\n    secure=False,\n    httponly=False,\n    samesite=\"lax\",\n    partitioned=False,\n)\n```\n\nExample:\n```text\ndef set_cookie(\n    self,\n    key: str,\n    value: str = \"\",\n    max_age: int | None = None,\n    expires: datetime | str | int | None = None,\n    path: str | None = \"/\",\n    domain: str | None = None,\n    secure: bool = False,\n    httponly: bool = False,\n    samesite: Literal[\"lax\", \"strict\", \"none\"] | None = \"lax\",\n    partitioned: bool = False,\n) -> None:\n    cookie: http.cookies.BaseCookie[str] = http.cookies.SimpleCookie()\n    cookie[key] = value\n    if max_age is not None:\n        cookie[key][\"max-age\"] = max_age\n    if expires is not None:\n        if isinstance(expires, datetime):\n            cookie[key][\"expires\"] = format_datetime(expires, usegmt=True)\n        else:\n            cookie[key][\"expires\"] = expires\n    if path is not None:\n        cookie[key][\"path\"] = path\n    if domain is not None:\n        cookie[key][\"domain\"] = domain\n    if secure:\n        cookie[key][\"secure\"] = True\n    if httponly:\n        cookie[key][\"httponly\"] = True\n    if samesite is not None:\n        assert samesite.lower() in [\n            \"strict\",\n            \"lax\",\n            \"none\",\n        ], \"samesite must be either 'strict', 'lax' or 'none'\"\n        cookie[key][\"samesite\"] = samesite\n    if partitioned:\n        if sys.version_info < (3, 14):\n            raise ValueError(\"Partitioned cookies are only supported in Python 3.14 and above.\")  # pragma: no cover\n        cookie[key][\"partitioned\"] = True  # pragma: no cover\n\n    cookie_val = cookie.output(header=\"\").strip()\n    self.raw_headers.append((b\"set-cookie\", cookie_val.encode(\"latin-1\")))\n```\n\nExample:\n```text\ndelete_cookie(\n    key,\n    path=\"/\",\n    domain=None,\n    secure=False,\n    httponly=False,\n    samesite=\"lax\",\n)\n```\n\nExample:\n```text\ndef delete_cookie(\n    self,\n    key: str,\n    path: str = \"/\",\n    domain: str | None = None,\n    secure: bool = False,\n    httponly: bool = False,\n    samesite: Literal[\"lax\", \"strict\", \"none\"] | None = \"lax\",\n) -> None:\n    self.set_cookie(\n        key,\n        max_age=0,\n        expires=0,\n        path=path,\n        domain=domain,\n        secure=secure,\n        httponly=httponly,\n        samesite=samesite,\n    )\n```\n\nExample:\n```text\nORJSONResponse(\n    content,\n    status_code=200,\n    headers=None,\n    media_type=None,\n    background=None,\n)\n```\n\nExample:\n```text\ndef render(self, content: Any) -> bytes:\n    assert orjson is not None, \"orjson must be installed to use ORJSONResponse\"\n    return orjson.dumps(\n        content, option=orjson.OPT_NON_STR_KEYS | orjson.OPT_SERIALIZE_NUMPY\n    )\n```\n\nExample:\n```text\nFileResponse(\n    path,\n    status_code=200,\n    headers=None,\n    media_type=None,\n    background=None,\n    filename=None,\n    stat_result=None,\n    content_disposition_type=\"attachment\",\n)\n```\n\nExample:\n```text\ndef __init__(\n    self,\n    path: str | os.PathLike[str],\n    status_code: int = 200,\n    headers: Mapping[str, str] | None = None,\n    media_type: str | None = None,\n    background: BackgroundTask | None = None,\n    filename: str | None = None,\n    stat_result: os.stat_result | None = None,\n    content_disposition_type: str = \"attachment\",\n) -> None:\n    self.path = path\n    self.status_code = status_code\n    self.filename = filename\n    if media_type is None:\n        media_type = guess_type(filename or path)[0] or \"application/octet-stream\"\n    self.media_type = media_type\n    self.background = background\n    self.init_headers(headers)\n    self.headers.setdefault(\"accept-ranges\", \"bytes\")\n    if self.filename is not None:\n        content_disposition_filename = quote(self.filename)\n        if content_disposition_filename != self.filename:\n            content_disposition = f\"{content_disposition_type}; filename*=utf-8''{content_disposition_filename}\"\n        else:\n            content_disposition = f'{content_disposition_type}; filename=\"{self.filename}\"'\n        self.headers.setdefault(\"content-disposition\", content_disposition)\n    self.stat_result = stat_result\n    if stat_result is not None:\n        self.set_stat_headers(stat_result)\n```\n\nExample:\n```text\nchunk_size = 64 * 1024\n```\n\nExample:\n```text\nmedia_type = media_type\n```\n\nExample:\n```text\ndef render(self, content: Any) -> bytes | memoryview:\n    if content is None:\n        return b\"\"\n    if isinstance(content, bytes | memoryview):\n        return content\n    return content.encode(self.charset)  # type: ignore\n```\n\nExample:\n```text\nHTMLResponse(\n    content=None,\n    status_code=200,\n    headers=None,\n    media_type=None,\n    background=None,\n)\n```\n\nExample:\n```text\ndef __init__(\n    self,\n    content: Any = None,\n    status_code: int = 200,\n    headers: Mapping[str, str] | None = None,\n    media_type: str | None = None,\n    background: BackgroundTask | None = None,\n) -> None:\n    self.status_code = status_code\n    if media_type is not None:\n        self.media_type = media_type\n    self.background = background\n    self.body = self.render(content)\n    self.init_headers(headers)\n```\n\nExample:\n```text\nmedia_type = 'text/html'\n```\n\nExample:\n```text\nJSONResponse(\n    content,\n    status_code=200,\n    headers=None,\n    media_type=None,\n    background=None,\n)\n```\n\nExample:\n```text\ndef render(self, content: Any) -> bytes:\n    return json.dumps(\n        content,\n        ensure_ascii=False,\n        allow_nan=False,\n        indent=None,\n        separators=(\",\", \":\"),\n    ).encode(\"utf-8\")\n```\n\nExample:\n```text\nPlainTextResponse(\n    content=None,\n    status_code=200,\n    headers=None,\n    media_type=None,\n    background=None,\n)\n```\n\nExample:\n```text\nmedia_type = 'text/plain'\n```\n\nExample:\n```text\nRedirectResponse(\n    url, status_code=307, headers=None, background=None\n)\n```\n\nExample:\n```text\ndef __init__(\n    self,\n    url: str | URL,\n    status_code: int = 307,\n    headers: Mapping[str, str] | None = None,\n    background: BackgroundTask | None = None,\n) -> None:\n    super().__init__(content=b\"\", status_code=status_code, headers=headers, background=background)\n    self.headers[\"location\"] = quote(str(url), safe=\":/%#?=@[]!$&'()*+,;\")\n```\n\nExample:\n```text\nmedia_type = None\n```\n\nExample:\n```text\nResponse(\n    content=None,\n    status_code=200,\n    headers=None,\n    media_type=None,\n    background=None,\n)\n```\n\nExample:\n```text\nStreamingResponse(\n    content,\n    status_code=200,\n    headers=None,\n    media_type=None,\n    background=None,\n)\n```\n\nExample:\n```text\ndef __init__(\n    self,\n    content: ContentStream,\n    status_code: int = 200,\n    headers: Mapping[str, str] | None = None,\n    media_type: str | None = None,\n    background: BackgroundTask | None = None,\n) -> None:\n    if isinstance(content, AsyncIterable):\n        self.body_iterator = content\n    else:\n        self.body_iterator = iterate_in_threadpool(content)\n    self.status_code = status_code\n    self.media_type = self.media_type if media_type is None else media_type\n    self.background = background\n    self.init_headers(headers)\n```\n\nExample:\n```text\nbody_iterator\n```\n\nExample:\n```text\nmedia_type = (\n    media_type if media_type is None else media_type\n)\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:32.461Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":39,"totalLines":459,"estimatedTokens":2500}}191{"id":"doc-sql_relational_databases_fastapi-5b402114","source":"documentation","title":"SQL (Relational) Databases - FastAPI","url":"https://fastapi.tiangolo.com/tutorial/sql-databases/","text":"FastAPI SQL (Relational) Databases en - English de - Deutsch es - español fr - français hi - हिन्दी ja - 日本語 ko - 한국어 pt - português ru - русский язык tr - Türkçe uk - українська мова zh - 简体中文 zh-hant - 繁體中文 Search fastapi/fastapi FastAPI Features Learn Reference Resources About Release Notes\n\nExample:\n```text\n$ uv add sqlmodel\n---> 100%\n```\n\nExample:\n```text\nfrom typing import Annotated\n\nfrom fastapi import Depends, FastAPI, HTTPException, Query\nfrom sqlmodel import Field, Session, SQLModel, create_engine, select\n\n\nclass Hero(SQLModel, table=True):\n    id: int | None = Field(default=None, primary_key=True)\n    name: str = Field(index=True)\n    age: int | None = Field(default=None, index=True)\n    secret_name: str\n\n# Code below omitted 👇\n```\n\nExample:\n```text\nfrom typing import Annotated\n\nfrom fastapi import Depends, FastAPI, HTTPException, Query\nfrom sqlmodel import Field, Session, SQLModel, create_engine, select\n\n\nclass Hero(SQLModel, table=True):\n    id: int | None = Field(default=None, primary_key=True)\n    name: str = Field(index=True)\n    age: int | None = Field(default=None, index=True)\n    secret_name: str\n\n\nsqlite_file_name = \"database.db\"\nsqlite_url = f\"sqlite:///{sqlite_file_name}\"\n\nconnect_args = {\"check_same_thread\": False}\nengine = create_engine(sqlite_url, connect_args=connect_args)\n\n\ndef create_db_and_tables():\n    SQLModel.metadata.create_all(engine)\n\n\ndef get_session():\n    with Session(engine) as session:\n        yield session\n\n\nSessionDep = Annotated[Session, Depends(get_session)]\n\napp = FastAPI()\n\n\n@app.on_event(\"startup\")\ndef on_startup():\n    create_db_and_tables()\n\n\n@app.post(\"/heroes/\")\ndef create_hero(hero: Hero, session: SessionDep) -> Hero:\n    session.add(hero)\n    session.commit()\n    session.refresh(hero)\n    return hero\n\n\n@app.get(\"/heroes/\")\ndef read_heroes(\n    session: SessionDep,\n    offset: int = 0,\n    limit: Annotated[int, Query(le=100)] = 100,\n) -> list[Hero]:\n    heroes = session.exec(select(Hero).offset(offset).limit(limit)).all()\n    return heroes\n\n\n@app.get(\"/heroes/{hero_id}\")\ndef read_hero(hero_id: int, session: SessionDep) -> Hero:\n    hero = session.get(Hero, hero_id)\n    if not hero:\n        raise HTTPException(status_code=404, detail=\"Hero not found\")\n    return hero\n\n\n@app.delete(\"/heroes/{hero_id}\")\ndef delete_hero(hero_id: int, session: SessionDep):\n    hero = session.get(Hero, hero_id)\n    if not hero:\n        raise HTTPException(status_code=404, detail=\"Hero not found\")\n    session.delete(hero)\n    session.commit()\n    return {\"ok\": True}\n```\n\nExample:\n```text\nfrom fastapi import Depends, FastAPI, HTTPException, Query\nfrom sqlmodel import Field, Session, SQLModel, create_engine, select\n\n\nclass Hero(SQLModel, table=True):\n    id: int | None = Field(default=None, primary_key=True)\n    name: str = Field(index=True)\n    age: int | None = Field(default=None, index=True)\n    secret_name: str\n\n\nsqlite_file_name = \"database.db\"\nsqlite_url = f\"sqlite:///{sqlite_file_name}\"\n\nconnect_args = {\"check_same_thread\": False}\nengine = create_engine(sqlite_url, connect_args=connect_args)\n\n\ndef create_db_and_tables():\n    SQLModel.metadata.create_all(engine)\n\n\ndef get_session():\n    with Session(engine) as session:\n        yield session\n\n\napp = FastAPI()\n\n\n@app.on_event(\"startup\")\ndef on_startup():\n    create_db_and_tables()\n\n\n@app.post(\"/heroes/\")\ndef create_hero(hero: Hero, session: Session = Depends(get_session)) -> Hero:\n    session.add(hero)\n    session.commit()\n    session.refresh(hero)\n    return hero\n\n\n@app.get(\"/heroes/\")\ndef read_heroes(\n    session: Session = Depends(get_session),\n    offset: int = 0,\n    limit: int = Query(default=100, le=100),\n) -> list[Hero]:\n    heroes = session.exec(select(Hero).offset(offset).limit(limit)).all()\n    return heroes\n\n\n@app.get(\"/heroes/{hero_id}\")\ndef read_hero(hero_id: int, session: Session = Depends(get_session)) -> Hero:\n    hero = session.get(Hero, hero_id)\n    if not hero:\n        raise HTTPException(status_code=404, detail=\"Hero not found\")\n    return hero\n\n\n@app.delete(\"/heroes/{hero_id}\")\ndef delete_hero(hero_id: int, session: Session = Depends(get_session)):\n    hero = session.get(Hero, hero_id)\n    if not hero:\n        raise HTTPException(status_code=404, detail=\"Hero not found\")\n    session.delete(hero)\n    session.commit()\n    return {\"ok\": True}\n```\n\nExample:\n```text\n# Code above omitted 👆\n\nsqlite_file_name = \"database.db\"\nsqlite_url = f\"sqlite:///{sqlite_file_name}\"\n\nconnect_args = {\"check_same_thread\": False}\nengine = create_engine(sqlite_url, connect_args=connect_args)\n\n# Code below omitted 👇\n```\n\nExample:\n```text\n# Code above omitted 👆\n\ndef create_db_and_tables():\n    SQLModel.metadata.create_all(engine)\n\n# Code below omitted 👇\n```\n\nExample:\n```text\n# Code above omitted 👆\n\ndef get_session():\n    with Session(engine) as session:\n        yield session\n\n\nSessionDep = Annotated[Session, Depends(get_session)]\n\n# Code below omitted 👇\n```\n\nExample:\n```text\n# Code above omitted 👆\n\napp = FastAPI()\n\n\n@app.on_event(\"startup\")\ndef on_startup():\n    create_db_and_tables()\n\n# Code below omitted 👇\n```\n\nExample:\n```text\n# Code above omitted 👆\n\n@app.post(\"/heroes/\")\ndef create_hero(hero: Hero, session: SessionDep) -> Hero:\n    session.add(hero)\n    session.commit()\n    session.refresh(hero)\n    return hero\n\n# Code below omitted 👇\n```\n\nExample:\n```text\n# Code above omitted 👆\n\n@app.get(\"/heroes/\")\ndef read_heroes(\n    session: SessionDep,\n    offset: int = 0,\n    limit: Annotated[int, Query(le=100)] = 100,\n) -> list[Hero]:\n    heroes = session.exec(select(Hero).offset(offset).limit(limit)).all()\n    return heroes\n\n# Code below omitted 👇\n```\n\nExample:\n```text\n# Code above omitted 👆\n\n@app.get(\"/heroes/{hero_id}\")\ndef read_hero(hero_id: int, session: SessionDep) -> Hero:\n    hero = session.get(Hero, hero_id)\n    if not hero:\n        raise HTTPException(status_code=404, detail=\"Hero not found\")\n    return hero\n\n# Code below omitted 👇\n```\n\nExample:\n```text\n# Code above omitted 👆\n\n@app.delete(\"/heroes/{hero_id}\")\ndef delete_hero(hero_id: int, session: SessionDep):\n    hero = session.get(Hero, hero_id)\n    if not hero:\n        raise HTTPException(status_code=404, detail=\"Hero not found\")\n    session.delete(hero)\n    session.commit()\n    return {\"ok\": True}\n```\n\nExample:\n```text\n$ uv run fastapi dev\n\n<span style=\"color: green;\">INFO</span>:     Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)\n```\n\nExample:\n```text\n# Code above omitted 👆\n\nclass HeroBase(SQLModel):\n    name: str = Field(index=True)\n    age: int | None = Field(default=None, index=True)\n\n# Code below omitted 👇\n```\n\nExample:\n```text\nfrom typing import Annotated\n\nfrom fastapi import Depends, FastAPI, HTTPException, Query\nfrom sqlmodel import Field, Session, SQLModel, create_engine, select\n\n\nclass HeroBase(SQLModel):\n    name: str = Field(index=True)\n    age: int | None = Field(default=None, index=True)\n\n\nclass Hero(HeroBase, table=True):\n    id: int | None = Field(default=None, primary_key=True)\n    secret_name: str\n\n\nclass HeroPublic(HeroBase):\n    id: int\n\n\nclass HeroCreate(HeroBase):\n    secret_name: str\n\n\nclass HeroUpdate(HeroBase):\n    name: str | None = None\n    age: int | None = None\n    secret_name: str | None = None\n\n\nsqlite_file_name = \"database.db\"\nsqlite_url = f\"sqlite:///{sqlite_file_name}\"\n\nconnect_args = {\"check_same_thread\": False}\nengine = create_engine(sqlite_url, connect_args=connect_args)\n\n\ndef create_db_and_tables():\n    SQLModel.metadata.create_all(engine)\n\n\ndef get_session():\n    with Session(engine) as session:\n        yield session\n\n\nSessionDep = Annotated[Session, Depends(get_session)]\napp = FastAPI()\n\n\n@app.on_event(\"startup\")\ndef on_startup():\n    create_db_and_tables()\n\n\n@app.post(\"/heroes/\", response_model=HeroPublic)\ndef create_hero(hero: HeroCreate, session: SessionDep):\n    db_hero = Hero.model_validate(hero)\n    session.add(db_hero)\n    session.commit()\n    session.refresh(db_hero)\n    return db_hero\n\n\n@app.get(\"/heroes/\", response_model=list[HeroPublic])\ndef read_heroes(\n    session: SessionDep,\n    offset: int = 0,\n    limit: Annotated[int, Query(le=100)] = 100,\n):\n    heroes = session.exec(select(Hero).offset(offset).limit(limit)).all()\n    return heroes\n\n\n@app.get(\"/heroes/{hero_id}\", response_model=HeroPublic)\ndef read_hero(hero_id: int, session: SessionDep):\n    hero = session.get(Hero, hero_id)\n    if not hero:\n        raise HTTPException(status_code=404, detail=\"Hero not found\")\n    return hero\n\n\n@app.patch(\"/heroes/{hero_id}\", response_model=HeroPublic)\ndef update_hero(hero_id: int, hero: HeroUpdate, session: SessionDep):\n    hero_db = session.get(Hero, hero_id)\n    if not hero_db:\n        raise HTTPException(status_code=404, detail=\"Hero not found\")\n    hero_data = hero.model_dump(exclude_unset=True)\n    hero_db.sqlmodel_update(hero_data)\n    session.add(hero_db)\n    session.commit()\n    session.refresh(hero_db)\n    return hero_db\n\n\n@app.delete(\"/heroes/{hero_id}\")\ndef delete_hero(hero_id: int, session: SessionDep):\n    hero = session.get(Hero, hero_id)\n    if not hero:\n        raise HTTPException(status_code=404, detail=\"Hero not found\")\n    session.delete(hero)\n    session.commit()\n    return {\"ok\": True}\n```\n\nExample:\n```text\nfrom fastapi import Depends, FastAPI, HTTPException, Query\nfrom sqlmodel import Field, Session, SQLModel, create_engine, select\n\n\nclass HeroBase(SQLModel):\n    name: str = Field(index=True)\n    age: int | None = Field(default=None, index=True)\n\n\nclass Hero(HeroBase, table=True):\n    id: int | None = Field(default=None, primary_key=True)\n    secret_name: str\n\n\nclass HeroPublic(HeroBase):\n    id: int\n\n\nclass HeroCreate(HeroBase):\n    secret_name: str\n\n\nclass HeroUpdate(HeroBase):\n    name: str | None = None\n    age: int | None = None\n    secret_name: str | None = None\n\n\nsqlite_file_name = \"database.db\"\nsqlite_url = f\"sqlite:///{sqlite_file_name}\"\n\nconnect_args = {\"check_same_thread\": False}\nengine = create_engine(sqlite_url, connect_args=connect_args)\n\n\ndef create_db_and_tables():\n    SQLModel.metadata.create_all(engine)\n\n\ndef get_session():\n    with Session(engine) as session:\n        yield session\n\n\napp = FastAPI()\n\n\n@app.on_event(\"startup\")\ndef on_startup():\n    create_db_and_tables()\n\n\n@app.post(\"/heroes/\", response_model=HeroPublic)\ndef create_hero(hero: HeroCreate, session: Session = Depends(get_session)):\n    db_hero = Hero.model_validate(hero)\n    session.add(db_hero)\n    session.commit()\n    session.refresh(db_hero)\n    return db_hero\n\n\n@app.get(\"/heroes/\", response_model=list[HeroPublic])\ndef read_heroes(\n    session: Session = Depends(get_session),\n    offset: int = 0,\n    limit: int = Query(default=100, le=100),\n):\n    heroes = session.exec(select(Hero).offset(offset).limit(limit)).all()\n    return heroes\n\n\n@app.get(\"/heroes/{hero_id}\", response_model=HeroPublic)\ndef read_hero(hero_id: int, session: Session = Depends(get_session)):\n    hero = session.get(Hero, hero_id)\n    if not hero:\n        raise HTTPException(status_code=404, detail=\"Hero not found\")\n    return hero\n\n\n@app.patch(\"/heroes/{hero_id}\", response_model=HeroPublic)\ndef update_hero(\n    hero_id: int, hero: HeroUpdate, session: Session = Depends(get_session)\n):\n    hero_db = session.get(Hero, hero_id)\n    if not hero_db:\n        raise HTTPException(status_code=404, detail=\"Hero not found\")\n    hero_data = hero.model_dump(exclude_unset=True)\n    hero_db.sqlmodel_update(hero_data)\n    session.add(hero_db)\n    session.commit()\n    session.refresh(hero_db)\n    return hero_db\n\n\n@app.delete(\"/heroes/{hero_id}\")\ndef delete_hero(hero_id: int, session: Session = Depends(get_session)):\n    hero = session.get(Hero, hero_id)\n    if not hero:\n        raise HTTPException(status_code=404, detail=\"Hero not found\")\n    session.delete(hero)\n    session.commit()\n    return {\"ok\": True}\n```\n\nExample:\n```text\n# Code above omitted 👆\n\nclass HeroBase(SQLModel):\n    name: str = Field(index=True)\n    age: int | None = Field(default=None, index=True)\n\n\nclass Hero(HeroBase, table=True):\n    id: int | None = Field(default=None, primary_key=True)\n    secret_name: str\n\n# Code below omitted 👇\n```\n\nExample:\n```text\n# Code above omitted 👆\n\nclass HeroBase(SQLModel):\n    name: str = Field(index=True)\n    age: int | None = Field(default=None, index=True)\n\n\nclass Hero(HeroBase, table=True):\n    id: int | None = Field(default=None, primary_key=True)\n    secret_name: str\n\n\nclass HeroPublic(HeroBase):\n    id: int\n\n# Code below omitted 👇\n```\n\nExample:\n```text\n# Code above omitted 👆\n\nclass HeroBase(SQLModel):\n    name: str = Field(index=True)\n    age: int | None = Field(default=None, index=True)\n\n\nclass Hero(HeroBase, table=True):\n    id: int | None = Field(default=None, primary_key=True)\n    secret_name: str\n\n\nclass HeroPublic(HeroBase):\n    id: int\n\n\nclass HeroCreate(HeroBase):\n    secret_name: str\n\n# Code below omitted 👇\n```\n\nExample:\n```text\n# Code above omitted 👆\n\nclass HeroBase(SQLModel):\n    name: str = Field(index=True)\n    age: int | None = Field(default=None, index=True)\n\n\nclass Hero(HeroBase, table=True):\n    id: int | None = Field(default=None, primary_key=True)\n    secret_name: str\n\n\nclass HeroPublic(HeroBase):\n    id: int\n\n\nclass HeroCreate(HeroBase):\n    secret_name: str\n\n\nclass HeroUpdate(HeroBase):\n    name: str | None = None\n    age: int | None = None\n    secret_name: str | None = None\n\n# Code below omitted 👇\n```\n\nExample:\n```text\n# Code above omitted 👆\n\n@app.post(\"/heroes/\", response_model=HeroPublic)\ndef create_hero(hero: HeroCreate, session: SessionDep):\n    db_hero = Hero.model_validate(hero)\n    session.add(db_hero)\n    session.commit()\n    session.refresh(db_hero)\n    return db_hero\n\n# Code below omitted 👇\n```\n\nExample:\n```text\n# Code above omitted 👆\n\n@app.get(\"/heroes/\", response_model=list[HeroPublic])\ndef read_heroes(\n    session: SessionDep,\n    offset: int = 0,\n    limit: Annotated[int, Query(le=100)] = 100,\n):\n    heroes = session.exec(select(Hero).offset(offset).limit(limit)).all()\n    return heroes\n\n# Code below omitted 👇\n```\n\nExample:\n```text\n# Code above omitted 👆\n\n@app.get(\"/heroes/{hero_id}\", response_model=HeroPublic)\ndef read_hero(hero_id: int, session: SessionDep):\n    hero = session.get(Hero, hero_id)\n    if not hero:\n        raise HTTPException(status_code=404, detail=\"Hero not found\")\n    return hero\n\n# Code below omitted 👇\n```\n\nExample:\n```text\n# Code above omitted 👆\n\n@app.patch(\"/heroes/{hero_id}\", response_model=HeroPublic)\ndef update_hero(hero_id: int, hero: HeroUpdate, session: SessionDep):\n    hero_db = session.get(Hero, hero_id)\n    if not hero_db:\n        raise HTTPException(status_code=404, detail=\"Hero not found\")\n    hero_data = hero.model_dump(exclude_unset=True)\n    hero_db.sqlmodel_update(hero_data)\n    session.add(hero_db)\n    session.commit()\n    session.refresh(hero_db)\n    return hero_db\n\n# Code below omitted 👇\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:32.574Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":24,"totalLines":670,"estimatedTokens":3714}}192{"id":"doc-form_models_fastapi-934cf05f","source":"documentation","title":"Form Models - FastAPI","url":"https://fastapi.tiangolo.com/tutorial/request-form-models/","text":"FastAPI Form Models en - English de - Deutsch es - español fr - français hi - हिन्दी ja - 日本語 ko - 한국어 pt - português ru - русский язык tr - Türkçe uk - українська мова zh - 简体中文 zh-hant - 繁體中文 Search fastapi/fastapi FastAPI Features Learn Reference Resources About Release Notes\n\nExample:\n```text\n$ uv add python-multipart\n```\n\nExample:\n```text\nfrom typing import Annotated\n\nfrom fastapi import FastAPI, Form\nfrom pydantic import BaseModel\n\napp = FastAPI()\n\n\nclass FormData(BaseModel):\n    username: str\n    password: str\n\n\n@app.post(\"/login/\")\nasync def login(data: Annotated[FormData, Form()]):\n    return data\n```\n\nExample:\n```text\nfrom fastapi import FastAPI, Form\nfrom pydantic import BaseModel\n\napp = FastAPI()\n\n\nclass FormData(BaseModel):\n    username: str\n    password: str\n\n\n@app.post(\"/login/\")\nasync def login(data: FormData = Form()):\n    return data\n```\n\nExample:\n```text\nfrom typing import Annotated\n\nfrom fastapi import FastAPI, Form\nfrom pydantic import BaseModel\n\napp = FastAPI()\n\n\nclass FormData(BaseModel):\n    username: str\n    password: str\n    model_config = {\"extra\": \"forbid\"}\n\n\n@app.post(\"/login/\")\nasync def login(data: Annotated[FormData, Form()]):\n    return data\n```\n\nExample:\n```text\nfrom fastapi import FastAPI, Form\nfrom pydantic import BaseModel\n\napp = FastAPI()\n\n\nclass FormData(BaseModel):\n    username: str\n    password: str\n    model_config = {\"extra\": \"forbid\"}\n\n\n@app.post(\"/login/\")\nasync def login(data: FormData = Form()):\n    return data\n```\n\nExample:\n```text\n{\n    \"detail\": [\n        {\n            \"type\": \"extra_forbidden\",\n            \"loc\": [\"body\", \"extra\"],\n            \"msg\": \"Extra inputs are not permitted\",\n            \"input\": \"Mr. Poopybutthole\"\n        }\n    ]\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:32.604Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":6,"totalLines":100,"estimatedTokens":435}}193{"id":"doc-global_object_identification_graphql-5b31f4ea","source":"documentation","title":"Global Object Identification | GraphQL","url":"https://graphql.org/learn/global-object-identification/","text":"Example:\n```text\n{\n  node(id: \"4\") {\n    id\n    ... on User {\n      name\n    }\n  }\n}\n```\n\nExample:\n```text\n# An object with a Globally Unique ID\ninterface Node {\n  # The ID of the object.\n  id: ID!\n}\n```\n\nExample:\n```text\ntype User implements Node {\n  id: ID!\n  # Full name\n  name: String!\n}\n```\n\nExample:\n```text\n{\n  __type(name: \"Node\") {\n    name\n    kind\n    fields {\n      name\n      type {\n        kind\n        ofType {\n          name\n          kind\n        }\n      }\n    }\n  }\n}\n```\n\nExample:\n```text\n{\n  \"__type\": {\n    \"name\": \"Node\",\n    \"kind\": \"INTERFACE\",\n    \"fields\": [\n      {\n        \"name\": \"id\",\n        \"type\": {\n          \"kind\": \"NON_NULL\",\n          \"ofType\": {\n            \"name\": \"ID\",\n            \"kind\": \"SCALAR\"\n          }\n        }\n      }\n    ]\n  }\n}\n```\n\nExample:\n```text\n{\n  __schema {\n    queryType {\n      fields {\n        name\n        type {\n          name\n          kind\n        }\n        args {\n          name\n          type {\n            kind\n            ofType {\n              name\n              kind\n            }\n          }\n        }\n      }\n    }\n  }\n}\n```\n\nExample:\n```text\n{\n  \"__schema\": {\n    \"queryType\": {\n      \"fields\": [\n        // This array may have other entries\n        {\n          \"name\": \"node\",\n          \"type\": {\n            \"name\": \"Node\",\n            \"kind\": \"INTERFACE\"\n          },\n          \"args\": [\n            {\n              \"name\": \"id\",\n              \"type\": {\n                \"kind\": \"NON_NULL\",\n                \"ofType\": {\n                  \"name\": \"ID\",\n                  \"kind\": \"SCALAR\"\n                }\n              }\n            }\n          ]\n        }\n      ]\n    }\n  }\n}\n```\n\nExample:\n```text\n{\n  fourNode: node(id: \"4\") {\n    id\n    ... on User {\n      name\n      userWithIdOneGreater {\n        id\n        name\n      }\n    }\n  }\n  fiveNode: node(id: \"5\") {\n    id\n    ... on User {\n      name\n      userWithIdOneLess {\n        id\n        name\n      }\n    }\n  }\n}\n```\n\nExample:\n```text\n{\n  \"fourNode\": {\n    \"id\": \"4\",\n    \"name\": \"Mark Zuckerberg\",\n    \"userWithIdOneGreater\": {\n      \"id\": \"5\",\n      \"name\": \"Chris Hughes\"\n    }\n  },\n  \"fiveNode\": {\n    \"id\": \"5\",\n    \"name\": \"Chris Hughes\",\n    \"userWithIdOneLess\": {\n      \"id\": \"4\",\n      \"name\": \"Mark Zuckerberg\"\n    }\n  }\n}\n```\n\nExample:\n```text\n{\n  username(username: \"zuck\") {\n    id\n  }\n}\n```\n\nExample:\n```text\n{\n  \"username\": {\n    \"id\": \"4\"\n  }\n}\n```\n\nExample:\n```text\n{\n  usernames(usernames: [\"zuck\", \"moskov\"]) {\n    id\n  }\n}\n```\n\nExample:\n```text\n{\n  \"usernames\": [\n    {\n      \"id\": \"4\"\n    },\n    {\n      \"id\": \"6\"\n    }\n  ]\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:45.713Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":13,"totalLines":221,"estimatedTokens":650}}194{"id":"doc-metrics_reports_gitlab_docs-a6a02615","source":"documentation","title":"Metrics reports | GitLab Docs","url":"https://docs.gitlab.com/ci/testing/metrics_reports/","text":"Getting startedTutorialsManage your organizationOrganize work with projectsPlan and track workManage authentication and authorizationUse GitManage your codeUse CI/CD to build your applicationGetting startedTutorialsCI/CD YAML syntax referenceRunnersPipelinesJobsCI/CD componentsCI/CD inputsCI/CD variablesPipeline securityGitLab Secrets ManagerExternal secretsDebuggingAuto DevOpsTestingAccessibility testingBrowser performance testingCode coverageCode qualityFail fast testingLoad performance testingMetrics reportsTest casesUnit test reportsCI/CD sustainabilityGoogle Cloud integrationMigrate to GitLab CI/CDExternal repository integrationsMobile DevOpsSecure your applicationDeploy and release your applicationManage your infrastructureMonitor your applicationAnalyze GitLab usageRelease notesFeature supportFind your GitLab versionGitLab Docs /Use GitLab /Use CI/CD to build your … /Testing /Metrics reportsHelp us learn about your current experience with the documentation. Take the survey.Metrics , , GitLab Self-Managed, GitLab DedicatedMetrics reports display custom metrics in merge requests to track performance, memory usage, and other measurements between branches.Use metrics reports memory usage changes.Track load testing results.Measure code complexity.Compare code coverage statistics.Metrics processing workflowWhen a pipeline runs, GitLab reads metrics from the report artifact and stores them as string values for comparison. The default filename is metrics.txt.For a merge request, GitLab compares the metrics from the feature branch to the values from the target branch and displays them in the merge request widget in this metrics with changed values.Metrics added by the merge request (marked with a New badge).Metrics removed by the merge request (marked with a Removed badge).Existing metrics with unchanged values.Baseline pipeline selectionTo compare metrics between branches, GitLab identifies a baseline pipeline on the target branch using this for a pipeline on the target branch that matches these commit SHAs, in target branch tip at the time the merge request pipeline was created. This SHA is only available for merge request pipelines.The merge-base commit (the common ancestor of the source and target branches).The start commit of the merge request diff.Selects the most recently created pipeline (by pipeline ID) for the first SHA that has a matching pipeline.The baseline pipeline not filter by pipeline status. A pipeline in any state (success, failed, canceled, or skipped) can be selected as the baseline.Does not check whether the baseline pipeline has metrics report artifacts. If the baseline pipeline exists but has no metrics artifacts, all metrics from the feature branch are displayed as new.The metrics comparison widget appears only when the feature branch pipeline is in a completed state and has metrics report artifacts.The type of pipeline affects which commit SHA is matched request target branch tip SHA is usually available, so the baseline is typically the latest pipeline at the target branch tip when the merge request pipeline was created.Branch target branch tip SHA is not available, so the merge-base commit is used instead. The baseline is the latest pipeline on the target branch at the common ancestor commit.To ensure a baseline is always available for pipelines on your target branch that produce metrics report artifacts.If you use branch pipelines, ensure the merge-base commit has a pipeline on the target branch.Configure metrics reportsAdd metrics reports to your CI/CD pipeline to track custom metrics in merge requests.Prerequisites:The metrics file must use the OpenMetrics text format.To configure metrics your .gitlab-ci.yml file, add a job that generates a metrics report.Add a script to the job that generates metrics in OpenMetrics format.Configure the job to upload the metrics file with :metrics.For : echo 'memory_usage_bytes 2621440' > metrics.txt - echo 'response_time_seconds 0.234' >> metrics.txt - echo 'test_coverage_percent 87.5' >> metrics.txt - echo '# EOF' >> metrics.txt : the pipeline runs, the metrics reports display in the merge request widget.For additional format specifications and examples, see Prometheus text format details.TroubleshootingWhen working with metrics reports, you might encounter the following issues.Metrics reports did not changeYou might see Metrics report scanning detected no new changes when viewing metrics reports in merge requests.This issue occurs target branch doesn’t have a baseline metrics report for comparison.Your GitLab subscription doesn’t include metrics reports (Premium or Ultimate required).To resolve this your GitLab subscription tier includes metrics reports.Ensure the target branch has a pipeline with metrics reports configured. To ensure one is available, run pipelines on the target branch that produce metrics report artifacts.Verify that your metrics file uses valid OpenMetrics format.Metrics processing workflowBaseline pipeline selectionConfigure metrics reportsTroubleshootingMetrics reports did not change\n\nExample:\n```yaml\nmetrics:\n  stage: test\n  script:\n    - echo 'memory_usage_bytes 2621440' > metrics.txt\n    - echo 'response_time_seconds 0.234' >> metrics.txt\n    - echo 'test_coverage_percent 87.5' >> metrics.txt\n    - echo '# EOF' >> metrics.txt\n  artifacts:\n    reports:\n      metrics: metrics.txt\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:09.549Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":1,"totalLines":17,"estimatedTokens":1347}}195{"id":"doc-integrated_change_management_servicenow_gitlab_d-d16bc010","source":"documentation","title":"Integrated Change Management - ServiceNow | GitLab Docs","url":"https://docs.gitlab.com/solutions/components/integrated_servicenow/","text":"CloudCoding Languages and FrameworksIntegrationsSolution ComponentsDevSecOps workflow for mobile appsGitLab Application Security Workflow Integrated with SnykChange management with ServiceNowJira VSA IntegrationJira DORA IntegrationSecret DetectionOSS License CheckSecurity Metrics and KPIsDuo MetricsDuo WorkflowSeparations of Duties GuideGitLab Docs /Solutions /Solution Components /Change management with ServiceNowHelp us learn about your current experience with the documentation. Take the survey.Integrated Change Management - , , GitLab Self-Managed, GitLab DedicatedServiceNow version, Xanadu and backward compatibility with previous versionsThis document provides instructions and functional details for GitLab to orchestrate the change management with an integrated ServiceNow solution using ServiceNow DevOps Change Velocity.With the ServiceNow DevOps Change Velocity integration, you can track information about activity in GitLab repositories and CI/CD pipelines in ServiceNow.It automates the creation of change requests and automatically approves the change requests based on the policy criteria when it’s integrated with GitLab CI/CD pipelines.This document shows you how toIntegrate ServiceNow with GitLab with Change Velocity for change management,Create in the GitLab CI/CD pipeline automatically the change request in ServiceNow,Approve the change request in ServiceNow if it requires CAB review and approval,Start the production deployment based on the change request approval.Getting StartedDownload the Solution ComponentObtain the invitation code from your account team.Download the solution component from the solution component webstore by using your invitation code.Integration Options for Change ManagementThere are multiple ways to integrate GitLab with ServiceNow. The following options are provided in this solution DevOps Change Velocity for Built-in Change Request ProcessServiceNow DevOps Change Velocity with Custom Change Request with Velocity Container ImageServiceNow Rest API for custom Change Request ProcessServiceNow DevOps Change VelocityUpon installing and configuring DevOps Change Velocity from the ServiceNow store, enable change control through automated change creation in the DevOps Change Workspace directly.Built-in Change Request ProcessServiceNow DevOps Change Velocity provides a built-in change request model for the normal change process and the change request created automatically has default naming convention.The normal change process requires the change request to be approved before the deployment pipeline job to production can occur.Setup the Pipeline and Change Request JobsUse the gitlab-ci-workflow1.yml sample pipeline in the solution repository as a starting point. Check below for the steps to enable the automatic change creation and pass the change attributes through the pipeline.For more detailed instructions, see Automate DevOps change request creation.Below are the high-level the DevOps Change Workspace, navigate to the Change tab, then select Automate change.In the Application field, select the application that you want to associate with the pipeline for which you want to automate change request creation, and select Next.Select the pipeline that has the step (stage) from where you want to trigger the automated creation of change requests. For example, the change request creation step.Select the step in the pipeline from where you want to trigger the automated creation of a change request.Specify the change attributes in the change fields and enable change receipt by selecting the Change receipt option.Modify your pipeline and use the corresponding code snippet to enable change control and specify change attributes. For example, adding the following two configurations to the job that has change control : manual Pipeline with Change ManagementAfter the previous steps are completed, the project CD pipeline can incorporate the jobs illustrated in the gitlab-ci-workflow1.yml sample pipeline.To run a pipeline with Change ServiceNow, Change control is enabled for one of the stages in the pipeline.In GitLab, the pipeline job with the change control function runs.In ServiceNow, a change request is automatically created in ServiceNow.In ServiceNow, approve the change requestPipeline resumes and begins the next job for deploying to the production environment upon the approval of the change request.Custom Actions with Velocity Container ImageUse the ServiceNow custom actions via the DevOps Change Velocity Docker image to set Change Request title, description, change plan, rollback plan, and data related to artifacts to be deployed, and package registration. This allows you to customize the change request descriptions instead of passing the pipeline metadata as the change request description.Setup the Pipeline and Change Request JobsThis is an add-on to the ServiceNow DevOps Change Velocity, so the previous setup steps are the same. You just need to include the Docker image in the pipeline definition.Use the gitlab-ci-workflow2.yml sample pipeline in this repository as an example.Specify the image to use in the job. Update the image version as needed. /sndevops:5.0.0Use the CLI for specific actions. For example, to use the sndevops CLI to create a change requestsndevopscli create change -p { \"changeStepDetails\": { \"timeout\": 3600, \"interval\": 100 }, \"autoCloseChange\": true, \"attributes\": { \"short_description\": \"'\"${CHANGE_REQUEST_SHORT_DESCRIPTION}\"'\", \"description\": \"'\"${CHANGE_REQUEST_DESCRIPTION}\"'\", \"assignment_group\": \"'\"${ASSIGNMENT_GROUP_ID}\"'\", \"implementation_plan\": \"'\"${CR_IMPLEMENTATION_PLAN}\"'\", \"backout_plan\": \"'\"${CR_BACKOUT_PLAN}\"'\", \"test_plan\": \"'\"${CR_TEST_PLAN}\"'\" } }Run Pipeline with Custom Change ManagementUse the gitlab-ci-workflow2.yml sample pipeline as a starting point. After the previous steps are completed, the project CD pipeline can incorporate the jobs illustrated in the gitlab-ci-workflow2.yml sample pipeline.To run a pipeline with custom Change ServiceNow, change control is enabled for one of the stages in the pipeline.In GitLab, the pipeline job with the change control function runs.In ServiceNow, a change request is created with custom title, description, and any other fields supplied by the pipeline variable values using servicenowdocker/sndevops image.In GitLab, change request number and other information can be found in the pipeline details. The pipeline job will remain running until the change request is approved, then it will proceed to the next job.In ServiceNow, approve the change request.In GitLab, the Pipeline job resumes and begins the next job which is the deployment to the production environment upon the approval of the change request.Getting StartedDownload the Solution ComponentIntegration Options for Change ManagementServiceNow DevOps Change VelocityBuilt-in Change Request ProcessSetup the Pipeline and Change Request JobsRun Pipeline with Change ManagementCustom Actions with Velocity Container ImageSetup the Pipeline and Change Request JobsRun Pipeline with Custom Change Management\n\nExample:\n```yaml\nwhen: manual\n   allow_failure: false\n```\n\nExample:\n```yaml\nimage: servicenowdocker/sndevops:5.0.0\n```\n\nExample:\n```yaml\nsndevopscli create change -p {\n     \"changeStepDetails\": {\n       \"timeout\": 3600,\n       \"interval\": 100\n     },\n     \"autoCloseChange\": true,\n     \"attributes\": {\n       \"short_description\": \"'\"${CHANGE_REQUEST_SHORT_DESCRIPTION}\"'\",\n       \"description\": \"'\"${CHANGE_REQUEST_DESCRIPTION}\"'\",\n       \"assignment_group\": \"'\"${ASSIGNMENT_GROUP_ID}\"'\",\n       \"implementation_plan\": \"'\"${CR_IMPLEMENTATION_PLAN}\"'\",\n       \"backout_plan\": \"'\"${CR_BACKOUT_PLAN}\"'\",\n       \"test_plan\": \"'\"${CR_TEST_PLAN}\"'\"\n     }\n   }\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:09.596Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":3,"totalLines":33,"estimatedTokens":1938}}196{"id":"doc-gitlab_tutorial_guide_on_separation_of_duties_gi-793994b8","source":"documentation","title":"GitLab Tutorial Guide on Separation of Duties | GitLab Docs","url":"https://docs.gitlab.com/solutions/components/guide_on_sod/","text":"CloudCoding Languages and FrameworksIntegrationsSolution ComponentsDevSecOps workflow for mobile appsGitLab Application Security Workflow Integrated with SnykChange management with ServiceNowJira VSA IntegrationJira DORA IntegrationSecret DetectionOSS License CheckSecurity Metrics and KPIsDuo MetricsDuo WorkflowSeparations of Duties GuideGitLab Docs /Solutions /Solution Components /Separations of Duties GuideHelp us learn about your current experience with the documentation. Take the survey.GitLab Tutorial Guide on Separation of : GitLab.com, GitLab Self-Managed, GitLab DedicatedThis document provides an overview of GitLab Separation of Duties (SoD) solution through Role-Based Access Control (RBAC). The solution ensures compliance with security principles by preventing any single individual from having complete control over critical processes in the software development lifecycle.Getting StartedAccess the Solution ComponentObtain the invitation code from your account team.Access the solution component from the solution component webstore by using your invitation code.What is Separation of DutiesSeparation of Duties is a fundamental security principle that ensures no single individual has complete control over critical processes. In software development, SoD prevents unauthorized or accidental code releases into production environments by distributing responsibilities among different roles and teams.The GitLab approach to implementing SoD through Role-Based Access Control (RBAC) separation between development and deployment rolesProtected environments to control deployment accessProtected branches to prevent unauthorized code modificationsMerge request approval policies to enforce code reviewBuilt-in audit capabilities for compliance verificationKey Components of GitLab SoD SolutionRole-Based Access Control (RBAC)RBAC forms the framework for implementing and enforcing SoD. It governs permissions and responsibilities across the platform, ensuring compliance with the principles of least privilege. Through RBAC, organizations holistic user management with granular role-based controlsAssign roles with the least privileged access principlesMaintain visibility into roles and permissions through audit/reportingFeature Branch WorkflowThe feature branch workflow supports SoD by defining clear boundaries between development activities and production teams can modify code and trigger test pipelines in feature branchesSecurity teams manage approval policies for quality gatesMerge requests require independent review from non-authorsProtected Branches & EnvironmentsThe default branch plays a key role in enforcing environments restrict deployments to designated teamsDeployer teams have permission to execute deployments but are restricted from modifying source codeProtected branches prevent unauthorized merges and pushesAudit & Compliance CapabilitiesGitLab provides robust audit capabilities to support compliance generated release evidenceEvent logging for default branch activitiesPrerequisitesTo fully implement the GitLab SoD solution, organizations Ultimate LicenseProperly configured CI/CD pipelinesUser groups with a clear separation between development and deployment rolesAdditional ResourcesFor more information on GitLab SoD implementation, refer Role & Permissions DocumentationProtected Branches DocumentationProtected Environments DocumentationMerge Request Approvals DocumentationGetting StartedAccess the Solution ComponentWhat is Separation of DutiesKey Components of GitLab SoD SolutionRole-Based Access Control (RBAC)Feature Branch WorkflowProtected Branches & EnvironmentsAudit & Compliance CapabilitiesPrerequisitesAdditional Resources\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:09.619Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":0,"totalLines":3,"estimatedTokens":927}}197{"id":"doc-migrate_from_hardhat_2_hardhat_3-299d9cda","source":"documentation","title":"Migrate from Hardhat 2 | Hardhat 3","url":"https://hardhat.org/docs/migrate-from-hardhat2","text":"Example:\n```text\nnode --version\n```\n\nExample:\n```text\nnpx hardhat clean\n```\n\nExample:\n```text\npnpm hardhat clean\n```\n\nExample:\n```text\nyarn hardhat clean\n```\n\nExample:\n```text\nnpx installnpx why hardhat\n```\n\nExample:\n```text\npnpm installpnpm why hardhat\n```\n\nExample:\n```text\nyarn installyarn why hardhat\n```\n\nExample:\n```text\nmv hardhat.config.js hardhat.config.old.js\n```\n\nExample:\n```text\nnpm add --save-dev hardhat\n```\n\nExample:\n```text\npnpm add --save-dev hardhat\n```\n\nExample:\n```text\nyarn add --dev hardhat\n```\n\nExample:\n```text\nimport { defineConfig } from \"hardhat/config\";\nexport default defineConfig({});\n```\n\nExample:\n```text\nnpx hardhat --help\n```\n\nExample:\n```text\npnpm hardhat --help\n```\n\nExample:\n```text\nyarn hardhat --help\n```\n\nExample:\n```text\nimport { defineConfig } from \"hardhat/config\";\nexport default defineConfig({  solidity: {    /* your solidity config */  },});\n```\n\nExample:\n```text\nnpx hardhat build\n```\n\nExample:\n```text\npnpm hardhat build\n```\n\nExample:\n```text\nyarn hardhat build\n```\n\nExample:\n```text\nnpm add --save-dev @nomicfoundation/hardhat-toolbox-mocha-ethers\n```\n\nExample:\n```text\npnpm add --save-dev @nomicfoundation/hardhat-toolbox-mocha-ethers\n```\n\nExample:\n```text\nyarn add --dev @nomicfoundation/hardhat-toolbox-mocha-ethers\n```\n\nExample:\n```text\nimport { defineConfig } from \"hardhat/config\";import hardhatToolboxMochaEthers from \"@nomicfoundation/hardhat-toolbox-mocha-ethers\";\nexport default defineConfig({  plugins: [hardhatToolboxMochaEthers],  solidity: {    /* your solidity config */  },});\n```\n\nExample:\n```text\nnpx hardhat test test/some-test.ts\n```\n\nExample:\n```text\npnpm hardhat test test/some-test.ts\n```\n\nExample:\n```text\nyarn hardhat test test/some-test.ts\n```\n\nExample:\n```text\n// Hardhat 2task(\"accounts\", \"Prints the accounts\", async (taskArgs, hre) => {  const accounts = await hre.ethers.getSigners();  for (const account of accounts) {    console.log(account.address);  }});\n```\n\nExample:\n```text\nimport { defineConfig, task } from \"hardhat/config\";\nconst printAccounts = task(\"accounts\", \"Print the accounts\")  .setInlineAction(async (taskArguments, hre) => {    const { provider } = await hre.network.create();    console.log(await provider.request({ method: \"eth_accounts\" }));  })  .build();\nexport default defineConfig({  // ... rest of the config  tasks: [printAccounts],});\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:46.220Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":28,"totalLines":146,"estimatedTokens":591}}198{"id":"doc-writing_contracts_overview_hardhat_3-51201447","source":"documentation","title":"Writing contracts overview | Hardhat 3","url":"https://hardhat.org/docs/guides/writing-contracts","text":"Example:\n```text\n// SPDX-License-Identifier: UNLICENSEDpragma solidity ^0.8.0;\ncontract HelloWorld {  string public greet = \"Hello World!\";}\n```\n\nExample:\n```text\nnpx hardhat build\n```\n\nExample:\n```text\npnpm hardhat build\n```\n\nExample:\n```text\nyarn hardhat build\n```\n\nExample:\n```text\n// SPDX-License-Identifier: UNLICENSEDpragma solidity ^0.8.0;\nimport { BaseContract } from \"./BaseContract.sol\";\ncontract HelloWorld is BaseContract {  string public greet = \"Hello World!\";}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:46.230Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":5,"totalLines":29,"estimatedTokens":124}}199{"id":"doc-git_git_bugreport_documentation-539ecff3","source":"documentation","title":"Git - git-bugreport Documentation","url":"http://git-scm.com/docs/git-bugreport/zh_HANS-CN","text":"Example:\n```text\ngit bugreport [(-o | --output-directory) <path>]\n\t\t[(-s | --suffix) <格式> | --no-suffix]\n\t\t[--diagnose[=<模式>]]\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:37.295Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":1,"totalLines":8,"estimatedTokens":36}}200{"id":"doc-git_git_bugreport_documentation-f39fecb4","source":"documentation","title":"Git - git-bugreport Documentation","url":"http://git-scm.com/docs/git-bugreport/fr","text":"Example:\n```text\ngit bugreport [(-o | --output-directory) <chemin>]\n\t\t [(-s | --suffix) <format>] | --no-suffix]\n\t\t[--diagnose[=<mode>]]\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:37.295Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":1,"totalLines":8,"estimatedTokens":39}}201{"id":"doc-git_git_reset_documentation-8a786d47","source":"documentation","title":"Git - git-reset Documentation","url":"http://git-scm.com/docs/git-reset/uk","text":"Example:\n```text\ngitreset--soft--mixed-N--hard--merge--keep-qgitreset-q--gitreset-q--pathspec-from-file=--pathspec-file-nulgitreset--patch-p--\n```\n\nExample:\n```text\n$ edit                                     (1)\n$ git add frotz.c filfre.c\n$ mailx                                    (2)\n$ git reset                                (3)\n$ git pull git://info.example.com/ nitfol  (4)\n```\n\nExample:\n```text\n$ git commit ...\n$ git reset --soft HEAD^      (1)\n$ edit                        (2)\n$ git commit -a -c ORIG_HEAD  (3)\n```\n\nExample:\n```text\n$ git branch topic/wip          (1)\n$ git reset --hard HEAD~3       (2)\n$ git switch topic/wip          (3)\n```\n\nExample:\n```text\n$ git commit ...\n$ git reset --hard HEAD~3   (1)\n```\n\nExample:\n```text\n$ git pull                         (1)\nАвтоматичне об'єднання нітфолів\nКОНФЛІКТ (контент): Конфлікт злиття в nitfol\nАвтоматичне злиття не вдалося; виправте конфлікти та зафіксуйте результат.\n$ git reset --hard                 (2)\n$ git pull . topic/branch          (3)\nОновлення з 41223... до 13134...\nПеремотка вперед\n$ git reset --hard ORIG_HEAD       (4)\n```\n\nExample:\n```text\n$ git pull                         (1)\nАвтоматичне об'єднання nitfol\nОб'єднання, виконане рекурсивним способом.\n nitfol                |   20 +++++----\n ...\n$ git reset --merge ORIG_HEAD      (2)\n```\n\nExample:\n```text\n$ git switch feature  ;# ви працювали в гілці \"feature\" і\n$ work work work      ;# вас перервали\n$ git commit -a -m \"snapshot WIP\"                 (1)\n$ git switch master\n$ fix fix fix\n$ git commit ;# коміт з реальним логом\n$ git switch feature\n$ git reset --soft HEAD^ ;# повернення до WIP     (2)\n$ git reset                                       (3)\n```\n\nExample:\n```text\n$ git reset -- frotz.c                      (1)\n$ git commit -m \"Зафіксувати файли в індексі\"     (2)\n$ git add frotz.c                           (3)\n```\n\nExample:\n```text\n$ git tag start\n$ git switch -c branch1\n$ edit\n$ git commit ...                            (1)\n$ edit\n$ git switch -c branch2                     (2)\n$ git reset --keep start                    (3)\n```\n\nExample:\n```text\n$ git reset -N HEAD^                        (1)\n$ git add -p                                (2)\n$ git diff --cached                         (3)\n$ git commit -c HEAD@{1}                    (4)\n...                                         (5)\n$ git add ...                               (6)\n$ git diff --cached                         (7)\n$ git commit ...                            (8)\n```\n\nExample:\n```text\ngit reset --option target\n```\n\nExample:\n```text\nробочий індекс HEAD цільовий робочий індекс HEAD\n----------------------------------------------------\n A       B     C    D     --soft   A       B     D\n\t\t\t  --mixed  A       D     D\n\t\t\t  --hard   D       D     D\n\t\t\t  --merge (заборонено)\n\t\t\t  --keep  (заборонено)\n```\n\nExample:\n```text\nробочий індекс HEAD цільовий робочий індекс HEAD\n----------------------------------------------------\n A       B     C    C     --soft   A       B     C\n\t\t\t  --mixed  A       C     C\n\t\t\t  --hard   C       C     C\n\t\t\t  --merge (заборонено)\n\t\t\t  --keep   A       C     C\n```\n\nExample:\n```text\nробочий індекс HEAD цільовий робочий індекс HEAD\n----------------------------------------------------\n B       B     C    D     --soft   B       B     D\n\t\t\t  --mixed  B       D     D\n\t\t\t  --hard   D       D     D\n\t\t\t  --merge  D       D     D\n\t\t\t  --keep  (заборонено)\n```\n\nExample:\n```text\nробочий індекс HEAD цільовий робочий індекс HEAD\n----------------------------------------------------\n B       B     C    C     --soft   B       B     C\n\t\t\t  --mixed  B       C     C\n\t\t\t  --hard   C       C     C\n\t\t\t  --merge  C       C     C\n\t\t\t  --keep   B       C     C\n```\n\nExample:\n```text\nробочий індекс HEAD цільовий робочий індекс HEAD\n----------------------------------------------------\n B       C     C    D     --soft   B       C     D\n\t\t\t  --mixed  B       D     D\n\t\t\t  --hard   D       D     D\n\t\t\t  --merge (заборонено)\n\t\t\t  --keep  (заборонено)\n```\n\nExample:\n```text\nробочий індекс HEAD цільовий робочий індекс HEAD\n----------------------------------------------------\n B       C     C    C     --soft   B       C     C\n\t\t\t  --mixed  B       C     C\n\t\t\t  --hard   C       C     C\n\t\t\t  --merge  B       C     C\n\t\t\t  --keep   B       C     C\n```\n\nExample:\n```text\nробочий індекс HEAD цільовий робочий індекс HEAD\n----------------------------------------------------\n X       U     A    B     --soft  (заборонено)\n\t\t\t  --mixed  X       B     B\n\t\t\t  --hard   B       B     B\n\t\t\t  --merge  B       B     B\n\t\t\t  --keep  (заборонено)\n```\n\nExample:\n```text\nробочий індекс HEAD цільовий робочий індекс HEAD\n----------------------------------------------------\n X       U     A    A     --soft  (заборонено)\n\t\t\t  --mixed  X       A     A\n\t\t\t  --hard   A       A     A\n\t\t\t  --merge  A       A     A\n\t\t\t  --keep  (заборонено)\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:37.391Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":20,"totalLines":195,"estimatedTokens":1220}}202{"id":"doc-istio_traffic_management-5dbc9403","source":"documentation","title":"Istio / Traffic Management","url":"https://istio.io/latest/docs/concepts/traffic-management/","text":"Example:\n```yaml\napiVersion: networking.istio.io/v1\nkind: VirtualService\nmetadata:\n  name: reviews\nspec:\n  hosts:\n  - reviews\n  http:\n  - match:\n    - headers:\n        end-user:\n          exact: jason\n    route:\n    - destination:\n        host: reviews\n        subset: v2\n  - route:\n    - destination:\n        host: reviews\n        subset: v3\n```\n\nExample:\n```yaml\nhosts:\n- reviews\n```\n\nExample:\n```yaml\n- match:\n   - headers:\n       end-user:\n         exact: jason\n```\n\nExample:\n```yaml\nroute:\n- destination:\n    host: reviews\n    subset: v2\n```\n\nExample:\n```yaml\n- route:\n  - destination:\n      host: reviews\n      subset: v3\n```\n\nExample:\n```yaml\napiVersion: networking.istio.io/v1\nkind: VirtualService\nmetadata:\n  name: bookinfo\nspec:\n  hosts:\n    - bookinfo.com\n  http:\n  - match:\n    - uri:\n        prefix: /reviews\n    route:\n    - destination:\n        host: reviews\n  - match:\n    - uri:\n        prefix: /ratings\n    route:\n    - destination:\n        host: ratings\n```\n\nExample:\n```yaml\nspec:\n  hosts:\n  - reviews\n  http:\n  - route:\n    - destination:\n        host: reviews\n        subset: v1\n      weight: 75\n    - destination:\n        host: reviews\n        subset: v2\n      weight: 25\n```\n\nExample:\n```yaml\napiVersion: networking.istio.io/v1\nkind: DestinationRule\nmetadata:\n  name: my-destination-rule\nspec:\n  host: my-svc\n  trafficPolicy:\n    loadBalancer:\n      simple: RANDOM\n  subsets:\n  - name: v1\n    labels:\n      version: v1\n  - name: v2\n    labels:\n      version: v2\n    trafficPolicy:\n      loadBalancer:\n        simple: ROUND_ROBIN\n  - name: v3\n    labels:\n      version: v3\n```\n\nExample:\n```yaml\napiVersion: networking.istio.io/v1\nkind: Gateway\nmetadata:\n  name: ext-host-gwy\nspec:\n  selector:\n    app: my-gateway-controller\n  servers:\n  - port:\n      number: 443\n      name: https\n      protocol: HTTPS\n    hosts:\n    - ext-host.example.com\n    tls:\n      mode: SIMPLE\n      credentialName: ext-host-cert\n```\n\nExample:\n```yaml\napiVersion: networking.istio.io/v1\nkind: VirtualService\nmetadata:\n  name: virtual-svc\nspec:\n  hosts:\n  - ext-host.example.com\n  gateways:\n  - ext-host-gwy\n```\n\nExample:\n```yaml\napiVersion: networking.istio.io/v1\nkind: ServiceEntry\nmetadata:\n  name: svc-entry\nspec:\n  hosts:\n  - ext-svc.example.com\n  ports:\n  - number: 443\n    name: https\n    protocol: HTTPS\n  location: MESH_EXTERNAL\n  resolution: DNS\n```\n\nExample:\n```yaml\napiVersion: networking.istio.io/v1\nkind: DestinationRule\nmetadata:\n  name: ext-res-dr\nspec:\n  host: ext-svc.example.com\n  trafficPolicy:\n    connectionPool:\n      tcp:\n        connectTimeout: 1s\n```\n\nExample:\n```yaml\napiVersion: networking.istio.io/v1\nkind: Sidecar\nmetadata:\n  name: default\n  namespace: bookinfo\nspec:\n  egress:\n  - hosts:\n    - \"./*\"\n    - \"istio-system/*\"\n```\n\nExample:\n```yaml\napiVersion: networking.istio.io/v1\nkind: VirtualService\nmetadata:\n  name: ratings\nspec:\n  hosts:\n  - ratings\n  http:\n  - route:\n    - destination:\n        host: ratings\n        subset: v1\n    timeout: 10s\n```\n\nExample:\n```yaml\napiVersion: networking.istio.io/v1\nkind: VirtualService\nmetadata:\n  name: ratings\nspec:\n  hosts:\n  - ratings\n  http:\n  - route:\n    - destination:\n        host: ratings\n        subset: v1\n    retries:\n      attempts: 3\n      perTryTimeout: 2s\n```\n\nExample:\n```yaml\napiVersion: networking.istio.io/v1\nkind: DestinationRule\nmetadata:\n  name: reviews\nspec:\n  host: reviews\n  subsets:\n  - name: v1\n    labels:\n      version: v1\n    trafficPolicy:\n      connectionPool:\n        tcp:\n          maxConnections: 100\n```\n\nExample:\n```yaml\napiVersion: networking.istio.io/v1\nkind: VirtualService\nmetadata:\n  name: ratings\nspec:\n  hosts:\n  - ratings\n  http:\n  - fault:\n      delay:\n        percentage:\n          value: 0.1\n        fixedDelay: 5s\n    route:\n    - destination:\n        host: ratings\n        subset: v1\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:46.922Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":17,"totalLines":276,"estimatedTokens":956}}203{"id":"doc-frequently_asked_questions_faq_the_go_programmin-a442fae7","source":"documentation","title":"Frequently Asked Questions (FAQ) - The Go Programming Language","url":"https://go.dev/doc/faq","text":"go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic. Learn more. Okay\n\nExample:\n```text\ntype T struct{}\nvar _ I = T{}       // Verify that T implements I.\nvar _ I = (*T)(nil) // Verify that *T implements I.\n```\n\nExample:\n```text\ntype Fooer interface {\n    Foo()\n    ImplementsFooer()\n}\n```\n\nExample:\n```text\ntype Bar struct{}\nfunc (b Bar) ImplementsFooer() {}\nfunc (b Bar) Foo() {}\n```\n\nExample:\n```text\ntype Equaler interface {\n    Equal(Equaler) bool\n}\n```\n\nExample:\n```text\ntype T int\nfunc (t T) Equal(u T) bool { return t == u } // does not satisfy Equaler\n```\n\nExample:\n```text\ntype T2 int\nfunc (t T2) Equal(u Equaler) bool { return t == u.(T2) }  // satisfies Equaler\n```\n\nExample:\n```text\ntype Opener interface {\n   Open() Reader\n}\n\nfunc (t T3) Open() *os.File\n```\n\nExample:\n```text\nt := []int{1, 2, 3, 4}\ns := make([]interface{}, len(t))\nfor i, v := range t {\n    s[i] = v\n}\n```\n\nExample:\n```text\ntype T1 int\ntype T2 int\nvar t1 T1\nvar x = T2(t1) // OK\nvar st1 []T1\nvar sx = ([]T2)(st1) // NOT OK\n```\n\nExample:\n```text\nfunc returnsError() error {\n    var p *MyError = nil\n    if bad() {\n        p = ErrBad\n    }\n    return p // Will always return a non-nil error.\n}\n```\n\nExample:\n```text\nfunc returnsError() error {\n    if bad() {\n        return ErrBad\n    }\n    return nil\n}\n```\n\nExample:\n```text\nfunc main() {\n    type S struct {\n        f1 byte\n        f2 struct{}\n    }\n    fmt.Println(unsafe.Sizeof(S{}))\n}\n```\n\nExample:\n```text\ntype Copyable interface {\n    Copy() interface{}\n}\n```\n\nExample:\n```text\nfunc (v Value) Copy() Value\n```\n\nExample:\n```text\nsqrt2 := math.Sqrt(2)\n```\n\nExample:\n```text\nmachine github.com login *USERNAME* password *APIKEY*\n```\n\nExample:\n```text\n[url \"ssh://git@github.com/\"]\n    insteadOf = https://github.com/\n```\n\nExample:\n```text\ngo mod init example/project\n```\n\nExample:\n```text\ngo get golang.org/x/text@v0.3.5\n```\n\nExample:\n```text\nvar w io.Writer\n```\n\nExample:\n```text\nfmt.Fprintf(w, \"hello, world\\n\")\n```\n\nExample:\n```text\nfmt.Fprintf(&w, \"hello, world\\n\") // Compile-time error.\n```\n\nExample:\n```text\nfunc (s *MyStruct) pointerMethod() { } // method on pointer\nfunc (s MyStruct)  valueMethod()   { } // method on value\n```\n\nExample:\n```text\nvar foo float32 = 3.0\n```\n\nExample:\n```text\nvar buf bytes.Buffer\nio.Copy(buf, os.Stdin)\n```\n\nExample:\n```text\nfunc main() {\n    done := make(chan bool)\n\n    values := []string{\"a\", \"b\", \"c\"}\n    for _, v := range values {\n        go func() {\n            fmt.Println(v)\n            done <- true\n        }()\n    }\n\n    // wait for all goroutines to complete before exiting\n    for _ = range values {\n        <-done\n    }\n}\n```\n\nExample:\n```text\nfor _, v := range values {\n        go func(u string) {\n            fmt.Println(u)\n            done <- true\n        }(v)\n    }\n```\n\nExample:\n```text\nfor _, v := range values {\n        v := v // create a new 'v'.\n        go func() {\n            fmt.Println(v)\n            done <- true\n        }()\n    }\n```\n\nExample:\n```text\nif expr {\n    n = trueVal\n} else {\n    n = falseVal\n}\n```\n\nExample:\n```text\na, b = w < x, y > (z)\n```\n\nExample:\n```text\ntype Empty struct{}\n\nfunc (Empty) Nop[T any](x T) T {\n    return x\n}\n```\n\nExample:\n```text\nfunc TryNops(x any) {\n    if x, ok := x.(interface{ Nop(string) string }); ok {\n        fmt.Printf(\"string %s\\n\", x.Nop(\"hello\"))\n    }\n    if x, ok := x.(interface{ Nop(int) int }); ok {\n        fmt.Printf(\"int %d\\n\", x.Nop(42))\n    }\n    if x, ok := x.(interface{ Nop(io.Reader) io.Reader }); ok {\n        data, err := io.ReadAll(x.Nop(strings.NewReader(\"hello world\")))\n        fmt.Printf(\"reader %q %v\\n\", data, err)\n    }\n}\n```\n\nExample:\n```text\ntype S[T any] struct { f T }\n\nfunc (s S[string]) Add(t string) string {\n    return s.f + t\n}\n```\n\nExample:\n```text\nfunc TestFoo(t *testing.T) {\n    ...\n}\n```\n\nExample:\n```text\nimport \"unused\"\n\n// This declaration marks the import as used by referencing an\n// item from the package.\nvar _ = unused.Item  // TODO: Delete before committing!\n\nfunc main() {\n    debugData := debug.Profile()\n    _ = debugData // Used only during debugging.\n    ....\n}\n```\n\nExample:\n```text\nint* a, b;\n```\n\nExample:\n```text\nvar a, b *int\n```\n\nExample:\n```text\nvar a uint64 = 1\n```\n\nExample:\n```text\na := uint64(1)\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:45.522Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":39,"totalLines":305,"estimatedTokens":1070}}204{"id":"doc-rubydoc_info_documentation_for_grpc_1_83_0_rubyd-aa4e907c","source":"documentation","title":"RubyDoc.info: Documentation for grpc (1.83.0) – RubyDoc.info","url":"https://grpc.io/docs/languages/ruby/api/","text":"Libraries » grpc (1.83.0) » Documentation for grpc (1.83.0) Alphabetic Index Namespace Listing A-Z Top Level Namespace A Aborted (GRPC) ActiveCall (GRPC) AlreadyExists (GRPC) Args AssertionError B BadStatus (GRPC) BatchResult (Struct) BidiCall (GRPC) BidiService BlockingEnumerator C Calculator CallCredentials (GRPC::Core) CallCredentialsHelper (GRPC::Core) Cancelled (GRPC) ChannelCredentials (GRPC::Core) ChannelCredentialsComposable (GRPC::Core) CheckCallAfterFinishedService Checker (Grpc::Health) ClientInterceptor (GRPC) ClientStub (GRPC) CompositeCallCredentials (GRPC::Core) CompositeChannelCredentials (GRPC::Core) CompositeCredentialsHandler (GRPC::Core) ConfigureTarget Core (GRPC) D DataLoss (GRPC) DeadlineExceeded (GRPC) DebugIsTruncated DebugMessageTestService DefaultLogger (GRPC) DescendantError (GRPC::InterceptorRegistry) Dsl (GRPC::GenericService) Duplicate (Grpc::Testing) DuplicateRpcName (GRPC::GenericService) E EchoMsg EchoService EchoTestService (Grpc::Testing::Duplicate) EmptyService EncodeDecodeMsg EnumeratorQueue F FailedPrecondition (GRPC) FailingService Fibber FullDuplexEnumerator G GRPC GenericService (GRPC) GoodMsg GoogleRpcStatusTestService GoogleRpcStatusUtils (GRPC) Grpc H Health (Grpc::Health::V1) Health (Grpc) Helpers (GRPC::Spec) HookService (Grpc::Testing) I InterceptionContext (GRPC) Interceptor (GRPC) InterceptorRegistry (GRPC) Internal (GRPC) InvalidArgument (GRPC) L LoadBalancerStatsService (Grpc::Testing) M Math (Math) Math MetricsService (Grpc::Testing) N NamedTests NoProto NoProtoMsg NoProtoService NoRpcImplementation NoStatusDetailsBinTestService NoopLogger (GRPC::DefaultLogger) NotFound (GRPC) Notifier (GRPC) O Ok (GRPC) OutOfRange (GRPC) P PermissionDenied (GRPC) PingPongPlayer Pool (GRPC) R ReconnectService (Grpc::Testing) ResourceExhausted (GRPC) RpcConfig RpcDesc (GRPC) RpcServer (GRPC) RubyLogger S ServerInterceptor (GRPC) Service (Grpc::Testing::MetricsService) Service (Math::Math) Service (Grpc::Testing::LoadBalancerStatsService) Service (Grpc::Testing::XdsUpdateHealthService) Service (Grpc::Testing::XdsUpdateClientConfigureService) Service (Grpc::Testing::Duplicate::EchoTestService) Service (Grpc::Testing::UnimplementedService) Service (Grpc::Testing::TestService) Service (Grpc::Testing::ReconnectService) Service (Grpc::Testing::HookService) Service (Grpc::Health::V1::Health) SlowService Spec (GRPC) SslTestService StatsPerMethod StatusCodes (GRPC::Core) StdoutLogger Stream (GRPC::RpcDesc) Struct SynchronizedCancellationService T TestClientInterceptor TestServerInterceptor TestService (Grpc::Testing) TestTarget Testing (Grpc) TimeConsts (GRPC::Core) U Unauthenticated (GRPC) Unavailable (GRPC) Unimplemented (GRPC) UnimplementedService (Grpc::Testing) Unknown (GRPC) UserAgentEchoService V V1 (Grpc::Health) W WriteFlagSettingStreamingInputEnumerable X XdsChannelCredentials (GRPC::Core) XdsUpdateClientConfigureService (Grpc::Testing) XdsUpdateHealthService (Grpc::Testing) Generated on Wed Jul 29 :27 2026 by yard 0.9.44 (ruby-4.0.6).\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:45.877Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":0,"totalLines":3,"estimatedTokens":760}}205{"id":"doc-issues_api_gitlab_docs-f31e3004","source":"documentation","title":"Issues API | GitLab Docs","url":"https://docs.gitlab.com/api/issues/","text":"Example:\n```plaintext\nGET /issues\nGET /issues?assignee_id=5\nGET /issues?author_id=5\nGET /issues?confidential=true\nGET /issues?iids[]=42&iids[]=43\nGET /issues?labels=foo\nGET /issues?labels=foo,bar\nGET /issues?labels=foo,bar&state=opened\nGET /issues?milestone=1.0.0\nGET /issues?milestone=1.0.0&state=opened\nGET /issues?my_reaction_emoji=star\nGET /issues?search=foo&in=title\nGET /issues?state=closed\nGET /issues?state=opened\n```\n\nExample:\n```shell\ncurl --header \"PRIVATE-TOKEN: <your_access_token>\" \\\n  --url \"https://gitlab.example.com/api/v4/issues\"\n```\n\nExample:\n```json\n[\n   {\n      \"state\" : \"opened\",\n      \"description\" : \"Ratione dolores corrupti mollitia soluta quia.\",\n      \"author\" : {\n         \"state\" : \"active\",\n         \"id\" : 18,\n         \"web_url\" : \"https://gitlab.example.com/eileen.lowe\",\n         \"name\" : \"Alexandra Bashirian\",\n         \"avatar_url\" : null,\n         \"username\" : \"eileen.lowe\"\n      },\n      \"milestone\" : {\n         \"project_id\" : 1,\n         \"description\" : \"Ducimus nam enim ex consequatur cumque ratione.\",\n         \"state\" : \"closed\",\n         \"due_date\" : null,\n         \"iid\" : 2,\n         \"created_at\" : \"2016-01-04T15:31:39.996Z\",\n         \"title\" : \"v4.0\",\n         \"id\" : 17,\n         \"updated_at\" : \"2016-01-04T15:31:39.996Z\"\n      },\n      \"project_id\" : 1,\n      \"assignees\" : [{\n         \"state\" : \"active\",\n         \"id\" : 1,\n         \"name\" : \"Administrator\",\n         \"web_url\" : \"https://gitlab.example.com/root\",\n         \"avatar_url\" : null,\n         \"username\" : \"root\"\n      }],\n      \"assignee\" : {\n         \"state\" : \"active\",\n         \"id\" : 1,\n         \"name\" : \"Administrator\",\n         \"web_url\" : \"https://gitlab.example.com/root\",\n         \"avatar_url\" : null,\n         \"username\" : \"root\"\n      },\n      \"type\" : \"ISSUE\",\n      \"updated_at\" : \"2016-01-04T15:31:51.081Z\",\n      \"closed_at\" : null,\n      \"closed_by\" : null,\n      \"id\" : 76,\n      \"title\" : \"Consequatur vero maxime deserunt laboriosam est voluptas dolorem.\",\n      \"created_at\" : \"2016-01-04T15:31:51.081Z\",\n      \"moved_to_id\" : null,\n      \"iid\" : 6,\n      \"labels\" : [\"foo\", \"bar\"],\n      \"upvotes\": 4,\n      \"downvotes\": 0,\n      \"merge_requests_count\": 0,\n      \"user_notes_count\": 1,\n      \"start_date\": null,\n      \"due_date\": \"2016-07-22\",\n      \"imported\":false,\n      \"imported_from\": \"none\",\n      \"web_url\": \"http://gitlab.example.com/my-group/my-project/issues/6\",\n      \"references\": {\n        \"short\": \"#6\",\n        \"relative\": \"my-group/my-project#6\",\n        \"full\": \"my-group/my-project#6\"\n      },\n      \"time_stats\": {\n         \"time_estimate\": 0,\n         \"total_time_spent\": 0,\n         \"human_time_estimate\": null,\n         \"human_total_time_spent\": null\n      },\n      \"has_tasks\": true,\n      \"task_status\": \"10 of 15 tasks completed\",\n      \"confidential\": false,\n      \"discussion_locked\": false,\n      \"issue_type\": \"issue\",\n      \"severity\": \"UNKNOWN\",\n      \"_links\":{\n         \"self\":\"http://gitlab.example.com/api/v4/projects/1/issues/76\",\n         \"notes\":\"http://gitlab.example.com/api/v4/projects/1/issues/76/notes\",\n         \"award_emoji\":\"http://gitlab.example.com/api/v4/projects/1/issues/76/award_emoji\",\n         \"project\":\"http://gitlab.example.com/api/v4/projects/1\",\n         \"closed_as_duplicate_of\": \"http://gitlab.example.com/api/v4/projects/1/issues/75\"\n      },\n      \"task_completion_status\":{\n         \"count\":0,\n         \"completed_count\":0\n      }\n   }\n]\n```\n\nExample:\n```json\n[\n   {\n      \"state\" : \"opened\",\n      \"description\" : \"Ratione dolores corrupti mollitia soluta quia.\",\n      \"weight\": null,\n      ...\n   }\n]\n```\n\nExample:\n```json\n{\n   \"project_id\" : 4,\n   \"description\" : \"Omnis vero earum sunt corporis dolor et placeat.\",\n   \"epic_iid\" : 5, //deprecated, use `iid` of the `epic` attribute\n   \"epic\": {\n     \"id\" : 42,\n     \"iid\" : 5,\n     \"title\": \"My epic epic\",\n     \"url\" : \"/groups/h5bp/-/epics/5\",\n     \"group_id\": 8\n   },\n   ...\n}\n```\n\nExample:\n```json\n{\n   \"iteration\": {\n      \"id\":90,\n      \"iid\":4,\n      \"sequence\":2,\n      \"group_id\":162,\n      \"title\":null,\n      \"description\":null,\n      \"state\":2,\n      \"created_at\":\"2022-03-14T05:21:11.929Z\",\n      \"updated_at\":\"2022-03-14T05:21:11.929Z\",\n      \"start_date\":\"2022-03-08\",\n      \"due_date\":\"2022-03-14\",\n      \"web_url\":\"https://gitlab.com/groups/my-group/-/iterations/90\"\n   }\n   ...\n}\n```\n\nExample:\n```json\n[\n   {\n      \"state\" : \"opened\",\n      \"description\" : \"Ratione dolores corrupti mollitia soluta quia.\",\n      \"health_status\": \"on_track\",\n      ...\n   }\n]\n```\n\nExample:\n```plaintext\nGET /groups/:id/issues\nGET /groups/:id/issues?assignee_id=5\nGET /groups/:id/issues?author_id=5\nGET /groups/:id/issues?confidential=true\nGET /groups/:id/issues?iids[]=42&iids[]=43\nGET /groups/:id/issues?labels=foo\nGET /groups/:id/issues?labels=foo,bar\nGET /groups/:id/issues?labels=foo,bar&state=opened\nGET /groups/:id/issues?milestone=1.0.0\nGET /groups/:id/issues?milestone=1.0.0&state=opened\nGET /groups/:id/issues?my_reaction_emoji=star\nGET /groups/:id/issues?search=issue+title+or+description\nGET /groups/:id/issues?state=closed\nGET /groups/:id/issues?state=opened\n```\n\nExample:\n```shell\ncurl --header \"PRIVATE-TOKEN: <your_access_token>\" \\\n  --url \"https://gitlab.example.com/api/v4/groups/4/issues\"\n```\n\nExample:\n```json\n[\n   {\n      \"project_id\" : 4,\n      \"milestone\" : {\n         \"due_date\" : null,\n         \"project_id\" : 4,\n         \"state\" : \"closed\",\n         \"description\" : \"Rerum est voluptatem provident consequuntur molestias similique ipsum dolor.\",\n         \"iid\" : 3,\n         \"id\" : 11,\n         \"title\" : \"v3.0\",\n         \"created_at\" : \"2016-01-04T15:31:39.788Z\",\n         \"updated_at\" : \"2016-01-04T15:31:39.788Z\"\n      },\n      \"author\" : {\n         \"state\" : \"active\",\n         \"web_url\" : \"https://gitlab.example.com/root\",\n         \"avatar_url\" : null,\n         \"username\" : \"root\",\n         \"id\" : 1,\n         \"name\" : \"Administrator\"\n      },\n      \"description\" : \"Omnis vero earum sunt corporis dolor et placeat.\",\n      \"state\" : \"closed\",\n      \"iid\" : 1,\n      \"assignees\" : [{\n         \"avatar_url\" : null,\n         \"web_url\" : \"https://gitlab.example.com/lennie\",\n         \"state\" : \"active\",\n         \"username\" : \"lennie\",\n         \"id\" : 9,\n         \"name\" : \"Dr. Luella Kovacek\"\n      }],\n      \"assignee\" : {\n         \"avatar_url\" : null,\n         \"web_url\" : \"https://gitlab.example.com/lennie\",\n         \"state\" : \"active\",\n         \"username\" : \"lennie\",\n         \"id\" : 9,\n         \"name\" : \"Dr. Luella Kovacek\"\n      },\n      \"type\" : \"ISSUE\",\n      \"labels\" : [\"foo\", \"bar\"],\n      \"upvotes\": 4,\n      \"downvotes\": 0,\n      \"merge_requests_count\": 0,\n      \"id\" : 41,\n      \"title\" : \"Ut commodi ullam eos dolores perferendis nihil sunt.\",\n      \"updated_at\" : \"2016-01-04T15:31:46.176Z\",\n      \"created_at\" : \"2016-01-04T15:31:46.176Z\",\n      \"closed_at\" : null,\n      \"closed_by\" : null,\n      \"user_notes_count\": 1,\n      \"due_date\": null,\n      \"imported\": false,\n      \"imported_from\": \"none\",\n      \"web_url\": \"http://gitlab.example.com/my-group/my-project/issues/1\",\n      \"references\": {\n        \"short\": \"#1\",\n        \"relative\": \"my-project#1\",\n        \"full\": \"my-group/my-project#1\"\n      },\n      \"time_stats\": {\n         \"time_estimate\": 0,\n         \"total_time_spent\": 0,\n         \"human_time_estimate\": null,\n         \"human_total_time_spent\": null\n      },\n      \"has_tasks\": true,\n      \"task_status\": \"10 of 15 tasks completed\",\n      \"confidential\": false,\n      \"discussion_locked\": false,\n      \"issue_type\": \"issue\",\n      \"severity\": \"UNKNOWN\",\n      \"_links\":{\n         \"self\":\"http://gitlab.example.com/api/v4/projects/4/issues/41\",\n         \"notes\":\"http://gitlab.example.com/api/v4/projects/4/issues/41/notes\",\n         \"award_emoji\":\"http://gitlab.example.com/api/v4/projects/4/issues/41/award_emoji\",\n         \"project\":\"http://gitlab.example.com/api/v4/projects/4\",\n         \"closed_as_duplicate_of\": \"http://gitlab.example.com/api/v4/projects/1/issues/75\"\n      },\n      \"task_completion_status\":{\n         \"count\":0,\n         \"completed_count\":0\n      }\n   }\n]\n```\n\nExample:\n```json\n[\n   {\n      \"project_id\" : 4,\n      \"description\" : \"Omnis vero earum sunt corporis dolor et placeat.\",\n      \"weight\": null,\n      ...\n   }\n]\n```\n\nExample:\n```json\n[\n   {\n      \"project_id\" : 4,\n      \"description\" : \"Omnis vero earum sunt corporis dolor et placeat.\",\n      \"health_status\": \"at_risk\",\n      ...\n   }\n]\n```\n\nExample:\n```plaintext\nGET /projects/:id/issues\nGET /projects/:id/issues?assignee_id=5\nGET /projects/:id/issues?author_id=5\nGET /projects/:id/issues?confidential=true\nGET /projects/:id/issues?iids[]=42&iids[]=43\nGET /projects/:id/issues?labels=foo\nGET /projects/:id/issues?labels=foo,bar\nGET /projects/:id/issues?labels=foo,bar&state=opened\nGET /projects/:id/issues?milestone=1.0.0\nGET /projects/:id/issues?milestone=1.0.0&state=opened\nGET /projects/:id/issues?my_reaction_emoji=star\nGET /projects/:id/issues?search=issue+title+or+description\nGET /projects/:id/issues?state=closed\nGET /projects/:id/issues?state=opened\n```\n\nExample:\n```shell\ncurl --header \"PRIVATE-TOKEN: <your_access_token>\" \\\n  --url \"https://gitlab.example.com/api/v4/projects/4/issues\"\n```\n\nExample:\n```json\n[\n   {\n      \"project_id\" : 4,\n      \"milestone\" : {\n         \"due_date\" : null,\n         \"project_id\" : 4,\n         \"state\" : \"closed\",\n         \"description\" : \"Rerum est voluptatem provident consequuntur molestias similique ipsum dolor.\",\n         \"iid\" : 3,\n         \"id\" : 11,\n         \"title\" : \"v3.0\",\n         \"created_at\" : \"2016-01-04T15:31:39.788Z\",\n         \"updated_at\" : \"2016-01-04T15:31:39.788Z\"\n      },\n      \"author\" : {\n         \"state\" : \"active\",\n         \"web_url\" : \"https://gitlab.example.com/root\",\n         \"avatar_url\" : null,\n         \"username\" : \"root\",\n         \"id\" : 1,\n         \"name\" : \"Administrator\"\n      },\n      \"description\" : \"Omnis vero earum sunt corporis dolor et placeat.\",\n      \"state\" : \"closed\",\n      \"iid\" : 1,\n      \"assignees\" : [{\n         \"avatar_url\" : null,\n         \"web_url\" : \"https://gitlab.example.com/lennie\",\n         \"state\" : \"active\",\n         \"username\" : \"lennie\",\n         \"id\" : 9,\n         \"name\" : \"Dr. Luella Kovacek\"\n      }],\n      \"assignee\" : {\n         \"avatar_url\" : null,\n         \"web_url\" : \"https://gitlab.example.com/lennie\",\n         \"state\" : \"active\",\n         \"username\" : \"lennie\",\n         \"id\" : 9,\n         \"name\" : \"Dr. Luella Kovacek\"\n      },\n      \"type\" : \"ISSUE\",\n      \"labels\" : [\"foo\", \"bar\"],\n      \"upvotes\": 4,\n      \"downvotes\": 0,\n      \"merge_requests_count\": 0,\n      \"id\" : 41,\n      \"title\" : \"Ut commodi ullam eos dolores perferendis nihil sunt.\",\n      \"updated_at\" : \"2016-01-04T15:31:46.176Z\",\n      \"created_at\" : \"2016-01-04T15:31:46.176Z\",\n      \"closed_at\" : \"2016-01-05T15:31:46.176Z\",\n      \"closed_by\" : {\n         \"state\" : \"active\",\n         \"web_url\" : \"https://gitlab.example.com/root\",\n         \"avatar_url\" : null,\n         \"username\" : \"root\",\n         \"id\" : 1,\n         \"name\" : \"Administrator\"\n      },\n      \"user_notes_count\": 1,\n      \"due_date\": \"2016-07-22\",\n      \"imported\": false,\n      \"imported_from\": \"none\",\n      \"web_url\": \"http://gitlab.example.com/my-group/my-project/issues/1\",\n      \"references\": {\n        \"short\": \"#1\",\n        \"relative\": \"#1\",\n        \"full\": \"my-group/my-project#1\"\n      },\n      \"time_stats\": {\n         \"time_estimate\": 0,\n         \"total_time_spent\": 0,\n         \"human_time_estimate\": null,\n         \"human_total_time_spent\": null\n      },\n      \"has_tasks\": true,\n      \"task_status\": \"10 of 15 tasks completed\",\n      \"confidential\": false,\n      \"discussion_locked\": false,\n      \"issue_type\": \"issue\",\n      \"severity\": \"UNKNOWN\",\n      \"_links\":{\n         \"self\":\"http://gitlab.example.com/api/v4/projects/4/issues/41\",\n         \"notes\":\"http://gitlab.example.com/api/v4/projects/4/issues/41/notes\",\n         \"award_emoji\":\"http://gitlab.example.com/api/v4/projects/4/issues/41/award_emoji\",\n         \"project\":\"http://gitlab.example.com/api/v4/projects/4\",\n         \"closed_as_duplicate_of\": \"http://gitlab.example.com/api/v4/projects/1/issues/75\"\n      },\n      \"task_completion_status\":{\n         \"count\":0,\n         \"completed_count\":0\n      }\n   }\n]\n```\n\nExample:\n```plaintext\nGET /issues/:id\n```\n\nExample:\n```shell\ncurl --header \"PRIVATE-TOKEN: <your_access_token>\" \\\n  --url \"https://gitlab.example.com/api/v4/issues/41\"\n```\n\nExample:\n```json\n{\n  \"id\": 1,\n  \"milestone\": {\n    \"due_date\": null,\n    \"project_id\": 4,\n    \"state\": \"closed\",\n    \"description\": \"Rerum est voluptatem provident consequuntur molestias similique ipsum dolor.\",\n    \"iid\": 3,\n    \"id\": 11,\n    \"title\": \"v3.0\",\n    \"created_at\": \"2016-01-04T15:31:39.788Z\",\n    \"updated_at\": \"2016-01-04T15:31:39.788Z\",\n    \"closed_at\": \"2016-01-05T15:31:46.176Z\"\n  },\n  \"author\": {\n    \"state\": \"active\",\n    \"web_url\": \"https://gitlab.example.com/root\",\n    \"avatar_url\": null,\n    \"username\": \"root\",\n    \"id\": 1,\n    \"name\": \"Administrator\"\n  },\n  \"description\": \"Omnis vero earum sunt corporis dolor et placeat.\",\n  \"state\": \"closed\",\n  \"iid\": 1,\n  \"assignees\": [\n    {\n      \"avatar_url\": null,\n      \"web_url\": \"https://gitlab.example.com/lennie\",\n      \"state\": \"active\",\n      \"username\": \"lennie\",\n      \"id\": 9,\n      \"name\": \"Dr. Luella Kovacek\"\n    }\n  ],\n  \"assignee\": {\n    \"avatar_url\": null,\n    \"web_url\": \"https://gitlab.example.com/lennie\",\n    \"state\": \"active\",\n    \"username\": \"lennie\",\n    \"id\": 9,\n    \"name\": \"Dr. Luella Kovacek\"\n  },\n  \"type\": \"ISSUE\",\n  \"labels\": [],\n  \"upvotes\": 4,\n  \"downvotes\": 0,\n  \"merge_requests_count\": 0,\n  \"title\": \"Ut commodi ullam eos dolores perferendis nihil sunt.\",\n  \"updated_at\": \"2016-01-04T15:31:46.176Z\",\n  \"created_at\": \"2016-01-04T15:31:46.176Z\",\n  \"closed_at\": null,\n  \"closed_by\": null,\n  \"subscribed\": false,\n  \"user_notes_count\": 1,\n  \"due_date\": null,\n  \"imported\": false,\n  \"imported_from\": \"none\",\n  \"web_url\": \"http://example.com/my-group/my-project/issues/1\",\n  \"references\": {\n    \"short\": \"#1\",\n    \"relative\": \"#1\",\n    \"full\": \"my-group/my-project#1\"\n  },\n  \"time_stats\": {\n    \"time_estimate\": 0,\n    \"total_time_spent\": 0,\n    \"human_time_estimate\": null,\n    \"human_total_time_spent\": null\n  },\n  \"confidential\": false,\n  \"discussion_locked\": false,\n  \"issue_type\": \"issue\",\n  \"severity\": \"UNKNOWN\",\n  \"task_completion_status\": {\n    \"count\": 0,\n    \"completed_count\": 0\n  },\n  \"weight\": null,\n  \"has_tasks\": false,\n  \"_links\": {\n    \"self\": \"http://gitlab.example:3000/api/v4/projects/1/issues/1\",\n    \"notes\": \"http://gitlab.example:3000/api/v4/projects/1/issues/1/notes\",\n    \"award_emoji\": \"http://gitlab.example:3000/api/v4/projects/1/issues/1/award_emoji\",\n    \"project\": \"http://gitlab.example:3000/api/v4/projects/1\",\n    \"closed_as_duplicate_of\": \"http://gitlab.example.com/api/v4/projects/1/issues/75\"\n  },\n  \"moved_to_id\": null,\n  \"service_desk_reply_to\": \"service.desk@gitlab.com\"\n}\n```\n\nExample:\n```json\n{\n   \"project_id\" : 4,\n   \"description\" : \"Omnis vero earum sunt corporis dolor et placeat.\",\n   \"weight\": null,\n   ...\n}\n```\n\nExample:\n```json\n{\n   \"project_id\" : 4,\n   \"description\" : \"Omnis vero earum sunt corporis dolor et placeat.\",\n   \"epic\": {\n   \"epic_iid\" : 5, //deprecated, use `iid` of the `epic` attribute\n   \"epic\": {\n     \"id\" : 42,\n     \"iid\" : 5,\n     \"title\": \"My epic epic\",\n     \"url\" : \"/groups/h5bp/-/epics/5\",\n     \"group_id\": 8\n   },\n   ...\n}\n```\n\nExample:\n```json\n[\n   {\n      \"project_id\" : 4,\n      \"description\" : \"Omnis vero earum sunt corporis dolor et placeat.\",\n      \"health_status\": \"on_track\",\n      ...\n   }\n]\n```\n\nExample:\n```plaintext\nGET /projects/:id/issues/:issue_iid\n```\n\nExample:\n```shell\ncurl --header \"PRIVATE-TOKEN: <your_access_token>\" \\\n  --url \"https://gitlab.example.com/api/v4/projects/4/issues/41\"\n```\n\nExample:\n```json\n{\n   \"project_id\" : 4,\n   \"milestone\" : {\n      \"due_date\" : null,\n      \"project_id\" : 4,\n      \"state\" : \"closed\",\n      \"description\" : \"Rerum est voluptatem provident consequuntur molestias similique ipsum dolor.\",\n      \"iid\" : 3,\n      \"id\" : 11,\n      \"title\" : \"v3.0\",\n      \"created_at\" : \"2016-01-04T15:31:39.788Z\",\n      \"updated_at\" : \"2016-01-04T15:31:39.788Z\",\n      \"closed_at\" : \"2016-01-05T15:31:46.176Z\"\n   },\n   \"author\" : {\n      \"state\" : \"active\",\n      \"web_url\" : \"https://gitlab.example.com/root\",\n      \"avatar_url\" : null,\n      \"username\" : \"root\",\n      \"id\" : 1,\n      \"name\" : \"Administrator\"\n   },\n   \"description\" : \"Omnis vero earum sunt corporis dolor et placeat.\",\n   \"state\" : \"closed\",\n   \"iid\" : 1,\n   \"assignees\" : [{\n      \"avatar_url\" : null,\n      \"web_url\" : \"https://gitlab.example.com/lennie\",\n      \"state\" : \"active\",\n      \"username\" : \"lennie\",\n      \"id\" : 9,\n      \"name\" : \"Dr. Luella Kovacek\"\n   }],\n   \"assignee\" : {\n      \"avatar_url\" : null,\n      \"web_url\" : \"https://gitlab.example.com/lennie\",\n      \"state\" : \"active\",\n      \"username\" : \"lennie\",\n      \"id\" : 9,\n      \"name\" : \"Dr. Luella Kovacek\"\n   },\n   \"type\" : \"ISSUE\",\n   \"labels\" : [],\n   \"upvotes\": 4,\n   \"downvotes\": 0,\n   \"merge_requests_count\": 0,\n   \"id\" : 41,\n   \"title\" : \"Ut commodi ullam eos dolores perferendis nihil sunt.\",\n   \"updated_at\" : \"2016-01-04T15:31:46.176Z\",\n   \"created_at\" : \"2016-01-04T15:31:46.176Z\",\n   \"closed_at\" : null,\n   \"closed_by\" : null,\n   \"subscribed\": false,\n   \"user_notes_count\": 1,\n   \"due_date\": null,\n   \"imported\": false,\n   \"imported_from\": \"none\",\n   \"web_url\": \"http://gitlab.example.com/my-group/my-project/issues/1\",\n   \"references\": {\n     \"short\": \"#1\",\n     \"relative\": \"#1\",\n     \"full\": \"my-group/my-project#1\"\n   },\n   \"time_stats\": {\n      \"time_estimate\": 0,\n      \"total_time_spent\": 0,\n      \"human_time_estimate\": null,\n      \"human_total_time_spent\": null\n   },\n   \"confidential\": false,\n   \"discussion_locked\": false,\n   \"issue_type\": \"issue\",\n   \"severity\": \"UNKNOWN\",\n   \"_links\": {\n      \"self\": \"http://gitlab.example.com/api/v4/projects/1/issues/2\",\n      \"notes\": \"http://gitlab.example.com/api/v4/projects/1/issues/2/notes\",\n      \"award_emoji\": \"http://gitlab.example.com/api/v4/projects/1/issues/2/award_emoji\",\n      \"project\": \"http://gitlab.example.com/api/v4/projects/1\",\n      \"closed_as_duplicate_of\": \"http://gitlab.example.com/api/v4/projects/1/issues/75\"\n   },\n   \"task_completion_status\":{\n      \"count\":0,\n      \"completed_count\":0\n   }\n}\n```\n\nExample:\n```plaintext\nPOST /projects/:id/issues\n```\n\nExample:\n```shell\ncurl --request POST \\\n  --header \"PRIVATE-TOKEN: <your_access_token>\" \\\n  --url \"https://gitlab.example.com/api/v4/projects/4/issues?title=Issues%20with%20auth&labels=bug\"\n```\n\nExample:\n```json\n{\n   \"project_id\" : 4,\n   \"id\" : 84,\n   \"created_at\" : \"2016-01-07T12:44:33.959Z\",\n   \"iid\" : 14,\n   \"title\" : \"Issues with auth\",\n   \"state\" : \"opened\",\n   \"assignees\" : [],\n   \"assignee\" : null,\n   \"type\" : \"ISSUE\",\n   \"labels\" : [\n      \"bug\"\n   ],\n   \"upvotes\": 4,\n   \"downvotes\": 0,\n   \"merge_requests_count\": 0,\n   \"author\" : {\n      \"name\" : \"Alexandra Bashirian\",\n      \"avatar_url\" : null,\n      \"state\" : \"active\",\n      \"web_url\" : \"https://gitlab.example.com/eileen.lowe\",\n      \"id\" : 18,\n      \"username\" : \"eileen.lowe\"\n   },\n   \"description\" : null,\n   \"updated_at\" : \"2016-01-07T12:44:33.959Z\",\n   \"closed_at\" : null,\n   \"closed_by\" : null,\n   \"milestone\" : null,\n   \"subscribed\" : true,\n   \"user_notes_count\": 0,\n   \"due_date\": null,\n   \"web_url\": \"http://gitlab.example.com/my-group/my-project/issues/14\",\n   \"references\": {\n     \"short\": \"#14\",\n     \"relative\": \"#14\",\n     \"full\": \"my-group/my-project#14\"\n   },\n   \"time_stats\": {\n      \"time_estimate\": 0,\n      \"total_time_spent\": 0,\n      \"human_time_estimate\": null,\n      \"human_total_time_spent\": null\n   },\n   \"confidential\": false,\n   \"discussion_locked\": false,\n   \"issue_type\": \"issue\",\n   \"severity\": \"UNKNOWN\",\n   \"_links\": {\n      \"self\": \"http://gitlab.example.com/api/v4/projects/1/issues/2\",\n      \"notes\": \"http://gitlab.example.com/api/v4/projects/1/issues/2/notes\",\n      \"award_emoji\": \"http://gitlab.example.com/api/v4/projects/1/issues/2/award_emoji\",\n      \"project\": \"http://gitlab.example.com/api/v4/projects/1\",\n      \"closed_as_duplicate_of\": \"http://gitlab.example.com/api/v4/projects/1/issues/75\"\n   },\n   \"task_completion_status\":{\n      \"count\":0,\n      \"completed_count\":0\n   }\n}\n```\n\nExample:\n```json\n{\n   \"message\": \"403 Forbidden\"\n}\n```\n\nExample:\n```json\n{\n   \"project_id\" : 4,\n   \"description\" : null,\n   \"weight\": null,\n   ...\n}\n```\n\nExample:\n```plaintext\nPUT /projects/:id/issues/:issue_iid\n```\n\nExample:\n```shell\ncurl --request PUT \\\n  --header \"PRIVATE-TOKEN: <your_access_token>\" \\\n  --url \"https://gitlab.example.com/api/v4/projects/4/issues/85?state_event=close\"\n```\n\nExample:\n```json\n{\n   \"created_at\" : \"2016-01-07T12:46:01.410Z\",\n   \"author\" : {\n      \"name\" : \"Alexandra Bashirian\",\n      \"avatar_url\" : null,\n      \"username\" : \"eileen.lowe\",\n      \"id\" : 18,\n      \"state\" : \"active\",\n      \"web_url\" : \"https://gitlab.example.com/eileen.lowe\"\n   },\n   \"state\" : \"closed\",\n   \"title\" : \"Issues with auth\",\n   \"project_id\" : 4,\n   \"description\" : null,\n   \"updated_at\" : \"2016-01-07T12:55:16.213Z\",\n   \"closed_at\" : \"2016-01-08T12:55:16.213Z\",\n   \"closed_by\" : {\n      \"state\" : \"active\",\n      \"web_url\" : \"https://gitlab.example.com/root\",\n      \"avatar_url\" : null,\n      \"username\" : \"root\",\n      \"id\" : 1,\n      \"name\" : \"Administrator\"\n    },\n   \"iid\" : 15,\n   \"labels\" : [\n      \"bug\"\n   ],\n   \"upvotes\": 4,\n   \"downvotes\": 0,\n   \"merge_requests_count\": 0,\n   \"id\" : 85,\n   \"assignees\" : [],\n   \"assignee\" : null,\n   \"milestone\" : null,\n   \"subscribed\" : true,\n   \"user_notes_count\": 0,\n   \"due_date\": \"2016-07-22\",\n   \"web_url\": \"http://gitlab.example.com/my-group/my-project/issues/15\",\n   \"references\": {\n     \"short\": \"#15\",\n     \"relative\": \"#15\",\n     \"full\": \"my-group/my-project#15\"\n   },\n   \"time_stats\": {\n      \"time_estimate\": 0,\n      \"total_time_spent\": 0,\n      \"human_time_estimate\": null,\n      \"human_total_time_spent\": null\n   },\n   \"confidential\": false,\n   \"discussion_locked\": false,\n   \"issue_type\": \"issue\",\n   \"severity\": \"UNKNOWN\",\n   \"_links\": {\n      \"self\": \"http://gitlab.example.com/api/v4/projects/1/issues/2\",\n      \"notes\": \"http://gitlab.example.com/api/v4/projects/1/issues/2/notes\",\n      \"award_emoji\": \"http://gitlab.example.com/api/v4/projects/1/issues/2/award_emoji\",\n      \"project\": \"http://gitlab.example.com/api/v4/projects/1\",\n      \"closed_as_duplicate_of\": \"http://gitlab.example.com/api/v4/projects/1/issues/75\"\n\n   },\n   \"task_completion_status\":{\n      \"count\":0,\n      \"completed_count\":0\n   }\n}\n```\n\nExample:\n```plaintext\nDELETE /projects/:id/issues/:issue_iid\n```\n\nExample:\n```shell\ncurl --request DELETE \\\n  --header \"PRIVATE-TOKEN: <your_access_token>\" \\\n  --url \"https://gitlab.example.com/api/v4/projects/4/issues/85\"\n```\n\nExample:\n```plaintext\nPUT /projects/:id/issues/:issue_iid/reorder\n```\n\nExample:\n```shell\ncurl --request PUT \\\n  --header \"PRIVATE-TOKEN: <your_access_token>\" \\\n  --url \"https://gitlab.example.com/api/v4/projects/4/issues/85/reorder?move_after_id=51&move_before_id=92\"\n```\n\nExample:\n```plaintext\nPOST /projects/:id/issues/:issue_iid/move\n```\n\nExample:\n```shell\ncurl --header \"PRIVATE-TOKEN: <your_access_token>\" \\\n  --form to_project_id=5 \\\n  --url \"https://gitlab.example.com/api/v4/projects/4/issues/85/move\"\n```\n\nExample:\n```json\n{\n  \"id\": 92,\n  \"iid\": 11,\n  \"project_id\": 5,\n  \"title\": \"Sit voluptas tempora quisquam aut doloribus et.\",\n  \"description\": \"Repellat voluptas quibusdam voluptatem exercitationem.\",\n  \"state\": \"opened\",\n  \"created_at\": \"2016-04-05T21:41:45.652Z\",\n  \"updated_at\": \"2016-04-07T12:20:17.596Z\",\n  \"closed_at\": null,\n  \"closed_by\": null,\n  \"labels\": [],\n  \"upvotes\": 4,\n  \"downvotes\": 0,\n  \"merge_requests_count\": 0,\n  \"milestone\": null,\n  \"assignees\": [{\n    \"name\": \"Miss Monserrate Beier\",\n    \"username\": \"axel.block\",\n    \"id\": 12,\n    \"state\": \"active\",\n    \"avatar_url\": \"http://www.gravatar.com/avatar/46f6f7dc858ada7be1853f7fb96e81da?s=80&d=identicon\",\n    \"web_url\": \"https://gitlab.example.com/axel.block\"\n  }],\n  \"assignee\": {\n    \"name\": \"Miss Monserrate Beier\",\n    \"username\": \"axel.block\",\n    \"id\": 12,\n    \"state\": \"active\",\n    \"avatar_url\": \"http://www.gravatar.com/avatar/46f6f7dc858ada7be1853f7fb96e81da?s=80&d=identicon\",\n    \"web_url\": \"https://gitlab.example.com/axel.block\"\n  },\n  \"type\" : \"ISSUE\",\n  \"author\": {\n    \"name\": \"Kris Steuber\",\n    \"username\": \"solon.cremin\",\n    \"id\": 10,\n    \"state\": \"active\",\n    \"avatar_url\": \"http://www.gravatar.com/avatar/7a190fecbaa68212a4b68aeb6e3acd10?s=80&d=identicon\",\n    \"web_url\": \"https://gitlab.example.com/solon.cremin\"\n  },\n  \"due_date\": null,\n  \"imported\": false,\n  \"imported_from\": \"none\",\n  \"web_url\": \"http://gitlab.example.com/my-group/my-project/issues/11\",\n  \"references\": {\n    \"short\": \"#11\",\n    \"relative\": \"#11\",\n    \"full\": \"my-group/my-project#11\"\n  },\n  \"time_stats\": {\n    \"time_estimate\": 0,\n    \"total_time_spent\": 0,\n    \"human_time_estimate\": null,\n    \"human_total_time_spent\": null\n  },\n  \"confidential\": false,\n  \"discussion_locked\": false,\n  \"issue_type\": \"issue\",\n  \"severity\": \"UNKNOWN\",\n  \"_links\": {\n    \"self\": \"http://gitlab.example.com/api/v4/projects/1/issues/2\",\n    \"notes\": \"http://gitlab.example.com/api/v4/projects/1/issues/2/notes\",\n    \"award_emoji\": \"http://gitlab.example.com/api/v4/projects/1/issues/2/award_emoji\",\n    \"project\": \"http://gitlab.example.com/api/v4/projects/1\",\n    \"closed_as_duplicate_of\": \"http://gitlab.example.com/api/v4/projects/1/issues/75\"\n  },\n  \"task_completion_status\":{\n     \"count\":0,\n     \"completed_count\":0\n  }\n}\n```\n\nExample:\n```json\n{\n  \"project_id\": 5,\n  \"description\": \"Repellat voluptas quibusdam voluptatem exercitationem.\",\n  \"weight\": null,\n  ...\n}\n```\n\nExample:\n```plaintext\nPOST /projects/:id/issues/:issue_iid/clone\n```\n\nExample:\n```shell\ncurl --request POST \\\n  --header \"PRIVATE-TOKEN: <your_access_token>\" \\\n  --url \"https://gitlab.example.com/api/v4/projects/5/issues/1/clone?with_notes=true&to_project_id=6\"\n```\n\nExample:\n```json\n{\n  \"id\":290,\n  \"iid\":1,\n  \"project_id\":143,\n  \"title\":\"foo\",\n  \"description\":\"closed\",\n  \"state\":\"opened\",\n  \"created_at\":\"2021-09-14T22:24:11.696Z\",\n  \"updated_at\":\"2021-09-14T22:24:11.696Z\",\n  \"closed_at\":null,\n  \"closed_by\":null,\n  \"labels\":[\n\n  ],\n  \"milestone\":null,\n  \"assignees\":[\n    {\n      \"id\":179,\n      \"name\":\"John Doe2\",\n      \"username\":\"john\",\n      \"state\":\"active\",\n      \"avatar_url\":\"https://www.gravatar.com/avatar/10fc7f102be8de7657fb4d80898bbfe3?s=80\\u0026d=identicon\",\n      \"web_url\":\"https://gitlab.example.com/john\"\n    }\n  ],\n  \"author\":{\n    \"id\":179,\n    \"name\":\"John Doe2\",\n    \"username\":\"john\",\n    \"state\":\"active\",\n    \"avatar_url\":\"https://www.gravatar.com/avatar/10fc7f102be8de7657fb4d80898bbfe3?s=80\\u0026d=identicon\",\n    \"web_url\":\"https://gitlab.example.com/john\"\n  },\n  \"type\":\"ISSUE\",\n  \"assignee\":{\n    \"id\":179,\n    \"name\":\"John Doe2\",\n    \"username\":\"john\",\n    \"state\":\"active\",\n    \"avatar_url\":\"https://www.gravatar.com/avatar/10fc7f102be8de7657fb4d80898bbfe3?s=80\\u0026d=identicon\",\n    \"web_url\":\"https://gitlab.example.com/john\"\n  },\n  \"user_notes_count\":1,\n  \"merge_requests_count\":0,\n  \"upvotes\":0,\n  \"downvotes\":0,\n  \"due_date\":null,\n  \"imported\":false,\n  \"imported_from\": \"none\",\n  \"confidential\":false,\n  \"discussion_locked\":null,\n  \"issue_type\":\"issue\",\n  \"severity\": \"UNKNOWN\",\n  \"web_url\":\"https://gitlab.example.com/namespace1/project2/-/issues/1\",\n  \"time_stats\":{\n    \"time_estimate\":0,\n    \"total_time_spent\":0,\n    \"human_time_estimate\":null,\n    \"human_total_time_spent\":null\n  },\n  \"task_completion_status\":{\n    \"count\":0,\n    \"completed_count\":0\n  },\n  \"blocking_issues_count\":0,\n  \"has_tasks\":false,\n  \"_links\":{\n    \"self\":\"https://gitlab.example.com/api/v4/projects/143/issues/1\",\n    \"notes\":\"https://gitlab.example.com/api/v4/projects/143/issues/1/notes\",\n    \"award_emoji\":\"https://gitlab.example.com/api/v4/projects/143/issues/1/award_emoji\",\n    \"project\":\"https://gitlab.example.com/api/v4/projects/143\",\n    \"closed_as_duplicate_of\": \"http://gitlab.example.com/api/v4/projects/1/issues/75\"\n  },\n  \"references\":{\n    \"short\":\"#1\",\n    \"relative\":\"#1\",\n    \"full\":\"namespace1/project2#1\"\n  },\n  \"subscribed\":true,\n  \"moved_to_id\":null,\n  \"service_desk_reply_to\":null\n}\n```\n\nExample:\n```plaintext\nPOST /projects/:id/issues/:issue_iid/subscribe\n```\n\nExample:\n```shell\ncurl --request POST \\\n  --header \"PRIVATE-TOKEN: <your_access_token>\" \\\n  --url \"https://gitlab.example.com/api/v4/projects/5/issues/93/subscribe\"\n```\n\nExample:\n```json\n{\n  \"id\": 92,\n  \"iid\": 11,\n  \"project_id\": 5,\n  \"title\": \"Sit voluptas tempora quisquam aut doloribus et.\",\n  \"description\": \"Repellat voluptas quibusdam voluptatem exercitationem.\",\n  \"state\": \"opened\",\n  \"created_at\": \"2016-04-05T21:41:45.652Z\",\n  \"updated_at\": \"2016-04-07T12:20:17.596Z\",\n  \"closed_at\": null,\n  \"closed_by\": null,\n  \"labels\": [],\n  \"upvotes\": 4,\n  \"downvotes\": 0,\n  \"merge_requests_count\": 0,\n  \"milestone\": null,\n  \"assignees\": [{\n    \"name\": \"Miss Monserrate Beier\",\n    \"username\": \"axel.block\",\n    \"id\": 12,\n    \"state\": \"active\",\n    \"avatar_url\": \"http://www.gravatar.com/avatar/46f6f7dc858ada7be1853f7fb96e81da?s=80&d=identicon\",\n    \"web_url\": \"https://gitlab.example.com/axel.block\"\n  }],\n  \"assignee\": {\n    \"name\": \"Miss Monserrate Beier\",\n    \"username\": \"axel.block\",\n    \"id\": 12,\n    \"state\": \"active\",\n    \"avatar_url\": \"http://www.gravatar.com/avatar/46f6f7dc858ada7be1853f7fb96e81da?s=80&d=identicon\",\n    \"web_url\": \"https://gitlab.example.com/axel.block\"\n  },\n  \"type\" : \"ISSUE\",\n  \"author\": {\n    \"name\": \"Kris Steuber\",\n    \"username\": \"solon.cremin\",\n    \"id\": 10,\n    \"state\": \"active\",\n    \"avatar_url\": \"http://www.gravatar.com/avatar/7a190fecbaa68212a4b68aeb6e3acd10?s=80&d=identicon\",\n    \"web_url\": \"https://gitlab.example.com/solon.cremin\"\n  },\n  \"due_date\": null,\n  \"web_url\": \"http://gitlab.example.com/my-group/my-project/issues/11\",\n  \"references\": {\n    \"short\": \"#11\",\n    \"relative\": \"#11\",\n    \"full\": \"my-group/my-project#11\"\n  },\n  \"time_stats\": {\n    \"time_estimate\": 0,\n    \"total_time_spent\": 0,\n    \"human_time_estimate\": null,\n    \"human_total_time_spent\": null\n  },\n  \"confidential\": false,\n  \"discussion_locked\": false,\n  \"issue_type\": \"issue\",\n  \"severity\": \"UNKNOWN\",\n  \"_links\": {\n    \"self\": \"http://gitlab.example.com/api/v4/projects/1/issues/2\",\n    \"notes\": \"http://gitlab.example.com/api/v4/projects/1/issues/2/notes\",\n    \"award_emoji\": \"http://gitlab.example.com/api/v4/projects/1/issues/2/award_emoji\",\n    \"project\": \"http://gitlab.example.com/api/v4/projects/1\",\n    \"closed_as_duplicate_of\": \"http://gitlab.example.com/api/v4/projects/1/issues/75\"\n  },\n  \"task_completion_status\":{\n     \"count\":0,\n     \"completed_count\":0\n  }\n}\n```\n\nExample:\n```plaintext\nPOST /projects/:id/issues/:issue_iid/unsubscribe\n```\n\nExample:\n```shell\ncurl --request POST \\\n  --header \"PRIVATE-TOKEN: <your_access_token>\" \\\n  --url \"https://gitlab.example.com/api/v4/projects/5/issues/93/unsubscribe\"\n```\n\nExample:\n```json\n{\n  \"id\": 93,\n  \"iid\": 12,\n  \"project_id\": 5,\n  \"title\": \"Incidunt et rerum ea expedita iure quibusdam.\",\n  \"description\": \"Et cumque architecto sed aut ipsam.\",\n  \"state\": \"opened\",\n  \"created_at\": \"2016-04-05T21:41:45.217Z\",\n  \"updated_at\": \"2016-04-07T13:02:37.905Z\",\n  \"labels\": [],\n  \"upvotes\": 4,\n  \"downvotes\": 0,\n  \"merge_requests_count\": 0,\n  \"milestone\": null,\n  \"assignee\": {\n    \"name\": \"Edwardo Grady\",\n    \"username\": \"keyon\",\n    \"id\": 21,\n    \"state\": \"active\",\n    \"avatar_url\": \"http://www.gravatar.com/avatar/3e6f06a86cf27fa8b56f3f74f7615987?s=80&d=identicon\",\n    \"web_url\": \"https://gitlab.example.com/keyon\"\n  },\n  \"type\" : \"ISSUE\",\n  \"closed_at\": null,\n  \"closed_by\": null,\n  \"author\": {\n    \"name\": \"Vivian Hermann\",\n    \"username\": \"orville\",\n    \"id\": 11,\n    \"state\": \"active\",\n    \"avatar_url\": \"http://www.gravatar.com/avatar/5224fd70153710e92fb8bcf79ac29d67?s=80&d=identicon\",\n    \"web_url\": \"https://gitlab.example.com/orville\"\n  },\n  \"subscribed\": false,\n  \"due_date\": null,\n  \"web_url\": \"http://gitlab.example.com/my-group/my-project/issues/12\",\n  \"references\": {\n    \"short\": \"#12\",\n    \"relative\": \"#12\",\n    \"full\": \"my-group/my-project#12\"\n  },\n  \"confidential\": false,\n  \"discussion_locked\": false,\n  \"issue_type\": \"issue\",\n  \"severity\": \"UNKNOWN\",\n  \"task_completion_status\":{\n     \"count\":0,\n     \"completed_count\":0\n  }\n}\n```\n\nExample:\n```plaintext\nPOST /projects/:id/issues/:issue_iid/todo\n```\n\nExample:\n```shell\ncurl --request POST \\\n  --header \"PRIVATE-TOKEN: <your_access_token>\" \\\n  --url \"https://gitlab.example.com/api/v4/projects/5/issues/93/todo\"\n```\n\nExample:\n```json\n{\n  \"id\": 112,\n  \"project\": {\n    \"id\": 5,\n    \"name\": \"GitLab CI/CD\",\n    \"name_with_namespace\": \"GitLab Org / GitLab CI/CD\",\n    \"path\": \"gitlab-ci\",\n    \"path_with_namespace\": \"gitlab-org/gitlab-ci\"\n  },\n  \"author\": {\n    \"name\": \"Administrator\",\n    \"username\": \"root\",\n    \"id\": 1,\n    \"state\": \"active\",\n    \"avatar_url\": \"http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon\",\n    \"web_url\": \"https://gitlab.example.com/root\"\n  },\n  \"action_name\": \"marked\",\n  \"target_type\": \"Issue\",\n  \"target\": {\n    \"id\": 93,\n    \"iid\": 10,\n    \"project_id\": 5,\n    \"title\": \"Vel voluptas atque dicta mollitia adipisci qui at.\",\n    \"description\": \"Tempora laboriosam sint magni sed voluptas similique.\",\n    \"state\": \"closed\",\n    \"created_at\": \"2016-06-17T07:47:39.486Z\",\n    \"updated_at\": \"2016-07-01T11:09:13.998Z\",\n    \"labels\": [],\n    \"milestone\": {\n      \"id\": 26,\n      \"iid\": 1,\n      \"project_id\": 5,\n      \"title\": \"v0.0\",\n      \"description\": \"Accusantium nostrum rerum quae quia quis nesciunt suscipit id.\",\n      \"state\": \"closed\",\n      \"created_at\": \"2016-06-17T07:47:33.832Z\",\n      \"updated_at\": \"2016-06-17T07:47:33.832Z\",\n      \"due_date\": null\n    },\n    \"assignees\": [{\n      \"name\": \"Jarret O'Keefe\",\n      \"username\": \"francisca\",\n      \"id\": 14,\n      \"state\": \"active\",\n      \"avatar_url\": \"http://www.gravatar.com/avatar/a7fa515d53450023c83d62986d0658a8?s=80&d=identicon\",\n      \"web_url\": \"https://gitlab.example.com/francisca\"\n    }],\n    \"assignee\": {\n      \"name\": \"Jarret O'Keefe\",\n      \"username\": \"francisca\",\n      \"id\": 14,\n      \"state\": \"active\",\n      \"avatar_url\": \"http://www.gravatar.com/avatar/a7fa515d53450023c83d62986d0658a8?s=80&d=identicon\",\n      \"web_url\": \"https://gitlab.example.com/francisca\"\n    },\n    \"type\" : \"ISSUE\",\n    \"author\": {\n      \"name\": \"Maxie Medhurst\",\n      \"username\": \"craig_rutherford\",\n      \"id\": 12,\n      \"state\": \"active\",\n      \"avatar_url\": \"http://www.gravatar.com/avatar/a0d477b3ea21970ce6ffcbb817b0b435?s=80&d=identicon\",\n      \"web_url\": \"https://gitlab.example.com/craig_rutherford\"\n    },\n    \"subscribed\": true,\n    \"user_notes_count\": 7,\n    \"upvotes\": 0,\n    \"downvotes\": 0,\n    \"merge_requests_count\": 0,\n    \"due_date\": null,\n    \"web_url\": \"http://gitlab.example.com/my-group/my-project/issues/10\",\n    \"references\": {\n      \"short\": \"#10\",\n      \"relative\": \"#10\",\n      \"full\": \"my-group/my-project#10\"\n    },\n    \"confidential\": false,\n    \"discussion_locked\": false,\n    \"issue_type\": \"issue\",\n    \"severity\": \"UNKNOWN\",\n    \"task_completion_status\":{\n       \"count\":0,\n       \"completed_count\":0\n    }\n  },\n  \"target_url\": \"https://gitlab.example.com/gitlab-org/gitlab-ci/issues/10\",\n  \"body\": \"Vel voluptas atque dicta mollitia adipisci qui at.\",\n  \"state\": \"pending\",\n  \"created_at\": \"2016-07-01T11:09:13.992Z\"\n}\n```\n\nExample:\n```plaintext\nPOST /projects/:id/issues/:issue_iid/notes\n```\n\nExample:\n```shell\ncurl --request POST \\\n  --header \"PRIVATE-TOKEN: <your_access_token>\" \\\n  --url \"https://gitlab.example.com/api/v4/projects/5/issues/11/notes?body=Lets%20promote%20this%20to%20an%20epic%0A%0A%2Fpromote\"\n```\n\nExample:\n```json\n{\n   \"id\":699,\n   \"type\":null,\n   \"body\":\"Lets promote this to an epic\",\n   \"attachment\":null,\n   \"author\": {\n      \"id\":1,\n      \"name\":\"Alexandra Bashirian\",\n      \"username\":\"eileen.lowe\",\n      \"state\":\"active\",\n      \"avatar_url\":\"https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon\",\n      \"web_url\":\"https://gitlab.example.com/eileen.lowe\"\n   },\n   \"created_at\":\"2020-12-03T12:27:17.844Z\",\n   \"updated_at\":\"2020-12-03T12:27:17.844Z\",\n   \"system\":false,\n   \"noteable_id\":461,\n   \"noteable_type\":\"Issue\",\n   \"resolvable\":false,\n   \"confidential\":false,\n   \"noteable_iid\":33,\n   \"commands_changes\": {\n      \"promote_to_epic\":true\n   }\n}\n```\n\nExample:\n```plaintext\nPOST /projects/:id/issues/:issue_iid/time_estimate\n```\n\nExample:\n```shell\ncurl --request POST \\\n  --header \"PRIVATE-TOKEN: <your_access_token>\" \\\n  --url \"https://gitlab.example.com/api/v4/projects/5/issues/93/time_estimate?duration=3h30m\"\n```\n\nExample:\n```json\n{\n  \"human_time_estimate\": \"3h 30m\",\n  \"human_total_time_spent\": null,\n  \"time_estimate\": 12600,\n  \"total_time_spent\": 0\n}\n```\n\nExample:\n```plaintext\nPOST /projects/:id/issues/:issue_iid/reset_time_estimate\n```\n\nExample:\n```shell\ncurl --request POST \\\n  --header \"PRIVATE-TOKEN: <your_access_token>\" \\\n  --url \"https://gitlab.example.com/api/v4/projects/5/issues/93/reset_time_estimate\"\n```\n\nExample:\n```json\n{\n  \"human_time_estimate\": null,\n  \"human_total_time_spent\": null,\n  \"time_estimate\": 0,\n  \"total_time_spent\": 0\n}\n```\n\nExample:\n```plaintext\nPOST /projects/:id/issues/:issue_iid/add_spent_time\n```\n\nExample:\n```shell\ncurl --request POST \\\n  --header \"PRIVATE-TOKEN: <your_access_token>\" \\\n  --url \"https://gitlab.example.com/api/v4/projects/5/issues/93/add_spent_time?duration=1h\"\n```\n\nExample:\n```json\n{\n  \"human_time_estimate\": null,\n  \"human_total_time_spent\": \"1h\",\n  \"time_estimate\": 0,\n  \"total_time_spent\": 3600\n}\n```\n\nExample:\n```plaintext\nPOST /projects/:id/issues/:issue_iid/reset_spent_time\n```\n\nExample:\n```shell\ncurl --request POST \\\n  --header \"PRIVATE-TOKEN: <your_access_token>\" \\\n  --url \"https://gitlab.example.com/api/v4/projects/5/issues/93/reset_spent_time\"\n```\n\nExample:\n```plaintext\nGET /projects/:id/issues/:issue_iid/time_stats\n```\n\nExample:\n```shell\ncurl --header \"PRIVATE-TOKEN: <your_access_token>\" \\\n  --url \"https://gitlab.example.com/api/v4/projects/5/issues/93/time_stats\"\n```\n\nExample:\n```json\n{\n  \"human_time_estimate\": \"2h\",\n  \"human_total_time_spent\": \"1h\",\n  \"time_estimate\": 7200,\n  \"total_time_spent\": 3600\n}\n```\n\nExample:\n```plaintext\nGET /projects/:id/issues/:issue_iid/related_merge_requests\n```\n\nExample:\n```shell\ncurl --header \"PRIVATE-TOKEN: <your_access_token>\" \\\n  --url \"https://gitlab.example.com/api/v4/projects/1/issues/11/related_merge_requests\"\n```\n\nExample:\n```json\n[\n  {\n    \"id\": 29,\n    \"iid\": 11,\n    \"project_id\": 1,\n    \"title\": \"Provident eius eos blanditiis consequatur neque odit.\",\n    \"description\": \"Ut consequatur ipsa aspernatur quisquam voluptatum fugit. Qui harum corporis quo fuga ut incidunt veritatis. Autem necessitatibus et harum occaecati nihil ea.\\r\\n\\r\\ntwitter/flight#8\",\n    \"state\": \"opened\",\n    \"created_at\": \"2018-09-18T14:36:15.510Z\",\n    \"updated_at\": \"2018-09-19T07:45:13.089Z\",\n    \"closed_by\": null,\n    \"closed_at\": null,\n    \"target_branch\": \"v2.x\",\n    \"source_branch\": \"so_long_jquery\",\n    \"user_notes_count\": 9,\n    \"upvotes\": 0,\n    \"downvotes\": 0,\n    \"author\": {\n      \"id\": 14,\n      \"name\": \"Verna Hills\",\n      \"username\": \"lawanda_reinger\",\n      \"state\": \"active\",\n      \"avatar_url\": \"https://www.gravatar.com/avatar/de68a91aeab1cff563795fb98a0c2cc0?s=80&d=identicon\",\n      \"web_url\": \"https://gitlab.example.com/lawanda_reinger\"\n    },\n    \"assignee\": {\n      \"id\": 19,\n      \"name\": \"Jody Baumbach\",\n      \"username\": \"felipa.kuvalis\",\n      \"state\": \"active\",\n      \"avatar_url\": \"https://www.gravatar.com/avatar/6541fc75fc4e87e203529bd275fafd07?s=80&d=identicon\",\n      \"web_url\": \"https://gitlab.example.com/felipa.kuvalis\"\n    },\n    \"source_project_id\": 1,\n    \"target_project_id\": 1,\n    \"labels\": [],\n    \"draft\": false,\n    \"work_in_progress\": false,\n    \"milestone\": {\n      \"id\": 27,\n      \"iid\": 2,\n      \"project_id\": 1,\n      \"title\": \"v1.0\",\n      \"description\": \"Et tenetur voluptatem minima doloribus vero dignissimos vitae.\",\n      \"state\": \"active\",\n      \"created_at\": \"2018-09-18T14:35:44.353Z\",\n      \"updated_at\": \"2018-09-18T14:35:44.353Z\",\n      \"due_date\": null,\n      \"start_date\": null,\n      \"web_url\": \"https://gitlab.example.com/twitter/flight/milestones/2\"\n    },\n    \"merge_when_pipeline_succeeds\": false,\n    \"merge_status\": \"cannot_be_merged\",\n    \"sha\": \"3b7b528e9353295c1c125dad281ac5b5deae5f12\",\n    \"merge_commit_sha\": null,\n    \"squash_commit_sha\": null,\n    \"discussion_locked\": null,\n    \"should_remove_source_branch\": null,\n    \"force_remove_source_branch\": false,\n    \"reference\": \"!11\",\n    \"web_url\": \"https://gitlab.example.com/twitter/flight/merge_requests/4\",\n    \"references\": {\n      \"short\": \"!4\",\n      \"relative\": \"!4\",\n      \"full\": \"twitter/flight!4\"\n    },\n    \"time_stats\": {\n      \"time_estimate\": 0,\n      \"total_time_spent\": 0,\n      \"human_time_estimate\": null,\n      \"human_total_time_spent\": null\n    },\n    \"squash\": false,\n    \"task_completion_status\": {\n      \"count\": 0,\n      \"completed_count\": 0\n    },\n    \"changes_count\": \"10\",\n    \"latest_build_started_at\": \"2018-12-05T01:16:41.723Z\",\n    \"latest_build_finished_at\": \"2018-12-05T02:35:54.046Z\",\n    \"first_deployed_to_production_at\": null,\n    \"pipeline\": {\n      \"id\": 38980952,\n      \"sha\": \"81c6a84c7aebd45a1ac2c654aa87f11e32338e0a\",\n      \"ref\": \"test-branch\",\n      \"status\": \"success\",\n      \"web_url\": \"https://gitlab.com/gitlab-org/gitlab/pipelines/38980952\"\n    },\n    \"head_pipeline\": {\n      \"id\": 38980952,\n      \"sha\": \"81c6a84c7aebd45a1ac2c654aa87f11e32338e0a\",\n      \"ref\": \"test-branch\",\n      \"status\": \"success\",\n      \"web_url\": \"https://gitlab.example.com/twitter/flight/pipelines/38980952\",\n      \"before_sha\": \"3c738a37eb23cf4c0ed0d45d6ddde8aad4a8da51\",\n      \"tag\": false,\n      \"yaml_errors\": null,\n      \"user\": {\n        \"id\": 19,\n        \"name\": \"Jody Baumbach\",\n        \"username\": \"felipa.kuvalis\",\n        \"state\": \"active\",\n        \"avatar_url\": \"https://www.gravatar.com/avatar/6541fc75fc4e87e203529bd275fafd07?s=80&d=identicon\",\n        \"web_url\": \"https://gitlab.example.com/felipa.kuvalis\"\n      },\n      \"created_at\": \"2018-12-05T01:16:13.342Z\",\n      \"updated_at\": \"2018-12-05T02:35:54.086Z\",\n      \"started_at\": \"2018-12-05T01:16:41.723Z\",\n      \"finished_at\": \"2018-12-05T02:35:54.046Z\",\n      \"committed_at\": null,\n      \"duration\": 4436,\n      \"coverage\": \"46.68\",\n      \"detailed_status\": {\n        \"icon\": \"status_warning\",\n        \"text\": \"passed\",\n        \"label\": \"passed with warnings\",\n        \"group\": \"success-with-warnings\",\n        \"tooltip\": \"passed\",\n        \"has_details\": true,\n        \"details_path\": \"/twitter/flight/pipelines/38\",\n        \"illustration\": null,\n        \"favicon\": \"https://gitlab.example.com/assets/ci_favicons/favicon_status_success-8451333011eee8ce9f2ab25dc487fe24a8758c694827a582f17f42b0a90446a2.png\"\n      },\n      \"archived\": false\n    },\n    \"diff_refs\": {\n      \"base_sha\": \"d052d768f0126e8cddf80afd8b1eb07f406a3fcb\",\n      \"head_sha\": \"81c6a84c7aebd45a1ac2c654aa87f11e32338e0a\",\n      \"start_sha\": \"d052d768f0126e8cddf80afd8b1eb07f406a3fcb\"\n    },\n    \"merge_error\": null,\n    \"user\": {\n      \"can_merge\": true\n    }\n  }\n]\n```\n\nExample:\n```plaintext\nGET /projects/:id/issues/:issue_iid/closed_by\n```\n\nExample:\n```shell\ncurl --header \"PRIVATE-TOKEN: <your_access_token>\" \\\n  --url \"https://gitlab.example.com/api/v4/projects/1/issues/11/closed_by\"\n```\n\nExample:\n```json\n[\n  {\n    \"id\": 6471,\n    \"iid\": 6432,\n    \"project_id\": 1,\n    \"title\": \"add a test for cgi lexer options\",\n    \"description\": \"closes #11\",\n    \"state\": \"opened\",\n    \"created_at\": \"2017-04-06T18:33:34.168Z\",\n    \"updated_at\": \"2017-04-09T20:10:24.983Z\",\n    \"target_branch\": \"main\",\n    \"source_branch\": \"feature.custom-highlighting\",\n    \"upvotes\": 0,\n    \"downvotes\": 0,\n    \"author\": {\n      \"name\": \"Administrator\",\n      \"username\": \"root\",\n      \"id\": 1,\n      \"state\": \"active\",\n      \"avatar_url\": \"http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon\",\n      \"web_url\": \"https://gitlab.example.com/root\"\n    },\n    \"assignee\": null,\n    \"source_project_id\": 1,\n    \"target_project_id\": 1,\n    \"closed_at\": null,\n    \"closed_by\": null,\n    \"labels\": [],\n    \"draft\": false,\n    \"work_in_progress\": false,\n    \"milestone\": null,\n    \"merge_when_pipeline_succeeds\": false,\n    \"merge_status\": \"unchecked\",\n    \"sha\": \"5a62481d563af92b8e32d735f2fa63b94e806835\",\n    \"merge_commit_sha\": null,\n    \"squash_commit_sha\": null,\n    \"user_notes_count\": 1,\n    \"should_remove_source_branch\": null,\n    \"force_remove_source_branch\": false,\n    \"web_url\": \"https://gitlab.example.com/gitlab-org/gitlab-test/merge_requests/6432\",\n    \"reference\": \"!6432\",\n    \"references\": {\n      \"short\": \"!6432\",\n      \"relative\": \"!6432\",\n      \"full\": \"gitlab-org/gitlab-test!6432\"\n    },\n    \"time_stats\": {\n      \"time_estimate\": 0,\n      \"total_time_spent\": 0,\n      \"human_time_estimate\": null,\n      \"human_total_time_spent\": null\n    }\n  }\n]\n```\n\nExample:\n```plaintext\nGET /projects/:id/issues/:issue_iid/participants\n```\n\nExample:\n```shell\ncurl --header \"PRIVATE-TOKEN: <your_access_token>\" \\\n  -url \"https://gitlab.example.com/api/v4/projects/5/issues/93/participants\"\n```\n\nExample:\n```json\n[\n  {\n    \"id\": 1,\n    \"name\": \"John Doe1\",\n    \"username\": \"user1\",\n    \"state\": \"active\",\n    \"avatar_url\": \"http://www.gravatar.com/avatar/c922747a93b40d1ea88262bf1aebee62?s=80&d=identicon\",\n    \"web_url\": \"http://gitlab.example.com/user1\"\n  },\n  {\n    \"id\": 5,\n    \"name\": \"John Doe5\",\n    \"username\": \"user5\",\n    \"state\": \"active\",\n    \"avatar_url\": \"http://www.gravatar.com/avatar/4aea8cf834ed91844a2da4ff7ae6b491?s=80&d=identicon\",\n    \"web_url\": \"http://gitlab.example.com/user5\"\n  }\n]\n```\n\nExample:\n```plaintext\nGET /projects/:id/issues/:issue_iid/user_agent_detail\n```\n\nExample:\n```shell\ncurl --header \"PRIVATE-TOKEN: <your_access_token>\" \\\n  --url \"https://gitlab.example.com/api/v4/projects/5/issues/93/user_agent_detail\"\n```\n\nExample:\n```json\n{\n  \"user_agent\": \"AppleWebKit/537.36\",\n  \"ip_address\": \"127.0.0.1\",\n  \"akismet_submitted\": false\n}\n```\n\nExample:\n```plaintext\nPOST /projects/:id/issues/:issue_iid/metric_images\n```\n\nExample:\n```shell\ncurl --header \"PRIVATE-TOKEN: <your_access_token>\" \\\n  --form 'file=@/path/to/file.png' \\\n  --form 'url=http://example.com' \\\n  --form 'url_text=Example website' \\\n  --url \"https://gitlab.example.com/api/v4/projects/5/issues/93/metric_images\"\n```\n\nExample:\n```json\n{\n    \"id\": 23,\n    \"created_at\": \"2020-11-13T00:06:18.084Z\",\n    \"filename\": \"file.png\",\n    \"file_path\": \"/uploads/-/system/issuable_metric_image/file/23/file.png\",\n    \"url\": \"http://example.com\",\n    \"url_text\": \"Example website\"\n}\n```\n\nExample:\n```plaintext\nGET /projects/:id/issues/:issue_iid/metric_images\n```\n\nExample:\n```shell\ncurl --header \"PRIVATE-TOKEN: <your_access_token>\" \\\n  -url \"https://gitlab.example.com/api/v4/projects/5/issues/93/metric_images\"\n```\n\nExample:\n```json\n[\n    {\n        \"id\": 17,\n        \"created_at\": \"2020-11-12T20:07:58.156Z\",\n        \"filename\": \"sample_2054\",\n        \"file_path\": \"/uploads/-/system/issuable_metric_image/file/17/sample_2054.png\",\n        \"url\": \"example.com/metric\"\n    },\n    {\n        \"id\": 18,\n        \"created_at\": \"2020-11-12T20:14:26.441Z\",\n        \"filename\": \"sample_2054\",\n        \"file_path\": \"/uploads/-/system/issuable_metric_image/file/18/sample_2054.png\",\n        \"url\": \"example.com/metric\"\n    }\n]\n```\n\nExample:\n```plaintext\nPUT /projects/:id/issues/:issue_iid/metric_images/:image_id\n```\n\nExample:\n```shell\ncurl --header \"PRIVATE-TOKEN: <your_access_token>\" \\\n  --request PUT \\\n  --form 'url=http://example.com' \\\n  --form 'url_text=Example website' \\\n  --url \"https://gitlab.example.com/api/v4/projects/5/issues/93/metric_images/1\"\n```\n\nExample:\n```plaintext\nDELETE /projects/:id/issues/:issue_iid/metric_images/:image_id\n```\n\nExample:\n```shell\ncurl --header \"PRIVATE-TOKEN: <your_access_token>\" \\\n  --request DELETE \\\n  --url \"https://gitlab.example.com/api/v4/projects/5/issues/93/metric_images/1\"\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:09.745Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":91,"totalLines":1837,"estimatedTokens":12061}}206{"id":"doc-gitlab_pages_administration_for_self_compiled_in-f5afd855","source":"documentation","title":"GitLab Pages administration for self-compiled installations | GitLab Docs","url":"https://docs.gitlab.com/administration/pages/source/","text":"Example:\n```plaintext\n*.example.io. 1800 IN A 192.0.2.1\n```\n\nExample:\n```shell\ncd /home/git\nsudo -u git -H git clone https://gitlab.com/gitlab-org/gitlab-pages.git\ncd gitlab-pages\nsudo -u git -H git checkout v$(</home/git/gitlab/GITLAB_PAGES_VERSION)\nsudo -u git -H make\n```\n\nExample:\n```shell\ncd /home/git/gitlab\n```\n\nExample:\n```yaml\n## GitLab Pages\npages:\n  enabled: true\n  # The location where pages are stored (default: shared/pages).\n  # path: shared/pages\n\n  host: example.io\n  access_control: false\n  port: 8090\n  https: false\n  artifacts_server: false\n  external_http: [\"127.0.0.1:8090\"]\n  secret_file: /home/git/gitlab/gitlab-pages-secret\n```\n\nExample:\n```ini\nlisten-http=:8090\npages-root=/home/git/gitlab/shared/pages\napi-secret-key=/home/git/gitlab/gitlab-pages-secret\npages-domain=example.io\ninternal-gitlab-server=https://gitlab.example.com\n\nYou can use an `http` address when running GitLab Pages and GitLab on the same host. If you use\n`https` with a self-signed certificate, make your custom CA available to GitLab Pages, for\nexample by setting the `SSL_CERT_DIR` environment variable.\n```\n\nExample:\n```shell\nsudo -u git -H openssl rand -base64 32 > /home/git/gitlab/gitlab-pages-secret\n```\n\nExample:\n```shell\nsudo systemctl edit gitlab.target\n```\n\nExample:\n```plaintext\n[Unit]\nWants=gitlab-pages.service\n```\n\nExample:\n```ini\ngitlab_pages_enabled=true\n```\n\nExample:\n```shell\nsudo cp lib/support/nginx/gitlab-pages /etc/nginx/sites-available/gitlab-pages.conf\nsudo ln -sf /etc/nginx/sites-{available,enabled}/gitlab-pages.conf\n```\n\nExample:\n```yaml\n## GitLab Pages\npages:\n  enabled: true\n  # The location where pages are stored (default: shared/pages).\n  # path: shared/pages\n\n  host: example.io\n  port: 443\n  https: true\n```\n\nExample:\n```ini\ngitlab_pages_enabled=true\ngitlab_pages_options=\"-pages-domain example.io -pages-root $app_root/shared/pages -listen-proxy 127.0.0.1:8090 -root-cert /path/to/example.io.crt -root-key /path/to/example.io.key\"\n```\n\nExample:\n```shell\nsudo cp lib/support/nginx/gitlab-pages-ssl /etc/nginx/sites-available/gitlab-pages-ssl.conf\nsudo ln -sf /etc/nginx/sites-{available,enabled}/gitlab-pages-ssl.conf\n```\n\nExample:\n```yaml\npages:\n  enabled: true\n  # The location where pages are stored (default: shared/pages).\n  # path: shared/pages\n\n  host: example.io\n  port: 80\n  https: false\n\n  external_http: 192.0.2.2:80\n```\n\nExample:\n```ini\ngitlab_pages_enabled=true\ngitlab_pages_options=\"-pages-domain example.io -pages-root $app_root/shared/pages -listen-proxy 127.0.0.1:8090 -listen-http 192.0.2.2:80\"\n```\n\nExample:\n```yaml\n## GitLab Pages\npages:\n  enabled: true\n  # The location where pages are stored (default: shared/pages).\n  # path: shared/pages\n\n  host: example.io\n  port: 443\n  https: true\n\n  external_http: 192.0.2.2:80\n  external_https: 192.0.2.2:443\n```\n\nExample:\n```ini\ngitlab_pages_enabled=true\ngitlab_pages_options=\"-pages-domain example.io -pages-root $app_root/shared/pages -listen-proxy 127.0.0.1:8090 -listen-http 192.0.2.2:80 -listen-https 192.0.2.2:443 -root-cert /path/to/example.io.crt -root-key /path/to/example.io.key\"\n```\n\nExample:\n```nginx\nserver_name ~^.*\\.YOUR_GITLAB_PAGES\\.DOMAIN$;\n```\n\nExample:\n```nginx\nserver_name ~^.*\\.example\\.io$;\n```\n\nExample:\n```nginx\nserver_name ~^.*\\.pages\\.example\\.io$;\n```\n\nExample:\n```yaml\npages:\n  access_control: true\n```\n\nExample:\n```shell\nauth-client-id=<OAuth Application ID generated by GitLab>\n  auth-client-secret=<OAuth code generated by GitLab>\n  auth-redirect-uri='http://projects.example.io/auth'\n  auth-secret=<40 random hex characters>\n  auth-server=<URL of the GitLab instance>\n```\n\nExample:\n```yaml\npages:\n  enabled: true\n  # The location where pages are stored (default: shared/pages).\n  path: /mnt/storage/pages\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:10.887Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":23,"totalLines":182,"estimatedTokens":938}}207{"id":"doc-using_source_ip_kubernetes-a35c8b70","source":"documentation","title":"Using Source IP | Kubernetes","url":"https://kubernetes.io/docs/tutorials/services/source-ip/","text":"KubernetesDocumentationKubernetes BlogTrainingCareersPartnersCommunityVersionsRelease Informationv1.36v1.35v1.34v1.33v1.32English中文 (Chinese)日本語 (Japanese)한국어 (Korean)বাংলা (Bengali) Français (French) Deutsch (German) हिन्दी (Hindi) Bahasa Indonesia (Indonesian) Italiano (Italian) فارسی (Persian) Polski (Polish) Português (Portuguese) Русский (Russian) Español (Spanish) Українська (Ukrainian) Tiếng Việt (Vietnamese) Light Dark AutoUsing Source IP\n\nExample:\n```shell\nkubectl create deployment source-ip-app --image=registry.k8s.io/echoserver:1.10\n```\n\nExample:\n```text\ndeployment.apps/source-ip-app created\n```\n\nExample:\n```console\nkubectl get nodes\n```\n\nExample:\n```text\nNAME                           STATUS     ROLES    AGE     VERSION\nkubernetes-node-6jst   Ready      <none>   2h      v1.13.0\nkubernetes-node-cx31   Ready      <none>   2h      v1.13.0\nkubernetes-node-jj1t   Ready      <none>   2h      v1.13.0\n```\n\nExample:\n```shell\n# Run this in a shell on the node you want to query.\ncurl http://localhost:10249/proxyMode\n```\n\nExample:\n```text\niptables\n```\n\nExample:\n```shell\nkubectl expose deployment source-ip-app --name=clusterip --port=80 --target-port=8080\n```\n\nExample:\n```text\nservice/clusterip exposed\n```\n\nExample:\n```shell\nkubectl get svc clusterip\n```\n\nExample:\n```text\nNAME         TYPE        CLUSTER-IP    EXTERNAL-IP   PORT(S)   AGE\nclusterip    ClusterIP   10.0.170.92   <none>        80/TCP    51s\n```\n\nExample:\n```shell\nkubectl run busybox -it --image=busybox:1.28 --restart=Never --rm\n```\n\nExample:\n```text\nWaiting for pod default/busybox to be running, status is Pending, pod ready: false\nIf you don't see a command prompt, try pressing enter.\n```\n\nExample:\n```shell\n# Run this inside the terminal from \"kubectl run\"\nip addr\n```\n\nExample:\n```text\n1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue\n    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00\n    inet 127.0.0.1/8 scope host lo\n       valid_lft forever preferred_lft forever\n    inet6 ::1/128 scope host\n       valid_lft forever preferred_lft forever\n3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1460 qdisc noqueue\n    link/ether 0a:58:0a:f4:03:08 brd ff:ff:ff:ff:ff:ff\n    inet 10.244.3.8/24 scope global eth0\n       valid_lft forever preferred_lft forever\n    inet6 fe80::188a:84ff:feb0:26a5/64 scope link\n       valid_lft forever preferred_lft forever\n```\n\nExample:\n```shell\n# Replace \"10.0.170.92\" with the IPv4 address of the Service named \"clusterip\"\nwget -qO - 10.0.170.92\n```\n\nExample:\n```text\nCLIENT VALUES:\nclient_address=10.244.3.8\ncommand=GET\n...\n```\n\nExample:\n```shell\nkubectl expose deployment source-ip-app --name=nodeport --port=80 --target-port=8080 --type=NodePort\n```\n\nExample:\n```text\nservice/nodeport exposed\n```\n\nExample:\n```shell\nNODEPORT=$(kubectl get -o jsonpath=\"{.spec.ports[0].nodePort}\" services nodeport)\nNODES=$(kubectl get nodes -o jsonpath='{ $.items[*].status.addresses[?(@.type==\"InternalIP\")].address }')\n```\n\nExample:\n```shell\nfor node in $NODES; do curl -s $node:$NODEPORT | grep -i client_address; done\n```\n\nExample:\n```text\nclient_address=10.180.1.1\nclient_address=10.240.0.5\nclient_address=10.240.0.3\n```\n\nExample:\n```shell\nkubectl patch svc nodeport -p '{\"spec\":{\"externalTrafficPolicy\":\"Local\"}}'\n```\n\nExample:\n```text\nservice/nodeport patched\n```\n\nExample:\n```shell\nfor node in $NODES; do curl --connect-timeout 1 -s $node:$NODEPORT | grep -i client_address; done\n```\n\nExample:\n```text\nclient_address=198.51.100.79\n```\n\nExample:\n```shell\nkubectl expose deployment source-ip-app --name=loadbalancer --port=80 --target-port=8080 --type=LoadBalancer\n```\n\nExample:\n```text\nservice/loadbalancer exposed\n```\n\nExample:\n```console\nkubectl get svc loadbalancer\n```\n\nExample:\n```text\nNAME           TYPE           CLUSTER-IP    EXTERNAL-IP       PORT(S)   AGE\nloadbalancer   LoadBalancer   10.0.65.118   203.0.113.140     80/TCP    5m\n```\n\nExample:\n```shell\ncurl 203.0.113.140\n```\n\nExample:\n```text\nCLIENT VALUES:\nclient_address=10.240.0.5\n...\n```\n\nExample:\n```shell\nkubectl patch svc loadbalancer -p '{\"spec\":{\"externalTrafficPolicy\":\"Local\"}}'\n```\n\nExample:\n```shell\nkubectl get svc loadbalancer -o yaml | grep -i healthCheckNodePort\n```\n\nExample:\n```yaml\nhealthCheckNodePort: 32122\n```\n\nExample:\n```shell\nkubectl get pod -o wide -l app=source-ip-app\n```\n\nExample:\n```text\nNAME                            READY     STATUS    RESTARTS   AGE       IP             NODE\nsource-ip-app-826191075-qehz4   1/1       Running   0          20h       10.180.1.136   kubernetes-node-6jst\n```\n\nExample:\n```shell\n# Run this locally on a node you choose\ncurl localhost:32122/healthz\n```\n\nExample:\n```text\n1 Service Endpoints found\n```\n\nExample:\n```text\nNo Service Endpoints Found\n```\n\nExample:\n```text\nCLIENT VALUES:\nclient_address=198.51.100.79\n...\n```\n\nExample:\n```shell\nkubectl delete svc -l app=source-ip-app\n```\n\nExample:\n```shell\nkubectl delete deployment source-ip-app\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:47.842Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":42,"totalLines":245,"estimatedTokens":1228}}208{"id":"doc-mandates_stripe_api_reference-7b45116e","source":"documentation","title":"Mandates | Stripe API Reference","url":"https://docs.stripe.com/api/mandates?api-version=2025-09-30.preview","text":"Example:\n```text\n{  \"id\": \"mandate_1RpNYL2RM7tvzuemIyhnCrab\",  \"object\": \"mandate\",  \"customer_acceptance\": {    \"accepted_at\": 1753595721,    \"online\": {      \"ip_address\": \"172.16.254.1\",      \"user_agent\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)\"    },    \"type\": \"online\"  },  \"livemode\": false,  \"multi_use\": {},  \"payment_method\": \"pm_1RpNXw2RM7tvzuem88xCOsn5\",  \"payment_method_details\": {    \"type\": \"us_bank_account\",    \"us_bank_account\": {}  },  \"status\": \"active\",  \"type\": \"multi_use\"}\n```\n\nExample:\n```text\ncurl https://api.stripe.com/v1/mandates/{{MANDATE_ID}} \\  -u \"sk_test_BQokikJOvBiI2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2:\" \\  -H \"Stripe-Version: 2025-09-30.preview\"\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:29.095Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":2,"totalLines":11,"estimatedTokens":180}}209{"id":"doc-stripe_tax_with_paymentintents_stripe_documentat-14473153","source":"documentation","title":"Stripe Tax with PaymentIntents | Stripe Documentation","url":"https://docs.stripe.com/tax/payment-intent","text":"Example:\n```text\ncurl https://api.stripe.com/v1/tax/calculations \\\n  -u \"sk_test_BQokikJOvBiI2HlWgH4olfQ2:\" \\\n  -d currency=usd \\\n  -d \"line_items[0][amount]=1000\" \\\n  -d \"line_items[0][reference]=L1\" \\\n  -d \"customer_details[address][line1]=920 5th Ave\" \\\n  -d \"customer_details[address][city]=Seattle\" \\\n  -d \"customer_details[address][state]=WA\" \\\n  -d \"customer_details[address][postal_code]=98104\" \\\n  -d \"customer_details[address][country]=US\" \\\n  -d \"customer_details[address_source]=shipping\"\n```\n\nExample:\n```text\n{\n  \"error\": {\n    \"doc_url\": \"https://docs.stripe.com/error-codes#customer-tax-location-invalid\",\n    \"code\": \"customer_tax_location_invalid\",\n    \"message\": \"We could not determine the customer's tax location based on the provided customer address.\",\n    \"param\": \"customer_details[address]\",\n    \"type\": \"invalid_request_error\"\n  }\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:29.113Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":2,"totalLines":29,"estimatedTokens":220}}210{"id":"doc-set_a_stripe_api_version_stripe_documentation-6759a8cf","source":"documentation","title":"Set a Stripe API version | Stripe Documentation","url":"https://docs.stripe.com/sdks/set-version","text":"Example:\n```text\nrequire 'stripe'\n# Don't put any keys in code. See /keys-best-practices.\nclient = Stripe::StripeClient.new('sk_test_BQokikJOvBiI2HlWgH4olfQ2', stripe_version: '2026-07-29.dahlia')\n```\n\nExample:\n```text\nrequire 'stripe'\n# Don't put any keys in code. See /keys-best-practices.\nclient = Stripe::StripeClient.new('sk_test_BQokikJOvBiI2HlWgH4olfQ2')\nintent = client.v1.payment_intents.retrieve(\n  'pi_1DlIVK2eZvKYlo2CW4yj5l2C',\n  {\n    stripe_version: '2026-07-29.dahlia',\n  },\n)\nintent.capture\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:29.151Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":2,"totalLines":22,"estimatedTokens":131}}211{"id":"doc-issuing_transactions_stripe_documentation-d8e98d9b","source":"documentation","title":"Issuing transactions | Stripe Documentation","url":"https://docs.stripe.com/issuing/purchases/transactions?issuing-capture-type=force_capture","text":"Example:\n```text\n{\n  \"id\": \"ipi_1GTG10EEsyYlpYZ9VJn2xV3B\",\n  \"object\": \"issuing.transaction\",\n  \"amount\": -100,\n  \"authorization\": null,\n  \"balance_transaction\": null,\n  \"card\": \"{{CARD_ID}}\",\n  \"cardholder\": null,\n  \"created\": 1585783834,\n  \"currency\": \"usd\",\n  \"livemode\": false,\n  \"merchant_amount\": -100,\n  \"merchant_currency\": \"usd\",\n  \"merchant_data\": {\n    \"category\": \"airlines_air_carriers\",\n    \"city\": \"San Francisco\",\n    \"country\": \"US\",\n    \"name\": \"Rocket Rides\",\n    \"network_id\": \"1234567890\",\n    \"postal_code\": \"94111\",\n    \"state\": \"CA\",\n    \"url\": null\n  },\n  \"metadata\": {},\n  \"type\": \"capture\"\n}\n```\n\nExample:\n```text\ncurl https://api.stripe.com/v1/test_helpers/issuing/transactions/create_force_capture \\\n  -u \"sk_test_BQokikJOvBiI2HlWgH4olfQ2:\" \\\n  -d \"card={{CARD_ID}}\" \\\n  -d amount=100\n```\n\nExample:\n```text\n{\n  \"id\": \"ipi_1GTG10EEsyYlpYZ9VJn2xV3B\",\n  \"object\": \"issuing.transaction\",\n  \"type\": \"capture\",\n  \"treasury\": {\n    \"received_debit\": \"rd_1KsVPhACgxNDEoMCiKgN6Fm4\"\n  }\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:29.344Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":3,"totalLines":51,"estimatedTokens":257}}212{"id":"doc-financial_account_features_stripe_api_reference-2cc77374","source":"documentation","title":"Financial Account Features | Stripe API Reference","url":"https://docs.stripe.com/api/treasury/financial_account_features","text":"Example:\n```text\n{  \"object\": \"treasury.financial_account_features\",  \"card_issuing\": {    \"requested\": true,    \"status\": \"active\",    \"status_details\": []  },  \"deposit_insurance\": {    \"requested\": true,    \"status\": \"active\",    \"status_details\": []  },  \"financial_addresses\": {    \"aba\": {      \"requested\": true,      \"status\": \"active\",      \"status_details\": []    }  },  \"inbound_transfers\": {    \"ach\": {      \"requested\": true,      \"status\": \"active\",      \"status_details\": []    }  },  \"intra_stripe_flows\": {    \"requested\": true,    \"status\": \"active\",    \"status_details\": []  },  \"outbound_payments\": {    \"ach\": {      \"requested\": true,      \"status\": \"active\",      \"status_details\": []    },    \"us_domestic_wire\": {      \"requested\": true,      \"status\": \"active\",      \"status_details\": []    }  },  \"outbound_transfers\": {    \"ach\": {      \"requested\": true,      \"status\": \"active\",      \"status_details\": []    },    \"us_domestic_wire\": {      \"requested\": true,      \"status\": \"active\",      \"status_details\": []    }  }}\n```\n\nExample:\n```text\ncurl https://api.stripe.com/v1/treasury/financial_accounts/{{FINANCIAL_ACCOUNT_ID}}/features \\  -u \"sk_test_BQokikJOvBiI2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2:\" \\  -d \"card_issuing[requested]=false\"\n```\n\nExample:\n```text\n{  \"object\": \"treasury.financial_account_features\",  \"deposit_insurance\": {    \"requested\": true,    \"status\": \"active\",    \"status_details\": []  },  \"financial_addresses\": {    \"aba\": {      \"requested\": true,      \"status\": \"active\",      \"status_details\": []    }  },  \"inbound_transfers\": {    \"ach\": {      \"requested\": true,      \"status\": \"active\",      \"status_details\": []    }  },  \"intra_stripe_flows\": {    \"requested\": true,    \"status\": \"active\",    \"status_details\": []  },  \"outbound_payments\": {    \"ach\": {      \"requested\": true,      \"status\": \"active\",      \"status_details\": []    },    \"us_domestic_wire\": {      \"requested\": true,      \"status\": \"active\",      \"status_details\": []    }  },  \"outbound_transfers\": {    \"ach\": {      \"requested\": true,      \"status\": \"active\",      \"status_details\": []    },    \"us_domestic_wire\": {      \"requested\": true,      \"status\": \"active\",      \"status_details\": []    }  }}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:29.354Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":3,"totalLines":16,"estimatedTokens":565}}213{"id":"doc-charge_for_shipping_stripe_documentation-73f37846","source":"documentation","title":"Charge for shipping | Stripe Documentation","url":"https://docs.stripe.com/payments/advanced/charge-shipping","text":"Example:\n```text\ncurl https://api.stripe.com/v1/checkout/sessions \\\n  -u \"sk_test_BQokikJOvBiI2HlWgH4olfQ2:\" \\\n  -d billing_address_collection=required \\\n  -d \"shipping_address_collection[allowed_countries][0]=US\" \\\n  -d \"shipping_address_collection[allowed_countries][1]=CA\" \\\n  -d \"shipping_options[0][shipping_rate_data][type]=fixed_amount\" \\\n  -d \"shipping_options[0][shipping_rate_data][fixed_amount][amount]=0\" \\\n  -d \"shipping_options[0][shipping_rate_data][fixed_amount][currency]=usd\" \\\n  -d \"shipping_options[0][shipping_rate_data][display_name]=Free shipping\" \\\n  -d \"shipping_options[0][shipping_rate_data][delivery_estimate][minimum][unit]=business_day\" \\\n  -d \"shipping_options[0][shipping_rate_data][delivery_estimate][minimum][value]=5\" \\\n  -d \"shipping_options[0][shipping_rate_data][delivery_estimate][maximum][unit]=business_day\" \\\n  -d \"shipping_options[0][shipping_rate_data][delivery_estimate][maximum][value]=7\" \\\n  -d \"shipping_options[1][shipping_rate_data][type]=fixed_amount\" \\\n  -d \"shipping_options[1][shipping_rate_data][fixed_amount][amount]=1500\" \\\n  -d \"shipping_options[1][shipping_rate_data][fixed_amount][currency]=usd\" \\\n  -d \"shipping_options[1][shipping_rate_data][display_name]=Next day air\" \\\n  -d \"shipping_options[1][shipping_rate_data][delivery_estimate][minimum][unit]=business_day\" \\\n  -d \"shipping_options[1][shipping_rate_data][delivery_estimate][minimum][value]=1\" \\\n  -d \"shipping_options[1][shipping_rate_data][delivery_estimate][maximum][unit]=business_day\" \\\n  -d \"shipping_options[1][shipping_rate_data][delivery_estimate][maximum][value]=1\" \\\n  -d \"line_items[0][price_data][currency]=usd\" \\\n  -d \"line_items[0][price_data][product_data][name]=T-shirt\" \\\n  -d \"line_items[0][price_data][unit_amount]=2000\" \\\n  -d \"line_items[0][quantity]=1\" \\\n  -d mode=payment \\\n  -d ui_mode=elements \\\n  --data-urlencode \"return_url=https://example.com/return\"\n```\n\nExample:\n```text\nactions.getSession().shippingOptions.forEach((option) => {\n  const form = document.createElement('form');\n\n  shippingOptions.forEach(option => {\n    const label = document.createElement('label');\n    const radio = document.createElement('input');\n    radio.type = 'radio';\n    radio.id = option.id;\n    radio.name = 'shippingOption';\n    radio.value = option.id;\n    radio.addEventListener('click', () => {\n      actions.updateShippingOption(option.id)\n    })\n\n    const labelText = document.createTextNode(option.displayName);\n\n    label.appendChild(radio);\n    label.appendChild(labelText);\n    form.appendChild(label);\n  });\n\n  document.getElementById('shipping-options').appendChild(form);\n});\nconst shippingAddressElement = checkout.createShippingAddressElement();\nshippingAddressElement.mount('#shipping-address');\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:29.358Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":2,"totalLines":62,"estimatedTokens":691}}214{"id":"doc-intermediate_skills_pytorch_lightning_2_6_1_docu-23ef1ee9","source":"documentation","title":"Intermediate skills — PyTorch Lightning 2.6.1 documentation","url":"https://lightning.ai/docs/pytorch/stable/levels/intermediate.html","text":"2.6.1 Home Lightning in 15 minutes Install 2.0 Upgrade Guide Level Up Basic skills Intermediate skills Advanced skills Expert skills Core API LightningModule Trainer Optional API accelerators callbacks cli core loggers profiler trainer strategies tuner utilities More Community Examples Glossary How-to Guides Overview Team management Production Security Open source Overview PyTorch Lightning Fabric Lit-GPT Torchmetrics Litdata Lit LLaMA Litserve Examples Glossary FAQ Docs > Intermediate skills Shortcuts Intermediate skills¶ Learn to scale up your models and enable collaborative model development at academic or industry research labs. Level acceleration Learn how to access GPUs and TPUs on the cloud. intermediate Level your projects Create DataModules to enable dataset reusability. intermediate Level your model Use advanced visuals to find the best performing model. intermediate Level SOTA scaling techniques Explore SOTA techniques to help convergence, stability and scalability. intermediate Level your models Learn how to deploy your models with optimizations like ONNX and torchscript. intermediate Level training speed Use compilers, advanced profilers and mixed precision to train bigger models, faster. intermediate Level on a multi-node cluster Learn to run on multi-node in the cloud or on your cluster intermediate Intermediate skills\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:51.543Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":0,"totalLines":3,"estimatedTokens":343}}215{"id":"doc-lightning_in_15_minutes_pytorch_lightning_2_6_1_-37add8ef","source":"documentation","title":"Lightning in 15 minutes — PyTorch Lightning 2.6.1 documentation","url":"https://lightning.ai/docs/pytorch/stable/starter/introduction.html","text":"2.6.1 Home Lightning in 15 minutes Install 2.0 Upgrade Guide Level Up Basic skills Intermediate skills Advanced skills Expert skills Core API LightningModule Trainer Optional API accelerators callbacks cli core loggers profiler trainer strategies tuner utilities More Community Examples Glossary How-to Guides Overview Team management Production Security Open source Overview PyTorch Lightning Fabric Lit-GPT Torchmetrics Litdata Lit LLaMA Litserve Examples Glossary FAQ Docs > Lightning in 15 minutes Shortcuts Lightning in 15 minutes¶ Required this guide, we’ll walk you through the 7 key steps of a typical Lightning workflow. PyTorch Lightning is the deep learning framework with “batteries included” for professional AI researchers and machine learning engineers who need maximal flexibility while super-charging performance at scale. Lightning organizes PyTorch code to remove boilerplate and unlock scalability. By organizing PyTorch code, lightning flexibility Try any ideas using raw PyTorch without the boilerplate. Reproducible + Readable Decoupled research and engineering code enable reproducibility and better readability. Simple multi-GPU training Use multiple GPUs/TPUs/HPUs etc... without code changes. Built-in testing We've done all the testing so you don't have to. PyTorch Lightning¶ For pip users pip install lightning For conda users conda install lightning -c conda-forge Or read the advanced install guide a LightningModule¶ A LightningModule enables your PyTorch nn.Module to play together in complex ways inside the training_step (there is also an optional validation_step and test_step). import os from torch import optim, nn, utils, Tensor from torchvision.datasets import MNIST from torchvision.transforms import ToTensor import lightning as L # define any number of nn.Modules (or use your current ones) encoder = nn.Sequential(nn.Linear(28 * 28, 64), nn.ReLU(), nn.Linear(64, 3)) decoder = nn.Sequential(nn.Linear(3, 64), nn.ReLU(), nn.Linear(64, 28 * 28)) # define the LightningModule class LitAutoEncoder(L.LightningModule): def __init__(self, encoder, decoder): super().__init__() self.encoder = encoder self.decoder = decoder def training_step(self, batch, batch_idx): # training_step defines the train loop. # it is independent of forward x, _ = batch x = x.view(x.size(0), -1) z = self.encoder(x) x_hat = self.decoder(z) loss = nn.functional.mse_loss(x_hat, x) # Logging to TensorBoard (if installed) by default self.log(\"train_loss\", loss) return loss def configure_optimizers(self): optimizer = optim.Adam(self.parameters(), lr=1e-3) return optimizer # init the autoencoder autoencoder = LitAutoEncoder(encoder, decoder) a dataset¶ Lightning supports ANY iterable (DataLoader, numpy, etc…) for the train/val/test/predict splits. # setup data dataset = MNIST(os.getcwd(), download=True, transform=ToTensor()) train_loader = utils.data.DataLoader(dataset) the model¶ The Lightning Trainer “mixes” any LightningModule with any dataset and abstracts away all the engineering complexity needed for scale. # train the model (hint: here are some helpful Trainer arguments for rapid idea iteration) trainer = L.Trainer(limit_train_batches=100, max_epochs=1) trainer.fit(model=autoencoder, train_dataloaders=train_loader) The Lightning Trainer automates 40+ tricks and batch iteration optimizer.step(), loss.backward(), optimizer.zero_grad() calls Calling of model.eval(), enabling/disabling grads during evaluation Checkpoint Saving and Loading Tensorboard (see loggers options) Multi-GPU support TPU 16-bit precision AMP support the model¶ Once you’ve trained the model you can export to onnx, torchscript and put it into production or simply load the weights and run predictions. # load checkpoint checkpoint = \"./lightning_logs/version_0/checkpoints/epoch=0-step=100.ckpt\" autoencoder = LitAutoEncoder.load_from_checkpoint(checkpoint, encoder=encoder, decoder=decoder) # choose your trained nn.Module encoder = autoencoder.encoder encoder.eval() # embed 4 fake images! fake_image_batch = torch.rand(4, 28 * 28, device=autoencoder.device) embeddings = encoder(fake_image_batch) print(\"⚡\" * 20, \"\\nPredictions (4 image embeddings):\\n\", embeddings, \"\\n\", \"⚡\" * 20) training¶ If you have tensorboard installed, you can use it for visualizing experiments. Run this on your commandline and open your browser to http://localhost:6006/ tensorboard --logdir . training¶ Enable advanced training features using Trainer arguments. These are state-of-the-art techniques that are automatically integrated into your training loop without changes to your code. # train on 4 GPUs trainer = L.Trainer( devices=4, accelerator=\"gpu\", ) # train 1TB+ parameter models with Deepspeed/fsdp trainer = L.Trainer( devices=4, accelerator=\"gpu\", strategy=\"deepspeed_stage_2\", precision=16 ) # 20+ helpful flags for rapid idea iteration trainer = L.Trainer( max_epochs=10, min_epochs=5, overfit_batches=1 ) # access the latest state of the art techniques trainer = L.Trainer(callbacks=[WeightAveraging(...)]) Maximize flexibility¶ Lightning’s core guiding principle is to always provide maximal flexibility without ever hiding any of the PyTorch. Lightning offers 5 added degrees of flexibility depending on your project’s complexity. Customize training loop¶ Inject custom code anywhere in the Training loop using any of the 20+ methods (Hooks) available in the LightningModule. class LitAutoEncoder(L.LightningModule): def backward(self, loss): loss.backward() Extend the Trainer¶ If you have multiple lines of code with similar functionalities, you can use callbacks to easily group them together and toggle all of those lines on or off at the same time. trainer = Trainer(callbacks=[AWSCheckpoints()]) Use a raw PyTorch loop¶ For certain types of work at the bleeding-edge of research, Lightning offers experts full control of optimization or the training loop in various ways. Manual optimization Automated training loop, but you own the optimization steps. Next steps¶ Depending on your use case, you might want to check one of these out next. Level a validation and test set Add validation and test sets to avoid over/underfitting. basic See more examples See examples across computer vision, NLP, RL, etc... basic Deploy your model Learn how to predict or put your model into production basic Lightning in 15 minutes PyTorch Lightning a LightningModule a dataset the model the model training training Maximize flexibility Customize training loop Extend the Trainer Use a raw PyTorch loop Next steps\n\nExample:\n```text\npip install lightning\n```\n\nExample:\n```text\nconda install lightning -c conda-forge\n```\n\nExample:\n```text\nimport os\nfrom torch import optim, nn, utils, Tensor\nfrom torchvision.datasets import MNIST\nfrom torchvision.transforms import ToTensor\nimport lightning as L\n\n# define any number of nn.Modules (or use your current ones)\nencoder = nn.Sequential(nn.Linear(28 * 28, 64), nn.ReLU(), nn.Linear(64, 3))\ndecoder = nn.Sequential(nn.Linear(3, 64), nn.ReLU(), nn.Linear(64, 28 * 28))\n\n\n# define the LightningModule\nclass LitAutoEncoder(L.LightningModule):\n    def __init__(self, encoder, decoder):\n        super().__init__()\n        self.encoder = encoder\n        self.decoder = decoder\n\n    def training_step(self, batch, batch_idx):\n        # training_step defines the train loop.\n        # it is independent of forward\n        x, _ = batch\n        x = x.view(x.size(0), -1)\n        z = self.encoder(x)\n        x_hat = self.decoder(z)\n        loss = nn.functional.mse_loss(x_hat, x)\n        # Logging to TensorBoard (if installed) by default\n        self.log(\"train_loss\", loss)\n        return loss\n\n    def configure_optimizers(self):\n        optimizer = optim.Adam(self.parameters(), lr=1e-3)\n        return optimizer\n\n\n# init the autoencoder\nautoencoder = LitAutoEncoder(encoder, decoder)\n```\n\nExample:\n```text\n# setup data\ndataset = MNIST(os.getcwd(), download=True, transform=ToTensor())\ntrain_loader = utils.data.DataLoader(dataset)\n```\n\nExample:\n```text\n# train the model (hint: here are some helpful Trainer arguments for rapid idea iteration)\ntrainer = L.Trainer(limit_train_batches=100, max_epochs=1)\ntrainer.fit(model=autoencoder, train_dataloaders=train_loader)\n```\n\nExample:\n```text\n# load checkpoint\ncheckpoint = \"./lightning_logs/version_0/checkpoints/epoch=0-step=100.ckpt\"\nautoencoder = LitAutoEncoder.load_from_checkpoint(checkpoint, encoder=encoder, decoder=decoder)\n\n# choose your trained nn.Module\nencoder = autoencoder.encoder\nencoder.eval()\n\n# embed 4 fake images!\nfake_image_batch = torch.rand(4, 28 * 28, device=autoencoder.device)\nembeddings = encoder(fake_image_batch)\nprint(\"⚡\" * 20, \"\\nPredictions (4 image embeddings):\\n\", embeddings, \"\\n\", \"⚡\" * 20)\n```\n\nExample:\n```text\ntensorboard --logdir .\n```\n\nExample:\n```text\n# train on 4 GPUs\ntrainer = L.Trainer(\n    devices=4,\n    accelerator=\"gpu\",\n )\n\n# train 1TB+ parameter models with Deepspeed/fsdp\ntrainer = L.Trainer(\n    devices=4,\n    accelerator=\"gpu\",\n    strategy=\"deepspeed_stage_2\",\n    precision=16\n )\n\n# 20+ helpful flags for rapid idea iteration\ntrainer = L.Trainer(\n    max_epochs=10,\n    min_epochs=5,\n    overfit_batches=1\n )\n\n# access the latest state of the art techniques\ntrainer = L.Trainer(callbacks=[WeightAveraging(...)])\n```\n\nExample:\n```text\nclass LitAutoEncoder(L.LightningModule):\n    def backward(self, loss):\n        loss.backward()\n```\n\nExample:\n```text\ntrainer = Trainer(callbacks=[AWSCheckpoints()])\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:51.544Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":10,"totalLines":128,"estimatedTokens":2364}}216{"id":"doc-2_0_upgrade_guide_pytorch_lightning_2_6_1_docume-19a52eab","source":"documentation","title":"2.0 Upgrade Guide — PyTorch Lightning 2.6.1 documentation","url":"https://lightning.ai/docs/pytorch/stable/upgrade/migration_guide.html","text":"2.6.1 Home Lightning in 15 minutes Install 2.0 Upgrade Guide Level Up Basic skills Intermediate skills Advanced skills Expert skills Core API LightningModule Trainer Optional API accelerators callbacks cli core loggers profiler trainer strategies tuner utilities More Community Examples Glossary How-to Guides Overview Team management Production Security Open source Overview PyTorch Lightning Fabric Lit-GPT Torchmetrics Litdata Lit LLaMA Litserve Examples Glossary FAQ Docs > 2.0 Upgrade Guide Shortcuts 2.0 Upgrade Guide¶ The following section will guide you through updating your code to the 2.x series of releases. Particular versions¶ 2.0.x Upgrade from 2.0.x series to the 2.1. 1.9.x Upgrade from 1.9.x series to the 2.0. 1.8.x Upgrade from 1.8.x series to the 2.0. 1.7.x Upgrade from 1.7.x series to the 2.0. 1.6.x Upgrade from 1.6.x series to the 2.0. 1.5.x Upgrade from 1.5.x series to the 2.0. 1.4.x Upgrade from 1.4.x series to the 2.0. 2.0 Upgrade Guide Particular versions\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:51.546Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":0,"totalLines":3,"estimatedTokens":250}}217{"id":"doc-getblocktimestamp_hardhat_3-b36a3d89","source":"documentation","title":"getBlockTimestamp | Hardhat 3","url":"https://hardhat.org/docs/reference/cheatcodes/environment/get-block-timestamp","text":"Example:\n```text\nfunction getBlockTimestamp() external view returns (uint256 timestamp);\n```\n\nExample:\n```text\nassertEq(vm.getBlockTimestamp(), 1, \"timestamp should be 1\");vm.warp(10);assertEq(vm.getBlockTimestamp(), 10, \"warp failed\");\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:46.259Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":2,"totalLines":11,"estimatedTokens":64}}218{"id":"doc-resumegasmetering_hardhat_3-780f0270","source":"documentation","title":"resumeGasMetering | Hardhat 3","url":"https://hardhat.org/docs/reference/cheatcodes/environment/resume-gas-metering","text":"Example:\n```text\nfunction resumeGasMetering() external;\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:46.267Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":1,"totalLines":6,"estimatedTokens":19}}219{"id":"doc-parsejsonbytes32_hardhat_3-c9501548","source":"documentation","title":"parseJsonBytes32 | Hardhat 3","url":"https://hardhat.org/docs/reference/cheatcodes/external/parse-json-bytes32","text":"Example:\n```text\nfunction parseJsonBytes32(  string calldata json,  string calldata key) external pure returns (bytes32);\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:46.281Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":1,"totalLines":6,"estimatedTokens":35}}220{"id":"doc-parsetomlstring_hardhat_3-2617b4f7","source":"documentation","title":"parseTomlString | Hardhat 3","url":"https://hardhat.org/docs/reference/cheatcodes/external/parse-toml-string","text":"Example:\n```text\nfunction parseTomlString(  string calldata toml,  string calldata key) external pure returns (string memory);\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:46.284Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":1,"totalLines":6,"estimatedTokens":36}}221{"id":"doc-https_hardhat_org_docs_plugin_development_md-c45b1bef","source":"documentation","title":"https://hardhat.org/docs/plugin-development.md","url":"https://hardhat.org/docs/plugin-development.md","text":"`. - **Global Options** are exposed in the CLI and can be used with `--`. When you define a Global Option, its value is available everywhere (Hook Handlers, Hardhat Tasks, tests, etc.). - **Dependencies** specify other plugins that this plugin depends on. Hardhat guarantees that dependencies are loaded before the plugin itself. Read [this guide](/docs/plugin-development/guides/dependencies) to learn how to use them. - **Conditional Dependencies** declare plugins that are loaded only if the user is already using certain other plugins, without forcing those to be loaded. ## Get started Ready to build your first plugin? The [tutorial](/docs/plugin-development/tutorial) walks you through creating a complete plugin from scratch, covering project setup, defining hooks, adding tasks, and testing your plugin.\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:46.300Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":0,"totalLines":3,"estimatedTokens":207}}222{"id":"doc-https_hardhat_org_docs_reference_cheatcodes_envi-0278ee85","source":"documentation","title":"https://hardhat.org/docs/reference/cheatcodes/environment/get-recorded-logs.md","url":"https://hardhat.org/docs/reference/cheatcodes/environment/get-recorded-logs.md","text":".Log[] // as opposed to .Log[] Vm.Log[] memory entries = vm.getRecordedLogs(); assertEq(entries.length, 2); // Recall that topics[0] is the event signature assertEq(entries[0].topics.length, 2); assertEq(entries[0].topics[0], keccak256(\"LogTopic1(uint256,bytes)\")); assertEq(entries[0].topics[1], bytes32(uint256(10))); // assertEq won't compare bytes variables. Try with strings instead. assertEq(abi.decode(entries[0].data, (string)), string(testData0)); assertEq(entries[1].topics.length, 3); assertEq(entries[1].topics[0], keccak256(\"LogTopic12(uint256,uint256,bytes)\")); assertEq(entries[1].topics[1], bytes32(uint256(20))); assertEq(entries[1].topics[2], bytes32(uint256(30))); assertEq(abi.decode(entries[1].data, (string)), string(testData1)); // Emit another event emit LogTopic1(40, testData0); // Your last read consumed the recorded logs, // you will only get the latest emitted even after that call entries = vm.getRecordedLogs(); assertEq(entries.length, 1); assertEq(entries[0].topics.length, 2); assertEq(entries[0].topics[0], keccak256(\"LogTopic1(uint256,bytes)\")); assertEq(entries[0].topics[1], bytes32(uint256(40))); assertEq(abi.decode(entries[0].data, (string)), string(testData0)); ```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:46.340Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":0,"totalLines":3,"estimatedTokens":306}}223{"id":"doc-hardhat_3_errors_hardhat_3-9c1caeb6","source":"documentation","title":"Hardhat 3 errors | Hardhat 3","url":"https://hardhat.org/docs/reference/errors","text":"Example:\n```text\nimport { someChain } from \"viem/chains\";const client = await hre.viem.getPublicClient({  chain: someChain,  ...});\n```\n\nExample:\n```text\nconst networkConnection = await hre.network.create(...);const walletClient = await networkConnection.viem.getWalletClient(address);\nawait networkConnection.viem.deployContract(contractName, constructorArgs, { walletClient });await networkConnection.viem.sendDeploymentTransaction(contractName, constructorArgs, { walletClient });await networkConnection.viem.getContractAt(contractName, address, { walletClient });\n```\n\nExample:\n```text\nnpx hardhat verify --list-networks\n```\n\nExample:\n```text\nnpx hardhat verify --contract contracts/Example.sol:ExampleContract <other args>\n```\n\nExample:\n```text\ncontracts/Math.sol:SafeMath\n```\n\nExample:\n```text\npath/to/LibraryFile.sol:LibraryName\n```\n\nExample:\n```text\nchainDescriptors: {  <chainId>: {    name: <name>,    blockExplorers: {      blockscout: { name: \"Blockscout\", url: <blockscout-url> apiUrl: <blockscout-api-url> };      etherscan: { name: \"Etherscan\", url: <etherscan-url> apiUrl: <etherscan-api-url> };    }  }}\n```\n\nExample:\n```text\nexport default [\"arg1\", \"arg2\", ...];\n```\n\nExample:\n```text\nexport default { lib1: \"0x...\", lib2: \"0x...\", ... };\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:46.348Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":9,"totalLines":47,"estimatedTokens":319}}224{"id":"doc-istio_oracle_cloud_infrastructure-dbfb2588","source":"documentation","title":"Istio / Oracle Cloud Infrastructure","url":"https://istio.io/latest/docs/setup/platform-setup/oci/","text":"Example:\n```bash\n$ oci ce cluster create \\\n      --name <oke-cluster-name> \\\n      --kubernetes-version <kubernetes-version> \\\n      --compartment-id <compartment-ocid> \\\n      --vcn-id <vcn-ocid>\n```\n\nExample:\n```bash\n$ oci ce cluster create-kubeconfig \\\n      --cluster-id <cluster-ocid> \\\n      --file $HOME/.kube/config  \\\n      --token-version 2.0.0 \\\n      --kube-endpoint [PRIVATE_ENDPOINT|PUBLIC_ENDPOINT]\n```\n\nExample:\n```bash\n$ kubectl get nodes\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:46.930Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":3,"totalLines":24,"estimatedTokens":119}}225{"id":"doc-istio_securing_prometheus_scraping_for_istio_sid-9cf13641","source":"documentation","title":"Istio / Securing Prometheus Scraping for Istio Sidecar and Gateway","url":"https://istio.io/latest/docs/tasks/observability/metrics/secure-metrics/","text":"Example:\n```bash\n$ kubectl create namespace prometheus\n$ kubectl label namespace monitoring istio-injection=enabled --overwrite\n```\n\nExample:\n```yaml\napiVersion: apps/v1\nkind: Deployment\nmetadata:\n  name: prometheus\n  namespace: monitoring\nspec:\n  template:\n    metadata:\n      annotations:\n        sidecar.istio.io/inject: \"true\"\n        sidecar.istio.io/userVolumeMount: |\n          [{\"name\": \"istio-certs\", \"mountPath\": \"/etc/istio-certs\", \"readOnly\": true}]\n        proxy.istio.io/config: |\n          proxyMetadata:\n            OUTPUT_CERTS: /etc/istio-certs\n          proxyMetadata.INBOUND_CAPTURE_PORTS: \"\"\n    spec:\n      containers:\n      - name: prometheus\n        image: prom/prometheus:latest\n      volumes:\n      - name: istio-certs\n        secret:\n          secretName: istio.default\n```\n\nExample:\n```yaml\n- job_name: 'istio-secure-merged-metrics'\n  kubernetes_sd_configs:\n  - role: pod\n  relabel_configs:\n  - source_labels: [__meta_kubernetes_pod_annotation_prometheus_istio_io_secure_port]\n    action: keep\n    regex: .+\n  - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_path]\n    action: replace\n    target_label: __metrics_path__\n    regex: (.+)\n  - source_labels:\n    - __meta_kubernetes_pod_ip\n    - __meta_kubernetes_pod_annotation_prometheus_istio_io_secure_port\n    action: replace\n    target_label: __address__\n    regex: (.+);(.+)\n    replacement: $1:$2\n  scheme: https\n  tls_config:\n    ca_file: /etc/istio-certs/root-cert.pem\n    cert_file: /etc/istio-certs/cert-chain.pem\n    key_file: /etc/istio-certs/key.pem\n    insecure_skip_verify: true\n```\n\nExample:\n```bash\n$ kubectl get pod <prometheus-pod> -n monitoring -o jsonpath='{.spec.containers[*].name}'\n```\n\nExample:\n```bash\n$ kubectl label namespace default istio-injection=enabled --overwrite\n$ kubectl apply -f @samples/httpbin/httpbin.yaml\n```\n\nExample:\n```bash\n$ kubectl annotate pod -n default \\\n  -l app=httpbin \\\n  prometheus.io/scrape=\"true\" \\\n  prometheus.io/path=\"/stats/prometheus\" \\\n  prometheus.istio.io/secure-port=\"15091\" \\\n  --overwrite\n```\n\nExample:\n```bash\n$ cat <<EOF | kubectl apply -f -\napiVersion: networking.istio.io/v1\nkind: Sidecar\nmetadata:\n  name: secure-metrics\n  namespace: default\nspec:\n  ingress:\n  - port:\n      number: 15091\n      name: https-metrics\n      protocol: HTTP\n    defaultEndpoint: 127.0.0.1:15020 # Change to 15090 for Envoy-only metrics\nEOF\n```\n\nExample:\n```bash\n$ cat <<EOF | kubectl apply -f -\napiVersion: networking.istio.io/v1\nkind: Gateway\nmetadata:\n  name: httpbin-gateway\n  namespace: default\nspec:\n  selector:\n    istio: ingressgateway\n  servers:\n  - port:\n      number: 80\n      name: http\n      protocol: HTTP\n    hosts: [\"*\"]\n  - port:\n      number: 15091\n      name: https-metrics\n      protocol: HTTPS\n    tls:\n      mode: ISTIO_MUTUAL\n    hosts: [\"*\"]\nEOF\n```\n\nExample:\n```bash\n$ cat <<EOF | kubectl apply -f -\napiVersion: networking.istio.io/v1\nkind: ServiceEntry\nmetadata:\n  name: gateway-admin\n  namespace: istio-system\nspec:\n  hosts: [gateway-admin.local]\n  location: MESH_INTERNAL\n  ports:\n  - number: 15020  # Change to 15090 for Envoy-only metrics\n    name: http-metrics\n    protocol: HTTP\n  resolution: STATIC\n  endpoints:\n  - address: 127.0.0.1\nEOF\n```\n\nExample:\n```bash\n$ cat <<EOF | kubectl apply -f -\napiVersion: networking.istio.io/v1\nkind: VirtualService\nmetadata:\n  name: gateway-metrics\n  namespace: default\nspec:\n  hosts: [\"*\"]\n  gateways: [httpbin-gateway]\n  http:\n  - match:\n    - uri:\n        prefix: /stats/prometheus\n    route:\n    - destination:\n        host: gateway-admin.local\n        port:\n          number: 15020  # Change to 15090 for Envoy-only metrics\nEOF\n```\n\nExample:\n```bash\n$ kubectl annotate pod -n istio-system <ingress-pod> prometheus.istio.io/secure-port=15091 --overwrite\n```\n\nExample:\n```bash\n$ istioctl dashboard prometheus\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:46.931Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":12,"totalLines":183,"estimatedTokens":960}}226{"id":"doc-istio_protocol_selection-962f4d0d","source":"documentation","title":"Istio / Protocol Selection","url":"https://istio.io/latest/docs/ops/configuration/traffic-management/protocol-selection/","text":"Example:\n```yaml\nkind: Service\nmetadata:\n  name: myservice\nspec:\n  ports:\n  - port: 3306\n    name: database\n    appProtocol: https\n  - port: 80\n    name: http-web\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:46.932Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":1,"totalLines":15,"estimatedTokens":45}}227{"id":"doc-istio_verifying_istio_sidecar_injection_with_ist-6f46b902","source":"documentation","title":"Istio / Verifying Istio Sidecar Injection with Istioctl Check-Inject","url":"https://istio.io/latest/docs/ops/diagnostic-tools/check-inject/","text":"Example:\n```bash\n$ istioctl experimental check-inject -n <namespace> <pod-name>\n```\n\nExample:\n```bash\n$ istioctl experimental check-inject -n <namespace> deploy/<deployment-name>\n```\n\nExample:\n```bash\n$ istioctl experimental check-inject -n <namespace> -l <label-key>=<label-value>\n```\n\nExample:\n```bash\n$ istioctl experimental check-inject -n hello httpbin-1234\n$ istioctl experimental check-inject -n hello deploy/httpbin\n$ istioctl experimental check-inject -n hello -l app=httpbin\n```\n\nExample:\n```plain\nWEBHOOK                      REVISION  INJECTED      REASON\nistio-revision-tag-default   default   ✔             Namespace label istio-injection=enabled matches\nistio-sidecar-injector-1-18  1-18      ✘             No matching namespace labels (istio.io/rev=1-18) or pod labels (istio.io/rev=1-18)\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:46.934Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":5,"totalLines":30,"estimatedTokens":206}}228{"id":"doc-istio_gatewayportnotdefinedonservice-ecb5e098","source":"documentation","title":"Istio / GatewayPortNotDefinedOnService","url":"https://istio.io/latest/docs/reference/config/analysis/ist0162/","text":"Example:\n```yaml\n# Gateway with bogus ports\n\napiVersion: networking.istio.io/v1\nkind: Gateway\nmetadata:\n  name: istio-ingressgateway\nspec:\n  selector:\n    istio: ingressgateway\n  servers:\n  - port:\n      number: 80\n      name: http\n      protocol: HTTP\n    hosts:\n    - \"*\"\n  - port:\n      number: 8004\n      name: http2\n      protocol: HTTP\n    hosts:\n    - \"*\"\n---\n\n# Default Gateway Service\n\napiVersion: v1\nkind: Service\nmetadata:\n  name: istio-ingressgateway\nspec:\n  selector:\n    istio: ingressgateway\n  ports:\n  - name: status-port\n    port: 15021\n    protocol: TCP\n    targetPort: 15021\n  - name: http2\n    port: 80\n    protocol: TCP\n    targetPort: 8080\n  - name: https\n    port: 443\n    protocol: TCP\n    targetPort: 8443\n```\n\nExample:\n```yaml\n# Gateway with correct ports\n\napiVersion: networking.istio.io/v1\nkind: Gateway\nmetadata:\n  name: istio-ingressgateway\nspec:\n  selector:\n    istio: ingressgateway\n  servers:\n  - port:\n      number: 8080\n      name: http2\n      protocol: HTTP\n    hosts:\n    - \"*\"\n  - port:\n      number: 8443\n      name: https\n      protocol: HTTP\n    hosts:\n    - \"*\"\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:46.936Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":2,"totalLines":77,"estimatedTokens":281}}229{"id":"doc-git_git_config_documentation-d36ca020","source":"documentation","title":"Git - git-config Documentation","url":"http://git-scm.com/docs/git-config/zh_HANS-CN","text":"Example:\n```text\ngit config list [<文件选项>] [<展示选项>] [--includes]\ngit config get [<文件选项>] [<display-option>] [--includes] [--all] [--regexp=<正则表达式>] [--value=<value>] [--fixed-value] [--default=<default>] <名称>\ngit config set [<文件选项>] [--type=<类型>] [--all] [--value=<value>] [--fixed-value] <名称> <value>\ngit config unset [<文件选项>] [--all] [--value=<value>] [--fixed-value] <名称> <value>\ngit config rename-section [<文件选项>] <旧名称> <新名称>\ngit config remove-section [<文件选项>] <名称>\ngit config edit [<文件选项>]\ngit config [<文件选项>] --get-colorbool <名称> [<标准输出是否是终端>]\n```\n\nExample:\n```text\n#\n# 这就是配置文件,并且\n# 一个'#' 或 ';' 字符表示\n# 一个注释\n#\n\n; 核心变量\n[core]\n\t; 不信任文件模式\n\tfilemode = false\n\n; 我们的差异算法\n[diff]\n\texternal = /usr/local/bin/diff-wrapper\n\trename = true\n\n; 代理设置\n[core]\n\tgitproxy=proxy-command for kernel.org\n\tgitproxy=default-proxy ; 适用于其他所有网站\n\n; HTTP\n[http]\n\tsslVerify\n[http \"https://weak.example.com\"]\n\tsslVerify = false\n\tcookiFile= /tmp/cookie.txt\n```\n\nExample:\n```text\n% git config core.filemode true\n```\n\nExample:\n```text\n% git config --get core.gitproxy \"for kernel.org$\"\n```\n\nExample:\n```text\n% git config --unset diff.renames\n```\n\nExample:\n```text\n% git config --get core.filemode\n```\n\nExample:\n```text\n% git config --get-all core.gitproxy\n```\n\nExample:\n```text\n% git config --replace-all core.gitproxy ssh\n```\n\nExample:\n```text\n% git config section.key value '[!]'\n```\n\nExample:\n```text\n% git config --add core.gitproxy '\"proxy-command\" for example.com'\n```\n\nExample:\n```text\n#!/bin/sh\nWS=$(git config --get-color color.diff.whitespace \"blue reverse\")\nRESET=$(git config --get-color \"\" \"reset\")\necho \"${WS}your whitespace color or blue reverse${RESET}\"\n```\n\nExample:\n```text\n% git config --type=bool --get-urlmatch http.sslverify https://good.example.com\ntrue\n% git config --type=bool --get-urlmatch http.sslverify https://weak.example.com\nfalse\n% git config --get-urlmatch http https://weak.example.com\nhttp.cookieFile /tmp/cookie.txt\nhttp.sslverify false\n```\n\nExample:\n```text\n[section \"小节\"]\n```\n\nExample:\n```text\n# 核心变量\n[core]\n\t; 不信任文件模式\n\tfilemode = false\n\n# 我们的差异算法\n[diff]\n\texternal = /usr/local/bin/diff-wrapper\n\trenames = true\n\n[branch \"devel\"]\n\tremote = origin\n\tmerge = refs/heads/devel\n\n# 代理设置\n[core]\n\tgitProxy=\"ssh\" for \"kernel.org\"\n\tgitProxy=default-proxy ; 其余为\n\n[include]\n\tpath = /path/to/foo.inc ; 按绝对路径包含\n\tpath = foo.inc ; find \"foo.inc\" 相对于当前文件\n\tpath = ~/foo.inc ; 在您的 `$HOME` 目录中找到 \"foo.inc\"\n\n;如果 $GIT_DIR 是 /path/to/foo/.git 就包含\n[includeIf \"gitdir:/path/to/foo/.git\"]\n\tpath = /path/to/foo.inc\n\n;包括 /path/to/group 内的所有仓库\n[includeIf \"gitdir:/path/to/group/\"]\n\tpath = /path/to/foo.inc\n\n; 包括 $HOME/to/group 内的所有仓库\n[includeIf \"gitdir:~/to/group/\"]\n\tpath = /path/to/foo.inc\n\n; 相对路径总是相对于包括\n; 文件(如果条件为真);其位置不受\n; 的位置不受条件的影响。\n[includeIf \"gitdir:/path/to/group/\"]\n\tpath = foo.inc\n\n; 只有工作区当前检出了 foo-branch\n; 才包括\n[includeIf \"onbranch:foo-branch\"] 。\n\t路径 = foo.inc\n\n; 只有在给定 URL 的远程仓库存在的情况下才包括(注意\n; 这样的URL可能在以后的文件中提供,或者在这个文件被读取后的一个\n; 文件中提供,正如在这个例子中看到的那样)\n[includeIf \"hasconfig:remote.*.url:https://example.com/*\" ]\n\t路径 = foo.inc\n[remote \"origin\"]\n\turl = https://example.com/git\n```\n\nExample:\n```text\n例如:\n\n/etc/gitconfig\n  push.pushoption = a\n  push.pushoption = b\n\n~/.gitconfig\n  push.pushoption = c\n\nrepo/.git/config\n  push.pushoption =\n  push.pushoption = b\n\n这将导致只剩下 b(a 和 c 被清除)。\n```\n\nExample:\n```text\np deadbee 本次提交的一行说明\np fa1afe1 下一次提交的一行说明\n...\n```\n\nExample:\n```text\npick deadbee 本次提交的一行说明\npick fa1afe1 下一次提交的一行说明\n...\n```\n\nExample:\n```text\n[section.subsection]\n    key = value1\n```\n\nExample:\n```text\n[section.subsection]\n    key = value1\n    key = value2\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:37.988Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":19,"totalLines":211,"estimatedTokens":891}}230{"id":"doc-git_gitweb_documentation-6603d318","source":"documentation","title":"Git - gitweb Documentation","url":"http://git-scm.com/docs/gitweb","text":"Example:\n```text\nour $projectroot = '/path/to/parent/directory';\n```\n\nExample:\n```text\nfoo.git       Joe+R+Hacker+<joe@example.com>\nfoo/bar.git   O+W+Ner+<owner@example.org>\n```\n\nExample:\n```text\nread_config_file(\"gitweb_config.perl\");\n$projects_list = $projectroot;\n```\n\nExample:\n```text\n#!/bin/sh\n\nexport GITWEB_CONFIG=\"gitweb_make_index.perl\"\nexport GATEWAY_INTERFACE=\"CGI/1.1\"\nexport HTTP_ACCEPT=\"*/*\"\nexport REQUEST_METHOD=\"GET\"\nexport QUERY_STRING=\"a=project_index\"\n\nperl -- /var/www/cgi-bin/gitweb.cgi\n```\n\nExample:\n```text\nour $export_ok = \"git-daemon-export-ok\";\n```\n\nExample:\n```text\n$export_auth_hook = sub {\n\tuse Apache2::SubRequest ();\n\tuse Apache2::Const -compile => qw(HTTP_OK);\n\tmy $path = \"$_[0]/HEAD\";\n\tmy $r    = Apache2::RequestUtil->request;\n\tmy $sub  = $r->lookup_file($path);\n\treturn $sub->filename eq $path\n\t    && $sub->status == Apache2::Const::HTTP_OK;\n};\n```\n\nExample:\n```text\nUnnamed repository; edit this file to name it for gitweb.\n```\n\nExample:\n```text\n.../gitweb.cgi/<repo>/<action>/<revision>:/<path>?<arguments>\n```\n\nExample:\n```text\n.../gitweb.cgi/<repo>/<action>/<revision-from>:/<path-from>..<revision-to>:/<path-to>?<arguments>\n```\n\nExample:\n```text\n$feature{'blame'}{'default'} = [1];\n```\n\nExample:\n```text\nScriptAlias /cgi-bin/ \"/var/www/cgi-bin/\"\n\n<Directory \"/var/www/cgi-bin\">\n    Options Indexes FollowSymlinks ExecCGI\n    AllowOverride None\n    Order allow,deny\n    Allow from all\n</Directory>\n```\n\nExample:\n```text\nhttp://server/cgi-bin/gitweb.cgi\n```\n\nExample:\n```text\nAlias /perl \"/var/www/perl\"\n\n<Directory \"/var/www/perl\">\n    SetHandler perl-script\n    PerlResponseHandler ModPerl::Registry\n    PerlOptions +ParseHeaders\n    Options Indexes FollowSymlinks +ExecCGI\n    AllowOverride None\n    Order allow,deny\n    Allow from all\n</Directory>\n```\n\nExample:\n```text\nhttp://server/perl/gitweb.cgi\n```\n\nExample:\n```text\nFastCgiServer /usr/share/gitweb/gitweb.cgi\nScriptAlias /gitweb /usr/share/gitweb/gitweb.cgi\n\nAlias /gitweb/static /usr/share/gitweb/static\n<Directory /usr/share/gitweb/static>\n    SetHandler default-handler\n</Directory>\n```\n\nExample:\n```text\nhttp://server/gitweb\n```\n\nExample:\n```text\n<VirtualHost *:80>\n    ServerName    git.example.org\n    DocumentRoot  /pub/git\n    SetEnv        GITWEB_CONFIG   /etc/gitweb.conf\n\n    # turning on mod rewrite\n    RewriteEngine on\n\n    # make the front page an internal rewrite to the gitweb script\n    RewriteRule ^/$  /cgi-bin/gitweb.cgi\n\n    # make access for \"dumb clients\" work\n    RewriteRule ^/(.*\\.git/(?!/?(HEAD|info|objects|refs)).*)?$ \\\n\t\t/cgi-bin/gitweb.cgi%{REQUEST_URI}  [L,PT]\n</VirtualHost>\n```\n\nExample:\n```text\n@stylesheets = (\"/some/absolute/path/gitweb.css\");\n$my_uri    = \"/\";\n$home_link = \"/\";\n$per_request_config = 1;\n```\n\nExample:\n```text\n<VirtualHost *:80>\n    ServerName    git.example.org\n    DocumentRoot  /pub/git\n    SetEnv        GITWEB_CONFIG  /etc/gitweb.conf\n\n    # turning on mod rewrite\n    RewriteEngine on\n\n    # make the front page an internal rewrite to the gitweb script\n    RewriteRule ^/$  /cgi-bin/gitweb.cgi  [QSA,L,PT]\n\n    # look for a public_git directory in unix users' home\n    # http://git.example.org/~<user>/\n    RewriteRule ^/\\~([^\\/]+)(/|/gitweb.cgi)?$\t/cgi-bin/gitweb.cgi \\\n\t\t[QSA,E=GITWEB_PROJECTROOT:/home/$1/public_git/,L,PT]\n\n    # http://git.example.org/+<user>/\n    #RewriteRule ^/\\+([^\\/]+)(/|/gitweb.cgi)?$\t/cgi-bin/gitweb.cgi \\\n\t\t [QSA,E=GITWEB_PROJECTROOT:/home/$1/public_git/,L,PT]\n\n    # http://git.example.org/user/<user>/\n    #RewriteRule ^/user/([^\\/]+)/(gitweb.cgi)?$\t/cgi-bin/gitweb.cgi \\\n\t\t [QSA,E=GITWEB_PROJECTROOT:/home/$1/public_git/,L,PT]\n\n    # defined list of project roots\n    RewriteRule ^/scm(/|/gitweb.cgi)?$ /cgi-bin/gitweb.cgi \\\n\t\t[QSA,E=GITWEB_PROJECTROOT:/pub/scm/,L,PT]\n    RewriteRule ^/var(/|/gitweb.cgi)?$ /cgi-bin/gitweb.cgi \\\n\t\t[QSA,E=GITWEB_PROJECTROOT:/var/git/,L,PT]\n\n    # make access for \"dumb clients\" work\n    RewriteRule ^/(.*\\.git/(?!/?(HEAD|info|objects|refs)).*)?$ \\\n\t\t/cgi-bin/gitweb.cgi%{REQUEST_URI}  [L,PT]\n</VirtualHost>\n```\n\nExample:\n```text\n$projectroot = $ENV{'GITWEB_PROJECTROOT'} || \"/pub/git\";\n```\n\nExample:\n```text\nhttp://git.example.org/~<user>/\n```\n\nExample:\n```text\n$feature{'pathinfo'}{'default'} = [1];\n```\n\nExample:\n```text\nhttp://git.example.com/project.git/shortlog/sometag\n```\n\nExample:\n```text\n<VirtualHost *:80>\n\tServerAlias git.example.com\n\n\tDocumentRoot /var/www/gitweb\n\n\t<Directory /var/www/gitweb>\n\t\tOptions ExecCGI\n\t\tAddHandler cgi-script cgi\n\n\t\tDirectoryIndex gitweb.cgi\n\n\t\tRewriteEngine On\n\t\tRewriteCond %{REQUEST_FILENAME} !-f\n\t\tRewriteCond %{REQUEST_FILENAME} !-d\n\t\tRewriteRule ^.* /gitweb.cgi/$0 [L,PT]\n\t</Directory>\n</VirtualHost>\n```\n\nExample:\n```text\n<VirtualHost *:80>\n\tServerAlias git.example.com\n\n\tDocumentRoot /var/www/gitweb\n\n\tAliasMatch ^(/.*?)(\\.git)(/.*)?$ /pub/git$1$3\n\t<Directory /var/www/gitweb>\n\t\tOptions ExecCGI\n\t\tAddHandler cgi-script cgi\n\n\t\tDirectoryIndex gitweb.cgi\n\n\t\tRewriteEngine On\n\t\tRewriteCond %{REQUEST_FILENAME} !-f\n\t\tRewriteCond %{REQUEST_FILENAME} !-d\n\t\tRewriteRule ^.* /gitweb.cgi/$0 [L,PT]\n\t</Directory>\n</VirtualHost>\n```\n\nExample:\n```text\nhttp://git.example.com/project.git\n```\n\nExample:\n```text\nhttp://git.example.com/project\n```\n\nExample:\n```text\nhttp://git.example.com/project/command/abranch..git/abranch\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:38.676Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":28,"totalLines":265,"estimatedTokens":1326}}231{"id":"doc-google_cloud_integration_api_gitlab_docs-15c05474","source":"documentation","title":"Google Cloud integration API | GitLab Docs","url":"https://docs.gitlab.com/api/google_cloud_integration/","text":"Getting startedTutorialsIntegrationsWebhooksREST APIResources.gitignore (templates).gitlab-ci.yml (templates)Access requestsAgent for KubernetesAI Catalog adminAlert managementApplication appearanceApplication settingsApplication statisticsApplicationsAttestationsAudit eventsAvatarBranchesBroadcast messagesCluster discovery (certificate-based) (deprecated)Code SuggestionsCommitsCompliance and policy settingsContainer registryContainer virtual registryCustom attributesDatabase migrationsData managementDependenciesDependency list exportDeploy keysDeploy tokensDeploymentsDiscussionsDockerfile (templates)DORA4 metricsEmoji reactionsEnvironmentsEpics (deprecated)Error trackingEventsExperimentsExternal status checksFeature flagsFeature flag user listsFlowsFreeze periodsGeo nodes (deprecated)Geo sitesGitLab Duo Chat completionsGitLab PagesGLQLGoogle Cloud integrationGroupsImportInstance CI/CD variablesInvitationsIssuesIssues (epic) (deprecated)Issues statisticsJobsJob artifactsJob token scopesKeysLicenseLicenses (templates)Linked epics (deprecated)Links (issue)Links (epic) (deprecated)Lint .gitlab-ci.ymlMarkdownMaven virtual registryMember rolesMerge request approvalsMerge request approval settingsMerge request context commitsMerge requestsMerge trainsMetadataModel registryNamespacesNotes (comments)Notification settingsOrbitOrganizationsPackage registryPages domainsPersonal access tokensPipeline schedulesPipeline trigger tokensPipelinesPlan limitsProjectsRepositoriesRepository filesRepository submodulesResource groupResource iteration eventsResource label eventsResource milestone eventsResource state eventsResource weight eventsRunnersRunner controllersRunner controller tokensSearchSearch migrationsSecrets Manager APISecure filesService accountsService PingSidekiq metricsSidekiq queuesSnippet repository storage movesSnippetsSuggestionsSystem hooksTagsTo-Do ListToken informationTopicsUsersUser applicationsVirtual registries cleanup policiesVulnerabilitiesVulnerability archive exportVulnerability exportVulnerability findingsWeb commitsAuthenticationThird-party clientsDeprecations and removalsOpenAPIAutomate storage managementTroubleshootingGraphQL APIOAuth 2.0 identity provider APIGitLab MCP serverGitLab Duo CLI (duo)GitLab CLI (glab)Editor and IDE extensionsGitLab Docs /Extend /REST API /Resources /Google Cloud integrationHelp us learn about your current experience with the documentation. Take the survey.Google Cloud integration , Premium, : ExperimentUse this API to interact with the Google Cloud integration. For more information, see GitLab and Google Cloud integration.Project-level Google Cloud integration identity federation creation scriptUsers with the Maintainer or Owner role for the project can use the following endpoint to query a shell script that creates and configures the workload identity federation in Google /projects/:id/google_cloud/setup/wlif.shSupported ID of a project.google_cloud_project_idstringYesGoogle Cloud Project ID for the workload identity federation.google_cloud_workload_identity_pool_idstringNoID of the Google Cloud workload identity pool to create. Defaults to gitlab-wlif.google_cloud_workload_identity_pool_display_namestringNoDisplay name of the Google Cloud workload identity pool to create. Defaults to WLIF for GitLab integration.google_cloud_workload_identity_pool_provider_idstringNoID of the Google Cloud workload identity pool provider to create. Defaults to gitlab-wlif-oidc-provider.google_cloud_workload_identity_pool_provider_display_namestringNoDisplay name of the Google Cloud workload identity pool provider to create. Defaults to GitLab OIDC provider.Example --request GET \\ --header \"PRIVATE-TOKEN: <your_access_token>\" \\ --url \"https://gitlab.com/api/v4/projects/<your_project_id>/google_cloud/setup/wlif.sh\"Script to set up a Google Cloud integrationUsers with the Maintainer or Owner role for the project can use the following endpoint to query a shell script to set up a Google Cloud /projects/:id/google_cloud/setup/integrations.shOnly the Google Artifact Management integration is supported. The script creates IAM policies to access Google Artifact Registry Reader role is granted to members with at least Reporter roleArtifact Registry Writer role is granted to members with at least Developer roleSupported ID of a GitLab project.enable_google_cloud_artifact_registrybooleanYesFlag to indicate if Google Artifact Management integration should be enabled.google_cloud_artifact_registry_project_idstringYesGoogle Cloud Project ID for the Artifact Registry.Example --request GET \\ --header \"PRIVATE-TOKEN: <your_access_token>\" \\ --url \"https://gitlab.com/api/v4/projects/<your_project_id>/google_cloud/setup/integrations.sh\"Script to configure a Google Cloud project for runner provisioningUsers with the Maintainer or Owner role for the project can use the following endpoint to query a shell script to configure a Google Cloud project for runner provisioning and /projects/:id/google_cloud/setup/runner_deployment_project.shThe script performs preparatory configuration steps in the specified Google Cloud project, namely enabling required services and creating a GRITProvisioner role and a grit-provisioner service account.Supported ID of a GitLab project.google_cloud_project_idstringYesThe ID of the Google Cloud project.Example --request GET \\ --header \"PRIVATE-TOKEN: <your_access_token>\" \\ --url \"https://gitlab.com/api/v4/projects/<your_project_id>/google_cloud/setup/runner_deployment_project.sh?google_cloud_project_id=<your_google_cloud_project_id>\"Project-level Google Cloud integration scriptsWorkload identity federation creation scriptScript to set up a Google Cloud integrationScript to configure a Google Cloud project for runner provisioning\n\nExample:\n```plaintext\nGET /projects/:id/google_cloud/setup/wlif.sh\n```\n\nExample:\n```shell\ncurl --request GET \\\n     --header \"PRIVATE-TOKEN: <your_access_token>\" \\\n     --url \"https://gitlab.com/api/v4/projects/<your_project_id>/google_cloud/setup/wlif.sh\"\n```\n\nExample:\n```plaintext\nGET /projects/:id/google_cloud/setup/integrations.sh\n```\n\nExample:\n```shell\ncurl --request GET \\\n     --header \"PRIVATE-TOKEN: <your_access_token>\" \\\n     --url \"https://gitlab.com/api/v4/projects/<your_project_id>/google_cloud/setup/integrations.sh\"\n```\n\nExample:\n```plaintext\nGET /projects/:id/google_cloud/setup/runner_deployment_project.sh\n```\n\nExample:\n```shell\ncurl --request GET \\\n     --header \"PRIVATE-TOKEN: <your_access_token>\" \\\n     --url \"https://gitlab.com/api/v4/projects/<your_project_id>/google_cloud/setup/runner_deployment_project.sh?google_cloud_project_id=<your_google_cloud_project_id>\"\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:10.946Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":6,"totalLines":39,"estimatedTokens":1670}}232{"id":"doc-azure_for_java_developer_documentation_java_on_a-bc336572","source":"documentation","title":"Azure for Java Developer Documentation - Java on Azure | Microsoft Learn","url":"https://learn.microsoft.com/en-us/azure/developer/java/","text":"Azure for Java developer documentation Get started developing apps for the cloud with these tutorials and tools for Java developers. Get started with Java on Azure Code, deploy, and scale Java your way Code using the Java tools you know and love Deploy with confidence and ease Scale with security, monitoring, automation Choose the right Azure services See more Azure AI for Java Develop using Foundry Tools Enterprise chat using RAG See more Tools, IDEs, and supported JDKs Java support Java JDK installation Java Docker images for Azure See more Migrate to Azure GitHub Copilot modernization for Java Spring to Azure Container Apps Tomcat to Azure App Service See more Azure App Service Create a Java app Configure Java See App Service documentation Azure Container Apps Launch your first Java app Get started using IntelliJ Overview See more Secure apps using the Microsoft identity platform Overview Secure Spring Boot apps Secure Tomcat apps See more Azure SDK for Java Libraries, drivers, and Spring modules Azure development using Maven Introducing Azure SDK for Java See more Spring on Azure integration What is Spring Cloud Azure? Spring Data for Azure Cosmos DB Deploy a Spring Boot app See more Containerization Overview Establish a baseline Containerize for Kubernetes See more Azure Functions Create an Azure Function Create a Spring Cloud Function Developer guide See Azure Functions documentation Monitoring Java apps Get started with Application Insights Get started with ELK Monitor Spring apps See Azure Monitor documentation Securing Java apps Enable end-user authentication Microsoft Authentication Library Manage app secrets See Active Directory documentation Java EE, Jakarta EE, and MicroProfile Oracle WebLogic Server on Azure VMs Deploy a Java EE app to AKS See Java EE documentation Tools Azure Toolkit for IntelliJ Visual Studio Code Azure Toolkit for Eclipse Maven Gradle Azure CLI Jenkins on Azure Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:49.427Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":0,"totalLines":3,"estimatedTokens":508}}233{"id":"doc-deploy_resources_with_azure_portal_azure_resourc-798d734b","source":"documentation","title":"Deploy resources with Azure portal - Azure Resource Manager | Microsoft Learn","url":"https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/deploy-portal","text":"Example:\n```json\n\"storageAccountName\": \"[format('azstore{0}', uniquestring(resourceGroup().id))]\"\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:49.514Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":1,"totalLines":6,"estimatedTokens":29}}234{"id":"doc-quickstart_deploy_an_aspire_app_azure_app_servic-44c2c074","source":"documentation","title":"Quickstart: Deploy an Aspire app - Azure App Service | Microsoft Learn","url":"https://learn.microsoft.com/en-us/azure/app-service/quickstart-dotnet-aspire","text":"Example:\n```bash\ndotnet tool install -g Aspire.Cli\n```\n\nExample:\n```bash\naspire new aspire-starter --name aspire-starter\n```\n\nExample:\n```bash\ncd aspire-starter\n```\n\nExample:\n```bash\naspire add azure-appservice\n```\n\nExample:\n```csharp\nbuilder.AddAzureAppServiceEnvironment(\"app-service-env\");\n```\n\nExample:\n```csharp\nvar apiService = builder.AddProject<Projects.aspire_starter_ApiService>(\"apiservice\")\n    .WithExternalHttpEndpoints()\n    .WithHttpHealthCheck(\"/health\");\n```\n\nExample:\n```bash\nazd init\n```\n\nExample:\n```bash\nazd auth login\n```\n\nExample:\n```bash\nazd up\n```\n\nExample:\n```output\nDeploying services (azd deploy)\n\n  (✓) Done: Deploying service apiservice\n  - Endpoint: https://apiservice-xxxxxx.azurewebsites.net/ \n\n  (✓) Done: Deploying service webfrontend\n  - Endpoint: https://webfrontend-xxxxxx.azurewebsites.net/ \n\n  Aspire Dashboard: https://app-service-env-aspiredashboard-xxxxxx.azurewebsites.net\n\nSUCCESS: Your up workflow to provision and deploy to Azure completed in 1 minute 49 seconds.\n```\n\nExample:\n```text\nwebfrontend: https://webfrontend-xxxxx.azurewebsites.net\n```\n\nExample:\n```bash\nazd down\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:49.516Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":12,"totalLines":73,"estimatedTokens":285}}235{"id":"doc-tutorial_deploy_a_python_django_web_app_with_pos-a01033dd","source":"documentation","title":"Tutorial: Deploy a Python Django web app with PostgreSQL - Azure App Service | Microsoft Learn","url":"https://learn.microsoft.com/en-us/azure/app-service/tutorial-python-postgresql-app-django","text":"Example:\n```bash\nmkdir msdocs-django-postgresql-sample-app\ncd msdocs-django-postgresql-sample-app\nazd init --template msdocs-django-postgresql-sample-app\nazd up\n```\n\nExample:\n```python\ndef index(request):\n    print('Request for index page received')\n    restaurants = Restaurant.objects.annotate(avg_rating=Avg('review__rating')).annotate(review_count=Count('review'))\n    lastViewedRestaurant = request.session.get(\"lastViewedRestaurant\", False)\n```\n\nExample:\n```bash\nazd init --template python-app-service-postgresql-infra\n```\n\nExample:\n```bash\nazd auth login\n```\n\nExample:\n```bash\nazd provision\n```\n\nExample:\n```text\nApp Service app has the following connection settings:\n         - AZURE_POSTGRESQL_NAME\n         - AZURE_POSTGRESQL_HOST\n         - AZURE_POSTGRESQL_USER\n         - AZURE_POSTGRESQL_PASSWORD\n         - AZURE_REDIS_CONNECTIONSTRING\n         - AZURE_KEYVAULT_RESOURCEENDPOINT\n         - AZURE_KEYVAULT_SCOPE\n```\n\nExample:\n```bash\nazd deploy\n```\n\nExample:\n```python\nDATABASE_URI = 'postgresql+psycopg2://{dbuser}:{dbpass}@{dbhost}/{dbname}'.format(\n    dbuser=os.getenv('AZURE_POSTGRESQL_USER'),\n    dbpass=os.getenv('AZURE_POSTGRESQL_PASSWORD'),\n    dbhost=os.getenv('AZURE_POSTGRESQL_HOST'),\n    dbname=os.getenv('AZURE_POSTGRESQL_NAME')\n)\n\nCACHES = {\n        \"default\": {  \n            \"BACKEND\": \"django_redis.cache.RedisCache\",\n            \"LOCATION\": os.environ.get('AZURE_REDIS_CONNECTIONSTRING'),\n            \"OPTIONS\": {\n                \"CLIENT_CLASS\": \"django_redis.client.DefaultClient\",\n                \"COMPRESSOR\": \"django_redis.compressors.zlib.ZlibCompressor\",\n        },\n    }\n}\n```\n\nExample:\n```bash\nOpen SSH session to App Service container at: <URL>\n```\n\nExample:\n```bash\nDeploying services (azd deploy)\n\n  (✓) Done: Deploying service web\n  - Endpoint: <URL>\n```\n\nExample:\n```bash\nStream App Service logs at: <URL>\n```\n\nExample:\n```bash\nazd down\n```\n\nExample:\n```terminal\ngit add .\ngit commit -m \"<some-message>\"\ngit push origin main\n```\n\nExample:\n```python\n# Configure the domain name using the environment variable\n# that Azure automatically creates for us.\nALLOWED_HOSTS = [os.environ['WEBSITE_HOSTNAME']] if 'WEBSITE_HOSTNAME' in os.environ else []\n```\n\nExample:\n```python\n# WhiteNoise configuration\nMIDDLEWARE = [\n    'django.middleware.security.SecurityMiddleware',\n    # Add whitenoise middleware after the security middleware\n    'whitenoise.middleware.WhiteNoiseMiddleware',\n```\n\nExample:\n```python\nSESSION_ENGINE = \"django.contrib.sessions.backends.cache\"\nSTATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'\n```\n\nExample:\n```azurecli\n# Change the following variables to match your environment\nSUBSCRIPTION_ID=<subscription-id>\nRESOURCE_GROUP=<resource-group-name>\nKEY_VAULT_NAME=<key-vault-name>\nAPP_SERVICE_NAME=<app-name>\nSECRET_NAME=djangoSecretKey\n\n# Set the subscription ID\naz account set --subscription $SUBSCRIPTION_ID\n\n# Assign 'Key Vault Secrets Officer' role to your user at the scope of the key vault\naz role assignment create \\\n  --assignee $(az ad signed-in-user show --query id -o tsv) \\\n  --role $(az role definition list --name \"Key Vault Secrets Officer\" --query \"[].id\" -o tsv) \\\n  --scope $(az keyvault show --name $KEY_VAULT_NAME --resource-group $RESOURCE_GROUP --query id --output tsv)\n\n# Add the secret to the key vault\naz keyvault secret set \\\n  --vault-name $KEY_VAULT_NAME \\\n  --name $SECRET_NAME \\\n  --value $(python -c 'import secrets; print(secrets.token_hex())')\n\n# Add Key Vault reference to the App Service configuration\naz webapp config appsettings set \\\n  --resource-group $RESOURCE_GROUP \\\n  --name $APP_SERVICE_NAME \\\n  --settings \"SECRET_KEY=@Microsoft.KeyVault(SecretUri=https://$KEY_VAULT_NAME.vault.azure.net/secrets/$SECRET_NAME)\"\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:49.525Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":17,"totalLines":153,"estimatedTokens":941}}236{"id":"doc-azure_cli_script_sample_work_with_key_values_in_-1098ebb4","source":"documentation","title":"Azure CLI Script Sample - Work with key-values in App Configuration Store - Azure App Configuration | Microsoft Learn","url":"https://learn.microsoft.com/en-us/azure/azure-app-configuration/scripts/cli-work-with-keys","text":"Example:\n```azurecli\n#!/bin/bash\n\nappConfigName=<AppConfigurationStoreName>\nnewKey=\"TestKey\"\nrefKey=\"KeyVaultReferenceTestKey\"\nuri=\"[URL to value stored in Key Vault]\"\nuri2=\"[URL to another value stored in Key Vault]\"\n\n# Create a new key-value \naz appconfig kv set --name $appConfigName --key $newKey --value \"Value 1\"\n\n# List current key-values\naz appconfig kv list --name $appConfigName\n\n# Update new key's value\naz appconfig kv set --name $appConfigName --key $newKey --value \"Value 2\"\n\n# List current key-values\naz appconfig kv list --name $appConfigName\n\n# Create a new key-value referencing a value stored in Azure Key Vault\naz appconfig kv set-keyvault  --name $appConfigName --key $refKey --secret-identifier $uri\n\n# List current key-values\naz appconfig kv list --name $appConfigName\n\n# Update Key Vault reference\naz appconfig kv set-keyvault --name $appConfigName --key $refKey --secret-identifier $uri2\n\n# List current key-values\naz appconfig kv list --name $appConfigName\n\n# Delete new key\naz appconfig kv delete  --name $appConfigName --key $newKey\n\n# Delete Key Vault reference\naz appconfig kv delete --name $appConfigName --key $refKey\n\n# List current key-values\naz appconfig kv list --name $appConfigName\n```\n\nExample:\n```azurecli\naz group delete --name myResourceGroup\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:49.548Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":2,"totalLines":50,"estimatedTokens":326}}237{"id":"doc-git_git_range_diff_documentation-f0d49d75","source":"documentation","title":"Git - git-range-diff Documentation","url":"http://git-scm.com/docs/git-range-diff/sv","text":"Example:\n```text\ngit range-diff [--color=[<när>]] [--no-color] [<diff-flaggor>]\n\t[--no-dual-color] [--creation-factor=<faktor>]\n\t[--left-only | --right-only] [--diff-merges=<format>]\n\t[--remerge-diff]\n\t( <range1> <range2> | <rev1>…​<rev2> | <base> <rev1> <rev2> )\n\t[[--] <sökväg>…​]\n```\n\nExample:\n```text\n$ git range-diff @{u} @{1} @\n```\n\nExample:\n```text\n-:  ------- > 1:  0ddba11 Förbered dig på det oundvikliga!\n1:  c0debee = 2:  cab005e Lägg till ett användbart meddelande i början\n2:  f00dbal ! 3:  decafe1 Beskriv en bugg\n    @@ -1,3 +1,3 @@\n     Author: A U Thor <author@example.com>\n\n    -TODO: Beskriv en bugg\n    +Beskriv en bugg\n    @@ -324,5 +324,6\n      Detta är förväntat.\n\n    -+Det oväntade är att den också kommer att krascha.\n    ++Oväntat kraschar den också. Detta är en bugg, och juryn är'\n    ++fortfarande ute efter hur man bäst åtgärdar den. Se ärende #314 för mer information.\n\n      Contact\n3:  bedead < -:  ------- TO-UNDO\n```\n\nExample:\n```text\n1            A\n\n    2            B\n\n\t\t C\n```\n\nExample:\n```text\n1            A\n\t       /\n    2 --------'  B\n\n\t\t C\n```\n\nExample:\n```text\n1 ----.      A\n\t  |    /\n    2 ----+---'  B\n\t  |\n\t  `----- C\n\t  c>0\n```\n\nExample:\n```text\n1 ----.      A\n\t  |    /\n    2 ----+---'  B\n\t  |\n    o     `----- C\n\t  c>0\n    o            o\n\n    o            o\n```\n\nExample:\n```text\n1 ----.      A\n\t  |    /\n    2 ----+---'  B\n       .--+-----'\n    o -'  `----- C\n\t  c>0\n    o ---------- o\n\n    o ---------- o\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:39.970Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":8,"totalLines":91,"estimatedTokens":369}}238{"id":"doc-git_git_show_documentation-5d9ed1e4","source":"documentation","title":"Git - git-show Documentation","url":"http://git-scm.com/docs/git-show/2.20.0","text":"Example:\n```text\ngit show [<options>] [<object>…​]\n```\n\nExample:\n```text\n<sha1> <title line>\n```\n\nExample:\n```text\ncommit <sha1>\nAuthor: <author>\n```\n\nExample:\n```text\n<title line>\n```\n\nExample:\n```text\ncommit <sha1>\nAuthor: <author>\nDate:   <author date>\n```\n\nExample:\n```text\n<full commit message>\n```\n\nExample:\n```text\ncommit <sha1>\nAuthor: <author>\nCommit: <committer>\n```\n\nExample:\n```text\ncommit <sha1>\nAuthor:     <author>\nAuthorDate: <author date>\nCommit:     <committer>\nCommitDate: <committer date>\n```\n\nExample:\n```text\nFrom <sha1> <date>\nFrom: <author>\nDate: <author date>\nSubject: [PATCH] <title line>\n```\n\nExample:\n```text\nThe author of fe6e0ee was Junio C Hamano, 23 hours ago\nThe title was >>t4119: test autocomputing -p<n> for traditional diff input.<<\n```\n\nExample:\n```text\n$ git log -2 --pretty=format:%h 4da45bef \\\n  | perl -pe '$_ .= \" -- NO NEWLINE\\n\" unless /\\n/'\n4da45be\n7134973 -- NO NEWLINE\n\n$ git log -2 --pretty=tformat:%h 4da45bef \\\n  | perl -pe '$_ .= \" -- NO NEWLINE\\n\" unless /\\n/'\n4da45be\n7134973\n```\n\nExample:\n```text\n$ git log -2 --pretty=tformat:%h 4da45bef\n$ git log -2 --pretty=%h 4da45bef\n```\n\nExample:\n```text\n+    return !regexec(regexp, two->ptr, 1, &regmatch, 0);\n...\n-    hit = !regexec(regexp, mf2.ptr, 1, &regmatch, 0);\n```\n\nExample:\n```text\ndiff --git a/file1 b/file2\n```\n\nExample:\n```text\nold mode <mode>\nnew mode <mode>\ndeleted file mode <mode>\nnew file mode <mode>\ncopy from <path>\ncopy to <path>\nrename from <path>\nrename to <path>\nsimilarity index <number>\ndissimilarity index <number>\nindex <hash>..<hash> <mode>\n```\n\nExample:\n```text\ndiff --git a/a b/b\nrename from a\nrename to b\ndiff --git a/b b/a\nrename from b\nrename to a\n```\n\nExample:\n```text\ndiff --combined describe.c\nindex fabadb8,cc95eb0..4866510\n--- a/describe.c\n+++ b/describe.c\n@@@ -98,20 -98,12 +98,20 @@@\n\treturn (a_date > b_date) ? -1 : (a_date == b_date) ? 0 : 1;\n  }\n\n- static void describe(char *arg)\n -static void describe(struct commit *cmit, int last_one)\n++static void describe(char *arg, int last_one)\n  {\n +\tunsigned char sha1[20];\n +\tstruct commit *cmit;\n\tstruct commit_list *list;\n\tstatic int initialized = 0;\n\tstruct commit_name *n;\n\n +\tif (get_sha1(arg, sha1) < 0)\n +\t\tusage(describe_usage);\n +\tcmit = lookup_commit_reference(sha1);\n +\tif (!cmit)\n +\t\tusage(describe_usage);\n +\n\tif (!initialized) {\n\t\tinitialized = 1;\n\t\tfor_each_ref(get_name);\n```\n\nExample:\n```text\ndiff --combined file\n```\n\nExample:\n```text\ndiff --cc file\n```\n\nExample:\n```text\nindex <hash>,<hash>..<hash>\nmode <mode>,<mode>..<mode>\nnew file mode <mode>\ndeleted file mode <mode>,<mode>\n```\n\nExample:\n```text\n--- a/file\n+++ b/file\n```\n\nExample:\n```text\n@@@ <from-file-range> <from-file-range> <to-file-range> @@@\n```\n\nExample:\n```text\n[i18n]\n\tcommitEncoding = ISO-8859-1\n```\n\nExample:\n```text\n[i18n]\n\tlogOutputEncoding = ISO-8859-1\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:42.151Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":24,"totalLines":192,"estimatedTokens":712}}239{"id":"doc-llvm_size_print_size_information_llvm-1b67596f","source":"documentation","title":"llvm-size - print size information - LLVM","url":"https://llvm.org/docs/CommandGuide/llvm-size.html","text":"Example:\n```text\n$ llvm-size --format=berkeley test.o test2.o\n   text    data     bss     dec     hex filename\n    182      16       5     203      cb test.elf\n     82       8       1      91      5b test2.o\n```\n\nExample:\n```text\n$ llvm-size --format=berkeley macho.obj macho2.obj\n__TEXT  __DATA  __OBJC  others  dec     hex\n4       8       0       0       12      c       macho.obj\n16      32      0       0       48      30      macho2.obj\n```\n\nExample:\n```text\n$ llvm-size --format=sysv test.elf test2.o\n   test.elf  :\n   section       size      addr\n   .eh_frame       92   2097496\n   .text           90   2101248\n   .data           16   2105344\n   .bss             5   2105360\n   .comment       209         0\n   Total          412\n\n   test2.o  :\n   section             size   addr\n   .text                 26      0\n   .data                  8      0\n   .bss                   1      0\n   .comment             106      0\n   .note.GNU-stack        0      0\n   .eh_frame             56      0\n   .llvm_addrsig          2      0\n   Total                199\n```\n\nExample:\n```text\n$ llvm-size --format=darwin macho.obj macho2.obj\n   macho.obj:\n   Segment : 12\n           Section (__TEXT, __text): 4\n           Section (__DATA, __data): 8\n           total 12\n   total 12\n   macho2.obj:\n   Segment : 48\n           Section (__TEXT, __text): 16\n           Section (__DATA, __data): 32\n           total 48\n   total 48\n```\n\nExample:\n```text\n$ llvm-size --radix=8 test.o\n   text    data     bss     oct     hex filename\n   0152      04      04     162      72 test.o\n\n$ llvm-size --radix=10 test.o\n   text    data     bss     dec     hex filename\n    106       4       4     114      72 test.o\n\n$ llvm-size --radix=16 test.o\n   text    data     bss     dec     hex filename\n   0x6a     0x4     0x4     114      72 test.o\n```\n\nExample:\n```text\n$ llvm-size --totals test.elf test2.o\n   text    data     bss     dec     hex filename\n    182      16       5     203      cb test.elf\n     82       8       1      91      5b test2.o\n    264      24       6     294     126 (TOTALS)\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:53.020Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":6,"totalLines":82,"estimatedTokens":522}}240{"id":"doc-filecheck_flexible_pattern_matching_file_verifie-7ef44f43","source":"documentation","title":"FileCheck - Flexible pattern matching file verifier - LLVM","url":"https://llvm.org/docs/CommandGuide/FileCheck.html","text":"Example:\n```text\n; RUN: llvm-as < %s | llc -march=x86-64 | FileCheck %s\n```\n\nExample:\n```text\ndefine void @sub1(i32* %p, i32 %v) {\nentry:\n; CHECK: sub1:\n; CHECK: subl\n        %0 = tail call i32 @llvm.atomic.load.sub.i32.p0i32(i32* %p, i32 %v)\n        ret void\n}\n\ndefine void @inc4(i64* %p) {\nentry:\n; CHECK: inc4:\n; CHECK: incq\n        %0 = tail call i64 @llvm.atomic.load.add.i64.p0i64(i64* %p, i64 1)\n        ret void\n}\n```\n\nExample:\n```text\n; RUN: llvm-as < %s | llc -mtriple=i686-apple-darwin9 -mattr=sse41 \\\n; RUN:              | FileCheck %s -check-prefixes=X32\n; RUN: llvm-as < %s | llc -mtriple=x86_64-apple-darwin9 -mattr=sse41 \\\n; RUN:              | FileCheck %s -check-prefixes=X64\n\ndefine <4 x i32> @pinsrd_1(i32 %s, <4 x i32> %tmp) nounwind {\n        %tmp1 = insertelement <4 x i32>; %tmp, i32 %s, i32 1\n        ret <4 x i32> %tmp1\n; X32: pinsrd_1:\n; X32:    pinsrd $1, 4(%esp), %xmm0\n\n; X64: pinsrd_1:\n; X64:    pinsrd $1, %edi, %xmm0\n}\n```\n\nExample:\n```text\n; X32: pinsrd_1:\n; X32:    pinsrd $1, 4(%esp), %xmm0\n\n; COM: FIXME: X64 isn't working correctly yet for this part of codegen, but\n; COM: X64 will have something similar to X32:\n; COM:\n; COM:   X64: pinsrd_1:\n; COM:   X64:    pinsrd $1, %edi, %xmm0\n```\n\nExample:\n```text\n; X32: pinsrd $1, 4(%esp), %xmm0 COM: This is part of the X32 pattern!\n```\n\nExample:\n```text\ndefine void @t2(<2 x double>* %r, <2 x double>* %A, double %B) {\n     %tmp3 = load <2 x double>* %A, align 16\n     %tmp7 = insertelement <2 x double> undef, double %B, i32 0\n     %tmp9 = shufflevector <2 x double> %tmp3,\n                            <2 x double> %tmp7,\n                            <2 x i32> < i32 0, i32 2 >\n     store <2 x double> %tmp9, <2 x double>* %r, align 16\n     ret void\n\n; CHECK:          t2:\n; CHECK:             movl    8(%esp), %eax\n; CHECK-NEXT:        movapd  (%eax), %xmm0\n; CHECK-NEXT:        movhpd  12(%esp), %xmm0\n; CHECK-NEXT:        movl    4(%esp), %eax\n; CHECK-NEXT:        movapd  %xmm0, (%eax)\n; CHECK-NEXT:        ret\n}\n```\n\nExample:\n```text\n!0 = !DILocation(line: 5, scope: !1, inlinedAt: !2)\n\n; CHECK:       !DILocation(line: 5,\n; CHECK-NOT:               column:\n; CHECK-SAME:              scope: ![[SCOPE:[0-9]+]]\n```\n\nExample:\n```text\nName: foo\nField1: ...\nField2: ...\nField3: ...\nValue: 1\n\nName: bar\nField1: ...\nField2: ...\nField3: ...\nValue: 2\n\nName: baz\nField1: ...\nField2: ...\nField3: ...\nValue: 1\n```\n\nExample:\n```text\nCHECK: Name: foo\nCHECK: Value: 1{{$}}\n```\n\nExample:\n```text\nCHECK:      Name: foo\nCHECK:      Value:\nCHECK-SAME:        {{ 1$}}\n```\n\nExample:\n```text\ndeclare void @foo()\n\ndeclare void @bar()\n; CHECK: foo\n; CHECK-EMPTY:\n; CHECK-NEXT: bar\n```\n\nExample:\n```text\ndefine i8 @coerce_offset0(i32 %V, i32* %P) {\n  store i32 %V, i32* %P\n\n  %P2 = bitcast i32* %P to i8*\n  %P3 = getelementptr i8* %P2, i32 2\n\n  %A = load i8* %P3\n  ret i8 %A\n; CHECK: @coerce_offset0\n; CHECK-NOT: load\n; CHECK: ret i8\n}\n```\n\nExample:\n```text\nLoop at depth 1\nLoop at depth 1\nLoop at depth 1\nLoop at depth 1\n  Loop at depth 2\n    Loop at depth 3\n\n; CHECK-COUNT-6: Loop at depth {{[0-9]+}}\n; CHECK-NOT:     Loop at depth {{[0-9]+}}\n```\n\nExample:\n```text\n// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s\n\nstruct Foo { virtual void method(); };\nFoo f;  // emit vtable\n// CHECK-DAG: @_ZTV3Foo =\n\nstruct Bar { virtual void method(); };\nBar b;\n// CHECK-DAG: @_ZTV3Bar =\n```\n\nExample:\n```text\n; CHECK-DAG: BEFORE\n; CHECK-NOT: NOT\n; CHECK-DAG: AFTER\n```\n\nExample:\n```text\n; CHECK-DAG: add [[REG1:r[0-9]+]], r1, r2\n; CHECK-DAG: add [[REG2:r[0-9]+]], r3, r4\n; CHECK:     mul r5, [[REG1]], [[REG2]]\n```\n\nExample:\n```text\n; CHECK-DAG: vmov.32 [[REG2:d[0-9]+]][0]\n; CHECK-DAG: vmov.32 [[REG2]][1]\nvmov.32 d0[1]\nvmov.32 d0[0]\n```\n\nExample:\n```text\n; CHECK-DAG: vmov.32 [[REG2:d[0-9]+]][0]\n; CHECK-DAG: vmov.32 [[REG2]][1]\nvmov.32 d1[1]\nvmov.32 d0[0]\n```\n\nExample:\n```text\n// CHECK-DAG: [[THREAD_ID:[0-9]+]]: task_begin\n// CHECK-DAG: [[THREAD_ID]]: task_end\n//\n// CHECK-DAG: [[THREAD_ID:[0-9]+]]: task_begin\n// CHECK-DAG: [[THREAD_ID]]: task_end\n```\n\nExample:\n```text\ndefine %struct.C* @C_ctor_base(%struct.C* %this, i32 %x) {\nentry:\n; CHECK-LABEL: C_ctor_base:\n; CHECK: mov [[SAVETHIS:r[0-9]+]], r0\n; CHECK: bl A_ctor_base\n; CHECK: mov r0, [[SAVETHIS]]\n  %0 = bitcast %struct.C* %this to %struct.A*\n  %call = tail call %struct.A* @A_ctor_base(%struct.A* %0)\n  %1 = bitcast %struct.C* %this to %struct.B*\n  %call2 = tail call %struct.B* @B_ctor_base(%struct.B* %1, i32 %x)\n  ret %struct.C* %this\n}\n\ndefine %struct.D* @D_ctor_base(%struct.D* %this, i32 %x) {\nentry:\n; CHECK-LABEL: D_ctor_base:\n```\n\nExample:\n```text\nInput: [[[10, 20]], [[30, 40]]]\nOutput %r10: [[10, 20]]\nOutput %r10: [[30, 40]]\n\n; CHECK{LITERAL}: [[[10, 20]], [[30, 40]]]\n; CHECK-DAG{LITERAL}: [[30, 40]]\n; CHECK-DAG{LITERAL}: [[10, 20]]\n```\n\nExample:\n```text\n; CHECK: movhpd      {{[0-9]+}}(%esp), {{%xmm[0-7]}}\n```\n\nExample:\n```text\n; CHECK: test5:\n; CHECK:    notw     [[REGISTER:%[a-z]+]]\n; CHECK:    andw     {{.*}}[[REGISTER]]\n```\n\nExample:\n```text\n; CHECK: op [[REG:r[0-9]+]], [[REG]]\n```\n\nExample:\n```text\n; CHECK: mov r[[#REG:]], 0x[[#%.8X,ADDR:]]\n```\n\nExample:\n```text\n; CHECK-NOT: mov r0, r[[#]]\n```\n\nExample:\n```text\n; CHECK: load r[[#REG:]], [r0]\n; CHECK: load r[[#REG+1]], [r1]\n; CHECK: Loading from 0x[[#%x,ADDR:]]\n; CHECK-SAME: to 0x[[#ADDR + 7]]\n```\n\nExample:\n```text\nload r5, [r0]\nload r6, [r1]\nLoading from 0xa0463440 to 0xa0463447\n```\n\nExample:\n```text\nload r5, [r0]\nload r7, [r1]\nLoading from 0xa0463440 to 0xa0463443\n```\n\nExample:\n```text\n; CHECK: mov r[[#REG_OFFSET:]], 0x[[#%X,FIELD_OFFSET:12]]\n; CHECK-NEXT: load r[[#]], [r[[#REG_BASE:]], r[[#REG_OFFSET]]]\n```\n\nExample:\n```text\nmov r4, 0xC\nload r6, [r5, r4]\n```\n\nExample:\n```text\n// CHECK: test.cpp:[[# @LINE + 4]]:6: error: expected ';' after top level declarator\n// CHECK-NEXT: {{^int a}}\n// CHECK-NEXT: {{^     \\^}}\n// CHECK-NEXT: {{^     ;}}\nint a\n```\n\nExample:\n```text\n// CHECK: DW_AT_location [DW_FORM_sec_offset] ([[DLOC:0x[0-9a-f]+]]){{[[:space:]].*}}\"intd\"\n```\n\nExample:\n```text\nDW_AT_location [DW_FORM_sec_offset]   (0x00000233)\nDW_AT_name [DW_FORM_strp]  ( .debug_str[0x000000c9] = \"intd\")\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:53.317Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":34,"totalLines":327,"estimatedTokens":1532}}241{"id":"doc-tune_mobile_performance_ort_1_10_only_onnxruntim-337a42f5","source":"documentation","title":"Tune Mobile Performance (ORT <1.10 only) | onnxruntime","url":"https://onnxruntime.ai/docs/performance/mobile-performance-tuning.html","text":"ONNX RuntimeInstall ONNX Runtime Get StartedPythonC++CC#Java JavaScriptWebNode.js bindingReact NativeObjective-CJulia, Ruby and Rust APIsWindowsMobileOn-Device TrainingLarge Model Training TutorialsAPI Basics Accelerate PyTorchPyTorch InferenceInference on multiple targetsAccelerate PyTorch TrainingAccelerate TensorFlowAccelerate Hugging FaceDeploy on AzureML Deploy on mobileObject detection and pose estimation with YOLOv8Mobile image recognition on AndroidImprove image resolution on mobileMobile objection detection on iOSORT Mobile Model Export Helpers WebBuild a web app with ONNX RuntimeThe 'env' Flags and Session OptionsUsing WebGPUUsing WebNNWorking with Large ModelsPerformance DiagnosisDeploying ONNX Runtime WebTroubleshootingClassify images with ONNX Runtime and Next.jsCustom Excel Functions for BERT Tasks in JavaScript Deploy on IoT and edgeIoT Deployment on Raspberry PiDeploy traditional ML Inference with C#Basic C# TutorialInference BERT NLP with C#Configure CUDA for GPU with C#Image recognition with ResNet50v2 in C#Stable Diffusion with C#Object detection in C# using OpenVINOObject detection with Faster RCNN in C# On-Device TrainingBuilding an Android ApplicationBuilding an iOS ApplicationAPI Docs Build ONNX RuntimeBuild for inferencingBuild for trainingBuild with different EPsBuild for webBuild for AndroidBuild for iOSCustom build Execution ProvidersNVIDIA - CUDANVIDIA - TensorRTNVIDIA - TensorRT RTXIntel - OpenVINO™Intel - oneDNNWindows - DirectMLQualcomm - QNNAndroid - NNAPIApple - CoreMLXNNPACKAMD - ROCmAMD - MIGraphXAMD - Vitis AICloud - AzureWebGPU Community-maintainedArm - ACLArm - Arm NNApache - TVMRockchip - RKNPUHuawei - CANNAdd a new providerEP Context Design Plugin Execution Provider LibrariesUsageDevelopmentTestingPackaging Generate API (Preview) TutorialsPhi-3.5 vision tutorialPhi-3 tutorialPhi-2 tutorialRun with LoRA adaptersDeepSeek-R1-Distill tutorialRun on Snapdragon devices API docsPython APIC# APIC APIC++ APIJava API How toInstallBuild from sourceBuild modelsBuild models for SnapdragonTroubleshootMigratePast present share buffer ReferenceConfig referenceAdapter file spec ExtensionsAdd OperatorsBuild Performance Tune performanceProfiling toolsLogging & TracingMemory consumptionThread managementI/O BindingTroubleshooting Model optimizationsQuantize ONNX modelsFloat16 and mixed precision modelsGraph optimizationsORT model formatORT model format runtime optimizationTransformers optimizerEnd to end optimization with OliveDevice tensors EcosystemAzure Container for PyTorch (ACPT) ReferenceReleasesCompatibility OperatorsOperator kernelsContrib operatorsCustom operatorsReduced operator config fileArchitectureCiting ONNX RuntimeDependency Management in ONNX Runtime ONNX Runtime Docs on GitHub This site uses Just the Docs, a documentation theme for Jekyll.\n\nExample:\n```text\n<ONNX Runtime repository root>\\build.bat --config RelWithDebInfo --use_nnapi --build_shared_lib --build_wheel --parallel\n```\n\nExample:\n```text\n<ONNX Runtime repository root>/build.sh --config RelWithDebInfo --use_nnapi --build_shared_lib --build_wheel --parallel\n```\n\nExample:\n```text\npip install -U build\\Windows\\RelWithDebIfo\\RelWithDebIfo\\dist\\onnxruntime_noopenmp-1.7.0-cp37-cp37m-win_amd64.whl\n```\n\nExample:\n```text\npython <ORT repository root>/tools/python/convert_onnx_models_to_ort.py --use_nnapi --optimization_level extended /models\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:56.261Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":4,"totalLines":23,"estimatedTokens":852}}242{"id":"doc-secure_files_administration_gitlab_docs-2d0c157c","source":"documentation","title":"Secure Files administration | GitLab Docs","url":"https://docs.gitlab.com/administration/cicd/secure_files/","text":"Getting startedConfigure GitLabAdmin areaGitLab Relay (KAS)Application cache intervalCellsCI/CDCI/CD limitsCompute minutesJob artifactsJob logsSecure filesExternal pipeline validationMaintenance console commandsClickHouse for analyticsConsulCronCustom HTML header tagsEnvironment variablesFile hooksGeoDisaster recovery (Geo)Geo sitesGit LFS administrationGit protocol v2Health checkHost the product documentationIncoming emailInstance limitsInstance reviewInvalidate Markdown cacheIssue closing patternLabelsLoad balancerLog systemMerge request approvalsMerge request diffs storageNFSObject storagePackagesPostfixPostgreSQLRedisReply by emailRepository storageSecrets ManagerServer hooksSidekiqSnippetsS/MIME signingStatic objects external storageTerraform stateTerraform state settingsTimezoneUploadsWeb terminalsWhat's newWikisConfigure GitLab DuoUpdate your settingsEnable features behind feature flagsMaintain GitLabMonitor GitLabSecure GitLabAdminister usersAdminister GitLab DedicatedAdminister GitLab RunnerGitLab Docs /Administer /Configure GitLab /CI/CD /Secure filesHelp us learn about your current experience with the documentation. Take the survey.Secure Files , Premium, Self-ManagedYou can securely store up to 100 files for use in CI/CD pipelines as secure files. These files are stored securely outside of your project’s repository and are not version controlled. It is safe to store sensitive information in these files. Secure files support both plain text and binary file types, and must be 5 MB or less.The storage location of these files can be configured using the options described below, but the default locations are:/var/opt/gitlab/gitlab-rails/shared/ci_secure_files for installations using the Linux package./home/git/gitlab/shared/ci_secure_files for self-compiled installations.Use external object storage configuration for GitLab Helm chart installations.Disabling Secure FilesYou can disable Secure Files across the entire GitLab instance. You might want to disable Secure Files to reduce disk space, or to remove access to the feature.To disable Secure Files, follow the steps below according to your installation.Prerequisites:You must be an administrator.For Linux package installationsEdit /etc/gitlab/gitlab.rb and add the following ['ci_secure_files_enabled'] = falseSave the file and reconfigure GitLab.For self-compiled installationsEdit /home/git/gitlab/config/gitlab.yml and add or amend the following : the file and restart GitLab for the changes to take effect.Using local storageThe default configuration uses local storage. To change the location where Secure Files are stored locally, follow the steps below.For Linux package installationsTo change the storage path for example to /mnt/storage/ci_secure_files, edit /etc/gitlab/gitlab.rb and add the following ['ci_secure_files_storage_path'] = \"/mnt/storage/ci_secure_files\"Save the file and reconfigure GitLab.For self-compiled installationsTo change the storage path for example to /mnt/storage/ci_secure_files, edit /home/git/gitlab/config/gitlab.yml and add or amend the following : storage_path: /mnt/storage/ci_secure_filesSave the file and restart GitLab for the changes to take effect.Using object , Premium, Self-ManagedInstead of storing Secure Files on disk, you should use one of the supported object storage options. This configuration relies on valid credentials to be configured already.Consolidated object storageHistorySupport for consolidated object storage was introduced in GitLab 17.0.Using the consolidated form of the object storage is recommended.Storage-specific object storageThe following settings under then self-compiled installations.Prefixed by ci_secure_files_object_store_ on Linux package installations.SettingDescriptionDefaultenabledEnable/disable object storagefalseremote_directoryThe bucket name where Secure Files are storedconnectionVarious connection options described belowS3-compatible connection settingsSee the available connection settings for different providers.Linux package (Omnibus)Edit /etc/gitlab/gitlab.rb and add the following lines, but using the values you ['ci_secure_files_object_store_enabled'] = true gitlab_rails['ci_secure_files_object_store_remote_directory'] = \"ci_secure_files\" gitlab_rails['ci_secure_files_object_store_connection'] = { 'provider' => 'AWS', 'region' => 'eu-central-1', 'aws_access_key_id' => 'AWS_ACCESS_KEY_ID', 'aws_secret_access_key' => 'AWS_SECRET_ACCESS_KEY' }If you are using AWS IAM profiles, be sure to omit the AWS access key and secret access key/value ['ci_secure_files_object_store_connection'] = { 'provider' => 'AWS', 'region' => 'eu-central-1', 'use_iam_profile' => true }Save the file and reconfigure gitlab-ctl reconfigureMigrate any existing local states to the object storage.Self-compiled (source)Edit /home/git/gitlab/config/gitlab.yml and add or amend the following : : true remote_directory: \"ci_secure_files\" # The bucket name : AWS # Only AWS supported at the moment the file and restart GitLab:# For systems running systemd sudo systemctl restart gitlab.target # For systems running SysV init sudo service gitlab restartMigrate any existing local states to the object storage.Migrate to object storageIt’s not possible to migrate Secure Files from object storage back to local storage, so proceed with caution.To migrate Secure Files to object storage, follow the instructions below.For Linux package gitlab-rake :migrateFor self-compiled -u git -H bundle exec rake :migrate RAILS_ENV=productionDisabling Secure FilesUsing local storageUsing object storageConsolidated object storageStorage-specific object storageS3-compatible connection settingsMigrate to object storage\n\nExample:\n```ruby\ngitlab_rails['ci_secure_files_enabled'] = false\n```\n\nExample:\n```yaml\nci_secure_files:\n  enabled: false\n```\n\nExample:\n```ruby\ngitlab_rails['ci_secure_files_storage_path'] = \"/mnt/storage/ci_secure_files\"\n```\n\nExample:\n```yaml\nci_secure_files:\n  enabled: true\n  storage_path: /mnt/storage/ci_secure_files\n```\n\nExample:\n```ruby\ngitlab_rails['ci_secure_files_object_store_enabled'] = true\ngitlab_rails['ci_secure_files_object_store_remote_directory'] = \"ci_secure_files\"\ngitlab_rails['ci_secure_files_object_store_connection'] = {\n  'provider' => 'AWS',\n  'region' => 'eu-central-1',\n  'aws_access_key_id' => 'AWS_ACCESS_KEY_ID',\n  'aws_secret_access_key' => 'AWS_SECRET_ACCESS_KEY'\n}\n```\n\nExample:\n```ruby\ngitlab_rails['ci_secure_files_object_store_connection'] = {\n  'provider' => 'AWS',\n  'region' => 'eu-central-1',\n  'use_iam_profile' => true\n}\n```\n\nExample:\n```shell\nsudo gitlab-ctl reconfigure\n```\n\nExample:\n```yaml\nci_secure_files:\n  enabled: true\n  object_store:\n    enabled: true\n    remote_directory: \"ci_secure_files\"  # The bucket name\n    connection:\n      provider: AWS  # Only AWS supported at the moment\n      aws_access_key_id: AWS_ACCESS_KEY_ID\n      aws_secret_access_key: AWS_SECRET_ACCESS_KEY\n      region: eu-central-1\n```\n\nExample:\n```shell\n# For systems running systemd\nsudo systemctl restart gitlab.target\n\n# For systems running SysV init\nsudo service gitlab restart\n```\n\nExample:\n```shell\nsudo gitlab-rake gitlab:ci_secure_files:migrate\n```\n\nExample:\n```shell\nsudo -u git -H bundle exec rake gitlab:ci_secure_files:migrate RAILS_ENV=production\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:11.132Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":11,"totalLines":85,"estimatedTokens":1822}}243{"id":"doc-gitlab_pages_let_s_encrypt_certificates_gitlab_d-6f37af42","source":"documentation","title":"GitLab Pages Let’s Encrypt certificates | GitLab Docs","url":"https://docs.gitlab.com/user/project/pages/custom_domains_ssl_tls_certification/lets_encrypt_integration/","text":"Getting startedTutorialsManage your organizationOrganize work with projectsPlan and track workManage authentication and authorizationUse GitManage your codeUse CI/CD to build your applicationSecure your applicationDeploy and release your applicationGetting startedTutorialsPackages & RegistriesEnvironmentsDeploymentsReleasesRoll out an application incrementallyFeature flagsGitLab website from , test, and deploy your Hugo siteCreate website from CI/CD templateCreate website from forked sample projectCreate website from project templateCreate deployment for static sitePublic folderDefault domain names and URLsCustom domainsParallel deploymentsDNS recordsSSL/TLS certificatesLet's Encrypt certificatesAccess controlRedirectsSettingsManage your infrastructureMonitor your applicationAnalyze GitLab usageRelease notesFeature supportFind your GitLab versionGitLab Docs /Use GitLab /Deploy and release your … /GitLab Pages /Let's Encrypt certificatesHelp us learn about your current experience with the documentation. Take the survey.GitLab Pages Let’s Encrypt , Premium, , GitLab Self-ManagedThe GitLab Pages integration with Let’s Encrypt (LE) allows you to use LE certificates for your Pages website with custom domains without the hassle of having to issue and update them yourself; GitLab does it for you, out-of-the-box.Let’s Encrypt is a free, automated, and open source Certificate Authority.This feature covers only certificates for custom domains, not the wildcard certificate required to run Pages daemon (GitLab Self-Managed, Free, Premium, and Ultimate only). Wildcard certificate generation is tracked in this issue.PrerequisitesBefore you can enable automatic provisioning of an SSL certificate for your domain, make sure you a project in GitLab containing your website’s source code.Acquired a domain (example.com) and added a DNS entry pointing it to your Pages website. The top-level domain (.com) must be a public suffix.Added your domain to your Pages project and verified your ownership.Verified your website is up and running, accessible through your custom domain.The GitLab integration with Let’s Encrypt is enabled and available on GitLab.com. For GitLab Self-Managed instances, make sure your administrator has enabled it.Enabling Let’s Encrypt integration for your custom domainAfter you’ve met the requirements, enable Let’s Encrypt the top bar, select Search or go to and find your project.In the left sidebar, select Deploy > Pages.Next to the domain name, select Edit ( ).Turn on the Automatic certificate management using Let’s Encrypt toggle.Select Save changes.Once enabled, GitLab obtains a LE certificate and add it to the associated Pages domain. GitLab also renews it automatically.Issuing the certificate and updating Pages configuration can take up to an hour. If you already have an SSL certificate in domain settings it continues to work until replaced by the Let’s Encrypt certificate.TroubleshootingSomething went wrong while obtaining the Let’s Encrypt certificateYou might get an error that states Something went wrong while obtaining the Let’s Encrypt certificate.This issue occurs when Let’s Encrypt cannot reach or validate your domain.To resolve this the top bar, select Search or go to and find your project.In the left sidebar, select Settings > General.Expand Visibility, project features, permissions.Under Pages, from the dropdown list, select Everyone With Access.Select Deploy > Pages > Domains & settings.Next to the domain name, select Edit ( ).In Verification status, select Retry verification ( ).If you get the same error, check the sure you have set only one CNAME or A DNS record for your domain.Make sure your domain doesn’t have an AAAA DNS record.If you have a CAA DNS record for your domain or any higher level domains, make sure it includes letsencrypt.org.Make sure your domain is verified.If you use parallel deployments, make sure your primary deployment has an empty path_prefix. A non-empty path_prefix (for example, latest) prevents the /.well-known/acme-challenge path from being served.Go back to the Deploy > Pages settings, and retry the verification.Obtaining a certificate hangs for more than an hourIf you’ve enabled Let’s Encrypt integration, but a certificate is absent after an hour and you see the is obtaining a Let's Encrypt SSL certificate for this domain. This process can take some time. Please try again later.Remove and add the domain for GitLab Pages again by following these the top bar, select Search or go to and find your project.In the left sidebar, select Deploy > Pages.Next to the domain name, select Remove.Add the domain again, and verify it.Enable Let’s Encrypt integration for your domain.If you’re still getting the same sure you have properly set only one CNAME or A DNS record for your domain.Make sure your domain doesn’t have an AAAA DNS record.If you have a CAA DNS record for your domain or any higher level domains, make sure it includes letsencrypt.org.Go to step 1.PrerequisitesEnabling Let’s Encrypt integration for your custom domainTroubleshootingSomething went wrong while obtaining the Let’s Encrypt certificateObtaining a certificate hangs for more than an hour\n\nExample:\n```plaintext\nGitLab is obtaining a Let's Encrypt SSL certificate for this domain.\nThis process can take some time. Please try again later.\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:11.195Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":1,"totalLines":9,"estimatedTokens":1338}}244{"id":"doc-troubleshooting_the_gitlab_container_registry_gi-bc59398a","source":"documentation","title":"Troubleshooting the GitLab container registry | GitLab Docs","url":"https://docs.gitlab.com/user/packages/container_registry/troubleshoot_container_registry/","text":"Example:\n```shell\ndocker login gitlab.example.com\ndocker pull gitlab.example.com/org/build/sample_project/cr:v2.9.1\n```\n\nExample:\n```shell\ndocker tag gitlab.example.com/org/build/sample_project/cr:v2.9.1 gitlab.example.com/new_org/build/new_sample_project/cr:v2.9.1\n```\n\nExample:\n```shell\ndocker push gitlab.example.com/new_org/build/new_sample_project/cr:v2.9.1\n```\n\nExample:\n```plaintext\nmanifest unknown: OCI manifest found, but accept header does not support OCI manifests\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:11.260Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":4,"totalLines":22,"estimatedTokens":124}}245{"id":"doc-build_docker_images_with_buildkit_gitlab_docs-33b342bb","source":"documentation","title":"Build Docker images with BuildKit | GitLab Docs","url":"https://docs.gitlab.com/ci/docker/using_buildkit/","text":"Getting startedTutorialsManage your organizationOrganize work with projectsPlan and track workManage authentication and authorizationUse GitManage your codeUse CI/CD to build your applicationGetting startedTutorialsCI/CD YAML syntax referenceRunnersPipelinesJobsControl how jobs runJob inputsFormat scripts and job logsJob execution flowCachingArtifactsSSH keysDockerRun CI/CD jobs in Docker containersUse Docker to build Docker imagesUse BuildKit to build Docker imagesUse Buildah to build multi-platform Buildah in a rootless container on OpenShiftServicesGit submodulesAccess a terminal for a running jobCI/CD job logsCI/CD componentsCI/CD inputsCI/CD variablesPipeline securityGitLab Secrets ManagerExternal secretsDebuggingAuto DevOpsTestingCI/CD sustainabilityGoogle Cloud integrationMigrate to GitLab CI/CDExternal repository integrationsMobile DevOpsSecure your applicationDeploy and release your applicationManage your infrastructureMonitor your applicationAnalyze GitLab usageRelease notesFeature supportFind your GitLab versionGitLab Docs /Use GitLab /Use CI/CD to build your … /Jobs /Docker /Use BuildKit to build Docker imagesHelp us learn about your current experience with the documentation. Take the survey.Build Docker images with , Premium, , GitLab Self-Managed, GitLab DedicatedBuildKit is the build engine used by Docker and provides multi-platform builds and build caching.BuildKit methodsBuildKit offers the following methods to build Docker requirementCommandsUse when you needBuildKit rootlessNo privileged containersbuildctl-daemonless.shMaximum security or a replacement for KanikoDocker BuildxRequires buildxFamiliar Docker workflowNative BuildKitRequires BuildKit controlPrerequisitesGitLab Runner with Docker executorDocker 19.03 or later to use Docker BuildxA project with a DockerfileBuildKit rootlessBuildKit in standalone mode provides rootless image builds without Docker daemon dependency. This method eliminates privileged containers entirely and provides a direct replacement for Kaniko builds.Rootless builds still require a runner that permits the system calls BuildKit uses to create user namespaces and mount points. Hosted runners on GitLab.com permit these calls and need no extra configuration, because they run in privileged mode. On self-managed runners that use the Docker executor without privileged mode, builds can fail with permission errors. For more information, see rootless build fails with permission errors. If you cannot change your runner security settings, use rootless Buildah to build images instead.Key differences from other the moby/buildkit:rootless imageIncludes for rootless operationUses buildctl-daemonless.sh to manage BuildKit daemon automaticallyNo Docker daemon or privileged container dependencyRequires manual registry authentication setupAuthenticate with container registriesGitLab CI/CD provides automatic authentication for the GitLab container registry through predefined variables. For BuildKit rootless, you must manually create the Docker configuration file.Authenticate with the GitLab container registryGitLab automatically provides these predefined : Registry passwordTo configure authentication for rootless builds, add a before_script configuration to your jobs. For : - mkdir -p ~/.docker - echo \"{\\\"auths\\\":{\\\"$CI_REGISTRY\\\":{\\\"username\\\":\\\"$CI_REGISTRY_USER\\\",\\\"password\\\":\\\"$CI_REGISTRY_PASSWORD\\\"}}}\" > ~/.docker/config.jsonAuthenticate with multiple registriesTo authenticate with additional container registries, combine authentication entries in your before_script section. For : - mkdir -p ~/.docker - | echo \"{ \\\"auths\\\": { \\\"${CI_REGISTRY}\\\": { \\\"auth\\\": \\\"$(printf \"%s:%s\" \"${CI_REGISTRY_USER}\" \"${CI_REGISTRY_PASSWORD}\" | base64 | tr -d '\\n')\\\" }, \\\"docker.io\\\": { \\\"auth\\\": \\\"$(printf \"%s:%s\" \"${DOCKER_HUB_USER}\" \"${DOCKER_HUB_PASSWORD}\" | base64 | tr -d '\\n')\\\" } } }\" > ~/.docker/config.jsonAuthenticate with the dependency proxyTo pull images through the GitLab dependency proxy, configure the authentication in your before_script section. For : - mkdir -p ~/.docker - | echo \"{ \\\"auths\\\": { \\\"${CI_REGISTRY}\\\": { \\\"auth\\\": \\\"$(printf \"%s:%s\" \"${CI_REGISTRY_USER}\" \"${CI_REGISTRY_PASSWORD}\" | base64 | tr -d '\\n')\\\" }, \\\"$(echo -n $CI_DEPENDENCY_PROXY_SERVER | awk -F[:] '{print $1}')\\\": { \\\"auth\\\": \\\"$(printf \"%s:%s\" ${CI_DEPENDENCY_PROXY_USER} \"${CI_DEPENDENCY_PROXY_PASSWORD}\" | base64 | tr -d '\\n')\\\" } } }\" > ~/.docker/config.jsonFor more information, see authenticate within CI/CD.Build images in rootless modeTo build images without Docker daemon dependency, add a job similar to this : : moby/buildkit:rootless entrypoint: [\"\"] : --oci-worker-no-process-sandbox mkdir -p ~/.docker - echo \"{\\\"auths\\\":{\\\"$CI_REGISTRY\\\":{\\\"username\\\":\\\"$CI_REGISTRY_USER\\\",\\\"password\\\":\\\"$CI_REGISTRY_PASSWORD\\\"}}}\" > ~/.docker/config.json | buildctl-daemonless.sh build \\ --frontend dockerfile.v0 \\ --local context=. \\ --local dockerfile=. \\ --output type=image,name=$CI_REGISTRY_IMAGE:$CI_COMMIT_SHA,push=trueThe entrypoint: [\"\"] override is required. By default, the moby/buildkit:rootless image starts the BuildKit daemon as a long-running service. Without the override, the job runs the daemon instead of the build command and hangs until the job times out.Build multi-platform images in rootless modeTo build images for multiple architectures in rootless mode, configure your job to specify the target platforms. For : : moby/buildkit:rootless entrypoint: [\"\"] : --oci-worker-no-process-sandbox mkdir -p ~/.docker - echo \"{\\\"auths\\\":{\\\"$CI_REGISTRY\\\":{\\\"username\\\":\\\"$CI_REGISTRY_USER\\\",\\\"password\\\":\\\"$CI_REGISTRY_PASSWORD\\\"}}}\" > ~/.docker/config.json | buildctl-daemonless.sh build \\ --frontend dockerfile.v0 \\ --local context=. \\ --local dockerfile=. \\ --opt platform=linux/amd64,linux/arm64 \\ --output type=image,name=$CI_REGISTRY_IMAGE:$CI_COMMIT_SHA,push=trueUse caching in rootless modeTo enable registry-based caching for faster subsequent builds, configure cache import and export in your build job. For : : moby/buildkit:rootless entrypoint: [\"\"] : --oci-worker-no-process-sandbox CACHE_IMAGE: $CI_REGISTRY_IMAGE:cache mkdir -p ~/.docker - echo \"{\\\"auths\\\":{\\\"$CI_REGISTRY\\\":{\\\"username\\\":\\\"$CI_REGISTRY_USER\\\",\\\"password\\\":\\\"$CI_REGISTRY_PASSWORD\\\"}}}\" > ~/.docker/config.json | buildctl-daemonless.sh build \\ --frontend dockerfile.v0 \\ --local context=. \\ --local dockerfile=. \\ --export-cache type=registry,ref=$CACHE_IMAGE \\ --import-cache type=registry,ref=$CACHE_IMAGE \\ --output type=image,name=$CI_REGISTRY_IMAGE:$CI_COMMIT_SHA,push=trueUse a registry mirror in rootless modeRegistry mirrors provide faster image pulls and can help with rate limiting or network restrictions.To configure registry mirrors, create a buildkit.toml file that specifies the mirror endpoints. For : : moby/buildkit:rootless entrypoint: [\"\"] : --oci-worker-no-process-sandbox --config /tmp/buildkit.toml mkdir -p ~/.docker - echo \"{\\\"auths\\\":{\\\"$CI_REGISTRY\\\":{\\\"username\\\":\\\"$CI_REGISTRY_USER\\\",\\\"password\\\":\\\"$CI_REGISTRY_PASSWORD\\\"}}}\" > ~/.docker/config.json - cat <<'EOF' > /tmp/buildkit.toml [registry.\"docker.io\"] mirrors = [\"mirror.example.com\"] EOF | buildctl-daemonless.sh build \\ --frontend dockerfile.v0 \\ --local context=. \\ --local dockerfile=. \\ --output type=image,name=$CI_REGISTRY_IMAGE:$CI_COMMIT_SHA,push=trueIn this example, replace mirror.example.com with your registry mirror URL.Configure proxy settingsIf your GitLab Runner operates behind an HTTP(S) proxy, configure proxy settings as variables in your job. For : : moby/buildkit:rootless entrypoint: [\"\"] : --oci-worker-no-process-sandbox http_proxy: <your-proxy> https_proxy: <your-proxy> no_proxy: <your-no-proxy> mkdir -p ~/.docker - echo \"{\\\"auths\\\":{\\\"$CI_REGISTRY\\\":{\\\"username\\\":\\\"$CI_REGISTRY_USER\\\",\\\"password\\\":\\\"$CI_REGISTRY_PASSWORD\\\"}}}\" > ~/.docker/config.json | buildctl-daemonless.sh build \\ --frontend dockerfile.v0 \\ --local context=. \\ --local dockerfile=. \\ --build-arg http_proxy=$http_proxy \\ --build-arg https_proxy=$https_proxy \\ --build-arg no_proxy=$no_proxy \\ --output type=image,name=$CI_REGISTRY_IMAGE:$CI_COMMIT_SHA,push=trueIn this example, replace <your-proxy> and <your-no-proxy> with your proxy configuration.Add custom certificatesTo push to a registry with a custom CA certificate, configure the certificate in a BuildKit configuration file before the daemon starts. For : : moby/buildkit:rootless entrypoint: [\"\"] : --oci-worker-no-process-sandbox mkdir -p \"$HOME/.docker\" - echo \"{\\\"auths\\\":{\\\"$CI_REGISTRY\\\":{\\\"username\\\":\\\"$CI_REGISTRY_USER\\\",\\\"password\\\":\\\"$CI_REGISTRY_PASSWORD\\\"}}}\" > \"$HOME/.docker/config.json\" - REG_HOST=\"${CI_REGISTRY%%/*}\" - mkdir -p \"$HOME/.config/buildkit/certs/$REG_HOST\" - echo \"$CA_CERT\" > \"$HOME/.config/buildkit/certs/$REG_HOST/ca.pem\" - | cat > \"$HOME/.config/buildkit/buildkitd.toml\" << EOT [registry.\"$REG_HOST\"] ca = [\"$HOME/.config/buildkit/certs/$REG_HOST/ca.pem\"] EOT - export SSL_CERT_FILE=\"$HOME/.config/buildkit/certs/$REG_HOST/ca.pem\" | buildctl-daemonless.sh build \\ --frontend dockerfile.v0 \\ --local context=. \\ --local dockerfile=. \\ --output type=image,name=$CI_REGISTRY_IMAGE:$CI_COMMIT_SHA,push=trueIn this =\"${CI_REGISTRY%%/*}\" extracts the hostname from the registry URL.buildkitd.toml configures BuildKit to trust the CA certificate for the target registry. BuildKit auto-discovers this file from $HOME/.config/buildkit/.SSL_CERT_FILE is required in addition to buildkitd.toml to cover TLS connections made before the BuildKit daemon fully initializes.Add a CA_CERT CI/CD variable with the full certificate chain, including the root and any intermediate certificates. Because PEM certificates contain newlines, the value of CA_CERT cannot be masked. To mask the value, use a file-type variable instead and replace echo \"$CA_CERT\" with cat \"$CA_CERT\" in the before_script.If the target registry uses the same certificate authority as your GitLab instance, and the runner is configured with tls-ca-file, you can reference the predefined CI_SERVER_TLS_CA_FILE variable instead of a CA_CERT variable.Migrate from Kaniko to BuildKitBuildKit rootless is a secure alternative to Kaniko that offers improved performance, better caching, and enhanced security features without privileged containers.Update your configurationUpdate your existing Kaniko configuration to use the BuildKit rootless method. For , with : : gcr.io/kaniko-project/executor:debug entrypoint: [\"\"] /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:$CI_COMMIT_SHAAfter, with BuildKit : : moby/buildkit:rootless entrypoint: [\"\"] : --oci-worker-no-process-sandbox mkdir -p ~/.docker - echo \"{\\\"auths\\\":{\\\"$CI_REGISTRY\\\":{\\\"username\\\":\\\"$CI_REGISTRY_USER\\\",\\\"password\\\":\\\"$CI_REGISTRY_PASSWORD\\\"}}}\" > ~/.docker/config.json | buildctl-daemonless.sh build \\ --frontend dockerfile.v0 \\ --local context=. \\ --local dockerfile=. \\ --output type=image,name=$CI_REGISTRY_IMAGE:$CI_COMMIT_SHA,push=trueCustom CA certificatesIf your Kaniko jobs used custom CA certificates, you must configure those certificates explicitly for BuildKit rootless. Unlike Kaniko, the moby/buildkit:rootless image does not include a system certificate store. You must configure CA certificates in a BuildKit configuration file before the daemon starts.To migrate custom CA certificate configuration to BuildKit the full certificate chain in a CI/CD variable named CA_CERT. Include the root and any intermediate certificates.Update your job configuration to use a buildkitd.toml file and the SSL_CERT_FILE environment variable. For the full example, see add custom certificates.Alternative BuildKit methodsIf you don’t need rootless builds, BuildKit offers additional methods that require the service but provide familiar workflows or advanced features.Docker BuildxDocker Buildx extends Docker build capabilities with BuildKit features while maintaining familiar command syntax. This method requires the service.Build basic imagesTo build Docker images with Buildx, configure your job with the service and create a buildx builder. For : DOCKER_TLS_CERTDIR: \"/certs\" : docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - docker buildx create --use --driver docker-container --name builder - docker buildx inspect --bootstrap docker buildx build --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA --push . docker buildx rm builderBuild multi-platform imagesMulti-platform builds create images for different architectures in a single build command. The resulting manifest supports multiple architectures, and Docker automatically selects the appropriate image for each deployment target.To build images for multiple architectures, add the --platform flag to specify target architectures. For : DOCKER_TLS_CERTDIR: \"/certs\" : docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - docker buildx create --use --driver docker-container --name multibuilder - docker buildx inspect --bootstrap docker buildx build --platform linux/amd64,linux/arm64 --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA --push . docker buildx rm multibuilderUse build cachingRegistry-based caching stores build layers in a container registry for reuse across builds.The mode=max option exports all layers to the cache and provides maximum reuse potential for subsequent builds.To use build caching, add cache options to your build command. For : DOCKER_TLS_CERTDIR: \"/certs\" CACHE_IMAGE: $CI_REGISTRY_IMAGE:cache : docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - docker buildx create --use --driver docker-container --name cached-builder - docker buildx inspect --bootstrap docker buildx build --cache-from type=registry,ref=$CACHE_IMAGE --cache-to type=registry,ref=$CACHE_IMAGE,mode=max --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA --push . docker buildx rm cached-builderNative BuildKitUse native BuildKit buildctl commands for more control over the build process. This method requires the service.To use BuildKit directly, configure your job with the BuildKit image and service. For : DOCKER_TLS_CERTDIR: \"/certs\" : moby/buildkit:latest mkdir -p ~/.docker - echo \"{\\\"auths\\\":{\\\"$CI_REGISTRY\\\":{\\\"username\\\":\\\"$CI_REGISTRY_USER\\\",\\\"password\\\":\\\"$CI_REGISTRY_PASSWORD\\\"}}}\" > ~/.docker/config.json | buildctl build \\ --frontend dockerfile.v0 \\ --local context=. \\ --local dockerfile=. \\ --output type=image,name=$CI_REGISTRY_IMAGE:$CI_COMMIT_SHA,push=trueTroubleshootingWhen you build images with BuildKit, you might encounter the following issues.Build fails with authentication errorsIf you encounter registry authentication that CI_REGISTRY_USER and CI_REGISTRY_PASSWORD variables are available.Check that you have push permissions to the target registry.For external registries, ensure authentication credentials are correctly configured in your project’s CI/CD variables.Rootless build fails with permission errorsIf a rootless build fails with a permission error, check the is set.Verify that the GitLab Runner has sufficient resources allocated.Check that no privileged operations are attempted in your Dockerfile.On a Kubernetes runner, an AppArmor-related mount permission error can also block rootless containers. For more information, see AppArmor mount permission errors on the Kubernetes executor.If the failure matches the following error, the runner security policy is blocking a system call that rootless BuildKit requires.Error: fork/exec /proc/self/exe: operation not permittedOn a runner that uses the Docker executor without privileged mode, you might get one of the following not connect to unix:///run/user/1000/buildkit/buildkitd.sock after 10 trials [rootlesskit:parent] to start the /exec /proc/self/exe: operation not permittedThis issue occurs because the runner seccomp profile blocks the system calls that rootless BuildKit requires. Hosted runners on GitLab.com run in privileged mode and are not affected.To resolve this issue on self-managed runners, configure the Docker executor security_opt setting to permit only the system calls that BuildKit requires.Do not set security_opt to Although it resolves the errors, it disables the container’s default seccomp profile, which removes protection against dangerous system calls and reduces isolation. Instead, use a custom seccomp profile that permits only the required calls, or build images with rootless Buildah.Error: invalid path/to/image/Dockerfile: not a directoryYou might get an error that states invalid path/to/image/Dockerfile: not a directory.This issue occurs when you specify a file path instead of a directory path for the --local dockerfile= parameter. BuildKit expects a directory path that contains a file named Dockerfile.To resolve this issue, use the directory path instead of the full file path. For : --local dockerfile=path/to/imageInstead dockerfile=path/to/image/DockerfileMulti-platform builds failFor multi-platform build that base images in your Dockerfile support the target architectures.Check that architecture-specific dependencies are available for all target platforms.Consider using conditional statements in your Dockerfile for architecture-specific logic.BuildKit methodsPrerequisitesBuildKit rootlessAuthenticate with container registriesAuthenticate with the GitLab container registryAuthenticate with multiple registriesAuthenticate with the dependency proxyBuild images in rootless modeBuild multi-platform images in rootless modeUse caching in rootless modeUse a registry mirror in rootless modeConfigure proxy settingsAdd custom certificatesMigrate from Kaniko to BuildKitUpdate your configurationCustom CA certificatesAlternative BuildKit methodsDocker BuildxBuild basic imagesBuild multi-platform imagesUse build cachingNative BuildKitTroubleshootingBuild fails with authentication errorsRootless build fails with permission /exec /proc/self/exe: operation not path/to/image/Dockerfile: not a directoryMulti-platform builds fail\n\nExample:\n```yaml\nbefore_script:\n  - mkdir -p ~/.docker\n  - echo \"{\\\"auths\\\":{\\\"$CI_REGISTRY\\\":{\\\"username\\\":\\\"$CI_REGISTRY_USER\\\",\\\"password\\\":\\\"$CI_REGISTRY_PASSWORD\\\"}}}\" > ~/.docker/config.json\n```\n\nExample:\n```yaml\nbefore_script:\n  - mkdir -p ~/.docker\n  - |\n    echo \"{\n      \\\"auths\\\": {\n        \\\"${CI_REGISTRY}\\\": {\n          \\\"auth\\\": \\\"$(printf \"%s:%s\" \"${CI_REGISTRY_USER}\" \"${CI_REGISTRY_PASSWORD}\" | base64 | tr -d '\\n')\\\"\n        },\n        \\\"docker.io\\\": {\n          \\\"auth\\\": \\\"$(printf \"%s:%s\" \"${DOCKER_HUB_USER}\" \"${DOCKER_HUB_PASSWORD}\" | base64 | tr -d '\\n')\\\"\n        }\n      }\n    }\" > ~/.docker/config.json\n```\n\nExample:\n```yaml\nbefore_script:\n  - mkdir -p ~/.docker\n  - |\n    echo \"{\n      \\\"auths\\\": {\n        \\\"${CI_REGISTRY}\\\": {\n          \\\"auth\\\": \\\"$(printf \"%s:%s\" \"${CI_REGISTRY_USER}\" \"${CI_REGISTRY_PASSWORD}\" | base64 | tr -d '\\n')\\\"\n        },\n        \\\"$(echo -n $CI_DEPENDENCY_PROXY_SERVER | awk -F[:] '{print $1}')\\\": {\n          \\\"auth\\\": \\\"$(printf \"%s:%s\" ${CI_DEPENDENCY_PROXY_USER} \"${CI_DEPENDENCY_PROXY_PASSWORD}\" | base64 | tr -d '\\n')\\\"\n        }\n      }\n    }\" > ~/.docker/config.json\n```\n\nExample:\n```yaml\nbuild-rootless:\n  image:\n    name: moby/buildkit:rootless\n    entrypoint: [\"\"]\n  stage: build\n  variables:\n    BUILDKITD_FLAGS: --oci-worker-no-process-sandbox\n  before_script:\n    - mkdir -p ~/.docker\n    - echo \"{\\\"auths\\\":{\\\"$CI_REGISTRY\\\":{\\\"username\\\":\\\"$CI_REGISTRY_USER\\\",\\\"password\\\":\\\"$CI_REGISTRY_PASSWORD\\\"}}}\" > ~/.docker/config.json\n  script:\n    - |\n      buildctl-daemonless.sh build \\\n        --frontend dockerfile.v0 \\\n        --local context=. \\\n        --local dockerfile=. \\\n        --output type=image,name=$CI_REGISTRY_IMAGE:$CI_COMMIT_SHA,push=true\n```\n\nExample:\n```yaml\nbuild-multiarch-rootless:\n  image:\n    name: moby/buildkit:rootless\n    entrypoint: [\"\"]\n  stage: build\n  variables:\n    BUILDKITD_FLAGS: --oci-worker-no-process-sandbox\n  before_script:\n    - mkdir -p ~/.docker\n    - echo \"{\\\"auths\\\":{\\\"$CI_REGISTRY\\\":{\\\"username\\\":\\\"$CI_REGISTRY_USER\\\",\\\"password\\\":\\\"$CI_REGISTRY_PASSWORD\\\"}}}\" > ~/.docker/config.json\n  script:\n    - |\n      buildctl-daemonless.sh build \\\n        --frontend dockerfile.v0 \\\n        --local context=. \\\n        --local dockerfile=. \\\n        --opt platform=linux/amd64,linux/arm64 \\\n        --output type=image,name=$CI_REGISTRY_IMAGE:$CI_COMMIT_SHA,push=true\n```\n\nExample:\n```yaml\nbuild-cached-rootless:\n  image:\n    name: moby/buildkit:rootless\n    entrypoint: [\"\"]\n  stage: build\n  variables:\n    BUILDKITD_FLAGS: --oci-worker-no-process-sandbox\n    CACHE_IMAGE: $CI_REGISTRY_IMAGE:cache\n  before_script:\n    - mkdir -p ~/.docker\n    - echo \"{\\\"auths\\\":{\\\"$CI_REGISTRY\\\":{\\\"username\\\":\\\"$CI_REGISTRY_USER\\\",\\\"password\\\":\\\"$CI_REGISTRY_PASSWORD\\\"}}}\" > ~/.docker/config.json\n  script:\n    - |\n      buildctl-daemonless.sh build \\\n        --frontend dockerfile.v0 \\\n        --local context=. \\\n        --local dockerfile=. \\\n        --export-cache type=registry,ref=$CACHE_IMAGE \\\n        --import-cache type=registry,ref=$CACHE_IMAGE \\\n        --output type=image,name=$CI_REGISTRY_IMAGE:$CI_COMMIT_SHA,push=true\n```\n\nExample:\n```yaml\nbuild-mirror-rootless:\n  image:\n    name: moby/buildkit:rootless\n    entrypoint: [\"\"]\n  stage: build\n  variables:\n    BUILDKITD_FLAGS: --oci-worker-no-process-sandbox --config /tmp/buildkit.toml\n  before_script:\n    - mkdir -p ~/.docker\n    - echo \"{\\\"auths\\\":{\\\"$CI_REGISTRY\\\":{\\\"username\\\":\\\"$CI_REGISTRY_USER\\\",\\\"password\\\":\\\"$CI_REGISTRY_PASSWORD\\\"}}}\" > ~/.docker/config.json\n    - cat <<'EOF' > /tmp/buildkit.toml\n      [registry.\"docker.io\"]\n        mirrors = [\"mirror.example.com\"]\n      EOF\n  script:\n    - |\n      buildctl-daemonless.sh build \\\n        --frontend dockerfile.v0 \\\n        --local context=. \\\n        --local dockerfile=. \\\n        --output type=image,name=$CI_REGISTRY_IMAGE:$CI_COMMIT_SHA,push=true\n```\n\nExample:\n```yaml\nbuild-behind-proxy:\n  image:\n    name: moby/buildkit:rootless\n    entrypoint: [\"\"]\n  stage: build\n  variables:\n    BUILDKITD_FLAGS: --oci-worker-no-process-sandbox\n    http_proxy: <your-proxy>\n    https_proxy: <your-proxy>\n    no_proxy: <your-no-proxy>\n  before_script:\n    - mkdir -p ~/.docker\n    - echo \"{\\\"auths\\\":{\\\"$CI_REGISTRY\\\":{\\\"username\\\":\\\"$CI_REGISTRY_USER\\\",\\\"password\\\":\\\"$CI_REGISTRY_PASSWORD\\\"}}}\" > ~/.docker/config.json\n  script:\n    - |\n      buildctl-daemonless.sh build \\\n        --frontend dockerfile.v0 \\\n        --local context=. \\\n        --local dockerfile=. \\\n        --build-arg http_proxy=$http_proxy \\\n        --build-arg https_proxy=$https_proxy \\\n        --build-arg no_proxy=$no_proxy \\\n        --output type=image,name=$CI_REGISTRY_IMAGE:$CI_COMMIT_SHA,push=true\n```\n\nExample:\n```yaml\nbuild-with-custom-certs:\n  image:\n    name: moby/buildkit:rootless\n    entrypoint: [\"\"]\n  stage: build\n  variables:\n    BUILDKITD_FLAGS: --oci-worker-no-process-sandbox\n  before_script:\n    - mkdir -p \"$HOME/.docker\"\n    - echo \"{\\\"auths\\\":{\\\"$CI_REGISTRY\\\":{\\\"username\\\":\\\"$CI_REGISTRY_USER\\\",\\\"password\\\":\\\"$CI_REGISTRY_PASSWORD\\\"}}}\" > \"$HOME/.docker/config.json\"\n    - REG_HOST=\"${CI_REGISTRY%%/*}\"\n    - mkdir -p \"$HOME/.config/buildkit/certs/$REG_HOST\"\n    - echo \"$CA_CERT\" > \"$HOME/.config/buildkit/certs/$REG_HOST/ca.pem\"\n    - |\n      cat > \"$HOME/.config/buildkit/buildkitd.toml\" << EOT\n      [registry.\"$REG_HOST\"]\n        ca = [\"$HOME/.config/buildkit/certs/$REG_HOST/ca.pem\"]\n      EOT\n    - export SSL_CERT_FILE=\"$HOME/.config/buildkit/certs/$REG_HOST/ca.pem\"\n  script:\n    - |\n      buildctl-daemonless.sh build \\\n        --frontend dockerfile.v0 \\\n        --local context=. \\\n        --local dockerfile=. \\\n        --output type=image,name=$CI_REGISTRY_IMAGE:$CI_COMMIT_SHA,push=true\n```\n\nExample:\n```yaml\nbuild:\n  image:\n    name: gcr.io/kaniko-project/executor:debug\n    entrypoint: [\"\"]\n  script:\n    - /kaniko/executor\n      --context $CI_PROJECT_DIR\n      --dockerfile $CI_PROJECT_DIR/Dockerfile\n      --destination $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA\n```\n\nExample:\n```yaml\nbuild:\n  image:\n    name: moby/buildkit:rootless\n    entrypoint: [\"\"]\n  variables:\n    BUILDKITD_FLAGS: --oci-worker-no-process-sandbox\n  before_script:\n    - mkdir -p ~/.docker\n    - echo \"{\\\"auths\\\":{\\\"$CI_REGISTRY\\\":{\\\"username\\\":\\\"$CI_REGISTRY_USER\\\",\\\"password\\\":\\\"$CI_REGISTRY_PASSWORD\\\"}}}\" > ~/.docker/config.json\n  script:\n    - |\n      buildctl-daemonless.sh build \\\n        --frontend dockerfile.v0 \\\n        --local context=. \\\n        --local dockerfile=. \\\n        --output type=image,name=$CI_REGISTRY_IMAGE:$CI_COMMIT_SHA,push=true\n```\n\nExample:\n```yaml\nvariables:\n  DOCKER_TLS_CERTDIR: \"/certs\"\n\nbuild-image:\n  image: docker:cli\n  services:\n    - docker:dind\n  stage: build\n  before_script:\n    - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY\n    - docker buildx create --use --driver docker-container --name builder\n    - docker buildx inspect --bootstrap\n  script:\n    - docker buildx build --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA --push .\n  after_script:\n    - docker buildx rm builder\n```\n\nExample:\n```yaml\nvariables:\n  DOCKER_TLS_CERTDIR: \"/certs\"\n\nbuild-multiplatform:\n  image: docker:cli\n  services:\n    - docker:dind\n  stage: build\n  before_script:\n    - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY\n    - docker buildx create --use --driver docker-container --name multibuilder\n    - docker buildx inspect --bootstrap\n  script:\n    - docker buildx build\n        --platform linux/amd64,linux/arm64\n        --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA\n        --push .\n  after_script:\n    - docker buildx rm multibuilder\n```\n\nExample:\n```yaml\nvariables:\n  DOCKER_TLS_CERTDIR: \"/certs\"\n  CACHE_IMAGE: $CI_REGISTRY_IMAGE:cache\n\nbuild-with-cache:\n  image: docker:cli\n  services:\n    - docker:dind\n  stage: build\n  before_script:\n    - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY\n    - docker buildx create --use --driver docker-container --name cached-builder\n    - docker buildx inspect --bootstrap\n  script:\n    - docker buildx build\n        --cache-from type=registry,ref=$CACHE_IMAGE\n        --cache-to type=registry,ref=$CACHE_IMAGE,mode=max\n        --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA\n        --push .\n  after_script:\n    - docker buildx rm cached-builder\n```\n\nExample:\n```yaml\nvariables:\n  DOCKER_TLS_CERTDIR: \"/certs\"\n\nbuild-with-buildkit:\n  image: moby/buildkit:latest\n  services:\n    - docker:dind\n  stage: build\n  before_script:\n    - mkdir -p ~/.docker\n    - echo \"{\\\"auths\\\":{\\\"$CI_REGISTRY\\\":{\\\"username\\\":\\\"$CI_REGISTRY_USER\\\",\\\"password\\\":\\\"$CI_REGISTRY_PASSWORD\\\"}}}\" > ~/.docker/config.json\n  script:\n    - |\n      buildctl build \\\n        --frontend dockerfile.v0 \\\n        --local context=. \\\n        --local dockerfile=. \\\n        --output type=image,name=$CI_REGISTRY_IMAGE:$CI_COMMIT_SHA,push=true\n```\n\nExample:\n```plaintext\ncould not connect to unix:///run/user/1000/buildkit/buildkitd.sock after 10 trials\n[rootlesskit:parent] error: failed to start the child: fork/exec /proc/self/exe: operation not permitted\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:11.372Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":16,"totalLines":322,"estimatedTokens":6754}}246{"id":"doc-sorting_and_ordering_issue_lists_gitlab_docs-310c1e12","source":"documentation","title":"Sorting and ordering issue lists | GitLab Docs","url":"https://docs.gitlab.com/user/project/issues/sorting_issue_lists/","text":"Getting startedTutorialsManage your organizationOrganize work with projectsPlan and track workGetting GitLab for GitLab for KanbanWork itemsEpicsIssuesCreate issuesManage issuesIssue boardsConfidential issuesCrosslinking issuesCSV exportCSV importDesign management (deprecated)Due datesEmoji an issue in an existing up a project for issue up a group for issue up a complex group with subgroups for issue up a project for idea managementMultiple assigneesLinked issuesService DeskSorting and ordering issue listsZoom meetings in issuesTasksLinked itemsChild itemsCustom fieldsStatusSaved viewsWeightConfigurable work item typesWorkplanLabelsIterationsMilestonesComments and threadsRequirementsTime trackingCustomer relations (CRM)WikisRoadmapsObjectives and key results (OKR)Keyboard shortcutsQuick actionsMarkdownAsciiDocOrg modeTo-Do ListGitLab Query Language (GLQL)Manage authentication and authorizationUse GitManage your codeUse CI/CD to build your applicationSecure your applicationDeploy and release your applicationManage your infrastructureMonitor your applicationAnalyze GitLab usageRelease notesFeature supportFind your GitLab versionGitLab Docs /Use GitLab /Plan and track work /Work items /Issues /Sorting and ordering issue listsHelp us learn about your current experience with the documentation. Take the survey.Sorting and ordering issue , Premium, , GitLab Self-Managed, GitLab DedicatedYou can sort a list of issues several ways. The available sorting options can change based on the context of the list.Sorting by blocking , , GitLab Self-Managed, GitLab DedicatedWhen you sort by Blocking, the issue list changes to sort descending by the number of issues each issue is blocking.Sorting by created, updated, or closed dateWhen you sort by Created, Updated, or Closed date, the issue list changes to sort descending by the respective date and timestamp. Issues created, updated, or closed most recently are first.Sorting by due dateWhen you sort by Due date, the issue list changes to sort ascending by the issue due date. Issues with the earliest due date are first, and issues without a due date are last.Sorting by label priorityWhen you sort by Label priority, the issue list changes to sort descending. Issues with the highest priority label are first, then all other issues.Ties are broken arbitrarily. Only the highest prioritized label is checked, and labels with a lower priority are ignored. For more information, see issue 14523.For more information, see label priority.Manual sortingWhen you sort by Manual order, you can change the order by dragging and dropping the issues. The changed order persists, and everyone who visits the same list sees the updated issue order, with some exceptions.Each issue is assigned a relative order value, representing its relative order with respect to the other issues on the list. When you drag-and-drop reorder an issue, its relative order value changes.In addition, any time an issue appears in a manually sorted list, the updated relative order value is used for the ordering. So, if anyone drags issue A above issue B in your GitLab instance, this ordering is maintained whenever they appear together in any list.This ordering also affects issue boards. Changing the order in an issue list changes the ordering in an issue board, and the other way around.Sorting by milestone due dateWhen you sort by Milestone due date, the issue list changes to sort ascending by the assigned milestone due date. Issues with milestones with the earliest due date are first, then issues with a milestone without a due date.Sorting by popularityWhen you sort by Popularity, the issue order changes to sort descending by the number of upvotes (emoji reactions with the “thumbs up”) on each issue. You can use this to identify issues that are in high demand.The total number of votes is not summed up. An issue with 18 upvotes and 5 downvotes is considered more popular than an issue with 17 upvotes and no downvotes.Sorting by priorityWhen you sort by Priority, the issue order changes to sort in this with milestones that have due dates, where the soonest assigned milestone is listed first.Issues with milestones with no due dates.Issues with a higher priority label.Issues without a prioritized label.Ties are broken arbitrarily.For more information, see label priority.Sorting by titleWhen you sort by Title, the issue order changes to sort alphabetically by the issue title in this Latin, then accented (for example, ö)Sorting by health : GitLab.com, GitLab Self-Managed, GitLab DedicatedWhen you sort by Health, the issue list changes to sort by the health status of the issues When in descending order, the issues are shown in the following risk issuesNeeds attention issuesOn track issuesAll other issuesSorting by weightWhen you sort by Weight, the issue list changes to sort ascending by the issue weight. Issues with lowest weight are first, and issues without a weight are last.Sorting by , , GitLab Self-Managed, GitLab DedicatedHistoryIntroduced in GitLab 18.5 with a feature flag named work_item_status_mvc2. Enabled by default.Generally available in GitLab 18.6. Feature flag work_item_status_mvc2 removed.When you sort by Status, the issue list changes to sort ascending by the issue status. Issues are first sorted by their status category. If two issues share the same category, the system falls back to sorting by issue ID.Sorting by blocking issuesSorting by created, updated, or closed dateSorting by due dateSorting by label priorityManual sortingSorting by milestone due dateSorting by popularitySorting by prioritySorting by titleSorting by health statusSorting by weightSorting by status\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:11.580Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":0,"totalLines":3,"estimatedTokens":1420}}247{"id":"doc-group_wikis_api_gitlab_docs-e9dd1745","source":"documentation","title":"Group wikis API | GitLab Docs","url":"https://docs.gitlab.com/api/group_wikis/","text":"Getting startedTutorialsIntegrationsWebhooksREST APIResources.gitignore (templates).gitlab-ci.yml (templates)Access requestsAgent for KubernetesAI Catalog adminAlert managementApplication appearanceApplication settingsApplication statisticsApplicationsAttestationsAudit eventsAvatarBranchesBroadcast messagesCluster discovery (certificate-based) (deprecated)Code SuggestionsCommitsCompliance and policy settingsContainer registryContainer virtual registryCustom attributesDatabase migrationsData managementDependenciesDependency list exportDeploy keysDeploy tokensDeploymentsDiscussionsDockerfile (templates)DORA4 metricsEmoji reactionsEnvironmentsEpics (deprecated)Error trackingEventsExperimentsExternal status checksFeature flagsFeature flag user listsFlowsFreeze periodsGeo nodes (deprecated)Geo sitesGitLab Duo Chat completionsGitLab PagesGLQLGoogle Cloud integrationGroupsAccess tokensActivity analyticsBadgesCI/CD variablesEnterprise usersEpic boardsImport and exportIntegrationsIssue boardsIterationsLabelsLDAP group linksMarkdown uploadsMembersMigration by direct transferMilestonesPlaceholder reassignmentsProtected branchesProtected environmentsPush rulesRelations exportReleasesRepository storage movesSAMLSCIMSecurity settingsSSH certificatesWebhooksWikisImportInstance CI/CD variablesInvitationsIssuesIssues (epic) (deprecated)Issues statisticsJobsJob artifactsJob token scopesKeysLicenseLicenses (templates)Linked epics (deprecated)Links (issue)Links (epic) (deprecated)Lint , { \"content\" : \"Our development process is described here.\", \"format\" : \"markdown\", \"slug\" : \"development\", \"title\" : \"development\", \"encoding\": \"UTF-8\" },{ \"content\" : \"* [Deploy](deploy)\\n* [Development](development)\", \"format\" : \"markdown\", \"slug\" : \"home\", \"title\" : \"home\", \"encoding\": \"UTF-8\" } ]Retrieve a wiki pageRetrieves a wiki page for a specified group.GET /groups/:id/wikis/:slugAttributeTypeRequiredDescriptionidinteger or stringYesThe ID or URL-encoded path of the group.slugstringYesURL-encoded slug (a unique string) of the wiki page, such as dir%2Fpage_name.render_htmlbooleanNoReturn the rendered HTML of the wiki page.versionstringNoWiki page version SHA.curl \\ --header \"PRIVATE-TOKEN: <your_access_token>\" \\ --url \"https://gitlab.example.com/api/v4/groups/1/wikis/home\"Example response:{ \"content\" : \"home page\", \"format\" : \"markdown\", \"slug\" : \"home\", \"title\" : \"home\", \"encoding\": \"UTF-8\" }Create a wiki pageCreates a wiki page for a specific group with the given title, slug, and content.POST /groups/:id/wikisAttributeTypeRequiredDescriptionidinteger or stringYesThe ID or URL-encoded path of the group.contentstringYesThe content of the wiki page.titlestringYesThe title of the wiki page.formatstringNoThe format of the wiki page. Available formats (default), rdoc, asciidoc, and org.curl --request POST \\ --data \"format=rdoc&title=Hello&content=Hello world\" \\ --header \"PRIVATE-TOKEN: <your_access_token>\" \\ --url \"https://gitlab.example.com/api/v4/groups/1/wikis\"Example response:{ \"content\" : \"Hello world\", \"format\" : \"markdown\", \"slug\" : \"Hello\", \"title\" : \"Hello\", \"encoding\": \"UTF-8\" }Update a wiki pageUpdates a wiki page. At least one parameter is required to update the wiki page.PUT /groups/:id/wikis/:slugAttributeTypeRequiredDescriptionidinteger or stringYesThe ID or URL-encoded path of the group.contentstringYes, if title is not providedThe content of the wiki page.titlestringYes, if content is not providedThe title of the wiki page.formatstringNoThe format of the wiki page. Available formats are markdown (default), rdoc, asciidoc, and org.slugstringYesURL encoded slug (a unique string) of the wiki page. For %2Fpage_name.curl --request PUT \\ --header \"PRIVATE-TOKEN: <your_access_token>\" \\ --url \"https://gitlab.example.com/api/v4/groups/1/wikis/foo\" \\ --data \"format=rdoc\" \\ --data \"title=Docs\" \\ --data \"content=documentation\"Example response:{ \"content\" : \"documentation\", \"format\" : \"markdown\", \"slug\" : \"Docs\", \"title\" : \"Docs\", \"encoding\": \"UTF-8\" }Delete a wiki pageDeletes a wiki page from a specific project with a specified slug.DELETE /groups/:id/wikis/:slugAttributeTypeRequiredDescriptionidinteger or stringYesThe ID or URL-encoded path of the group.slugstringYesURL-encoded slug (a unique string) of the wiki page, such as dir%2Fpage_name.curl --request DELETE \\ --header \"PRIVATE-TOKEN: <your_access_token>\" \\ --url \"https://gitlab.example.com/api/v4/groups/1/wikis/foo\"If successful, a 204 No Content HTTP response with an empty body is expected.Upload an attachment to the wiki repositoryUploads a file to the attachment folder inside the wiki’s repository for a specific project. The attachment folder is the uploads folder.POST /groups/:id/wikis/attachmentsAttributeTypeRequiredDescriptionidinteger or stringYesThe ID or URL-encoded path of the group.filestringYesThe attachment to be uploaded.branchstringNoThe name of the branch. Defaults to the wiki repository default branch.To upload a file from your file system, use the --form argument. This causes cURL to post data using the header /form-data. The file= parameter must point to a file on your file system and be preceded by @. For --request POST \\ --header \"PRIVATE-TOKEN: <your_access_token>\" \\ --url \"https://gitlab.example.com/api/v4/groups/1/wikis/attachments\" \\ --form \"file=@dk.png\"Example response:{ \"file_name\" : \"dk.png\", \"file_path\" : \"uploads/6a061c4cf9f1c28cb22c384b4b8d4e3c/dk.png\", \"branch\" : \"main\", \"link\" : { \"url\" : \"uploads/6a061c4cf9f1c28cb22c384b4b8d4e3c/dk.png\", \"markdown\" : \"![dk](uploads/6a061c4cf9f1c28cb22c384b4b8d4e3c/dk.png)\" } }List wiki pagesRetrieve a wiki pageCreate a wiki pageUpdate a wiki pageDelete a wiki pageUpload an attachment to the wiki repository\n\nExample:\n```plaintext\nGET /groups/:id/wikis\n```\n\nExample:\n```shell\ncurl \\\n  --header \"PRIVATE-TOKEN: <your_access_token>\" \\\n  --url \"https://gitlab.example.com/api/v4/groups/1/wikis?with_content=1\"\n```\n\nExample:\n```json\n[\n  {\n    \"content\" : \"Here is an instruction how to deploy this project.\",\n    \"format\" : \"markdown\",\n    \"slug\" : \"deploy\",\n    \"title\" : \"deploy\",\n    \"encoding\": \"UTF-8\"\n  },\n  {\n    \"content\" : \"Our development process is described here.\",\n    \"format\" : \"markdown\",\n    \"slug\" : \"development\",\n    \"title\" : \"development\",\n    \"encoding\": \"UTF-8\"\n  },{\n    \"content\" : \"*  [Deploy](deploy)\\n*  [Development](development)\",\n    \"format\" : \"markdown\",\n    \"slug\" : \"home\",\n    \"title\" : \"home\",\n    \"encoding\": \"UTF-8\"\n  }\n]\n```\n\nExample:\n```plaintext\nGET /groups/:id/wikis/:slug\n```\n\nExample:\n```shell\ncurl \\\n  --header \"PRIVATE-TOKEN: <your_access_token>\" \\\n  --url \"https://gitlab.example.com/api/v4/groups/1/wikis/home\"\n```\n\nExample:\n```json\n{\n  \"content\" : \"home page\",\n  \"format\" : \"markdown\",\n  \"slug\" : \"home\",\n  \"title\" : \"home\",\n  \"encoding\": \"UTF-8\"\n}\n```\n\nExample:\n```plaintext\nPOST /groups/:id/wikis\n```\n\nExample:\n```shell\ncurl --request POST \\\n     --data \"format=rdoc&title=Hello&content=Hello world\" \\\n     --header \"PRIVATE-TOKEN: <your_access_token>\" \\\n     --url \"https://gitlab.example.com/api/v4/groups/1/wikis\"\n```\n\nExample:\n```json\n{\n  \"content\" : \"Hello world\",\n  \"format\" : \"markdown\",\n  \"slug\" : \"Hello\",\n  \"title\" : \"Hello\",\n  \"encoding\": \"UTF-8\"\n}\n```\n\nExample:\n```plaintext\nPUT /groups/:id/wikis/:slug\n```\n\nExample:\n```shell\ncurl --request PUT \\\n  --header \"PRIVATE-TOKEN: <your_access_token>\" \\\n  --url \"https://gitlab.example.com/api/v4/groups/1/wikis/foo\" \\\n  --data \"format=rdoc\" \\\n  --data \"title=Docs\" \\\n  --data \"content=documentation\"\n```\n\nExample:\n```json\n{\n  \"content\" : \"documentation\",\n  \"format\" : \"markdown\",\n  \"slug\" : \"Docs\",\n  \"title\" : \"Docs\",\n  \"encoding\": \"UTF-8\"\n}\n```\n\nExample:\n```plaintext\nDELETE /groups/:id/wikis/:slug\n```\n\nExample:\n```shell\ncurl --request DELETE \\\n  --header \"PRIVATE-TOKEN: <your_access_token>\" \\\n  --url \"https://gitlab.example.com/api/v4/groups/1/wikis/foo\"\n```\n\nExample:\n```plaintext\nPOST /groups/:id/wikis/attachments\n```\n\nExample:\n```shell\ncurl --request POST \\\n  --header \"PRIVATE-TOKEN: <your_access_token>\" \\\n  --url \"https://gitlab.example.com/api/v4/groups/1/wikis/attachments\" \\\n  --form \"file=@dk.png\"\n```\n\nExample:\n```json\n{\n  \"file_name\" : \"dk.png\",\n  \"file_path\" : \"uploads/6a061c4cf9f1c28cb22c384b4b8d4e3c/dk.png\",\n  \"branch\" : \"main\",\n  \"link\" : {\n    \"url\" : \"uploads/6a061c4cf9f1c28cb22c384b4b8d4e3c/dk.png\",\n    \"markdown\" : \"![dk](uploads/6a061c4cf9f1c28cb22c384b4b8d4e3c/dk.png)\"\n  }\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:11.611Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":17,"totalLines":152,"estimatedTokens":2109}}248{"id":"doc-upload_and_analyze_a_file_with_azure_functions_a-d5cb4f2d","source":"documentation","title":"Upload and analyze a file with Azure Functions and Blob Storage | Microsoft Learn","url":"https://learn.microsoft.com/en-us/azure/storage/blobs/storage-upload-process-images","text":"Example:\n```azurecli\naz group create --location eastus --name msdocs-storage-function \\\n\naz storage account create --name msdocsstorageaccount --resource-group msdocs-storage-function -l eastus --sku Standard_LRS \\\n\naz storage container create --name imageanalysis --account-name msdocsstorageaccount --resource-group msdocs-storage-function\n```\n\nExample:\n```azurecli\naz storage account show-connection-string -g msdocs-storage-function -n msdocsstorageaccount\n```\n\nExample:\n```azurecli\naz cognitiveservices account create \\\n    --name msdocs-process-image \\\n    --resource-group msdocs-storage-function \\\n    --kind ComputerVision \\\n    --sku F1 \\\n    --location eastus2 \\\n    --yes\n```\n\nExample:\n```azurecli\naz cognitiveservices account keys list \\\n    --name msdocs-process-image \\\n    --resource-group msdocs-storage-function  \\ \n    \naz cognitiveservices account list \\\n--name msdocs-process-image \\\n    --resource-group msdocs-storage-function --query \"[].properties.endpoint\"\n```\n\nExample:\n```terminal\ngit clone https://github.com/Azure-Samples/msdocs-storage-bind-function-service.git \\\ncd msdocs-storage-bind-function-service/dotnet\n```\n\nExample:\n```csharp\n// Azure Function name and output Binding to Table Storage\n[FunctionName(\"ProcessImageUpload\")]\n[return: Table(\"ImageText\", Connection = \"StorageConnection\")]\n// Trigger binding runs when an image is uploaded to the blob container below\npublic async Task<ImageContent> Run([BlobTrigger(\"imageanalysis/{name}\", \n        Connection = \"StorageConnection\")]Stream myBlob, string name, ILogger log)\n{\n    // Get connection configurations\n    string subscriptionKey = Environment.GetEnvironmentVariable(\"ComputerVisionKey\");\n    string endpoint = Environment.GetEnvironmentVariable(\"ComputerVisionEndpoint\");\n    string imgUrl = $\"https://{ Environment.GetEnvironmentVariable(\"StorageAccountName\")}\n                        .blob.core.windows.net/imageanalysis/{name}\";\n\n    ComputerVisionClient client = new ComputerVisionClient(\n        new ApiKeyServiceClientCredentials(subscriptionKey)) { Endpoint = endpoint };\n\n    // Get the analyzed image contents\n    var textContext = await AnalyzeImageContent(client, imgUrl);\n\n    return new ImageContent { \n        PartitionKey = \"Images\",\n        RowKey = Guid.NewGuid().ToString(), Text = textContext \n    };\n}\n\npublic class ImageContent\n{\n    public string PartitionKey { get; set; }\n    public string RowKey { get; set; }\n    public string Text { get; set; }\n}\n```\n\nExample:\n```csharp\nstatic async Task<string> ReadFileUrl(ComputerVisionClient client, string urlFile)\n{\n    // Analyze the file using Computer Vision Client\n    var textHeaders = await client.ReadAsync(urlFile);\n    string operationLocation = textHeaders.OperationLocation;\n    Thread.Sleep(2000);\n    \n    // Complete code omitted for brevity, view in sample project\n    \n    return text.ToString();\n}\n```\n\nExample:\n```javascript\n{\n    \"IsEncrypted\": false,\n    \"Values\": {\n      \"AzureWebJobsStorage\": \"UseDevelopmentStorage=true\",\n      \"FUNCTIONS_WORKER_RUNTIME\": \"dotnet\",\n      \"StorageConnection\": \"your-storage-account-connection-string\",\n      \"StorageAccountName\": \"your-storage-account-name\",\n      \"ComputerVisionKey\": \"your-computer-vision-key\",\n      \"ComputerVisionEndPoint\":  \"your-computer-vision-endpoint\"\n    }\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:49.663Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":8,"totalLines":108,"estimatedTokens":832}}249{"id":"doc-manually_configure_ci_cd_for_load_tests_azure_lo-3cc84591","source":"documentation","title":"Manually configure CI/CD for load tests - Azure Load Testing | Microsoft Learn","url":"https://learn.microsoft.com/en-us/azure/app-testing/load-testing/how-to-configure-load-test-cicd","text":"Example:\n```azurecli\n# Get the resource ID for the load testing resource - replace the text place holders.\nloadtest=$(az resource show -g <resource-group-name> -n <load-testing-resource-name> --resource-type \"Microsoft.LoadTestService/loadtests\" --query \"id\" -o tsv)\necho $loadtest\n\n# Create a service principal and assign the Load Test Contributor role - the scope is limited to the load testing resource.\naz ad sp create-for-rbac --name \"my-load-test-cicd\" --role \"Load Test Contributor\" \\\n                         --scopes $loadtest \\\n                         --json-auth\n```\n\nExample:\n```output\nCreating 'Load Test Contributor' role assignment under scope\n{\n  \"clientId\": \"00000000-0000-0000-0000-000000000000\",\n  \"clientSecret\": \"00000000-0000-0000-0000-000000000000\",\n  \"subscriptionId\": \"00000000-0000-0000-0000-000000000000\",\n  \"tenantId\": \"00000000-0000-0000-0000-000000000000\",\n  \"activeDirectoryEndpointUrl\": \"https://login.microsoftonline.com\",\n  \"resourceManagerEndpointUrl\": \"https://management.azure.com/\",\n  \"activeDirectoryGraphResourceId\": \"https://graph.windows.net/\",\n  \"sqlManagementEndpointUrl\": \"https://management.core.windows.net:8443/\",\n  \"galleryEndpointUrl\": \"https://gallery.azure.com/\",\n  \"managementEndpointUrl\": \"https://management.core.windows.net/\"    \n}\n```\n\nExample:\n```yml\n- task: AzureLoadTest@1\n      inputs:\n        azureSubscription: $(serviceConnection)\n        loadTestConfigFile: 'config.yaml'\n        loadTestResource: <load-testing-resource>\n        resourceGroup: <load-testing-resource-group>\n```\n\nExample:\n```yml\n- publish: $(System.DefaultWorkingDirectory)/loadTest\n      artifact: loadTestResults\n```\n\nExample:\n```yml\n- name: Checkout\n      uses: actions/checkout@v3\n```\n\nExample:\n```yml\n- name: Login to Azure\n      uses: azure/login@v1\n      continue-on-error: false\n      with:\n        creds: ${{ secrets.AZURE_CREDENTIALS }}\n```\n\nExample:\n```yml\n- name: 'Azure Load Testing'\n      uses: azure/load-testing@v1\n      with:\n        loadTestConfigFile: 'config.yaml'\n        loadTestResource: <load-testing-resource>\n        resourceGroup: <load-testing-resource-group>\n```\n\nExample:\n```yml\n- uses: actions/upload-artifact@v2\n      with:\n        name: loadTestResults\n        path: ${{ github.workspace }}/loadTest\n```\n\nExample:\n```azurecli\naz login --service-principal -u $AZURE_CLIENT_ID -p $AZURE_CLIENT_SECRET -t $AZURE_TENANT_ID\naz account set -s $AZURE_SUBSCRIPTION_ID\n```\n\nExample:\n```azurecli\naz load test create --load-test-resource <load-testing-resource> --resource-group <load-testing-resource-group> --test-id sample-test-id --load-test-config-file <load-test-config-yaml>\n```\n\nExample:\n```azurecli\ntestRunId=\"run_\"`date +\"%Y%m%d%_H%M%S\"`\ndisplayName=\"Run\"`date +\"%Y/%m/%d_%H:%M:%S\"`\n\naz load test-run create --load-test-resource <load-testing-resource> --test-id sample-test-id --test-run-id $testRunId --display-name $displayName --description \"Test run from CLI\"\n```\n\nExample:\n```azurecli\naz load test-run metrics list --load-test-resource <load-testing-resource> --test-run-id $testRunId --metric-namespace LoadTestRunMetrics\n```\n\nExample:\n```azurecli\naz ad sp delete --id $(az ad sp show --display-name \"my-load-test-cicd\" -o tsv)\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:49.716Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":13,"totalLines":108,"estimatedTokens":805}}250{"id":"doc-migrate_data_from_oracle_to_azure_cosmos_db_for_-ae95b65a","source":"documentation","title":"Migrate data from Oracle to Azure Cosmos DB for Apache Cassandra using Arcion - Azure Cosmos DB for Apache Cassandra | Microsoft Learn","url":"https://learn.microsoft.com/en-us/azure/cosmos-db/cassandra/oracle-migrate-cosmos-db-arcion","text":"Example:\n```bash\nwget https://cacert.omniroot.com/bc2025.crt\nmv bc2025.crt bc2025.cer\nkeytool -keystore $JAVA_HOME/lib/security/cacerts -importcert -alias bc2025ca -file bc2025.cer\n```\n\nExample:\n```bash\ntype: ORACLE\n\nhost: localhost\nport: 53546\n\nservice-name: IO\n\nusername: '<Username of your Oracle database>'\npassword: '<Password of your Oracle database>'\n\nconn-cnt: 30\nuse-ssl: false\n```\n\nExample:\n```bash\nallow:\n-\tschema: “io_arcion”\nTypes: [TABLE]\n```\n\nExample:\n```bash\ntype: COSMOSDB\n\nhost: `<Azure Cosmos DB account’s Contact point>`\nport: 10350\n\nusername: 'arciondemo'\npassword: `<Your Azure Cosmos DB account’s primary password>'\n\nmax-connections: 30\nuse-ssl: false\n```\n\nExample:\n```bash\n./bin/replicant full conf/conn/oracle.yaml conf/conn/cosmosdb.yaml --filter filter/oracle_filter.yaml --replace-existing\n```\n\nExample:\n```bash\n./bin/replicant full conf/conn/oracle.yaml conf/conn/cosmosdb.yaml --filter filter/oracle_filter.yaml --replace-existing --resume\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:49.772Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":6,"totalLines":55,"estimatedTokens":247}}251{"id":"doc-publish_and_download_npm_packages_with_azure_art-4e2d90f4","source":"documentation","title":"Publish and download npm packages with Azure Artifacts - Azure Artifacts | Microsoft Learn","url":"https://learn.microsoft.com/en-us/azure/devops/artifacts/get-started-npm?view=azure-devops","text":"Example:\n```text\nnpm publish\n```\n\nExample:\n```text\nnpm install\n```\n\nExample:\n```text\nnpm install --save <PACKAGE_NAME>\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:49.809Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":3,"totalLines":16,"estimatedTokens":34}}252{"id":"doc-managed_identity_authentication_for_acr_azure_co-ad5695c1","source":"documentation","title":"Managed Identity Authentication for ACR - Azure Container Registry | Microsoft Learn","url":"https://learn.microsoft.com/en-us/azure/container-registry/container-registry-authentication-managed-identity","text":"Example:\n```azurecli\naz vm create \\\n    --resource-group myResourceGroup \\\n    --name myDockerVM \\\n    --image Ubuntu2204 \\\n    --admin-username azureuser \\\n    --generate-ssh-keys\n```\n\nExample:\n```azurepowershell\n$vmParams = @{\n    ResourceGroupName   = 'MyResourceGroup'\n    Name                = 'myDockerVM'\n    Image               = 'UbuntuLTS'\n    PublicIpAddressName = 'myPublicIP'\n    GenerateSshKey      = $true\n    SshKeyName          = 'mySSHKey'\n}\nNew-AzVM @vmParams\n```\n\nExample:\n```azurepowershell\nGet-AzPublicIpAddress -Name myPublicIP -ResourceGroupName myResourceGroup | Select-Object -ExpandProperty IpAddress\n```\n\nExample:\n```bash\nssh azureuser@publicIpAddress\n```\n\nExample:\n```bash\nsudo apt update\nsudo apt install docker.io -y\n```\n\nExample:\n```bash\nsudo docker run -it mcr.microsoft.com/hello-world\n```\n\nExample:\n```output\nHello from Docker!\nThis message shows that your installation appears to be working correctly.\n[...]\n```\n\nExample:\n```azurecli\naz identity create --resource-group myResourceGroup --name myACRId\n```\n\nExample:\n```azurecli\n# Get resource ID of the user-assigned identity\nuserID=$(az identity show --resource-group myResourceGroup --name myACRId --query id --output tsv)\n\n# Get service principal ID of the user-assigned identity\nspID=$(az identity show --resource-group myResourceGroup --name myACRId --query principalId --output tsv)\n```\n\nExample:\n```bash\necho $userID\n```\n\nExample:\n```output\n/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx/resourcegroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myACRId\n```\n\nExample:\n```azurepowershell\nNew-AzUserAssignedIdentity -ResourceGroupName myResourceGroup -Location eastus -Name myACRId\n```\n\nExample:\n```azurepowershell\n# Get resource ID of the user-assigned identity\n$userID = (Get-AzUserAssignedIdentity -ResourceGroupName myResourceGroup -Name myACRId).Id\n\n# Get service principal ID of the user-assigned identity\n$spID = (Get-AzUserAssignedIdentity -ResourceGroupName myResourceGroup -Name myACRId).PrincipalId\n```\n\nExample:\n```azurepowershell\n$userID\n```\n\nExample:\n```azurecli\naz vm identity assign --resource-group myResourceGroup --name myDockerVM --identities $userID\n```\n\nExample:\n```azurepowershell\n$vm = Get-AzVM -ResourceGroupName myResourceGroup -Name myDockerVM\nUpdate-AzVM -ResourceGroupName myResourceGroup -VM $vm -IdentityType UserAssigned -IdentityID $userID\n```\n\nExample:\n```azurecli\nresourceID=$(az acr show --resource-group myResourceGroup --name myContainerRegistry --query id --output tsv)\n```\n\nExample:\n```azurecli\naz role assignment create --assignee $spID --scope $resourceID \\\n    --role \"Container Registry Repository Reader\" # For ABAC-enabled registries. Otherwise, use AcrPull for non-ABAC registries.\n```\n\nExample:\n```azurepowershell\n$resourceID = (Get-AzContainerRegistry -ResourceGroupName myResourceGroup -Name myContainerRegistry).Id\n```\n\nExample:\n```azurepowershell\nNew-AzRoleAssignment -ObjectId $spID -Scope $resourceID -RoleDefinitionName \"Container Registry Repository Reader\"\n```\n\nExample:\n```azurecli\naz login --identity --username <userID>\n```\n\nExample:\n```azurecli\naz acr login --name myContainerRegistry\n```\n\nExample:\n```bash\ndocker pull mycontainerregistry.azurecr.io/aci-helloworld:v1\n```\n\nExample:\n```azurepowershell\n$clientId = (Get-AzUserAssignedIdentity -ResourceGroupName myResourceGroup -Name myACRId).ClientId\nConnect-AzAccount -Identity -AccountId $clientId\n```\n\nExample:\n```azurepowershell\nConnect-AzContainerRegistry -Name myContainerRegistry\n```\n\nExample:\n```azurecli\naz vm identity assign --resource-group myResourceGroup --name myDockerVM\n```\n\nExample:\n```azurecli\nspID=$(az vm show --resource-group myResourceGroup --name myDockerVM --query identity.principalId --out tsv)\n```\n\nExample:\n```azurepowershell\n$vm = Get-AzVM -ResourceGroupName myResourceGroup -Name myDockerVM\nUpdate-AzVM -ResourceGroupName myResourceGroup -VM $vm -IdentityType SystemAssigned\n```\n\nExample:\n```azurepowershell\n$spID = (Get-AzVM -ResourceGroupName myResourceGroup -Name myDockerVM).Identity.PrincipalId\n```\n\nExample:\n```azurecli\naz role assignment create --assignee $spID --scope $resourceID \\\n    --role \"Container Registry Repository Reader\"\n```\n\nExample:\n```azurecli\naz login --identity\n```\n\nExample:\n```azurepowershell\nConnect-AzAccount -Identity\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:50.572Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":32,"totalLines":190,"estimatedTokens":1084}}253{"id":"doc-optimize_ai_performance_with_mongodb_atlas_and_f-70c119fe","source":"documentation","title":"Optimize AI Performance with MongoDB Atlas and Fireworks AI - Atlas Architecture Center - MongoDB Docs","url":"https://www.mongodb.com/docs/atlas/architecture/current/partner-showcase/fin-services-fireworks-rag/","text":"For AI documentation index is available at https://www.mongodb.com/docs/llms.txt — markdown versions of all pages are available by appending .md to any URL path.\n\nExample:\n```hljs-light\nclass mdbcache:   def __init__(self, function):         self.function = function   def __call__(self, *args, **kwargs):         key = str(args) + str(kwargs)         ele = ccol.find_one({\"key\": key})         if ele:            return ele[\"response\"]         value = self.function(*args, **kwargs)         ccol.insert_one({\"key\":key, \"response\": value})         return value@mdbcachedef invoke_llm(prompt):   \"\"\"   Invoke the language model with the given prompt with cache. The llm.invoke  method can invoke either a LLM or SLM based on the Fireworks Model ID provided at the start of application.   Args:         prompt (str): The prompt to pass to the LLM.   \"\"\"   response = llm.invoke(prompt)   return response\n```\n\nExample:\n```hljs-light\nfrom pymongo import MongoClient import pandas as pd import json client = MongoClient(\"mongodb+srv://<uid>:<pwd>@bfsi-demo.2wqno.mongodb.net/?retryWrites=true&w=majority\") df = pd.DataFrame.from_records(client[\"bfsi-genai\"][\"cc_cache\"].find({},{\"_id\": 0})) df[\"prompt\"] = df[\"key\"].apply(lambda x: x.strip('(').strip('\"').strip(\")\").strip(\"\\\\\")) del df[\"key\"] df[\"response\"] = df[\"response\"].apply(lambda x: x.strip()) df.to_json(\"cc_cache.jsonl\", orient=\"records\", lines=True) # transform cache to messages messages = [] for item in df.iterrows():   messages += [{\"messages\": [{\"role\": \"user\", \"content\": item[\"prompt\"].strip(\"    \\\\\")}, {\"role\": \"assistant\", \"content\": item[\"response\"]}]}] with open(\"cc_cache.jsonl\", \"w\") as f:   for item in messages:      f.write(json.dumps(item) + \"\\n\")\n```\n\nExample:\n```hljs-light\npip install firectl\n```\n\nExample:\n```hljs-light\nfirectl login\n```\n\nExample:\n```hljs-light\nfirectl create dataset <dataset_name> cc_cache.jsonl\n```\n\nExample:\n```hljs-light\nfirectl create sftj --base-model accounts/fireworks/models/llama-v3p1-8b-instruct --dataset <dataset_name> --output-model ccmodel --lora-rank 8 --epochs 1\n```\n\nExample:\n```hljs-light\nfirectl deploy ccmodel\n```\n\nExample:\n```hljs-light\nimport timeclass tiktok:\"\"\"Decorator to time the execution of a function and log the time taken.\"\"\"def __init__(self, function):      self.function = functiondef __call__(self, *args, **kwargs):      import time      start = time.time()      value = self.function(*args, **kwargs)      end = time.time()      print(f\"Time taken for {self.function.__name__}: {end - start} seconds\")      return value@tiktok@mdbcachedef invoke_llm(prompt):\"\"\"Invoke the language model with the given prompt with cache. Theinvoke LLM method can invoke either a LLM or SLM based on theFireworks Model ID initialized.Args:      prompt (str): The prompt to pass to the LLM.\"\"\"...\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:54.214Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":8,"totalLines":43,"estimatedTokens":708}}254{"id":"doc-atlascustomrole_custom_resource_atlas_kubernetes-7ebca8da","source":"documentation","title":"AtlasCustomRole Custom Resource - Atlas Kubernetes Operator - MongoDB Docs","url":"https://www.mongodb.com/docs/atlas/operator/current/atlascustomrole-custom-resource/","text":"For AI documentation index is available at https://www.mongodb.com/docs/llms.txt — markdown versions of all pages are available by appending .md to any URL path.\n\nExample:\n```hljs-light\nautoScaling:  diskGB:    enabled: true  compute:    enabled: true    scaleDownEnabled: true    minInstanceSize: M30    maxInstanceSize: M40\n```\n\nExample:\n```hljs-light\napiVersion: atlas.mongodb.com/v1kind: AtlasCustomRolemetadata:  name: shard-operator-role  namespace: mongodb-atlas-system  labels:    mongodb.com/atlas-reconciliation-policy: keepspec:  projectRef:    name: my-project    namespace: my-operator-namespace  role:    name: my-role      actions:      - name: getShardMap        resources:          cluster: true      - name: shardingState        resources:          cluster: true      - name: connPoolStats        resources:          cluster: true      - name: getLog        resources:          cluster: true      inheritedRoles:      - name: operator-role-1        role: backup\n```\n\nExample:\n```hljs-light\napiVersion: atlas.mongodb.com/v1kind: AtlasCustomRolemetadata:  name: shard-operator-role  namespace: mongodb-atlas-system  labels:    mongodb.com/atlas-reconciliation-policy: keepspec:  externalProjectRef:    id: 671998971c8520583f24f411  connectionSecret:    name: my-atlas-key  role:    name: my-role      actions:      - name: getShardMap        resources:          cluster: true      - name: shardingState        resources:          cluster: true      - name: connPoolStats        resources:          cluster: true      - name: getLog        resources:          cluster: true      inheritedRoles:      - name: operator-role-1        role: backup\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:54.224Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":3,"totalLines":18,"estimatedTokens":419}}255{"id":"doc-tutorial_automate_clusters_with_scheduled_trigge-22254ae7","source":"documentation","title":"Tutorial: Automate Clusters with Scheduled Triggers - Atlas - MongoDB Docs","url":"https://www.mongodb.com/docs/atlas/atlas-ui/triggers/scheduled-triggers-tutorial/","text":"For AI documentation index is available at https://www.mongodb.com/docs/llms.txt — markdown versions of all pages are available by appending .md to any URL path.\n\nExample:\n```hljs-light\n1/*2 * Generate API request headers with a new Service Account Access Token.3 */4exports = async function getAuthHeaders() {56  // Get stored credentials7  clientId = context.values.get(\"AtlasClientId\");8  clientSecret = context.values.get(\"AtlasClientSecret\");910  // Throw an error if credentials are missing11  if (!clientId || !clientSecret) {12    throw new Error(\"Authentication credentials not found. Set AtlasClientId/AtlasClientSecret (service account auth credentials).\");13  }1415  // Define the argument for the HTTP request to get the access token16  const tokenUrl = \"https://cloud.mongodb.com/api/oauth/token\";17  const credentials = Buffer.from(`${clientId}:${clientSecret}`).toString(\"base64\");1819  const arg = {20    url: tokenUrl,21    headers: {22      \"Authorization\": [ `Basic ${credentials}` ],23      \"Content-Type\": [ \"application/x-www-form-urlencoded\" ]24    },25    body: \"grant_type=client_credentials\"26  }2728  // The response body is a BSON.Binary object; parse it to extract the access token 29  const response = await context.http.post(arg);30  const tokenData = JSON.parse(response.body.text());31  const accessToken = tokenData.access_token;3233  // Define the Accept header with the resource version from env var or default to latest stable34  const resourceVersion = context.environment.ATLAS_API_VERSION || \"2025-03-12\";35  const acceptHeader = `application/vnd.atlas.${resourceVersion}+json`;3637  // Return the access token as headers for future API calls38  return {39   headers: {40     \"Authorization\": [ `Bearer ${accessToken}` ],41     \"Accept\": [ acceptHeader ],42     \"Accept-Encoding\": [ \"bzip, deflate\" ],43     \"Content-Type\": [ \"application/json\" ]44   }45  };46}\n```\n\nExample:\n```hljs-light\n1/*2 * Modifies the cluster as defined by the `body` parameter.3 * See https://www.mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Clusters/operation/updateCluster4 */5exports = async function(projectID, clusterName, body) {67  // Easy testing from the console8  if (projectID === \"Hello world!\") {9    projectID   = \"<projectId>\";10    clusterName = \"<clusterName>\";11    body        = { paused: false };12  }1314  // Retrieve headers to authenticate with a new access token, and define the request URL for the Atlas API endpoint15  const authHeaders = await context.functions.execute(\"getAuthHeaders\");16  const requestUrl = `https://cloud.mongodb.com/api/atlas/v2/groups/${projectID}/clusters/${clusterName}`;1718  // Build the argument for the HTTP request to the Atlas API to modify the cluster19  const arg = {20    url: requestUrl,21    headers: authHeaders.headers,22    body: JSON.stringify(body)23  };2425  // The response body is a BSON.Binary object; parse it and return the modified cluster description26  const response = await context.http.patch(arg);27  if (response.body) {28     return EJSON.parse(response.body.text()); 29  } else {30     throw new Error(`No response body returned from Atlas API. Status code: ${response.status}`);31  }32};\n```\n\nExample:\n```hljs-light\n1/*2 * Iterates over the provided projects and clusters, pausing those clusters.3 */4exports = async function () {56  // Supply project IDs and cluster names to pause7  const projectIDs = [8    {9      id: \"<projectIdA>\",10      names: [ \"<clusterNameA>\", \"<clusterNameB>\" ]11    },12    {13      id: \"<projectIdB>\",14      names: [ \"<clusterNameC>\" ]15    }16  ];1718  // Set desired state19  const body = { paused: true };2021  // Pause each cluster and log the response22  for (const project of projectIDs) {23    for (const cluster of project.names) {24      const result = await context.functions.execute(25        \"modifyCluster\",26        project.id,27        cluster,28        body,29      );30      console.log(\"Cluster \" + cluster + \": \" + EJSON.stringify(result));31    }32  }3334  return \"Clusters Paused\";35};\n```\n\nExample:\n```hljs-light\n0 22 * * 1-5\n```\n\nExample:\n```hljs-light\n1/*2 * Iterates over the provided projects and clusters, resuming those clusters.3 */4exports = async function () {56  // Supply project IDs and cluster names to resume7  const projectIDs = [8    {9      id: \"<projectIdA>\",10      names: [ \"<clusterNameA>\", \"<clusterNameB>\" ]11    },12    {13      id: \"<projectIdB>\",14      names: [ \"<clusterNameC>\" ]15    }16  ];1718  // Set desired state19  const body = { paused: false };2021  // Resume each cluster and log the response22  for (const project of projectIDs) {23    for (const cluster of project.names) {24      const result = await context.functions.execute(25        \"modifyCluster\",26        project.id,27        cluster,28        body,29      );30      console.log(\"Cluster \" + cluster + \": \" + EJSON.stringify(result));31    }32  }3334  return \"Clusters Resumed\";35};\n```\n\nExample:\n```hljs-light\n0 12 * * 1-5\n```\n\nExample:\n```hljs-light\n1/*2 * Scales a single cluster up to a larger instance size.3 * This example scales an AWS cluster up to M30 in region US_EAST_1.4 */5exports = async function() {6  // Supply project ID and cluster name...7  const projectID   = \"<projectId>\";8  const clusterName = \"<clusterName>\";910  // Set the desired instance size and topology...11  const body = {12    replicationSpecs: [13      {14        regionConfigs: [15          {16            electableSpecs: {17              instanceSize: \"M30\", // for example, larger tier18              nodeCount: 319            },20            priority:     7,21            providerName: \"AWS\",22            regionName:   \"US_EAST_1\"23          }24        ]25      }26    ]27  };2829  // Scale up the cluster and log the response30  const result = await context.functions.execute(31    \"modifyCluster\",32    projectID,33    clusterName,34    body35  );36  console.log(EJSON.stringify(result));3738  return clusterName + \" scaled up\";39};\n```\n\nExample:\n```hljs-light\n0 13 * * *\n```\n\nExample:\n```hljs-light\n1/*2 * Scales a single cluster down to a smaller instance size.3 * This example scales an AWS cluster down to M10 in region US_EAST_1.4 */5exports = async function() {6  const projectID   = \"<projectId>\";7  const clusterName = \"<clusterName>\";89  const body = {10    replicationSpecs: [11      {12        regionConfigs: [13          {14            electableSpecs: {15              instanceSize: \"M10\", // for example, smaller tier16              nodeCount: 317            },18            priority:     7,19            providerName: \"AWS\",20            regionName:   \"US_EAST_1\"21          }22        ]23      }24    ]25  };2627  // Scale down the cluster and log the response28  const result = await context.functions.execute(29    \"modifyCluster\",30    projectID,31    clusterName,32    body33  );34  console.log(EJSON.stringify(result));3536  return clusterName + \" scaled down\";37};\n```\n\nExample:\n```hljs-light\n0 22 * * *\n```\n\nExample:\n```hljs-light\n1/*2 * Returns an array of the projects in the organization3 * See https://docs.atlas.mongodb.com/reference/api/project-get-all/4 *5 * Returns an array of objects, e.g.6 *7 * {8 * \"clusterCount\": {9 *      \"$numberInt\": \"1\"10 *    },11 *    \"created\": \"2021-05-11T18:24:48Z\",12 *    \"id\": \"609acbef1b76b53fcd37c8e1\",13 *    \"links\": [14 *      {15 *        \"href\": \"https://cloud.mongodb.com/api/atlas/v1.0/groups/609acbef1b76b53fcd37c8e1\",16 *        \"rel\": \"self\"17 *      }18 *    ],19 *    \"name\": \"mg-training-sample\",20 *    \"orgId\": \"5b4e2d803b34b965050f1835\"21 *  }22  *23 */24exports = async function() {25  26  // Retrieve headers to authenticate with a new access token, and define the request URL for the Atlas API endpoint27  const authHeaders = await context.functions.execute(\"getAuthHeaders\");28  const requestUrl = `https://cloud.mongodb.com/api/atlas/v2/groups`;2930  // Build the argument for the HTTP request to the Atlas API to get all projects in the organization31  const arg = {32    url: requestUrl,33    headers: authHeaders.headers34  };3536  // The response body is a BSON.Binary object; parse it and return the `results` array, which contains the list of projects for the organization37  response = await context.http.get(arg);38  return EJSON.parse(response.body.text()).results; 39};\n```\n\nExample:\n```hljs-light\n1/*2 * Returns an array of the clusters for the supplied project ID.3 * See https://docs.atlas.mongodb.com/reference/api/clusters-get-all/4 *5 * Returns an array of objects. See the API documentation for details.6 * 7 */8exports = async function(projectId) {9  10  if (projectId == \"Hello world!\") { // Easy testing from the console11    projectId = \"<projectId>\"12  }13  14  // Retrieve headers to authenticate with a new access token, and define the request URL for the Atlas API endpoint15  const authHeaders = await context.functions.execute(\"getAuthHeaders\");16  const requestUrl = `https://cloud.mongodb.com/api/atlas/v2/groups/${projectId}/clusters`;17  18  // Build the argument for the HTTP request to the Atlas API to get all clusters in the project19  const arg = {20    url: requestUrl,21    headers: authHeaders.headers22  };2324  // The response body is a BSON.Binary object; parse it and return the `results` array, which contains the list of clusters for the project25  response = await context.http.get(arg);26  return EJSON.parse(response.body.text()).results; 27};\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:54.236Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":12,"totalLines":63,"estimatedTokens":2365}}256{"id":"doc-map_schema_relationships_database_manual_mongodb-d04a2fd0","source":"documentation","title":"Map Schema Relationships - Database Manual - MongoDB Docs","url":"https://www.mongodb.com/docs/manual/data-modeling/schema-design-process/map-relationships/","text":"For AI documentation index is available at https://www.mongodb.com/docs/llms.txt — markdown versions of all pages are available by appending .md to any URL path.\n\nExample:\n```hljs-light\ndb.movies.insertOne( {   title: \"The Brutalist\",   year: 2024,   runtime: 215,   genres: [ \"Drama\", \"History\" ],   comments: [      {         name: \"joel_m\",         email: \"joel_m@gameofthron.es\",         text: \"Visually stunning!\"      }   ],   user: {      name: \"Joel M\",      email: \"joel_m@gameofthron.es\"   }} )\n```\n\nExample:\n```hljs-light\ndb.movies.insertOne( {   title: \"A Complete Unknown\",   year: 2024,   runtime: 141,   genres: [ \"Biography\", \"Drama\", \"Music\" ],   userId: 987} )\n```\n\nExample:\n```hljs-light\ndb.users.insertOne( {   _id: 987,   name: \"Joel M\",   email: \"joel_m@gameofthron.es\"} )\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:54.242Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":3,"totalLines":18,"estimatedTokens":203}}257{"id":"doc-next_config_js_images_next_js-1c727b57","source":"documentation","title":"next.config.js: images | Next.js","url":"https://nextjs.org/docs/app/api-reference/config/next-config-js/images","text":"Example:\n```text\nmodule.exports = {\n  images: {\n    loader: 'custom',\n    loaderFile: './my/image/loader.js',\n  },\n}\n```\n\nExample:\n```text\n'use client'\n \nexport default function myImageLoader({ src, width, quality }) {\n  return `https://example.com/${src}?w=${width}&q=${quality || 75}`\n}\n```\n\nExample:\n```text\n// Docs: https://techdocs.akamai.com/ivm/reference/test-images-on-demand\nexport default function akamaiLoader({ src, width, quality }) {\n  return `https://example.com/${src}?imwidth=${width}`\n}\n```\n\nExample:\n```text\n// Docs: https://aws.amazon.com/developer/application-security-performance/articles/image-optimization\nexport default function cloudfrontLoader({ src, width, quality }) {\n  const url = new URL(`https://example.com${src}`)\n  url.searchParams.set('format', 'auto')\n  url.searchParams.set('width', width.toString())\n  url.searchParams.set('quality', (quality || 75).toString())\n  return url.href\n}\n```\n\nExample:\n```text\n// Demo: https://res.cloudinary.com/demo/image/upload/w_300,c_limit,q_auto/turtles.jpg\nexport default function cloudinaryLoader({ src, width, quality }) {\n  const params = ['f_auto', 'c_limit', `w_${width}`, `q_${quality || 'auto'}`]\n  return `https://example.com/${params.join(',')}${src}`\n}\n```\n\nExample:\n```text\n// Docs: https://developers.cloudflare.com/images/transform-images\nexport default function cloudflareLoader({ src, width, quality }) {\n  const params = [`width=${width}`, `quality=${quality || 75}`, 'format=auto']\n  return `https://example.com/cdn-cgi/image/${params.join(',')}/${src}`\n}\n```\n\nExample:\n```text\n// Docs: https://www.contentful.com/developers/docs/references/images-api/\nexport default function contentfulLoader({ src, width, quality }) {\n  const url = new URL(`https://example.com${src}`)\n  url.searchParams.set('fm', 'webp')\n  url.searchParams.set('w', width.toString())\n  url.searchParams.set('q', (quality || 75).toString())\n  return url.href\n}\n```\n\nExample:\n```text\n// Docs: https://developer.fastly.com/reference/io/\nexport default function fastlyLoader({ src, width, quality }) {\n  const url = new URL(`https://example.com${src}`)\n  url.searchParams.set('auto', 'webp')\n  url.searchParams.set('width', width.toString())\n  url.searchParams.set('quality', (quality || 75).toString())\n  return url.href\n}\n```\n\nExample:\n```text\n// Docs: https://docs.gumlet.com/reference/image-transform-size\nexport default function gumletLoader({ src, width, quality }) {\n  const url = new URL(`https://example.com${src}`)\n  url.searchParams.set('format', 'auto')\n  url.searchParams.set('w', width.toString())\n  url.searchParams.set('q', (quality || 75).toString())\n  return url.href\n}\n```\n\nExample:\n```text\n// Docs: https://support.imageengine.io/hc/en-us/articles/360058880672-Directives\nexport default function imageengineLoader({ src, width, quality }) {\n  const compression = 100 - (quality || 50)\n  const params = [`w_${width}`, `cmpr_${compression}`]\n  return `https://example.com${src}?imgeng=/${params.join('/')}`\n}\n```\n\nExample:\n```text\n// Demo: https://static.imgix.net/daisy.png?format=auto&fit=max&w=300\nexport default function imgixLoader({ src, width, quality }) {\n  const url = new URL(`https://example.com${src}`)\n  const params = url.searchParams\n  params.set('auto', params.getAll('auto').join(',') || 'format')\n  params.set('fit', params.get('fit') || 'max')\n  params.set('w', params.get('w') || width.toString())\n  params.set('q', (quality || 50).toString())\n  return url.href\n}\n```\n\nExample:\n```text\n// Doc (Resize): https://www.pixelbin.io/docs/transformations/basic/resize/#width-w\n// Doc (Optimise): https://www.pixelbin.io/docs/optimizations/quality/#image-quality-when-delivering\n// Doc (Auto Format Delivery): https://www.pixelbin.io/docs/optimizations/format/#automatic-format-selection-with-f_auto-url-parameter\nexport default function pixelBinLoader({ src, width, quality }) {\n  const name = '<your-cloud-name>'\n  const opt = `t.resize(w:${width})~t.compress(q:${quality || 75})`\n  return `https://cdn.pixelbin.io/v2/${name}/${opt}/${src}?f_auto=true`\n}\n```\n\nExample:\n```text\n// Docs: https://www.sanity.io/docs/image-urls\nexport default function sanityLoader({ src, width, quality }) {\n  const prj = 'zp7mbokg'\n  const dataset = 'production'\n  const url = new URL(`https://cdn.sanity.io/images/${prj}/${dataset}${src}`)\n  url.searchParams.set('auto', 'format')\n  url.searchParams.set('fit', 'max')\n  url.searchParams.set('w', width.toString())\n  if (quality) {\n    url.searchParams.set('q', quality.toString())\n  }\n  return url.href\n}\n```\n\nExample:\n```text\n// Docs: https://sirv.com/help/articles/dynamic-imaging/\nexport default function sirvLoader({ src, width, quality }) {\n  const url = new URL(`https://example.com${src}`)\n  const params = url.searchParams\n  params.set('format', params.getAll('format').join(',') || 'optimal')\n  params.set('w', params.get('w') || width.toString())\n  params.set('q', (quality || 85).toString())\n  return url.href\n}\n```\n\nExample:\n```text\n// Docs: https://supabase.com/docs/guides/storage/image-transformations#nextjs-loader\nexport default function supabaseLoader({ src, width, quality }) {\n  const url = new URL(`https://example.com${src}`)\n  url.searchParams.set('width', width.toString())\n  url.searchParams.set('quality', (quality || 75).toString())\n  return url.href\n}\n```\n\nExample:\n```text\n// Docs: https://thumbor.readthedocs.io/en/latest/\nexport default function thumborLoader({ src, width, quality }) {\n  const params = [`${width}x0`, `filters:quality(${quality || 75})`]\n  return `https://example.com${params.join('/')}${src}`\n}\n```\n\nExample:\n```text\n// Docs: https://imagekit.io/docs/image-transformation\nexport default function imageKitLoader({ src, width, quality }) {\n  const params = [`w-${width}`, `q-${quality || 80}`]\n  return `https://ik.imagekit.io/your_imagekit_id/${src}?tr=${params.join(',')}`\n}\n```\n\nExample:\n```text\n// Docs: https://docs.n7.io/aio/intergrations/\nexport default function aioLoader({ src, width, quality }) {\n  const url = new URL(src, window.location.href)\n  const params = url.searchParams\n  const aioParams = params.getAll('aio')\n  aioParams.push(`w-${width}`)\n  if (quality) {\n    aioParams.push(`q-${quality.toString()}`)\n  }\n  params.set('aio', aioParams.join(';'))\n  return url.href\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:55.396Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":18,"totalLines":205,"estimatedTokens":1570}}258{"id":"doc-next_config_js_urlimports_next_js-d21a6775","source":"documentation","title":"next.config.js: urlImports | Next.js","url":"https://nextjs.org/docs/app/api-reference/config/next-config-js/urlImports","text":"Example:\n```text\nmodule.exports = {\n  experimental: {\n    urlImports: ['https://example.com/assets/', 'https://cdn.skypack.dev'],\n  },\n}\n```\n\nExample:\n```text\nimport { a, b, c } from 'https://example.com/assets/some/module.js'\n```\n\nExample:\n```text\nimport confetti from 'https://cdn.skypack.dev/canvas-confetti'\nimport { useEffect } from 'react'\n \nexport default () => {\n  useEffect(() => {\n    confetti()\n  })\n  return <p>Hello</p>\n}\n```\n\nExample:\n```text\nimport Image from 'next/image'\nimport logo from 'https://example.com/assets/logo.png'\n \nexport default () => (\n  <div>\n    <Image src={logo} placeholder=\"blur\" />\n  </div>\n)\n```\n\nExample:\n```text\n.className {\n  background: url('https://example.com/assets/hero.jpg');\n}\n```\n\nExample:\n```text\nconst logo = new URL('https://example.com/assets/file.txt', import.meta.url)\n \nconsole.log(logo.pathname)\n \n// prints \"/_next/static/media/file.a9727b5d.txt\"\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:55.400Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":6,"totalLines":56,"estimatedTokens":231}}259{"id":"doc-functions_unstable_nostore_next_js-229ffaab","source":"documentation","title":"Functions: unstable_noStore | Next.js","url":"https://nextjs.org/docs/app/api-reference/functions/unstable_noStore","text":"Example:\n```text\nimport { unstable_noStore as noStore } from 'next/cache';\n \nexport default async function ServerComponent() {\n  noStore();\n  const result = await db.query(...);\n  ...\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:55.402Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":1,"totalLines":12,"estimatedTokens":51}}260{"id":"doc-file_system_conventions_mdx_components_js_next_j-cf0cb6dc","source":"documentation","title":"File-system conventions: mdx-components.js | Next.js","url":"https://nextjs.org/docs/app/api-reference/file-conventions/mdx-components","text":"Example:\n```text\nimport type { MDXComponents } from 'mdx/types'\n \nconst components: MDXComponents = {}\n \nexport function useMDXComponents(): MDXComponents {\n  return components\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:55.432Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":1,"totalLines":12,"estimatedTokens":49}}261{"id":"doc-metadata_files_manifest_json_next_js-9ff4b866","source":"documentation","title":"Metadata Files: manifest.json | Next.js","url":"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/manifest","text":"Example:\n```text\n{\n  \"name\": \"My Next.js Application\",\n  \"short_name\": \"Next.js App\",\n  \"description\": \"An application built with Next.js\",\n  \"start_url\": \"/\"\n  // ...\n}\n```\n\nExample:\n```text\nimport type { MetadataRoute } from 'next'\n \nexport default function manifest(): MetadataRoute.Manifest {\n  return {\n    name: 'Next.js App',\n    short_name: 'Next.js App',\n    description: 'Next.js App',\n    start_url: '/',\n    display: 'standalone',\n    background_color: '#fff',\n    theme_color: '#fff',\n    icons: [\n      {\n        src: '/favicon.ico',\n        sizes: 'any',\n        type: 'image/x-icon',\n      },\n    ],\n  }\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:55.443Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":2,"totalLines":36,"estimatedTokens":160}}262{"id":"doc-api_reference_turbopack_next_js-20c0fca5","source":"documentation","title":"API Reference: Turbopack | Next.js","url":"https://nextjs.org/docs/app/api-reference/turbopack","text":"Example:\n```text\nnext dev --webpack\nnext build --webpack\n```\n\nExample:\n```text\n{\n  \"scripts\": {\n    \"dev\": \"next dev\",\n    \"build\": \"next build\",\n    \"start\": \"next start\"\n  }\n}\n```\n\nExample:\n```text\n{\n  \"scripts\": {\n    \"dev\": \"next dev --webpack\",\n    \"build\": \"next build --webpack\",\n    \"start\": \"next start\"\n  }\n}\n```\n\nExample:\n```text\nif (import.meta.env.DEV) {\n  console.log('development mode')\n}\n```\n\nExample:\n```text\nconst { MODE, SSR } = import.meta.env\nconst baseUrl = import.meta.env['BASE_URL']\n```\n\nExample:\n```text\nconst modules = import.meta.glob('./dir/*.js')\n// {\n//   './dir/foo.js': () => import('./dir/foo.js'),\n//   './dir/bar.js': () => import('./dir/bar.js'),\n// }\n```\n\nExample:\n```text\nconst modules = import.meta.glob('./dir/*.js')\n \nfor (const path in modules) {\n  const module = await modules[path]()\n  console.log(path, module)\n}\n```\n\nExample:\n```text\nconst modules = import.meta.glob('./dir/*.js', { eager: true })\n \nfor (const path in modules) {\n  console.log(path, modules[path].default)\n}\n```\n\nExample:\n```text\n// Lazy: each value is () => Promise<exportValue>\nconst defaults = import.meta.glob('./dir/*.js', { import: 'default' })\n \n// Eager: each value is the export value directly\nconst setups = import.meta.glob('./dir/*.js', { import: 'setup', eager: true })\n```\n\nExample:\n```text\nconst rawFiles = import.meta.glob('./dir/*.txt', { query: '?raw' })\n```\n\nExample:\n```text\nconst modules = import.meta.glob('./*.ts', {\n  query: { bar: 'foo', raw: true },\n})\n// equivalent to: { query: '?bar=foo&raw=true' }\n```\n\nExample:\n```text\nimport type { NextConfig } from 'next'\n \nconst nextConfig: NextConfig = {\n  turbopack: {\n    rules: {\n      // `import.meta.glob('./dir/*.txt', { query: '?raw' })` returns the file contents as strings\n      '*.txt': { condition: { query: '?raw' }, type: 'text' },\n    },\n  },\n}\n \nexport default nextConfig\n```\n\nExample:\n```text\n// Combine multiple directories\nconst modules = import.meta.glob(['./dir/*.js', './other/*.js'])\n \n// Exclude specific files\nconst withoutTests = import.meta.glob(['./src/**/*.js', '!**/*.test.js'])\n```\n\nExample:\n```text\n// Lazy (default) — Record<string, () => Promise<unknown>>\nconst lazy = import.meta.glob('./dir/*.ts')\n \n// Eager — Record<string, unknown>\nconst eager = import.meta.glob('./dir/*.ts', { eager: true })\n```\n\nExample:\n```text\ninterface Mod {\n  name: string\n  default: () => string\n}\n \n// Record<string, () => Promise<Mod>>\nconst lazy = import.meta.glob<Mod>('./dir/*.ts')\n \n// Record<string, Mod>\nconst eager = import.meta.glob<Mod>('./dir/*.ts', { eager: true })\n```\n\nExample:\n```text\nimport utilStyles from './utils.module.css'\nimport buttonStyles from './button.module.css'\nexport default function BlogPost() {\n  return (\n    <div className={utilStyles.container}>\n      <button className={buttonStyles.primary}>Click me</button>\n    </div>\n  )\n}\n```\n\nExample:\n```text\n@import '~bootstrap/dist/css/bootstrap.min.css';\n```\n\nExample:\n```text\n@import 'bootstrap/dist/css/bootstrap.min.css';\n```\n\nExample:\n```text\nmodule.exports = {\n  turbopack: {\n    resolveAlias: {\n      '~*': '*',\n    },\n  },\n}\n```\n\nExample:\n```text\nmodule.exports = {\n  turbopack: {\n    resolveAlias: {\n      underscore: 'lodash',\n    },\n    resolveExtensions: ['.mdx', '.tsx', '.ts', '.jsx', '.js', '.json'],\n  },\n}\n```\n\nExample:\n```text\nnext dev --internal-trace\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:55.492Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":21,"totalLines":191,"estimatedTokens":841}}263{"id":"doc-guides_draft_mode_next_js-9c58ea67","source":"documentation","title":"Guides: Draft Mode | Next.js","url":"https://nextjs.org/docs/pages/guides/draft-mode","text":"Example:\n```text\nexport default function handler(req, res) {\n  // ...\n  res.setDraftMode({ enable: true })\n  // ...\n}\n```\n\nExample:\n```text\n// simple example for testing it manually from your browser.\nexport default function handler(req, res) {\n  res.setDraftMode({ enable: true })\n  res.end('Draft mode is enabled')\n}\n```\n\nExample:\n```text\nhttps://<your-site>/api/draft?secret=<token>&slug=<path>\n```\n\nExample:\n```text\nexport default async (req, res) => {\n  // Check the secret and next parameters\n  // This secret should only be known to this API route and the CMS\n  if (req.query.secret !== 'MY_SECRET_TOKEN' || !req.query.slug) {\n    return res.status(401).json({ message: 'Invalid token' })\n  }\n \n  // Fetch the headless CMS to check if the provided `slug` exists\n  // getPostBySlug would implement the required fetching logic to the headless CMS\n  const post = await getPostBySlug(req.query.slug)\n \n  // If the slug doesn't exist prevent draft mode from being enabled\n  if (!post) {\n    return res.status(401).json({ message: 'Invalid slug' })\n  }\n \n  // Enable Draft Mode by setting the cookie\n  res.setDraftMode({ enable: true })\n \n  // Redirect to the path from the fetched post\n  // We don't redirect to req.query.slug as that might lead to open redirect vulnerabilities\n  res.redirect(post.slug)\n}\n```\n\nExample:\n```text\nexport async function getStaticProps(context) {\n  if (context.draftMode) {\n    // dynamic data\n  }\n}\n```\n\nExample:\n```text\nexport async function getStaticProps(context) {\n  const url = context.draftMode\n    ? 'https://draft.example.com'\n    : 'https://production.example.com'\n  const res = await fetch(url)\n  // ...\n}\n```\n\nExample:\n```text\nexport default function handler(req, res) {\n  res.setDraftMode({ enable: false })\n}\n```\n\nExample:\n```text\nexport default function myApiRoute(req, res) {\n  if (req.draftMode) {\n    // get draft data\n  }\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:55.493Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":8,"totalLines":87,"estimatedTokens":473}}264{"id":"doc-module_ngx_stream_js_module-336cf8c1","source":"documentation","title":"Module ngx_stream_js_module","url":"https://nginx.org/en/docs/stream/ngx_stream_js_module.html","text":"Join us for the first quarterly NGINX Community Call on July 22nd to connect and discuss NGINX development.\n\nenglishрусскийnewsaboutdownloadsecuritydocumentationfaqbookscommunityenterprisecommunity forum (new)x.comblognjsingress controllergateway fabricModule ngx_stream_js_moduleExample ConfigurationDirectives js_access js_context_reuse js_engine js_fetch_buffer_size js_fetch_ciphers js_fetch_max_response_buffer_size js_fetch_protocols js_fetch_timeout js_fetch_trusted_certificate js_fetch_verify js_fetch_verify_depth js_fetch_proxy js_fetch_keepalive js_fetch_keepalive_requests js_fetch_keepalive_time js_fetch_keepalive_timeout js_filter js_import js_include js_load_stream_native_module js_path js_periodic js_preload_object js_preread js_set js_shared_dict_zone js_varSession Object Properties The ngx_stream_js_module module is used to implement handlers in njs — a subset of the JavaScript language. Download and install instructions are available here. Example Configuration The example works since 0.4.0. stream { # since 0.9.1 js_engine qjs; js_import stream.js; js_set $bar stream.bar; js_set $req_line stream.req_line; server { listen 12345; js_preread stream.preread; return $req_line; } server { listen 12346; js_access stream.access; proxy_pass 127.0.0.1:8000; js_filter stream.header_inject; } } http { server { listen 8000; location / { return 200 $http_foo\\n; } } } The stream.js line = ''; function bar(s) { var v = s.variables; s.log(\"hello from bar() handler!\"); return \"bar-var\" + v.remote_port + \"; pid=\" + v.pid; } function preread(s) { s.on('upload', function (data, flags) { var n = data.indexOf('\\n'); if (n != -1) { line = data.substr(0, n); s.done(); } }); } function req_line(s) { return line; } // Read HTTP request line. // Collect bytes in 'req' until // request line is read. // Injects HTTP header into a client's request var my_header = 'Foo: foo'; function header_inject(s) { var req = ''; s.on('upload', function(data, flags) { req += data; var n = req.search('\\n'); if (n != -1) { var rest = req.substr(n + 1); req = req.substr(0, n + 1); s.send(req + my_header + '\\r\\n' + rest, flags); s.off('upload'); } }); } function access(s) { if (s.remoteAddress.match('^192.*')) { s.deny(); return; } s.allow(); } export default {bar, preread, req_line, header_inject, access}; Directives module.function; Default: — , server Sets an njs function which will be called at the access phase. Since 0.4.0, a module function can be referenced. The function is called once at the moment when the stream session reaches the access phase for the first time. The function is called with the following the Stream Session object At this phase, it is possible to perform initialization or register a callback with the s.on() method for each incoming data chunk until one of the following methods are (), s.decline(), s.done(). As soon as one of these methods is called, the stream session processing switches to the next phase and all current s.on() callbacks are dropped. number; 128; , server This directive appeared in version 0.8.6. Sets a maximum number of JS context to be reused for QuickJS engine. Each context is used for a single stream session. The finished context is put into a pool of reusable contexts. If the pool is full, the context is destroyed. njs | qjs; njs; , server This directive appeared in version 0.8.6. Sets a JavaScript engine to be used for njs scripts. The njs parameter sets the njs engine, also used by default. The qjs parameter sets the QuickJS engine. The njs engine is deprecated since 1.0.0; new configurations should use the qjs (QuickJS) engine. size; 16k; , server This directive appeared in version 0.7.4. Sets the size of the buffer used for reading and writing with Fetch API. ciphers; HIGH:!aNULL:!MD5; , server This directive appeared in version 0.7.0. Specifies the enabled ciphers for HTTPS connections with Fetch API. The ciphers are specified in the format understood by the OpenSSL library. The full list can be viewed using the “openssl ciphers” command. size; 1m; , server This directive appeared in version 0.7.4. Sets the maximum size of the response received with Fetch API. [TLSv1] [TLSv1.1] [TLSv1.2] [TLSv1.3]; TLSv1 TLSv1.1 TLSv1.2; , server This directive appeared in version 0.7.0. Enables the specified protocols for HTTPS connections with Fetch API. time; 60s; , server This directive appeared in version 0.7.4. Defines a timeout for reading and writing for Fetch API. The timeout is set only between two successive read/write operations, not for the whole response. If no data is transmitted within this time, the connection is closed. file; Default: — , server This directive appeared in version 0.7.0. Specifies a file with trusted CA certificates in the PEM format used to verify the HTTPS certificate with Fetch API. on | off; on; , server This directive appeared in version 0.7.4. Enables or disables verification of the HTTPS server certificate with Fetch API. number; 100; , server This directive appeared in version 0.7.0. Sets the verification depth in the HTTPS server certificates chain with Fetch API. url; Default: — , server This directive appeared in version 0.9.4. Configures a forward proxy URL with Fetch API. The url supports the HTTP scheme only and can contain optional user credentials in the format http://[user:password@]host:port for Basic authentication. Supports both HTTP and HTTPS connections to destination servers. If the url is empty, proxy routing is disabled. The parameter value can contain variables. { listen 12345; js_fetch_proxy http://user:pass@proxy.example.com:3128; js_preread main.fetch_handler; } connections; 0; , server This directive appeared in version 0.9.2. Activates the cache for connections to destination servers. When the value is greater than 0, enables keepalive connections for Fetch API. The connections parameter sets the maximum number of idle keepalive connections to destination servers that are preserved in the cache of each worker process. When this number is exceeded, the least recently used connections are closed. In Stream, the cache is maintained separately for each server configuration. A value set at the stream level is inherited by servers, but each server uses its own cache. Cached connections are reused for requests with the same protocol, host, and port. When enabled, keepalive assumes that destination servers send valid HTTP responses. { listen 12345; js_fetch_keepalive 32; js_fetch_trusted_certificate /path/to/ISRG_Root_X1.pem; js_preread main.fetch_handler; } number; 1000; , server This directive appeared in version 0.9.2. Sets the maximum number of requests that can be served through one keepalive connection with Fetch API. After the maximum number of requests is made, the connection is closed. Closing connections periodically is necessary to free per-connection memory allocations. Therefore, using too high maximum number of requests could result in excessive memory usage and not recommended. time; 1h; , server This directive appeared in version 0.9.2. Limits the maximum time during which requests can be processed through one keepalive connection with Fetch API. After this time is reached, the connection is closed following the subsequent request processing. time; 60s; , server This directive appeared in version 0.9.2. Sets a timeout during which an idle keepalive connection to a destination server will stay open with Fetch API. module.function; Default: — , server Sets a data filter. Since 0.4.0, a module function can be referenced. The filter function is called once at the moment when the stream session reaches the content phase. The filter function is called with the following the Stream Session object At this phase, it is possible to perform initialization or register a callback with the s.on() method for each incoming data chunk. The s.off() method may be used to unregister a callback and stop filtering. As the js_filter handler returns its result immediately, it supports only synchronous operations. Thus, asynchronous operations such as ngx.fetch() or setTimeout() are not supported. module.js | export_name from module.js; Default: — , server This directive appeared in version 0.4.0. Imports a module that implements location and variable handlers in njs. The export_name is used as a namespace to access module functions. If the export_name is not specified, the module name will be used as a namespace. js_import stream.js; Here, the module name stream is used as a namespace while accessing exports. If the imported module exports foo(), stream.foo is used to refer to it. Several js_import directives can be specified. The directive can be specified on the server level since 0.7.7. file; Default: — Specifies a file that implements server and variable handlers in : js_include stream.js; js_set $js_addr address; server { listen 127.0.0.1:12345; return $js_addr; } stream.js: function address(s) { return s.remoteAddress; } The directive was made obsolete in version 0.4.0 and was removed in version 0.7.1. The js_import directive should be used instead. path [as name]; Default: — This directive appeared in version 0.9.5. Loads a native module (shared library) for use in Stream JavaScript code. The directive is QuickJS-only and is not available when using the njs built-in JavaScript engine. The path parameter specifies the absolute path to the shared library file. The optional as name parameter provides an alias name for importing the module in JavaScript code. If not specified, the module can be imported using its filename. /path/to/mylib.so; js_load_stream_native_module /path/to/other.so as myalias; stream { js_import main.js; # ... rest of stream configuration } In JavaScript code: // Import by filename import * as mylib from 'mylib.so'; // Import by alias import * as myalias from 'myalias'; // Use exported functions let result = mylib.add(5, 10); For security reasons, this directive is only allowed in the main configuration context. Native modules run with full process privileges; use absolute paths and ensure proper code review. path; Default: — , server This directive appeared in version 0.3.0. Sets an additional path for njs modules. The directive can be specified on the server level since 0.7.7. module.function [interval=time] [jitter=number] [worker_affinity=mask]; Default: — This directive appeared in version 0.8.1. Specifies a content handler to run at regular interval. The handler receives a session object as its first argument, it also has access to global objects such as ngx. The optional interval parameter sets the interval between two consecutive runs, by default, 5 seconds. The optional jitter parameter sets the time within which the location content handler will be randomly delayed, by default, there is no delay. By default, the js_handler is executed on worker process 0. The optional worker_affinity parameter allows specifying particular worker processes where the location content handler should be executed. Each worker process set is represented by a bitmask of allowed worker processes. The all mask allows the handler to be executed in all worker processes. : location @periodics { # to be run at 1 minute intervals in worker process 0 js_periodic main.handler interval=60s; # to be run at 1 minute intervals in all worker processes js_periodic main.handler interval=60s worker_affinity=all; # to be run at 1 minute intervals in worker processes 1 and 3 js_periodic main.handler interval=60s worker_affinity=0101; resolver 10.0.0.1; js_fetch_trusted_certificate /path/to/ISRG_Root_X1.pem; } example.js: async function handler(s) { let reply = await ngx.fetch('https://nginx.org/en/docs/njs/'); let body = await reply.text(); ngx.log(ngx.INFO, body); } name.json | name from file.json; Default: — , server This directive appeared in version 0.7.8. Preloads an immutable object at configure time. The name is used as a name of the global variable though which the object is available in njs code. If the name is not specified, the file name will be used instead. js_preload_object map.json; Here, the map is used as a name while accessing the preloaded object. Several js_preload_object directives can be specified. module.function; Default: — , server Sets an njs function which will be called at the preread phase. Since 0.4.0, a module function can be referenced. The function is called once at the moment when the stream session reaches the preread phase for the first time. The function is called with the following the Stream Session object At this phase, it is possible to perform initialization or register a callback with the s.on() method for each incoming data chunk until one of the following methods are (), s.decline(), s.done(). When one of these methods is called, the stream session switches to the next phase and all current s.on() callbacks are dropped. As the js_preread handler returns its result immediately, it supports only synchronous callbacks. Thus, asynchronous callbacks such as ngx.fetch() or setTimeout() are not supported. Nevertheless, asynchronous operations are supported in s.on() callbacks in the preread phase. See this example for more information. $variable module.function [nocache]; Default: — , server Sets an njs function for the specified variable. Since 0.4.0, a module function can be referenced. The function is called when the variable is referenced for the first time for a given request. The exact moment depends on a phase at which the variable is referenced. This can be used to perform some logic not related to variable evaluation. For example, if the variable is referenced only in the log_format directive, its handler will not be executed until the log phase. This handler can be used to do some cleanup right before the request is freed. Since 0.8.6, when optional argument nocache is provided the handler is called every time it is referenced. Due to current limitations of the rewrite module, when a nocache variable is referenced by the set directive its handler should always return a fixed-length value. As the js_set handler returns its result immediately, it supports only synchronous callbacks. Thus, asynchronous callbacks such as ngx.fetch() or setTimeout() are not supported. The directive can be specified on the server level since 0.7.7. zone=name:size [timeout=time] [type=string|number] [evict] [state=file]; Default: — This directive appeared in version 0.8.0. Sets the name and size of the shared memory zone that keeps the key-value dictionary shared between worker processes. By default the shared dictionary uses a string as a key and a value. The optional type parameter allows redefining the value type to number. The optional timeout parameter sets the time in milliseconds after which all shared dictionary entries are removed from the zone. If some entries require a different removal time, it can be set with the timeout argument of the add, incr, and set methods (0.8.5). The optional evict parameter removes the oldest key-value pair when the zone storage is exhausted. The optional state parameter specifies a file that keeps the shared dictionary state in JSON format and makes it persistent across nginx restarts (0.9.1). : # Creates a 1Mb dictionary with string values, # removes key-value pairs after 60 seconds of zone=foo:1M timeout=60s; # Creates a 512Kb dictionary with string values, # forcibly removes oldest key-value pairs when the zone is zone=bar:512K timeout=30s evict; # Creates a 32Kb permanent dictionary with number zone=num:32k type=number; # Creates a 1Mb dictionary with string values and persistent zone=persistent:1M state=/tmp/dict.json; example.js: function get(r) { r.return(200, ngx.shared.foo.get(r.args.key)); } function set(r) { r.return(200, ngx.shared.foo.set(r.args.key, r.args.value)); } function del(r) { r.return(200, ngx.shared.bar.delete(r.args.key)); } function increment(r) { r.return(200, ngx.shared.num.incr(r.args.key, 2)); } $variable [value]; Default: — , server This directive appeared in version 0.5.3. Declares a writable variable. The value can contain text, variables, and their combination. The directive can be specified on the server level since 0.7.7. Session Object Properties Each stream njs handler receives one argument, a stream session object.\n\nExample:\n```text\nstream {\n    # since 0.9.1\n    js_engine qjs;\n\n    js_import stream.js;\n\n    js_set $bar stream.bar;\n    js_set $req_line stream.req_line;\n\n    server {\n        listen 12345;\n\n        js_preread stream.preread;\n        return     $req_line;\n    }\n\n    server {\n        listen 12346;\n\n        js_access  stream.access;\n        proxy_pass 127.0.0.1:8000;\n        js_filter  stream.header_inject;\n    }\n}\n\nhttp {\n    server {\n        listen 8000;\n        location / {\n            return 200 $http_foo\\n;\n        }\n    }\n}\n```\n\nExample:\n```text\nvar line = '';\n\nfunction bar(s) {\n    var v = s.variables;\n    s.log(\"hello from bar() handler!\");\n    return \"bar-var\" + v.remote_port + \"; pid=\" + v.pid;\n}\n\nfunction preread(s) {\n    s.on('upload', function (data, flags) {\n        var n = data.indexOf('\\n');\n        if (n != -1) {\n            line = data.substr(0, n);\n            s.done();\n        }\n    });\n}\n\nfunction req_line(s) {\n    return line;\n}\n\n// Read HTTP request line.\n// Collect bytes in 'req' until\n// request line is read.\n// Injects HTTP header into a client's request\n\nvar my_header =  'Foo: foo';\nfunction header_inject(s) {\n    var req = '';\n    s.on('upload', function(data, flags) {\n        req += data;\n        var n = req.search('\\n');\n        if (n != -1) {\n            var rest = req.substr(n + 1);\n            req = req.substr(0, n + 1);\n            s.send(req + my_header + '\\r\\n' + rest, flags);\n            s.off('upload');\n        }\n    });\n}\n\nfunction access(s) {\n    if (s.remoteAddress.match('^192.*')) {\n        s.deny();\n        return;\n    }\n\n    s.allow();\n}\n\nexport default {bar, preread, req_line, header_inject, access};\n```\n\nExample:\n```text\njs_context_reuse 128;\n```\n\nExample:\n```text\njs_engine njs;\n```\n\nExample:\n```text\njs_fetch_buffer_size 16k;\n```\n\nExample:\n```text\njs_fetch_ciphers HIGH:!aNULL:!MD5;\n```\n\nExample:\n```text\njs_fetch_max_response_buffer_size 1m;\n```\n\nExample:\n```text\njs_fetch_protocols TLSv1 TLSv1.1 TLSv1.2;\n```\n\nExample:\n```text\njs_fetch_timeout 60s;\n```\n\nExample:\n```text\njs_fetch_verify on;\n```\n\nExample:\n```text\njs_fetch_verify_depth 100;\n```\n\nExample:\n```text\nserver {\n    listen 12345;\n    js_fetch_proxy http://user:pass@proxy.example.com:3128;\n    js_preread main.fetch_handler;\n}\n```\n\nExample:\n```text\njs_fetch_keepalive 0;\n```\n\nExample:\n```text\nserver {\n    listen 12345;\n    js_fetch_keepalive 32;\n    js_fetch_trusted_certificate /path/to/ISRG_Root_X1.pem;\n    js_preread main.fetch_handler;\n}\n```\n\nExample:\n```text\njs_fetch_keepalive_requests 1000;\n```\n\nExample:\n```text\njs_fetch_keepalive_time 1h;\n```\n\nExample:\n```text\njs_fetch_keepalive_timeout 60s;\n```\n\nExample:\n```text\njs_import stream.js;\n```\n\nExample:\n```text\nnginx.conf:\njs_include stream.js;\njs_set     $js_addr address;\nserver {\n    listen 127.0.0.1:12345;\n    return $js_addr;\n}\n\nstream.js:\nfunction address(s) {\n    return s.remoteAddress;\n}\n```\n\nExample:\n```text\njs_load_stream_native_module /path/to/mylib.so;\njs_load_stream_native_module /path/to/other.so as myalias;\n\nstream {\n    js_import main.js;\n    # ... rest of stream configuration\n}\n```\n\nExample:\n```text\n// Import by filename\nimport * as mylib from 'mylib.so';\n\n// Import by alias\nimport * as myalias from 'myalias';\n\n// Use exported functions\nlet result = mylib.add(5, 10);\n```\n\nExample:\n```text\nexample.conf:\n\nlocation @periodics {\n    # to be run at 1 minute intervals in worker process 0\n    js_periodic main.handler interval=60s;\n\n    # to be run at 1 minute intervals in all worker processes\n    js_periodic main.handler interval=60s worker_affinity=all;\n\n    # to be run at 1 minute intervals in worker processes 1 and 3\n    js_periodic main.handler interval=60s worker_affinity=0101;\n\n    resolver 10.0.0.1;\n    js_fetch_trusted_certificate /path/to/ISRG_Root_X1.pem;\n}\n\nexample.js:\n\nasync function handler(s) {\n    let reply = await ngx.fetch('https://nginx.org/en/docs/njs/');\n    let body = await reply.text();\n\n    ngx.log(ngx.INFO, body);\n}\n```\n\nExample:\n```text\njs_preload_object map.json;\n```\n\nExample:\n```text\nexample.conf:\n    # Creates a 1Mb dictionary with string values,\n    # removes key-value pairs after 60 seconds of inactivity:\n    js_shared_dict_zone zone=foo:1M timeout=60s;\n\n    # Creates a 512Kb dictionary with string values,\n    # forcibly removes oldest key-value pairs when the zone is exhausted:\n    js_shared_dict_zone zone=bar:512K timeout=30s evict;\n\n    # Creates a 32Kb permanent dictionary with number values:\n    js_shared_dict_zone zone=num:32k type=number;\n\n    # Creates a 1Mb dictionary with string values and persistent state:\n    js_shared_dict_zone zone=persistent:1M state=/tmp/dict.json;\n\nexample.js:\n    function get(r) {\n        r.return(200, ngx.shared.foo.get(r.args.key));\n    }\n\n    function set(r) {\n        r.return(200, ngx.shared.foo.set(r.args.key, r.args.value));\n    }\n\n    function del(r) {\n        r.return(200, ngx.shared.bar.delete(r.args.key));\n    }\n\n    function increment(r) {\n        r.return(200, ngx.shared.num.incr(r.args.key, 2));\n    }\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:55.818Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":24,"totalLines":294,"estimatedTokens":5330}}265{"id":"doc-module_ngx_http_auth_request_module-123bf0b6","source":"documentation","title":"Module ngx_http_auth_request_module","url":"https://nginx.org/en/docs/http/ngx_http_auth_request_module.html","text":"Join us for the first quarterly NGINX Community Call on July 22nd to connect and discuss NGINX development.\n\nenglishрусскийnewsaboutdownloadsecuritydocumentationfaqbookscommunityenterprisecommunity forum (new)x.comblognjsingress controllergateway fabricModule ngx_http_auth_request_moduleExample ConfigurationDirectives auth_request auth_request_set The ngx_http_auth_request_module module (1.5.4+) implements client authorization based on the result of a subrequest. If the subrequest returns a 2xx response code, the access is allowed. If it returns 401 or 403, the access is denied with the corresponding error code. Any other response code returned by the subrequest is considered an error. For the 401 error, the client also receives the “WWW-Authenticate” header from the subrequest response. This module is not built by default, it should be enabled with the --with-http_auth_request_module configuration parameter. The module may be combined with other access modules, such as ngx_http_access_module, ngx_http_auth_basic_module, and ngx_http_auth_jwt_module, via the satisfy directive. Before version 1.7.3, responses to authorization subrequests could not be cached (using proxy_cache, proxy_store, etc.). Example Configuration location /private/ { auth_request /auth; ... } location = /auth { proxy_pass ... proxy_pass_request_body off; proxy_set_header Content-Length \"\"; proxy_set_header X-Original-URI $request_uri; } Directives uri | off; off; , server, location Enables authorization based on the result of a subrequest and sets the URI to which the subrequest will be sent. $variable value; Default: — , server, location Sets the request variable to the given value after the authorization request completes. The value may contain variables from the authorization request, such as $upstream_http_*.\n\nExample:\n```text\nlocation /private/ {\n    auth_request /auth;\n    ...\n}\n\nlocation = /auth {\n    proxy_pass ...\n    proxy_pass_request_body off;\n    proxy_set_header Content-Length \"\";\n    proxy_set_header X-Original-URI $request_uri;\n}\n```\n\nExample:\n```text\nauth_request off;\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:55.875Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":2,"totalLines":25,"estimatedTokens":528}}266{"id":"doc-git_git_log_documentation-035a1074","source":"documentation","title":"Git - git-log Documentation","url":"http://git-scm.com/docs/git-log/fr","text":"Example:\n```text\ngitlog--\n```\n\nExample:\n```text\n$ git log foo bar ^baz\n```\n\nExample:\n```text\n$ git log origin..HEAD\n$ git log HEAD ^origin\n```\n\nExample:\n```text\n$ git log A B --not $(git merge-base --all A B)\n$ git log A...B\n```\n\nExample:\n```text\n.-A---M---N---O---P---Q\n\t /     /   /   /   /   /\n\tI     B   C   D   E   Y\n\t \\   /   /   /   /   /\n\t  `-------------'   X\n```\n\nExample:\n```text\n.-A---N---O\n\t /     /   /\n\tI---------D\n```\n\nExample:\n```text\nI  A  B  N  D  O  P  Q\n```\n\nExample:\n```text\n.-A---M---N---O---P---Q\n\t /     /   /   /   /\n\tI     B   /   D   /\n\t \\   /   /   /   /\n\t  `-------------'\n```\n\nExample:\n```text\n.-A---M---N---O\n\t /     /       /\n\tI     B       D\n\t \\   /       /\n\t  `---------'\n```\n\nExample:\n```text\nD---E-------F\n\t   /     \\       \\\n\t  B---C---G---H---I---J\n\t /                     \\\n\tA-------K---------------L--M\n```\n\nExample:\n```text\nE-------F\n\t\t \\       \\\n\t\t  G---H---I---J\n\t\t\t       \\\n\t\t\t\tL--M\n```\n\nExample:\n```text\nE\n\t\t \\\n\t      C---G---H---I---J\n\t\t\t       \\\n\t\t\t\tL--M\n```\n\nExample:\n```text\nK---------------L--M\n```\n\nExample:\n```text\n.-A---M-----C--N---O---P\n\t /     / \\  \\  \\/   /   /\n\tI     B   \\  R-'`-Z'   /\n\t \\   /     \\/         /\n\t  \\ /      /\\        /\n\t   `---X--'  `---Y--'\n```\n\nExample:\n```text\nI---X\n```\n\nExample:\n```text\n.-A---M--------N---O---P\n\t /     / \\  \\  \\/   /   /\n\tI     B   \\  R-'`--'   /\n\t \\   /     \\/         /\n\t  \\ /      /\\        /\n\t   `---X--'  `------'\n```\n\nExample:\n```text\n.-A---M--.\n\t /     /    \\\n\tI     B      R\n\t \\   /      /\n\t  \\ /      /\n\t   `---X--'\n```\n\nExample:\n```text\nI---X---R---N\n```\n\nExample:\n```text\n.-A---M--.   N\n\t /     /    \\ /\n\tI     B      R\n\t \\   /      /\n\t  \\ /      /\n\t   `---X--'\n```\n\nExample:\n```text\n---1----2----4----7\n\t\\\t       \\\n\t 3----5----6----8---\n```\n\nExample:\n```text\ny---b---b  branche B\n\t    / \\ /\n\t   /   .\n\t  /   / \\\n\t o---x---a---a  branche A\n```\n\nExample:\n```text\n$ git rev-list --left-right --boundary --pretty=oneline A...B\n\n\t>bbbbbbb... 3rd on b\n\t>bbbbbbb... 2nd on b\n\t<aaaaaaa... 3rd on a\n\t<aaaaaaa... 2nd on a\n\t-yyyyyyy... 1st on b\n\t-xxxxxxx... 1st on a\n```\n\nExample:\n```text\n<empreinte> <ligne-de-titre>\n```\n\nExample:\n```text\ncommit <empreinte> Author: <auteur>\n_\n    <ligne-de-titre>_\n```\n\nExample:\n```text\ncommit <empreinte> Author: <auteur> Date: <date d’auteur>\n_\n    <ligne-de-titre>\n\n    <message-de-commit-complet>_\n```\n\nExample:\n```text\ncommit <empreinte> Author: <auteur> Commit: <validateur>\n_\n    <ligne-de-titre>\n\n    <message-de-commit-complet>_\n```\n\nExample:\n```text\ncommit <empreinte> Author: <auteur> AuthorDate: <date d’auteur> Commit: <validateur> CommitDate: <date de commit>\n_\n     <ligne-de-titre>\n\n     <message-de-commit-complet>_\n```\n\nExample:\n```text\n<empreinte-abrégée> (<ligne-de-titre>, <date-d’auteur-courte>)\n```\n\nExample:\n```text\nFrom <empreinte> <date> From : <auteur> Date : <date d’auteur> Subject : [PATCH] <ligne de titre>\n_\n<message-de-commit-complet>_\n```\n\nExample:\n```text\nL'auteur de fe6e0ee était Junio C Hamano, 23 hours ago\nL'entête était >>t4119: test autocomputing -p<n> for traditional diff input.<<\n```\n\nExample:\n```text\n++%(decorate:prefix=,suffix=,tag=,separator= )++\n```\n\nExample:\n```text\n$ git log -2 --pretty=format:%h 4da45bef \\\n  | perl -pe '$_ .= \" -- NO NEWLINE\\n\" unless /\\n/'\n4da45be\n7134973 -- NO NEWLINE\n\n$ git log -2 --pretty=tformat:%h 4da45bef \\\n  | perl -pe '$_ .= \" -- NO NEWLINE\\n\" unless /\\n/'\n4da45be\n7134973\n```\n\nExample:\n```text\n$ git log -2 --pretty=tformat:%h 4da45bef\n$ git log -2 --pretty=%h 4da45bef\n```\n\nExample:\n```text\n+    return frotz(nitfol, two->ptr, 1, 0);\n...\n-    hit = frotz(nitfol, mf2.ptr, 1, 0);\n```\n\nExample:\n```text\ndiff --git a/fichier1 b/fichier2\n```\n\nExample:\n```text\noldmodenewmodedeletedfilemodenewfilemodecopyfromcopytorenamefromrenametosimilarityindexdissimilarityindexindex..\n```\n\nExample:\n```text\ndiff --git a/a b/b\nrename from a\nrename to b\ndiff --git a/b b/a\nrename from b\nrename to a\n```\n\nExample:\n```text\ndiff --combined describe.c\nindex fabadb8,cc95eb0..4866510\n--- a/describe.c\n+++ b/describe.c\n@@@ -98,20 -98,12 +98,20 @@@\n\treturn (a_date > b_date) ? -1 : (a_date == b_date) ? 0 : 1;\n  }\n\n- static void describe(char *arg)\n -static void describe(struct commit *cmit, int last_one)\n++static void describe(char *arg, int last_one)\n  {\n +\tunsigned char sha1[20];\n +\tstruct commit *cmit;\n\tstruct commit_list *list;\n\tstatic int initialized = 0;\n\tstruct commit_name *n;\n\n +\tif (get_sha1(arg, sha1) < 0)\n +\t\tusage(describe_usage);\n +\tcmit = lookup_commit_reference(sha1);\n +\tif (!cmit)\n +\t\tusage(describe_usage);\n +\n\tif (!initialized) {\n\t\tinitialized = 1;\n\t\tfor_each_ref(get_name);\n```\n\nExample:\n```text\ndiff --combined file\n```\n\nExample:\n```text\ndiff --cc file\n```\n\nExample:\n```text\nindex,..mode,..newfilemodedeletedfilemode,\n```\n\nExample:\n```text\n--- a/fichier\n+++ b/fichier\n```\n\nExample:\n```text\n--- a/fichier\n--- a/fichier\n--- a/fichier\n+++ b/fichier\n```\n\nExample:\n```text\n@@@ <intervalle-de-fichier-source> <intervalle-de-fichier-source> <intervalle-de-fichier-cible> @@@\n```\n\nExample:\n```text\n[i18n]\n\tcommitEncoding = ISO-8859-1\n```\n\nExample:\n```text\n[i18n]\n\tlogOutputEncoding = ISO-8859-1\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:42.631Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":46,"totalLines":357,"estimatedTokens":1282}}267{"id":"doc-git_git_fsck_documentation-91b6d0d1","source":"documentation","title":"Git - git-fsck Documentation","url":"http://git-scm.com/docs/git-fsck/sv","text":"Example:\n```text\ngit fsck [--tags] [--root] [--unreachable] [--cache] [--no-reflogs]\n\t[--[no-]full] [--strict] [--verbose] [--lost-found]\n\t[--[no-]dangling] [--[no-]progress] [--connectivity-only]\n\t[--[no-]name-objects] [--[no-]references] [<objekt>…​]\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:44.832Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":1,"totalLines":9,"estimatedTokens":68}}268{"id":"doc-git_git_fast_import_documentation-83066e16","source":"documentation","title":"Git - git-fast-import Documentation","url":"http://git-scm.com/docs/git-fast-import/2.21.0","text":"Example:\n```text\nfrontend | git fast-import [<options>]\n```\n\nExample:\n```text\n'commit' SP <ref> LF\n\tmark?\n\toriginal-oid?\n\t('author' (SP <name>)? SP LT <email> GT SP <when> LF)?\n\t'committer' (SP <name>)? SP LT <email> GT SP <when> LF\n\tdata\n\t('from' SP <commit-ish> LF)?\n\t('merge' SP <commit-ish> LF)?\n\t(filemodify | filedelete | filecopy | filerename | filedeleteall | notemodify)*\n\tLF?\n```\n\nExample:\n```text\nfrom refs/heads/branch^0\n```\n\nExample:\n```text\n'M' SP <mode> SP <dataref> SP <path> LF\n```\n\nExample:\n```text\n'M' SP <mode> SP 'inline' SP <path> LF\n\tdata\n```\n\nExample:\n```text\n'D' SP <path> LF\n```\n\nExample:\n```text\n'C' SP <path> SP <path> LF\n```\n\nExample:\n```text\n'R' SP <path> SP <path> LF\n```\n\nExample:\n```text\n'deleteall' LF\n```\n\nExample:\n```text\n'N' SP <dataref> SP <commit-ish> LF\n```\n\nExample:\n```text\n'N' SP 'inline' SP <commit-ish> LF\n\tdata\n```\n\nExample:\n```text\n'mark' SP ':' <idnum> LF\n```\n\nExample:\n```text\n'original-oid' SP <object-identifier> LF\n```\n\nExample:\n```text\n'tag' SP <name> LF\n\t'from' SP <commit-ish> LF\n\toriginal-oid?\n\t'tagger' (SP <name>)? SP LT <email> GT SP <when> LF\n\tdata\n```\n\nExample:\n```text\n'reset' SP <ref> LF\n\t('from' SP <commit-ish> LF)?\n\tLF?\n```\n\nExample:\n```text\nreset refs/tags/938\nfrom :938\n```\n\nExample:\n```text\n'blob' LF\n\tmark?\n\toriginal-oid?\n\tdata\n```\n\nExample:\n```text\n'data' SP <count> LF\n\t<raw> LF?\n```\n\nExample:\n```text\n'data' SP '<<' <delim> LF\n\t<raw> LF\n\t<delim> LF\n\tLF?\n```\n\nExample:\n```text\n'checkpoint' LF\n\tLF?\n```\n\nExample:\n```text\n'progress' SP <any> LF\n\tLF?\n```\n\nExample:\n```text\nfrontend | git fast-import | sed 's/^progress //'\n```\n\nExample:\n```text\n'get-mark' SP ':' <idnum> LF\n```\n\nExample:\n```text\n'cat-blob' SP <dataref> LF\n```\n\nExample:\n```text\n<sha1> SP 'blob' SP <size> LF\n<contents> LF\n```\n\nExample:\n```text\n'ls' SP <path> LF\n```\n\nExample:\n```text\n'ls' SP <dataref> SP <path> LF\n```\n\nExample:\n```text\n<mode> SP ('blob' | 'tree' | 'commit') SP <dataref> HT <path> LF\n```\n\nExample:\n```text\nmissing SP <path> LF\n```\n\nExample:\n```text\n'feature' SP <feature> ('=' <argument>)? LF\n```\n\nExample:\n```text\n'option' SP <option> LF\n```\n\nExample:\n```text\nmkfifo fast-import-output\nfrontend <fast-import-output |\ngit fast-import >fast-import-output\n```\n\nExample:\n```text\n$ cat >in <<END_OF_INPUT\n# my very first test commit\ncommit refs/heads/master\ncommitter Shawn O. Pearce <spearce> 19283 -0400\n# who is that guy anyway?\ndata <<EOF\nthis is my commit\nEOF\nM 644 inline .gitignore\ndata <<EOF\n.gitignore\nEOF\nM 777 inline bob\nEND_OF_INPUT\n```\n\nExample:\n```text\n$ git fast-import <in\nfatal: Corrupt mode: M 777 inline bob\nfast-import: dumping crash report to .git/fast_import_crash_8434\n```\n\nExample:\n```text\n$ cat .git/fast_import_crash_8434\nfast-import crash report:\n    fast-import process: 8434\n    parent process     : 1391\n    at Sat Sep 1 00:58:12 2007\n```\n\nExample:\n```text\nfatal: Corrupt mode: M 777 inline bob\n```\n\nExample:\n```text\nMost Recent Commands Before Crash\n---------------------------------\n  # my very first test commit\n  commit refs/heads/master\n  committer Shawn O. Pearce <spearce> 19283 -0400\n  # who is that guy anyway?\n  data <<EOF\n  M 644 inline .gitignore\n  data <<EOF\n* M 777 inline bob\n```\n\nExample:\n```text\nActive Branch LRU\n-----------------\n    active_branches = 1 cur, 5 max\n```\n\nExample:\n```text\npos  clock name\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n 1)      0 refs/heads/master\n```\n\nExample:\n```text\nInactive Branches\n-----------------\nrefs/heads/master:\n  status      : active loaded dirty\n  tip commit  : 0000000000000000000000000000000000000000\n  old tree    : 0000000000000000000000000000000000000000\n  cur tree    : 0000000000000000000000000000000000000000\n  commit clock: 0\n  last pack   :\n```\n\nExample:\n```text\n-------------------\nEND OF CRASH REPORT\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:44.943Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":41,"totalLines":277,"estimatedTokens":944}}269{"id":"doc-building_an_android_application_onnxruntime-c50f311f","source":"documentation","title":"Building an Android Application | onnxruntime","url":"https://onnxruntime.ai/docs/tutorials/on-device-training/android-app.html","text":"ONNX RuntimeInstall ONNX Runtime Get StartedPythonC++CC#Java JavaScriptWebNode.js bindingReact NativeObjective-CJulia, Ruby and Rust APIsWindowsMobileOn-Device TrainingLarge Model Training TutorialsAPI Basics Accelerate PyTorchPyTorch InferenceInference on multiple targetsAccelerate PyTorch TrainingAccelerate TensorFlowAccelerate Hugging FaceDeploy on AzureML Deploy on mobileObject detection and pose estimation with YOLOv8Mobile image recognition on AndroidImprove image resolution on mobileMobile objection detection on iOSORT Mobile Model Export Helpers WebBuild a web app with ONNX RuntimeThe 'env' Flags and Session OptionsUsing WebGPUUsing WebNNWorking with Large ModelsPerformance DiagnosisDeploying ONNX Runtime WebTroubleshootingClassify images with ONNX Runtime and Next.jsCustom Excel Functions for BERT Tasks in JavaScript Deploy on IoT and edgeIoT Deployment on Raspberry PiDeploy traditional ML Inference with C#Basic C# TutorialInference BERT NLP with C#Configure CUDA for GPU with C#Image recognition with ResNet50v2 in C#Stable Diffusion with C#Object detection in C# using OpenVINOObject detection with Faster RCNN in C# On-Device TrainingBuilding an Android ApplicationBuilding an iOS ApplicationAPI Docs Build ONNX RuntimeBuild for inferencingBuild for trainingBuild with different EPsBuild for webBuild for AndroidBuild for iOSCustom build Execution ProvidersNVIDIA - CUDANVIDIA - TensorRTNVIDIA - TensorRT RTXIntel - OpenVINO™Intel - oneDNNWindows - DirectMLQualcomm - QNNAndroid - NNAPIApple - CoreMLXNNPACKAMD - ROCmAMD - MIGraphXAMD - Vitis AICloud - AzureWebGPU Community-maintainedArm - ACLArm - Arm NNApache - TVMRockchip - RKNPUHuawei - CANNAdd a new providerEP Context Design Plugin Execution Provider LibrariesUsageDevelopmentTestingPackaging Generate API (Preview) TutorialsPhi-3.5 vision tutorialPhi-3 tutorialPhi-2 tutorialRun with LoRA adaptersDeepSeek-R1-Distill tutorialRun on Snapdragon devices API docsPython APIC# APIC APIC++ APIJava API How toInstallBuild from sourceBuild modelsBuild models for SnapdragonTroubleshootMigratePast present share buffer ReferenceConfig referenceAdapter file spec ExtensionsAdd OperatorsBuild Performance Tune performanceProfiling toolsLogging & TracingMemory consumptionThread managementI/O BindingTroubleshooting Model optimizationsQuantize ONNX modelsFloat16 and mixed precision modelsGraph optimizationsORT model formatORT model format runtime optimizationTransformers optimizerEnd to end optimization with OliveDevice tensors EcosystemAzure Container for PyTorch (ACPT) ReferenceReleasesCompatibility OperatorsOperator kernelsContrib operatorsCustom operatorsReduced operator config fileArchitectureCiting ONNX RuntimeDependency Management in ONNX Runtime ONNX Runtime Docs on GitHub This site uses Just the Docs, a documentation theme for Jekyll.\n\nExample:\n```text\nimport torch\nimport torchvision\n\nmodel = torchvision.models.mobilenet_v2(\n   weights=torchvision.models.MobileNet_V2_Weights.IMAGENET1K_V2)\n\n# The original model is trained on imagenet which has 1000 classes.\n# For our image classification scenario, we need to classify among 4 categories.\n# So we need to change the last layer of the model to have 4 outputs.\nmodel.classifier[1] = torch.nn.Linear(1280, 4)\n\n# Export the model to ONNX.\nmodel_name = \"mobilenetv2\"\ntorch.onnx.export(model, torch.randn(1, 3, 224, 224),\n                  f\"training_artifacts/{model_name}.onnx\",\n                  input_names=[\"input\"], output_names=[\"output\"],\n                  dynamic_axes={\"input\": {0: \"batch\"}, \"output\": {0: \"batch\"}})\n```\n\nExample:\n```text\nimport onnx\n\n# Load the onnx model.\nonnx_model = onnx.load(f\"training_artifacts/{model_name}.onnx\")\n\n# Define the parameters that require their gradients to be computed\n# (trainable parameters) and those that do not (frozen/non trainable parameters).\nrequires_grad = [\"classifier.1.weight\", \"classifier.1.bias\"]\nfrozen_params = [\n   param.name\n   for param in onnx_model.graph.initializer\n   if param.name not in requires_grad\n]\n```\n\nExample:\n```text\nfrom onnxruntime.training import artifacts\n\n# Generate the training artifacts.\nartifacts.generate_artifacts(\n   onnx_model,\n   requires_grad=requires_grad,\n   frozen_params=frozen_params,\n   loss=artifacts.LossType.CrossEntropyLoss,\n   optimizer=artifacts.OptimType.AdamW,\n   artifact_directory=\"training_artifacts\"\n)\n```\n\nExample:\n```text\n#include \"onnxruntime_training_cxx_api.h\"\n```\n\nExample:\n```text\nndk {\n   abiFilters 'arm64-v8a'\n}\n```\n\nExample:\n```text\ndefaultConfig {\n    applicationId \"com.example.ortpersonalize\"\n    minSdk 29\n    targetSdk 33\n    versionCode 1\n    versionName \"1.0\"\n\n    testInstrumentationRunner \"androidx.test.runner.AndroidJUnitRunner\"\n    externalNativeBuild {\n       cmake {\n             cppFlags '-std=c++17'\n       }\n    }\n+   ndk {\n+       abiFilters 'arm64-v8a'\n+   }\n   \n }\n```\n\nExample:\n```text\nadd_library(onnxruntime SHARED IMPORTED)\nset_target_properties(onnxruntime PROPERTIES IMPORTED_LOCATION ${CMAKE_SOURCE_DIR}/lib/libonnxruntime.so)\n```\n\nExample:\n```text\ntarget_include_directories(ortpersonalize PRIVATE ${CMAKE_SOURCE_DIR}/include/onnxruntime)\n```\n\nExample:\n```text\ntarget_link_libraries( # Specifies the target library.\n     ortpersonalize\n\n     # Links the target library to the log library\n     # included in the NDK.\n     ${log-lib}\n\n     onnxruntime)\n```\n\nExample:\n```text\nproject(\"ortpersonalize\")\n\nadd_library( # Sets the name of the library.\n      ortpersonalize\n\n      # Sets the library as a shared library.\n      SHARED\n\n      # Provides a relative path to your source file(s).\n      native-lib.cpp\n+     utils.cpp\n+     inference.cpp\n+     train.cpp)\n+ add_library(onnxruntime SHARED IMPORTED)\n+ set_target_properties(onnxruntime PROPERTIES IMPORTED_LOCATION ${CMAKE_SOURCE_DIR}/lib/libonnxruntime.so)\n+ target_include_directories(ortpersonalize PRIVATE ${CMAKE_SOURCE_DIR}/include/onnxruntime)\n\nfind_library( # Sets the name of the path variable.\n      log-lib\n\n      # Specifies the name of the NDK library that\n      # you want CMake to locate.\n      log)\n\ntarget_link_libraries( # Specifies the target library.\n      ortpersonalize\n\n      # Links the target library to the log library\n      # included in the NDK.\n      ${log-lib}\n+     onnxruntime)\n```\n\nExample:\n```text\nextern \"C\" JNIEXPORT jlong JNICALL\nJava_com_example_ortpersonalize_MainActivity_createSession(\n      JNIEnv *env, jobject /* this */,\n      jstring checkpoint_path, jstring train_model_path, jstring eval_model_path,\n      jstring optimizer_model_path, jstring cache_dir_path)\n{\n   std::unique_ptr<SessionCache> session_cache = std::make_unique<SessionCache>(\n            utils::JString2String(env, checkpoint_path),\n            utils::JString2String(env, train_model_path),\n            utils::JString2String(env, eval_model_path),\n            utils::JString2String(env, optimizer_model_path),\n            utils::JString2String(env, cache_dir_path));\n   return reinterpret_cast<long>(session_cache.release());\n}\n```\n\nExample:\n```text\nstruct SessionCache {\n   ArtifactPaths artifact_paths;\n   Ort::Env ort_env;\n   Ort::SessionOptions session_options;\n   Ort::CheckpointState checkpoint_state;\n   Ort::TrainingSession training_session;\n   Ort::Session* inference_session;\n\n   SessionCache(const std::string &checkpoint_path, const std::string &training_model_path,\n               const std::string &eval_model_path, const std::string &optimizer_model_path,\n               const std::string& cache_dir_path) :\n   artifact_paths(checkpoint_path, training_model_path, eval_model_path, optimizer_model_path, cache_dir_path),\n   ort_env(ORT_LOGGING_LEVEL_WARNING, \"ort personalize\"), session_options(),\n   checkpoint_state(Ort::CheckpointState::LoadCheckpoint(artifact_paths.checkpoint_path.c_str())),\n   training_session(session_options, checkpoint_state, artifact_paths.training_model_path.c_str(),\n                     artifact_paths.eval_model_path.c_str(), artifact_paths.optimizer_model_path.c_str()),\n   inference_session(nullptr) {}\n};\n```\n\nExample:\n```text\nstruct ArtifactPaths {\n   std::string checkpoint_path;\n   std::string training_model_path;\n   std::string eval_model_path;\n   std::string optimizer_model_path;\n   std::string cache_dir_path;\n   std::string inference_model_path;\n\n   ArtifactPaths(const std::string &checkpoint_path, const std::string &training_model_path,\n                  const std::string &eval_model_path, const std::string &optimizer_model_path,\n                  const std::string& cache_dir_path) :\n   checkpoint_path(checkpoint_path), training_model_path(training_model_path),\n   eval_model_path(eval_model_path), optimizer_model_path(optimizer_model_path),\n   cache_dir_path(cache_dir_path), inference_model_path(cache_dir_path + \"/inference.onnx\") {}\n};\n```\n\nExample:\n```text\nextern \"C\" JNIEXPORT void JNICALL\nJava_com_example_ortpersonalize_MainActivity_releaseSession(\n      JNIEnv *env, jobject /* this */,\n      jlong session) {\n   auto *session_cache = reinterpret_cast<SessionCache *>(session);\n   delete session_cache->inference_session;\n   delete session_cache;\n}\n```\n\nExample:\n```text\nextern \"C\"\nJNIEXPORT float JNICALL\nJava_com_example_ortpersonalize_MainActivity_performTraining(\n      JNIEnv *env, jobject /* this */,\n      jlong session, jfloatArray batch, jintArray labels, jint batch_size,\n      jint channels, jint frame_rows, jint frame_cols) {\n   auto* session_cache = reinterpret_cast<SessionCache *>(session);\n\n   if (session_cache->inference_session) {\n      // Invalidate the inference session since we will be updating the model parameters\n      // in train_step.\n      // The next call to inference session will need to recreate the inference session.\n      delete session_cache->inference_session;\n      session_cache->inference_session = nullptr;\n   }\n\n   // Update the model parameters using this batch of inputs.\n   return training::train_step(session_cache, env->GetFloatArrayElements(batch, nullptr),\n                              env->GetIntArrayElements(labels, nullptr), batch_size,\n                              channels, frame_rows, frame_cols);\n}\n```\n\nExample:\n```text\nnamespace training {\n\n   float train_step(SessionCache* session_cache, float *batches, int32_t *labels,\n                     int64_t batch_size, int64_t image_channels, int64_t image_rows,\n                     int64_t image_cols) {\n      const std::vector<int64_t> input_shape({batch_size, image_channels, image_rows, image_cols});\n      const std::vector<int64_t> labels_shape({batch_size});\n\n      Ort::MemoryInfo memory_info = Ort::MemoryInfo::CreateCpu(OrtArenaAllocator, OrtMemTypeDefault);\n      std::vector<Ort::Value> user_inputs; // {inputs, labels}\n      // Inputs batched\n      user_inputs.emplace_back(Ort::Value::CreateTensor(memory_info, batches,\n                                                         batch_size * image_channels * image_rows * image_cols * sizeof(float),\n                                                         input_shape.data(), input_shape.size(),\n                                                         ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT));\n\n      // Labels batched\n      user_inputs.emplace_back(Ort::Value::CreateTensor(memory_info, labels,\n                                                         batch_size * sizeof(int32_t),\n                                                         labels_shape.data(), labels_shape.size(),\n                                                         ONNX_TENSOR_ELEMENT_DATA_TYPE_INT32));\n\n      // Run the train step and execute the forward + loss + backward.\n      float loss = *(session_cache->training_session.TrainStep(user_inputs).front().GetTensorMutableData<float>());\n\n      // Update the model parameters by taking a step in the direction of the gradients computed above.\n      session_cache->training_session.OptimizerStep();\n\n      // Reset the gradients now that the parameters have been updated.\n      // New set of gradients can then be computed for the next round of inputs.\n      session_cache->training_session.LazyResetGrad();\n\n      return loss;\n   }\n\n} // namespace training\n```\n\nExample:\n```text\nextern \"C\"\nJNIEXPORT jstring JNICALL\nJava_com_example_ortpersonalize_MainActivity_performInference(\n      JNIEnv *env, jobject  /* this */,\n      jlong session, jfloatArray image_buffer, jint batch_size, jint image_channels, jint image_rows,\n      jint image_cols, jobjectArray classes) {\n\n   std::vector<std::string> classes_str;\n   for (int i = 0; i < env->GetArrayLength(classes); ++i) {\n      // Access the current string element\n      jstring elem = static_cast<jstring>(env->GetObjectArrayElement(classes, i));\n      classes_str.push_back(utils::JString2String(env, elem));\n   }\n\n   auto* session_cache = reinterpret_cast<SessionCache *>(session);\n   if (!session_cache->inference_session) {\n      // The inference session does not exist, so create a new one.\n      session_cache->training_session.ExportModelForInferencing(\n               session_cache->artifact_paths.inference_model_path.c_str(), {\"output\"});\n      session_cache->inference_session = std::make_unique<Ort::Session>(\n               session_cache->ort_env, session_cache->artifact_paths.inference_model_path.c_str(),\n               session_cache->session_options).release();\n   }\n\n   auto prediction = inference::classify(\n            session_cache, env->GetFloatArrayElements(image_buffer, nullptr),\n            batch_size, image_channels, image_rows, image_cols, classes_str);\n\n   return env->NewStringUTF(prediction.first.c_str());\n}\n```\n\nExample:\n```text\nnamespace inference {\n\n   std::pair<std::string, float> classify(SessionCache* session_cache, float *image_data,\n                                          int64_t batch_size, int64_t image_channels,\n                                          int64_t image_rows, int64_t image_cols,\n                                          const std::vector<std::string>& classes) {\n      std::vector<const char *> input_names = {\"input\"};\n      size_t input_count = 1;\n\n      std::vector<const char *> output_names = {\"output\"};\n      size_t output_count = 1;\n\n      std::vector<int64_t> input_shape({batch_size, image_channels, image_rows, image_cols});\n\n      Ort::MemoryInfo memory_info = Ort::MemoryInfo::CreateCpu(OrtArenaAllocator, OrtMemTypeDefault);\n      std::vector<Ort::Value> input_values; // {input images}\n      input_values.emplace_back(Ort::Value::CreateTensor(memory_info, image_data,\n                                                         batch_size * image_channels * image_rows * image_cols * sizeof(float),\n                                                         input_shape.data(), input_shape.size(),\n                                                         ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT));\n\n\n      std::vector<Ort::Value> output_values;\n      output_values.emplace_back(nullptr);\n\n      // get the logits\n      session_cache->inference_session->Run(Ort::RunOptions(), input_names.data(), input_values.data(),\n                                             input_count, output_names.data(), output_values.data(), output_count);\n\n      float *output = output_values.front().GetTensorMutableData<float>();\n\n      // run softmax and get the probabilities of each class\n      std::vector<float> probabilities = Softmax(output, classes.size());\n      size_t best_index = std::distance(probabilities.begin(), std::max_element(probabilities.begin(), probabilities.end()));\n\n      return {classes[best_index], probabilities[best_index]};\n   }\n\n} // namespace inference\n```\n\nExample:\n```text\nstd::vector<float> Softmax(float *logits, size_t num_logits) {\n   std::vector<float> probabilities(num_logits, 0);\n   float sum = 0;\n   for (size_t i = 0; i < num_logits; ++i) {\n         probabilities[i] = exp(logits[i]);\n         sum += probabilities[i];\n   }\n\n   if (sum != 0.0f) {\n         for (size_t i = 0; i < num_logits; ++i) {\n            probabilities[i] /= sum;\n         }\n   }\n\n   return probabilities;\n}\n```\n\nExample:\n```text\nfun processBitmap(bitmap: Bitmap) : Bitmap {\n   // This function processes the given bitmap by\n   //   - cropping along the longer dimension to get a square bitmap\n   //     If the width is larger than the height\n   //     ___+_________________+___\n   //     |  +                 +  |\n   //     |  +                 +  |\n   //     |  +        +        +  |\n   //     |  +                 +  |\n   //     |__+_________________+__|\n   //     <-------- width -------->\n   //        <----- height ---->\n   //     <-->      cropped    <-->\n   //\n   //     If the height is larger than the width\n   //     _________________________   ʌ            ʌ\n   //     |                       |   |         cropped\n   //     |+++++++++++++++++++++++|   |      ʌ     v\n   //     |                       |   |      |\n   //     |                       |   |      |\n   //     |           +           | height width\n   //     |                       |   |      |\n   //     |                       |   |      |\n   //     |+++++++++++++++++++++++|   |      v     ʌ\n   //     |                       |   |         cropped\n   //     |_______________________|   v            v\n   //\n   //\n   //\n   //   - resizing the cropped square image to be of size (3 x 224 x 224) as needed by the\n   //     mobilenetv2 model.\n   lateinit var bitmapCropped: Bitmap\n   if (bitmap.getWidth() >= bitmap.getHeight()) {\n      // Since height is smaller than the width, we crop a square whose length is the height\n      // So cropping happens along the width dimesion\n      val width: Int = bitmap.getHeight()\n      val height: Int = bitmap.getHeight()\n\n      // left side of the cropped image must begin at (bitmap.getWidth() / 2 - bitmap.getHeight() / 2)\n      // so that the cropped width contains equal portion of the width on either side of center\n      // top side of the cropped image must begin at 0 since we are not cropping along the height\n      // dimension\n      val x: Int = bitmap.getWidth() / 2 - bitmap.getHeight() / 2\n      val y: Int = 0\n      bitmapCropped = Bitmap.createBitmap(bitmap, x, y, width, height)\n   } else {\n      // Since width is smaller than the height, we crop a square whose length is the width\n      // So cropping happens along the height dimesion\n      val width: Int = bitmap.getWidth()\n      val height: Int = bitmap.getWidth()\n\n      // left side of the cropped image must begin at 0 since we are not cropping along the width\n      // dimension\n      // top side of the cropped image must begin at (bitmap.getHeight() / 2 - bitmap.getWidth() / 2)\n      // so that the cropped height contains equal portion of the height on either side of center\n      val x: Int = 0\n      val y: Int = bitmap.getHeight() / 2 - bitmap.getWidth() / 2\n      bitmapCropped = Bitmap.createBitmap(bitmap, x, y, width, height)\n   }\n\n   // Resize the image to be channels x width x height as needed by the mobilenetv2 model\n   val width: Int = 224\n   val height: Int = 224\n   val bitmapResized: Bitmap = Bitmap.createScaledBitmap(bitmapCropped, width, height, false)\n\n   return bitmapResized\n}\n```\n\nExample:\n```text\nfun processImage(bitmap: Bitmap, buffer: FloatBuffer, offset: Int) {\n   // This function iterates over the image and performs the following\n   // on the image pixels\n   //   - normalizes the pixel values to be between 0 and 1\n   //   - substracts the mean (0.485, 0.456, 0.406) (derived from the mobilenetv2 model configuration)\n   //     from the pixel values\n   //   - divides by pixel values by the standard deviation (0.229, 0.224, 0.225) (derived from the\n   //     mobilenetv2 model configuration)\n   // Values are written to the given buffer starting at the provided offset.\n   // Values are written as follows\n   // |____|____________________|__________________| <--- buffer\n   //      ʌ                                         <--- offset\n   //                           ʌ                    <--- offset + width * height * channels\n   // |____|rrrrrr|_____________|__________________| <--- red channel read in column major order\n   // |____|______|gggggg|______|__________________| <--- green channel read in column major order\n   // |____|______|______|bbbbbb|__________________| <--- blue channel read in column major order\n\n   val width: Int = bitmap.getWidth()\n   val height: Int = bitmap.getHeight()\n   val stride: Int = width * height\n\n   for (x in 0 until width) {\n      for (y in 0 until height) {\n            val color: Int = bitmap.getPixel(y, x)\n            val index = offset + (x * height + y)\n\n            // Subtract the mean and divide by the standard deviation\n            // Values for mean and standard deviation used for\n            // the movilenetv2 model.\n            buffer.put(index + stride * 0, ((Color.red(color).toFloat() / 255f) - 0.485f) / 0.229f)\n            buffer.put(index + stride * 1, ((Color.green(color).toFloat() / 255f) - 0.456f) / 0.224f)\n            buffer.put(index + stride * 2, ((Color.blue(color).toFloat() / 255f) - 0.406f) / 0.225f)\n      }\n   }\n}\n```\n\nExample:\n```text\nfun bitmapFromUri(uri: Uri, contentResolver: ContentResolver): Bitmap {\n   // This function reads the image file at the given uri and decodes it to a bitmap\n   val source: ImageDecoder.Source = ImageDecoder.createSource(contentResolver, uri)\n   return ImageDecoder.decodeBitmap(source).copy(Bitmap.Config.ARGB_8888, true)\n}\n```\n\nExample:\n```text\n<uses-permission android:name=\"android.permission.CAMERA\" />\n<uses-feature android:name=\"android.hardware.camera\" />\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:56.308Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":23,"totalLines":506,"estimatedTokens":5370}}270{"id":"doc-deepseek_r1_distill_tutorial_onnxruntime-2b23e278","source":"documentation","title":"DeepSeek-R1-Distill tutorial | onnxruntime","url":"https://onnxruntime.ai/docs/genai/tutorials/deepseek-python.html","text":"ONNX RuntimeInstall ONNX Runtime Get StartedPythonC++CC#Java JavaScriptWebNode.js bindingReact NativeObjective-CJulia, Ruby and Rust APIsWindowsMobileOn-Device TrainingLarge Model Training TutorialsAPI Basics Accelerate PyTorchPyTorch InferenceInference on multiple targetsAccelerate PyTorch TrainingAccelerate TensorFlowAccelerate Hugging FaceDeploy on AzureML Deploy on mobileObject detection and pose estimation with YOLOv8Mobile image recognition on AndroidImprove image resolution on mobileMobile objection detection on iOSORT Mobile Model Export Helpers WebBuild a web app with ONNX RuntimeThe 'env' Flags and Session OptionsUsing WebGPUUsing WebNNWorking with Large ModelsPerformance DiagnosisDeploying ONNX Runtime WebTroubleshootingClassify images with ONNX Runtime and Next.jsCustom Excel Functions for BERT Tasks in JavaScript Deploy on IoT and edgeIoT Deployment on Raspberry PiDeploy traditional ML Inference with C#Basic C# TutorialInference BERT NLP with C#Configure CUDA for GPU with C#Image recognition with ResNet50v2 in C#Stable Diffusion with C#Object detection in C# using OpenVINOObject detection with Faster RCNN in C# On-Device TrainingBuilding an Android ApplicationBuilding an iOS ApplicationAPI Docs Build ONNX RuntimeBuild for inferencingBuild for trainingBuild with different EPsBuild for webBuild for AndroidBuild for iOSCustom build Execution ProvidersNVIDIA - CUDANVIDIA - TensorRTNVIDIA - TensorRT RTXIntel - OpenVINO™Intel - oneDNNWindows - DirectMLQualcomm - QNNAndroid - NNAPIApple - CoreMLXNNPACKAMD - ROCmAMD - MIGraphXAMD - Vitis AICloud - AzureWebGPU Community-maintainedArm - ACLArm - Arm NNApache - TVMRockchip - RKNPUHuawei - CANNAdd a new providerEP Context Design Plugin Execution Provider LibrariesUsageDevelopmentTestingPackaging Generate API (Preview) TutorialsPhi-3.5 vision tutorialPhi-3 tutorialPhi-2 tutorialRun with LoRA adaptersDeepSeek-R1-Distill tutorialRun on Snapdragon devices API docsPython APIC# APIC APIC++ APIJava API How toInstallBuild from sourceBuild modelsBuild models for SnapdragonTroubleshootMigratePast present share buffer ReferenceConfig referenceAdapter file spec ExtensionsAdd OperatorsBuild Performance Tune performanceProfiling toolsLogging & TracingMemory consumptionThread managementI/O BindingTroubleshooting Model optimizationsQuantize ONNX modelsFloat16 and mixed precision modelsGraph optimizationsORT model formatORT model format runtime optimizationTransformers optimizerEnd to end optimization with OliveDevice tensors EcosystemAzure Container for PyTorch (ACPT) ReferenceReleasesCompatibility OperatorsOperator kernelsContrib operatorsCustom operatorsReduced operator config fileArchitectureCiting ONNX RuntimeDependency Management in ONNX Runtime ONNX Runtime Docs on GitHub This site uses Just the Docs, a documentation theme for Jekyll.\n\nExample:\n```text\n# Installing onnxruntime-genai, olive, and dependencies for CPU\npython -m venv .venv && source .venv/bin/activate\npip install requests numpy --pre onnxruntime-genai olive-ai\n```\n\nExample:\n```text\n# Installing onnxruntime-genai, olive, and dependencies for CUDA GPU\npython -m venv .venv && source .venv/bin/activate\npip install requests numpy --pre onnxruntime-genai-cuda \"olive-ai[gpu]\"\n```\n\nExample:\n```text\n# Using Olive auto-opt to pull a huggingface model, optimize for CPU, and quantize to INT4 using RTN. \nolive auto-opt --model_name_or_path deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B --output_path ./deepseek-r1-distill-qwen-1.5B --device cpu --provider CPUExecutionProvider --precision int4 --use_model_builder --log_level 1\n```\n\nExample:\n```text\n# Using Olive auto-opt to pull a huggingface model, optimize for CUDA GPUs, and quantize to INT4 using RTN. \nolive auto-opt --model_name_or_path deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B --output_path ./deepseek-r1-distill-qwen-1.5B --device gpu --provider CUDAExecutionProvider --precision int4 --use_model_builder --log_level 1\n```\n\nExample:\n```text\n# Download the model directly using the huggingface cli\nhuggingface-cli download onnxruntime/DeepSeek-R1-Distill-ONNX --include 'deepseek-r1-distill-qwen-1.5B/*' --local-dir .\n```\n\nExample:\n```text\n# CPU Chat inference. If you pulled the model from huggingface, adjust the model directory (-m) accordingly \ncurl -o https://raw.githubusercontent.com/microsoft/onnxruntime-genai/refs/heads/main/examples/python/model-chat.py\npython model-chat.py -m deepseek-r1-distill-qwen-1.5B/model -e cpu --chat_template \"<|begin▁of▁sentence|><|User|>{input}<|Assistant|>\"\n```\n\nExample:\n```text\n# On-Device GPU Chat inference. Works on devices with Nvidia GPUs. If you pulled the model from huggingface, adjust the model directory (-m) accordingly \ncurl -o https://raw.githubusercontent.com/microsoft/onnxruntime-genai/refs/heads/main/examples/python/model-chat.py\npython model-chat.py -m deepseek-r1-distill-qwen-1.5B/model -e cuda --chat_template \"<|begin▁of▁sentence|><|User|>{input}<|Assistant|>\"\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:56.328Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":7,"totalLines":49,"estimatedTokens":1239}}271{"id":"doc-ep_context_design_onnxruntime-6bb478eb","source":"documentation","title":"EP Context Design | onnxruntime","url":"https://onnxruntime.ai/docs/execution-providers/EP-Context-Design.html","text":"ONNX RuntimeInstall ONNX Runtime Get StartedPythonC++CC#Java JavaScriptWebNode.js bindingReact NativeObjective-CJulia, Ruby and Rust APIsWindowsMobileOn-Device TrainingLarge Model Training TutorialsAPI Basics Accelerate PyTorchPyTorch InferenceInference on multiple targetsAccelerate PyTorch TrainingAccelerate TensorFlowAccelerate Hugging FaceDeploy on AzureML Deploy on mobileObject detection and pose estimation with YOLOv8Mobile image recognition on AndroidImprove image resolution on mobileMobile objection detection on iOSORT Mobile Model Export Helpers WebBuild a web app with ONNX RuntimeThe 'env' Flags and Session OptionsUsing WebGPUUsing WebNNWorking with Large ModelsPerformance DiagnosisDeploying ONNX Runtime WebTroubleshootingClassify images with ONNX Runtime and Next.jsCustom Excel Functions for BERT Tasks in JavaScript Deploy on IoT and edgeIoT Deployment on Raspberry PiDeploy traditional ML Inference with C#Basic C# TutorialInference BERT NLP with C#Configure CUDA for GPU with C#Image recognition with ResNet50v2 in C#Stable Diffusion with C#Object detection in C# using OpenVINOObject detection with Faster RCNN in C# On-Device TrainingBuilding an Android ApplicationBuilding an iOS ApplicationAPI Docs Build ONNX RuntimeBuild for inferencingBuild for trainingBuild with different EPsBuild for webBuild for AndroidBuild for iOSCustom build Execution ProvidersNVIDIA - CUDANVIDIA - TensorRTNVIDIA - TensorRT RTXIntel - OpenVINO™Intel - oneDNNWindows - DirectMLQualcomm - QNNAndroid - NNAPIApple - CoreMLXNNPACKAMD - ROCmAMD - MIGraphXAMD - Vitis AICloud - AzureWebGPU Community-maintainedArm - ACLArm - Arm NNApache - TVMRockchip - RKNPUHuawei - CANNAdd a new providerEP Context Design Plugin Execution Provider LibrariesUsageDevelopmentTestingPackaging Generate API (Preview) TutorialsPhi-3.5 vision tutorialPhi-3 tutorialPhi-2 tutorialRun with LoRA adaptersDeepSeek-R1-Distill tutorialRun on Snapdragon devices API docsPython APIC# APIC APIC++ APIJava API How toInstallBuild from sourceBuild modelsBuild models for SnapdragonTroubleshootMigratePast present share buffer ReferenceConfig referenceAdapter file spec ExtensionsAdd OperatorsBuild Performance Tune performanceProfiling toolsLogging & TracingMemory consumptionThread managementI/O BindingTroubleshooting Model optimizationsQuantize ONNX modelsFloat16 and mixed precision modelsGraph optimizationsORT model formatORT model format runtime optimizationTransformers optimizerEnd to end optimization with OliveDevice tensors EcosystemAzure Container for PyTorch (ACPT) ReferenceReleasesCompatibility OperatorsOperator kernelsContrib operatorsCustom operatorsReduced operator config fileArchitectureCiting ONNX RuntimeDependency Management in ONNX Runtime ONNX Runtime Docs on GitHub This site uses Just the Docs, a documentation theme for Jekyll.\n\nExample:\n```text\nvirtual const InlinedVector<const Node*> GetEpContextNodes() const {\n  return InlinedVector<const Node*>();\n}\n```\n\nExample:\n```text\nOrt::SessionOptions so;\n\n    // Enable EPContext ONNX model dumping\n    so.AddConfigEntry(kOrtSessionOptionEpContextEnable, \"1\");\n\n    // Add the execution provider (using QNN as an example)\n    so.AppendExecutionProvider(\"QNN\", provider_options);\n\n    // Create the session to dump the `_ctx.onnx` model\n    Ort::Session session1(env, \"./model1.onnx\", so);\n```\n\nExample:\n```text\n// Read model file into buffer array\n    std::vector<char> buffer;\n    ReadFileToBuffer(\"./model1.onnx\", buffer);\n\n    Ort::SessionOptions so;\n\n    // Enable EPContext ONNX model dumping\n    so.AddConfigEntry(kOrtSessionOptionEpContextEnable, \"1\");\n\n    // Specify the generated EPContext model file path using option ep.context_file_path\n    so.AddConfigEntry(kOrtSessionOptionEpContextFilePath, \"./model_ctx.onnx\");\n\n    // Add the execution provider (using QNN as an example)\n    so.AppendExecutionProvider(\"QNN\", provider_options);\n\n\n    // Create the session to dump the `_ctx.onnx` model\n    Ort::Session session1(env, buffer.data(), buffer.size(), so);\n```\n\nExample:\n```text\n// Read model file into buffer array\n    std::vector<char> buffer;\n    ReadFileToBuffer(\"./model_folder/model1.onnx\", buffer);\n\n    Ort::SessionOptions so;\n\n    // Enable EPContext ONNX model dumping\n    so.AddConfigEntry(kOrtSessionOptionEpContextEnable, \"1\");\n\n    // Specify the generated EPContext model file path using option ep.context_file_path\n    so.AddConfigEntry(kOrtSessionOptionEpContextFilePath, \"./model_folder/model_ctx.onnx\");\n\n    // Specify the external data folder path using option session.model_external_initializers_file_folder_path\n    so.AddConfigEntry(kOrtSessionOptionsModelExternalInitializersFileFolderPath, \"./external_data_folder/\");\n\n    // Add the execution provider (using QNN as an example)\n    so.AppendExecutionProvider(\"QNN\", provider_options);\n\n\n    // Create the session to dump the `_ctx.onnx` model\n    Ort::Session session1(env, buffer.data(), buffer.size(), so);\n```\n\nExample:\n```text\nOrt::SessionOptions so;\n\n    // Add EP, take QNN for example\n    so.AppendExecutionProvider(\"QNN\", provider_options);\n\n    // Create sessions to load from the _ctx.onnx model\n    Ort::Session session1(env, \"model1_ctx.onnx\", so);\n\n    session1.run(...);\n```\n\nExample:\n```text\n// Read model file into buffer array\n  std::vector<char> buffer;\n  ReadFileToBuffer(\"./model_folder/model_ctx.onnx\", buffer);\n\n  Ort::SessionOptions so;\n\n  // Specify the EPContext model file path using option ep.context_file_path\n  so.AddConfigEntry(kOrtSessionOptionEpContextFilePath, \"./model_path/model_ctx.onnx\");\n\n  // Add EP, take QNN for example\n  so.AppendExecutionProvider(\"QNN\", provider_options);\n\n  // Create sessions to load from the buffer\n  Ort::Session session1(env, buffer.data(), buffer.size(), so);\n\n  session1.run(...);\n```\n\nExample:\n```text\nOrt::SessionOptions so;\n\n    // Enable EPContext ONNX model dumping\n    so.AddConfigEntry(kOrtSessionOptionEpContextEnable, \"1\");\n\n    // Enable EP context sharing across sessions\n    so.AddConfigEntry(kOrtSessionOptionShareEpContexts, \"1\");\n\n    // Add the execution provider (using QNN as an example)\n    so.AppendExecutionProvider(\"QNN\", provider_options);\n\n    // Create the first session to dump the model1_ctx.onnx file\n    Ort::Session session1(env, \"model1.onnx\", so);\n\n    // Mark the last session by enabling ep.stop_share_ep_contexts\n    so.AddConfigEntry(kOrtSessionOptionStopShareEpContexts, \"1\");\n\n    // Create the last session to dump the model2_ctx.onnx file and generate the [model1_name]_[ep].bin\n    Ort::Session session2(env, \"model2.onnx\", so);\n```\n\nExample:\n```text\n./ep_weight_sharing_ctx_gen -e qnn -i \"soc_model|60 htp_graph_finalization_optimization_mode|3\" ./model1.onnx,./model2.onnx\n```\n\nExample:\n```text\nep.share_ep_contexts = 1\n```\n\nExample:\n```text\nOrt::SessionOptions so;\n    // enable ep.share_ep_contexts\n    so.AddConfigEntry(kOrtSessionOptionShareEpContexts, \"1\");\n\n    // Add EP, take QNN for example\n    so.AppendExecutionProvider(\"QNN\", provider_options);\n\n    // Create sessions to load from the _ctx.onnx models with resource sharing enabled\n    Ort::Session session1(env, \"model1_ctx.onnx\", so);\t\n    Ort::Session session2(env, \"model2_ctx.onnx\", so);\n\n    session1.run(...);\n    session2.run(...);\n```\n\nExample:\n```text\nimport onnxruntime as ort\n\n\"\"\"\nCompile a model (from file) to an output stream using a custom write function.\nThe custom write function just saves the output model to disk.\nA custom initializer handler stores \"large\" initializers into an external file.\n\"\"\"\ninput_model_path = \"input_model.onnx\"\noutput_model_path = \"output_model.onnx\"\noutput_initializer_file_path = \"output_model.bin\"\n\nwith open(output_model_path, \"wb\") as output_model_fd, \\\n     open(output_initializer_file_path, \"wb\") as output_initializer_fd:\n\n    # Custom function that ORT calls (one or more times) to stream out the model bytes in chunks.\n    # This example function simply writes the output model to a file.\n    def output_model_write_func(buffer: bytes):\n        output_model_fd.write(buffer)\n\n    # Custom function that ORT calls to determine where to store each ONNX initializer in the output model.\n    #\n    # Note: the `external_info` argument denotes the location of the initializer in the original input model.\n    # An implementation may choose to directly return the received `external_info` to use the same external weights.\n    def output_model_onnx_initializer_handler(\n        initializer_name: str,\n        initializer_value: ort.OrtValue,\n        external_info: ort.OrtExternalInitializerInfo | None,\n    ) -> ort.OrtExternalInitializerInfo | None:\n      byte_size = initializer_value.tensor_size_in_bytes()\n\n      if byte_size < 64:\n          return None  # Store small initializer within output model.\n\n      # Else, write the initializer to a new external file and return its location to ORT\n      value_np = initializer_value.numpy()\n      file_offset = output_initializer_fd.tell()\n      output_initializer_fd.write(value_np.tobytes())\n      return ort.OrtExternalInitializerInfo(output_initializer_file_path, file_offset, byte_size)\n\n    session_options = ort.SessionOptions()\n\n    # Set the EP to use in this session.\n    #\n    # Example for plugin EP:\n    #    ep_devices = ort.get_ep_devices()\n    #    selected_ep_device = next((ep_device for ep_device in ep_devices if ep_device.ep_name == \"SomeEp\"), None)\n    #\n    #    ep_options = {}\n    #    session_options.add_provider_for_devices([selected_ep_device], ep_options)\n    #\n    # Example for legacy \"provider-bridge\" EP:\n    #    ep_options = {}\n    #    session_options.add_provider(\"SomeEp\", ep_options)\n\n    # Compile the model\n    model_compiler = ort.ModelCompiler(\n        session_options,\n        input_model_path,\n        embed_compiled_data_into_model=True,\n        get_initializer_location_func=output_model_onnx_initializer_handler,\n    )\n    model_compiler.compile_to_stream(output_model_write_func)\n\nassert os.path.exists(output_model_path) == True\n```\n\nExample:\n```text\ndef output_model_onnx_initializer_handler(\n        initializer_name: str,\n        initializer_value: ort.OrtValue,\n        external_info: ort.OrtExternalInitializerInfo | None,\n    ) -> ort.OrtExternalInitializerInfo | None:\n      # The `external_info` argument denotes the location of the initializer in the original input model (if not None).\n      # Return it directly to use the same external initializer file.\n      return external_info\n\n# ...\n```\n\nExample:\n```text\nimport onnxruntime as ort\nimport onnxruntime_ep_contoso_ai as contoso_ep\n\n# An application uses a registration name that ends in \".virtual\" to signal that virtual devices are allowed.\nep_lib_registration_name = \"contoso_ep_lib.virtual\"\nort.register_execution_provider_library(ep_lib_registration_name, contoso_ep.get_library_path())\n\n# Set the EP to use for compilation\nep_name = contoso_ep.get_ep_names()[0]\nep_devices = ort.get_ep_devices()\nselected_ep_device = next((ep_device for ep_device in ep_devices\n                           if ep_device.ep_name == ep_name and ep_device.device.metadata[\"is_virtual\"] == \"1\"), None)\nassert selected_ep_device is not None, \"Did not find ep device for target EP\"\n\nep_options = {}  # EP-specific options\nsession_options = ort.SessionOptions()\nsession_options.add_provider_for_devices([selected_ep_device], ep_options)\n\n# Compile the model\nmodel_compiler = ort.ModelCompiler(\n    session_options,\n    \"input_model.onnx\",\n    # ... other options ...\n)\nmodel_compiler.compile_to_file(\"output_model.onnx\")\n\n# Unregister the library using the same registration name specified earlier.\n# Must only unregister a library after all `ModelCompiler` objects that use the library have been released.\ndel model_compiler\nort.unregister_execution_provider_library(ep_lib_registration_name)\n```\n\nExample:\n```text\n#include \"core/session/onnxruntime_env_config_keys.h\"\n#define ORT_API_MANUAL_INIT\n#include \"onnxruntime_cxx_api.h\"\n#undef ORT_API_MANUAL_INIT\n\n// other includes ..\n\nextern \"C\" {\nEXPORT_SYMBOL OrtStatus* CreateEpFactories(const char* /*registration_name*/, const OrtApiBase* ort_api_base,\n                                           const OrtLogger* default_logger,\n                                           OrtEpFactory** factories, size_t max_factories, size_t* num_factories) {\n  EXCEPTION_TO_RETURNED_STATUS_BEGIN\n  const OrtApi* ort_api = ort_api_base->GetApi(ORT_API_VERSION);\n  const OrtEpApi* ep_api = ort_api->GetEpApi();\n  const OrtModelEditorApi* model_editor_api = ort_api->GetModelEditorApi();\n\n  // Manual init for the C++ API\n  Ort::InitApi(ort_api);\n\n  if (max_factories < 1) {\n    return ort_api->CreateStatus(ORT_INVALID_ARGUMENT,\n                                 \"Not enough space to return EP factory. Need at least one.\");\n  }\n\n  Ort::KeyValuePairs env_configs = Ort::GetEnvConfigEntries();  // Wraps OrtEpApi::GetEnvConfigEntries()\n\n  // Extract a config that determines whether creating virtual hardware devices is allowed.\n  // An application can allow an EP library to create virtual devices in two ways:\n  //  1. Use an EP library registration name that ends in the suffix \".virtual\". If so, ORT will automatically\n  //     set the config key \"allow_virtual_devices\" to \"1\" in the environment.\n  //  2. Directly set the config key \"allow_virtual_devices\" to \"1\" when creating the\n  //     OrtEnv via OrtApi::CreateEnvWithOptions().\n  const char* config_value = env_configs.GetValue(kOrtEnvAllowVirtualDevices);\n  const bool allow_virtual_devices = config_value != nullptr && strcmp(config_value, \"1\") == 0;\n\n  std::unique_ptr<OrtEpFactory> factory = std::make_unique<EpFactoryVirtualGpu>(*ort_api, *ep_api, *model_editor_api,\n                                                                                allow_virtual_devices, *default_logger);\n\n  factories[0] = factory.release();\n  *num_factories = 1;\n\n  return nullptr;\n  EXCEPTION_TO_RETURNED_STATUS_END\n}\n\n// ...\n\n}  // extern \"C\"\n```\n\nExample:\n```text\n#include \"core/session/onnxruntime_ep_device_ep_metadata_keys.h\"\n// Other includes ...\n\n/*static*/\nOrtStatus* ORT_API_CALL EpFactoryVirtualGpu::GetSupportedDevicesImpl(OrtEpFactory* this_ptr,\n                                                                     const OrtHardwareDevice* const* /*devices*/,\n                                                                     size_t /*num_devices*/,\n                                                                     OrtEpDevice** ep_devices,\n                                                                     size_t max_ep_devices,\n                                                                     size_t* p_num_ep_devices) noexcept {\n  size_t& num_ep_devices = *p_num_ep_devices;\n  auto* factory = static_cast<EpFactoryVirtualGpu*>(this_ptr);\n\n  num_ep_devices = 0;\n\n  // Create a virtual OrtHardwareDevice if application indicated it is allowed (e.g., for cross-compiling).\n  // This example EP creates a virtual GPU OrtHardwareDevice and adds a new OrtEpDevice that uses the virtual GPU.\n  if (factory->allow_virtual_devices_ && num_ep_devices < max_ep_devices) {\n    // A virtual hardware device should have a metadata entry \"is_virtual\" set to \"1\".\n    OrtKeyValuePairs* hw_metadata = nullptr;\n    factory->ort_api_.CreateKeyValuePairs(&hw_metadata);\n    factory->ort_api_.AddKeyValuePair(hw_metadata, kOrtHardwareDevice_MetadataKey_IsVirtual, \"1\");\n\n    auto* status = factory->ep_api_.CreateHardwareDevice(OrtHardwareDeviceType::OrtHardwareDeviceType_GPU,\n                                                         factory->vendor_id_,\n                                                         /*device_id*/ 0,\n                                                         factory->vendor_.c_str(),\n                                                         hw_metadata,\n                                                         &factory->virtual_hw_device_);\n    factory->ort_api_.ReleaseKeyValuePairs(hw_metadata);  // Release since ORT makes a copy.\n\n    if (status != nullptr) {\n      return status;\n    }\n\n    OrtKeyValuePairs* ep_metadata = nullptr;\n    OrtKeyValuePairs* ep_options = nullptr;\n    factory->ort_api_.CreateKeyValuePairs(&ep_metadata);\n    factory->ort_api_.CreateKeyValuePairs(&ep_options);\n\n    // made up example metadata values.\n    factory->ort_api_.AddKeyValuePair(ep_metadata, \"some_metadata\", \"1\");\n    factory->ort_api_.AddKeyValuePair(ep_options, \"compile_optimization\", \"O3\");\n\n    OrtEpDevice* virtual_ep_device = nullptr;\n    status = factory->ort_api_.GetEpApi()->CreateEpDevice(factory, factory->virtual_hw_device_, ep_metadata,\n                                                          ep_options, &virtual_ep_device);\n\n    factory->ort_api_.ReleaseKeyValuePairs(ep_metadata);\n    factory->ort_api_.ReleaseKeyValuePairs(ep_options);\n\n    if (status != nullptr) {\n      return status;\n    }\n\n    ep_devices[num_ep_devices++] = virtual_ep_device;\n  }\n\n  return nullptr;\n}\n```\n\nExample:\n```text\nimport onnxruntime as ort\nimport onnxruntime_ep_contoso_ai as contoso_ep\n\nep_lib_registration_name = \"contoso_ep_lib\"\nort.register_execution_provider_library(ep_lib_registration_name, contoso_ep.get_library_path())\n\n# The models that share resources\ninput_models = [\"input_model_0.onnx\", \"input_model_1.onnx\"]\noutput_models = [\"output_model_0.onnx\", \"output_model_1.onnx\"]\n\n# Set the EP to use for compilation\nep_devices = ort.get_ep_devices()\nselected_ep_device = next((ep_device for ep_device in ep_devices if ep_device.ep_name == contoso_ep.get_ep_names()[0]), None)\nassert selected_ep_device is not None, \"Did not find ep device for target EP\"\n\nep_options = {}  # EP-specific options\nsession_options = ort.SessionOptions()\nsession_options.add_provider_for_devices([selected_ep_device], ep_options)\n\n# Set option that tells EP to share resources (e.g., weights) across sessions.\nsession_options.add_session_config_entry(\"ep.share_ep_contexts\", \"1\")\n\n# Compile individual models\nfor i in range(len(input_models)):\n    if i == num_models - 1:\n        # Tell EP that this is the last compiling session that will be sharing resources.\n        session_options.add_session_config_entry(\"ep.stop_share_ep_contexts\", \"1\")\n\n    model_compiler = onnxrt.ModelCompiler(\n        session_options,\n        input_models[i],\n        # ... other options ...\n    )\n    model_compiler.compile_to_file(output_models[i])\n\n# Unregister the library using the same registration name specified earlier.\n# Must only unregister a library after all `ModelCompiler` objects that use the library have been released.\nort.unregister_execution_provider_library(ep_lib_registration_name)\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:56.332Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":16,"totalLines":428,"estimatedTokens":4653}}272{"id":"doc-static_reachability_analysis_gitlab_docs-d1089578","source":"documentation","title":"Static reachability analysis | GitLab Docs","url":"https://docs.gitlab.com/user/application_security/dependency_scanning/static_reachability/","text":"Getting startedTutorialsManage your organizationOrganize work with projectsPlan and track workManage authentication and authorizationUse GitManage your codeUse CI/CD to build your applicationSecure your applicationGetting startedTutorialsApplication securityComplianceDetectSecurity configurationRoll out security scanningSARIF reportsSecurity scanning resultsContainer scanningDependency scanningDependency scanning by using SBOMStatic up dependency scanning by using SBOMTroubleshootingMigrating to dependency scanning using SBOMContinuous dependency scanningLegacy Dependency scanningAnalyze dependency behaviorAgentic breaking change scanning and container scanningDependency listContinuous vulnerability scanningStatic application security testing (SAST)Infrastructure as Code (IaC) scanningSecret detectionDynamic Application Security Testing (DAST)API securityWeb API fuzz testingCoverage-guided fuzz testing (deprecated)Offline environmentsScanner maintenanceTriageAnalyzeRemediateGitLab advisory databaseCVE ID requestsPoliciesSecurity glossaryDeploy and release your applicationManage your infrastructureMonitor your applicationAnalyze GitLab usageRelease notesFeature supportFind your GitLab versionGitLab Docs /Use GitLab /Secure your application /Detect /Dependency scanning /Dependency scanning by u… /Static reachabilityHelp us learn about your current experience with the documentation. Take the survey.Static reachability : GitLab.com, GitLab Self-Managed, GitLab DedicatedHistoryIntroduced as an experiment in GitLab 17.5.Changed from experiment to beta in GitLab 17.11.Introduced support for JavaScript and TypeScript in GitLab 18.2 and dependency scanning analyzer v0.32.0.Introduced support for Java in GitLab 18.5 and dependency scanning analyzer v0.39.0.Changed from beta to Limited Availability (LA) in GitLab 18.5.Changed Java support from experiment to beta in GitLab 18.8.Generally available in GitLab 19.0.Dependency scanning identifies all vulnerable dependencies in your project. However, not all vulnerabilities pose equal risk. Static reachability analysis helps you prioritize remediation by determining which vulnerable packages are reachable, meaning they are imported by your application. By focusing on reachable vulnerabilities, static reachability analysis enables you to prioritize remediation based on actual threat exposure rather than theoretical risk.Static reachability analysis works by analyzing your project’s source code to determine which dependencies from your SBOM are reachable. Dependency scanning generates an SBOM report that identifies all components and their transitive dependencies. Static reachability analysis then checks each dependency in the SBOM and adds a reachability value, enriching the report with actual usage data. This enriched SBOM is then ingested by GitLab to supplement vulnerability findings.An SBOM is enriched only when both the SBOM file and source code files belong to the same project directory tree. When multiple nested projects exist, the system selects the closest (deepest) project path to determine enrichment. static reachability analysis relies on metadata that maps package names from SBOMs to their corresponding code import paths for Python and Java packages. This metadata is maintained with weekly updates.Share feedback in issue 535498.Turn on static reachability Developer, Maintainer, or Owner role for the project.The project uses supported languages and package managers.Dependency scanning analyzer version 0.39.0 or later (earlier versions may support specific languages - see History above).Dependency scanning by using SBOM turned on for the project. Gemnasium analyzers are not supported.Language-specific :Dependency graph files must be provided as a job artifact in the build stage. See the instructions for pip or pipenv. For other supported Python package managers, see the dependency scanning analyzer documentation.JavaScript and must contain lockfiles supported by the dependency scanning analyzer.Java:Dependency graph files must be provided as a job artifact in the build stage. See the instructions for Maven or Gradle.Static reachability analysis increases job duration.To turn on static reachability analysis in your the top bar, select Search or go to and find your project.In the left sidebar, select Code > Repository.Select the .gitlab-ci.yml file.Select Edit > Edit single file.Add the following : - /Dependency-Scanning.v2.gitlab-ci.yml : trueSelect Commit changes.When dependency scanning runs and outputs an SBOM, the results are supplemented by static reachability analysis.Reachability valuesA dependency can have one of the following reachability values. Prioritize triage and remediation of dependencies marked as Yes, because these are confirmed to be used in your code.YesThe package linked to this vulnerability is confirmed reachable in code. When a direct dependency is marked as reachable, its transitive dependencies are also marked as reachable.Not FoundStatic reachability analysis ran successfully but did not detect usage of the vulnerable package.Not AvailableStatic reachability analysis was not executed, so no reachability data exists.To find the reachability value for a vulnerable the vulnerability report, hover over the Severity value.In a vulnerability’s details page, check the Reachable value.Use a GraphQL query to list vulnerabilities that are reachable.“Not Found” resultsA Not Found reachability value doesn’t guarantee the dependency is unused, because static reachability analysis cannot always definitively determine package usage.Dependencies are marked as not found appear in lockfiles but are not imported in the code.They are in excluded directories (for example, configured with DS_EXCLUDED_PATHS).They are tools included for local usage only, such as coverage testing or linting packages.Consider the following example of an excluded directory. You have defined the CI/CD variable DS_EXCLUDED_PATHS=\"test\". The project’s repository structure is as follows.. ├── pipdeptree.json // contains \"requests\" dependency └── test/ └── app.py // imports \"requests\" dependencyIn this example, the graph file pipdeptree.json is outside the excluded directory and is analyzed to identify the dependencies listed in the file. However, the source code that imports the requests dependency is in an excluded directory, so static reachability analysis doesn’t check its reachability. As a result, the requests dependency is labeled as Not found. In other words, this occurs when the lockfile is outside the excluded directory but the code that imports the dependency is inside it.Supported languages and package managersSupport varies by language maturity and includes specific package managers and file types for each language.LanguageMaturitySupported package managersSupported file typesPython1Betapip, pipenv2, poetry, uv.pyJavaScript/TypeScript3Betanpm, pnpm, yarn.js, .tsJava4Betamaven5, gradle6.javaFootnotes:When using dependency scanning with pipdeptree, optional dependencies are marked as direct dependencies instead of as transitive dependencies. Static reachability analysis might not identify those packages as in use. For example, requiring passlib[bcrypt] may result in passlib being marked as in_use and bcrypt is marked as not_found. For more details, see pip.For Python pipenv, static reachability analysis doesn’t support Pipfile.lock files. Support is available only for pipenv.graph.json because it supports a dependency graph.No support for frontend frameworks.Java’s dynamic nature causes the following issues which can result in higher false negative rates for projects using modern reachability analysis detects explicit usage through direct imports, Java reflection patterns, and Java Database Connectivity connection strings in source code. It cannot identify dependencies loaded dynamically at runtime, such as those using dependency injection frameworks like Spring Boot.Coverage is limited to packages in the GitLab advisory database and the most widely-depended-upon packages in Maven Central.Use maven.graph.json files as described in the Maven instructions.Use dependency lockfiles as described in the Gradle instructions.Offline environmentTo run static reachability analysis in an offline environment, you must do an initial setup and perform ongoing maintenance.Initial the offline environment requirements for dependency scanning (SBOM).Ongoing the local dependency scanning (SBOM) image whenever new versions are released.For Python and Java packages, static reachability analysis uses metadata to map package names from SBOMs to their corresponding code import paths. This metadata is contained in the dependency scanning analyzer’s image. Outdated metadata may result in incomplete or inaccurate reachability analysis.Turn on static reachability analysisReachability values“Not Found” resultsSupported languages and package managersOffline environment\n\nExample:\n```yaml\ninclude:\n- template: Jobs/Dependency-Scanning.v2.gitlab-ci.yml\n\nvariables:\n  DS_STATIC_REACHABILITY_ENABLED: true\n```\n\nExample:\n```plaintext\n.\n├── pipdeptree.json  // contains \"requests\" dependency\n└── test/\n    └── app.py       // imports \"requests\" dependency\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:11.858Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":2,"totalLines":20,"estimatedTokens":2310}}273{"id":"doc-paging_and_notifications_gitlab_docs-532b52ad","source":"documentation","title":"Paging and notifications | GitLab Docs","url":"https://docs.gitlab.com/operations/incident_management/paging/","text":"Getting startedTutorialsManage your organizationOrganize work with projectsPlan and track workManage authentication and authorizationUse GitManage your codeUse CI/CD to build your applicationSecure your applicationDeploy and release your applicationManage your infrastructureMonitor your applicationGetting startedError trackingIncident managementAlertsIncidentsOn-call schedulesEscalation policiesPaging and notificationsStatus pageObservabilityAnalyze GitLab usageRelease notesFeature supportFind your GitLab versionGitLab Docs /Use GitLab /Monitor your application /Incident management /On-call schedules /Paging and notificationsHelp us learn about your current experience with the documentation. Take the survey.Paging and , Premium, , GitLab Self-Managed, GitLab DedicatedWhen there is a new alert or incident, it is important for a responder to be notified immediately so they can triage and respond to the problem. Responders can receive notifications using the methods described on this page.Slack notificationsThe GitLab for Slack app can be used to receive important incident notifications.When the GitLab for Slack app is configured, incident responders are notified in Slack every time a new incident is declared. To ensure you don’t miss any important incident notifications on your mobile device, enable notifications for Slack on your phone.Email notifications for alertsEmail notifications are available in projects for triggered alerts. Project members with the Owner or Maintainer roles have the option to receive a single email notification for new alerts.In the top bar, select Search or go to and find your project.In the left sidebar, select Settings > Monitor.Expand Alerts.On the Alert settings tab, select the Send a single email notification to Owners and Maintainers for new alerts checkbox.Select Save changes.Update the alert’s status to manage email notifications for an alert.PagingTier: Premium, , GitLab Self-Managed, GitLab DedicatedIn projects that have an escalation policy configured, on-call responders can be automatically paged about critical problems through email.Escalating an alertWhen an alert is triggered, it begins escalating to the on-call responders immediately. For each escalation rule in the project’s escalation policy, the designated on-call responders receive one email when the rule fires. You can respond to a page or stop alert escalations by updating the alert’s status.Escalating an incidentFor incidents, paging on-call responders is optional for each individual incident.To begin escalating the incident, set the incident’s escalation policy.For each escalation rule, the designated on-call responders receive one email when the rule fires. Respond to a page or stop incident escalations by changing the incident’s status or changing the incident’s escalation policy back to No escalation policy.All incidents, including incidents created from alerts, can be escalated independently.Slack notificationsEmail notifications for alertsPagingEscalating an alertEscalating an incident\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:12.065Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":0,"totalLines":3,"estimatedTokens":765}}274{"id":"doc-use_gitlab_orbit_with_the_gitlab_cli_glab_gitlab-951639a8","source":"documentation","title":"Use GitLab Orbit with the GitLab CLI (glab) | GitLab Docs","url":"https://docs.gitlab.com/orbit/remote/access/glab/","text":"GitLab Orbit skillTroubleshootingGitLab Orbit RemoteGetting startedHow it worksWhat Orbit indexesSecuritySchema referenceCookbookQueriesGitLab Duo Agent PlatformMCPglab orbitREST APIGitLab Orbit LocalGitLab Docs /GitLab Orbit /GitLab Orbit Remote /glab orbitHelp us learn about your current experience with the documentation. Take the survey.Use GitLab Orbit with the GitLab CLI (glab)Tier: Premium, : BetaHistoryIntroduced in GitLab 18.10 with a feature flag named knowledge_graph. Disabled by default. This feature is an experiment.Changed to beta in GitLab 19.1.The availability of this feature is controlled by a feature flag. For more information, see the history. This feature is available for testing, but not ready for production use.This page contains information related to upcoming products, features, and functionality. It is important to note that the information presented is for informational purposes only. Please do not rely on this information for purchasing or planning purposes. The development, release, and timing of any products, features, or functionality may be subject to change or delay and remain at the sole discretion of GitLab Inc.The GitLab CLI (glab) is the canonical way to set up and query GitLab Orbit from the command line.Two top-level orbit subcommands that call the GitLab Orbit Remote REST API. Available in glab 1.94 or later.glab orbit install of the GitLab Orbit skill and MCP config for your AI agent. Planned for a future glab release. Until it ships, configure your MCP client manually.PrerequisitesGitLab Orbit is enabled on your group.glab is installed and auth loginYour user has access to at least one top-level group with GitLab Orbit enabled.Set up your AI agentglab orbit setup is planned for a future glab release. When it ships, one command will install the GitLab Orbit skill and write the MCP config for your AI agent (Claude Code, OpenCode, Cursor, Codex, Gemini CLI).Until it ships, configure your MCP client manually.Query GitLab Orbit from the command lineUse glab orbit remote (or the r alias) to call the GitLab Orbit Remote API directly. Useful for scripting, debugging, and exploring the schema before writing queries. Requires glab 1.94 or later.SubcommandEndpointPurposeglab orbit remote statusGET orbit/statusCluster health.glab orbit remote schema [node...]GET orbit/schemaGraph ontology. Positional args expand specific nodes.glab orbit remote toolsGET orbit/toolsMCP tool manifest with the full DSL JSON Schema.glab orbit remote query [file|-]POST orbit/queryRun a query from a file or stdin.glab orbit remote graph-statusGET orbit/graph_statusIndexing progress for a namespace, project, or full path.Discover the schemaglab orbit remote status glab orbit remote schema glab orbit remote schema MergeRequest Project glab orbit remote toolsRun a queryReplace your-group with your own group path. This query returns the first five projects in that the request body in query.json:{ \"query\": { \"query_type\": \"traversal\", \"nodes\": [{ \"id\": \"p\", \"entity\": \"Project\", \"filters\": { \"full_path\": {\"starts_with\": \"your-group/\"} } }], \"limit\": 5 } }glab orbit remote query query.jsonThe --format flag maps to the body’s llm - compact text optimized for AI agent consumption.--format raw - structured JSON, suitable for piping to jq.If --format is unset, the body’s response_format wins, with llm as the final fallback.Check indexing progressPass exactly one scope orbit remote graph-status --full-path your-group/your-project glab orbit remote graph-status --namespace-id 24 glab orbit remote graph-status --project-id 2Exit codesglab orbit remote maps HTTP errors to stable exit codes so scripts and agents can branch on them without parsing stderr.StatusExit codeMeaning2000Success.4042knowledge_graph feature flag is off, or path typo.4013Missing or expired token.4034No Knowledge Graph enabled namespaces available.4295Rate limited. Inspect Retry-After and back off.Other1Unstructured error. Response body, if any, is included.Billingglab orbit remote query consumes GitLab Credits the same way as MCP queries. status, schema, tools, and graph-status calls are free.PrerequisitesSet up your AI agentQuery GitLab Orbit from the command lineDiscover the schemaRun a queryCheck indexing progressExit codesBilling\n\nExample:\n```shell\nglab auth login\n```\n\nExample:\n```shell\nglab orbit remote status\nglab orbit remote schema\nglab orbit remote schema MergeRequest Project\nglab orbit remote tools\n```\n\nExample:\n```json\n{\n  \"query\": {\n    \"query_type\": \"traversal\",\n    \"nodes\": [{\n      \"id\": \"p\",\n      \"entity\": \"Project\",\n      \"filters\": {\n        \"full_path\": {\"starts_with\": \"your-group/\"}\n      }\n    }],\n    \"limit\": 5\n  }\n}\n```\n\nExample:\n```shell\nglab orbit remote query query.json\n```\n\nExample:\n```shell\nglab orbit remote graph-status --full-path your-group/your-project\nglab orbit remote graph-status --namespace-id 24\nglab orbit remote graph-status --project-id 2\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:12.311Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":5,"totalLines":45,"estimatedTokens":1238}}275{"id":"doc-conan_1_packages_in_the_package_registry_gitlab_-131788f9","source":"documentation","title":"Conan 1 packages in the package registry | GitLab Docs","url":"https://docs.gitlab.com/user/packages/conan_1_repository/","text":"Example:\n```shell\nconan remote add gitlab https://gitlab.example.com/api/v4/projects/<project_id>/packages/conan\n```\n\nExample:\n```shell\nconan search Hello* --remote=gitlab\n```\n\nExample:\n```shell\nconan remote add gitlab https://gitlab.example.com/api/v4/packages/conan\n```\n\nExample:\n```shell\nconan search 'Hello*' --remote=gitlab\n```\n\nExample:\n```shell\nconan user <gitlab_username or deploy_token_username> -r gitlab -p <personal_access_token or deploy_token>\n```\n\nExample:\n```shell\nconan remote add_ref Hello/0.1@mycompany/beta gitlab\n```\n\nExample:\n```shell\nCONAN_LOGIN_USERNAME=<gitlab_username or deploy_token_username> CONAN_PASSWORD=<personal_access_token or deploy_token> <conan command> --remote=gitlab\n```\n\nExample:\n```shell\nconan upload Hello/0.1@mycompany/beta --all\n```\n\nExample:\n```yaml\ncreate_package:\n  image: conanio/gcc7\n  stage: deploy\n  script:\n    - conan remote add gitlab ${CI_API_V4_URL}/projects/$CI_PROJECT_ID/packages/conan\n    - conan new <package-name>/0.1 -t\n    - conan create . <group-name>+<project-name>/stable\n    - CONAN_LOGIN_USERNAME=ci_user CONAN_PASSWORD=${CI_JOB_TOKEN} conan upload <package-name>/0.1@<group-name>+<project-name>/stable --all --remote=gitlab\n  environment: production\n```\n\nExample:\n```plaintext\n[requires]\nHello/0.1@mycompany/beta\n\n[generators]\ncmake\n```\n\nExample:\n```shell\nmkdir build && cd build\n```\n\nExample:\n```shell\nconan install .. <options>\n```\n\nExample:\n```shell\nconan remove Hello/0.2@user/channel --remote=gitlab\n```\n\nExample:\n```shell\nconan search Hello --remote=gitlab\n```\n\nExample:\n```shell\nconan search He* --remote=gitlab\n```\n\nExample:\n```shell\nconan info Hello/0.1@mycompany/beta\n```\n\nExample:\n```shell\nconan download Hello/0.1@foo+bar/stable --remote=gitlab\n```\n\nExample:\n```shell\nconan download Hello/0.1@foo+bar/stable --remote=gitlab --recipe\n```\n\nExample:\n```shell\nconan download Hello/0.1@foo+bar/stable:<package_reference> --remote=gitlab\n```\n\nExample:\n```shell\nconan upload package_name/version@user/channel#* --all --remote=gitlab\n```\n\nExample:\n```shell\nconan search package_name/version@user/channel --revisions --remote=gitlab\n```\n\nExample:\n```shell\nconan search package_name/version@user/channel#revision_hash --remote=gitlab\n```\n\nExample:\n```shell\nconan remove package_name/version@user/channel#revision_hash --remote=gitlab\n```\n\nExample:\n```shell\nconan remove package_name/version@user/channel#revision_hash --packages --remote=gitlab\n```\n\nExample:\n```shell\nconan remove package_name/version@user/channel#revision_hash -p package_id --remote=gitlab\n```\n\nExample:\n```shell\nconan remove package_name/version@user/channel#revision_hash:package_id --remote=gitlab\n```\n\nExample:\n```shell\nexport CONAN_TRACE_FILE=/tmp/conan_trace.log # Or SET in windows\nconan <command>\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:12.409Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":27,"totalLines":149,"estimatedTokens":692}}276{"id":"doc-quickstart_create_a_server_azure_cli_azure_datab-b4c22ff8","source":"documentation","title":"Quickstart: Create a server - Azure CLI - Azure Database for MariaDB | Microsoft Learn","url":"https://learn.microsoft.com/en-us/azure/mariadb/quickstart-create-mariadb-server-database-using-azure-cli","text":"Example:\n```azurecli\naz account set --subscription 00000000-0000-0000-0000-000000000000\n```\n\nExample:\n```azurecli\naz group create --name myresourcegroup --location westus\n```\n\nExample:\n```azurecli\naz mariadb server create --resource-group myresourcegroup --name mydemoserver  --location westus --admin-user myadmin --admin-password <server_admin_password> --sku-name GP_Gen5_2 --version 10.2\n```\n\nExample:\n```azurecli\naz mariadb server firewall-rule create --resource-group myresourcegroup --server mydemoserver --name AllowMyIP --start-ip-address 192.168.0.1 --end-ip-address 192.168.0.1\n```\n\nExample:\n```azurecli\naz mariadb server update --resource-group myresourcegroup --name mydemoserver --ssl-enforcement Disabled\n```\n\nExample:\n```azurecli\naz mariadb server show --resource-group myresourcegroup --name mydemoserver\n```\n\nExample:\n```json\n{\n  \"administratorLogin\": \"myadmin\",\n  \"earliestRestoreDate\": null,\n  \"fullyQualifiedDomainName\": \"mydemoserver.mariadb.database.azure.com\",\n  \"id\": \"/subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/resourceGroups/myresourcegroup/providers/Microsoft.DBforMariaDB/servers/mydemoserver\",\n  \"location\": \"westus\",\n  \"name\": \"mydemoserver\",\n  \"resourceGroup\": \"myresourcegroup\",\n  \"sku\": {\n    \"capacity\": 2,\n    \"family\": \"Gen5\",\n    \"name\": \"GP_Gen5_2\",\n    \"size\": null,\n    \"tier\": \"GeneralPurpose\"\n  },\n  \"sslEnforcement\": \"Enabled\",\n  \"storageProfile\": {\n    \"backupRetentionDays\": 7,\n    \"geoRedundantBackup\": \"Disabled\",\n    \"storageMb\": 5120\n  },\n  \"tags\": null,\n  \"type\": \"Microsoft.DBforMariaDB/servers\",\n  \"userVisibleState\": \"Ready\",\n  \"version\": \"10.2\"\n}\n```\n\nExample:\n```azurecli\nmysql -h mydemoserver.mariadb.database.azure.com -u myadmin@mydemoserver -p\n```\n\nExample:\n```sql\nstatus\n```\n\nExample:\n```cmd\nC:\\Users\\>mysql -h mydemoserver.mariadb.database.azure.com -u myadmin@mydemoserver -p\nEnter password: ***********\nWelcome to the MySQL monitor.  Commands end with ; or \\g.\nYour MySQL connection id is 65512\nServer version: 5.6.39.0 MariaDB Server\n\nCopyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.\n\nOracle is a registered trademark of Oracle Corporation and/or its\naffiliates. Other names may be trademarks of their respective\nowners.\n\nType 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.\n\nmysql> status\n--------------\nmysql  Ver 14.14 Distrib 5.7.23, for Linux (x86_64)\n\nConnection id:          64681\nCurrent database:\nCurrent user:           myadmin@40.118.201.21\nSSL:                    Cipher in use is AES256-SHA\nCurrent pager:          stdout\nUsing outfile:          ''\nUsing delimiter:        ;\nServer version:         5.6.39.0 MariaDB Server\nProtocol version:       10\nConnection:             mydemoserver.mariadb.database.azure.com via TCP/IP\nServer characterset:    latin1\nDb     characterset:    latin1\nClient characterset:    utf8\nConn.  characterset:    utf8\nTCP port:               3306\nUptime:                 1 day 3 hours 28 min 50 sec\n\nThreads: 10  Questions: 29002  Slow queries: 0  Opens: 33  Flush tables: 3  Open tables: 1  Queries per second avg: 0.293\n--------------\n\nmysql>\n```\n\nExample:\n```azurecli\naz group delete --name myresourcegroup\n```\n\nExample:\n```azurecli\naz mariadb server delete --resource-group myresourcegroup --name mydemoserver\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:50.604Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":12,"totalLines":124,"estimatedTokens":825}}277{"id":"doc-pipeline_execution_and_triggers_azure_data_facto-52bafedf","source":"documentation","title":"Pipeline execution and triggers - Azure Data Factory & Azure Synapse | Microsoft Learn","url":"https://learn.microsoft.com/en-us/azure/data-factory/concepts-pipeline-execution-triggers","text":"Example:\n```json\n{\n    \"name\": \"copyPipeline\",\n    \"properties\": {\n        \"activities\": [\n            {\n                \"type\": \"Copy\",\n                \"typeProperties\": {\n                    \"source\": {\n                        \"type\": \"BlobSource\"\n                    },\n                    \"sink\": {\n                        \"type\": \"BlobSink\"\n                    }\n                },\n                \"name\": \"CopyBlobtoBlob\",\n                \"inputs\": [\n                    {\n                        \"referenceName\": \"sourceBlobDataset\",\n                        \"type\": \"DatasetReference\"\n                    }\n                ],\n                \"outputs\": [\n                    {\n                        \"referenceName\": \"sinkBlobDataset\",\n                        \"type\": \"DatasetReference\"\n                    }\n                ]\n            }\n        ],\n        \"parameters\": {\n            \"sourceBlobContainer\": {\n                \"type\": \"String\"\n            },\n            \"sinkBlobContainer\": {\n                \"type\": \"String\"\n            }\n        }\n    }\n}\n```\n\nExample:\n```csharp\nclient.Pipelines.CreateRunWithHttpMessagesAsync(resourceGroup, dataFactoryName, pipelineName, parameters)\n```\n\nExample:\n```powershell\nInvoke-AzDataFactoryV2Pipeline -DataFactory $df -PipelineName \"Adfv2QuickStartPipeline\" -ParameterFile .\\PipelineParameters.json -ResourceGroupName \"myResourceGroup\"\n```\n\nExample:\n```json\n{\n  \"sourceBlobContainer\": \"MySourceFolder\",\n  \"sinkBlobContainer\": \"MySinkFolder\"\n}\n```\n\nExample:\n```json\n{\n  \"runId\": \"0448d45a-a0bd-23f3-90a5-bfeea9264aed\"\n}\n```\n\nExample:\n```text\nPOST\nhttps://management.azure.com/subscriptions/mySubId/resourceGroups/myResourceGroup/providers/Microsoft.DataFactory/factories/myDataFactory/pipelines/copyPipeline/createRun?api-version=2017-03-01-preview\n```\n\nExample:\n```json\n{\n    \"properties\": {\n        \"name\": \"MyTrigger\",\n        \"type\": \"<type of trigger>\",\n        \"typeProperties\": {...},\n        \"pipelines\": [\n            {\n                \"pipelineReference\": {\n                    \"type\": \"PipelineReference\",\n                    \"referenceName\": \"<Name of your pipeline>\"\n                },\n                \"parameters\": {\n                    \"<parameter 1 Name>\": {\n                        \"type\": \"Expression\",\n                        \"value\": \"<parameter 1 Value>\"\n                    },\n                    \"<parameter 2 Name>\": \"<parameter 2 Value>\"\n                }\n            }\n        ]\n    }\n}\n```\n\nExample:\n```json\n{\n  \"properties\": {\n    \"type\": \"ScheduleTrigger\",\n    \"typeProperties\": {\n      \"recurrence\": {\n        \"frequency\": <<Minute, Hour, Day, Week>>,\n        \"interval\": <<int>>, // How often to fire\n        \"startTime\": <<datetime>>,\n        \"endTime\": <<datetime>>,\n        \"timeZone\": \"UTC\",\n        \"schedule\": { // Optional (advanced scheduling specifics)\n          \"hours\": [<<0-24>>],\n          \"weekDays\": [<<Monday-Sunday>>],\n          \"minutes\": [<<0-60>>],\n          \"monthDays\": [<<1-31>>],\n          \"monthlyOccurrences\": [\n            {\n              \"day\": <<Monday-Sunday>>,\n              \"occurrence\": <<1-5>>\n            }\n          ]\n        }\n      }\n    },\n  \"pipelines\": [\n    {\n      \"pipelineReference\": {\n        \"type\": \"PipelineReference\",\n        \"referenceName\": \"<Name of your pipeline>\"\n      },\n      \"parameters\": {\n        \"<parameter 1 Name>\": {\n          \"type\": \"Expression\",\n          \"value\": \"<parameter 1 Value>\"\n        },\n        \"<parameter 2 Name>\": \"<parameter 2 Value>\"\n      }\n    }\n  ]}\n}\n```\n\nExample:\n```json\n{\n  \"properties\": {\n    \"name\": \"MyTrigger\",\n    \"type\": \"ScheduleTrigger\",\n    \"typeProperties\": {\n      \"recurrence\": {\n        \"frequency\": \"Hour\",\n        \"interval\": 1,\n        \"startTime\": \"2017-11-01T09:00:00-08:00\",\n        \"endTime\": \"2017-11-02T22:00:00-08:00\"\n      }\n    },\n    \"pipelines\": [{\n        \"pipelineReference\": {\n          \"type\": \"PipelineReference\",\n          \"referenceName\": \"SQLServerToBlobPipeline\"\n        },\n        \"parameters\": {}\n      },\n      {\n        \"pipelineReference\": {\n          \"type\": \"PipelineReference\",\n          \"referenceName\": \"SQLServerToAzureSQLPipeline\"\n        },\n        \"parameters\": {}\n      }\n    ]\n  }\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:50.643Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":9,"totalLines":178,"estimatedTokens":1058}}278{"id":"doc-tutorial_deploy_and_configure_azure_firewall_and-f6f91c7e","source":"documentation","title":"Tutorial: Deploy and configure Azure Firewall and policy in a hybrid network by using the Azure portal | Microsoft Learn","url":"https://learn.microsoft.com/en-us/azure/firewall/tutorial-hybrid-portal-policy","text":"Example:\n```azurecli\naz vm run-command invoke \\\n   --resource-group FW-Hybrid-Test \\\n   --name VM-Spoke-01 \\\n   --command-id RunShellScript \\\n   --scripts \"sudo apt-get update && sudo apt-get install -y nginx && echo '<h1>'$(hostname)'</h1>' | sudo tee /var/www/html/index.html\"\n```\n\nExample:\n```bash\ncurl http://<VM-spoke-01 private IP>\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:50.786Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":2,"totalLines":15,"estimatedTokens":89}}279{"id":"doc-what_is_azure_devops_azure_devops_microsoft_lear-a8773c86","source":"documentation","title":"What is Azure DevOps? - Azure DevOps | Microsoft Learn","url":"https://learn.microsoft.com/en-us/azure/devops/user-guide/what-is-azure-devops?view=azure-devops&toc=/azure/devops/get-started/toc.json","text":"Example:\n```text\n┌─────────────────┐    ┌──────────────────┐    ┌─────────────────┐\n│   Azure Boards  │    │   Azure Repos    │    │ Azure Pipelines │\n│                 │    │                  │    │                 │\n│ • Plan features │────│ • Store code     │────│ • Build apps    │\n│ • Track bugs    │    │ • Code reviews   │    │ • Run tests     │\n│ • Manage sprints│    │ • Branch policies│    │ • Deploy code   │\n└─────────────────┘    └──────────────────┘    └─────────────────┘\n         │                       │                       │\n         │                       │                       │\n         ▼                       ▼                       ▼\n┌─────────────────┐    ┌──────────────────┐    ┌─────────────────┐\n│ Azure Test Plans│    │ Azure Artifacts  │    │   Dashboards    │\n│                 │    │                  │    │                 │\n│ • Test planning │    │ • Package feeds  │    │ • Project views │\n│ • Manual testing│◄───│ • Version control│───►│ • Team metrics  │\n│ • Test reporting│    │ • Dependency mgmt│    │ • Build status  │\n└─────────────────┘    └──────────────────┘    └─────────────────┘\n\nFlow: Plan → Code → Build → Test → Deploy → Monitor → Repeat\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:50.824Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":1,"totalLines":24,"estimatedTokens":303}}280{"id":"doc-create_an_azure_iot_hub_azure_iot_hub_microsoft_-b864d1b6","source":"documentation","title":"Create an Azure IoT Hub - Azure IoT Hub | Microsoft Learn","url":"https://learn.microsoft.com/en-us/azure/iot-hub/create-hub","text":"Example:\n```azurecli\naz group create --name <RESOURCE_GROUP_NAME> --location <REGION>\n```\n\nExample:\n```azurepowershell\nNew-AzResourceGroup -Name <RESOURCE_GROUP_NAME> -Location \"<REGION>\"\n```\n\nExample:\n```azurecli\naz iot hub create --name <NEW_NAME_FOR_YOUR_IOT_HUB> --resource-group <RESOURCE_GROUP_NAME> --sku S1\n```\n\nExample:\n```azurepowershell\nNew-AzIotHub `\n    -ResourceGroupName <RESOURCE_GROUP_NAME> `\n    -Name <NEW_NAME_FOR_YOUR_IOT_HUB> `\n    -SkuName S1 -Units 1 `\n    -Location \"<REGION>\"\n```\n\nExample:\n```azurecli\naz iot hub connection-string show --hub-name <YOUR_IOT_HUB_NAME> --policy-name service\n```\n\nExample:\n```text\n\"HostName=<IOT_HUB_NAME>.azure-devices.net;SharedAccessKeyName=service;SharedAccessKey=<SHARED_ACCESS_KEY>\"\n```\n\nExample:\n```azurepowershell\nGet-AzIotHubConnectionString -ResourceGroupName \"<YOUR_RESOURCE_GROUP>\" -Name \"<YOUR_IOT_HUB_NAME>\" -KeyName \"service\"\n```\n\nExample:\n```azurecli\naz iot hub delete --name <IOT_HUB_NAME> --resource-group <RESOURCE_GROUP_NAME>\n```\n\nExample:\n```azurepowershell\nRemove-AzIotHub `\n    -ResourceGroupName MyIoTRG1 `\n    -Name MyTestIoTHub\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:50.850Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":9,"totalLines":52,"estimatedTokens":282}}281{"id":"doc-troubleshoot_azure_devops_connection_and_access_-221dcd37","source":"documentation","title":"Troubleshoot Azure DevOps connection and access issues - Azure DevOps | Microsoft Learn","url":"https://learn.microsoft.com/en-us/azure/devops/user-guide/troubleshoot-connection?view=azure-devops","text":"Example:\n```copilot-prompt\nI'm getting this Azure DevOps connection/authentication error: [PASTE YOUR ERROR MESSAGE HERE]\n\nCan you help me troubleshoot this issue? Please provide step-by-step instructions to:\n1. Identify the root cause of the connection problem\n2. Fix the authentication or access issue\n3. Verify I can successfully connect to my Azure DevOps project\n\nContext: This is for connecting to an Azure DevOps organization and project. I've already tried basic troubleshooting like clearing browser cache and using a private browser session.\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:50.895Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":1,"totalLines":13,"estimatedTokens":143}}282{"id":"doc-request_real_time_and_forecasted_weather_data_us-e2134178","source":"documentation","title":"Request real-time and forecasted weather data using Azure Maps Weather service - Microsoft Azure Maps | Microsoft Learn","url":"https://learn.microsoft.com/en-us/azure/azure-maps/how-to-request-weather-data","text":"Example:\n```http\nhttps://atlas.microsoft.com/weather/currentConditions/json?api-version=1.0&query=47.60357,-122.32945&subscription-key={Your-Azure-Maps-Subscription-key}\n```\n\nExample:\n```json\n{\n  \"results\": [\n    {\n      \"dateTime\": \"2024-08-08T09:22:00-07:00\",\n      \"phrase\": \"Sunny\",\n      \"iconCode\": 1,\n      \"hasPrecipitation\": false,\n      \"isDayTime\": true,\n      \"temperature\": {\n        \"value\": 19.5,\n        \"unit\": \"C\",\n        \"unitType\": 17\n      },\n      \"realFeelTemperature\": {\n        \"value\": 23.7,\n        \"unit\": \"C\",\n        \"unitType\": 17\n      },\n      \"realFeelTemperatureShade\": {\n        \"value\": 19.4,\n        \"unit\": \"C\",\n        \"unitType\": 17\n      },\n      \"relativeHumidity\": 81,\n      \"dewPoint\": {\n        \"value\": 16.2,\n        \"unit\": \"C\",\n        \"unitType\": 17\n      },\n      \"wind\": {\n        \"direction\": {\n          \"degrees\": 0,\n          \"localizedDescription\": \"N\"\n        },\n        \"speed\": {\n          \"value\": 2,\n          \"unit\": \"km/h\",\n          \"unitType\": 7\n        }\n      },\n      \"windGust\": {\n        \"speed\": {\n          \"value\": 3.8,\n          \"unit\": \"km/h\",\n          \"unitType\": 7\n        }\n      },\n      \"uvIndex\": 4,\n      \"uvIndexPhrase\": \"Moderate\",\n      \"visibility\": {\n        \"value\": 16.1,\n        \"unit\": \"km\",\n        \"unitType\": 6\n      },\n      \"obstructionsToVisibility\": \"\",\n      \"cloudCover\": 5,\n      \"ceiling\": {\n        \"value\": 12192,\n        \"unit\": \"m\",\n        \"unitType\": 5\n      },\n      \"pressure\": {\n        \"value\": 1015.9,\n        \"unit\": \"mb\",\n        \"unitType\": 14\n      },\n      \"pressureTendency\": {\n        \"localizedDescription\": \"Steady\",\n        \"code\": \"S\"\n      },\n      \"past24HourTemperatureDeparture\": {\n        \"value\": 3,\n        \"unit\": \"C\",\n        \"unitType\": 17\n      },\n      \"apparentTemperature\": {\n        \"value\": 20,\n        \"unit\": \"C\",\n        \"unitType\": 17\n      },\n      \"windChillTemperature\": {\n        \"value\": 19.4,\n        \"unit\": \"C\",\n        \"unitType\": 17\n      },\n      \"wetBulbTemperature\": {\n        \"value\": 17.5,\n        \"unit\": \"C\",\n        \"unitType\": 17\n      },\n      \"precipitationSummary\": {\n        \"pastHour\": {\n          \"value\": 0,\n          \"unit\": \"mm\",\n          \"unitType\": 3\n        },\n        \"past3Hours\": {\n          \"value\": 0,\n          \"unit\": \"mm\",\n          \"unitType\": 3\n        },\n        \"past6Hours\": {\n          \"value\": 0,\n          \"unit\": \"mm\",\n          \"unitType\": 3\n        },\n        \"past9Hours\": {\n          \"value\": 0,\n          \"unit\": \"mm\",\n          \"unitType\": 3\n        },\n        \"past12Hours\": {\n          \"value\": 0,\n          \"unit\": \"mm\",\n          \"unitType\": 3\n        },\n        \"past18Hours\": {\n          \"value\": 0,\n          \"unit\": \"mm\",\n          \"unitType\": 3\n        },\n        \"past24Hours\": {\n          \"value\": 0,\n          \"unit\": \"mm\",\n          \"unitType\": 3\n        }\n      },\n      \"temperatureSummary\": {\n        \"past6Hours\": {\n          \"minimum\": {\n            \"value\": 16,\n            \"unit\": \"C\",\n            \"unitType\": 17\n          },\n          \"maximum\": {\n            \"value\": 19.5,\n            \"unit\": \"C\",\n            \"unitType\": 17\n          }\n        },\n        \"past12Hours\": {\n          \"minimum\": {\n            \"value\": 16,\n            \"unit\": \"C\",\n            \"unitType\": 17\n          },\n          \"maximum\": {\n            \"value\": 20.4,\n            \"unit\": \"C\",\n            \"unitType\": 17\n          }\n        },\n        \"past24Hours\": {\n          \"minimum\": {\n            \"value\": 16,\n            \"unit\": \"C\",\n            \"unitType\": 17\n          },\n          \"maximum\": {\n            \"value\": 26.4,\n            \"unit\": \"C\",\n            \"unitType\": 17\n          }\n        }\n      }\n    }\n  ]\n}\n```\n\nExample:\n```http\nhttps://atlas.microsoft.com/weather/severe/alerts/json?api-version=1.0&query=41.161079,-104.805450&subscription-key={Your-Azure-Maps-Subscription-key}\n```\n\nExample:\n```json\n{\n\"results\": [\n    {\n        \"countryCode\": \"US\",\n        \"alertId\": 2194734,\n        \"description\": {\n            \"localized\": \"Red Flag Warning\",\n            \"english\": \"Red Flag Warning\"\n        },\n        \"category\": \"FIRE\",\n        \"priority\": 54,\n        \"source\": \"U.S. National Weather Service\",\n        \"sourceId\": 2,\n        \"alertAreas\": [\n            {\n                \"name\": \"Platte/Goshen/Central and Eastern Laramie\",\n                \"summary\": \"Red Flag Warning in effect until 7:00 PM MDT. Source: U.S. National Weather Service\",\n                \"startTime\": \"2020-10-05T15:00:00+00:00\",\n                \"endTime\": \"2020-10-06T01:00:00+00:00\",\n                \"latestStatus\": {\n                    \"localized\": \"Continue\",\n                    \"english\": \"Continue\"\n                },\n                \"alertDetails\": \"...RED FLAG WARNING REMAINS IN EFFECT FROM 9 AM THIS MORNING TO\\n7 PM MDT THIS EVENING FOR STRONG GUSTY WINDS AND LOW HUMIDITY...\\n\\n* WHERE...Fire weather zones 303, 304, 305, 306, 307, 308, 309,\\n  and 310 in southeast Wyoming. Fire weather zone 313 in Nebraska.\\n\\n* WIND...West to northwest 15 to 30 MPH with gusts around 40 MPH.\\n\\n* HUMIDITY...10 to 15 percent.\\n\\n* IMPACTS...Any fires that develop will likely spread rapidly.\\n  Outdoor burning is not recommended.\\n\\nPRECAUTIONARY/PREPAREDNESS ACTIONS...\\n\\nA Red Flag Warning means that critical fire weather conditions\\nare either occurring now...or will shortly. A combination of\\nstrong winds...low relative humidity...and warm temperatures can\\ncontribute to extreme fire behavior.\\n\\n&&\",\n                \"alertDetailsLanguageCode\": \"en\"\n            }\n        ]\n        },...\n    ]\n}\n```\n\nExample:\n```http\nhttps://atlas.microsoft.com/weather/forecast/daily/json?api-version=1.0&query=47.60357,-122.32945&duration=5&subscription-key={Your-Azure-Maps-Subscription-key}\n```\n\nExample:\n```json\n{\n  \"summary\": {\n    \"startDate\": \"2024-08-09T08:00:00-07:00\",\n    \"endDate\": \"2024-08-09T20:00:00-07:00\",\n    \"severity\": 7,\n    \"phrase\": \"Very warm tomorrow\",\n    \"category\": \"heat\"\n  },\n  \"forecasts\": [\n    {\n      \"date\": \"2024-08-08T07:00:00-07:00\",\n      \"temperature\": {\n        \"minimum\": {\n          \"value\": 16.2,\n          \"unit\": \"C\",\n          \"unitType\": 17\n        },\n        \"maximum\": {\n          \"value\": 28.9,\n          \"unit\": \"C\",\n          \"unitType\": 17\n        }\n      },\n      \"realFeelTemperature\": {\n        \"minimum\": {\n          \"value\": 16.3,\n          \"unit\": \"C\",\n          \"unitType\": 17\n        },\n        \"maximum\": {\n          \"value\": 29.8,\n          \"unit\": \"C\",\n          \"unitType\": 17\n        }\n      },\n      \"realFeelTemperatureShade\": {\n        \"minimum\": {\n          \"value\": 16.3,\n          \"unit\": \"C\",\n          \"unitType\": 17\n        },\n        \"maximum\": {\n          \"value\": 27.3,\n          \"unit\": \"C\",\n          \"unitType\": 17\n        }\n      },\n      \"hoursOfSun\": 12.9,\n      \"degreeDaySummary\": {\n        \"heating\": {\n          \"value\": 0,\n          \"unit\": \"C\",\n          \"unitType\": 17\n        },\n        \"cooling\": {\n          \"value\": 5,\n          \"unit\": \"C\",\n          \"unitType\": 17\n        }\n      },\n      \"airAndPollen\": [\n        {\n          \"name\": \"AirQuality\",\n          \"value\": 56,\n          \"category\": \"Moderate\",\n          \"categoryValue\": 2,\n          \"type\": \"Nitrogen Dioxide\"\n        },\n        {\n          \"name\": \"Grass\",\n          \"value\": 2,\n          \"category\": \"Low\",\n          \"categoryValue\": 1\n        },\n        {\n          \"name\": \"Mold\",\n          \"value\": 0,\n          \"category\": \"Low\",\n          \"categoryValue\": 1\n        },\n        {\n          \"name\": \"Ragweed\",\n          \"value\": 5,\n          \"category\": \"Low\",\n          \"categoryValue\": 1\n        },\n        {\n          \"name\": \"Tree\",\n          \"value\": 0,\n          \"category\": \"Low\",\n          \"categoryValue\": 1\n        },\n        {\n          \"name\": \"UVIndex\",\n          \"value\": 7,\n          \"category\": \"High\",\n          \"categoryValue\": 3\n        }\n      ],\n      \"day\": {\n        \"iconCode\": 2,\n        \"iconPhrase\": \"Mostly sunny\",\n        \"hasPrecipitation\": false,\n        \"shortPhrase\": \"Mostly sunny\",\n        \"longPhrase\": \"Mostly sunny; wildfire smoke will cause the sky to be hazy\",\n        \"precipitationProbability\": 0,\n        \"thunderstormProbability\": 0,\n        \"rainProbability\": 0,\n        \"snowProbability\": 0,\n        \"iceProbability\": 0,\n        \"wind\": {\n          \"direction\": {\n            \"degrees\": 357,\n            \"localizedDescription\": \"N\"\n          },\n          \"speed\": {\n            \"value\": 11.1,\n            \"unit\": \"km/h\",\n            \"unitType\": 7\n          }\n        },\n        \"windGust\": {\n          \"direction\": {\n            \"degrees\": 354,\n            \"localizedDescription\": \"N\"\n          },\n          \"speed\": {\n            \"value\": 29.6,\n            \"unit\": \"km/h\",\n            \"unitType\": 7\n          }\n        },\n        \"totalLiquid\": {\n          \"value\": 0,\n          \"unit\": \"mm\",\n          \"unitType\": 3\n        },\n        \"rain\": {\n          \"value\": 0,\n          \"unit\": \"mm\",\n          \"unitType\": 3\n        },\n        \"snow\": {\n          \"value\": 0,\n          \"unit\": \"cm\",\n          \"unitType\": 4\n        },\n        \"ice\": {\n          \"value\": 0,\n          \"unit\": \"mm\",\n          \"unitType\": 3\n        },\n        \"hoursOfPrecipitation\": 0,\n        \"hoursOfRain\": 0,\n        \"hoursOfSnow\": 0,\n        \"hoursOfIce\": 0,\n        \"cloudCover\": 10\n      },\n      \"night\": {\n        \"iconCode\": 35,\n        \"iconPhrase\": \"Partly cloudy\",\n        \"hasPrecipitation\": false,\n        \"shortPhrase\": \"Partly cloudy\",\n        \"longPhrase\": \"Partly cloudy; wildfire smoke will cause the sky to be hazy\",\n        \"precipitationProbability\": 1,\n        \"thunderstormProbability\": 0,\n        \"rainProbability\": 1,\n        \"snowProbability\": 0,\n        \"iceProbability\": 0,\n        \"wind\": {\n          \"direction\": {\n            \"degrees\": 7,\n            \"localizedDescription\": \"N\"\n          },\n          \"speed\": {\n            \"value\": 9.3,\n            \"unit\": \"km/h\",\n            \"unitType\": 7\n          }\n        },\n        \"windGust\": {\n          \"direction\": {\n            \"degrees\": 3,\n            \"localizedDescription\": \"N\"\n          },\n          \"speed\": {\n            \"value\": 20.4,\n            \"unit\": \"km/h\",\n            \"unitType\": 7\n          }\n        },\n        \"totalLiquid\": {\n          \"value\": 0,\n          \"unit\": \"mm\",\n          \"unitType\": 3\n        },\n        \"rain\": {\n          \"value\": 0,\n          \"unit\": \"mm\",\n          \"unitType\": 3\n        },\n        \"snow\": {\n          \"value\": 0,\n          \"unit\": \"cm\",\n          \"unitType\": 4\n        },\n        \"ice\": {\n          \"value\": 0,\n          \"unit\": \"mm\",\n          \"unitType\": 3\n        },\n        \"hoursOfPrecipitation\": 0,\n        \"hoursOfRain\": 0,\n        \"hoursOfSnow\": 0,\n        \"hoursOfIce\": 0,\n        \"cloudCover\": 26\n      },\n      \"sources\": [\n        \"AccuWeather\"\n      ]\n    }\n  ]\n}\n```\n\nExample:\n```http\nhttps://atlas.microsoft.com/weather/forecast/hourly/json?api-version=1.0&query=47.60357,-122.32945&duration=12&subscription-key={Your-Azure-Maps-Subscription-key}\n```\n\nExample:\n```json\n{\n  \"forecasts\": [\n    {\n      \"date\": \"2024-08-07T15:00:00-07:00\",\n      \"iconCode\": 2,\n      \"iconPhrase\": \"Mostly sunny\",\n      \"hasPrecipitation\": false,\n      \"isDaylight\": true,\n      \"temperature\": {\n        \"value\": 24.6,\n        \"unit\": \"C\",\n        \"unitType\": 17\n      },\n      \"realFeelTemperature\": {\n        \"value\": 26.4,\n        \"unit\": \"C\",\n        \"unitType\": 17\n      },\n      \"wetBulbTemperature\": {\n        \"value\": 18.1,\n        \"unit\": \"C\",\n        \"unitType\": 17\n      },\n      \"dewPoint\": {\n        \"value\": 14.5,\n        \"unit\": \"C\",\n        \"unitType\": 17\n      },\n      \"wind\": {\n        \"direction\": {\n          \"degrees\": 340,\n          \"localizedDescription\": \"NNW\"\n        },\n        \"speed\": {\n          \"value\": 14.8,\n          \"unit\": \"km/h\",\n          \"unitType\": 7\n        }\n      },\n      \"windGust\": {\n        \"speed\": {\n          \"value\": 24.1,\n          \"unit\": \"km/h\",\n          \"unitType\": 7\n        }\n      },\n      \"relativeHumidity\": 53,\n      \"visibility\": {\n        \"value\": 16.1,\n        \"unit\": \"km\",\n        \"unitType\": 6\n      },\n      \"cloudCover\": 11,\n      \"ceiling\": {\n        \"value\": 10211,\n        \"unit\": \"m\",\n        \"unitType\": 5\n      },\n      \"uvIndex\": 5,\n      \"uvIndexPhrase\": \"Moderate\",\n      \"precipitationProbability\": 0,\n      \"rainProbability\": 0,\n      \"snowProbability\": 0,\n      \"iceProbability\": 0,\n      \"totalLiquid\": {\n        \"value\": 0,\n        \"unit\": \"mm\",\n        \"unitType\": 3\n      },\n      \"rain\": {\n        \"value\": 0,\n        \"unit\": \"mm\",\n        \"unitType\": 3\n      },\n      \"snow\": {\n        \"value\": 0,\n        \"unit\": \"cm\",\n        \"unitType\": 4\n      },\n      \"ice\": {\n        \"value\": 0,\n        \"unit\": \"mm\",\n        \"unitType\": 3\n      }\n    }\n  ]\n}\n```\n\nExample:\n```http\nhttps://atlas.microsoft.com/weather/forecast/minute/json?api-version=1.0&query=47.60357,-122.32945&interval=15&subscription-key={Your-Azure-Maps-Subscription-key}\n```\n\nExample:\n```json\n{\n  \"summary\": {\n    \"briefPhrase60\": \"No precipitation for at least 60 min\",\n    \"shortPhrase\": \"No precip for 120 min\",\n    \"briefPhrase\": \"No precipitation for at least 120 min\",\n    \"longPhrase\": \"No precipitation for at least 120 min\",\n    \"iconCode\": 1\n  },\n  \"intervalSummaries\": [\n    {\n      \"startMinute\": 0,\n      \"endMinute\": 119,\n      \"totalMinutes\": 120,\n      \"shortPhrase\": \"No precip for %MINUTE_VALUE min\",\n      \"briefPhrase\": \"No precipitation for at least %MINUTE_VALUE min\",\n      \"longPhrase\": \"No precipitation for at least %MINUTE_VALUE min\",\n      \"iconCode\": 1\n    }\n  ],\n  \"intervals\": [\n    {\n      \"startTime\": \"2024-08-08T05:58:00-07:00\",\n      \"minute\": 0,\n      \"dbz\": 0,\n      \"shortPhrase\": \"No Precipitation\",\n      \"iconCode\": 1,\n      \"cloudCover\": 7\n    },\n    {\n      \"startTime\": \"2024-08-08T06:13:00-07:00\",\n      \"minute\": 15,\n      \"dbz\": 0,\n      \"shortPhrase\": \"No Precipitation\",\n      \"iconCode\": 1,\n      \"cloudCover\": 3\n    },\n    {\n      \"startTime\": \"2024-08-08T06:28:00-07:00\",\n      \"minute\": 30,\n      \"dbz\": 0,\n      \"shortPhrase\": \"No Precipitation\",\n      \"iconCode\": 1,\n      \"cloudCover\": 2\n    },\n    {\n      \"startTime\": \"2024-08-08T06:43:00-07:00\",\n      \"minute\": 45,\n      \"dbz\": 0,\n      \"shortPhrase\": \"No Precipitation\",\n      \"iconCode\": 1,\n      \"cloudCover\": 2\n    },\n    {\n      \"startTime\": \"2024-08-08T06:58:00-07:00\",\n      \"minute\": 60,\n      \"dbz\": 0,\n      \"shortPhrase\": \"No Precipitation\",\n      \"iconCode\": 1,\n      \"cloudCover\": 1\n    },\n    {\n      \"startTime\": \"2024-08-08T07:13:00-07:00\",\n      \"minute\": 75,\n      \"dbz\": 0,\n      \"shortPhrase\": \"No Precipitation\",\n      \"iconCode\": 1,\n      \"cloudCover\": 1\n    },\n    {\n      \"startTime\": \"2024-08-08T07:28:00-07:00\",\n      \"minute\": 90,\n      \"dbz\": 0,\n      \"shortPhrase\": \"No Precipitation\",\n      \"iconCode\": 1,\n      \"cloudCover\": 0\n    },\n    {\n      \"startTime\": \"2024-08-08T07:43:00-07:00\",\n      \"minute\": 105,\n      \"dbz\": 0,\n      \"shortPhrase\": \"No Precipitation\",\n      \"iconCode\": 1,\n      \"cloudCover\": 0\n    }\n  ]\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:50.960Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":10,"totalLines":640,"estimatedTokens":3783}}283{"id":"doc-how_to_connect_to_a_lab_vm_azure_lab_services_mi-08e38c41","source":"documentation","title":"How to connect to a lab VM - Azure Lab Services | Microsoft Learn","url":"https://learn.microsoft.com/en-us/azure/lab-services/connect-virtual-machine","text":"Example:\n```bash\nssh -p 12345 student@ml-lab-00000000-0000-0000-0000-000000000000.eastus2.cloudapp.azure.com\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:51.005Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":1,"totalLines":6,"estimatedTokens":32}}284{"id":"doc-provision_vms_in_local_availability_zone_for_azu-1a2b5ec3","source":"documentation","title":"Provision VMs in local availability zone for Azure Local - Azure Local | Microsoft Learn","url":"https://learn.microsoft.com/en-us/azure/azure-local/concepts/rack-aware-cluster-provision-vm-local-availability-zone?view=azloc-2607","text":"Example:\n```azurecli\naz login --use-device-code\n```\n\nExample:\n```azurecli\naz account set --subscription <Subscription ID>\n```\n\nExample:\n```azurecli\n$vmName =\"local-vm\"  \n$subscription = “<Subscription ID>\"  \n$resource_group = \"local-rg\"  \n$customLocationName = \"local-cl\"  \n\n$customLocationID =\"/subscriptions/$subscription/resourceGroups/$resource_group/providers/Microsoft.ExtendedLocation/customLocations/$customLocationName\"  \n\n$location = \"eastus\"  \n$computerName = \"mycomputer\"  \n$userName = \"local-user\"  \n$password = \"<password for the VM>\"  \n$imageName =\"ws22server\"  \n$nicName =\"local-vnic\"   \n$storagePathName = \"local-sp\"   \n\n$storagePathId = \"/subscriptions/<Subscription ID>/resourceGroups/local-rg/providers/Microsoft.AzureStackHCI/storagecontainers/local-sp\"  \n\n$zone = \"local-zone\"\n```\n\nExample:\n```azurecli\naz stack-hci-vm create --name $vmName --resource-group $resource_group --admin-username $userName --admin-password $password --computer-name $computerName --image $imageName --location $location --authentication-type all --nics $nicName --custom-location $customLocationID --hardware-profile memory-mb=\"8192\" processors=\"4\" --storage-path-id $storagePathId --zone $zone\n```\n\nExample:\n```azurecli\n\"placementProfile\": {  \n  \"strictPlacementPolicy\": null,  \n  \"zone\": \"local-zone\"  \n},\n```\n\nExample:\n```azurecli\naz stack-hci-vm create --name $vmName --resource-group $resource_group --admin-username $userName --admin-password $password --computer-name $computerName --image $imageName --location $location --authentication-type all --nics $nicName --custom-location $customLocationID --hardware-profile memory-mb=\"8192\" processors=\"4\" --storage-path-id $storagePathId --zone $zone --strict-placement true\n```\n\nExample:\n```azurecli\n\"placementProfile\": {  \n  \"strictPlacementPolicy\": true,  \n  \"zone\": \"local-zone\"  \n},\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:51.324Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":7,"totalLines":59,"estimatedTokens":465}}285{"id":"doc-train_ml_models_azure_machine_learning_microsoft-a718455f","source":"documentation","title":"Train ML models - Azure Machine Learning | Microsoft Learn","url":"https://learn.microsoft.com/en-us/azure/machine-learning/how-to-train-model?view=azureml-api-2","text":"Example:\n```bash\ngit clone --depth 1 https://github.com/Azure/azureml-examples\ncd azureml-examples\n```\n\nExample:\n```python\n#import required libraries\nfrom azure.ai.ml import MLClient\nfrom azure.identity import DefaultAzureCredential\n\n#Enter details of your Azure Machine Learning workspace\nsubscription_id = '<SUBSCRIPTION_ID>'\nresource_group = '<RESOURCE_GROUP>'\nworkspace = '<AZUREML_WORKSPACE_NAME>'\n\n#connect to the workspace\nml_client = MLClient(DefaultAzureCredential(), subscription_id, resource_group, workspace)\n```\n\nExample:\n```python\nprint(ml_client.workspace_name)\n```\n\nExample:\n```azurecli\naz account set --subscription <subscription ID>\naz configure --defaults workspace=<Azure Machine Learning workspace name> group=<resource group>\n```\n\nExample:\n```azurecli\nTOKEN=$(az account get-access-token --query accessToken -o tsv)\n```\n\nExample:\n```bash\nAPI_VERSION=\"2025-09-01\"\n```\n\nExample:\n```azurecli\n# Get values for storage account\nresponse=$(curl --location --request GET \"https://management.azure.com/subscriptions/$SUBSCRIPTION_ID/resourceGroups/$RESOURCE_GROUP/providers/Microsoft.MachineLearningServices/workspaces/$WORKSPACE/datastores?api-version=$API_VERSION&isDefault=true\" \\\n--header \"Authorization: Bearer $TOKEN\")\nAZUREML_DEFAULT_DATASTORE=$(echo $response | jq -r '.value[0].name')\nAZUREML_DEFAULT_CONTAINER=$(echo $response | jq -r '.value[0].properties.containerName')\nexport AZURE_STORAGE_ACCOUNT=$(echo $response | jq -r '.value[0].properties.accountName')\n```\n\nExample:\n```python\nfrom azure.ai.ml.entities import AmlCompute\n\n# specify aml compute name.\ncpu_compute_target = \"cpu-cluster\"\n\ntry:\n    ml_client.compute.get(cpu_compute_target)\nexcept Exception:\n    print(\"Creating a new cpu compute target...\")\n    compute = AmlCompute(\n        name=cpu_compute_target, size=\"STANDARD_D2_V2\", min_instances=0, max_instances=4\n    )\n    ml_client.compute.begin_create_or_update(compute).result()\n```\n\nExample:\n```python\ncpu_cluster = ml_client.compute.get(\"cpu-cluster\")\nprint(f\"Compute '{cpu_cluster.name}' provisioning state: {cpu_cluster.provisioning_state}\")\n```\n\nExample:\n```azurecli\naz ml compute create -n cpu-cluster --type amlcompute --min-instances 0 --max-instances 4\n```\n\nExample:\n```bash\ncurl -X PUT \\\n  \"https://management.azure.com/subscriptions/$SUBSCRIPTION_ID/resourceGroups/$RESOURCE_GROUP/providers/Microsoft.MachineLearningServices/workspaces/$WORKSPACE/computes/$COMPUTE_NAME?api-version=$API_VERSION\" \\\n  -H \"Authorization:Bearer $TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"location\": \"'$LOCATION'\",\n    \"properties\": {\n        \"computeType\": \"AmlCompute\",\n        \"properties\": {\n            \"vmSize\": \"Standard_D2_V2\",\n            \"vmPriority\": \"Dedicated\",\n            \"scaleSettings\": {\n                \"maxNodeCount\": 4,\n                \"minNodeCount\": 0,\n                \"nodeIdleTimeBeforeScaleDown\": \"PT30M\"\n            }\n        }\n    }\n}'\n```\n\nExample:\n```python\nfrom azure.ai.ml import command, Input\n\n# define the command\ncommand_job = command(\n    code=\"./src\",\n    command=\"python main.py --iris-csv ${{inputs.iris_csv}} --learning-rate ${{inputs.learning_rate}} --boosting ${{inputs.boosting}}\",\n    environment=\"AzureML-lightgbm-3.2-ubuntu18.04-py37-cpu@latest\",\n    inputs={\n        \"iris_csv\": Input(\n            type=\"uri_file\",\n            path=\"https://azuremlexamples.blob.core.windows.net/datasets/iris.csv\",\n        ),\n        \"learning_rate\": 0.9,\n        \"boosting\": \"gbdt\",\n    },\n    compute=\"cpu-cluster\",\n)\n```\n\nExample:\n```python\n# submit the command\nreturned_job = ml_client.jobs.create_or_update(command_job)\n# get a URL for the status of the job\nreturned_job.studio_url\n```\n\nExample:\n```python\nprint(f\"Studio URL: {returned_job.studio_url}\")\n```\n\nExample:\n```yaml\n$schema: https://azuremlschemas.azureedge.net/latest/commandJob.schema.json\ncode: src\ncommand: >-\n  python main.py\n  --iris-csv ${{inputs.iris_csv}}\ninputs:\n  iris_csv:\n    type: uri_file\n    path: https://azuremlexamples.blob.core.windows.net/datasets/iris.csv\nenvironment: azureml:AzureML-lightgbm-3.3@latest\ncompute: azureml:cpu-cluster\ndisplay_name: lightgbm-iris-example\nexperiment_name: lightgbm-iris-example\ndescription: Train a LightGBM model on the Iris dataset.\n```\n\nExample:\n```azurecli\nrun_id=$(az ml job create -f jobs/single-step/lightgbm/iris/job.yml --query name -o tsv)\n```\n\nExample:\n```azurecli\naz ml job show -n $run_id --web\n```\n\nExample:\n```azurecli\naz storage blob upload-batch -d $AZUREML_DEFAULT_CONTAINER/testjob -s cli/jobs/single-step/lightgbm/iris/src/ --account-name $AZURE_STORAGE_ACCOUNT\n```\n\nExample:\n```bash\nDATA_VERSION=$RANDOM\ncurl --location --request PUT \"https://management.azure.com/subscriptions/$SUBSCRIPTION_ID/resourceGroups/$RESOURCE_GROUP/providers/Microsoft.MachineLearningServices/workspaces/$WORKSPACE/data/iris-data/versions/$DATA_VERSION?api-version=$API_VERSION\" \\\n--header \"Authorization: Bearer $TOKEN\" \\\n--header \"Content-Type: application/json\" \\\n--data-raw \"{\n        \\\"properties\\\": {\n        \\\"description\\\": \\\"Iris dataset\\\",\n        \\\"dataType\\\": \\\"uri_file\\\",\n        \\\"dataUri\\\": \\\"https://azuremlexamples.blob.core.windows.net/datasets/iris.csv\\\"\n    }\n}\"\n```\n\nExample:\n```bash\nTRAIN_CODE=$(curl --location --request PUT \"https://management.azure.com/subscriptions/$SUBSCRIPTION_ID/resourceGroups/$RESOURCE_GROUP/providers/Microsoft.MachineLearningServices/workspaces/$WORKSPACE/codes/train-lightgbm/versions/1?api-version=$API_VERSION\" \\\n--header \"Authorization: Bearer $TOKEN\" \\\n--header \"Content-Type: application/json\" \\\n--data-raw \"{\n        \\\"properties\\\": {\n        \\\"description\\\": \\\"Train code\\\",\n        \\\"codeUri\\\": \\\"https://$AZURE_STORAGE_ACCOUNT.blob.core.windows.net/$AZUREML_DEFAULT_CONTAINER/testjob\\\"\n    }\n}\" | jq -r '.id')\n```\n\nExample:\n```bash\nENVIRONMENT_NAME=\"AzureML-lightgbm-3.3\"\nENVIRONMENT=$(curl --location --request GET \"https://management.azure.com/subscriptions/$SUBSCRIPTION_ID/resourceGroups/$RESOURCE_GROUP/providers/Microsoft.MachineLearningServices/workspaces/$WORKSPACE/environments/$ENVIRONMENT_NAME/versions?api-version=$API_VERSION\" \\\n    --header \"Authorization: Bearer $TOKEN\" | jq -r '.value | sort_by(.systemData.lastModifiedAt) | last | .id')\n```\n\nExample:\n```bash\nrun_id=$(uuidgen)\ncurl --location --request PUT \"https://management.azure.com/subscriptions/$SUBSCRIPTION_ID/resourceGroups/$RESOURCE_GROUP/providers/Microsoft.MachineLearningServices/workspaces/$WORKSPACE/jobs/$run_id?api-version=$API_VERSION\" \\\n--header \"Authorization: Bearer $TOKEN\" \\\n--header \"Content-Type: application/json\" \\\n--data-raw \"{\n    \\\"properties\\\": {\n        \\\"jobType\\\": \\\"Command\\\",\n        \\\"codeId\\\": \\\"$TRAIN_CODE\\\",\n        \\\"command\\\": \\\"python main.py --iris-csv \\$AZURE_ML_INPUT_iris\\\",\n        \\\"environmentId\\\": \\\"$ENVIRONMENT\\\",\n        \\\"inputs\\\": {\n            \\\"iris\\\": {\n                \\\"jobInputType\\\": \\\"uri_file\\\",\n                \\\"uri\\\": \\\"https://azuremlexamples.blob.core.windows.net/datasets/iris.csv\\\"\n            }\n        },\n        \\\"experimentName\\\": \\\"lightgbm-iris\\\",\n        \\\"computeId\\\": \\\"/subscriptions/$SUBSCRIPTION_ID/resourceGroups/$RESOURCE_GROUP/providers/Microsoft.MachineLearningServices/workspaces/$WORKSPACE/computes/$COMPUTE_NAME\\\"\n    }\n}\"\n```\n\nExample:\n```python\nml_client.jobs.stream(returned_job.name)\n```\n\nExample:\n```python\nreturned_job = ml_client.jobs.get(returned_job.name)\nprint(f\"Job status: {returned_job.status}\")\n```\n\nExample:\n```azurecli\naz ml job show -n $run_id --query status -o tsv\n```\n\nExample:\n```azurecli\naz ml job stream -n $run_id\n```\n\nExample:\n```bash\ncurl --location --request GET \"https://management.azure.com/subscriptions/$SUBSCRIPTION_ID/resourceGroups/$RESOURCE_GROUP/providers/Microsoft.MachineLearningServices/workspaces/$WORKSPACE/jobs/$run_id?api-version=$API_VERSION\" \\\n--header \"Authorization: Bearer $TOKEN\" | jq -r '.properties.status'\n```\n\nExample:\n```python\nfrom azure.ai.ml.entities import Model\nfrom azure.ai.ml.constants import AssetTypes\n\nrun_model = Model(\n    path=\"azureml://jobs/{}/outputs/artifacts/paths/model/\".format(returned_job.name),\n    name=\"run-model-example\",\n    description=\"Model created from run.\",\n    type=AssetTypes.MLFLOW_MODEL\n)\n\nml_client.models.create_or_update(run_model)\n```\n\nExample:\n```python\nregistered_model = ml_client.models.get(\"run-model-example\", version=\"1\")\nprint(f\"Model '{registered_model.name}' version {registered_model.version} registered successfully.\")\n```\n\nExample:\n```azurecli\naz ml model create -n sklearn-iris-example -v 1 -p runs:/$run_id/model --type mlflow_model\n```\n\nExample:\n```bash\ncurl --location --request PUT \"https://management.azure.com/subscriptions/$SUBSCRIPTION_ID/resourceGroups/$RESOURCE_GROUP/providers/Microsoft.MachineLearningServices/workspaces/$WORKSPACE/models/sklearn/versions/1?api-version=$API_VERSION\" \\\n--header \"Authorization: Bearer $TOKEN\" \\\n--header \"Content-Type: application/json\" \\\n--data-raw \"{\n    \\\"properties\\\": {\n        \\\"modelType\\\": \\\"mlflow_model\\\",\n        \\\"modelUri\\\":\\\"runs:/$run_id/model\\\"\n    }\n}\"\n```\n\nExample:\n```python\nml_client.compute.begin_delete(\"cpu-cluster\").wait()\n```\n\nExample:\n```azurecli\naz ml compute delete -n cpu-cluster --yes\n```\n\nExample:\n```bash\ncurl --location --request DELETE \"https://management.azure.com/subscriptions/$SUBSCRIPTION_ID/resourceGroups/$RESOURCE_GROUP/providers/Microsoft.MachineLearningServices/workspaces/$WORKSPACE/computes/$COMPUTE_NAME?api-version=$API_VERSION\" \\\n--header \"Authorization: Bearer $TOKEN\"\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:51.341Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":34,"totalLines":312,"estimatedTokens":2378}}286{"id":"doc-design_azure_policy_as_code_workflows_azure_poli-00f1c479","source":"documentation","title":"Design Azure Policy as Code workflows - Azure Policy | Microsoft Learn","url":"https://learn.microsoft.com/en-us/azure/governance/policy/concepts/policy-as-code","text":"Example:\n```text\n.\n|\n|- policies/  ________________________ # Root folder for policy resources\n|  |- policy1/  ______________________ # Subfolder for a policy\n|     |- versions_____________________ # Subfolder for versions of definition\n|       |- policy-v#.json _________________ # Policy definition\n|       |- policy-v#.parameters.json ______ # Policy definition of parameters\n|       |- policy-v#.rules.json ___________ # Policy rule\n|     |- assign.<name1>.json _________ # Assignment 1 for this policy definition\n|     |- assign.<name2>.json _________ # Assignment 2 for this policy definition\n|     |- exemptions.<name1>/__________ # Subfolder for exemptions on assignment 1\n        | - exemptionName.json________ # Exemption for this particular assignment\n      |- exemptions.<name2>/__________ # Subfolder for exemptions on assignment 2\n        | - exemptionName.json________ # Exemption for this particular assignment\n|\n|  |- policy2/  ______________________ # Subfolder for a policy\n|     |- versions_____________________ # Subfolder for versions of definition\n|       |- policy-v#.json _________________ # Policy definition\n|       |- policy-v#.parameters.json ______ # Policy definition of parameters\n|       |- policy-v#.rules.json ___________ # Policy rule\n|     |- assign.<name1>.json _________ # Assignment 1 for this policy definition\n|     |- exemptions.<name1>/__________ # Subfolder for exemptions on assignment 1\n        | - exemptionName.json________ # Exemption for this particular assignment\n|\n```\n\nExample:\n```text\n.\n|\n|- initiatives/ ______________________ # Root folder for initiatives\n|  |- init1/ _________________________ # Subfolder for an initiative\n|     |- versions ____________________ # Subfolder for versions of initiative\n|       |- policyset.json ______________ # Initiative definition\n|       |- policyset.definitions.json __ # Initiative list of policies\n|       |- policyset.parameters.json ___ # Initiative definition of parameters\n|     |- assign.<name1>.json _________ # Assignment 1 for this policy initiative\n|     |- assign.<name2>.json _________ # Assignment 2 for this policy initiative\n|     |- exemptions.<name1>/__________ # Subfolder for exemptions on assignment 1\n        | - exemptionName.json________ # Exemption for this particular assignment\n      |- exemptions.<name2>/__________ # Subfolder for exemptions on assignment 2\n        | - exemptionName.json________ # Exemption for this particular assignment\n|\n|  |- init2/ _________________________ # Subfolder for an initiative\n|     |- versions ____________________ # Subfolder for versions of initiative\n|       |- policyset.json ______________ # Initiative definition\n|       |- policyset.definitions.json __ # Initiative list of policies\n|       |- policyset.parameters.json ___ # Initiative definition of parameters\n|     |- assign.<name1>.json _________ # Assignment 1 for this policy initiative\n|     |- exemptions.<name1>/__________ # Subfolder for exemptions on assignment 1\n        | - exemptionName.json________ # Exemption for this particular assignment\n|\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:51.366Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":2,"totalLines":57,"estimatedTokens":774}}287{"id":"doc-release_notes_for_azure_operator_service_manager-725aa276","source":"documentation","title":"Release notes for Azure Operator Service Manager | Microsoft Learn","url":"https://learn.microsoft.com/en-us/azure/operator-service-manager/release-notes","text":"Example:\n```text\nkubectl delete crd certificaterequests.cert-manager.io\nkubectl delete crd certificates.cert-manager.io\nkubectl delete crd challenges.acme.cert-manager.io\nkubectl delete crd clusterissuers.cert-manager.io\nkubectl delete crd issuers.cert-manager.io\nkubectl delete crd orders.acme.cert-manager.io\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:51.416Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":1,"totalLines":11,"estimatedTokens":82}}288{"id":"doc-about_the_azure_operator_service_manager_cli_ext-4fca2af7","source":"documentation","title":"About the Azure Operator Service Manager CLI extension | Microsoft Learn","url":"https://learn.microsoft.com/en-us/azure/operator-service-manager/concepts-about-azure-operator-service-manager-cli","text":"Example:\n```powershell\naz extension install --name aosm --allow-preview true\n```\n\nExample:\n```powershell\naz extension update --name aosm --allow-preview true\n```\n\nExample:\n```powershell\naz --version\n```\n\nExample:\n```powershell\n----------------------------------------\n...\naosm                             2.0.0b3\n...\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:51.421Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":4,"totalLines":24,"estimatedTokens":84}}289{"id":"doc-basic_concepts_for_azure_operator_service_manage-10a07740","source":"documentation","title":"Basic Concepts for Azure Operator Service Manager | Microsoft Learn","url":"https://learn.microsoft.com/en-us/azure/operator-service-manager/best-practices-onboard-deploy","text":"Example:\n```text\n<pre>\n\"roleOverrideValues\": [\n    \"{\\\"name\\\":\\\"<b>NF_component_name></b>\\\",\\\"deployParametersMappingRuleProfile\\\":{\\\"helmMappingRuleProfile\\\":{\\\"options\\\":{\\\"installOptions\\\":{\\\"atomic\\\":\\\"false\\\",\\\"wait\\\":\\\"true\\\",\\\"timeout\\\":\\\"100\\\"},\\\"upgradeOptions\\\":{\\\"atomic\\\":\\\"true\\\",\\\"wait\\\":\\\"true\\\",\\\"timeout\\\":\\\"4\\\"}}}}}\"\n]\n</pre>\n```\n\nExample:\n```text\n<pre>\n     networkFunctionTemplate: {\n      nfviType: 'AzureArcKubernetes'\n      networkFunctionApplications: [\n        {\n          artifactType: 'HelmPackage'\n          <b>name: 'fed-crds'</b>\n          dependsOnProfile: null\n          artifactProfile: {\n            artifactStore: {\n              id: acrArtifactStore.id\n            }\n</pre>\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:51.424Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":2,"totalLines":27,"estimatedTokens":182}}290{"id":"doc-build_test_and_deploy_android_apps_azure_pipelin-d5a618ed","source":"documentation","title":"Build, test, and deploy Android apps - Azure Pipelines | Microsoft Learn","url":"https://learn.microsoft.com/en-us/azure/devops/pipelines/ecosystems/android?view=azure-devops","text":"Example:\n```yaml\n- task: Gradle@3\n  inputs:\n    workingDirectory: ''\n    gradleWrapperFile: 'gradlew'\n    gradleOptions: '-Xmx3072m'\n    publishJUnitResults: false\n    testResultsFiles: '**/TEST-*.xml'\n    tasks: 'assembleDebug'\n```\n\nExample:\n```yaml\n- task: AndroidSigning@3\n  inputs:\n    apkFiles: '**/*.apk' # Specify the APK files to sign\n    apksignerKeystoreFile: 'pathToYourKeystoreFile' # Path to the keystore file\n    apksignerKeystorePassword: '$(apksignerKeystorePassword)' # Use a secret variable for security\n    apksignerKeystoreAlias: 'yourKeystoreAlias' # Alias for the keystore\n    apksignerKeyPassword: '$(apksignerKeyPassword)' # Use a secret variable for security\n    apksignerVersion: 'latest' # Use the latest version of apksigner\n    apksignerArguments: '--verbose' # Optional: Additional arguments for apksigner\n    zipalign: true # Enable zipalign to optimize APK\n    zipalignVersion: 'latest' # Use the latest version of zipalign\n```\n\nExample:\n```yaml\n- task: Bash@3\n  inputs:\n    targetType: 'inline'\n    script: |\n      #!/usr/bin/env bash\n\n      # Install AVD files\n      echo \"y\" | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --install 'system-images;android-35;google_apis;x86_64'\n\n      # Create emulator\n      echo \"y\" | $ANDROID_HOME/cmdline-tools/latest/bin/avdmanager create avd -n xamarin_android_emulator -d \"Nexus 10\" -k 'system-images;android-35;google_apis;x86_64' --force\n\n      echo \"y\" | $ANDROID_HOME/emulator/emulator -list-avds\n\n      echo \"Starting emulator\"\n\n      # Start emulator in background\n      nohup $ANDROID_HOME/emulator/emulator -avd xamarin_android_emulator -no-snapshot -no-window -no-audio -no-boot-anim -accel on > /dev/null 2>&1 &\n      # Fixed quoting around \"\\r\"\n      $ANDROID_HOME/platform-tools/adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed | tr -d \"\\r\") ]]; do sleep 1; done; input keyevent 82'\n\n      $ANDROID_HOME/platform-tools/adb devices\n\n      echo \"Emulator started\"\n```\n\nExample:\n```yml\n- task: AppCenterTest@1\n  inputs:\n    appFile: path/myapp.ipa\n    artifactsDirectory: '$(Build.ArtifactStagingDirectory)/AppCenterTest'\n    frameworkOption: 'appium'\n    appiumBuildDirectory: test/upload\n    serverEndpoint: 'My App Center service connection'\n    appSlug: username/appIdentifier\n    devices: 'devicelist'\n```\n\nExample:\n```yaml\n- task: CopyFiles@2\n  inputs:\n    contents: '**/*.apk'\n    targetFolder: '$(build.artifactStagingDirectory)'\n- task: PublishBuildArtifacts@1\n  inputs:\n    pathToPublish: $(Build.ArtifactStagingDirectory)\n    artifactName: MyBuildOutputs\n```\n\nExample:\n```yml\n- task: AppCenterDistribute@3\n  inputs:\n    serverEndpoint: 'AppCenter'\n    appSlug: '$(APP_CENTER_SLUG)'\n    appFile: '$(APP_FILE)' # Relative path from the repo root to the APK file you want to publish\n    symbolsOption: 'Android'\n    releaseNotesOption: 'input'\n    releaseNotesInput: 'Here are the release notes for this version.'\n    destinationType: 'groups'\n```\n\nExample:\n```yaml\n- task: GooglePlayRelease@4\n  inputs:\n    apkFile: '**/*.apk'\n    serviceEndpoint: 'yourGooglePlayServiceConnectionName'\n    track: 'internal'\n```\n\nExample:\n```yaml\n- task: GooglePlayPromote@3\n  inputs:\n    packageName: 'com.yourCompany.appPackageName'\n    serviceEndpoint: 'yourGooglePlayServiceConnectionName'\n    sourceTrack: 'internal'\n    destinationTrack: 'alpha'\n```\n\nExample:\n```yaml\n- task: GooglePlayIncreaseRollout@2\n  inputs:\n    packageName: 'com.yourCompany.appPackageName'\n    serviceEndpoint: 'yourGooglePlayServiceConnectionName'\n    userFraction: '0.5' # 0.0 to 1.0 (0% to 100%)\n```\n\nExample:\n```yaml\n- task: GooglePlayStatusUpdate@2\n    inputs:\n      authType: ServiceEndpoint\n      packageName: 'com.yourCompany.appPackageName'\n      serviceEndpoint: 'yourGooglePlayServiceConnectionName'\n      status: 'inProgress' # draft | inProgress | halted | completed\n```\n\nExample:\n```yaml\n- task: DownloadSecureFile@1\n  name: keyStore\n  displayName: \"Download keystore from secure files\"\n  inputs:\n    secureFile: app.keystore\n```\n\nExample:\n```yaml\n- task: Bash@3\n  displayName: \"Build and sign App Bundle\"\n  inputs:\n    targetType: \"inline\"\n    script: |\n      msbuild -restore $(Build.SourcesDirectory)/myAndroidApp/*.csproj -t:SignAndroidPackage -p:AndroidPackageFormat=aab -p:Configuration=$(buildConfiguration) -p:AndroidKeyStore=True -p:AndroidSigningKeyStore=$(keyStore.secureFilePath) -p:AndroidSigningStorePass=$(keystore.password) -p:AndroidSigningKeyAlias=$(key.alias) -p:AndroidSigningKeyPass=$(key.password)\n```\n\nExample:\n```yaml\n- task: CopyFiles@2\n  displayName: 'Copy deliverables'\n  inputs:\n    SourceFolder: '$(Build.SourcesDirectory)/myAndroidApp/bin/$(buildConfiguration)'\n    Contents: '*.aab'\n    TargetFolder: 'drop'\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:51.441Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":13,"totalLines":161,"estimatedTokens":1188}}291{"id":"doc-create_your_first_service_fabric_application_in_-193a8f28","source":"documentation","title":"Create your first Service Fabric application in C# - Azure Service Fabric | Microsoft Learn","url":"https://learn.microsoft.com/en-us/azure/service-fabric/service-fabric-reliable-services-quick-start","text":"Example:\n```csharp\nprotected override async Task RunAsync(CancellationToken cancellationToken)\n{\n    ...\n}\n```\n\nExample:\n```csharp\nprotected override IEnumerable<ServiceInstanceListener> CreateServiceInstanceListeners()\n{\n    ...\n}\n```\n\nExample:\n```csharp\nprotected override async Task RunAsync(CancellationToken cancellationToken)\n{\n    // TODO: Replace the following sample code with your own logic\n    //       or remove this RunAsync override if it's not needed in your service.\n\n    long iterations = 0;\n\n    while (true)\n    {\n        cancellationToken.ThrowIfCancellationRequested();\n\n        ServiceEventSource.Current.ServiceMessage(this.Context, \"Working-{0}\", ++iterations);\n\n        await Task.Delay(TimeSpan.FromSeconds(1), cancellationToken);\n    }\n}\n```\n\nExample:\n```csharp\nprotected override async Task RunAsync(CancellationToken cancellationToken)\n{\n    // TODO: Replace the following sample code with your own logic\n    //       or remove this RunAsync override if it's not needed in your service.\n\n    var myDictionary = await this.StateManager.GetOrAddAsync<IReliableDictionary<string, long>>(\"myDictionary\");\n\n    while (true)\n    {\n        cancellationToken.ThrowIfCancellationRequested();\n\n        using (var tx = this.StateManager.CreateTransaction())\n        {\n            var result = await myDictionary.TryGetValueAsync(tx, \"Counter\");\n\n            ServiceEventSource.Current.ServiceMessage(this.Context, \"Current Counter Value: {0}\",\n                result.HasValue ? result.Value.ToString() : \"Value does not exist.\");\n\n            await myDictionary.AddOrUpdateAsync(tx, \"Counter\", 0, (key, value) => ++value);\n\n            // If an exception is thrown before calling CommitAsync, the transaction aborts, all changes are\n            // discarded, and nothing is saved to the secondary replicas.\n            await tx.CommitAsync();\n        }\n\n        await Task.Delay(TimeSpan.FromSeconds(1), cancellationToken);\n    }\n```\n\nExample:\n```csharp\nvar myDictionary = await this.StateManager.GetOrAddAsync<IReliableDictionary<string, long>>(\"myDictionary\");\n```\n\nExample:\n```csharp\nusing (ITransaction tx = this.StateManager.CreateTransaction())\n{\n    var result = await myDictionary.TryGetValueAsync(tx, \"Counter-1\");\n\n    await myDictionary.AddOrUpdateAsync(tx, \"Counter-1\", 0, (k, v) => ++v);\n\n    await tx.CommitAsync();\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:51.456Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":6,"totalLines":85,"estimatedTokens":592}}292{"id":"doc-author_the_prisma_8_contract_in_psl_prisma_docum-1e9a53d3","source":"documentation","title":"Author the Prisma 8 contract in PSL | Prisma Documentation","url":"https://www.prisma.io/docs/orm/v8/contract-authoring/psl-syntax","text":"For the complete Prisma documentation index optimized for AI agents, see https://www.prisma.io/docs/llms.txt. A markdown version of every docs page is available by appending .md to its URL.\n\nThe Prisma 8 Release Candidate is available.Explore the next Prisma ORM workflow.Read the docs\n\nExample:\n```text\n// use prisma-next\n\ntypes {\n  Uuid = String @db.Uuid\n}\n\ntype Address {\n  street  String\n  city    String\n  zip     String?\n  country String\n}\n\nenum Priority {\n  @@type(\"pg/text@1\")\n  Low    = \"low\"\n  High   = \"high\"\n  Urgent = \"urgent\"\n}\n\nmodel User {\n  id        Uuid     @id @default(uuid())\n  email     String\n  createdAt DateTime @default(now())\n  address   Address?\n  posts     Post[]\n\n  @@map(\"user\")\n}\n\nmodel Post {\n  id        Uuid     @id @default(uuid())\n  title     String\n  userId    Uuid\n  priority  Priority @default(Low)\n  createdAt DateTime @default(now())\n\n  user User @relation(fields: [userId], references: [id])\n\n  @@map(\"post\")\n}\n```\n\nExample:\n```text\nimport { defineConfig } from \"@prisma/orm-postgres/config\";\n\nexport default defineConfig({\n  contract: \"./prisma/contract.prisma\",\n});\n```\n\nExample:\n```text\nmodel User {\n  id Uuid @id @default(uuid())\n}\n```\n\nExample:\n```text\nmodel User {\n  id ObjectId @id @map(\"_id\")\n}\n```\n\nExample:\n```text\ntypes {\n  Uuid = String @db.Uuid\n}\n```\n\nExample:\n```text\nenum Priority {\n  @@type(\"pg/text@1\")\n  Low    = \"low\"\n  High   = \"high\"\n  Urgent = \"urgent\"\n}\n```\n\nExample:\n```text\ntype Address {\n  street  String\n  city    String\n  zip     String?\n  country String\n}\n\nmodel User {\n  id      Uuid     @id @default(uuid())\n  address Address?\n}\n```\n\nExample:\n```text\nmodel Post {\n  userId Uuid\n  user   User @relation(fields: [userId], references: [id])\n}\n\nmodel User {\n  posts Post[]\n}\n```\n\nExample:\n```text\nmodel Post {\n  tags Tag[]\n}\n\nmodel Tag {\n  posts Post[]\n}\n\nmodel PostTag {\n  postId Uuid\n  tagId  Uuid\n\n  post Post @relation(fields: [postId], references: [id])\n  tag  Tag  @relation(fields: [tagId], references: [id])\n\n  @@id([postId, tagId])\n  @@map(\"post_tag\")\n}\n```\n\nExample:\n```text\nmodel Task {\n  id     Uuid   @id @default(uuid())\n  title  String\n  type   String\n\n  @@discriminator(type)\n  @@map(\"task\")\n}\n\nmodel Bug {\n  severity     String\n  stepsToRepro String?\n\n  @@base(Task, \"bug\")\n  @@map(\"bug\")\n}\n```\n\nExample:\n```text\nimport pgvector from \"@prisma/orm-extension-pgvector/control\";\nimport { defineConfig } from \"@prisma/orm-postgres/config\";\n\nexport default defineConfig({\n  contract: \"./prisma/contract.prisma\",\n  extensions: [pgvector],\n});\n```\n\nExample:\n```text\ntypes {\n  Embedding1536 = pgvector.Vector(1536)\n}\n\nmodel Post {\n  id        Uuid           @id @default(uuid())\n  embedding Embedding1536?\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:08.283Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":12,"totalLines":182,"estimatedTokens":677}}293{"id":"doc-how_to_initialize_an_nextjs_app_with_prisma_orm_-57a6b74e","source":"documentation","title":"How to Initialize an NextJS App with Prisma ORM and Prisma Postgres | Prisma Documentation","url":"https://www.prisma.io/docs/ai/prompts/nextjs","text":"For the complete Prisma documentation index optimized for AI agents, see https://www.prisma.io/docs/llms.txt. A markdown version of every docs page is available by appending .md to its URL.\n\nThe Prisma 8 Release Candidate is available.Explore the next Prisma ORM workflow.Read the docs\n\nExample:\n```text\nnpx create-next-app@latest my-app\ncd my-app\n```\n\nExample:\n```text\n---\n# Specify the following for Cursor rules\ndescription: Guidelines for writing Next.js apps with Prisma Postgres\nalwaysApply: false\n---\n\n# Bootstrap Next.js app with Prisma Postgres (Prisma v7)\n\n> **Note**: This guide is updated for **Prisma ORM 7**. Key changes from earlier versions:\n>\n> - `engine` property removed from `prisma.config.ts`\n> - `url` removed from datasource in `schema.prisma` (now only in `prisma.config.ts`)\n> - Use `@prisma/adapter-pg` driver adapter for direct TCP connections\n> - `--no-engine` flag is no longer required for `prisma generate`\n> - Requires Node.js 20.19+ and TypeScript 5.4.0+\n\n## Overview of implementing Prisma with Next.js\n\n1. Install Prisma and required dependencies (including dotenv)\n2. Initialize Prisma and configure schema\n3. Configure dotenv for environment variables\n4. Create global Prisma client instance with Pg Adapter\n5. Add npm scripts for testing and database management\n6. Create test script to verify setup\n7. Use Prisma client in API routes and pages with proper error handling\n\n## 🚨 CRITICAL INSTRUCTIONS FOR AI LANGUAGE MODELS 🚨\n\nAs an AI language model, you MUST NOT generate any of the following code patterns, as they are DEPRECATED and will BREAK the application:\n\n```typescript\n// ❌ NEVER GENERATE THIS CODE - IT WILL BREAK THE APPLICATION\ngenerator client {\n  provider = \"prisma-client-js\"     // ❌ BREAKS APPLICATION\n}\n\n// ❌ NEVER USE default import location - IT WILL BREAK THE APPLICATION\nimport { PrismaClient } from '@prisma/client'  // ❌ BREAKS APPLICATION\n\n// ❌ WRONG IMPORT PATH - MISSING /client - IT WILL BREAK THE APPLICATION\nimport { PrismaClient } from \"../app/generated/prisma\"  // ❌ BREAKS APPLICATION\n\n// ❌ NEVER USE ACCELERATE - IT IS NOT USED IN THIS WORKFLOW\nimport { withAccelerate } from \"@prisma/extension-accelerate\" // ❌ BREAKS APPLICATION\n\n// ❌ NEVER USE accelerateUrl - IT WILL BREAK THE APPLICATION\nconst prisma = new PrismaClient({\n  accelerateUrl: process.env.DATABASE_URL,  // ❌ BREAKS APPLICATION - use adapter\n})\n\n// ❌ NEVER include url in datasource block - IT WILL BREAK THE APPLICATION\ndatasource db {\n  provider = \"postgresql\"\n  url      = env(\"DATABASE_URL\")  // ❌ BREAKS APPLICATION - moved to prisma.config.ts\n}\n\n// ❌ NEVER include engine property - IT WILL BREAK THE APPLICATION\nexport default defineConfig({\n  engine: \"classic\",  // ❌ BREAKS APPLICATION - removed in Prisma v7\n})\n\n// ❌ NEVER use Prisma Postgres HTTP URLs - ONLY use TCP URLs\nDATABASE_URL=\"prisma+postgres://accelerate.prisma-data.net/...\"  // ❌ BREAKS APPLICATION - use postgres://\n// ✅ ALWAYS use standard TCP URLs:\nDATABASE_URL=\"postgres://...\"  // ✅ CORRECT\n```\n\nInstead, you MUST ALWAYS generate ONLY this pattern:\n\n```typescript\n// ✅ ALWAYS GENERATE THIS EXACT PATTERN\ngenerator client {\n  provider = \"prisma-client\"\n  output   = \"../app/generated/prisma\"\n}\n\n// ✅ CRITICAL: MUST include /client at the end of import path\nimport { PrismaClient } from \"../app/generated/prisma/client\"\nimport { PrismaPg } from \"@prisma/adapter-pg\"\n\nconst adapter = new PrismaPg({\n  connectionString: process.env.DATABASE_URL!,\n})\n\nconst globalForPrisma = global as unknown as { prisma: PrismaClient }\n\nconst prisma = globalForPrisma.prisma || new PrismaClient({\n  adapter,\n})\n\nif (process.env.NODE_ENV !== \"production\") globalForPrisma.prisma = prisma\n\nexport default prisma\n```\n\n## ABSOLUTE REQUIREMENTS FOR AI CODE GENERATION\n\n1. You MUST use `provider = \"prisma-client\"` (not \"prisma-client-js\")\n2. You MUST use custom output: `output = \"../app/generated/prisma\"`\n3. You MUST use `@prisma/adapter-pg` driver adapter\n4. You MUST create `lib/prisma.ts` as a global singleton instance\n5. You MUST wrap all database calls in try-catch blocks\n6. You MUST import from `'../app/generated/prisma/client'` (not `'@prisma/client'` or `'../app/generated/prisma'`)\n7. You MUST use `adapter` property in PrismaClient constructor\n8. You MUST install `dotenv` and add `import \"dotenv/config\"` to `prisma.config.ts`\n9. You MUST add npm scripts for `db:test` and `db:studio` to package.json\n10. You MUST create a test script at `scripts/test-database.ts` to verify setup\n11. You MUST NOT include `url` in the datasource block of `schema.prisma`\n12. You MUST NOT include `engine` property in `prisma.config.ts`\n13. You MUST use `npx prisma init --output ../app/generated/prisma` to scaffold Prisma, then `npx create-db` to create a real cloud database\n14. You MUST use standard TCP URLs (`postgres://...`) in .env\n15. You MUST NOT use `accelerateUrl` or `withAccelerate`\n\n## VERSION REQUIREMENTS\n\n- **Node.js**: 20.19 or higher (Node.js 18 is NOT supported)\n- **TypeScript**: 5.4.0 or higher (5.9.x recommended)\n- **Prisma**: 7.0.0 or higher\n\n## CORRECT INSTALLATION\n\n```bash\n# Dev dependencies\nnpm install prisma tsx --save-dev\n\n# Production dependencies\nnpm install @prisma/adapter-pg @prisma/client dotenv\n```\n\n## CORRECT PRISMA INITIALIZATION\n\n> **FOR AI ASSISTANTS**: `npx prisma init` is not interactive. Run it yourself if your environment allows it. If you need a real Prisma Postgres database, either run `npx create-db` or ask the user to run it and update `DATABASE_URL` before you continue.\n\n```bash\n# Initialize Prisma and scaffold the Prisma files\nnpx prisma init --output ../app/generated/prisma\n\n# Then create a Prisma Postgres database\nnpx create-db\n```\n\nThis step:\n\n- Generates `prisma/schema.prisma` with the correct output path\n- Generates `prisma.config.ts`\n- Generates `.env` with a local `DATABASE_URL`\n- Requires `npx create-db` if you want a real Prisma Postgres database\n\n**IMPORTANT**: After `npx create-db`, replace the generated `DATABASE_URL` in `.env` with the returned `postgres://...` connection string.\n\n```text\nDATABASE_URL=\"postgres://...\"\n```\n\n## CORRECT PRISMA CONFIG (prisma.config.ts)\n\nWhen using `npx prisma init`, the `prisma.config.ts` is **auto-generated** with the correct configuration:\n\n```typescript\nimport \"dotenv/config\"; // ✅ Auto-included by prisma init\nimport { defineConfig, env } from \"prisma/config\";\n\nexport default defineConfig({\n  schema: \"prisma/schema.prisma\",\n  migrations: {\n    path: \"prisma/migrations\",\n  },\n  // ✅ NO engine property - removed in Prisma v7\n  datasource: {\n    url: env(\"DATABASE_URL\"),\n  },\n});\n```\n\n**Note**: If you need to manually create this file, ensure `import \"dotenv/config\"` is at the top.\n\n## CORRECT SCHEMA CONFIGURATION (prisma/schema.prisma)\n\nUpdate the generated `prisma/schema.prisma` file:\n\n```prisma\ngenerator client {\n  provider = \"prisma-client\"\n  output   = \"../app/generated/prisma\"\n}\n\ndatasource db {\n  provider = \"postgresql\"\n  // ✅ NO url here - now configured in prisma.config.ts\n}\n\n// Example User model for testing\nmodel User {\n  id        Int      @id @default(autoincrement())\n  email     String   @unique\n  name      String?\n  createdAt DateTime @default(now())\n  updatedAt DateTime @updatedAt\n}\n```\n\n## CORRECT GLOBAL PRISMA CLIENT\n\nCreate `lib/prisma.ts` file:\n\n```typescript\nimport { PrismaClient } from \"../app/generated/prisma/client\"; // ✅ CRITICAL: Include /client\nimport { PrismaPg } from \"@prisma/adapter-pg\";\n\nconst adapter = new PrismaPg({\n  connectionString: process.env.DATABASE_URL!,\n});\n\nconst globalForPrisma = global as unknown as { prisma: PrismaClient };\n\nconst prisma =\n  globalForPrisma.prisma ||\n  new PrismaClient({\n    adapter,\n  });\n\nif (process.env.NODE_ENV !== \"production\") globalForPrisma.prisma = prisma;\n\nexport default prisma;\n```\n\n## ADD NPM SCRIPTS TO PACKAGE.JSON\n\nUpdate your `package.json` to include these scripts:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"next dev\",\n    \"build\": \"next build\",\n    \"start\": \"next start\",\n    \"lint\": \"eslint\",\n    \"db:test\": \"tsx scripts/test-database.ts\",\n    \"db:studio\": \"prisma studio\"\n  }\n}\n```\n\n## CREATE TEST SCRIPT\n\nCreate `scripts/test-database.ts` to verify your setup:\n\n```typescript\nimport \"dotenv/config\"; // ✅ CRITICAL: Load environment variables\nimport prisma from \"../lib/prisma\";\n\nasync function testDatabase() {\n  console.log(\"🔍 Testing Prisma Postgres connection...\\n\");\n\n  try {\n    // Test 1: Check connection\n    console.log(\"✅ Connected to database!\");\n\n    // Test 2: Create a test user\n    console.log(\"\\n📝 Creating a test user...\");\n    const newUser = await prisma.user.create({\n      data: {\n        email: \"demo@example.com\",\n        name: \"Demo User\",\n      },\n    });\n    console.log(\"✅ Created user:\", newUser);\n\n    // Test 3: Fetch all users\n    console.log(\"\\n📋 Fetching all users...\");\n    const allUsers = await prisma.user.findMany();\n    console.log(`✅ Found ${allUsers.length} user(s):`);\n    allUsers.forEach((user) => {\n      console.log(`   - ${user.name} (${user.email})`);\n    });\n\n    console.log(\"\\n🎉 All tests passed! Your database is working perfectly.\\n\");\n  } catch (error) {\n    console.error(\"❌ Error:\", error);\n    process.exit(1);\n  }\n}\n\ntestDatabase();\n```\n\n## CORRECT API ROUTE IMPLEMENTATION (App Router)\n\nCreate `app/api/users/route.ts` with GET and POST handlers:\n\n```typescript\nimport { NextRequest, NextResponse } from \"next/server\";\nimport prisma from \"../../../lib/prisma\";\n\nexport async function GET(request: NextRequest) {\n  try {\n    const users = await prisma.user.findMany();\n    return NextResponse.json(users);\n  } catch (error) {\n    console.error(\"Error fetching users:\", error);\n    return NextResponse.json({ error: \"Failed to fetch users\" }, { status: 500 });\n  }\n}\n\nexport async function POST(request: NextRequest) {\n  try {\n    const body = await request.json();\n    const user = await prisma.user.create({\n      data: {\n        email: body.email,\n        name: body.name,\n      },\n    });\n    return NextResponse.json(user, { status: 201 });\n  } catch (error) {\n    console.error(\"Error creating user:\", error);\n    return NextResponse.json({ error: \"Failed to create user\" }, { status: 500 });\n  }\n}\n```\n\n## CORRECT USAGE IN SERVER COMPONENTS\n\nUpdate `app/page.tsx` to display users from the database:\n\n```typescript\nimport prisma from \"../lib/prisma\";\n\nexport default async function Home() {\n    let users: Array<{\n        id: number;\n        email: string;\n        name: string | null;\n        createdAt: Date;\n        updatedAt: Date;\n    }> = [];\n    let error = null;\n\n    try {\n        users = await prisma.user.findMany({\n            orderBy: {\n                createdAt: \"desc\",\n            },\n        });\n    } catch (e) {\n        console.error(\"Error fetching users:\", e);\n        error =\n            \"Failed to load users. Make sure your DATABASE_URL is configured.\";\n    }\n\n    return (\n        <main className=\"p-8\">\n            <h1 className=\"text-2xl font-bold mb-4\">Users from Database</h1>\n            {error ? (\n                <p className=\"text-red-500\">{error}</p>\n            ) : users.length === 0 ? (\n                <p>No users yet. Create one using the API at /api/users</p>\n            ) : (\n                <ul className=\"space-y-2\">\n                    {users.map((user) => (\n                        <li key={user.id} className=\"border p-4 rounded\">\n                            <p className=\"font-semibold\">\n                                {user.name || \"No name\"}\n                            </p>\n                            <p className=\"text-sm text-gray-600\">\n                                {user.email}\n                            </p>\n                        </li>\n                    ))}\n                </ul>\n            )}\n        </main>\n    );\n}\n```\n\n## COMPLETE SETUP WORKFLOW\n\nUser should follow these steps (AI should provide these instructions):\n\n1. **Install dependencies**:\n\n   ```npm\n   npm install prisma tsx --save-dev\n   ```\n\n   ```npm\n   npm install @prisma/adapter-pg @prisma/client dotenv\n   ```\n\n2. **Initialize Prisma, then create Prisma Postgres:**\n\n   > **AI ASSISTANT**: You can run `npx prisma init` yourself. If you should not provision cloud resources automatically, ask the user to run `npx create-db` and update `DATABASE_URL` before continuing.\n\n   ```npm\n   npx prisma init --output ../app/generated/prisma\n   npx create-db\n   ```\n\n   This creates `prisma/schema.prisma`, `prisma.config.ts`, and `.env`, then returns a `postgres://...` connection string for Prisma Postgres.\n\n   **If you asked the user to run `npx create-db`, wait for them to share or paste the returned connection string before proceeding.**\n\n3. **Verify `.env` was created** - Replace the generated `DATABASE_URL` with the `postgres://...` connection string returned by `npx create-db`.\n\n   ```text\n   DATABASE_URL=\"postgres://...\"\n   ```\n\n   **Do NOT invent this URL. Use the one returned by `npx create-db`.**\n\n4. **Update `prisma/schema.prisma`** - Add the User model (generator and datasource are already configured):\n\n   ```prisma\n   model User {\n     id        Int      @id @default(autoincrement())\n     email     String   @unique\n     name      String?\n     createdAt DateTime @default(now())\n     updatedAt DateTime @updatedAt\n   }\n   ```\n\n5. **Create `lib/prisma.ts`** with correct import path including `/client` and using `@prisma/adapter-pg`.\n\n6. **Add npm scripts** to `package.json` for `db:test` and `db:studio`\n\n7. **Create `scripts/test-database.ts`** test script\n\n8. **Push schema to database**:\n\n   ```npm\n   npx prisma db push\n   ```\n\n9. **Generate Prisma Client**:\n\n   ```npm\n   npx prisma generate\n   ```\n\n10. **Test the setup**:\n\n    ```bash\n    npm run db:test\n    ```\n\n11. **Start development server**:\n    ```bash\n    npm run dev\n    ```\n\n## AI MODEL VERIFICATION STEPS\n\nBefore generating any code, you MUST verify:\n\n1. Are you using `provider = \"prisma-client\"` (not \"prisma-client-js\")? If not, STOP and FIX.\n2. Are you using `output = \"../app/generated/prisma\"`? If not, STOP and FIX.\n3. Are you importing from `'../app/generated/prisma/client'` (with `/client`)? If not, STOP and FIX.\n4. Did you add `import \"dotenv/config\"` to `prisma.config.ts`? If not, STOP and FIX.\n5. Did you add `import \"dotenv/config\"` to `scripts/test-database.ts`? If not, STOP and FIX.\n6. Are you using `@prisma/adapter-pg`? If not, STOP and FIX.\n7. Are you using `adapter` property in PrismaClient constructor? If not, STOP and FIX.\n8. Are you wrapping database operations in try-catch? If not, STOP and FIX.\n9. Did you create the test script at `scripts/test-database.ts`? If not, STOP and FIX.\n10. Did you add `db:test` and `db:studio` scripts to package.json? If not, STOP and FIX.\n11. Did you remove `url` from the datasource block in `schema.prisma`? If not, STOP and FIX.\n12. Did you remove `engine` property from `prisma.config.ts`? If not, STOP and FIX.\n13. Did you run `npx prisma init` with the documented output path? If not, STOP and FIX.\n14. Is the DATABASE_URL a TCP URL (`postgres://...`)? If it's a `prisma+postgres://` URL, STOP and FIX.\n15. Did Prisma generate the `.env` file? If you invented the URL manually, STOP and FIX.\n\n## CONSEQUENCES OF INCORRECT IMPLEMENTATION\n\nIf you generate code using:\n\n- `prisma-client-js` provider → **CLIENT GENERATION FAILS**\n- Wrong import path (missing `/client`) → **MODULE NOT FOUND ERROR**\n- Missing `import \"dotenv/config\"` in prisma.config.ts → **DATABASE_URL NOT FOUND ERROR**\n- Missing `import \"dotenv/config\"` in test scripts → **ENVIRONMENT VARIABLE ERROR**\n- Default import from `@prisma/client` → **IMPORT ERROR**\n- Using `accelerateUrl` or `withAccelerate` → **UNNECESSARY ACCELERATE DEPENDENCY / CONFIG ERROR**\n- Missing custom output path → **WRONG CLIENT GENERATED**\n- Including `url` in datasource block → **DEPRECATED CONFIGURATION ERROR**\n- Including `engine` property → **DEPRECATED CONFIGURATION ERROR**\n- Using local URL (`postgres://localhost:...`) → **VERSION INCOMPATIBILITY ERRORS WITH Prisma v7**\n- Using `npx prisma init` without `--db` → **NO DATABASE CREATED, ONLY LOCAL FILES**\n- Manually inventing DATABASE_URL → **INVALID CONNECTION STRING ERRORS**\n\nThe implementation will:\n\n1. Break immediately with module errors\n2. Fail to read environment variables\n3. Cause connection pool exhaustion in production\n4. Result in import errors that prevent compilation\n5. Cause performance issues and connection failures\n6. Fail with \"HTTP connection string is not supported\" errors when using local URLs\n\n## USEFUL COMMANDS\n\n```bash\n# After changing schema\nnpx prisma generate              # Regenerate client (--no-engine flag no longer needed)\n\n# Push schema to database (no migrations)\nnpx prisma db push\n\n# Test database connection\nnpm run db:test\n\n# Open visual database editor\nnpm run db:studio\n\n# Create and apply migrations (for production)\nnpx prisma migrate dev --name your_migration_name\n```\n\n## TESTING WORKFLOW\n\nAfter setup, test with these steps:\n\n1. **Test database connection**:\n\n   ```bash\n   npm run db:test\n   ```\n\n   Should create a demo user and display it.\n\n2. **Open Prisma Studio**:\n\n   ```bash\n   npm run db:studio\n   ```\n\n   Visual interface at `localhost:5555` to view/edit data.\n\n3. **Test API routes**:\n\n   ```bash\n   # Create a user via API\n   curl -X POST http://localhost:3000/api/users \\\n     -H \"Content-Type: application/json\" \\\n     -d '{\"email\":\"test@example.com\",\"name\":\"Test User\"}'\n\n   # Get all users\n   curl http://localhost:3000/api/users\n   ```\n\n4. **View in browser**:\n   Open `localhost:3000` to see users displayed on the homepage.\n\n## AI MODEL RESPONSE TEMPLATE\n\nWhen asked about Prisma + Next.js implementation, you MUST:\n\n1. ONLY use code patterns from this guide\n2. NEVER suggest deprecated approaches\n3. ALWAYS use the exact patterns shown above\n4. ALWAYS include `/client` in import paths\n5. ALWAYS add `import \"dotenv/config\"` to prisma.config.ts\n6. ALWAYS add `import \"dotenv/config\"` to test scripts\n7. ALWAYS create the test script at `scripts/test-database.ts`\n8. ALWAYS add npm scripts for `db:test` and `db:studio`\n9. ALWAYS include error handling in API routes and server components\n10. ALWAYS use the global prisma instance from `lib/prisma.ts`\n11. ALWAYS use `@prisma/adapter-pg` and `adapter` property\n12. NEVER include `url` in the datasource block of schema.prisma\n13. NEVER include `engine` property in prisma.config.ts\n14. ALWAYS run `npx prisma init --output ../app/generated/prisma` before editing Prisma files. If you cannot provision cloud resources automatically, ask the user to run `npx create-db` and update `DATABASE_URL` before continuing\n15. ALWAYS wait for user confirmation after they run `npx create-db` and share or apply the returned `postgres://...` connection string before proceeding\n16. NEVER attempt to run interactive commands yourself - ask the user to do it\n17. NEVER use `prisma+postgres://` URLs - ONLY `postgres://` TCP URLs\n18. NEVER manually invent or fabricate DATABASE_URL values\n19. ALWAYS let Prisma generate the `.env` file with the real DATABASE_URL (and ensure it's correct type)\n20. VERIFY your response against ALL the patterns shown here before responding\n\nRemember: There are NO EXCEPTIONS to these rules. Every requirement is MANDATORY for the setup to work.\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:08.284Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":2,"totalLines":593,"estimatedTokens":4823}}294{"id":"doc-git_git_filter_branch_documentation-a62bb854","source":"documentation","title":"Git - git-filter-branch Documentation","url":"http://git-scm.com/docs/git-filter-branch/2.14.6","text":"Example:\n```text\ngit filter-branch [--setup <command>] [--env-filter <command>]\n\t[--tree-filter <command>] [--index-filter <command>]\n\t[--parent-filter <command>] [--msg-filter <command>]\n\t[--commit-filter <command>] [--tag-name-filter <command>]\n\t[--subdirectory-filter <directory>] [--prune-empty]\n\t[--original <namespace>] [-d <directory>] [-f | --force]\n\t[--] [<rev-list options>…​]\n```\n\nExample:\n```text\ngit filter-branch --tree-filter 'rm filename' HEAD\n```\n\nExample:\n```text\ngit filter-branch --index-filter 'git rm --cached --ignore-unmatch filename' HEAD\n```\n\nExample:\n```text\ngit filter-branch --subdirectory-filter foodir -- --all\n```\n\nExample:\n```text\ngit filter-branch --parent-filter 'sed \"s/^\\$/-p <graft-id>/\"' HEAD\n```\n\nExample:\n```text\ngit filter-branch --parent-filter \\\n\t'test $GIT_COMMIT = <commit-id> && echo \"-p <graft-id>\" || cat' HEAD\n```\n\nExample:\n```text\necho \"$commit-id $graft-id\" >> .git/info/grafts\ngit filter-branch $graft-id..HEAD\n```\n\nExample:\n```text\ngit filter-branch --commit-filter '\n\tif [ \"$GIT_AUTHOR_NAME\" = \"Darl McBribe\" ];\n\tthen\n\t\tskip_commit \"$@\";\n\telse\n\t\tgit commit-tree \"$@\";\n\tfi' HEAD\n```\n\nExample:\n```text\nskip_commit()\n{\n\tshift;\n\twhile [ -n \"$1\" ];\n\tdo\n\t\tshift;\n\t\tmap \"$1\";\n\t\tshift;\n\tdone;\n}\n```\n\nExample:\n```text\ngit filter-branch --msg-filter '\n\tsed -e \"/^git-svn-id:/d\"\n'\n```\n\nExample:\n```text\ngit filter-branch --msg-filter '\n\tcat &&\n\techo \"Acked-by: Bugs Bunny <bunny@bugzilla.org>\"\n' HEAD~10..HEAD\n```\n\nExample:\n```text\ngit filter-branch --env-filter '\n\tif test \"$GIT_AUTHOR_EMAIL\" = \"root@localhost\"\n\tthen\n\t\tGIT_AUTHOR_EMAIL=john@example.com\n\tfi\n\tif test \"$GIT_COMMITTER_EMAIL\" = \"root@localhost\"\n\tthen\n\t\tGIT_COMMITTER_EMAIL=john@example.com\n\tfi\n' -- --all\n```\n\nExample:\n```text\nD--E--F--G--H\n    /     /\nA--B-----C\n```\n\nExample:\n```text\ngit filter-branch ... C..H\n```\n\nExample:\n```text\ngit filter-branch ... C..H --not D\ngit filter-branch ... D..H --not C\n```\n\nExample:\n```text\ngit filter-branch --index-filter \\\n\t'git ls-files -s | sed \"s-\\t\\\"*-&newsubdir/-\" |\n\t\tGIT_INDEX_FILE=$GIT_INDEX_FILE.new \\\n\t\t\tgit update-index --index-info &&\n\t mv \"$GIT_INDEX_FILE.new\" \"$GIT_INDEX_FILE\"' HEAD\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:45.107Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":16,"totalLines":125,"estimatedTokens":541}}295{"id":"doc-git_git_filter_branch_documentation-12e83886","source":"documentation","title":"Git - git-filter-branch Documentation","url":"http://git-scm.com/docs/git-filter-branch/2.15.4","text":"Example:\n```text\ngit filter-branch [--setup <command>] [--subdirectory-filter <directory>]\n\t[--env-filter <command>] [--tree-filter <command>]\n\t[--index-filter <command>] [--parent-filter <command>]\n\t[--msg-filter <command>] [--commit-filter <command>]\n\t[--tag-name-filter <command>] [--prune-empty]\n\t[--original <namespace>] [-d <directory>] [-f | --force]\n\t[--state-branch <branch>] [--] [<rev-list options>…​]\n```\n\nExample:\n```text\ngit filter-branch --tree-filter 'rm filename' HEAD\n```\n\nExample:\n```text\ngit filter-branch --index-filter 'git rm --cached --ignore-unmatch filename' HEAD\n```\n\nExample:\n```text\ngit filter-branch --subdirectory-filter foodir -- --all\n```\n\nExample:\n```text\ngit filter-branch --parent-filter 'sed \"s/^\\$/-p <graft-id>/\"' HEAD\n```\n\nExample:\n```text\ngit filter-branch --parent-filter \\\n\t'test $GIT_COMMIT = <commit-id> && echo \"-p <graft-id>\" || cat' HEAD\n```\n\nExample:\n```text\necho \"$commit-id $graft-id\" >> .git/info/grafts\ngit filter-branch $graft-id..HEAD\n```\n\nExample:\n```text\ngit filter-branch --commit-filter '\n\tif [ \"$GIT_AUTHOR_NAME\" = \"Darl McBribe\" ];\n\tthen\n\t\tskip_commit \"$@\";\n\telse\n\t\tgit commit-tree \"$@\";\n\tfi' HEAD\n```\n\nExample:\n```text\nskip_commit()\n{\n\tshift;\n\twhile [ -n \"$1\" ];\n\tdo\n\t\tshift;\n\t\tmap \"$1\";\n\t\tshift;\n\tdone;\n}\n```\n\nExample:\n```text\ngit filter-branch --msg-filter '\n\tsed -e \"/^git-svn-id:/d\"\n'\n```\n\nExample:\n```text\ngit filter-branch --msg-filter '\n\tcat &&\n\techo \"Acked-by: Bugs Bunny <bunny@bugzilla.org>\"\n' HEAD~10..HEAD\n```\n\nExample:\n```text\ngit filter-branch --env-filter '\n\tif test \"$GIT_AUTHOR_EMAIL\" = \"root@localhost\"\n\tthen\n\t\tGIT_AUTHOR_EMAIL=john@example.com\n\tfi\n\tif test \"$GIT_COMMITTER_EMAIL\" = \"root@localhost\"\n\tthen\n\t\tGIT_COMMITTER_EMAIL=john@example.com\n\tfi\n' -- --all\n```\n\nExample:\n```text\nD--E--F--G--H\n    /     /\nA--B-----C\n```\n\nExample:\n```text\ngit filter-branch ... C..H\n```\n\nExample:\n```text\ngit filter-branch ... C..H --not D\ngit filter-branch ... D..H --not C\n```\n\nExample:\n```text\ngit filter-branch --index-filter \\\n\t'git ls-files -s | sed \"s-\\t\\\"*-&newsubdir/-\" |\n\t\tGIT_INDEX_FILE=$GIT_INDEX_FILE.new \\\n\t\t\tgit update-index --index-info &&\n\t mv \"$GIT_INDEX_FILE.new\" \"$GIT_INDEX_FILE\"' HEAD\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:45.116Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":16,"totalLines":125,"estimatedTokens":548}}296{"id":"doc-service_h_protocol_buffers_documentation-041efea4","source":"documentation","title":"service.h | Protocol Buffers Documentation","url":"https://protobuf.dev/reference/cpp/api-docs/google.protobuf.service/","text":"Protocol Buffers Documentation\n\nExample:\n```text\nservice MyService {\n  rpc Foo(MyRequest) returns(MyResponse);\n}\n```\n\nExample:\n```text\nclass MyServiceImpl : public MyService {\n public:\n  MyServiceImpl() {}\n  ~MyServiceImpl() {}\n\n  // implements MyService ---------------------------------------\n\n  void Foo(google::protobuf::RpcController* controller,\n           const MyRequest* request,\n           MyResponse* response,\n           Closure* done) {\n    // ... read request and fill in response ...\n    done->Run();\n  }\n};\n```\n\nExample:\n```text\nMyRpcChannel channel(\"rpc:hostname:1234/myservice\");\nMyRpcController controller;\nMyServiceImpl::Stub stub(&channel);\nFooRequest request;\nFooResponse response;\n\n// ... fill in request ...\n\nstub.Foo(&controller, request, &response, NewCallback(HandleResponse));\n```\n\nExample:\n```text\nconst MethodDescriptor* method =\n  service->GetDescriptor()->FindMethodByName(\"Foo\");\nMessage* request  = stub->GetRequestPrototype (method)->New();\nMessage* response = stub->GetResponsePrototype(method)->New();\nrequest->ParseFromString(input);\nservice->CallMethod(method, *request, response, callback);\n```\n\nExample:\n```text\nRpcChannel* channel = new MyRpcChannel(\"remotehost.example.com:1234\");\nMyService* service = new MyService::Stub(channel);\nservice->MyMethod(request, &response, callback);\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:09.172Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":5,"totalLines":59,"estimatedTokens":336}}297{"id":"doc-google_protobuf_invalidprotocolbufferexception_c-83aac763","source":"documentation","title":"Google.Protobuf.InvalidProtocolBufferException Class Reference","url":"https://protobuf.dev/reference/csharp/api-docs/class/google/protobuf/invalid-protocol-buffer-exception.html","text":"Thrown when a protocol message being parsed is invalid in some way, e.g.\n\nit contains a malformed varint or a negative byte length.\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:09.179Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":0,"totalLines":5,"estimatedTokens":37}}298{"id":"doc-google_protobuf_jsonformatter_settings_class_ref-21b6fda4","source":"documentation","title":"Google.Protobuf.JsonFormatter.Settings Class Reference","url":"https://protobuf.dev/reference/csharp/api-docs/class/google/protobuf/json-formatter/settings.html","text":"Settings controlling JSON formatting.\n\nConstructors and Destructors Settings(bool formatDefaultValues) Creates a new Settings object with the specified formatting of default values and an empty type registry. Settings(bool formatDefaultValues, TypeRegistry typeRegistry) Creates a new Settings object with the specified formatting of default values and type registry.\n\nProperties Default Settings Default settings, as used by JsonFormatter.Default FormatDefaultValues bool Whether fields whose values are the default for the field type (e.g. TypeRegistry TypeRegistry The type registry used to format Any messages.\n\nDefault Settings Default Default settings, as used by JsonFormatter.Default\n\nFormatDefaultValues bool FormatDefaultValues Whether fields whose values are the default for the field type (e.g. 0 for integers) should be formatted (true) or omitted (false).\n\nTypeRegistry TypeRegistry TypeRegistry The type registry used to format Any messages.\n\nSettings Settings( bool formatDefaultValues ) Creates a new Settings object with the specified formatting of default values and an empty type registry. Details Parameters formatDefaultValues true if default values (0, empty strings etc) should be formatted; false otherwise.\n\nSettings Settings( bool formatDefaultValues, TypeRegistry typeRegistry ) Creates a new Settings object with the specified formatting of default values and type registry. Details Parameters formatDefaultValues true if default values (0, empty strings etc) should be formatted; false otherwise. typeRegistry The TypeRegistry to use when formatting Any messages.\n\nExample:\n```text\nSettings Default\n```\n\nExample:\n```text\nbool FormatDefaultValues\n```\n\nExample:\n```text\nTypeRegistry TypeRegistry\n```\n\nExample:\n```text\nSettings(\n  bool formatDefaultValues\n)\n```\n\nExample:\n```text\nSettings(\n  bool formatDefaultValues,\n  TypeRegistry typeRegistry\n)\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:09.187Z","totalSectionsIncluded":8,"totalCodeBlocksIncluded":5,"totalLines":47,"estimatedTokens":473}}299{"id":"doc-upgrading_the_geo_sites_gitlab_docs-fbea1317","source":"documentation","title":"Upgrading the Geo sites | GitLab Docs","url":"https://docs.gitlab.com/administration/geo/replication/upgrading_the_geo_sites/","text":"Getting startedConfigure GitLabAdmin areaGitLab Relay (KAS)Application cache intervalCellsCI/CDClickHouse for analyticsConsulCronCustom HTML header tagsEnvironment variablesFile hooksGeoSetting up GeoConfigurationUsing a Geo siteSecondary proxyingSelective synchronizationUpgrading Geo sitesUsing object storageContainer registry for a secondary siteGeo security reviewLocation-aware Git remote URLsSingle Sign On (SSO)Tuning GeoPausing and resuming replicationDisable GeoRemoving a Geo siteSupported data typesBackground jobsFrequently asked questionsTroubleshootingValidation testsGeo GlossaryDisaster recovery (Geo)Geo sitesGit LFS administrationGit protocol v2Health checkHost the product documentationIncoming emailInstance limitsInstance reviewInvalidate Markdown cacheIssue closing patternLabelsLoad balancerLog systemMerge request approvalsMerge request diffs storageNFSObject storagePackagesPostfixPostgreSQLRedisReply by emailRepository storageSecrets ManagerServer hooksSidekiqSnippetsS/MIME signingStatic objects external storageTerraform stateTerraform state settingsTimezoneUploadsWeb terminalsWhat's newWikisConfigure GitLab DuoUpdate your settingsEnable features behind feature flagsMaintain GitLabMonitor GitLabSecure GitLabAdminister usersAdminister GitLab DedicatedAdminister GitLab RunnerGitLab Docs /Administer /Configure GitLab /Geo /Upgrading Geo sitesHelp us learn about your current experience with the documentation. Take the survey.Upgrading the Geo , Self-ManagedRead these sections carefully before updating your Geo sites. Not following version-specific upgrade steps may result in unexpected downtime. If you have any specific questions, contact Support. A database major version upgrade requires re-initializing the PostgreSQL replication to Geo secondaries. This applies to both Linux-packaged and externally-managed databases. This may result in a larger than expected downtime.Upgrading Geo sites involves upgrade steps, depending on the version being upgraded to or 19 upgrade notesGitLab 18 upgrade notesGitLab 17 upgrade notesGitLab 16 upgrade notesGitLab 15 upgrade notesGeneral upgrade steps, for all upgrades.General upgrade stepsThese general upgrade steps require downtime in a multi-node setup. If you want to avoid downtime, consider using zero-downtime upgrades.To upgrade the Geo sites when a new GitLab version is released, upgrade primary and all secondary Pause replication on each secondary site to protect the disaster recovery (DR) capability of the secondary sites. Pause replication when your priority is preserving a clean DR checkpoint during a higher-risk upgrade window. Do not pause replication if your priority is keeping the secondary current and serving read traffic normally during the upgrade, especially in a zero-downtime approach.SSH into each node of the primary site.Upgrade GitLab on the primary site.Perform testing on the primary site, particularly if you paused replication in step 1 to protect DR. For more information about post-upgrade testing, see run upgrade health checks.Ensure that the secrets in the /etc/gitlab/gitlab-secrets.json file of both the primary site and the secondary site are the same. The file must be the same on all of a site’s nodes.SSH into each node of secondary sites.Upgrade GitLab on each secondary site.If you paused replication in step 1, resume replication on each secondary. Then, restart Puma and Sidekiq on each secondary site. This is to ensure they are initialized against the newer database schema that is now replicated from the previously upgraded primary site.sudo gitlab-ctl restart sidekiq sudo gitlab-ctl restart pumaTest primary and secondary sites, and check version in each.Check status after upgradingNow that the upgrade process is complete, you may want to check whether everything is working the Geo Rake task on an application node for the primary and secondary sites. Everything should be gitlab-rake :checkCheck the primary site’s Geo dashboard for any errors.Test the data replication by pushing code to the primary site and see if it is received by secondary sites.If you encounter any issues, see the Geo troubleshooting guide.General upgrade stepsCheck status after upgrading\n\nExample:\n```shell\nsudo gitlab-ctl restart sidekiq\nsudo gitlab-ctl restart puma\n```\n\nExample:\n```shell\nsudo gitlab-rake gitlab:geo:check\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:12.538Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":2,"totalLines":14,"estimatedTokens":1091}}300{"id":"doc-accessing_session_data_gitlab_docs-9d39c851","source":"documentation","title":"Accessing session data | GitLab Docs","url":"https://docs.gitlab.com/development/session/","text":"Contribute to a GitLab contributionArchitectureDevelopment Rake tasksDevelopment processesAccessing session dataAI featuresAvoiding required stopsBackwards compatibilityChangelog entriesChatOps on GitLab.comCloud ConnectorCode review guidelinesDanger botData deletion guidelinesDependenciesDeprecation guidelinesEE featuresEmailsExperimentsFeature categorizationFeatures in :#{user.id}\") end # Retrieve a specific session session_data = Gitlab::Redis::Sessions.with { |redis| redis.get(\"#{Gitlab::Redis::Sessions::SESSION_NAMESPACE}:#{session_id}\") } Marshal.load(session_data)Getting device information with ActiveSessionThe Active sessions page on a user’s profile displays information about the device used to access each session. The methods used there to list sessions can also be useful for development.# Get list of sessions for a given user # Includes session_id and data from the UserAgent ActiveSession.list(user)GitLab::SessionRedisGetting device information with ActiveSession\n\nExample:\n```ruby\n# Lookup a value stored in the current session\nGitlab::Session.current[:my_feature]\n\n# Modify the current session stored in redis\nGitlab::Session.current[:my_feature] = value\n\n# Store key-value data namespaced under a key\nGitlab::NamespacedSessionStore.new(:my_feature)[some_key] = value\n\n# Set the session for a block of code, such as for tests\nGitlab::Session.with_session(my_feature: value) do\n  # Code that uses Session.current[:my_feature]\nend\n```\n\nExample:\n```ruby\n# Get a list of sessions\nsession_ids = Gitlab::Redis::Sessions.with do |redis|\n  redis.smembers(\"#{Gitlab::Redis::Sessions::USER_SESSIONS_LOOKUP_NAMESPACE}:#{user.id}\")\nend\n\n# Retrieve a specific session\nsession_data = Gitlab::Redis::Sessions.with { |redis| redis.get(\"#{Gitlab::Redis::Sessions::SESSION_NAMESPACE}:#{session_id}\") }\nMarshal.load(session_data)\n```\n\nExample:\n```ruby\n# Get list of sessions for a given user\n# Includes session_id and data from the UserAgent\nActiveSession.list(user)\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:12.674Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":3,"totalLines":39,"estimatedTokens":498}}301{"id":"doc-enabling_features_for_gitlab_dedicated_gitlab_do-8b7a5da6","source":"documentation","title":"Enabling features for GitLab Dedicated | GitLab Docs","url":"https://docs.gitlab.com/development/enabling_features_on_dedicated/","text":"Contribute to a GitLab contributionArchitectureDevelopment Rake tasksDevelopment processesAccessing session dataAI featuresAvoiding required stopsBackwards compatibilityChangelog entriesChatOps on GitLab.comCloud ConnectorCode review guidelinesDanger botData deletion guidelinesDependenciesDeprecation guidelinesEE featuresEmailsExperimentsFeature categorizationFeatures in .gitlab directoryFeature flags for GitLab developmentFIPS complianceFramework - DeclarativePolicyGitLab Dedicated featuresGotchasImage scalingIssues workflowInteracting componentsLabelsLicensingMaintenance modeMerge request conceptsMerge request workflowProfilingRails EndpointsRails initializersRails upgrade guidelinesReusing AbstractionsRenaming featuresRepository mirroringRuby upgrade guidelinesRuby 3 gotchasSecure partner onboarding processShared filesStorageTesting standards and stylesTesting (contract)End-to-end TestingTranslate GitLabURLs in GitLabWebhooksDevelopment style guidesFeature developmentGitLab project pipelinesContribute to GitLab RunnerContribute to GitLab PagesContribute to GitLab DistributionContribute to documentationGitLab Docs /Contribute /Contribute to GitLab /Development processes /GitLab Dedicated featuresHelp us learn about your current experience with the documentation. Take the survey.Enabling features for GitLab DedicatedVersioningGitLab Dedicated is running the n-1 GitLab version to provide sufficient run-up time to make changes across many GitLab instances, and reduce the number of releases necessary to maintain GitLab in accordance with the security maintenance policy.GitLab Dedicated instances are automatically upgraded during scheduled maintenance windows throughout the week.The release rollout schedule for GitLab Dedicated outlines when instances are expected to be upgraded to a new release.Feature flagsFeature flags support the development and rollout of new or experimental features on GitLab.com. Feature flags are not tools for managing configuration.Due to the high risk of enabling experimental features on GitLab Dedicated, and the additional workload needed to manage these on a per-instance basis, feature flags are not supported on GitLab Dedicated.Instead, all per-instance configurations must be made using the application (UI or API) settings to allow customers to control them.Enabling featuresAll features need to be Generally Available before they can be deployed to GitLab Dedicated. In most cases, this means any feature flags are defaulted to on, and the feature is being used on GitLab.com and by users on GitLab Self-Managed.New versions of GitLab and any other changes, are deployed using automation during scheduled maintenance windows. Because of the required automation and the timing of deployments, features must be safe for auto-rollout. This means that new features don’t require any immediate manual adjustment from operators or customers.Features that require additional configuration after they have been deployed, must have API or UI settings to allow the customer to make the necessary changes.GitLab Dedicated is a single-tenant SaaS product. This means that one-off, customer-specific tasks cannot be supported.Features that may not be suitable or useful for every customer must be controlled using application settings to avoid creating unsustainable workloads.VersioningFeature flagsEnabling features\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:12.677Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":0,"totalLines":3,"estimatedTokens":847}}302{"id":"doc-maven_virtual_registry_gitlab_docs-5aa654f4","source":"documentation","title":"Maven virtual registry | GitLab Docs","url":"https://docs.gitlab.com/user/packages/virtual_registry/maven/","text":"Getting startedTutorialsManage your organizationOrganize work with projectsPlan and track workManage authentication and authorizationUse GitManage your codeUse CI/CD to build your applicationSecure your applicationDeploy and release your applicationGetting startedTutorialsPackages & RegistriesPackage registryContainer registryVirtual registryMavenContainersHarbor registryTerraform module registryEnvironmentsDeploymentsReleasesRoll out an application incrementallyFeature flagsGitLab PagesManage your infrastructureMonitor your applicationAnalyze GitLab usageRelease notesFeature supportFind your GitLab versionGitLab Docs /Use GitLab /Deploy and release your … /Packages & Registries /Virtual registry /MavenHelp us learn about your current experience with the documentation. Take the survey.Maven virtual , GitLab Self-Managed, GitLab in GitLab 18.0 with a feature flag named virtual_registry_maven. Disabled by default.Feature flag renamed to maven_virtual_registry in GitLab 18.1.Changed from experiment to beta in GitLab 18.1.Enabled on GitLab.com, GitLab Self-Managed, and GitLab Dedicated in GitLab 18.2.The availability of this feature is controlled by a feature flag. For more information, see the history. This feature is available in beta. Review the documentation carefully before you use this feature.The Maven virtual registry uses a single, well-known URL to manage and distribute packages from multiple external registries in GitLab.Use the Maven virtual registry a virtual registry.Connect the virtual registry to public and private upstream registries.Configure Maven clients to pull packages from configured upstreams.Manage cache entries for available upstreams.This approach provides better package performance over time, and makes it easier to manage your Maven packages.For general information about managing virtual registries and upstream registries, see Virtual registry.PrerequisitesBefore you can use the Maven virtual the prerequisites to use the virtual registry.Configure authentication to the virtual registry. For more information, see Authenticate to the virtual registry.On GitLab outbound requests to the local network. For more information, see allow requests to the local network.When using the Maven virtual registry, remember the following can create up to 20 Maven virtual registries per top-level group.You can set only 20 upstreams to a given Maven virtual registry.For technical reasons, the proxy_download setting is force enabled, no matter what the value in the object storage configuration is configured to.Geo support is not implemented. You can follow its development in issue 473033.Manage virtual registriesHistoryIntroduced in GitLab 18.5 with a feature flag named ui_for_virtual_registries. Enabled by default.Changed in GitLab 18.6 to a flag named maven_virtual_registry. Enabled by default. Feature flag ui_for_virtual_registries removed.Manage Maven virtual registries for your group.You can also use the API.Create a Maven virtual registryTo create a Maven virtual the top bar, select Search or go to and find your group. This group must be at the top level.Select Deploy > Virtual registry.If an existing registry, select Create registry. From the dropdown list, select Maven.Do not have an existing registry, from the dropdown list, select Maven. Then, select Create registry.Enter a Name and optional Description.Select Create registry.Manage upstream registriesManage upstream Maven registries in a virtual registry.Create a Maven upstream registryCreate a Maven upstream registry to connect to the virtual registry.Prerequisites:You must have a Maven virtual registry. For more information, see Create a virtual registry.To create a Maven upstream the top bar, select Search or go to and find your group. This group must be at the top level.Select Deploy > Virtual registry.Under Registry types, select View registries.Under the Registries tab, select a registry.Select Add upstream. If the virtual registry has existing upstreams, from the dropdown list, select new upstream to configure the upstream.Link existing upstream > Select existing upstream.From the dropdown list, select an upstream.Optional. Select Test upstream to test the upstream connection before you create it.Select Add upstream.Complete the fields.Include both a username and password, or neither. If not set, a public (anonymous) request is used to access the upstream.If you want to connect the upstream to Maven Central, use the following as the Upstream ://repo1.maven.org/maven2Artifact caching period and Metadata caching period default to 24 hours. Set to 0 to disable cache entry checks, or if you’re using Maven Central.If you want to test the upstream connection before you create it, select Test upstream.Select Create upstream.For more information about cache validity settings, see Set the cache validity period.Use the Maven virtual registryAfter you create a virtual registry, you must configure Maven clients to pull dependencies through the virtual registry.Configure Maven clientsThe Maven virtual registry supports the following Maven must declare virtual registries in the Maven client configuration.All clients must be authenticated. For the client authentication, you can use a custom HTTP header or Basic Auth. You should use one of the configurations below for each client.mvnToken typeName must beTokenPersonal access tokenPrivate-TokenPaste token as-is, or define an environment variable to hold the token.Group deploy tokenDeploy-TokenPaste token as-is, or define an environment variable to hold the token.Group access tokenPrivate-TokenPaste token as-is, or define an environment variable to hold the token.CI/CD Job tokenJob-Token${CI_JOB_TOKEN}OAuth 2.0 tokenAuthorizationBearer <your_oauth_token>Add the following section to your settings.xml file.<settings> <servers> <server> <id>gitlab-maven</id> <configuration> <httpHeaders> <property> <name>REPLACE_WITH_NAME</name> <value>REPLACE_WITH_TOKEN</value> </property> </httpHeaders> </configuration> </server> </servers> </settings>You can configure the virtual registry in mvn applications in one of two an additional registry on top of the default registry (Maven central). In this configuration, you can pull the project dependencies that are present in both the virtual registry and the default registry from any of the declared registries.As a replacement of the default registry (Maven central). With this configuration, dependencies are pulled through the virtual registry. You should configure Maven central as the last upstream of the virtual registry to avoid missing required public dependencies.To configure a Maven virtual registry as an additional registry, in the pom.xml file, add a repository element:<repositories> <repository> <id>gitlab-maven</id> <url>https://gitlab.example.com/api/v4/virtual_registries/packages/maven/<registry_id></url> </repository> </repositories><id>: The same ID of the <server> used in the settings.xml.<registry_id>: The ID of the Maven virtual registry.To configure a Maven virtual registry as a replacement of the default registry, in the settings.xml, add a mirrors element:<settings> <servers> ... </servers> <mirrors> <mirror> <id>central-proxy</id> <name>GitLab proxy of central repo</name> <url>https://gitlab.example.com/api/v4/virtual_registries/packages/maven/<registry_id></url> <mirrorOf>central</mirrorOf> </mirror> </mirrors> </settings><registry_id>: The ID of the Maven virtual registry.gradleToken typeName must beTokenPersonal access tokenPrivate-TokenPaste token as-is, or define an environment variable to hold the token.Group deploy tokenDeploy-TokenPaste token as-is, or define an environment variable to hold the token.Group access tokenPrivate-TokenPaste token as-is, or define an environment variable to hold the token.CI/CD Job tokenJob-Token${CI_JOB_TOKEN}OAuth 2.0 tokenAuthorizationBearer <your_oauth_token>In your GRADLE_USER_HOME directory, create a file gradle.properties with the following =REPLACE_WITH_YOUR_TOKENAdd a repositories section to your build.gradle.In Groovy { maven { url \"https://gitlab.example.com/api/v4/virtual_registries/packages/maven/<registry_id>\" name \"GitLab\" credentials(HttpHeaderCredentials) { name = 'REPLACE_WITH_NAME' value = gitLabPrivateToken } authentication { header(HttpHeaderAuthentication) } } }In Kotlin { maven { url = uri(\"https://gitlab.example.com/api/v4/virtual_registries/packages/maven/<registry_id>\") name = \"GitLab\" credentials(HttpHeaderCredentials::class) { name = \"REPLACE_WITH_NAME\" value = findProperty(\"gitLabPrivateToken\") as String? } authentication { create(\"header\", HttpHeaderAuthentication::class) } } }<registry_id>: The ID of the Maven virtual registry.sbtToken typeUsername must beTokenPersonal access tokenThe username of the userPaste token as-is, or define an environment variable to hold the token.Group deploy tokenThe username of deploy tokenPaste token as-is, or define an environment variable to hold the token.Group access tokenThe username of the user linked to the access tokenPaste token as-is, or define an environment variable to hold the token.CI/CD Job tokengitlab-ci-tokensys.env.get(\"CI_JOB_TOKEN\").getAuthentication for SBT is based on basic HTTP Authentication. You must provide a name and a password.In your build.sbt, add the following += (\"gitlab\" at \"<endpoint_url>\") credentials += Credentials(\"GitLab Virtual Registry\", \"<host>\", \"<username>\", \"<token>\")<endpoint_url>: The Maven virtual registry URL. For example, https://gitlab.example.com/api/v4/virtual_registries/packages/maven/<registry_id>, where <registry_id> is the ID of the Maven virtual registry.<host>: The host present in the <endpoint_url> without the protocol scheme or the port. For example, gitlab.example.com.<username>: The username.<token>: The configured token.Make sure that the first argument of Credentials is \"GitLab Virtual Registry\". This realm name must exactly match the Basic Auth realm sent by the Maven virtual registry.TroubleshootingWhen working with Maven virtual registries, you might encounter the following issues.Error: Connect to gitlab.example.com:443 timed outYou might get intermittent connection timeout errors when pulling Maven dependencies through the virtual registry, such to gitlab.example.com:443 timed outThis issue can occur on GitLab Self-Managed instances when the upstream registry URL resolves to a local network address. By default, GitLab blocks outbound requests to local network addresses for security reasons.To resolve this the upper-right corner, select Admin.In the left sidebar, select Settings > Network.Expand Outbound requests.Select the Allow requests to the local network from webhooks and integrations checkbox.Optional. If you prefer to allow only specific addresses instead of all local network requests, in Local IP addresses and domain names that hooks and integrations can access, add the hostname or IP address of your upstream registry.Select Save changes.For more information, see allow requests to the local network.PrerequisitesManage virtual registriesCreate a Maven virtual registryManage upstream registriesCreate a Maven upstream registryUse the Maven virtual registryConfigure Maven to gitlab.example.com:443 timed out\n\nExample:\n```plaintext\nhttps://repo1.maven.org/maven2\n```\n\nExample:\n```xml\n<settings>\n  <servers>\n    <server>\n      <id>gitlab-maven</id>\n      <configuration>\n        <httpHeaders>\n          <property>\n            <name>REPLACE_WITH_NAME</name>\n            <value>REPLACE_WITH_TOKEN</value>\n          </property>\n        </httpHeaders>\n      </configuration>\n    </server>\n  </servers>\n</settings>\n```\n\nExample:\n```xml\n<repositories>\n  <repository>\n    <id>gitlab-maven</id>\n    <url>https://gitlab.example.com/api/v4/virtual_registries/packages/maven/<registry_id></url>\n  </repository>\n</repositories>\n```\n\nExample:\n```xml\n<settings>\n  <servers>\n    ...\n  </servers>\n  <mirrors>\n    <mirror>\n      <id>central-proxy</id>\n      <name>GitLab proxy of central repo</name>\n      <url>https://gitlab.example.com/api/v4/virtual_registries/packages/maven/<registry_id></url>\n      <mirrorOf>central</mirrorOf>\n    </mirror>\n  </mirrors>\n</settings>\n```\n\nExample:\n```properties\ngitLabPrivateToken=REPLACE_WITH_YOUR_TOKEN\n```\n\nExample:\n```groovy\nrepositories {\n    maven {\n        url \"https://gitlab.example.com/api/v4/virtual_registries/packages/maven/<registry_id>\"\n        name \"GitLab\"\n        credentials(HttpHeaderCredentials) {\n            name = 'REPLACE_WITH_NAME'\n            value = gitLabPrivateToken\n        }\n        authentication {\n            header(HttpHeaderAuthentication)\n        }\n    }\n}\n```\n\nExample:\n```kotlin\nrepositories {\n    maven {\n        url = uri(\"https://gitlab.example.com/api/v4/virtual_registries/packages/maven/<registry_id>\")\n        name = \"GitLab\"\n        credentials(HttpHeaderCredentials::class) {\n            name = \"REPLACE_WITH_NAME\"\n            value = findProperty(\"gitLabPrivateToken\") as String?\n        }\n        authentication {\n            create(\"header\", HttpHeaderAuthentication::class)\n        }\n    }\n}\n```\n\nExample:\n```scala\nresolvers += (\"gitlab\" at \"<endpoint_url>\")\n\ncredentials += Credentials(\"GitLab Virtual Registry\", \"<host>\", \"<username>\", \"<token>\")\n```\n\nExample:\n```plaintext\nConnect to gitlab.example.com:443 failed: Connect timed out\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:12.802Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":9,"totalLines":105,"estimatedTokens":3341}}303{"id":"doc-state_management_guidance_gitlab_docs-1d4fea37","source":"documentation","title":"State management guidance | GitLab Docs","url":"https://docs.gitlab.com/development/fe_guide/state_management/","text":"Contribute to a GitLab contributionArchitectureDevelopment Rake tasksDevelopment processesDevelopment style guidesAdvanced search migration style guideAPI style guideCaching guidelinesFrontend style guidesFrontend GoalsGemfile guidelinesGems development guidelinesGo standards and style guidelinesGraphQL API style guideShell command guidelinesHTML style guideJavaScript style guidePerformance guidelinesPython guidelinesRefactoring guideRuboCop rule guidelinesRuby style guideSCSS style guideSecure coding guidelinesSoftware design guidesState managementPiniaShell scripting standards and style guidelinesTypeScript style guideVue style guideFeature developmentGitLab project pipelinesContribute to GitLab RunnerContribute to GitLab PagesContribute to GitLab DistributionContribute to documentationGitLab Docs /Contribute /Contribute to GitLab /Development style guides /State managementHelp us learn about your current experience with the documentation. Take the survey.State management guidanceAt GitLab we support two solutions for client state and Pinia. It is non-trivial to pick either of these as your primary state manager. This page should provide you with general guidance on how to make this choice.You may also see Vuex in the GitLab codebase. Vuex is deprecated in GitLab and no new Vuex stores should be created. If your app has a Vuex store, consider migrating.Difference between state and dataData is information that user interacts with. It usually comes from external requests (GraphQL or REST) or from the page itself.State stores information about user or system interactions. For example any flag is considered , isFormVisible, etc.State management could be used to work with both state and data.Do I need to have state management?You should prefer using the standard Vue data flow in your application define local state and pass it down through props and change it through events.However this might not be sufficient for complex cases where state is shared between multiple components that are not direct descendants of the component which defined this state. You might consider hoisting that state to the root of your application, but that eventually bloats the root component because it starts to do too many things at once.To deal with that complexity you can use a state management solution. The sections below will help you with this choice. If you’re still uncertain, prefer using Apollo before Pinia.ApolloApollo, our primary interface to GraphQL API, can also be used as a client-side state manager. Learn more about GraphQL and Apollo.StrengthsGreat for working with data from GraphQL requests, provides data normalization out of the box.Can cache data from REST API when GraphQL is not available.Queries are statically verified against the GraphQL schema.WeaknessesMore complex and involved than Pinia for client state management.Apollo ’t properly work on a significant part of our pages, Apollo Client errors are hard to track down.Pick Apollo whenYou rely on the GraphQL APIYou need specific Apollo features, for cache, cache invalidationPollingStale While RevalidateReal-time updatesOtherPiniaPinia is the client-side state management tool Vue recommends. Learn more about Pinia at GitLab.StrengthsSimple but robustLightweight at ≈1.5kb (as quoted by the Pinia site)Vue reactivity under the hood, API similar to VuexEasy to debugWeaknessesCan’t do any advanced request handling out of the box (data normalization, polling, caching, etc.)Can lead to same pitfalls as Vuex without guidance (overblown stores)Pick Pinia when you have any of theseSignificant percentage of Vue application state is client-side stateMigrating from Vuex is a high priorityYour application does not rely primarily on GraphQL API, and you don’t plan the migration to GraphQL API in the near futureCombining Pinia and ApolloWe recommend you pick either Apollo or Pinia as the only state manager in your app. Combining them is not recommended and Apollo are both global stores, which means sharing responsibilities and having two sources of truth.Difference in mental is configuration based, Pinia is not. Switching between these mental models is tedious and error-prone.Experiencing the drawbacks of both approaches.However there may be cases when it’s OK to combine these two to seek specific benefits from both there’s a significant percentage of client-side state that would be best managed in Pinia.If domain-specific concerns warrant Apollo for cohesive GraphQL requests within a component.If you have to use both Apollo and Pinia, follow these use Apollo Client in Pinia stores. Apollo Client should only be consumed within a Vue component or a composable.Do not sync data between Apollo and Pinia.You should have only one source of truth for your requests.Add Apollo to an existing app with PiniaYou can have Apollo data management in your components alongside existing Pinia state when you to work with data coming from GraphQLCan’t migrate from Pinia to Apollo because of high migration effortDon’t try to manage client state (not to be confused with GraphQL or REST data) with Apollo and Pinia at the same time, consider migrating from Pinia to Apollo if you need this. Don’t use Apollo inside Pinia stores.Add Pinia to an existing app with ApolloStrongly consider using Apollo for client-side state management first. However, if all of the following are true, Apollo might not be the best tool for managing this client-side the footprint of client-side state is significant enough that there’s a high implementation cost due to Apollo’s complexities.If the client-side state can be nicely decoupled from the Apollo managed GraphQL API data.Vuex used alongside ApolloVuex is deprecated in GitLab, use the guidance above to pick either Apollo or Pinia as your primary state manager. Follow the corresponding migration or Pinia. Do not add new Pinia stores on top of the existing Vuex store, migrate first.Difference between state and dataDo I need to have state management?ApolloStrengthsWeaknessesPick Apollo whenPiniaStrengthsWeaknessesPick Pinia when you have any of theseCombining Pinia and ApolloAdd Apollo to an existing app with PiniaAdd Pinia to an existing app with ApolloVuex used alongside Apollo\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:12.816Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":0,"totalLines":3,"estimatedTokens":1561}}304{"id":"doc-sre_considerations_for_gitaly_on_aws_gitlab_docs-dc479ede","source":"documentation","title":"SRE Considerations for Gitaly on AWS | GitLab Docs","url":"https://docs.gitlab.com/solutions/cloud/aws/gitaly_sre_for_aws/","text":"CloudAWS SolutionsGitLab partnership qualifications from AWSGitLab AWS integrations indexGitLab Instances on AWSProvision GitLab on a single EC2 instance in AWSSRE considerations for Gitaly on AWSGitLab and AWS Integration TutorialsCoding Languages and FrameworksIntegrationsSolution ComponentsGitLab Docs /Solutions /Cloud /AWS Solutions /SRE considerations for Gitaly on AWSHelp us learn about your current experience with the documentation. Take the survey.SRE Considerations for Gitaly on , Premium, Self-ManagedGitaly SRE considerationsGitaly is an embedded service for Git Repository Storage. Gitaly and Gitaly Cluster (Praefect) have been engineered by GitLab to overcome fundamental challenges with horizontal scaling of the open source Git binaries that must be used on the service side of GitLab. Here is in-depth technical reading on the Gitaly was builtIf you would like to understand the underlying rationale on why GitLab had to invest in creating Gitaly, read the following minimal list of characteristics that make horizontal scaling difficultGit architectural characteristics and assumptionsEffects on horizontal compute architectureEvidence to back building a new horizontal layer to scale GitGitaly and Praefect electionsAs part of Gitaly Cluster (Praefect) consistency, Praefect nodes must occasionally vote on what data copy is the most accurate. This requires an uneven number of Praefect nodes to avoid stalemates. This means that for HA, Gitaly and Praefect require a minimum of three nodes.Gitaly performance monitoringComplete performance metrics should be collected for Gitaly instances for identification of bottlenecks, as they could have to do with disk IO, network IO, or memory.Gitaly performance guidelinesGitaly functions as the primary Git Repository Storage in GitLab. However, it’s not a streaming file server. It also does a lot of demanding computing work, such as preparing and caching Git packfiles which informs some of the performance recommendations below.All recommendations are for production configurations, including performance testing. For test configurations, like training or functional testing, you can use less expensive options. However, you should adjust or rebuild if performance is an issue.Overall recommendationsProduction-grade Gitaly must be implemented on instance compute due to all of the previous and following characteristics.Never use burstable instance types (such as t2, t3, t4g) for Gitaly.Always use at least the AWS Nitro generation of instances to ensure many of the below concerns are automatically handled.Use Amazon Linux 2 to ensure that all AWS oriented hardware and OS optimizations are maximized without additional configuration or SRE management.CPU and memory recommendationsThe general GitLab Gitaly node recommendations for CPU and Memory assume relatively even loading across repositories. GitLab Performance Tool (GPT) testing of any non-characteristic repositories and/or SRE monitoring of Gitaly metrics may inform when to choose memory and/or CPU higher than general recommendations.To packfile operations are memory and CPU intensive.If repository commit traffic is dense, large, or very frequent, then more CPU and Memory are required to handle the load. Patterns such as storing binaries and/or busy or large monorepos are examples that can cause high loading.Disk I/O recommendationsUse only SSD storage and the class of Elastic Block Store (EBS) storage that suits your durability and speed requirements.When not using provisioned EBS IO, EBS volume size determines the I/O level, so provisioning volumes that are much larger than needed can be the least expensive way to improve EBS IO.If Gitaly performance monitoring shows signs of disk stress then one of the provisioned IOPS levels can be chosen. EBS IOPS levels also have enhanced durability which may be appealing for some implementations aside from performance considerations.To storage is expected to be local (not NFS of any type including EFS).Gitaly servers also need disk space for building and caching Git packfiles. This is above and beyond the permanent storage of your Git Repositories.Git packfiles are cached in Gitaly. Creation of packfiles in temporary disk benefits from fast disk, and disk caching of packfiles benefits from ample disk space.Network I/O recommendationsUse only instance types from the list of ones that support Elastic Network Adapter (ENA) advanced networking to ensure that cluster replication latency is not due to instance level network I/O bottlenecks.Choose instances with sizes with more than 10 Gbps - but only if needed and only when having proven a node level network bottleneck with monitoring and/or stress testing.To nodes do the main work of streaming repositories for push and pull operations (to add development endpoints, and to CI/CD).Gitaly servers need reasonable low latency between cluster nodes and with Praefect services in order for the cluster to maintain operational and data integrity.Gitaly nodes should be selected with network bottleneck avoidance as a primary consideration.Gitaly nodes should be monitored for network saturation.Not all networking issues can be solved through optimizing the node level Cluster (Praefect) node replication depends on all networking between nodes.Gitaly networking performance to pull and push endpoints depends on all networking in between.AWS Gitaly backupDue to the nature of how Praefect tracks the replication metadata of Gitaly disk information, the best backup method is the official backup and restore Rake tasks.AWS Gitaly recoveryGitaly Cluster (Praefect) does not support snapshot backups as these can cause issues where the Praefect database becomes out of sync with the disk storage. Due to the nature of how Praefect rebuilds the replication metadata of Gitaly disk information during a restore, the best recovery method is the official backup and restore Rake tasks.Gitaly long term managementGitaly node disk sizes must be monitored and increased to accommodate Git repository growth and Gitaly temporary and caching storage needs. The storage configuration on all nodes should be kept identical.Gitaly SRE considerationsWhy Gitaly was builtGitaly and Praefect electionsGitaly performance monitoringGitaly performance guidelinesOverall recommendationsCPU and memory recommendationsDisk I/O recommendationsNetwork I/O recommendationsAWS Gitaly backupAWS Gitaly recoveryGitaly long term management\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:13.627Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":0,"totalLines":3,"estimatedTokens":1619}}305{"id":"doc-keep_around_ref_usage_guidelines_gitlab_docs-45aa20b9","source":"documentation","title":"Keep-around ref usage guidelines | GitLab Docs","url":"https://docs.gitlab.com/development/merge_request_concepts/keep_around_refs/","text":"Contribute to a GitLab contributionArchitectureDevelopment Rake tasksDevelopment processesAccessing session dataAI featuresAvoiding required stopsBackwards compatibilityChangelog entriesChatOps on GitLab.comCloud ConnectorCode review guidelinesDanger botData deletion guidelinesDependenciesDeprecation guidelinesEE featuresEmailsExperimentsFeature categorizationFeatures in .gitlab directoryFeature flags for GitLab developmentFIPS complianceFramework - DeclarativePolicyGitLab Dedicated featuresGotchasImage scalingIssues workflowInteracting componentsLabelsLicensingMaintenance modeMerge request conceptsMerge request diffs development guideWorking with diffsApplication and rate limit guidelinesFrontend overviewMergeability frameworkPerformance guidelinesKeep-around ref usage guidelinesMerge request workflowProfilingRails EndpointsRails initializersRails upgrade guidelinesReusing AbstractionsRenaming featuresRepository mirroringRuby upgrade guidelinesRuby 3 gotchasSecure partner onboarding processShared filesStorageTesting standards and stylesTesting (contract)End-to-end TestingTranslate GitLabURLs in GitLabWebhooksDevelopment style guidesFeature developmentGitLab project pipelinesContribute to GitLab RunnerContribute to GitLab PagesContribute to GitLab DistributionContribute to documentationGitLab Docs /Contribute /Contribute to GitLab /Development processes /Merge request concepts /Keep-around ref usage guidelinesHelp us learn about your current experience with the documentation. Take the survey.Keep-around ref usage guidelinesWhat are keep-around refsKeep-around refs protect specific commits from the Git garbage collection process. While Git GC usually removes unreferenced commits (those not reachable through branches or tags), there are cases where preserving these orphaned commits is essential - such as maintaining commit comments and CI build history. By creating a keep-around ref, we ensure these commits remain in the repository even when they’re no longer part of the active branch history.For more information about developing with Git references on Gitaly, see Git references used by Gitaly.Downsides of keep-around refsKeeping the orphaned commits using keep-around refs comes with its own set of challenges.Its growth is untenable (gitlab-org/gitlab has about 1.2 GB of refs)The actual usage of these keep-around refs is spread across so it’s hard to know exactly where these keep-around refs are expected to existIt’s time-consuming to check the needs of keep-around refs as we need to consider all possible places they could be referencedWe could be keeping more commits than necessary because the ancestors of already preserved commits don’t have to be kept around, but it’s hard to verify that and clean up efficientlyDue to the downsides mentioned above, we should not be adding more places where we create keep-around refs. Instead consider alternative options such as scoped refs (like refs/merge-requests/<merge-request-iid>/head) or avoid creating these refs altogether if at all possible.UsageFollowing is a typical way to create a keep-around ref for the given commit SHA.project.repository.keep_around(sha, )This command creates a ref called refs/keep-around/<SHA> where <SHA> is the commit SHA that is being kept around. This prevents the commit SHA and all parent commits from being garbage collected as we now have a ref that points to the commit directly. source is used as a way for us to attribute the keep-around ref creations to specific classes.Where keep-around refs are currently createdHere are the places where we currently create keep-around refs.MergeRequest#keep_around_commit(merge_commit_sha) with the after_save callbackMergeRequestDiff#keep_around_commits(start_commit_sha, head_commit_sha) for both target and source projects with the after_create callbackNote#keep_around_commit(commit_id) with the after_save callbackDraftNotes::PublishService#keep_around_commits(shas) as it publishes draft notes in bulk and shas are from both original_position and positionDiffNote#keep_around_commits(sha) similar to above, but just for a single DiffNote with the after_save callback if it was not skipped for bulk insertCi::Pipeline#keep_around_commits(sha, before_sha) with the after_create callbackFuture workDue to the uncontrolled growth of keep-around refs and lack of visibility, Keep Around Refs Working Group is currently working the number of existing keep-around refsImprove visibility into how and where keep-around refs are usedDevelop alternative solutions with better scalabilityWe should avoid creating more keep-around refs whenever possible and look for alternative solutions.gitlab::keep_around::orphaned Rake task has been created to help us to identify orphaned keep-around refs.What are keep-around refsDownsides of keep-around refsUsageWhere keep-around refs are currently createdFuture work\n\nExample:\n```ruby\nproject.repository.keep_around(sha, source: self.class.name)\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:13.802Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":1,"totalLines":8,"estimatedTokens":1244}}306{"id":"doc-writing_consumer_tests_gitlab_docs-dbfbafc9","source":"documentation","title":"Writing consumer tests | GitLab Docs","url":"https://docs.gitlab.com/development/testing_guide/contract/consumer_tests/","text":"Contribute to a GitLab contributionArchitectureDevelopment Rake tasksDevelopment processesAccessing session dataAI featuresAvoiding required stopsBackwards compatibilityChangelog entriesChatOps on GitLab.comCloud ConnectorCode review guidelinesDanger botData deletion guidelinesDependenciesDeprecation guidelinesEE featuresEmailsExperimentsFeature categorizationFeatures in from 'jest-pact'; pactWith(PactOptions, PactFn);The PactOptions parameterPactOptions with jest-pact introduces additional options that build on top of the ones provided in pact-js. In most cases, you define the consumer, provider, log, and dir options for these tests.import { pactWith } from 'jest-pact'; pactWith( { consumer: 'MergeRequests#show', provider: 'GET discussions', log: '../logs/consumer.log', dir: '../contracts/project/merge_requests/show', }, PactFn );For more information about how to name consumers and providers, see Naming conventions.The PactFn parameterThe PactFn is where your tests are defined. This is where you set up the mock provider and where you can use the standard Jest methods like Jest.describe, Jest.beforeEach, and Jest.it. For more information, see https://jestjs.io/docs/api.import { pactWith } from 'jest-pact'; pactWith( { consumer: 'MergeRequests#show', provider: 'GET discussions', log: '../logs/consumer.log', dir: '../contracts/project/merge_requests/show', }, (provider) => { describe('GET discussions', () => { beforeEach(() => { }); it('return a successful body', async () => { }); }); }, );Set up the mock providerBefore you run your test, set up the mock provider that handles the specified requests and returns a specified response. To do that, define the state and the expected request and response in an Interaction.For this tutorial, define four attributes for the : A description of what the prerequisite state is before the request is made.uponReceiving: A description of what kind of request this Interaction is handling.withRequest: Where you define the request specifications. It contains the request method, path, and any headers, body, or query.willRespondWith: Where you define the expected response. It contains the response status, headers, and body.After you define the Interaction, add that interaction to the mock provider by calling addInteraction.import { pactWith } from 'jest-pact'; import { Matchers } from '@pact-foundation/pact'; pactWith( { consumer: 'MergeRequests#show', provider: 'GET discussions', log: '../logs/consumer.log', dir: '../contracts/project/merge_requests/show', }, (provider) => { describe('GET discussions', () => { beforeEach(() => { const interaction = { state: 'a merge request with discussions exists', uponReceiving: 'a request for discussions', withRequest: { method: 'GET', path: '/gitlab-org/gitlab-qa/-/merge_requests/1/discussions.json', headers: { Accept: '*/*', }, }, willRespondWith: { , headers: { 'Content-Type': 'application/json; charset=utf-8', }, ({ ('fd73763cbcbf7b29eb8765d969a38f7d735e222a'), (6954442), ... (true) }), }, }; provider.addInteraction(interaction); }); it('return a successful body', async () => { }); }); }, );Response body MatchersNotice how we use Matchers in the body of the expected response. This allows us to be flexible enough to accept different values but still be strict enough to distinguish between valid and invalid values. We must ensure that we have a tight definition that is neither too strict nor too lax. Read more about the different types of Matchers. We are currently using the V2 matching rules.Write the testAfter the mock provider is set up, you can write the test. For this test, you make a request and expect a particular response.First, set up the client that makes the API request. To do that, create spec/contracts/consumer/resources/api/project/merge_requests.js and add the following API request. If the endpoint is a GraphQL, then we create it under spec/contracts/consumer/resources/graphql instead.import axios from 'axios'; export async function getDiscussions(endpoint) { const { url } = endpoint; return axios({ method: 'GET', , url: '/gitlab-org/gitlab-qa/-/merge_requests/1/discussions.json', headers: { Accept: '*/*' }, }) }After that’s set up, import it to the test file and call it to make the request. Then, you can make the request and define your expectations.import { pactWith } from 'jest-pact'; import { Matchers } from '@pact-foundation/pact'; import { getDiscussions } from '../../../resources/api/project/merge_requests'; pactWith( { consumer: 'MergeRequests#show', provider: 'GET discussions', log: '../logs/consumer.log', dir: '../contracts/project/merge_requests/show', }, (provider) => { describe('GET discussions', () => { beforeEach(() => { const interaction = { state: 'a merge request with discussions exists', uponReceiving: 'a request for discussions', withRequest: { method: 'GET', path: '/gitlab-org/gitlab-qa/-/merge_requests/1/discussions.json', headers: { Accept: '*/*', }, }, willRespondWith: { , headers: { 'Content-Type': 'application/json; charset=utf-8', }, ({ ('fd73763cbcbf7b29eb8765d969a38f7d735e222a'), (6954442), ... (true) }), }, }; }); it('return a successful body', async () => { const discussions = await getDiscussions({ , }); expect(discussions).toEqual(Matchers.eachLike({ id: 'fd73763cbcbf7b29eb8765d969a38f7d735e222a', , ... })); }); }); }, );There we have it! The consumer test is now set up. You can now try running this test.Improve test readabilityAs you may have noticed, the request and response definitions can get large. This results in the test being difficult to read, with a lot of scrolling to find what you want. You can make the test easier to read by extracting these out to a fixture.Create a file under spec/contracts/consumer/fixtures/project/merge_requests called discussions.fixture.js where you will place the request and response definitions.import { Matchers } from '@pact-foundation/pact'; const body = Matchers.eachLike({ ('fd73763cbcbf7b29eb8765d969a38f7d735e222a'), (6954442), ... (true) }); const Discussions = { (body), success: { , headers: { 'Content-Type': 'application/json; charset=utf-8', }, body, }, scenario: { state: 'a merge request with discussions exists', uponReceiving: 'a request for discussions', }, request: { withRequest: { method: 'GET', path: '/gitlab-org/gitlab-qa/-/merge_requests/1/discussions.json', headers: { Accept: '*/*', }, }, }, }; exports.Discussions = Discussions;With all of that moved to the fixture, you can simplify the test to the { pactWith } from 'jest-pact'; import { Discussions } from '../../../fixtures/project/merge_requests/discussions.fixture'; import { getDiscussions } from '../../../resources/api/project/merge_requests'; const CONSUMER_NAME = 'MergeRequests#show'; const PROVIDER_NAME = 'GET discussions'; const CONSUMER_LOG = '../logs/consumer.log'; const CONTRACT_DIR = '../contracts/project/merge_requests/show'; pactWith( { , , , , }, (provider) => { describe(PROVIDER_NAME, () => { beforeEach(() => { const interaction = { ...Discussions.scenario, ...Discussions.request, , }; provider.addInteraction(interaction); }); it('return a successful body', async () => { const discussions = await getDiscussions({ , }); expect(discussions).toEqual(Discussions.body); }); }); }, );Create the skeletonThe pactWith functionThe PactOptions parameterThe PactFn parameterSet up the mock providerResponse body MatchersWrite the testImprove test readability\n\nExample:\n```javascript\nimport { pactWith } from 'jest-pact';\n\npactWith(PactOptions, PactFn);\n```\n\nExample:\n```javascript\nimport { pactWith } from 'jest-pact';\n\npactWith(\n  {\n    consumer: 'MergeRequests#show',\n    provider: 'GET discussions',\n    log: '../logs/consumer.log',\n    dir: '../contracts/project/merge_requests/show',\n  },\n  PactFn\n);\n```\n\nExample:\n```javascript\nimport { pactWith } from 'jest-pact';\n\npactWith(\n  {\n    consumer: 'MergeRequests#show',\n    provider: 'GET discussions',\n    log: '../logs/consumer.log',\n    dir: '../contracts/project/merge_requests/show',\n  },\n\n  (provider) => {\n    describe('GET discussions', () => {\n      beforeEach(() => {\n\n      });\n\n      it('return a successful body', async () => {\n\n      });\n    });\n  },\n);\n```\n\nExample:\n```javascript\nimport { pactWith } from 'jest-pact';\nimport { Matchers } from '@pact-foundation/pact';\n\npactWith(\n  {\n    consumer: 'MergeRequests#show',\n    provider: 'GET discussions',\n    log: '../logs/consumer.log',\n    dir: '../contracts/project/merge_requests/show',\n  },\n\n  (provider) => {\n    describe('GET discussions', () => {\n      beforeEach(() => {\n        const interaction = {\n          state: 'a merge request with discussions exists',\n          uponReceiving: 'a request for discussions',\n          withRequest: {\n            method: 'GET',\n            path: '/gitlab-org/gitlab-qa/-/merge_requests/1/discussions.json',\n            headers: {\n              Accept: '*/*',\n            },\n          },\n          willRespondWith: {\n            status: 200,\n            headers: {\n              'Content-Type': 'application/json; charset=utf-8',\n            },\n            body: Matchers.eachLike({\n              id: Matchers.string('fd73763cbcbf7b29eb8765d969a38f7d735e222a'),\n              project_id: Matchers.integer(6954442),\n              ...\n              resolved: Matchers.boolean(true)\n            }),\n          },\n        };\n        provider.addInteraction(interaction);\n      });\n\n      it('return a successful body', async () => {\n\n      });\n    });\n  },\n);\n```\n\nExample:\n```javascript\nimport axios from 'axios';\n\nexport async function getDiscussions(endpoint) {\n  const { url } = endpoint;\n\n  return axios({\n    method: 'GET',\n    baseURL: url,\n    url: '/gitlab-org/gitlab-qa/-/merge_requests/1/discussions.json',\n    headers: { Accept: '*/*' },\n  })\n}\n```\n\nExample:\n```javascript\nimport { pactWith } from 'jest-pact';\nimport { Matchers } from '@pact-foundation/pact';\n\nimport { getDiscussions } from '../../../resources/api/project/merge_requests';\n\npactWith(\n  {\n    consumer: 'MergeRequests#show',\n    provider: 'GET discussions',\n    log: '../logs/consumer.log',\n    dir: '../contracts/project/merge_requests/show',\n  },\n\n  (provider) => {\n    describe('GET discussions', () => {\n      beforeEach(() => {\n        const interaction = {\n          state: 'a merge request with discussions exists',\n          uponReceiving: 'a request for discussions',\n          withRequest: {\n            method: 'GET',\n            path: '/gitlab-org/gitlab-qa/-/merge_requests/1/discussions.json',\n            headers: {\n              Accept: '*/*',\n            },\n          },\n          willRespondWith: {\n            status: 200,\n            headers: {\n              'Content-Type': 'application/json; charset=utf-8',\n            },\n            body: Matchers.eachLike({\n              id: Matchers.string('fd73763cbcbf7b29eb8765d969a38f7d735e222a'),\n              project_id: Matchers.integer(6954442),\n              ...\n              resolved: Matchers.boolean(true)\n            }),\n          },\n        };\n      });\n\n      it('return a successful body', async () => {\n        const discussions = await getDiscussions({\n          url: provider.mockService.baseUrl,\n        });\n\n        expect(discussions).toEqual(Matchers.eachLike({\n          id: 'fd73763cbcbf7b29eb8765d969a38f7d735e222a',\n          project_id: 6954442,\n          ...\n          resolved: true\n        }));\n      });\n    });\n  },\n);\n```\n\nExample:\n```javascript\nimport { Matchers } from '@pact-foundation/pact';\n\nconst body = Matchers.eachLike({\n  id: Matchers.string('fd73763cbcbf7b29eb8765d969a38f7d735e222a'),\n  project_id: Matchers.integer(6954442),\n  ...\n  resolved: Matchers.boolean(true)\n});\n\nconst Discussions = {\n  body: Matchers.extractPayload(body),\n\n  success: {\n    status: 200,\n    headers: {\n      'Content-Type': 'application/json; charset=utf-8',\n    },\n    body,\n  },\n\n  scenario: {\n    state: 'a merge request with discussions exists',\n    uponReceiving: 'a request for discussions',\n  },\n\n  request: {\n    withRequest: {\n      method: 'GET',\n      path: '/gitlab-org/gitlab-qa/-/merge_requests/1/discussions.json',\n      headers: {\n        Accept: '*/*',\n      },\n    },\n  },\n};\n\nexports.Discussions = Discussions;\n```\n\nExample:\n```javascript\nimport { pactWith } from 'jest-pact';\n\nimport { Discussions } from '../../../fixtures/project/merge_requests/discussions.fixture';\nimport { getDiscussions } from '../../../resources/api/project/merge_requests';\n\nconst CONSUMER_NAME = 'MergeRequests#show';\nconst PROVIDER_NAME = 'GET discussions';\nconst CONSUMER_LOG = '../logs/consumer.log';\nconst CONTRACT_DIR = '../contracts/project/merge_requests/show';\n\npactWith(\n  {\n    consumer: CONSUMER_NAME,\n    provider: PROVIDER_NAME,\n    log: CONSUMER_LOG,\n    dir: CONTRACT_DIR,\n  },\n\n  (provider) => {\n    describe(PROVIDER_NAME, () => {\n      beforeEach(() => {\n        const interaction = {\n          ...Discussions.scenario,\n          ...Discussions.request,\n          willRespondWith: Discussions.success,\n        };\n        provider.addInteraction(interaction);\n      });\n\n      it('return a successful body', async () => {\n        const discussions = await getDiscussions({\n          url: provider.mockService.baseUrl,\n        });\n\n        expect(discussions).toEqual(Discussions.body);\n      });\n    });\n  },\n);\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:13.814Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":8,"totalLines":261,"estimatedTokens":3331}}307{"id":"doc-react_compiler_react-62371402","source":"documentation","title":"React Compiler – React","url":"https://react.dev/learn/react-compiler","text":"Reactv19.2Search⌘CtrlKLearnReferenceCommunityBlogGET STARTEDQuick Start Thinking in React Installation Creating a React App Build a React App from Scratch Add React to an Existing Project Setup Editor Setup Using TypeScript React Developer Tools React Compiler Introduction Installation Incremental Adoption Debugging and Troubleshooting LEARN REACTDescribing the UI Your First Component Importing and Exporting Components Writing Markup with JSX JavaScript in JSX with Curly Braces Passing Props to a Component Conditional Rendering Rendering Lists Keeping Components Pure Your UI as a Tree Adding Interactivity Responding to Events Component's Memory Render and Commit State as a Snapshot Queueing a Series of State Updates Updating Objects in State Updating Arrays in State Managing State Reacting to Input with State Choosing the State Structure Sharing State Between Components Preserving and Resetting State Extracting State Logic into a Reducer Passing Data Deeply with Context Scaling Up with Reducer and Context Escape Hatches Referencing Values with Refs Manipulating the DOM with Refs Synchronizing with Effects You Might Not Need an Effect Lifecycle of Reactive Effects Separating Events from Effects Removing Effect Dependencies Reusing Logic with Custom Hooks Learn ReactCopy pageCopyReact CompilerIntroduction Learn what React Compiler does and how it automatically optimizes your React application by handling memoization for you, eliminating the need for manual useMemo, useCallback, and React.memo. Installation Get started with installing React Compiler and learn how to configure it with your build tools. Incremental Adoption Learn strategies for gradually adopting React Compiler in your existing codebase if you’re not ready to enable it everywhere yet. Debugging and Troubleshooting When things don’t work as expected, use our debugging guide to understand the difference between compiler errors and runtime issues, identify common breaking patterns, and follow a systematic debugging workflow. Configuration and Reference For detailed configuration options and API Options - All compiler configuration options including React version compatibility Directives - Function-level compilation control Compiling Libraries - Shipping pre-compiled libraries Additional resources In addition to these docs, we recommend checking the React Compiler Working Group for additional information and discussion about the compiler.PreviousReact Developer ToolsNextIntroductionCopyright © Meta Platforms, Incno uwu plzuwu?Logo by@sawaratsuki1004Learn ReactQuick StartInstallationDescribing the UIAdding InteractivityManaging StateEscape HatchesAPI ReferenceReact APIsReact DOM APIsCommunityCode of ConductMeet the TeamDocs ContributorsAcknowledgementsMoreBlogReact NativePrivacyTermsOn this pageOverviewIntroduction Installation Incremental Adoption Debugging and Troubleshooting Configuration and Reference Additional resources\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:32.856Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":0,"totalLines":3,"estimatedTokens":738}}308{"id":"doc-escape_hatches_react-21f56269","source":"documentation","title":"Escape Hatches – React","url":"https://react.dev/learn/escape-hatches","text":"Reactv19.2Search⌘CtrlKLearnReferenceCommunityBlogGET STARTEDQuick Start Thinking in React Installation Creating a React App Build a React App from Scratch Add React to an Existing Project Setup Editor Setup Using TypeScript React Developer Tools React Compiler Introduction Installation Incremental Adoption Debugging and Troubleshooting LEARN REACTDescribing the UI Your First Component Importing and Exporting Components Writing Markup with JSX JavaScript in JSX with Curly Braces Passing Props to a Component Conditional Rendering Rendering Lists Keeping Components Pure Your UI as a Tree Adding Interactivity Responding to Events Component's Memory Render and Commit State as a Snapshot Queueing a Series of State Updates Updating Objects in State Updating Arrays in State Managing State Reacting to Input with State Choosing the State Structure Sharing State Between Components Preserving and Resetting State Extracting State Logic into a Reducer Passing Data Deeply with Context Scaling Up with Reducer and Context Escape Hatches Referencing Values with Refs Manipulating the DOM with Refs Synchronizing with Effects You Might Not Need an Effect Lifecycle of Reactive Effects Separating Events from Effects Removing Effect Dependencies Reusing Logic with Custom Hooks Learn ReactCopy pageCopyEscape HatchesAdvancedSome of your components may need to control and synchronize with systems outside of React. For example, you might need to focus an input using the browser API, play and pause a video player implemented without React, or connect and listen to messages from a remote server. In this chapter, you’ll learn the escape hatches that let you “step outside” React and connect to external systems. Most of your application logic and data flow should not rely on these features. In this chapter How to “remember” information without re-rendering How to access DOM elements managed by React How to synchronize components with external systems How to remove unnecessary Effects from your components How an Effect’s lifecycle is different from a component’s How to prevent some values from re-triggering Effects How to make your Effect re-run less often How to share logic between components Referencing values with refs When you want a component to “remember” some information, but you don’t want that information to trigger new renders, you can use a ref = useRef(0); Like state, refs are retained by React between re-renders. However, setting state re-renders a component. Changing a ref does not! You can access the current value of that ref through the ref.current property. App.jsApp.jsReloadClearForkimport { useRef } from 'react'; export default function Counter() { let ref = useRef(0); function handleClick() { ref.current = ref.current + 1; alert('You clicked ' + ref.current + ' times!'); } return ( <button onClick={handleClick}> Click me! </button> ); } Show more A ref is like a secret pocket of your component that React doesn’t track. For example, you can use refs to store timeout IDs, DOM elements, and other objects that don’t impact the component’s rendering output. Ready to learn this topic?Read Referencing Values with Refs to learn how to use refs to remember information.Read More Manipulating the DOM with refs React automatically updates the DOM to match your render output, so your components won’t often need to manipulate it. However, sometimes you might need access to the DOM elements managed by React—for example, to focus a node, scroll to it, or measure its size and position. There is no built-in way to do those things in React, so you will need a ref to the DOM node. For example, clicking the button will focus the input using a { useRef } from 'react'; export default function Form() { const inputRef = useRef(null); function handleClick() { inputRef.current.focus(); } return ( <> <input ref={inputRef} /> <button onClick={handleClick}> Focus the input </button> </> ); } Show more Ready to learn this topic?Read Manipulating the DOM with Refs to learn how to access DOM elements managed by React.Read More Synchronizing with Effects Some components need to synchronize with external systems. For example, you might want to control a non-React component based on the React state, set up a server connection, or send an analytics log when a component appears on the screen. Unlike event handlers, which let you handle particular events, Effects let you run some code after rendering. Use them to synchronize your component with a system outside of React. Press Play/Pause a few times and see how the video player stays synchronized to the isPlaying prop { useState, useRef, useEffect } from 'react'; function VideoPlayer({ src, isPlaying }) { const ref = useRef(null); useEffect(() => { if (isPlaying) { ref.current.play(); } else { ref.current.pause(); } }, [isPlaying]); return <video ref={ref} src={src} loop playsInline />; } export default function App() { const [isPlaying, setIsPlaying] = useState(false); return ( <> <button onClick={() => setIsPlaying(!isPlaying)}> {isPlaying ? 'Pause' : 'Play'} </button> <VideoPlayer isPlaying={isPlaying} src=\"https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4\" /> </> ); } Show more Many Effects also “clean up” after themselves. For example, an Effect that sets up a connection to a chat server should return a cleanup function that tells React how to disconnect your component from that { useState, useEffect } from 'react'; import { createConnection } from './chat.js'; export default function ChatRoom() { useEffect(() => { const connection = createConnection(); connection.connect(); return () => connection.disconnect(); }, []); return <h1>Welcome to the chat!</h1>; } In development, React will immediately run and clean up your Effect one extra time. This is why you see \"✅ Connecting...\" printed twice. This ensures that you don’t forget to implement the cleanup function. Ready to learn this topic?Read Synchronizing with Effects to learn how to synchronize components with external systems.Read More You Might Not Need An Effect Effects are an escape hatch from the React paradigm. They let you “step outside” of React and synchronize your components with some external system. If there is no external system involved (for example, if you want to update a component’s state when some props or state change), you shouldn’t need an Effect. Removing unnecessary Effects will make your code easier to follow, faster to run, and less error-prone. There are two common cases in which you don’t need don’t need Effects to transform data for rendering. You don’t need Effects to handle user events. For example, you don’t need an Effect to adjust some state based on other Form() { const [firstName, setFirstName] = useState('Taylor'); const [lastName, setLastName] = useState('Swift'); // 🔴 state and unnecessary Effect const [fullName, setFullName] = useState(''); useEffect(() => { setFullName(firstName + ' ' + lastName); }, [firstName, lastName]); // ...} Instead, calculate as much as you can while Form() { const [firstName, setFirstName] = useState('Taylor'); const [lastName, setLastName] = useState('Swift'); // ✅ during rendering const fullName = firstName + ' ' + lastName; // ...} However, you do need Effects to synchronize with external systems. Ready to learn this topic?Read You Might Not Need an Effect to learn how to remove unnecessary Effects.Read More Lifecycle of reactive effects Effects have a different lifecycle from components. Components may mount, update, or unmount. An Effect can only do two start synchronizing something, and later to stop synchronizing it. This cycle can happen multiple times if your Effect depends on props and state that change over time. This Effect depends on the value of the roomId prop. Props are reactive values, which means they can change on a re-render. Notice that the Effect re-synchronizes (and re-connects to the server) if roomId { useState, useEffect } from 'react'; import { createConnection } from './chat.js'; const serverUrl = 'https://localhost:1234'; function ChatRoom({ roomId }) { useEffect(() => { const connection = createConnection(serverUrl, roomId); connection.connect(); return () => connection.disconnect(); }, [roomId]); return <h1>Welcome to the {roomId} room!</h1>; } export default function App() { const [roomId, setRoomId] = useState('general'); return ( <> <label> Choose the chat room:{' '} <select value={roomId} onChange={e => setRoomId(e.target.value)} > <option value=\"general\">general</option> <option value=\"travel\">travel</option> <option value=\"music\">music</option> </select> </label> <hr /> <ChatRoom roomId={roomId} /> </> ); } Show more React provides a linter rule to check that you’ve specified your Effect’s dependencies correctly. If you forget to specify roomId in the list of dependencies in the above example, the linter will find that bug automatically. Ready to learn this topic?Read Lifecycle of Reactive Events to learn how an Effect’s lifecycle is different from a component’s.Read More Separating events from Effects Event handlers only re-run when you perform the same interaction again. Unlike event handlers, Effects re-synchronize if any of the values they read, like props or state, are different than during last render. Sometimes, you want a mix of both Effect that re-runs in response to some values but not others. All code inside Effects is reactive. It will run again if some reactive value it reads has changed due to a re-render. For example, this Effect will re-connect to the chat if either roomId or theme have { useState, useEffect } from 'react'; import { createConnection, sendMessage } from './chat.js'; import { showNotification } from './notifications.js'; const serverUrl = 'https://localhost:1234'; function ChatRoom({ roomId, theme }) { useEffect(() => { const connection = createConnection(serverUrl, roomId); connection.on('connected', () => { showNotification('Connected!', theme); }); connection.connect(); return () => connection.disconnect(); }, [roomId, theme]); return <h1>Welcome to the {roomId} room!</h1> } export default function App() { const [roomId, setRoomId] = useState('general'); const [isDark, setIsDark] = useState(false); return ( <> <label> Choose the chat room:{' '} <select value={roomId} onChange={e => setRoomId(e.target.value)} > <option value=\"general\">general</option> <option value=\"travel\">travel</option> <option value=\"music\">music</option> </select> </label> <label> <input type=\"checkbox\" checked={isDark} onChange={e => setIsDark(e.target.checked)} /> Use dark theme </label> <hr /> <ChatRoom roomId={roomId} theme={isDark ? 'dark' : 'light'} /> </> ); } Show more This is not ideal. You want to re-connect to the chat only if the roomId has changed. Switching the theme shouldn’t re-connect to the chat! Move the code reading theme out of your Effect into an Effect { useState, useEffect } from 'react'; import { useEffectEvent } from 'react'; import { createConnection, sendMessage } from './chat.js'; import { showNotification } from './notifications.js'; const serverUrl = 'https://localhost:1234'; function ChatRoom({ roomId, theme }) { const onConnected = useEffectEvent(() => { showNotification('Connected!', theme); }); useEffect(() => { const connection = createConnection(serverUrl, roomId); connection.on('connected', () => { onConnected(); }); connection.connect(); return () => connection.disconnect(); }, [roomId]); return <h1>Welcome to the {roomId} room!</h1> } export default function App() { const [roomId, setRoomId] = useState('general'); const [isDark, setIsDark] = useState(false); return ( <> <label> Choose the chat room:{' '} <select value={roomId} onChange={e => setRoomId(e.target.value)} > <option value=\"general\">general</option> <option value=\"travel\">travel</option> <option value=\"music\">music</option> </select> </label> <label> <input type=\"checkbox\" checked={isDark} onChange={e => setIsDark(e.target.checked)} /> Use dark theme </label> <hr /> <ChatRoom roomId={roomId} theme={isDark ? 'dark' : 'light'} /> </> ); } Show more Code inside Effect Events isn’t reactive, so changing the theme no longer makes your Effect re-connect. Ready to learn this topic?Read Separating Events from Effects to learn how to prevent some values from re-triggering Effects.Read More Removing Effect dependencies When you write an Effect, the linter will verify that you’ve included every reactive value (like props and state) that the Effect reads in the list of your Effect’s dependencies. This ensures that your Effect remains synchronized with the latest props and state of your component. Unnecessary dependencies may cause your Effect to run too often, or even create an infinite loop. The way you remove them depends on the case. For example, this Effect depends on the options object which gets re-created every time you edit the { useState, useEffect } from 'react'; import { createConnection } from './chat.js'; const serverUrl = 'https://localhost:1234'; function ChatRoom({ roomId }) { const [message, setMessage] = useState(''); const options = { , }; useEffect(() => { const connection = createConnection(options); connection.connect(); return () => connection.disconnect(); }, [options]); return ( <> <h1>Welcome to the {roomId} room!</h1> <input value={message} onChange={e => setMessage(e.target.value)} /> </> ); } export default function App() { const [roomId, setRoomId] = useState('general'); return ( <> <label> Choose the chat room:{' '} <select value={roomId} onChange={e => setRoomId(e.target.value)} > <option value=\"general\">general</option> <option value=\"travel\">travel</option> <option value=\"music\">music</option> </select> </label> <hr /> <ChatRoom roomId={roomId} /> </> ); } Show more You don’t want the chat to re-connect every time you start typing a message in that chat. To fix this problem, move creation of the options object inside the Effect so that the Effect only depends on the roomId { useState, useEffect } from 'react'; import { createConnection } from './chat.js'; const serverUrl = 'https://localhost:1234'; function ChatRoom({ roomId }) { const [message, setMessage] = useState(''); useEffect(() => { const options = { , }; const connection = createConnection(options); connection.connect(); return () => connection.disconnect(); }, [roomId]); return ( <> <h1>Welcome to the {roomId} room!</h1> <input value={message} onChange={e => setMessage(e.target.value)} /> </> ); } export default function App() { const [roomId, setRoomId] = useState('general'); return ( <> <label> Choose the chat room:{' '} <select value={roomId} onChange={e => setRoomId(e.target.value)} > <option value=\"general\">general</option> <option value=\"travel\">travel</option> <option value=\"music\">music</option> </select> </label> <hr /> <ChatRoom roomId={roomId} /> </> ); } Show more Notice that you didn’t start by editing the dependency list to remove the options dependency. That would be wrong. Instead, you changed the surrounding code so that the dependency became unnecessary. Think of the dependency list as a list of all the reactive values used by your Effect’s code. You don’t intentionally choose what to put on that list. The list describes your code. To change the dependency list, change the code. Ready to learn this topic?Read Removing Effect Dependencies to learn how to make your Effect re-run less often.Read More Reusing logic with custom Hooks React comes with built-in Hooks like useState, useContext, and useEffect. Sometimes, you’ll wish that there was a Hook for some more specific example, to fetch data, to keep track of whether the user is online, or to connect to a chat room. To do this, you can create your own Hooks for your application’s needs. In this example, the usePointerPosition custom Hook tracks the cursor position, while useDelayedValue custom Hook returns a value that’s “lagging behind” the value you passed by a certain number of milliseconds. Move the cursor over the sandbox preview area to see a moving trail of dots following the { usePointerPosition } from './usePointerPosition.js'; import { useDelayedValue } from './useDelayedValue.js'; export default function Canvas() { const pos1 = usePointerPosition(); const pos2 = useDelayedValue(pos1, 100); const pos3 = useDelayedValue(pos2, 200); const pos4 = useDelayedValue(pos3, 100); const pos5 = useDelayedValue(pos4, 50); return ( <> <Dot position={pos1} opacity={1} /> <Dot position={pos2} opacity={0.8} /> <Dot position={pos3} opacity={0.6} /> <Dot position={pos4} opacity={0.4} /> <Dot position={pos5} opacity={0.2} /> </> ); } function Dot({ position, opacity }) { return ( <div style={{ position: 'absolute', backgroundColor: 'pink', borderRadius: '50%', opacity, transform: `translate(${position.x}px, ${position.y}px)`, pointerEvents: 'none', , , , , }} /> ); } Show more You can create custom Hooks, compose them together, pass data between them, and reuse them between components. As your app grows, you will write fewer Effects by hand because you’ll be able to reuse custom Hooks you already wrote. There are also many excellent custom Hooks maintained by the React community. Ready to learn this topic?Read Reusing Logic with Custom Hooks to learn how to share logic between components.Read More What’s next? Head over to Referencing Values with Refs to start reading this chapter page by page!PreviousScaling Up with Reducer and ContextNextReferencing Values with RefsCopyright © Meta Platforms, Incno uwu plzuwu?Logo by@sawaratsuki1004Learn ReactQuick StartInstallationDescribing the UIAdding InteractivityManaging StateEscape HatchesAPI ReferenceReact APIsReact DOM APIsCommunityCode of ConductMeet the TeamDocs ContributorsAcknowledgementsMoreBlogReact NativePrivacyTermsOn this pageOverviewReferencing values with refs Manipulating the DOM with refs Synchronizing with Effects You Might Not Need An Effect Lifecycle of reactive effects Separating events from Effects Removing Effect dependencies Reusing logic with custom Hooks What’s next?\n\nExample:\n```javascript\nconst ref = useRef(0);\n```\n\nExample:\n```text\nimport { useRef } from 'react';\n\nexport default function Counter() {\n  let ref = useRef(0);\n\n  function handleClick() {\n    ref.current = ref.current + 1;\n    alert('You clicked ' + ref.current + ' times!');\n  }\n\n  return (\n    <button onClick={handleClick}>\n      Click me!\n    </button>\n  );\n}\n```\n\nExample:\n```text\nimport { useRef } from 'react';\n\nexport default function Form() {\n  const inputRef = useRef(null);\n\n  function handleClick() {\n    inputRef.current.focus();\n  }\n\n  return (\n    <>\n      <input ref={inputRef} />\n      <button onClick={handleClick}>\n        Focus the input\n      </button>\n    </>\n  );\n}\n```\n\nExample:\n```text\nimport { useState, useRef, useEffect } from 'react';\n\nfunction VideoPlayer({ src, isPlaying }) {\n  const ref = useRef(null);\n\n  useEffect(() => {\n    if (isPlaying) {\n      ref.current.play();\n    } else {\n      ref.current.pause();\n    }\n  }, [isPlaying]);\n\n  return <video ref={ref} src={src} loop playsInline />;\n}\n\nexport default function App() {\n  const [isPlaying, setIsPlaying] = useState(false);\n  return (\n    <>\n      <button onClick={() => setIsPlaying(!isPlaying)}>\n        {isPlaying ? 'Pause' : 'Play'}\n      </button>\n      <VideoPlayer\n        isPlaying={isPlaying}\n        src=\"https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4\"\n      />\n    </>\n  );\n}\n```\n\nExample:\n```text\nimport { useState, useEffect } from 'react';\nimport { createConnection } from './chat.js';\n\nexport default function ChatRoom() {\n  useEffect(() => {\n    const connection = createConnection();\n    connection.connect();\n    return () => connection.disconnect();\n  }, []);\n  return <h1>Welcome to the chat!</h1>;\n}\n```\n\nExample:\n```javascript\nfunction Form() {  const [firstName, setFirstName] = useState('Taylor');  const [lastName, setLastName] = useState('Swift');  // 🔴 Avoid: redundant state and unnecessary Effect  const [fullName, setFullName] = useState('');  useEffect(() => {    setFullName(firstName + ' ' + lastName);  }, [firstName, lastName]);  // ...}\n```\n\nExample:\n```javascript\nfunction Form() {  const [firstName, setFirstName] = useState('Taylor');  const [lastName, setLastName] = useState('Swift');  // ✅ Good: calculated during rendering  const fullName = firstName + ' ' + lastName;  // ...}\n```\n\nExample:\n```text\nimport { useState, useEffect } from 'react';\nimport { createConnection } from './chat.js';\n\nconst serverUrl = 'https://localhost:1234';\n\nfunction ChatRoom({ roomId }) {\n  useEffect(() => {\n    const connection = createConnection(serverUrl, roomId);\n    connection.connect();\n    return () => connection.disconnect();\n  }, [roomId]);\n\n  return <h1>Welcome to the {roomId} room!</h1>;\n}\n\nexport default function App() {\n  const [roomId, setRoomId] = useState('general');\n  return (\n    <>\n      <label>\n        Choose the chat room:{' '}\n        <select\n          value={roomId}\n          onChange={e => setRoomId(e.target.value)}\n        >\n          <option value=\"general\">general</option>\n          <option value=\"travel\">travel</option>\n          <option value=\"music\">music</option>\n        </select>\n      </label>\n      <hr />\n      <ChatRoom roomId={roomId} />\n    </>\n  );\n}\n```\n\nExample:\n```text\nimport { useState, useEffect } from 'react';\nimport { createConnection, sendMessage } from './chat.js';\nimport { showNotification } from './notifications.js';\n\nconst serverUrl = 'https://localhost:1234';\n\nfunction ChatRoom({ roomId, theme }) {\n  useEffect(() => {\n    const connection = createConnection(serverUrl, roomId);\n    connection.on('connected', () => {\n      showNotification('Connected!', theme);\n    });\n    connection.connect();\n    return () => connection.disconnect();\n  }, [roomId, theme]);\n\n  return <h1>Welcome to the {roomId} room!</h1>\n}\n\nexport default function App() {\n  const [roomId, setRoomId] = useState('general');\n  const [isDark, setIsDark] = useState(false);\n  return (\n    <>\n      <label>\n        Choose the chat room:{' '}\n        <select\n          value={roomId}\n          onChange={e => setRoomId(e.target.value)}\n        >\n          <option value=\"general\">general</option>\n          <option value=\"travel\">travel</option>\n          <option value=\"music\">music</option>\n        </select>\n      </label>\n      <label>\n        <input\n          type=\"checkbox\"\n          checked={isDark}\n          onChange={e => setIsDark(e.target.checked)}\n        />\n        Use dark theme\n      </label>\n      <hr />\n      <ChatRoom\n        roomId={roomId}\n        theme={isDark ? 'dark' : 'light'}\n      />\n    </>\n  );\n}\n```\n\nExample:\n```text\nimport { useState, useEffect } from 'react';\nimport { useEffectEvent } from 'react';\nimport { createConnection, sendMessage } from './chat.js';\nimport { showNotification } from './notifications.js';\n\nconst serverUrl = 'https://localhost:1234';\n\nfunction ChatRoom({ roomId, theme }) {\n  const onConnected = useEffectEvent(() => {\n    showNotification('Connected!', theme);\n  });\n\n  useEffect(() => {\n    const connection = createConnection(serverUrl, roomId);\n    connection.on('connected', () => {\n      onConnected();\n    });\n    connection.connect();\n    return () => connection.disconnect();\n  }, [roomId]);\n\n  return <h1>Welcome to the {roomId} room!</h1>\n}\n\nexport default function App() {\n  const [roomId, setRoomId] = useState('general');\n  const [isDark, setIsDark] = useState(false);\n  return (\n    <>\n      <label>\n        Choose the chat room:{' '}\n        <select\n          value={roomId}\n          onChange={e => setRoomId(e.target.value)}\n        >\n          <option value=\"general\">general</option>\n          <option value=\"travel\">travel</option>\n          <option value=\"music\">music</option>\n        </select>\n      </label>\n      <label>\n        <input\n          type=\"checkbox\"\n          checked={isDark}\n          onChange={e => setIsDark(e.target.checked)}\n        />\n        Use dark theme\n      </label>\n      <hr />\n      <ChatRoom\n        roomId={roomId}\n        theme={isDark ? 'dark' : 'light'}\n      />\n    </>\n  );\n}\n```\n\nExample:\n```text\nimport { useState, useEffect } from 'react';\nimport { createConnection } from './chat.js';\n\nconst serverUrl = 'https://localhost:1234';\n\nfunction ChatRoom({ roomId }) {\n  const [message, setMessage] = useState('');\n\n  const options = {\n    serverUrl: serverUrl,\n    roomId: roomId\n  };\n\n  useEffect(() => {\n    const connection = createConnection(options);\n    connection.connect();\n    return () => connection.disconnect();\n  }, [options]);\n\n  return (\n    <>\n      <h1>Welcome to the {roomId} room!</h1>\n      <input value={message} onChange={e => setMessage(e.target.value)} />\n    </>\n  );\n}\n\nexport default function App() {\n  const [roomId, setRoomId] = useState('general');\n  return (\n    <>\n      <label>\n        Choose the chat room:{' '}\n        <select\n          value={roomId}\n          onChange={e => setRoomId(e.target.value)}\n        >\n          <option value=\"general\">general</option>\n          <option value=\"travel\">travel</option>\n          <option value=\"music\">music</option>\n        </select>\n      </label>\n      <hr />\n      <ChatRoom roomId={roomId} />\n    </>\n  );\n}\n```\n\nExample:\n```text\nimport { useState, useEffect } from 'react';\nimport { createConnection } from './chat.js';\n\nconst serverUrl = 'https://localhost:1234';\n\nfunction ChatRoom({ roomId }) {\n  const [message, setMessage] = useState('');\n\n  useEffect(() => {\n    const options = {\n      serverUrl: serverUrl,\n      roomId: roomId\n    };\n    const connection = createConnection(options);\n    connection.connect();\n    return () => connection.disconnect();\n  }, [roomId]);\n\n  return (\n    <>\n      <h1>Welcome to the {roomId} room!</h1>\n      <input value={message} onChange={e => setMessage(e.target.value)} />\n    </>\n  );\n}\n\nexport default function App() {\n  const [roomId, setRoomId] = useState('general');\n  return (\n    <>\n      <label>\n        Choose the chat room:{' '}\n        <select\n          value={roomId}\n          onChange={e => setRoomId(e.target.value)}\n        >\n          <option value=\"general\">general</option>\n          <option value=\"travel\">travel</option>\n          <option value=\"music\">music</option>\n        </select>\n      </label>\n      <hr />\n      <ChatRoom roomId={roomId} />\n    </>\n  );\n}\n```\n\nExample:\n```text\nimport { usePointerPosition } from './usePointerPosition.js';\nimport { useDelayedValue } from './useDelayedValue.js';\n\nexport default function Canvas() {\n  const pos1 = usePointerPosition();\n  const pos2 = useDelayedValue(pos1, 100);\n  const pos3 = useDelayedValue(pos2, 200);\n  const pos4 = useDelayedValue(pos3, 100);\n  const pos5 = useDelayedValue(pos4, 50);\n  return (\n    <>\n      <Dot position={pos1} opacity={1} />\n      <Dot position={pos2} opacity={0.8} />\n      <Dot position={pos3} opacity={0.6} />\n      <Dot position={pos4} opacity={0.4} />\n      <Dot position={pos5} opacity={0.2} />\n    </>\n  );\n}\n\nfunction Dot({ position, opacity }) {\n  return (\n    <div style={{\n      position: 'absolute',\n      backgroundColor: 'pink',\n      borderRadius: '50%',\n      opacity,\n      transform: `translate(${position.x}px, ${position.y}px)`,\n      pointerEvents: 'none',\n      left: -20,\n      top: -20,\n      width: 40,\n      height: 40,\n    }} />\n  );\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:32.888Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":13,"totalLines":404,"estimatedTokens":6830}}309{"id":"doc-extracting_state_logic_into_a_reducer_react-0e83d210","source":"documentation","title":"Extracting State Logic into a Reducer – React","url":"https://react.dev/learn/extracting-state-logic-into-a-reducer","text":"Example:\n```text\nimport { useState } from 'react';\nimport AddTask from './AddTask.js';\nimport TaskList from './TaskList.js';\n\nexport default function TaskApp() {\n  const [tasks, setTasks] = useState(initialTasks);\n\n  function handleAddTask(text) {\n    setTasks([\n      ...tasks,\n      {\n        id: nextId++,\n        text: text,\n        done: false,\n      },\n    ]);\n  }\n\n  function handleChangeTask(task) {\n    setTasks(\n      tasks.map((t) => {\n        if (t.id === task.id) {\n          return task;\n        } else {\n          return t;\n        }\n      })\n    );\n  }\n\n  function handleDeleteTask(taskId) {\n    setTasks(tasks.filter((t) => t.id !== taskId));\n  }\n\n  return (\n    <>\n      <h1>Prague itinerary</h1>\n      <AddTask onAddTask={handleAddTask} />\n      <TaskList\n        tasks={tasks}\n        onChangeTask={handleChangeTask}\n        onDeleteTask={handleDeleteTask}\n      />\n    </>\n  );\n}\n\nlet nextId = 3;\nconst initialTasks = [\n  {id: 0, text: 'Visit Kafka Museum', done: true},\n  {id: 1, text: 'Watch a puppet show', done: false},\n  {id: 2, text: 'Lennon Wall pic', done: false},\n];\n```\n\nExample:\n```javascript\nfunction handleAddTask(text) {  setTasks([    ...tasks,    {      id: nextId++,      text: text,      done: false,    },  ]);}function handleChangeTask(task) {  setTasks(    tasks.map((t) => {      if (t.id === task.id) {        return task;      } else {        return t;      }    })  );}function handleDeleteTask(taskId) {  setTasks(tasks.filter((t) => t.id !== taskId));}\n```\n\nExample:\n```javascript\nfunction handleAddTask(text) {  dispatch({    type: 'added',    id: nextId++,    text: text,  });}function handleChangeTask(task) {  dispatch({    type: 'changed',    task: task,  });}function handleDeleteTask(taskId) {  dispatch({    type: 'deleted',    id: taskId,  });}\n```\n\nExample:\n```javascript\nfunction handleDeleteTask(taskId) {  dispatch(    // \"action\" object:    {      type: 'deleted',      id: taskId,    }  );}\n```\n\nExample:\n```javascript\ndispatch({  // specific to component  type: 'what_happened',  // other fields go here});\n```\n\nExample:\n```javascript\nfunction yourReducer(state, action) {  // return next state for React to set}\n```\n\nExample:\n```javascript\nfunction tasksReducer(tasks, action) {  if (action.type === 'added') {    return [      ...tasks,      {        id: action.id,        text: action.text,        done: false,      },    ];  } else if (action.type === 'changed') {    return tasks.map((t) => {      if (t.id === action.task.id) {        return action.task;      } else {        return t;      }    });  } else if (action.type === 'deleted') {    return tasks.filter((t) => t.id !== action.id);  } else {    throw Error('Unknown action: ' + action.type);  }}\n```\n\nExample:\n```javascript\nfunction tasksReducer(tasks, action) {  switch (action.type) {    case 'added': {      return [        ...tasks,        {          id: action.id,          text: action.text,          done: false,        },      ];    }    case 'changed': {      return tasks.map((t) => {        if (t.id === action.task.id) {          return action.task;        } else {          return t;        }      });    }    case 'deleted': {      return tasks.filter((t) => t.id !== action.id);    }    default: {      throw Error('Unknown action: ' + action.type);    }  }}\n```\n\nExample:\n```javascript\nconst arr = [1, 2, 3, 4, 5];const sum = arr.reduce(  (result, number) => result + number); // 1 + 2 + 3 + 4 + 5\n```\n\nExample:\n```text\nimport tasksReducer from './tasksReducer.js';\n\nlet initialState = [];\nlet actions = [\n  {type: 'added', id: 1, text: 'Visit Kafka Museum'},\n  {type: 'added', id: 2, text: 'Watch a puppet show'},\n  {type: 'deleted', id: 1},\n  {type: 'added', id: 3, text: 'Lennon Wall pic'},\n];\n\nlet finalState = actions.reduce(tasksReducer, initialState);\n\nconst output = document.getElementById('output');\noutput.textContent = JSON.stringify(finalState, null, 2);\n```\n\nExample:\n```javascript\nimport { useReducer } from 'react';\n```\n\nExample:\n```javascript\nconst [tasks, setTasks] = useState(initialTasks);\n```\n\nExample:\n```javascript\nconst [tasks, dispatch] = useReducer(tasksReducer, initialTasks);\n```\n\nExample:\n```text\nimport { useReducer } from 'react';\nimport AddTask from './AddTask.js';\nimport TaskList from './TaskList.js';\n\nexport default function TaskApp() {\n  const [tasks, dispatch] = useReducer(tasksReducer, initialTasks);\n\n  function handleAddTask(text) {\n    dispatch({\n      type: 'added',\n      id: nextId++,\n      text: text,\n    });\n  }\n\n  function handleChangeTask(task) {\n    dispatch({\n      type: 'changed',\n      task: task,\n    });\n  }\n\n  function handleDeleteTask(taskId) {\n    dispatch({\n      type: 'deleted',\n      id: taskId,\n    });\n  }\n\n  return (\n    <>\n      <h1>Prague itinerary</h1>\n      <AddTask onAddTask={handleAddTask} />\n      <TaskList\n        tasks={tasks}\n        onChangeTask={handleChangeTask}\n        onDeleteTask={handleDeleteTask}\n      />\n    </>\n  );\n}\n\nfunction tasksReducer(tasks, action) {\n  switch (action.type) {\n    case 'added': {\n      return [\n        ...tasks,\n        {\n          id: action.id,\n          text: action.text,\n          done: false,\n        },\n      ];\n    }\n    case 'changed': {\n      return tasks.map((t) => {\n        if (t.id === action.task.id) {\n          return action.task;\n        } else {\n          return t;\n        }\n      });\n    }\n    case 'deleted': {\n      return tasks.filter((t) => t.id !== action.id);\n    }\n    default: {\n      throw Error('Unknown action: ' + action.type);\n    }\n  }\n}\n\nlet nextId = 3;\nconst initialTasks = [\n  {id: 0, text: 'Visit Kafka Museum', done: true},\n  {id: 1, text: 'Watch a puppet show', done: false},\n  {id: 2, text: 'Lennon Wall pic', done: false},\n];\n```\n\nExample:\n```text\nimport { useReducer } from 'react';\nimport AddTask from './AddTask.js';\nimport TaskList from './TaskList.js';\nimport tasksReducer from './tasksReducer.js';\n\nexport default function TaskApp() {\n  const [tasks, dispatch] = useReducer(tasksReducer, initialTasks);\n\n  function handleAddTask(text) {\n    dispatch({\n      type: 'added',\n      id: nextId++,\n      text: text,\n    });\n  }\n\n  function handleChangeTask(task) {\n    dispatch({\n      type: 'changed',\n      task: task,\n    });\n  }\n\n  function handleDeleteTask(taskId) {\n    dispatch({\n      type: 'deleted',\n      id: taskId,\n    });\n  }\n\n  return (\n    <>\n      <h1>Prague itinerary</h1>\n      <AddTask onAddTask={handleAddTask} />\n      <TaskList\n        tasks={tasks}\n        onChangeTask={handleChangeTask}\n        onDeleteTask={handleDeleteTask}\n      />\n    </>\n  );\n}\n\nlet nextId = 3;\nconst initialTasks = [\n  {id: 0, text: 'Visit Kafka Museum', done: true},\n  {id: 1, text: 'Watch a puppet show', done: false},\n  {id: 2, text: 'Lennon Wall pic', done: false},\n];\n```\n\nExample:\n```text\n{\n  \"dependencies\": {\n    \"immer\": \"1.7.3\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"react-scripts\": \"latest\",\n    \"use-immer\": \"0.5.1\"\n  },\n  \"scripts\": {\n    \"start\": \"react-scripts start\",\n    \"build\": \"react-scripts build\",\n    \"test\": \"react-scripts test --env=jsdom\",\n    \"eject\": \"react-scripts eject\"\n  },\n  \"devDependencies\": {}\n}\n```\n\nExample:\n```text\nimport { useReducer } from 'react';\nimport Chat from './Chat.js';\nimport ContactList from './ContactList.js';\nimport { initialState, messengerReducer } from './messengerReducer';\n\nexport default function Messenger() {\n  const [state, dispatch] = useReducer(messengerReducer, initialState);\n  const message = state.message;\n  const contact = contacts.find((c) => c.id === state.selectedId);\n  return (\n    <div>\n      <ContactList\n        contacts={contacts}\n        selectedId={state.selectedId}\n        dispatch={dispatch}\n      />\n      <Chat\n        key={contact.id}\n        message={message}\n        contact={contact}\n        dispatch={dispatch}\n      />\n    </div>\n  );\n}\n\nconst contacts = [\n  {id: 0, name: 'Taylor', email: 'taylor@mail.com'},\n  {id: 1, name: 'Alice', email: 'alice@mail.com'},\n  {id: 2, name: 'Bob', email: 'bob@mail.com'},\n];\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:32.892Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":17,"totalLines":321,"estimatedTokens":2012}}310{"id":"doc-db_schema_prisma_8_cli_prisma_documentation-02674a3b","source":"documentation","title":"db schema | Prisma 8 CLI | Prisma Documentation","url":"https://www.prisma.io/docs/cli/v8/db-schema","text":"For the complete Prisma documentation index optimized for AI agents, see https://www.prisma.io/docs/llms.txt. A markdown version of every docs page is available by appending .md to its URL.\n\nThe Prisma 8 Release Candidate is available.Explore the next Prisma ORM workflow.Read the docs\n\nExample:\n```text\nbunx @prisma/cli@next db schema --db \"$DATABASE_URL\"\n```\n\nExample:\n```text\nbunx @prisma/cli@next db schema --db \"$DATABASE_URL\"\nbunx @prisma/cli@next db schema --db \"$DATABASE_URL\" --json > schema.json\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:08.293Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":2,"totalLines":16,"estimatedTokens":131}}311{"id":"doc-generators_reference_prisma_documentation-45b3741a","source":"documentation","title":"Generators (Reference) | Prisma Documentation","url":"https://www.prisma.io/docs/orm/prisma-schema/overview/generators","text":"For the complete Prisma documentation index optimized for AI agents, see https://www.prisma.io/docs/llms.txt. A markdown version of every docs page is available by appending .md to its URL.\n\nThe Prisma 8 Release Candidate is available.Explore the next Prisma ORM workflow.Read the docs\n\nExample:\n```text\ngenerator client {\n  provider = \"prisma-client\"\n  output   = \"../generated/prisma\"\n}\n```\n\nExample:\n```text\ngenerator client {\n  provider = \"prisma-client\"            // Required\n  output   = \"../src/generated/prisma\"  // Required\n}\n```\n\nExample:\n```text\n.\n├── package.json\n├── prisma\n│   └── schema.prisma\n├── src\n│   └── index.ts\n└── tsconfig.json\n```\n\nExample:\n```text\nbunx prisma generate\n```\n\nExample:\n```text\nimport { PrismaClient } from \"./generated/prisma/client\";\nimport { PrismaPg } from \"@prisma/adapter-pg\"; // or the adapter for your database\nconst adapter = new PrismaPg({ connectionString: process.env.DATABASE_URL });\nconst prisma = new PrismaClient({ adapter });\n```\n\nExample:\n```text\nimport { UserModel, PostModel } from \"./generated/prisma/models\";\n```\n\nExample:\n```text\nimport { Role, User } from \"./generated/prisma/enums\";\n```\n\nExample:\n```text\nimport { Role } from \"./generated/prisma/browser\";\n```\n\nExample:\n```text\ngenerator client {\n  // Required\n  provider = \"prisma-client\"\n  output   = \"../src/generated/prisma\"\n\n  // Optional\n  engineType             = \"client\"\n  runtime                = \"nodejs\"\n  moduleFormat           = \"esm\"\n  generatedFileExtension = \"ts\"\n  importFileExtension    = \"ts\"\n}\n```\n\nExample:\n```text\ngenerator client {\n  provider            = \"prisma-client\"\n  output              = \"../src/generated/prisma\"\n  importFileExtension = \"ts\"\n}\n```\n\nExample:\n```text\ngenerated/\n└── prisma\n    ├── browser.ts\n    ├── client.ts\n    ├── commonInputTypes.ts\n    ├── enums.ts\n    ├── internal\n    │   ├── ...\n    ├── models\n    │   ├── Post.ts\n    │   └── User.ts\n    └── models.ts\n```\n\nExample:\n```text\nimport { Prisma, type Post, PrismaClient } from \"./generated/prisma/client\";\n```\n\nExample:\n```text\nimport { Prisma, type Post } from \"./generated/prisma/browser\";\n```\n\nExample:\n```text\nimport { MyEnum } from \"./generated/prisma/enums\";\n```\n\nExample:\n```text\nimport type {\n  UserModel,\n  PostModel,\n  PostWhereInput,\n  UserUpdateInput,\n} from \"./generated/prisma/models\";\n```\n\nExample:\n```text\nimport type { UserModel, UserWhereInput, UserUpdateInput } from \"./generated/prisma/models/User\";\n```\n\nExample:\n```text\nimport type { IntFilter } from \"./generated/prisma/commonInputTypes\";\n```\n\nExample:\n```text\ngenerator client {\n  provider        = \"prisma-client-js\"\n  previewFeatures = [\"sample-preview-feature\"]\n  binaryTargets   = [\"debian-openssl-1.1.x\"] // defaults to `\"native\"`\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:08.294Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":18,"totalLines":145,"estimatedTokens":687}}312{"id":"doc-add_prisma_8_to_an_existing_mongodb_project_pris-8e6db029","source":"documentation","title":"Add Prisma 8 to an existing MongoDB project | Prisma Documentation","url":"https://www.prisma.io/docs/v8/add-to-existing-project/mongodb","text":"For the complete Prisma documentation index optimized for AI agents, see https://www.prisma.io/docs/llms.txt. A markdown version of every docs page is available by appending .md to its URL.\n\nThe Prisma 8 Release Candidate is available.Explore the next Prisma ORM workflow.Read the docs\n\nExample:\n```text\nbun add --dev tsx typescript\n```\n\nExample:\n```text\nbunx @prisma/cli@next orm init --target mongodb\n```\n\nExample:\n```text\nDATABASE_URL=\"mongodb://127.0.0.1:27017/app?replicaSet=rs0\"\n```\n\nExample:\n```text\n// use prisma-next\n\nmodel User {\n  id    ObjectId @id @map(\"_id\")\n  email String   @unique\n  name  String?\n  posts Post[]\n  @@map(\"users\")\n}\n\nmodel Post {\n  id       ObjectId @id @map(\"_id\")\n  title    String\n  content  String?\n  author   User     @relation(fields: [authorId], references: [id])\n  authorId ObjectId\n  @@map(\"posts\")\n}\n```\n\nExample:\n```text\nbunx @prisma/cli@next contract emit\n```\n\nExample:\n```text\nimport \"dotenv/config\";\nimport { db } from \"./prisma/db\";\n\nasync function main() {\n  const user = await db.orm.users.where({ email: \"existing@example.com\" }).first();\n  console.log(user);\n\n  await db.close();\n}\n\nmain().catch((error) => {\n  console.error(error);\n  process.exit(1);\n});\n```\n\nExample:\n```text\nbunx tsx script.ts\n```\n\nExample:\n```text\nimport \"dotenv/config\";\nimport { db } from \"./prisma/db\";\n\nasync function main() {\n  const runtime = await db.runtime();\n  const plan = db.query\n    .from(\"users\")\n    .match((fields) => fields.email.eq(\"existing@example.com\"))\n    .project(\"email\", \"name\")\n    .build();\n\n  const rows = await runtime.execute(plan);\n  console.log(rows);\n\n  await db.close();\n}\n\nmain().catch((error) => {\n  console.error(error);\n  process.exit(1);\n});\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:08.298Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":8,"totalLines":95,"estimatedTokens":431}}313{"id":"doc-about_migration_histories_prisma_documentation-3f799029","source":"documentation","title":"About migration histories | Prisma Documentation","url":"https://www.prisma.io/docs/orm/prisma-migrate/understanding-prisma-migrate/migration-histories","text":"For the complete Prisma documentation index optimized for AI agents, see https://www.prisma.io/docs/llms.txt. A markdown version of every docs page is available by appending .md to its URL.\n\nThe Prisma 8 Release Candidate is available.Explore the next Prisma ORM workflow.Read the docs\n\nExample:\n```text\nmigrations/\n  └─ 20210313140442_init/\n    └─ migration.sql\n  └─ 20210313140442_added_job_title/\n    └─ migration.sql\n```\n\nExample:\n```text\n-- AlterTable\n ALTER TABLE \"Post\" ALTER COLUMN \"content\" SET DATA TYPE VARCHAR(560);\n```\n\nExample:\n```text\n6 migrations found in prisma/migrations\nWARNING The following migrations have been modified since they were applied:\n20210310143435_change_type\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:08.299Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":3,"totalLines":27,"estimatedTokens":178}}314{"id":"doc-google_protobuf_collections_mapfield_tkey_tvalue-3bd16953","source":"documentation","title":"Google.Protobuf.Collections.MapField< TKey, TValue > Class Reference","url":"https://protobuf.dev/reference/csharp/api-docs/class/google/protobuf/collections/map-field-t-key-t-value-.html","text":"# Google.Protobuf.Collections.MapField< TKey, TValue >\n\nRepresentation of a map field in a Protocol Buffer message.\n\nDetails Template Parameters TKey Key type in the map. Must be a type supported by Protocol Buffer map keys. TValue Value type in the map. Must be a type supported by Protocol Buffers.\n\nFor string keys, the equality comparison is provided by StringComparer.Ordinal.\n\nNull values are not permitted in the map, either for wrapper types or regular messages. If a map is deserialized from a data stream and the value is missing from an entry, a default value is created instead. For primitive types, that is the regular default value (0, the empty string and so on); for message types, an empty instance of the message is created, as if the map entry contained a 0-length encoded value for the field.\n\nThis implementation does not generally prohibit the use of key/value types which are not supported by Protocol Buffers (e.g. using a key type of\n\nThe order in which entries are returned when iterating over this object is undefined, and may change in future versions.\n\nGoogle.Protobuf.IDeepCloneable< T >\n\nGoogle.Protobuf.Collections.MapField< TKey, TValue >.Codec.MessageAdapter\n\nProperties Count int Gets the number of elements contained in the map. IsFixedSize bool IDictionary. IsReadOnly bool Gets a value indicating whether the map is read-only. IsSynchronized bool ICollection. Keys ICollection< TKey > Gets a collection containing the keys in the map. Keys ICollection IDictionary. SyncRoot object ICollection. Values ICollection< TValue > Gets a collection containing the values in the map. Values ICollection IDictionary. this[TKey key] TValue Gets or sets the value associated with the specified key. this[object key] object IDictionary.\n\nAPI Reference:\nPublic functions Add(TKey key, TValue value) void Adds the specified key/value pair to the map. Add(IDictionary< TKey, TValue > entries) void Adds the specified entries to the map. AddEntriesFrom(CodedInputStream input, Codec codec) void Adds entries to the map from the given stream. CalculateSize(Codec codec) int Calculates the size of this map based on the given entry codec. Clear() void Removes all items from the map. Clone() MapField< TKey, TValue > Creates a deep clone of this object. ContainsKey(TKey key) bool Determines whether the specified key is present in the map. Equals(object other) override bool Determines whether the specified System.Object, is equal to this instance. Equals(MapField< TKey, TValue > other) bool Compares this map with another for equality. GetEnumerator() IEnumerator< KeyValuePair< TKey, TValue > > Returns an enumerator that iterates through the collection. GetHashCode() override int Returns a hash code for this instance. Remove(TKey key) bool Removes the entry identified by the given key from the map. ToString() override string Returns a string representation of this repeated field, in the same way as it would be represented by the default JSON formatter. TryGetValue(TKey key, out TValue value) bool Gets the value associated with the specified key. WriteTo(CodedOutputStream output, Codec codec) void Writes the contents of this map to the given coded output stream, using the specified codec to encode each entry.\n\nClasses Google.Protobuf.Collections.MapField< TKey, TValue >.Codec A codec for a specific map field.\n\nCount int Count Gets the number of elements contained in the map.\n\nIsFixedSize bool IDictionary. IsFixedSize IsReadOnly bool IsReadOnly Gets a value indicating whether the map is read-only. IsSynchronized bool ICollection. IsSynchronized Keys ICollection< TKey > Keys Gets a collection containing the keys in the map. Keys ICollection IDictionary. Keys SyncRoot object ICollection. SyncRoot Values ICollection< TValue > Values Gets a collection containing the values in the map. Values ICollection IDictionary. Values this[TKey key] TValue this[TKey key] Gets or sets the value associated with the specified key. Details Parameters key The key of the value to get or set. Exceptions KeyNotFoundException The property is retrieved and key does not exist in the collection. Returns The value associated with the specified key. If the specified key is not found, a get operation throws a KeyNotFoundException, and a set operation creates a new element with the specified key. this[object key] object IDictionary. this[object key] Public functions Add void Add( TKey key, TValue value ) Adds the specified key/value pair to the map. This operation fails if the key already exists in the map. To replace an existing entry, use the indexer. Details Parameters key The key to add value The value to add. Exceptions System.ArgumentException The given key already exists in map. Add void Add( IDictionary< TKey, TValue > entries ) Adds the specified entries to the map. The keys and values are not automatically cloned. Details Parameters entries The entries to add to the map. AddEntriesFrom void AddEntriesFrom( CodedInputStream input, Codec codec ) Adds entries to the map from the given stream. It is assumed that the stream is initially positioned after the tag specified by the codec. This method will continue reading entries from the stream until the end is reached, or a different tag is encountered. Details Parameters input Stream to read from codec Codec describing how the key/value pairs are encoded CalculateSize int CalculateSize( Codec codec ) Calculates the size of this map based on the given entry codec. Details Parameters codec The codec to use to encode each entry. Returns Clear void Clear() Removes all items from the map. Clone MapField< TKey, TValue > Clone() Creates a deep clone of this object. Details Returns A deep clone of this object. ContainsKey bool ContainsKey( TKey key ) Determines whether the specified key is present in the map. Details Parameters key The key to check. Returns true if the map contains the given key; false otherwise. Equals override bool Equals( object other ) Determines whether the specified System.Object, is equal to this instance. Details Parameters other The System.Object to compare with this instance. Returns true if the specified System.Object is equal to this instance; otherwise, false. Equals bool Equals( MapField< TKey, TValue > other ) Compares this map with another for equality. The order of the key/value pairs in the maps is not deemed significant in this comparison. Details Parameters other The map to compare this with. Returns true if other refers to an equal map; false otherwise. GetEnumerator IEnumerator< KeyValuePair< TKey, TValue > > GetEnumerator() Returns an enumerator that iterates through the collection. Details Returns An enumerator that can be used to iterate through the collection. GetHashCode override int GetHashCode() Returns a hash code for this instance. Details Returns A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. Remove bool Remove( TKey key ) Removes the entry identified by the given key from the map. Details Parameters key The key indicating the entry to remove from the map. Returns true if the map contained the given key before the entry was removed; false otherwise. ToString override string ToString() Returns a string representation of this repeated field, in the same way as it would be represented by the default JSON formatter. TryGetValue bool TryGetValue( TKey key, out TValue value ) Gets the value associated with the specified key. Details Parameters key The key whose value to get. value When this method returns, the value associated with the specified key, if the key is found; otherwise, the default value for the type of the value parameter. This parameter is passed uninitialized. Returns true if the map contains an element with the specified key; otherwise, false. WriteTo void WriteTo( CodedOutputStream output, Codec codec ) Writes the contents of this map to the given coded output stream, using the specified codec to encode each entry. Details Parameters output The output stream to write to. codec The codec to use for each entry.\n\nExample:\n```text\nbyte\n```\n\nExample:\n```text\nint Count\n```\n\nExample:\n```text\nbool IDictionary. IsFixedSize\n```\n\nExample:\n```text\nbool IsReadOnly\n```\n\nExample:\n```text\nbool ICollection. IsSynchronized\n```\n\nExample:\n```text\nICollection< TKey > Keys\n```\n\nExample:\n```text\nICollection IDictionary. Keys\n```\n\nExample:\n```text\nobject ICollection. SyncRoot\n```\n\nExample:\n```text\nICollection< TValue > Values\n```\n\nExample:\n```text\nICollection IDictionary. Values\n```\n\nExample:\n```text\nTValue this[TKey key]\n```\n\nExample:\n```text\nobject IDictionary. this[object key]\n```\n\nExample:\n```text\nvoid Add(\n  TKey key,\n  TValue value\n)\n```\n\nExample:\n```text\nvoid Add(\n  IDictionary< TKey, TValue > entries\n)\n```\n\nExample:\n```text\nvoid AddEntriesFrom(\n  CodedInputStream input,\n  Codec codec\n)\n```\n\nExample:\n```text\nint CalculateSize(\n  Codec codec\n)\n```\n\nExample:\n```text\nvoid Clear()\n```\n\nExample:\n```text\nMapField< TKey, TValue > Clone()\n```\n\nExample:\n```text\nbool ContainsKey(\n  TKey key\n)\n```\n\nExample:\n```text\noverride bool Equals(\n  object other\n)\n```\n\nExample:\n```text\nbool Equals(\n  MapField< TKey, TValue > other\n)\n```\n\nExample:\n```text\nIEnumerator< KeyValuePair< TKey, TValue > > GetEnumerator()\n```\n\nExample:\n```text\noverride int GetHashCode()\n```\n\nExample:\n```text\nbool Remove(\n  TKey key\n)\n```\n\nExample:\n```text\noverride string ToString()\n```\n\nExample:\n```text\nbool TryGetValue(\n  TKey key,\n  out TValue value\n)\n```\n\nExample:\n```text\nvoid WriteTo(\n  CodedOutputStream output,\n  Codec codec\n)\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:09.213Z","totalSectionsIncluded":14,"totalCodeBlocksIncluded":27,"totalLines":189,"estimatedTokens":2395}}315{"id":"doc-go_opaque_api_faq_protocol_buffers_documentation-b5f9e67a","source":"documentation","title":"Go Opaque API FAQ | Protocol Buffers Documentation","url":"https://protobuf.dev/reference/go/opaque-faq/","text":"Protocol Buffers Documentation\n\nExample:\n```proto\nedition = \"2023\";\n\npackage log;\n\nimport \"google/protobuf/go_features.proto\";\noption features.(pb.go).api_level = API_OPAQUE;\n\nmessage LogEntry { … }\n```\n\nExample:\n```proto\nedition = \"2024\";\n\npackage log;\n\nmessage LogEntry { … }\n```\n\nExample:\n```fallback\nprotoc […] --go_opt=default_api_level=API_HYBRID\n```\n\nExample:\n```fallback\nprotoc […] --go_opt=apilevelMhello.proto=API_HYBRID\n```\n\nExample:\n```go\n_ = pb.M_builder{\n  F: &val,\n}.Build()\n```\n\nExample:\n```go\nm := &pb.M{}\nm.SetF(val)\n```\n\nExample:\n```go\nm := pb.M_builder{\n    // ...\n}.Build()\n```\n\nExample:\n```go\n// BAD: Avoid using a pointer\nm := (&pb.M_builder{\n    // ...\n}).Build()\n```\n\nExample:\n```go\n// BAD: avoid storing in a variable\nb := pb.M_builder{\n    // ...\n}\nm := b.Build()\n```\n\nExample:\n```go\n// BAD: avoid passing a builder around\nfunc populate(mb *pb.M_builder) {\n  mb.Field1 = proto.Int32(4711)\n  //...\n}\n// ...\nmb := pb.M_builder{}\npopulate(&mb)\nm := mb.Build()\n```\n\nExample:\n```go\nfunc populate(mb *pb.M) {\n  mb.SetField1(4711)\n  //...\n}\n// ...\nm := &pb.M{}\npopulate(m)\n```\n\nExample:\n```go\nm1 := new(pb.M)\nm2 := &pb.M{}\n```\n\nExample:\n```go\n// BAD: avoid: unnecessarily complex\nm1 := pb.M_builder{}.Build()\n```\n\nExample:\n```go\n// Recommended: using builders\nm1 := pb.M1_builder{\n    Submessage: pb.M2_builder{\n        Submessage: pb.M3_builder{\n            String: proto.String(\"hello world\"),\n            Int:    proto.Int32(42),\n        }.Build(),\n        Bytes: []byte(\"hello\"),\n    }.Build(),\n}.Build()\n```\n\nExample:\n```go\n// Also okay: using setters\nm3 := &pb.M3{}\nm3.SetString(\"hello world\")\nm3.SetInt(42)\nm2 := &pb.M2{}\nm2.SetSubmessage(m3)\nm2.SetBytes([]byte(\"hello\"))\nm1 := &pb.M1{}\nm1.SetSubmessage(m2)\n```\n\nExample:\n```go\nm1 := pb.M1_builder{\n    Field1: value1,\n}.Build()\nif someCondition() {\n    m1.SetField2(value2)\n    m1.SetField3(value3)\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:09.228Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":16,"totalLines":145,"estimatedTokens":474}}316{"id":"doc-protocol_buffers_well_known_types_protocol_buffe-fd545c31","source":"documentation","title":"Protocol Buffers Well-Known Types | Protocol Buffers Documentation","url":"https://protobuf.dev/reference/protobuf/google.protobuf/","text":"Protocol Buffers Documentation\n\nExample:\n```proto\npackage google.profile;\nmessage Person {\n  string first_name = 1;\n  string last_name = 2;\n}\n```\n\nExample:\n```json\n{\n  \"@type\": \"type.googleapis.com/google.profile.Person\",\n  \"firstName\": <string>,\n  \"lastName\": <string>\n}\n```\n\nExample:\n```json\n{\n  \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n  \"value\": \"1.212s\"\n}\n```\n\nExample:\n```c\nTimestamp start = ...;\nTimestamp end = ...;\nDuration duration = ...;\n\nduration.seconds = end.seconds - start.seconds;\nduration.nanos = end.nanos - start.nanos;\n\nif (duration.seconds < 0 && duration.nanos > 0) {\n  duration.seconds += 1;\n  duration.nanos -= 1000000000;\n} else if (duration.seconds > 0 && duration.nanos < 0) {\n  duration.seconds -= 1;\n  duration.nanos += 1000000000;\n}\n```\n\nExample:\n```c\nTimestamp start = ...;\nDuration duration = ...;\nTimestamp end = ...;\n\nend.seconds = start.seconds + duration.seconds;\nend.nanos = start.nanos + duration.nanos;\n\nif (end.nanos < 0) {\n  end.seconds -= 1;\n  end.nanos += 1000000000;\n} else if (end.nanos >= 1000000000) {\n  end.seconds += 1;\n  end.nanos -= 1000000000;\n}\n```\n\nExample:\n```proto\nservice Foo {\n  rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n}\n```\n\nExample:\n```proto\npaths: \"f.a\"\npaths: \"f.b.d\"\n```\n\nExample:\n```proto\nf {\n  a : 22\n  b {\n    d : 1\n    x : 2\n  }\n  y : 13\n}\nz: 8\n```\n\nExample:\n```proto\nf {\n  a : 22\n  b {\n    d : 1\n  }\n}\n```\n\nExample:\n```proto\nmessage Profile {\n  User user = 1;\n  Photo photo = 2;\n}\nmessage User {\n  string display_name = 1;\n  string address = 2;\n}\n```\n\nExample:\n```proto\nmask {\n  paths: \"user.display_name\"\n  paths: \"photo\"\n}\n```\n\nExample:\n```json\n{\n  mask: \"user.displayName,photo\"\n}\n```\n\nExample:\n```proto\npackage google.acl.v1;\nservice AccessControl {\n  // Get the underlying ACL object.\n  rpc GetAcl(GetAclRequest) returns (Acl) {\n    option (google.api.http).get = \"/v1/{resource=**}:getAcl\";\n  }\n}\n\npackage google.storage.v2;\nservice Storage {\n  //       rpc GetAcl(GetAclRequest) returns (Acl);\n\n  // Get a data record.\n  rpc GetData(GetDataRequest) returns (Data) {\n    option (google.api.http).get = \"/v2/{resource=**}\";\n  }\n}\n```\n\nExample:\n```fallback\napis:\n- name: google.storage.v2.Storage\n  mixins:\n  - name: google.acl.v1.AccessControl\n```\n\nExample:\n```proto\nservice Storage {\n  // Get the underlying ACL object.\n  rpc GetAcl(GetAclRequest) returns (Acl) {\n    option (google.api.http).get = \"/v2/{resource=**}:getAcl\";\n  }\n  ...\n}\n```\n\nExample:\n```fallback\napis:\n- name: google.storage.v2.Storage\n  mixins:\n  - name: google.acl.v1.AccessControl\n    root: acls\n```\n\nExample:\n```proto\nservice Storage {\n  // Get the underlying ACL object.\n  rpc GetAcl(GetAclRequest) returns (Acl) {\n    option (google.api.http).get = \"/v2/acls/{resource=**}:getAcl\";\n  }\n  ...\n}\n```\n\nExample:\n```cpp\nTimestamp timestamp;\ntimestamp.set_seconds(time(NULL));\ntimestamp.set_nanos(0);\n```\n\nExample:\n```cpp\nstruct timeval tv;\ngettimeofday(&tv, NULL);\n\nTimestamp timestamp;\ntimestamp.set_seconds(tv.tv_sec);\ntimestamp.set_nanos(tv.tv_usec * 1000);\n```\n\nExample:\n```cpp\nFILETIME ft;\nGetSystemTimeAsFileTime(&ft);\nUINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;\n\n// A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z\n// is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.\nTimestamp timestamp;\ntimestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));\ntimestamp.set_nanos((INT32) ((ticks % 10000000) * 100));\n```\n\nExample:\n```java\nlong millis = System.currentTimeMillis();\n\nTimestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)\n    .setNanos((int) ((millis % 1000) * 1000000)).build();\n```\n\nExample:\n```py\nnow = time.time()\nseconds = int(now)\nnanos = int((now - seconds) * 10**9)\ntimestamp = Timestamp(seconds=seconds, nanos=nanos)\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:09.237Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":22,"totalLines":234,"estimatedTokens":957}}317{"id":"doc-all_classes-d06271bd","source":"documentation","title":"All Classes","url":"https://protobuf.dev/reference/java/api-docs/allclasses-noframe.html","text":"AbstractMessage AbstractMessage.Builder AbstractMessageLite AbstractMessageLite.Builder AbstractParser Any Any.Builder AnyOrBuilder AnyProto Api Api.Builder ApiOrBuilder ApiProto BlockingRpcChannel BlockingService BoolValue BoolValue.Builder BoolValueOrBuilder ByteOutput ByteString ByteString.ByteIterator ByteString.Output BytesValue BytesValue.Builder BytesValueOrBuilder CodedInputStream CodedOutputStream CodedOutputStream.OutOfSpaceException DescriptorProtos DescriptorProtos.DescriptorProto DescriptorProtos.DescriptorProto.Builder DescriptorProtos.DescriptorProto.ExtensionRange DescriptorProtos.DescriptorProto.ExtensionRange.Builder DescriptorProtos.DescriptorProto.ExtensionRangeOrBuilder DescriptorProtos.DescriptorProto.ReservedRange DescriptorProtos.DescriptorProto.ReservedRange.Builder DescriptorProtos.DescriptorProto.ReservedRangeOrBuilder DescriptorProtos.DescriptorProtoOrBuilder DescriptorProtos.EnumDescriptorProto DescriptorProtos.EnumDescriptorProto.Builder DescriptorProtos.EnumDescriptorProto.EnumReservedRange DescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder DescriptorProtos.EnumDescriptorProto.EnumReservedRangeOrBuilder DescriptorProtos.EnumDescriptorProtoOrBuilder DescriptorProtos.EnumOptions DescriptorProtos.EnumOptions.Builder DescriptorProtos.EnumOptionsOrBuilder DescriptorProtos.EnumValueDescriptorProto DescriptorProtos.EnumValueDescriptorProto.Builder DescriptorProtos.EnumValueDescriptorProtoOrBuilder DescriptorProtos.EnumValueOptions DescriptorProtos.EnumValueOptions.Builder DescriptorProtos.EnumValueOptionsOrBuilder DescriptorProtos.ExtensionRangeOptions DescriptorProtos.ExtensionRangeOptions.Builder DescriptorProtos.ExtensionRangeOptionsOrBuilder DescriptorProtos.FieldDescriptorProto DescriptorProtos.FieldDescriptorProto.Builder DescriptorProtos.FieldDescriptorProto.Label DescriptorProtos.FieldDescriptorProto.Type DescriptorProtos.FieldDescriptorProtoOrBuilder DescriptorProtos.FieldOptions DescriptorProtos.FieldOptions.Builder DescriptorProtos.FieldOptions.CType DescriptorProtos.FieldOptions.JSType DescriptorProtos.FieldOptionsOrBuilder DescriptorProtos.FileDescriptorProto DescriptorProtos.FileDescriptorProto.Builder DescriptorProtos.FileDescriptorProtoOrBuilder DescriptorProtos.FileDescriptorSet DescriptorProtos.FileDescriptorSet.Builder DescriptorProtos.FileDescriptorSetOrBuilder DescriptorProtos.FileOptions DescriptorProtos.FileOptions.Builder DescriptorProtos.FileOptions.OptimizeMode DescriptorProtos.FileOptionsOrBuilder DescriptorProtos.GeneratedCodeInfo DescriptorProtos.GeneratedCodeInfo.Annotation DescriptorProtos.GeneratedCodeInfo.Annotation.Builder DescriptorProtos.GeneratedCodeInfo.AnnotationOrBuilder DescriptorProtos.GeneratedCodeInfo.Builder DescriptorProtos.GeneratedCodeInfoOrBuilder DescriptorProtos.MessageOptions DescriptorProtos.MessageOptions.Builder DescriptorProtos.MessageOptionsOrBuilder DescriptorProtos.MethodDescriptorProto DescriptorProtos.MethodDescriptorProto.Builder DescriptorProtos.MethodDescriptorProtoOrBuilder DescriptorProtos.MethodOptions DescriptorProtos.MethodOptions.Builder DescriptorProtos.MethodOptions.IdempotencyLevel DescriptorProtos.MethodOptionsOrBuilder DescriptorProtos.OneofDescriptorProto DescriptorProtos.OneofDescriptorProto.Builder DescriptorProtos.OneofDescriptorProtoOrBuilder DescriptorProtos.OneofOptions DescriptorProtos.OneofOptions.Builder DescriptorProtos.OneofOptionsOrBuilder DescriptorProtos.ServiceDescriptorProto DescriptorProtos.ServiceDescriptorProto.Builder DescriptorProtos.ServiceDescriptorProtoOrBuilder DescriptorProtos.ServiceOptions DescriptorProtos.ServiceOptions.Builder DescriptorProtos.ServiceOptionsOrBuilder DescriptorProtos.SourceCodeInfo DescriptorProtos.SourceCodeInfo.Builder DescriptorProtos.SourceCodeInfo.Location DescriptorProtos.SourceCodeInfo.Location.Builder DescriptorProtos.SourceCodeInfo.LocationOrBuilder DescriptorProtos.SourceCodeInfoOrBuilder DescriptorProtos.UninterpretedOption DescriptorProtos.UninterpretedOption.Builder DescriptorProtos.UninterpretedOption.NamePart DescriptorProtos.UninterpretedOption.NamePart.Builder DescriptorProtos.UninterpretedOption.NamePartOrBuilder DescriptorProtos.UninterpretedOptionOrBuilder Descriptors Descriptors.Descriptor Descriptors.DescriptorValidationException Descriptors.EnumDescriptor Descriptors.EnumValueDescriptor Descriptors.FieldDescriptor Descriptors.FieldDescriptor.JavaType Descriptors.FieldDescriptor.Type Descriptors.FileDescriptor Descriptors.FileDescriptor.InternalDescriptorAssigner Descriptors.FileDescriptor.Syntax Descriptors.GenericDescriptor Descriptors.MethodDescriptor Descriptors.OneofDescriptor Descriptors.ServiceDescriptor DoubleValue DoubleValue.Builder DoubleValueOrBuilder Duration Duration.Builder DurationOrBuilder DurationProto Durations DynamicMessage DynamicMessage.Builder Empty Empty.Builder EmptyOrBuilder EmptyProto Enum Enum.Builder EnumOrBuilder EnumValue EnumValue.Builder EnumValueOrBuilder ExperimentalApi Extension Extension.MessageType ExtensionLite ExtensionRegistry ExtensionRegistry.ExtensionInfo ExtensionRegistryLite Field Field.Builder Field.Cardinality Field.Kind FieldMask FieldMask.Builder FieldMaskOrBuilder FieldMaskProto FieldMaskUtil FieldMaskUtil.MergeOptions FieldOrBuilder FieldType FloatValue FloatValue.Builder FloatValueOrBuilder Int32Value Int32Value.Builder Int32ValueOrBuilder Int64Value Int64Value.Builder Int64ValueOrBuilder InvalidProtocolBufferException InvalidProtocolBufferException.InvalidWireTypeException JavaType JsonFormat JsonFormat.Parser JsonFormat.Printer JsonFormat.TypeRegistry JsonFormat.TypeRegistry.Builder ListValue ListValue.Builder ListValueOrBuilder MapField MapFieldLite Message Message.Builder MessageLite MessageLite.Builder MessageLiteOrBuilder MessageOrBuilder Method Method.Builder MethodOrBuilder Mixin Mixin.Builder MixinOrBuilder NullValue Option Option.Builder OptionOrBuilder Parser PluginProtos PluginProtos.CodeGeneratorRequest PluginProtos.CodeGeneratorRequest.Builder PluginProtos.CodeGeneratorRequestOrBuilder PluginProtos.CodeGeneratorResponse PluginProtos.CodeGeneratorResponse.Builder PluginProtos.CodeGeneratorResponse.Feature PluginProtos.CodeGeneratorResponse.File PluginProtos.CodeGeneratorResponse.File.Builder PluginProtos.CodeGeneratorResponse.FileOrBuilder PluginProtos.CodeGeneratorResponseOrBuilder PluginProtos.Version PluginProtos.Version.Builder PluginProtos.VersionOrBuilder ProtocolMessageEnum ProtocolStringList ProtoSyntax RpcCallback RpcChannel RpcController RpcUtil RpcUtil.AlreadyCalledException Service ServiceException SourceContext SourceContext.Builder SourceContextOrBuilder SourceContextProto StringValue StringValue.Builder StringValueOrBuilder Struct Struct.Builder StructOrBuilder StructProto Structs Syntax TextFormat TextFormat.InvalidEscapeSequenceException TextFormat.ParseException TextFormat.Parser TextFormat.Parser.Builder TextFormat.Parser.SingularOverwritePolicy TextFormat.Printer TextFormat.UnknownFieldParseException TextFormatParseInfoTree TextFormatParseInfoTree.Builder TextFormatParseLocation Timestamp Timestamp.Builder TimestampOrBuilder TimestampProto Timestamps TimeUtil Type Type.Builder TypeOrBuilder TypeProto TypeRegistry TypeRegistry.Builder UInt32Value UInt32Value.Builder UInt32ValueOrBuilder UInt64Value UInt64Value.Builder UInt64ValueOrBuilder UninitializedMessageException UnsafeByteOperations Value Value.Builder Value.KindCase ValueOrBuilder Values WireFormat WireFormat.FieldType WireFormat.JavaType WrappersProto\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:09.371Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":0,"totalLines":3,"estimatedTokens":1882}}318{"id":"doc-class_hierarchy-d490d4af","source":"documentation","title":"Class Hierarchy","url":"https://protobuf.dev/reference/java/api-docs/overview-tree.html","text":"Hierarchy For All Packages Package , com.google.protobuf.compiler, com.google.protobuf.util\n\nClass Hierarchy java.lang.Object java.util.AbstractMap<K,V> (implements java.util.Map<K,V>) java.util.HashMap<K,V> (implements java.lang.Cloneable, java.util.Map<K,V>, java.io.Serializable) java.util.LinkedHashMap<K,V> (implements java.util.Map<K,V>) com.google.protobuf.MapFieldLite<K,V> com.google.protobuf.AbstractMessageLite<MessageType,BuilderType> (implements com.google.protobuf.MessageLite) com.google.protobuf.AbstractMessage (implements com.google.protobuf.Message) com.google.protobuf.DynamicMessage com.google.protobuf.GeneratedMessageV3 (implements java.io.Serializable) com.google.protobuf.Any (implements com.google.protobuf.AnyOrBuilder) com.google.protobuf.Api (implements com.google.protobuf.ApiOrBuilder) com.google.protobuf.BoolValue (implements com.google.protobuf.BoolValueOrBuilder) com.google.protobuf.BytesValue (implements com.google.protobuf.BytesValueOrBuilder) com.google.protobuf.DescriptorProtos.DescriptorProto (implements com.google.protobuf.DescriptorProtos.DescriptorProtoOrBuilder) com.google.protobuf.DescriptorProtos.DescriptorProto.ExtensionRange (implements com.google.protobuf.DescriptorProtos.DescriptorProto.ExtensionRangeOrBuilder) com.google.protobuf.DescriptorProtos.DescriptorProto.ReservedRange (implements com.google.protobuf.DescriptorProtos.DescriptorProto.ReservedRangeOrBuilder) com.google.protobuf.DescriptorProtos.EnumDescriptorProto (implements com.google.protobuf.DescriptorProtos.EnumDescriptorProtoOrBuilder) com.google.protobuf.DescriptorProtos.EnumDescriptorProto.EnumReservedRange (implements com.google.protobuf.DescriptorProtos.EnumDescriptorProto.EnumReservedRangeOrBuilder) com.google.protobuf.DescriptorProtos.EnumValueDescriptorProto (implements com.google.protobuf.DescriptorProtos.EnumValueDescriptorProtoOrBuilder) com.google.protobuf.DescriptorProtos.FieldDescriptorProto (implements com.google.protobuf.DescriptorProtos.FieldDescriptorProtoOrBuilder) com.google.protobuf.DescriptorProtos.FileDescriptorProto (implements com.google.protobuf.DescriptorProtos.FileDescriptorProtoOrBuilder) com.google.protobuf.DescriptorProtos.FileDescriptorSet (implements com.google.protobuf.DescriptorProtos.FileDescriptorSetOrBuilder) com.google.protobuf.DescriptorProtos.GeneratedCodeInfo (implements com.google.protobuf.DescriptorProtos.GeneratedCodeInfoOrBuilder) com.google.protobuf.DescriptorProtos.GeneratedCodeInfo.Annotation (implements com.google.protobuf.DescriptorProtos.GeneratedCodeInfo.AnnotationOrBuilder) com.google.protobuf.DescriptorProtos.MethodDescriptorProto (implements com.google.protobuf.DescriptorProtos.MethodDescriptorProtoOrBuilder) com.google.protobuf.DescriptorProtos.OneofDescriptorProto (implements com.google.protobuf.DescriptorProtos.OneofDescriptorProtoOrBuilder) com.google.protobuf.DescriptorProtos.ServiceDescriptorProto (implements com.google.protobuf.DescriptorProtos.ServiceDescriptorProtoOrBuilder) com.google.protobuf.DescriptorProtos.SourceCodeInfo (implements com.google.protobuf.DescriptorProtos.SourceCodeInfoOrBuilder) com.google.protobuf.DescriptorProtos.SourceCodeInfo.Location (implements com.google.protobuf.DescriptorProtos.SourceCodeInfo.LocationOrBuilder) com.google.protobuf.DescriptorProtos.UninterpretedOption (implements com.google.protobuf.DescriptorProtos.UninterpretedOptionOrBuilder) com.google.protobuf.DescriptorProtos.UninterpretedOption.NamePart (implements com.google.protobuf.DescriptorProtos.UninterpretedOption.NamePartOrBuilder) com.google.protobuf.DoubleValue (implements com.google.protobuf.DoubleValueOrBuilder) com.google.protobuf.Duration (implements com.google.protobuf.DurationOrBuilder) com.google.protobuf.Empty (implements com.google.protobuf.EmptyOrBuilder) com.google.protobuf.Enum (implements com.google.protobuf.EnumOrBuilder) com.google.protobuf.EnumValue (implements com.google.protobuf.EnumValueOrBuilder) com.google.protobuf.Field (implements com.google.protobuf.FieldOrBuilder) com.google.protobuf.FieldMask (implements com.google.protobuf.FieldMaskOrBuilder) com.google.protobuf.FloatValue (implements com.google.protobuf.FloatValueOrBuilder) com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType> (implements com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType>) com.google.protobuf.DescriptorProtos.EnumOptions (implements com.google.protobuf.DescriptorProtos.EnumOptionsOrBuilder) com.google.protobuf.DescriptorProtos.EnumValueOptions (implements com.google.protobuf.DescriptorProtos.EnumValueOptionsOrBuilder) com.google.protobuf.DescriptorProtos.ExtensionRangeOptions (implements com.google.protobuf.DescriptorProtos.ExtensionRangeOptionsOrBuilder) com.google.protobuf.DescriptorProtos.FieldOptions (implements com.google.protobuf.DescriptorProtos.FieldOptionsOrBuilder) com.google.protobuf.DescriptorProtos.FileOptions (implements com.google.protobuf.DescriptorProtos.FileOptionsOrBuilder) com.google.protobuf.DescriptorProtos.MessageOptions (implements com.google.protobuf.DescriptorProtos.MessageOptionsOrBuilder) com.google.protobuf.DescriptorProtos.MethodOptions (implements com.google.protobuf.DescriptorProtos.MethodOptionsOrBuilder) com.google.protobuf.DescriptorProtos.OneofOptions (implements com.google.protobuf.DescriptorProtos.OneofOptionsOrBuilder) com.google.protobuf.DescriptorProtos.ServiceOptions (implements com.google.protobuf.DescriptorProtos.ServiceOptionsOrBuilder) com.google.protobuf.Int32Value (implements com.google.protobuf.Int32ValueOrBuilder) com.google.protobuf.Int64Value (implements com.google.protobuf.Int64ValueOrBuilder) com.google.protobuf.ListValue (implements com.google.protobuf.ListValueOrBuilder) com.google.protobuf.Method (implements com.google.protobuf.MethodOrBuilder) com.google.protobuf.Mixin (implements com.google.protobuf.MixinOrBuilder) com.google.protobuf.Option (implements com.google.protobuf.OptionOrBuilder) com.google.protobuf.compiler.PluginProtos.CodeGeneratorRequest (implements com.google.protobuf.compiler.PluginProtos.CodeGeneratorRequestOrBuilder) com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse (implements com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponseOrBuilder) com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.File (implements com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.FileOrBuilder) com.google.protobuf.compiler.PluginProtos.Version (implements com.google.protobuf.compiler.PluginProtos.VersionOrBuilder) com.google.protobuf.SourceContext (implements com.google.protobuf.SourceContextOrBuilder) com.google.protobuf.StringValue (implements com.google.protobuf.StringValueOrBuilder) com.google.protobuf.Struct (implements com.google.protobuf.StructOrBuilder) com.google.protobuf.Timestamp (implements com.google.protobuf.TimestampOrBuilder) com.google.protobuf.Type (implements com.google.protobuf.TypeOrBuilder) com.google.protobuf.UInt32Value (implements com.google.protobuf.UInt32ValueOrBuilder) com.google.protobuf.UInt64Value (implements com.google.protobuf.UInt64ValueOrBuilder) com.google.protobuf.Value (implements com.google.protobuf.ValueOrBuilder) com.google.protobuf.AbstractMessageLite.Builder<MessageType,BuilderType> (implements com.google.protobuf.MessageLite.Builder) com.google.protobuf.AbstractMessage.Builder<BuilderType> (implements com.google.protobuf.Message.Builder) com.google.protobuf.DynamicMessage.Builder com.google.protobuf.GeneratedMessageV3.Builder<BuilderType> com.google.protobuf.Any.Builder (implements com.google.protobuf.AnyOrBuilder) com.google.protobuf.Api.Builder (implements com.google.protobuf.ApiOrBuilder) com.google.protobuf.BoolValue.Builder (implements com.google.protobuf.BoolValueOrBuilder) com.google.protobuf.BytesValue.Builder (implements com.google.protobuf.BytesValueOrBuilder) com.google.protobuf.DescriptorProtos.DescriptorProto.Builder (implements com.google.protobuf.DescriptorProtos.DescriptorProtoOrBuilder) com.google.protobuf.DescriptorProtos.DescriptorProto.ExtensionRange.Builder (implements com.google.protobuf.DescriptorProtos.DescriptorProto.ExtensionRangeOrBuilder) com.google.protobuf.DescriptorProtos.DescriptorProto.ReservedRange.Builder (implements com.google.protobuf.DescriptorProtos.DescriptorProto.ReservedRangeOrBuilder) com.google.protobuf.DescriptorProtos.EnumDescriptorProto.Builder (implements com.google.protobuf.DescriptorProtos.EnumDescriptorProtoOrBuilder) com.google.protobuf.DescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder (implements com.google.protobuf.DescriptorProtos.EnumDescriptorProto.EnumReservedRangeOrBuilder) com.google.protobuf.DescriptorProtos.EnumValueDescriptorProto.Builder (implements com.google.protobuf.DescriptorProtos.EnumValueDescriptorProtoOrBuilder) com.google.protobuf.DescriptorProtos.FieldDescriptorProto.Builder (implements com.google.protobuf.DescriptorProtos.FieldDescriptorProtoOrBuilder) com.google.protobuf.DescriptorProtos.FileDescriptorProto.Builder (implements com.google.protobuf.DescriptorProtos.FileDescriptorProtoOrBuilder) com.google.protobuf.DescriptorProtos.FileDescriptorSet.Builder (implements com.google.protobuf.DescriptorProtos.FileDescriptorSetOrBuilder) com.google.protobuf.DescriptorProtos.GeneratedCodeInfo.Annotation.Builder (implements com.google.protobuf.DescriptorProtos.GeneratedCodeInfo.AnnotationOrBuilder) com.google.protobuf.DescriptorProtos.GeneratedCodeInfo.Builder (implements com.google.protobuf.DescriptorProtos.GeneratedCodeInfoOrBuilder) com.google.protobuf.DescriptorProtos.MethodDescriptorProto.Builder (implements com.google.protobuf.DescriptorProtos.MethodDescriptorProtoOrBuilder) com.google.protobuf.DescriptorProtos.OneofDescriptorProto.Builder (implements com.google.protobuf.DescriptorProtos.OneofDescriptorProtoOrBuilder) com.google.protobuf.DescriptorProtos.ServiceDescriptorProto.Builder (implements com.google.protobuf.DescriptorProtos.ServiceDescriptorProtoOrBuilder) com.google.protobuf.DescriptorProtos.SourceCodeInfo.Builder (implements com.google.protobuf.DescriptorProtos.SourceCodeInfoOrBuilder) com.google.protobuf.DescriptorProtos.SourceCodeInfo.Location.Builder (implements com.google.protobuf.DescriptorProtos.SourceCodeInfo.LocationOrBuilder) com.google.protobuf.DescriptorProtos.UninterpretedOption.Builder (implements com.google.protobuf.DescriptorProtos.UninterpretedOptionOrBuilder) com.google.protobuf.DescriptorProtos.UninterpretedOption.NamePart.Builder (implements com.google.protobuf.DescriptorProtos.UninterpretedOption.NamePartOrBuilder) com.google.protobuf.DoubleValue.Builder (implements com.google.protobuf.DoubleValueOrBuilder) com.google.protobuf.Duration.Builder (implements com.google.protobuf.DurationOrBuilder) com.google.protobuf.Empty.Builder (implements com.google.protobuf.EmptyOrBuilder) com.google.protobuf.Enum.Builder (implements com.google.protobuf.EnumOrBuilder) com.google.protobuf.EnumValue.Builder (implements com.google.protobuf.EnumValueOrBuilder) com.google.protobuf.Field.Builder (implements com.google.protobuf.FieldOrBuilder) com.google.protobuf.FieldMask.Builder (implements com.google.protobuf.FieldMaskOrBuilder) com.google.protobuf.FloatValue.Builder (implements com.google.protobuf.FloatValueOrBuilder) com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType> (implements com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType>) com.google.protobuf.DescriptorProtos.EnumOptions.Builder (implements com.google.protobuf.DescriptorProtos.EnumOptionsOrBuilder) com.google.protobuf.DescriptorProtos.EnumValueOptions.Builder (implements com.google.protobuf.DescriptorProtos.EnumValueOptionsOrBuilder) com.google.protobuf.DescriptorProtos.ExtensionRangeOptions.Builder (implements com.google.protobuf.DescriptorProtos.ExtensionRangeOptionsOrBuilder) com.google.protobuf.DescriptorProtos.FieldOptions.Builder (implements com.google.protobuf.DescriptorProtos.FieldOptionsOrBuilder) com.google.protobuf.DescriptorProtos.FileOptions.Builder (implements com.google.protobuf.DescriptorProtos.FileOptionsOrBuilder) com.google.protobuf.DescriptorProtos.MessageOptions.Builder (implements com.google.protobuf.DescriptorProtos.MessageOptionsOrBuilder) com.google.protobuf.DescriptorProtos.MethodOptions.Builder (implements com.google.protobuf.DescriptorProtos.MethodOptionsOrBuilder) com.google.protobuf.DescriptorProtos.OneofOptions.Builder (implements com.google.protobuf.DescriptorProtos.OneofOptionsOrBuilder) com.google.protobuf.DescriptorProtos.ServiceOptions.Builder (implements com.google.protobuf.DescriptorProtos.ServiceOptionsOrBuilder) com.google.protobuf.Int32Value.Builder (implements com.google.protobuf.Int32ValueOrBuilder) com.google.protobuf.Int64Value.Builder (implements com.google.protobuf.Int64ValueOrBuilder) com.google.protobuf.ListValue.Builder (implements com.google.protobuf.ListValueOrBuilder) com.google.protobuf.Method.Builder (implements com.google.protobuf.MethodOrBuilder) com.google.protobuf.Mixin.Builder (implements com.google.protobuf.MixinOrBuilder) com.google.protobuf.Option.Builder (implements com.google.protobuf.OptionOrBuilder) com.google.protobuf.compiler.PluginProtos.CodeGeneratorRequest.Builder (implements com.google.protobuf.compiler.PluginProtos.CodeGeneratorRequestOrBuilder) com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.Builder (implements com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponseOrBuilder) com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.File.Builder (implements com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.FileOrBuilder) com.google.protobuf.compiler.PluginProtos.Version.Builder (implements com.google.protobuf.compiler.PluginProtos.VersionOrBuilder) com.google.protobuf.SourceContext.Builder (implements com.google.protobuf.SourceContextOrBuilder) com.google.protobuf.StringValue.Builder (implements com.google.protobuf.StringValueOrBuilder) com.google.protobuf.Struct.Builder (implements com.google.protobuf.StructOrBuilder) com.google.protobuf.Timestamp.Builder (implements com.google.protobuf.TimestampOrBuilder) com.google.protobuf.Type.Builder (implements com.google.protobuf.TypeOrBuilder) com.google.protobuf.UInt32Value.Builder (implements com.google.protobuf.UInt32ValueOrBuilder) com.google.protobuf.UInt64Value.Builder (implements com.google.protobuf.UInt64ValueOrBuilder) com.google.protobuf.Value.Builder (implements com.google.protobuf.ValueOrBuilder) com.google.protobuf.AbstractParser<MessageType> (implements com.google.protobuf.Parser<MessageType>) com.google.protobuf.AnyProto com.google.protobuf.ApiProto com.google.protobuf.ByteOutput com.google.protobuf.CodedOutputStream com.google.protobuf.ByteString (implements java.lang.Iterable<T>, java.io.Serializable) com.google.protobuf.CodedInputStream com.google.protobuf.DescriptorProtos com.google.protobuf.Descriptors com.google.protobuf.Descriptors.GenericDescriptor com.google.protobuf.Descriptors.Descriptor com.google.protobuf.Descriptors.EnumDescriptor (implements com.google.protobuf.Internal.EnumLiteMap<T>) com.google.protobuf.Descriptors.EnumValueDescriptor (implements com.google.protobuf.Internal.EnumLite) com.google.protobuf.Descriptors.FieldDescriptor (implements java.lang.Comparable<T>, com.google.protobuf.FieldSet.FieldDescriptorLite<T>) com.google.protobuf.Descriptors.FileDescriptor com.google.protobuf.Descriptors.MethodDescriptor com.google.protobuf.Descriptors.OneofDescriptor com.google.protobuf.Descriptors.ServiceDescriptor com.google.protobuf.DurationProto com.google.protobuf.util.Durations com.google.protobuf.EmptyProto com.google.protobuf.ExtensionLite<ContainingType,Type> com.google.protobuf.Extension<ContainingType,Type> com.google.protobuf.ExtensionRegistry.ExtensionInfo com.google.protobuf.ExtensionRegistryLite com.google.protobuf.ExtensionRegistry com.google.protobuf.FieldMaskProto com.google.protobuf.util.FieldMaskUtil com.google.protobuf.util.FieldMaskUtil.MergeOptions com.google.protobuf.util.JsonFormat com.google.protobuf.util.JsonFormat.Parser com.google.protobuf.util.JsonFormat.Printer com.google.protobuf.util.JsonFormat.TypeRegistry com.google.protobuf.util.JsonFormat.TypeRegistry.Builder com.google.protobuf.MapField<K,V> java.io.OutputStream (implements java.io.Closeable, java.io.Flushable) com.google.protobuf.ByteString.Output com.google.protobuf.compiler.PluginProtos com.google.protobuf.RpcUtil com.google.protobuf.SourceContextProto com.google.protobuf.StructProto com.google.protobuf.util.Structs com.google.protobuf.TextFormat com.google.protobuf.TextFormat.Parser com.google.protobuf.TextFormat.Parser.Builder com.google.protobuf.TextFormat.Printer com.google.protobuf.TextFormatParseInfoTree com.google.protobuf.TextFormatParseInfoTree.Builder com.google.protobuf.TextFormatParseLocation java.lang.Throwable (implements java.io.Serializable) java.lang.Exception com.google.protobuf.Descriptors.DescriptorValidationException java.io.IOException com.google.protobuf.CodedOutputStream.OutOfSpaceException com.google.protobuf.InvalidProtocolBufferException com.google.protobuf.InvalidProtocolBufferException.InvalidWireTypeException com.google.protobuf.TextFormat.InvalidEscapeSequenceException com.google.protobuf.TextFormat.ParseException com.google.protobuf.TextFormat.UnknownFieldParseException java.lang.RuntimeException com.google.protobuf.RpcUtil.AlreadyCalledException com.google.protobuf.UninitializedMessageException com.google.protobuf.ServiceException com.google.protobuf.TimestampProto com.google.protobuf.util.Timestamps com.google.protobuf.util.TimeUtil com.google.protobuf.TypeProto com.google.protobuf.TypeRegistry com.google.protobuf.TypeRegistry.Builder com.google.protobuf.UnsafeByteOperations com.google.protobuf.util.Values com.google.protobuf.WireFormat com.google.protobuf.WrappersProto Interface Hierarchy com.google.protobuf.BlockingRpcChannel com.google.protobuf.BlockingService java.lang.Cloneable com.google.protobuf.MessageLite.Builder (also extends com.google.protobuf.MessageLiteOrBuilder) com.google.protobuf.Message.Builder (also extends com.google.protobuf.MessageOrBuilder) com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner com.google.protobuf.Internal.EnumLite com.google.protobuf.ProtocolMessageEnum java.lang.Iterable<T> java.util.Collection<E> java.util.List<E> com.google.protobuf.ProtocolStringList java.util.Iterator<E> com.google.protobuf.ByteString.ByteIterator com.google.protobuf.MessageLiteOrBuilder com.google.protobuf.AnyOrBuilder com.google.protobuf.ApiOrBuilder com.google.protobuf.BoolValueOrBuilder com.google.protobuf.BytesValueOrBuilder com.google.protobuf.DescriptorProtos.DescriptorProto.ExtensionRangeOrBuilder com.google.protobuf.DescriptorProtos.DescriptorProto.ReservedRangeOrBuilder com.google.protobuf.DescriptorProtos.DescriptorProtoOrBuilder com.google.protobuf.DescriptorProtos.EnumDescriptorProto.EnumReservedRangeOrBuilder com.google.protobuf.DescriptorProtos.EnumDescriptorProtoOrBuilder com.google.protobuf.DescriptorProtos.EnumOptionsOrBuilder com.google.protobuf.DescriptorProtos.EnumValueDescriptorProtoOrBuilder com.google.protobuf.DescriptorProtos.EnumValueOptionsOrBuilder com.google.protobuf.DescriptorProtos.ExtensionRangeOptionsOrBuilder com.google.protobuf.DescriptorProtos.FieldDescriptorProtoOrBuilder com.google.protobuf.DescriptorProtos.FieldOptionsOrBuilder com.google.protobuf.DescriptorProtos.FileDescriptorProtoOrBuilder com.google.protobuf.DescriptorProtos.FileDescriptorSetOrBuilder com.google.protobuf.DescriptorProtos.FileOptionsOrBuilder com.google.protobuf.DescriptorProtos.GeneratedCodeInfo.AnnotationOrBuilder com.google.protobuf.DescriptorProtos.GeneratedCodeInfoOrBuilder com.google.protobuf.DescriptorProtos.MessageOptionsOrBuilder com.google.protobuf.DescriptorProtos.MethodDescriptorProtoOrBuilder com.google.protobuf.DescriptorProtos.MethodOptionsOrBuilder com.google.protobuf.DescriptorProtos.OneofDescriptorProtoOrBuilder com.google.protobuf.DescriptorProtos.OneofOptionsOrBuilder com.google.protobuf.DescriptorProtos.ServiceDescriptorProtoOrBuilder com.google.protobuf.DescriptorProtos.ServiceOptionsOrBuilder com.google.protobuf.DescriptorProtos.SourceCodeInfo.LocationOrBuilder com.google.protobuf.DescriptorProtos.SourceCodeInfoOrBuilder com.google.protobuf.DescriptorProtos.UninterpretedOption.NamePartOrBuilder com.google.protobuf.DescriptorProtos.UninterpretedOptionOrBuilder com.google.protobuf.DoubleValueOrBuilder com.google.protobuf.DurationOrBuilder com.google.protobuf.EmptyOrBuilder com.google.protobuf.EnumOrBuilder com.google.protobuf.EnumValueOrBuilder com.google.protobuf.FieldMaskOrBuilder com.google.protobuf.FieldOrBuilder com.google.protobuf.FloatValueOrBuilder com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType> com.google.protobuf.DescriptorProtos.EnumOptionsOrBuilder com.google.protobuf.DescriptorProtos.EnumValueOptionsOrBuilder com.google.protobuf.DescriptorProtos.ExtensionRangeOptionsOrBuilder com.google.protobuf.DescriptorProtos.FieldOptionsOrBuilder com.google.protobuf.DescriptorProtos.FileOptionsOrBuilder com.google.protobuf.DescriptorProtos.MessageOptionsOrBuilder com.google.protobuf.DescriptorProtos.MethodOptionsOrBuilder com.google.protobuf.DescriptorProtos.OneofOptionsOrBuilder com.google.protobuf.DescriptorProtos.ServiceOptionsOrBuilder com.google.protobuf.Int32ValueOrBuilder com.google.protobuf.Int64ValueOrBuilder com.google.protobuf.ListValueOrBuilder com.google.protobuf.Message (also extends com.google.protobuf.MessageLite, com.google.protobuf.MessageOrBuilder) com.google.protobuf.Message.Builder (also extends com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageOrBuilder) com.google.protobuf.MessageLite com.google.protobuf.Message (also extends com.google.protobuf.MessageOrBuilder) com.google.protobuf.MessageLite.Builder (also extends java.lang.Cloneable) com.google.protobuf.Message.Builder (also extends com.google.protobuf.MessageOrBuilder) com.google.protobuf.MessageOrBuilder com.google.protobuf.AnyOrBuilder com.google.protobuf.ApiOrBuilder com.google.protobuf.BoolValueOrBuilder com.google.protobuf.BytesValueOrBuilder com.google.protobuf.DescriptorProtos.DescriptorProto.ExtensionRangeOrBuilder com.google.protobuf.DescriptorProtos.DescriptorProto.ReservedRangeOrBuilder com.google.protobuf.DescriptorProtos.DescriptorProtoOrBuilder com.google.protobuf.DescriptorProtos.EnumDescriptorProto.EnumReservedRangeOrBuilder com.google.protobuf.DescriptorProtos.EnumDescriptorProtoOrBuilder com.google.protobuf.DescriptorProtos.EnumOptionsOrBuilder com.google.protobuf.DescriptorProtos.EnumValueDescriptorProtoOrBuilder com.google.protobuf.DescriptorProtos.EnumValueOptionsOrBuilder com.google.protobuf.DescriptorProtos.ExtensionRangeOptionsOrBuilder com.google.protobuf.DescriptorProtos.FieldDescriptorProtoOrBuilder com.google.protobuf.DescriptorProtos.FieldOptionsOrBuilder com.google.protobuf.DescriptorProtos.FileDescriptorProtoOrBuilder com.google.protobuf.DescriptorProtos.FileDescriptorSetOrBuilder com.google.protobuf.DescriptorProtos.FileOptionsOrBuilder com.google.protobuf.DescriptorProtos.GeneratedCodeInfo.AnnotationOrBuilder com.google.protobuf.DescriptorProtos.GeneratedCodeInfoOrBuilder com.google.protobuf.DescriptorProtos.MessageOptionsOrBuilder com.google.protobuf.DescriptorProtos.MethodDescriptorProtoOrBuilder com.google.protobuf.DescriptorProtos.MethodOptionsOrBuilder com.google.protobuf.DescriptorProtos.OneofDescriptorProtoOrBuilder com.google.protobuf.DescriptorProtos.OneofOptionsOrBuilder com.google.protobuf.DescriptorProtos.ServiceDescriptorProtoOrBuilder com.google.protobuf.DescriptorProtos.ServiceOptionsOrBuilder com.google.protobuf.DescriptorProtos.SourceCodeInfo.LocationOrBuilder com.google.protobuf.DescriptorProtos.SourceCodeInfoOrBuilder com.google.protobuf.DescriptorProtos.UninterpretedOption.NamePartOrBuilder com.google.protobuf.DescriptorProtos.UninterpretedOptionOrBuilder com.google.protobuf.DoubleValueOrBuilder com.google.protobuf.DurationOrBuilder com.google.protobuf.EmptyOrBuilder com.google.protobuf.EnumOrBuilder com.google.protobuf.EnumValueOrBuilder com.google.protobuf.FieldMaskOrBuilder com.google.protobuf.FieldOrBuilder com.google.protobuf.FloatValueOrBuilder com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType> com.google.protobuf.DescriptorProtos.EnumOptionsOrBuilder com.google.protobuf.DescriptorProtos.EnumValueOptionsOrBuilder com.google.protobuf.DescriptorProtos.ExtensionRangeOptionsOrBuilder com.google.protobuf.DescriptorProtos.FieldOptionsOrBuilder com.google.protobuf.DescriptorProtos.FileOptionsOrBuilder com.google.protobuf.DescriptorProtos.MessageOptionsOrBuilder com.google.protobuf.DescriptorProtos.MethodOptionsOrBuilder com.google.protobuf.DescriptorProtos.OneofOptionsOrBuilder com.google.protobuf.DescriptorProtos.ServiceOptionsOrBuilder com.google.protobuf.Int32ValueOrBuilder com.google.protobuf.Int64ValueOrBuilder com.google.protobuf.ListValueOrBuilder com.google.protobuf.Message (also extends com.google.protobuf.MessageLite) com.google.protobuf.Message.Builder (also extends com.google.protobuf.MessageLite.Builder) com.google.protobuf.MethodOrBuilder com.google.protobuf.MixinOrBuilder com.google.protobuf.OptionOrBuilder com.google.protobuf.compiler.PluginProtos.CodeGeneratorRequestOrBuilder com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.FileOrBuilder com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponseOrBuilder com.google.protobuf.compiler.PluginProtos.VersionOrBuilder com.google.protobuf.SourceContextOrBuilder com.google.protobuf.StringValueOrBuilder com.google.protobuf.StructOrBuilder com.google.protobuf.TimestampOrBuilder com.google.protobuf.TypeOrBuilder com.google.protobuf.UInt32ValueOrBuilder com.google.protobuf.UInt64ValueOrBuilder com.google.protobuf.ValueOrBuilder com.google.protobuf.MethodOrBuilder com.google.protobuf.MixinOrBuilder com.google.protobuf.OptionOrBuilder com.google.protobuf.compiler.PluginProtos.CodeGeneratorRequestOrBuilder com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.FileOrBuilder com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponseOrBuilder com.google.protobuf.compiler.PluginProtos.VersionOrBuilder com.google.protobuf.SourceContextOrBuilder com.google.protobuf.StringValueOrBuilder com.google.protobuf.StructOrBuilder com.google.protobuf.TimestampOrBuilder com.google.protobuf.TypeOrBuilder com.google.protobuf.UInt32ValueOrBuilder com.google.protobuf.UInt64ValueOrBuilder com.google.protobuf.ValueOrBuilder com.google.protobuf.Parser<MessageType> com.google.protobuf.RpcCallback<ParameterType> com.google.protobuf.RpcChannel com.google.protobuf.RpcController com.google.protobuf.Service Annotation Type Hierarchy com.google.protobuf.ExperimentalApi (implements java.lang.annotation.Annotation) Enum Hierarchy java.lang.Object java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable) com.google.protobuf.Descriptors.FileDescriptor.Syntax com.google.protobuf.Descriptors.FieldDescriptor.Type com.google.protobuf.Descriptors.FieldDescriptor.JavaType com.google.protobuf.Extension.MessageType com.google.protobuf.FieldType com.google.protobuf.JavaType com.google.protobuf.ProtoSyntax com.google.protobuf.TextFormat.Parser.SingularOverwritePolicy com.google.protobuf.WireFormat.JavaType com.google.protobuf.WireFormat.FieldType com.google.protobuf.DescriptorProtos.FieldDescriptorProto.Type (implements com.google.protobuf.ProtocolMessageEnum) com.google.protobuf.DescriptorProtos.FieldDescriptorProto.Label (implements com.google.protobuf.ProtocolMessageEnum) com.google.protobuf.DescriptorProtos.FileOptions.OptimizeMode (implements com.google.protobuf.ProtocolMessageEnum) com.google.protobuf.DescriptorProtos.FieldOptions.CType (implements com.google.protobuf.ProtocolMessageEnum) com.google.protobuf.DescriptorProtos.FieldOptions.JSType (implements com.google.protobuf.ProtocolMessageEnum) com.google.protobuf.DescriptorProtos.MethodOptions.IdempotencyLevel (implements com.google.protobuf.ProtocolMessageEnum) com.google.protobuf.Field.Kind (implements com.google.protobuf.ProtocolMessageEnum) com.google.protobuf.Field.Cardinality (implements com.google.protobuf.ProtocolMessageEnum) com.google.protobuf.NullValue (implements com.google.protobuf.ProtocolMessageEnum) com.google.protobuf.Syntax (implements com.google.protobuf.ProtocolMessageEnum) com.google.protobuf.Value.KindCase (implements com.google.protobuf.Internal.EnumLite) com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.Feature (implements com.google.protobuf.ProtocolMessageEnum)\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:09.452Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":0,"totalLines":5,"estimatedTokens":7178}}319{"id":"doc-multitenancy_qdrant-eb4a047d","source":"documentation","title":"Multitenancy - Qdrant","url":"https://qdrant.tech/documentation/manage-data/multitenancy/","text":"Example:\n```http\nPUT /collections/{collection_name}/index\n{\n    \"field_name\": \"group_id\",\n    \"field_schema\": {\n        \"type\": \"keyword\",\n        \"is_tenant\": true\n    }\n}\n```\n\nExample:\n```python\nclient.create_payload_index(\n    collection_name=\"{collection_name}\",\n    field_name=\"group_id\",\n    field_schema=models.KeywordIndexParams(\n        type=models.KeywordIndexType.KEYWORD,\n        is_tenant=True,\n    ),\n)\n```\n\nExample:\n```typescript\nclient.createPayloadIndex(\"{collection_name}\", {\n  field_name: \"group_id\",\n  field_schema: {\n    type: \"keyword\",\n    is_tenant: true,\n  },\n});\n```\n\nExample:\n```rust\nuse qdrant_client::qdrant::{\n    CreateFieldIndexCollectionBuilder,\n    KeywordIndexParamsBuilder,\n    FieldType\n};\nuse qdrant_client::Qdrant;\n\nlet client = Qdrant::from_url(\"http://localhost:6334\").build()?;\n\nclient.create_field_index(\n        CreateFieldIndexCollectionBuilder::new(\n            \"{collection_name}\",\n            \"group_id\",\n            FieldType::Keyword,\n        ).field_index_params(\n            KeywordIndexParamsBuilder::default()\n                .is_tenant(true)\n        )\n    ).await?;\n```\n\nExample:\n```java\nimport io.qdrant.client.QdrantClient;\nimport io.qdrant.client.QdrantGrpcClient;\nimport io.qdrant.client.grpc.Collections.KeywordIndexParams;\nimport io.qdrant.client.grpc.Collections.PayloadIndexParams;\nimport io.qdrant.client.grpc.Collections.PayloadSchemaType;\n\nQdrantClient client =\n    new QdrantClient(QdrantGrpcClient.newBuilder(\"localhost\", 6334, false).build());\n\nclient\n    .createPayloadIndexAsync(\n        \"{collection_name}\",\n        \"group_id\",\n        PayloadSchemaType.Keyword,\n        PayloadIndexParams.newBuilder()\n            .setKeywordIndexParams(\n                KeywordIndexParams.newBuilder()\n                    .setIsTenant(true)\n                    .build())\n            .build(),\n        null,\n        null,\n        null)\n    .get();\n```\n\nExample:\n```csharp\nusing Qdrant.Client;\nusing Qdrant.Client.Grpc;\n\nvar client = new QdrantClient(\"localhost\", 6334);\n\nawait client.CreatePayloadIndexAsync(\n\tcollectionName: \"{collection_name}\",\n\tfieldName: \"group_id\",\n\tschemaType: PayloadSchemaType.Keyword,\n\tindexParams: new PayloadIndexParams\n\t{\n\t\tKeywordIndexParams = new KeywordIndexParams\n\t\t{\n\t\t\tIsTenant = true\n\t\t}\n\t}\n);\n```\n\nExample:\n```go\nimport (\n\t\"context\"\n\n\t\"github.com/qdrant/go-client/qdrant\"\n)\n\nclient, err := qdrant.NewClient(&qdrant.Config{\n\tHost: \"localhost\",\n\tPort: 6334,\n})\n\nclient.CreateFieldIndex(context.Background(), &qdrant.CreateFieldIndexCollection{\n\tCollectionName: \"{collection_name}\",\n\tFieldName:      \"group_id\",\n\tFieldType:      qdrant.FieldType_FieldTypeKeyword.Enum(),\n\tFieldIndexParams: qdrant.NewPayloadIndexParams(\n\t\t&qdrant.KeywordIndexParams{\n\t\t\tIsTenant: qdrant.PtrOf(true),\n\t\t}),\n})\n```\n\nExample:\n```http\nPUT /collections/{collection_name}/points\n{\n    \"points\": [\n        {\n            \"id\": 1,\n            \"payload\": {\"group_id\": \"user_1\"},\n            \"vector\": [0.9, 0.1, 0.1]\n        },\n        {\n            \"id\": 2,\n            \"payload\": {\"group_id\": \"user_1\"},\n            \"vector\": [0.1, 0.9, 0.1]\n        },\n        {\n            \"id\": 3,\n            \"payload\": {\"group_id\": \"user_2\"},\n            \"vector\": [0.1, 0.1, 0.9]\n        },\n    ]\n}\n```\n\nExample:\n```python\nclient.upsert(\n    collection_name=\"{collection_name}\",\n    points=[\n        models.PointStruct(\n            id=1,\n            payload={\"group_id\": \"user_1\"},\n            vector=[0.9, 0.1, 0.1],\n        ),\n        models.PointStruct(\n            id=2,\n            payload={\"group_id\": \"user_1\"},\n            vector=[0.1, 0.9, 0.1],\n        ),\n        models.PointStruct(\n            id=3,\n            payload={\"group_id\": \"user_2\"},\n            vector=[0.1, 0.1, 0.9],\n        ),\n    ],\n)\n```\n\nExample:\n```typescript\nimport { QdrantClient } from \"@qdrant/js-client-rest\";\n\nconst client = new QdrantClient({ host: \"localhost\", port: 6333 });\n\nclient.upsert(\"{collection_name}\", {\n  points: [\n    {\n      id: 1,\n      payload: { group_id: \"user_1\" },\n      vector: [0.9, 0.1, 0.1],\n    },\n    {\n      id: 2,\n      payload: { group_id: \"user_1\" },\n      vector: [0.1, 0.9, 0.1],\n    },\n    {\n      id: 3,\n      payload: { group_id: \"user_2\" },\n      vector: [0.1, 0.1, 0.9],\n    },\n  ],\n});\n```\n\nExample:\n```rust\nuse qdrant_client::qdrant::{PointStruct, UpsertPointsBuilder};\nuse qdrant_client::Qdrant;\n\nlet client = Qdrant::from_url(\"http://localhost:6334\").build()?;\n\nclient\n    .upsert_points(UpsertPointsBuilder::new(\n        \"{collection_name}\",\n        vec![\n            PointStruct::new(1, vec![0.9, 0.1, 0.1], [(\"group_id\", \"user_1\".into())]),\n            PointStruct::new(2, vec![0.1, 0.9, 0.1], [(\"group_id\", \"user_1\".into())]),\n            PointStruct::new(3, vec![0.1, 0.1, 0.9], [(\"group_id\", \"user_2\".into())]),\n        ],\n    ))\n    .await?;\n```\n\nExample:\n```java\nimport static io.qdrant.client.PointIdFactory.id;\nimport static io.qdrant.client.ValueFactory.value;\nimport static io.qdrant.client.VectorsFactory.vectors;\n\nimport io.qdrant.client.QdrantClient;\nimport io.qdrant.client.QdrantGrpcClient;\nimport io.qdrant.client.grpc.Points.PointStruct;\nimport java.util.List;\nimport java.util.Map;\n\nQdrantClient client =\n    new QdrantClient(QdrantGrpcClient.newBuilder(\"localhost\", 6334, false).build());\n\nclient\n    .upsertAsync(\n        \"{collection_name}\",\n        List.of(\n            PointStruct.newBuilder()\n                .setId(id(1))\n                .setVectors(vectors(0.9f, 0.1f, 0.1f))\n                .putAllPayload(Map.of(\"group_id\", value(\"user_1\")))\n                .build(),\n            PointStruct.newBuilder()\n                .setId(id(2))\n                .setVectors(vectors(0.1f, 0.9f, 0.1f))\n                .putAllPayload(Map.of(\"group_id\", value(\"user_1\")))\n                .build(),\n            PointStruct.newBuilder()\n                .setId(id(3))\n                .setVectors(vectors(0.1f, 0.1f, 0.9f))\n                .putAllPayload(Map.of(\"group_id\", value(\"user_2\")))\n                .build()))\n    .get();\n```\n\nExample:\n```csharp\nusing Qdrant.Client;\nusing Qdrant.Client.Grpc;\n\nvar client = new QdrantClient(\"localhost\", 6334);\n\nawait client.UpsertAsync(\n\tcollectionName: \"{collection_name}\",\n\tpoints: new List<PointStruct>\n\t{\n\t\tnew()\n\t\t{\n\t\t\tId = 1,\n\t\t\tVectors = new[] { 0.9f, 0.1f, 0.1f },\n\t\t\tPayload = { [\"group_id\"] = \"user_1\" }\n\t\t},\n\t\tnew()\n\t\t{\n\t\t\tId = 2,\n\t\t\tVectors = new[] { 0.1f, 0.9f, 0.1f },\n\t\t\tPayload = { [\"group_id\"] = \"user_1\" }\n\t\t},\n\t\tnew()\n\t\t{\n\t\t\tId = 3,\n\t\t\tVectors = new[] { 0.1f, 0.1f, 0.9f },\n\t\t\tPayload = { [\"group_id\"] = \"user_2\" }\n\t\t}\n\t}\n);\n```\n\nExample:\n```go\nimport (\n\t\"context\"\n\n\t\"github.com/qdrant/go-client/qdrant\"\n)\n\nclient, err := qdrant.NewClient(&qdrant.Config{\n\tHost: \"localhost\",\n\tPort: 6334,\n})\n\nclient.Upsert(context.Background(), &qdrant.UpsertPoints{\n\tCollectionName: \"{collection_name}\",\n\tPoints: []*qdrant.PointStruct{\n\t\t{\n\t\t\tId:      qdrant.NewIDNum(1),\n\t\t\tVectors: qdrant.NewVectors(0.9, 0.1, 0.1),\n\t\t\tPayload: qdrant.NewValueMap(map[string]any{\"group_id\": \"user_1\"}),\n\t\t},\n\t\t{\n\t\t\tId:      qdrant.NewIDNum(2),\n\t\t\tVectors: qdrant.NewVectors(0.1, 0.9, 0.1),\n\t\t\tPayload: qdrant.NewValueMap(map[string]any{\"group_id\": \"user_1\"}),\n\t\t},\n\t\t{\n\t\t\tId:      qdrant.NewIDNum(3),\n\t\t\tVectors: qdrant.NewVectors(0.1, 0.1, 0.9),\n\t\t\tPayload: qdrant.NewValueMap(map[string]any{\"group_id\": \"user_2\"}),\n\t\t},\n\t},\n})\n```\n\nExample:\n```http\nPOST /collections/{collection_name}/points/query\n{\n    \"query\": [0.1, 0.1, 0.9],\n    \"filter\": {\n        \"must\": [\n            {\n                \"key\": \"group_id\",\n                \"match\": {\n                    \"value\": \"user_1\"\n                }\n            }\n        ]\n    },\n    \"limit\": 10\n}\n```\n\nExample:\n```python\nfrom qdrant_client import QdrantClient, models\n\nclient = QdrantClient(url=\"http://localhost:6333\")\n\nclient.query_points(\n    collection_name=\"{collection_name}\",\n    query=[0.1, 0.1, 0.9],\n    query_filter=models.Filter(\n        must=[\n            models.FieldCondition(\n                key=\"group_id\",\n                match=models.MatchValue(\n                    value=\"user_1\",\n                ),\n            )\n        ]\n    ),\n    limit=10,\n)\n```\n\nExample:\n```typescript\nimport { QdrantClient } from \"@qdrant/js-client-rest\";\n\nconst client = new QdrantClient({ host: \"localhost\", port: 6333 });\n\nclient.query(\"{collection_name}\", {\n    query: [0.1, 0.1, 0.9],\n    filter: {\n        must: [{ key: \"group_id\", match: { value: \"user_1\" } }],\n    },\n    limit: 10,\n});\n```\n\nExample:\n```rust\nuse qdrant_client::qdrant::{Condition, Filter, QueryPointsBuilder};\nuse qdrant_client::Qdrant;\n\nlet client = Qdrant::from_url(\"http://localhost:6334\").build()?;\n\nclient\n    .query(\n        QueryPointsBuilder::new(\"{collection_name}\")\n            .query(vec![0.1, 0.1, 0.9])\n            .limit(10)\n            .filter(Filter::must([Condition::matches(\n                \"group_id\",\n                \"user_1\".to_string(),\n            )])),\n    )\n    .await?;\n```\n\nExample:\n```java\nimport static io.qdrant.client.ConditionFactory.matchKeyword;\nimport static io.qdrant.client.QueryFactory.nearest;\n\nimport io.qdrant.client.QdrantClient;\nimport io.qdrant.client.QdrantGrpcClient;\nimport io.qdrant.client.grpc.Common.Filter;\nimport io.qdrant.client.grpc.Points.QueryPoints;\nimport java.util.List;\n\nQdrantClient client =\n    new QdrantClient(QdrantGrpcClient.newBuilder(\"localhost\", 6334, false).build());\n\nclient.queryAsync(\n        QueryPoints.newBuilder()\n                .setCollectionName(\"{collection_name}\")\n                .setFilter(\n                        Filter.newBuilder().addMust(matchKeyword(\"group_id\", \"user_1\")).build())\n                .setQuery(nearest(0.1f, 0.1f, 0.9f))\n                .setLimit(10)\n                .build())\n        .get();\n```\n\nExample:\n```csharp\nusing Qdrant.Client;\nusing Qdrant.Client.Grpc;\nusing static Qdrant.Client.Grpc.Conditions;\n\nvar client = new QdrantClient(\"localhost\", 6334);\n\nawait client.QueryAsync(\n\tcollectionName: \"{collection_name}\",\n\tquery: new float[] { 0.1f, 0.1f, 0.9f },\n\tfilter: MatchKeyword(\"group_id\", \"user_1\"),\n\tlimit: 10\n);\n```\n\nExample:\n```go\nimport (\n\t\"context\"\n\n\t\"github.com/qdrant/go-client/qdrant\"\n)\n\nclient, err := qdrant.NewClient(&qdrant.Config{\n\tHost: \"localhost\",\n\tPort: 6334,\n})\n\nclient.Query(context.Background(), &qdrant.QueryPoints{\n\tCollectionName: \"{collection_name}\",\n\tQuery:          qdrant.NewQuery(0.1, 0.1, 0.9),\n\tFilter: &qdrant.Filter{\n\t\tMust: []*qdrant.Condition{\n\t\t\tqdrant.NewMatch(\"group_id\", \"user_1\"),\n\t\t},\n\t},\n})\n```\n\nExample:\n```http\nPUT /collections/{collection_name}\n{\n    \"vectors\": {\n      \"size\": 768,\n      \"distance\": \"Cosine\"\n    },\n    \"hnsw_config\": {\n        \"payload_m\": 16,\n        \"m\": 0\n    }\n}\n```\n\nExample:\n```python\nfrom qdrant_client import QdrantClient, models\n\nclient = QdrantClient(url=\"http://localhost:6333\")\n\nclient.create_collection(\n    collection_name=\"{collection_name}\",\n    vectors_config=models.VectorParams(size=768, distance=models.Distance.COSINE),\n    hnsw_config=models.HnswConfigDiff(\n        payload_m=16,\n        m=0,\n    ),\n)\n```\n\nExample:\n```typescript\nimport { QdrantClient } from \"@qdrant/js-client-rest\";\n\nconst client = new QdrantClient({ host: \"localhost\", port: 6333 });\n\nclient.createCollection(\"{collection_name}\", {\n  vectors: {\n    size: 768,\n    distance: \"Cosine\",\n  },\n  hnsw_config: {\n    payload_m: 16,\n    m: 0,\n  },\n});\n```\n\nExample:\n```rust\nuse qdrant_client::qdrant::{\n    CreateCollectionBuilder, Distance, HnswConfigDiffBuilder, VectorParamsBuilder,\n};\nuse qdrant_client::Qdrant;\n\nlet client = Qdrant::from_url(\"http://localhost:6334\").build()?;\n\nclient\n    .create_collection(\n        CreateCollectionBuilder::new(\"{collection_name}\")\n            .vectors_config(VectorParamsBuilder::new(768, Distance::Cosine))\n            .hnsw_config(HnswConfigDiffBuilder::default().payload_m(16).m(0)),\n    )\n    .await?;\n```\n\nExample:\n```java\nimport io.qdrant.client.QdrantClient;\nimport io.qdrant.client.QdrantGrpcClient;\nimport io.qdrant.client.grpc.Collections.CreateCollection;\nimport io.qdrant.client.grpc.Collections.Distance;\nimport io.qdrant.client.grpc.Collections.HnswConfigDiff;\nimport io.qdrant.client.grpc.Collections.VectorParams;\nimport io.qdrant.client.grpc.Collections.VectorsConfig;\n\nQdrantClient client =\n    new QdrantClient(QdrantGrpcClient.newBuilder(\"localhost\", 6334, false).build());\n\nclient\n    .createCollectionAsync(\n        CreateCollection.newBuilder()\n            .setCollectionName(\"{collection_name}\")\n            .setVectorsConfig(\n                VectorsConfig.newBuilder()\n                    .setParams(\n                        VectorParams.newBuilder()\n                            .setSize(768)\n                            .setDistance(Distance.Cosine)\n                            .build())\n                    .build())\n            .setHnswConfig(HnswConfigDiff.newBuilder().setPayloadM(16).setM(0).build())\n            .build())\n    .get();\n```\n\nExample:\n```csharp\nusing Qdrant.Client;\nusing Qdrant.Client.Grpc;\n\nvar client = new QdrantClient(\"localhost\", 6334);\n\nawait client.CreateCollectionAsync(\n\tcollectionName: \"{collection_name}\",\n\tvectorsConfig: new VectorParams { Size = 768, Distance = Distance.Cosine },\n\thnswConfig: new HnswConfigDiff { PayloadM = 16, M = 0 }\n);\n```\n\nExample:\n```go\nimport (\n\t\"context\"\n\n\t\"github.com/qdrant/go-client/qdrant\"\n)\n\nclient, err := qdrant.NewClient(&qdrant.Config{\n\tHost: \"localhost\",\n\tPort: 6334,\n})\n\nclient.CreateCollection(context.Background(), &qdrant.CreateCollection{\n\tCollectionName: \"{collection_name}\",\n\tVectorsConfig: qdrant.NewVectorsConfig(&qdrant.VectorParams{\n\t\tSize:     768,\n\t\tDistance: qdrant.Distance_Cosine,\n\t}),\n\tHnswConfig: &qdrant.HnswConfigDiff{\n\t\tPayloadM: qdrant.PtrOf(uint64(16)),\n\t\tM:        qdrant.PtrOf(uint64(0)),\n\t},\n})\n```\n\nExample:\n```http\nPOST /collections/books/points/query\n{\n    \"query\": {\n        \"text\": \"time travel\",\n        \"model\": \"qdrant/bm25\"\n    },\n    \"using\": \"title-bm25\",\n    \"filter\": {\n        \"must\": [\n            { \"key\": \"tenant\", \"match\": { \"value\": \"acme\" } },\n            { \"key\": \"year\", \"match\": { \"value\": 2024 } }\n        ]\n    },\n    \"params\": {\n        \"idf\": {\n            \"corpus\": {\n                \"must\": [\n                    { \"key\": \"tenant\", \"match\": { \"value\": \"acme\" } }\n                ]\n            }\n        }\n    },\n    \"limit\": 10,\n    \"with_payload\": true\n}\n```\n\nExample:\n```python\nfrom qdrant_client import QdrantClient, models\n\nclient = QdrantClient(\n    url=\"https://xyz-example.qdrant.io:6333\",\n    api_key=\"<your-api-key>\",\n    cloud_inference=True,\n)\n\nclient.query_points(\n    collection_name=\"books\",\n    query=models.Document(text=\"time travel\", model=\"qdrant/bm25\"),\n    using=\"title-bm25\",\n    query_filter=models.Filter(\n        must=[\n            models.FieldCondition(key=\"tenant\", match=models.MatchValue(value=\"acme\")),\n            models.FieldCondition(key=\"year\", match=models.MatchValue(value=2024)),\n        ]\n    ),\n    search_params=models.SearchParams(\n        idf=models.IdfCorpusParams(\n            corpus=models.Filter(\n                must=[\n                    models.FieldCondition(\n                        key=\"tenant\", match=models.MatchValue(value=\"acme\")\n                    ),\n                ]\n            )\n        )\n    ),\n    limit=10,\n    with_payload=True,\n)\n```\n\nExample:\n```typescript\nclient.query(\"books\", {\n  query: {\n    text: \"time travel\",\n    model: \"qdrant/bm25\",\n  },\n  using: \"title-bm25\",\n  filter: {\n    must: [\n      { key: \"tenant\", match: { value: \"acme\" } },\n      { key: \"year\", match: { value: 2024 } },\n    ],\n  },\n  params: {\n    idf: {\n      corpus: {\n        must: [{ key: \"tenant\", match: { value: \"acme\" } }],\n      },\n    },\n  },\n  limit: 10,\n  with_payload: true,\n});\n```\n\nExample:\n```rust\nuse qdrant_client::Qdrant;\nuse qdrant_client::qdrant::{\n    Condition, Document, Filter, IdfParamsBuilder, Query, QueryPointsBuilder, SearchParamsBuilder,\n};\n\nclient\n    .query(\n        QueryPointsBuilder::new(\"books\")\n            .query(Query::new_nearest(Document::new(\"time travel\", \"qdrant/bm25\")))\n            .using(\"title-bm25\")\n            .filter(Filter::must([\n                Condition::matches(\"tenant\", \"acme\".to_string()),\n                Condition::matches(\"year\", 2024),\n            ]))\n            .params(SearchParamsBuilder::default().idf(\n                IdfParamsBuilder::default().corpus(Filter::must([Condition::matches(\n                    \"tenant\",\n                    \"acme\".to_string(),\n                )])),\n            ))\n            .limit(10)\n            .with_payload(true)\n            .build(),\n    )\n    .await?;\n```\n\nExample:\n```java\nimport static io.qdrant.client.ConditionFactory.match;\nimport static io.qdrant.client.ConditionFactory.matchKeyword;\nimport static io.qdrant.client.QueryFactory.nearest;\nimport static io.qdrant.client.WithPayloadSelectorFactory.enable;\n\nimport io.qdrant.client.QdrantClient;\nimport io.qdrant.client.QdrantGrpcClient;\nimport io.qdrant.client.grpc.Common.Filter;\nimport io.qdrant.client.grpc.Points.*;\n\nQdrantClient client =\n\nclient\n    .queryAsync(\n        QueryPoints.newBuilder()\n            .setCollectionName(\"books\")\n            .setQuery(\n                nearest(\n                    Document.newBuilder()\n                        .setText(\"time travel\")\n                        .setModel(\"qdrant/bm25\")\n                        .build()))\n            .setUsing(\"title-bm25\")\n            .setFilter(\n                Filter.newBuilder()\n                    .addMust(matchKeyword(\"tenant\", \"acme\"))\n                    .addMust(match(\"year\", 2024))\n                    .build())\n            .setParams(\n                SearchParams.newBuilder()\n                    .setIdf(\n                        IdfParams.newBuilder()\n                            .setCorpus(\n                                Filter.newBuilder()\n                                    .addMust(matchKeyword(\"tenant\", \"acme\"))\n                                    .build())\n                            .build())\n                    .build())\n            .setLimit(10)\n            .setWithPayload(enable(true))\n            .build())\n    .get();\n```\n\nExample:\n```csharp\nusing Qdrant.Client;\nusing Qdrant.Client.Grpc;\nusing static Qdrant.Client.Grpc.Conditions;\n\nawait client.QueryAsync(\n    collectionName: \"books\",\n    query: new Document { Text = \"time travel\", Model = \"qdrant/bm25\" },\n    usingVector: \"title-bm25\",\n    filter: new Filter\n    {\n        Must =\n        {\n            MatchKeyword(\"tenant\", \"acme\"),\n            Match(\"year\", 2024),\n        },\n    },\n    searchParams: new SearchParams\n    {\n        Idf = new IdfParams\n        {\n            Corpus = new Filter\n            {\n                Must = { MatchKeyword(\"tenant\", \"acme\") },\n            },\n        },\n    },\n    payloadSelector: true,\n    limit: 10\n);\n```\n\nExample:\n```go\nclient.Query(context.Background(), &qdrant.QueryPoints{\n\tCollectionName: \"books\",\n\tQuery: qdrant.NewQueryNearest(\n\t\tqdrant.NewVectorInputDocument(&qdrant.Document{\n\t\t\tModel: \"qdrant/bm25\",\n\t\t\tText:  \"time travel\",\n\t\t}),\n\t),\n\tUsing: qdrant.PtrOf(\"title-bm25\"),\n\tFilter: &qdrant.Filter{\n\t\tMust: []*qdrant.Condition{\n\t\t\tqdrant.NewMatch(\"tenant\", \"acme\"),\n\t\t\tqdrant.NewMatchInt(\"year\", 2024),\n\t\t},\n\t},\n\tParams: &qdrant.SearchParams{\n\t\tIdf: &qdrant.IdfParams{\n\t\t\tCorpus: &qdrant.Filter{\n\t\t\t\tMust: []*qdrant.Condition{\n\t\t\t\t\tqdrant.NewMatch(\"tenant\", \"acme\"),\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t},\n\tLimit:       qdrant.PtrOf(uint64(10)),\n\tWithPayload: qdrant.NewWithPayload(true),\n})\n```\n\nExample:\n```http\nPUT /collections/{collection_name}\n{\n    \"shard_number\": 1,\n    \"sharding_method\": \"custom\"\n    // ... other collection parameters\n}\n```\n\nExample:\n```python\nfrom qdrant_client import QdrantClient, models\n\nclient.create_collection(\n    collection_name=\"{collection_name}\",\n    shard_number=1,\n    sharding_method=models.ShardingMethod.CUSTOM,\n    # ... other collection parameters\n)\n```\n\nExample:\n```typescript\nimport { QdrantClient } from \"@qdrant/js-client-rest\";\n\nclient.createCollection(\"{collection_name}\", {\n    shard_number: 1,\n    sharding_method: \"custom\",\n    // ... other collection parameters\n});\n```\n\nExample:\n```rust\nuse qdrant_client::qdrant::{\n    CreateCollectionBuilder, Distance, ShardingMethod, VectorParamsBuilder,\n};\nuse qdrant_client::Qdrant;\n\nclient\n    .create_collection(\n        CreateCollectionBuilder::new(\"{collection_name}\")\n            .vectors_config(VectorParamsBuilder::new(300, Distance::Cosine))\n            .shard_number(1)\n            .sharding_method(ShardingMethod::Custom.into()),\n    )\n    .await?;\n```\n\nExample:\n```java\nimport static io.qdrant.client.ShardKeyFactory.shardKey;\n\nimport io.qdrant.client.QdrantClient;\nimport io.qdrant.client.QdrantGrpcClient;\nimport io.qdrant.client.grpc.Collections.CreateCollection;\nimport io.qdrant.client.grpc.Collections.ShardingMethod;\n\nclient\n    .createCollectionAsync(\n        CreateCollection.newBuilder()\n            .setCollectionName(\"{collection_name}\")\n            // ... other collection parameters\n            .setShardNumber(1)\n            .setShardingMethod(ShardingMethod.Custom)\n            .build())\n    .get();\n```\n\nExample:\n```csharp\nusing Qdrant.Client;\nusing Qdrant.Client.Grpc;\n\nawait client.CreateCollectionAsync(\n\tcollectionName: \"{collection_name}\",\n\t// ... other collection parameters\n\tshardNumber: 1,\n\tshardingMethod: ShardingMethod.Custom\n);\n```\n\nExample:\n```go\nimport (\n\t\"context\"\n\n\t\"github.com/qdrant/go-client/qdrant\"\n)\n\nclient.CreateCollection(context.Background(), &qdrant.CreateCollection{\n\tCollectionName: \"{collection_name}\",\n\t// ... other collection parameters\n\tShardNumber:    qdrant.PtrOf(uint32(1)),\n\tShardingMethod: qdrant.ShardingMethod_Custom.Enum(),\n})\n```\n\nExample:\n```http\nPUT /collections/{collection_name}/shards\n{\n  \"shard_key\": \"{shard_key}\"\n}\n```\n\nExample:\n```python\nfrom qdrant_client import QdrantClient, models\n\nclient.create_shard_key(\"{collection_name}\", \"{shard_key}\")\n```\n\nExample:\n```typescript\nimport { QdrantClient } from \"@qdrant/js-client-rest\";\n\nclient.createShardKey(\"{collection_name}\", {\n    shard_key: \"{shard_key}\"\n});\n```\n\nExample:\n```rust\nuse qdrant_client::qdrant::{\n    CreateShardKeyBuilder, CreateShardKeyRequestBuilder\n};\nuse qdrant_client::Qdrant;\n\nclient\n    .create_shard_key(\n        CreateShardKeyRequestBuilder::new(\"{collection_name}\")\n            .request(CreateShardKeyBuilder::default().shard_key(\"{shard_key}\".to_string())),\n    )\n    .await?;\n```\n\nExample:\n```java\nimport static io.qdrant.client.ShardKeyFactory.shardKey;\n\nimport io.qdrant.client.QdrantClient;\nimport io.qdrant.client.QdrantGrpcClient;\nimport io.qdrant.client.grpc.Collections.CreateShardKey;\nimport io.qdrant.client.grpc.Collections.CreateShardKeyRequest;\n\nclient.createShardKeyAsync(CreateShardKeyRequest.newBuilder()\n                .setCollectionName(\"{collection_name}\")\n                .setRequest(CreateShardKey.newBuilder()\n                                .setShardKey(shardKey(\"{shard_key}\"))\n                                .build())\n                .build()).get();\n```\n\nExample:\n```csharp\nusing Qdrant.Client;\nusing Qdrant.Client.Grpc;\n\nawait client.CreateShardKeyAsync(\n    \"{collection_name}\",\n    new CreateShardKey { ShardKey = new ShardKey { Keyword = \"{shard_key}\", } }\n    );\n```\n\nExample:\n```go\nimport (\n\t\"context\"\n\n\t\"github.com/qdrant/go-client/qdrant\"\n)\n\nclient.CreateShardKey(context.Background(), \"{collection_name}\", &qdrant.CreateShardKey{\n\tShardKey: qdrant.NewShardKey(\"{shard_key}\"),\n})\n```\n\nExample:\n```http\nPUT /collections/{collection_name}/points\n{\n    \"points\": [\n        {\n            \"id\": 1111,\n            \"vector\": [0.1, 0.2, 0.3]\n        },\n    ],\n    \"shard_key\": \"user_1\"\n}\n```\n\nExample:\n```python\nfrom qdrant_client import QdrantClient, models\n\nclient.upsert(\n    collection_name=\"{collection_name}\",\n    points=[\n        models.PointStruct(\n            id=1111,\n            vector=[0.1, 0.2, 0.3],\n        ),\n    ],\n    shard_key_selector=\"user_1\",\n)\n```\n\nExample:\n```typescript\nimport { QdrantClient } from \"@qdrant/js-client-rest\";\n\nclient.upsert(\"{collection_name}\", {\n    points: [\n        {\n            id: 1111,\n            vector: [0.1, 0.2, 0.3],\n        },\n    ],\n    shard_key: \"user_1\",\n});\n```\n\nExample:\n```rust\nuse qdrant_client::qdrant::{PointStruct, UpsertPointsBuilder};\nuse qdrant_client::Payload;\n\nclient\n    .upsert_points(\n        UpsertPointsBuilder::new(\n            \"{collection_name}\",\n            vec![PointStruct::new(\n                111,\n                vec![0.1, 0.2, 0.3],\n                Payload::default(),\n            )],\n        )\n        .shard_key_selector(\"user_1\".to_string()),\n    )\n    .await?;\n```\n\nExample:\n```java\nimport static io.qdrant.client.PointIdFactory.id;\nimport static io.qdrant.client.ShardKeySelectorFactory.shardKeySelector;\nimport static io.qdrant.client.VectorsFactory.vectors;\n\nimport io.qdrant.client.QdrantClient;\nimport io.qdrant.client.QdrantGrpcClient;\nimport io.qdrant.client.grpc.Points.PointStruct;\nimport io.qdrant.client.grpc.Points.UpsertPoints;\nimport java.util.List;\n\nclient\n    .upsertAsync(\n        UpsertPoints.newBuilder()\n            .setCollectionName(\"{collection_name}\")\n            .addAllPoints(\n                List.of(\n                    PointStruct.newBuilder()\n                        .setId(id(111))\n                        .setVectors(vectors(0.1f, 0.2f, 0.3f))\n                        .build()))\n            .setShardKeySelector(shardKeySelector(\"user_1\"))\n            .build()\n    )\n    .get();\n```\n\nExample:\n```csharp\nusing Qdrant.Client;\nusing Qdrant.Client.Grpc;\n\nawait client.UpsertAsync(\n\tcollectionName: \"{collection_name}\",\n\tpoints: new List<PointStruct>\n\t{\n\t\tnew() { Id = 111, Vectors = new[] { 0.1f, 0.2f, 0.3f } }\n\t},\n\tshardKeySelector: new ShardKeySelector { ShardKeys = { new List<ShardKey> { \"user_1\" } } }\n);\n```\n\nExample:\n```go\nimport (\n\t\"context\"\n\n\t\"github.com/qdrant/go-client/qdrant\"\n)\n\nclient.Upsert(context.Background(), &qdrant.UpsertPoints{\n\tCollectionName: \"{collection_name}\",\n\tPoints: []*qdrant.PointStruct{\n\t\t{\n\t\t\tId:      qdrant.NewIDNum(111),\n\t\t\tVectors: qdrant.NewVectors(0.1, 0.2, 0.3),\n\t\t},\n\t},\n\tShardKeySelector: &qdrant.ShardKeySelector{\n\t\tShardKeys: []*qdrant.ShardKey{\n\t\t\tqdrant.NewShardKey(\"user_1\"),\n\t\t},\n\t},\n})\n```\n\nExample:\n```http\nPUT /collections/{collection_name}/shards\n{\n  \"shard_key\": \"default\"\n}\n```\n\nExample:\n```python\nfrom qdrant_client import QdrantClient, models\n\nclient = QdrantClient(url=\"http://localhost:6333\")\n\nclient.create_shard_key(\"{collection_name}\", \"default\")\n```\n\nExample:\n```typescript\nimport { QdrantClient } from \"@qdrant/js-client-rest\";\n\nconst client = new QdrantClient({ host: \"localhost\", port: 6333 });\n\nclient.createShardKey(\"{collection_name}\", {\n    shard_key: \"default\"\n});\n```\n\nExample:\n```rust\nuse qdrant_client::qdrant::{\n    CreateShardKeyBuilder, CreateShardKeyRequestBuilder\n};\nuse qdrant_client::Qdrant;\n\nlet client = Qdrant::from_url(\"http://localhost:6334\").build()?;\n\nclient\n    .create_shard_key(\n        CreateShardKeyRequestBuilder::new(\"{collection_name}\")\n            .request(CreateShardKeyBuilder::default().shard_key(\"default\".to_string())),\n    )\n    .await?;\n```\n\nExample:\n```java\nimport static io.qdrant.client.ShardKeyFactory.shardKey;\n\nimport io.qdrant.client.QdrantClient;\nimport io.qdrant.client.QdrantGrpcClient;\nimport io.qdrant.client.grpc.Collections.CreateShardKey;\nimport io.qdrant.client.grpc.Collections.CreateShardKeyRequest;\n\nQdrantClient client =\n    new QdrantClient(QdrantGrpcClient.newBuilder(\"localhost\", 6334, false).build());\n\nclient.createShardKeyAsync(CreateShardKeyRequest.newBuilder()\n                .setCollectionName(\"{collection_name}\")\n                .setRequest(CreateShardKey.newBuilder()\n                                .setShardKey(shardKey(\"default\"))\n                                .build())\n                .build()).get();\n```\n\nExample:\n```csharp\nusing Qdrant.Client;\nusing Qdrant.Client.Grpc;\n\nvar client = new QdrantClient(\"localhost\", 6334);\n\nawait client.CreateShardKeyAsync(\n    \"{collection_name}\",\n    new CreateShardKey { ShardKey = new ShardKey { Keyword = \"default\", } }\n    );\n```\n\nExample:\n```go\nimport (\n\t\"context\"\n\n\t\"github.com/qdrant/go-client/qdrant\"\n)\n\nclient, err := qdrant.NewClient(&qdrant.Config{\n\tHost: \"localhost\",\n\tPort: 6334,\n})\n\nclient.CreateShardKey(context.Background(), \"{collection_name}\", &qdrant.CreateShardKey{\n\tShardKey: qdrant.NewShardKey(\"default\"),\n})\n```\n\nExample:\n```http\nPUT /collections/{collection_name}/points\n{\n    \"points\": [\n        {\n            \"id\": 1,\n            \"payload\": {\"group_id\": \"user_1\"},\n            \"vector\": [0.9, 0.1, 0.1]\n        }\n    ],\n    \"shard_key\": {\n        \"fallback\": \"default\",\n        \"target\": \"user_1\"\n    }\n}\n```\n\nExample:\n```python\nclient.upsert(\n    collection_name=\"{collection_name}\",\n    points=[\n        models.PointStruct(\n            id=1,\n            payload={\"group_id\": \"user_1\"},\n            vector=[0.9, 0.1, 0.1],\n        ),\n    ],\n    shard_key_selector=models.ShardKeyWithFallback(\n        target=\"user_1\",\n        fallback=\"default\"\n    )\n)\n```\n\nExample:\n```typescript\nimport { QdrantClient } from \"@qdrant/js-client-rest\";\n\nconst client = new QdrantClient({ host: \"localhost\", port: 6333 });\n\nclient.upsert(\"{collection_name}\", {\n  points: [\n    {\n      id: 1,\n      payload: { group_id: \"user_1\" },\n      vector: [0.9, 0.1, 0.1],\n    }\n  ],\n  shard_key: {\n    target: \"user_1\",\n    fallback: \"default\"\n  }\n});\n```\n\nExample:\n```rust\nuse qdrant_client::Qdrant;\nuse qdrant_client::qdrant::{PointStruct, ShardKeySelectorBuilder, UpsertPointsBuilder};\n\nlet client = Qdrant::from_url(\"http://localhost:6334\").build()?;\n\nlet shard_key_selector = ShardKeySelectorBuilder::with_shard_key(\"user_1\")\n    .fallback(\"default\")\n    .build();\n\nclient\n    .upsert_points(\n        UpsertPointsBuilder::new(\n            \"{collection_name}\",\n            vec![\n                PointStruct::new(\n                    1,\n                    vec![0.9, 0.1, 0.1],\n                    [(\"group_id\", \"user_1\".into())]\n                ),\n            ],\n        )\n        .shard_key_selector(shard_key_selector),\n    )\n    .await?;\n```\n\nExample:\n```java\nimport static io.qdrant.client.PointIdFactory.id;\nimport static io.qdrant.client.ShardKeyFactory.shardKey;\nimport static io.qdrant.client.ValueFactory.value;\nimport static io.qdrant.client.VectorsFactory.vectors;\n\nimport io.qdrant.client.QdrantClient;\nimport io.qdrant.client.QdrantGrpcClient;\nimport io.qdrant.client.grpc.Points.PointStruct;\nimport io.qdrant.client.grpc.Points.ShardKeySelector;\nimport io.qdrant.client.grpc.Points.UpsertPoints;\nimport java.util.List;\nimport java.util.Map;\n\nQdrantClient client =\n    new QdrantClient(QdrantGrpcClient.newBuilder(\"localhost\", 6334, false).build());\n\nclient\n    .upsertAsync(\n        UpsertPoints.newBuilder()\n            .setCollectionName(\"{collection_name}\")\n            .addAllPoints(\n                List.of(\n                    PointStruct.newBuilder()\n                        .setId(id(1))\n                        .setVectors(vectors(0.9f, 0.1f, 0.1f))\n                        .putAllPayload(Map.of(\"group_id\", value(\"user_1\")))\n                        .build()))\n            .setShardKeySelector(\n                ShardKeySelector.newBuilder()\n                    .addShardKeys(shardKey(\"user_1\"))\n                    .setFallback(shardKey(\"default\"))\n                    .build())\n            .build())\n    .get();\n```\n\nExample:\n```csharp\nusing Qdrant.Client;\nusing Qdrant.Client.Grpc;\n\nvar client = new QdrantClient(\"localhost\", 6334);\n\nawait client.UpsertAsync(\n\tcollectionName: \"{collection_name}\",\n\tpoints: new List<PointStruct>\n\t{\n\t\tnew()\n\t\t{\n\t\t\tId = 1,\n\t\t\tVectors = new[] { 0.9f, 0.1f, 0.1f },\n\t\t\tPayload = { [\"group_id\"] = \"user_1\" }\n\t\t}\n\t},\n\tshardKeySelector: new ShardKeySelector { \n\t\tShardKeys = { new List<ShardKey> { \"user_1\" } },\n\t\tFallback = new ShardKey { Keyword = \"default\" }\n\t}\n);\n```\n\nExample:\n```go\nimport (\n\t\"context\"\n\n\t\"github.com/qdrant/go-client/qdrant\"\n)\n\nclient, err := qdrant.NewClient(&qdrant.Config{\n\tHost: \"localhost\",\n\tPort: 6334,\n})\n\nclient.Upsert(context.Background(), &qdrant.UpsertPoints{\n\tCollectionName: \"{collection_name}\",\n\tPoints: []*qdrant.PointStruct{\n\t\t{\n\t\t\tId:      qdrant.NewIDNum(1),\n\t\t\tVectors: qdrant.NewVectors(0.9, 0.1, 0.1),\n\t\t\tPayload: qdrant.NewValueMap(map[string]any{\"group_id\": \"user_1\"}),\n\t\t},\n\t},\n\tShardKeySelector: &qdrant.ShardKeySelector{\n\t\tShardKeys: []*qdrant.ShardKey{\n\t\t\tqdrant.NewShardKey(\"user_1\"),\n\t\t},\n\t\tFallback: qdrant.NewShardKey(\"default\"),\n\t},\n})\n```\n\nExample:\n```http\nPUT /collections/{collection_name}/shards\n{\n  \"shard_key\": \"user_1\",\n  \"initial_state\": \"Partial\"\n}\n```\n\nExample:\n```python\nfrom qdrant_client import QdrantClient, models\n\nclient = QdrantClient(url=\"http://localhost:6333\")\n\nclient.create_shard_key(\n    \"{collection_name}\",\n    shard_key=\"user_1\",\n    initial_state=models.ReplicaState.PARTIAL\n)\n```\n\nExample:\n```typescript\nimport { QdrantClient } from \"@qdrant/js-client-rest\";\n\nconst client = new QdrantClient({ host: \"localhost\", port: 6333 });\n\nclient.createShardKey(\"{collection_name}\", {\n    shard_key: \"default\",\n    initial_state: \"Partial\"\n});\n```\n\nExample:\n```rust\nuse qdrant_client::qdrant::{\n    CreateShardKeyBuilder, CreateShardKeyRequestBuilder\n};\nuse qdrant_client::qdrant::ReplicaState;\nuse qdrant_client::Qdrant;\n\nlet client = Qdrant::from_url(\"http://localhost:6334\").build()?;\n\nclient\n    .create_shard_key(\n        CreateShardKeyRequestBuilder::new(\"{collection_name}\")\n            .request(\n                CreateShardKeyBuilder::default()\n                    .shard_key(\"user_1\".to_string())\n                    .initial_state(ReplicaState::Partial)\n            ),\n    )\n    .await?;\n```\n\nExample:\n```java\nimport static io.qdrant.client.ShardKeyFactory.shardKey;\n\nimport io.qdrant.client.QdrantClient;\nimport io.qdrant.client.QdrantGrpcClient;\nimport io.qdrant.client.grpc.Collections.CreateShardKey;\nimport io.qdrant.client.grpc.Collections.CreateShardKeyRequest;\nimport io.qdrant.client.grpc.Collections.ReplicaState;\nimport io.qdrant.client.grpc.Common.Filter;\n\nQdrantClient client =\n    new QdrantClient(QdrantGrpcClient.newBuilder(\"localhost\", 6334, false).build());\n\nclient.createShardKeyAsync(CreateShardKeyRequest.newBuilder()\n                .setCollectionName(\"{collection_name}\")\n                .setRequest(CreateShardKey.newBuilder()\n                                .setShardKey(shardKey(\"default\"))\n                                .setInitialState(ReplicaState.Partial)\n                                .build())\n                .build()).get();\n```\n\nExample:\n```csharp\nusing Qdrant.Client;\nusing Qdrant.Client.Grpc;\n\nvar client = new QdrantClient(\"localhost\", 6334);\n\nawait client.CreateShardKeyAsync(\n    \"{collection_name}\",\n    new CreateShardKey { \n        ShardKey = new ShardKey { Keyword = \"default\" },\n        InitialState = ReplicaState.Partial\n    }\n);\n```\n\nExample:\n```go\nimport (\n\t\"context\"\n\n\t\"github.com/qdrant/go-client/qdrant\"\n)\n\nclient, err := qdrant.NewClient(&qdrant.Config{\n\tHost: \"localhost\",\n\tPort: 6334,\n})\n\nclient.CreateShardKey(\n\tcontext.Background(),\n\t\"{collection_name}\",\n\t&qdrant.CreateShardKey{\n\t\tShardKey: qdrant.NewShardKey(\"default\"),\n\t\tInitialState: qdrant.PtrOf(qdrant.ReplicaState_Partial),\n\t},\n)\n```\n\nExample:\n```http\nPOST /collections/{collection_name}/cluster\n{\n    \"replicate_points\": {\n        \"filter\": {\n            \"must\": {\n                \"key\": \"group_id\",\n                \"match\": {\n                    \"value\": \"user_1\"\n                }\n            }\n        },\n        \"from_shard_key\": \"default\",\n        \"to_shard_key\": \"user_1\"\n    }\n}\n```\n\nExample:\n```python\nfrom qdrant_client import QdrantClient, models\n\nclient = QdrantClient(url=\"http://localhost:6333\")\n\nclient.cluster_collection_update(\n    collection_name=\"{collection_name}\",\n    cluster_operation=models.ReplicatePointsOperation(\n        replicate_points=models.ReplicatePoints(\n            from_shard_key=\"default\",\n            to_shard_key=\"user_1\",\n            filter=models.Filter(\n                must=[\n                    models.FieldCondition(\n                        key=\"group_id\",\n                        match=models.MatchValue(\n                            value=\"user_1\",\n                        )\n                    )\n                ]\n            )\n        )\n    )\n)\n```\n\nExample:\n```typescript\nimport { QdrantClient } from \"@qdrant/js-client-rest\";\n\nconst client = new QdrantClient({ host: \"localhost\", port: 6333 });\n\nclient.updateCollectionCluster(\"{collection_name}\", {\n    replicate_points: {\n        filter: {\n            must: {\n                key: \"group_id\",\n                match: {\n                    value: \"user_1\"\n                }\n            }\n        },\n        from_shard_key: \"default\",\n        to_shard_key: \"user_1\"\n    }\n});\n```\n\nExample:\n```rust\nuse qdrant_client::qdrant::{\n    update_collection_cluster_setup_request::Operation, Condition, Filter,\n    ReplicatePointsBuilder, ShardKey, UpdateCollectionClusterSetupRequest,\n};\nuse qdrant_client::Qdrant;\n\nlet client = Qdrant::from_url(\"http://localhost:6334\").build()?;\n\nclient\n    .update_collection_cluster_setup(UpdateCollectionClusterSetupRequest {\n        collection_name: \"{collection_name}\".to_string(),\n        operation: Some(Operation::ReplicatePoints(\n            ReplicatePointsBuilder::new(\n                ShardKey::from(\"default\"),\n                ShardKey::from(\"user_1\"),\n            )\n            .filter(Filter::must([Condition::matches(\n                \"group_id\",\n                \"user_1\".to_string(),\n            )]))\n            .build(),\n        )),\n        timeout: None,\n    })\n    .await?;\n```\n\nExample:\n```java\nimport static io.qdrant.client.ConditionFactory.matchKeyword;\nimport static io.qdrant.client.QueryFactory.nearest;\nimport static io.qdrant.client.ShardKeyFactory.shardKey;\n\nimport io.qdrant.client.QdrantClient;\nimport io.qdrant.client.QdrantGrpcClient;\nimport io.qdrant.client.grpc.Collections.ReplicatePoints;\nimport io.qdrant.client.grpc.Collections.UpdateCollectionClusterSetupRequest;\nimport io.qdrant.client.grpc.Common.Filter;\n\nQdrantClient client =\n    new QdrantClient(QdrantGrpcClient.newBuilder(\"localhost\", 6334, false).build());\n\nclient\n    .updateCollectionClusterSetupAsync(\n        UpdateCollectionClusterSetupRequest.newBuilder()\n            .setCollectionName(\"{collection_name}\")\n            .setReplicatePoints(\n                ReplicatePoints.newBuilder()\n                    .setFromShardKey(shardKey(\"default\"))\n                    .setToShardKey(shardKey(\"user_1\"))\n                    .setFilter(\n                        Filter.newBuilder().addMust(matchKeyword(\"group_id\", \"user_1\")).build())\n                    .build())\n            .build())\n    .get();\n```\n\nExample:\n```csharp\nusing Qdrant.Client;\nusing Qdrant.Client.Grpc;\nusing static Qdrant.Client.Grpc.Conditions;\n\nvar client = new QdrantClient(\"localhost\", 6334);\n\nawait client.UpdateCollectionClusterSetupAsync(new()\n{\n    CollectionName = \"{collection_name}\",\n\tReplicatePoints = new()\n    {\n        FromShardKey = \"default\",\n\t\tToShardKey = \"user_1\",\n\t\tFilter = MatchKeyword(\"group_id\", \"user_1\")\n    }\n});\n```\n\nExample:\n```go\nimport (\n\t\"context\"\n\n\t\"github.com/qdrant/go-client/qdrant\"\n)\n\nclient, err := qdrant.NewClient(&qdrant.Config{\n\tHost: \"localhost\",\n\tPort: 6334,\n})\n\nclient.UpdateClusterCollectionSetup(context.Background(), qdrant.NewUpdateCollectionClusterReplicatePoints(\n\t\"{collection_name}\", &qdrant.ReplicatePoints{\n\t\tFromShardKey: qdrant.NewShardKey(\"default\"),\n\t\tToShardKey:   qdrant.NewShardKey(\"user_1\"),\n\t\tFilter: &qdrant.Filter{\n\t\t\tMust: []*qdrant.Condition{\n\t\t\t\tqdrant.NewMatch(\"group_id\", \"user_1\"),\n\t\t\t},\n\t\t},\n\t},\n))\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:32.576Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":84,"totalLines":1717,"estimatedTokens":9929}}320{"id":"doc-fastembed_qdrant-03b2243c","source":"documentation","title":"FastEmbed & Qdrant","url":"https://qdrant.tech/documentation/fastembed/fastembed-semantic-search/","text":"Example:\n```python\npip install \"qdrant-client[fastembed]>=1.14.2\"\n```\n\nExample:\n```python\nfrom qdrant_client import QdrantClient, models\n\nclient = QdrantClient(\":memory:\")  # Qdrant is running from RAM.\n```\n\nExample:\n```python\ndocs = [\n    \"Qdrant has a LangChain integration for chatbots.\",\n    \"Qdrant has a LlamaIndex integration for agents.\",\n]\nmetadata = [\n    {\"source\": \"langchain-docs\"},\n    {\"source\": \"llamaindex-docs\"},\n]\nids = [42, 2]\n```\n\nExample:\n```python\nmodel_name = \"BAAI/bge-small-en\"\nclient.create_collection(\n    collection_name=\"test_collection\",\n    vectors_config=models.VectorParams(\n        size=client.get_embedding_size(model_name), \n        distance=models.Distance.COSINE\n    ),  # size and distance are model dependent\n)\n```\n\nExample:\n```python\nmetadata_with_docs = [\n    {\"document\": doc, \"source\": meta[\"source\"]} for doc, meta in zip(docs, metadata)\n]\nclient.upload_collection(\n    collection_name=\"test_collection\",\n    vectors=[models.Document(text=doc, model=model_name) for doc in docs],\n    payload=metadata_with_docs,\n    ids=ids,\n)\n```\n\nExample:\n```python\nsearch_result = client.query_points(\n    collection_name=\"test_collection\",\n    query=models.Document(\n        text=\"Which integration is best for agents?\", \n        model=model_name\n    )\n).points\nprint(search_result)\n```\n\nExample:\n```python\n[\n    ScoredPoint(\n        id=2, \n        score=0.87491801319731,\n        payload={\n            \"document\": \"Qdrant has a LlamaIndex integration for agents.\",\n            \"source\": \"llamaindex-docs\",\n        },\n        ...\n    ),\n    ScoredPoint(\n        id=42,\n        score=0.8351846627714035,\n        payload={\n            \"document\": \"Qdrant has a LangChain integration for chatbots.\",\n            \"source\": \"langchain-docs\",\n        },\n        ...\n    ),\n]\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:32.599Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":7,"totalLines":87,"estimatedTokens":455}}321{"id":"doc-measuring_ann_recall_qdrant-d0eac2a1","source":"documentation","title":"Measuring ANN Recall - Qdrant","url":"https://qdrant.tech/documentation/tutorials-search-engineering/ann-recall/","text":"Example:\n```python\nfrom qdrant_client import QdrantClient, models\n\n\ndef avg_recall_at_k(\n    client: QdrantClient,\n    collection_name: str,\n    test_vectors: list,\n    k: int,\n) -> float:\n    recalls = []\n    for vector in test_vectors:\n        ann_ids = {\n            p.id for p in client.query_points(\n                collection_name=collection_name,\n                query=vector,\n                limit=k,\n            ).points\n        }\n        knn_ids = {\n            p.id for p in client.query_points(\n                collection_name=collection_name,\n                query=vector,\n                limit=k,\n                search_params=models.SearchParams(exact=True),\n            ).points\n        }\n        recalls.append(len(ann_ids & knn_ids) / k)\n\n    return sum(recalls) / len(recalls)\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:32.612Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":1,"totalLines":34,"estimatedTokens":204}}322{"id":"doc-https_qdrant_tech_documentation_tutorials_operat-e3bd89a3","source":"documentation","title":"https://qdrant.tech/documentation/tutorials-operations/secure-qdrant/index.md","url":"https://qdrant.tech/documentation/tutorials-operations/secure-qdrant/index.md","text":"{ new() { Id = 1, Vectors = new[] { 0.1f, 0.2f, 0.3f, 0.4f } } } ); } catch (Exception e) { Console.WriteLine(e.Message); // Unauthenticated } ``` ```go import ( \"context\" \"fmt\" \"github.com/qdrant/go-client/qdrant\" ) client, err = qdrant.NewClient(&qdrant.Config{ Host: \"localhost\", , , }) if err != nil { panic(err) } client.CreateCollection(context.Background(), &qdrant.CreateCollection{ CollectionName: \"my_collection\", (&qdrant.VectorParams{ , , }), }) _, err = client.Upsert(context.Background(), &qdrant.UpsertPoints{ CollectionName: \"my_collection\", Points: []*qdrant.PointStruct{ { (1), (0.1, 0.2, 0.3, 0.4), }, }, }) if err != nil { fmt.Println(err) // Unauthenticated } ``` With the admin API key, the request succeeds: ```bash curl -X PUT 'https://localhost:6333/collections/my_collection' \\ -H 'Content-Type: application/json' \\ -H 'api-key: my-admin-key' \\ -d '{ \"vectors\": { \"size\": 4, \"distance\": \"Cosine\" } }' curl -X PUT 'https://localhost:6333/collections/my_collection/points' \\ -H 'Content-Type: application/json' \\ -H 'api-key: my-admin-key' \\ -d '{ \"points\": [ {\"id\": 1, \"vector\": [0.1, 0.2, 0.3, 0.4]} ] }' ``` ```python client = QdrantClient(url=\"https://localhost:6333\", api_key=\"my-admin-key\") client.create_collection( collection_name=\"my_collection\", vectors_config=models.VectorParams(size=4, distance=models.Distance.COSINE), ) client.upsert( collection_name=\"my_collection\", points=[models.PointStruct(id=1, vector=[0.1, 0.2, 0.3, 0.4])], ) ``` ```typescript client = new QdrantClient({ url: \"https://localhost:6333\", apiKey: \"my-admin-key\" }); await client.createCollection(\"my_collection\", { vectors: { , distance: \"Cosine\" }, }); await client.upsert(\"my_collection\", { points: [{ , vector: [0.1, 0.2, 0.3, 0.4] }], }); ``` ```rust let client = Qdrant::from_url(\"https://localhost:6334\") ); await client.UpsertAsync( collectionName: \"my_collection\", List { new() { Id = 1, Vectors = new[] { 0.1f, 0.2f, 0.3f, 0.4f } } } ); ``` ```go client, err = qdrant.NewClient(&qdrant.Config{ Host: \"localhost\", , APIKey: \"my-admin-key\", , }) if err != nil { panic(err) } client.CreateCollection(context.Background(), &qdrant.CreateCollection{ CollectionName: \"my_collection\", (&qdrant.VectorParams{ , , }), }) client.Upsert(context.Background(), &qdrant.UpsertPoints{ CollectionName: \"my_collection\", Points: []*qdrant.PointStruct{ { (1), (0.1, 0.2, 0.3, 0.4), }, }, }) ``` Refer to [Security > Authentication](https://qdrant.tech/documentation/security/index.md#authentication) to learn more about admin API keys, including API key rotation. --- ## Step a Read-Only API Key Issue a separate [read-only API key](https://qdrant.tech/documentation/security/index.md#read-only-api-key) for services that only need to read data. With this key, a client application can search and read but cannot upsert, delete, or modify data. Set the `QDRANT__SERVICE__READ_ONLY_API_KEY` environment variable to the read-only key in `docker-compose.yml`: ```yaml : \"true\" QDRANT__TLS__CERT: /qdrant/tls/cert.pem QDRANT__TLS__KEY: /qdrant/tls/key.pem QDRANT__SERVICE__API_KEY: \"my-admin-key\" QDRANT__SERVICE__READ_ONLY_API_KEY: \"my-read-only-key\" ``` Restart Qdrant: ```bash docker compose down && docker compose up -d ``` Verify that a delete attempt with the read-only key is rejected: ```bash curl -X POST https://localhost:6333/collections/my_collection/points/delete \\ -H \"api-key: my-read-only-key\" \\ -H \"Content-Type: application/json\" \\ -d '{\"points\": [1]}' ``` Or with a client: ```python client = QdrantClient(url=\"https://localhost:6333\", api_key=\"my-read-only-key\") ( collection_name=\"my_collection\", points_selector=models.PointIdsList(points=[1]), ) except Exception as (e) # 403 Forbidden ``` ```typescript client = new QdrantClient({ url: \"https://localhost:6333\", apiKey: \"my-read-only-key\" }); try { await client.delete(\"my_collection\", { points: [1] }); } catch (e: any) { console.error(e.message); // 403 Forbidden } ``` ```rust let client = Qdrant::from_url(\"https://localhost:6334\") ), ) ``` ```java client = new QdrantClient( QdrantGrpcClient.newBuilder(\"localhost\", 6334, true) catch (Exception e) { System.out.println(e.getMessage()); // PERMISSION_DENIED } ``` ```csharp client = new QdrantClient(host: \"localhost\", , , apiKey: \"my-read-only-key\"); try { await client.DeleteAsync(collectionName: \"my_collection\", ids: (ulong[])[1]); } catch (Exception e) { Console.WriteLine(e.Message); // PermissionDenied } ``` ```go client, err = qdrant.NewClient(&qdrant.Config{ Host: \"localhost\", , APIKey: \"my-read-only-key\", , }) if err != nil { panic(err) } _, err = client.Delete(context.Background(), &qdrant.DeletePoints{ CollectionName: \"my_collection\", (qdrant.NewIDNum(1)), }) if err != nil { fmt.Println(err) // PermissionDenied } ``` Reads still succeed with the read-only key: ```bash curl https://localhost:6333/collections/my_collection \\ -H \"api-key: my-read-only-key\" ``` Both keys can be used simultaneously. See [Security > Read-Only API Key](https://qdrant.tech/documentation/security/index.md#read-only-api-key). --- ## Step Up Granular Access API Keys (JWT) The admin and read-only keys apply globally. For finer control, use [granular access API Keys](https://qdrant.tech/documentation/security/index.md#granular-access-api-keys) (JSON Web Tokens, JWT). For example, you can use JWT to provide read-write access to one collection and read-only access to another. Enable JWT RBAC in `docker-compose.yml`: ```yaml : \"true\" QDRANT__TLS__CERT: /qdrant/tls/cert.pem QDRANT__TLS__KEY: /qdrant/tls/key.pem QDRANT__SERVICE__API_KEY: \"my-admin-key\" QDRANT__SERVICE__READ_ONLY_API_KEY: \"my-read-only-key\" QDRANT__SERVICE__JWT_RBAC: \"true\" ``` Restart: ```bash docker compose down && docker compose up -d ``` Create a second collection `other_collection` using the admin API key: ```bash curl -X PUT https://localhost:6333/collections/other_collection \\ -H \"api-key: my-admin-key\" \\ -H \"Content-Type: application/json\" \\ -d '{\"vectors\": {\"size\": 4, \"distance\": \"Cosine\"}}' ``` Generate a JWT in the Web Open `https://localhost:6333/dashboard#/jwt`. If you get a warning about the connection not being private, this is because the certificate is self-signed. If so, restart the browser, and it should recognize the certificate as trusted. 1. Select **Collection Access**. 1. For `my_collection`, select **Read** and **Write**. 1. For `other_collection`, select **Read** only. 1. Copy the generated JWT Token. Generating a JWT token with the desired access levels using the Web UI. > JWT tokens can also be generated programmatically. See [Security > Granular Access API Keys](https://qdrant.tech/documentation/security/index.md#granular-access-api-keys) for a list of libraries that can be used to generate JWT tokens. Using the JWT token, writing to `my_collection` (`rw` scope) should succeed: ```bash curl -X PUT https://localhost:6333/collections/my_collection/points \\ -H \"api-key: \" \\ -H \"Content-Type: application/json\" \\ -d '{\"points\": [{\"id\": 2, \"vector\": [0.5, 0.6, 0.7, 0.8]}]}' ``` With a client too: ```python client = QdrantClient(url=\"https://localhost:6333\", api_key=\"\") client.upsert( collection_name=\"my_collection\", points=[models.PointStruct(id=2, vector=[0.5, 0.6, 0.7, 0.8])], ) ``` ```typescript client = new QdrantClient({ url: \"https://localhost:6333\", apiKey: \"\" }); await client.upsert(\"my_collection\", { points: [{ , vector: [0.5, 0.6, 0.7, 0.8] }], }); ``` ```rust let client = Qdrant::from_url(\"https://localhost:6334\") .api_key(\"\") .build()?; client .upsert_points(UpsertPointsBuilder::new( \"my_collection\", vec![PointStruct::new(2, vec![0.5_f32, 0.6, 0.7, 0.8], [(\"source\", \"tutorial\".into())])], )) .await?; ``` ```java client = new QdrantClient( QdrantGrpcClient.newBuilder(\"localhost\", 6334, true) .withApiKey(\"\") .build()); client.upsertAsync(\"my_collection\", List.of( PointStruct.newBuilder() .setId(id(2)) .setVectors(vectors(0.5f, 0.6f, 0.7f, 0.8f)) .build() )).get(); ``` ```csharp client = new QdrantClient(host: \"localhost\", , , apiKey: \"\"); await client.UpsertAsync( collectionName: \"my_collection\", List { new() { Id = 2, Vectors = new[] { 0.5f, 0.6f, 0.7f, 0.8f } } } ); ``` ```go client, err = qdrant.NewClient(&qdrant.Config{ Host: \"localhost\", , APIKey: \"\", , }) if err != nil { panic(err) } client.Upsert(context.Background(), &qdrant.UpsertPoints{ CollectionName: \"my_collection\", Points: []*qdrant.PointStruct{ { (2), (0.5, 0.6, 0.7, 0.8), }, }, }) ``` However, writing to `other_collection` (`r` scope) is blocked: ```bash curl -X PUT https://localhost:6333/collections/other_collection/points \\ -H \"api-key: \" \\ -H \"Content-Type: application/json\" \\ -d '{\"points\": [{\"id\": 2, \"vector\": [0.5, 0.6, 0.7, 0.8]}]}' ``` With a client too: ```python client = QdrantClient(url=\"https://localhost:6333\", api_key=\"\") ( collection_name=\"other_collection\", points=[models.PointStruct(id=2, vector=[0.5, 0.6, 0.7, 0.8])], ) except Exception as (e) # 403 Forbidden ``` ```typescript client = new QdrantClient({ url: \"https://localhost:6333\", apiKey: \"\" }); try { await client.upsert(\"other_collection\", { points: [{ , vector: [0.5, 0.6, 0.7, 0.8] }], }); } catch (e: any) { console.error(e.message); // 403 Forbidden } ``` ```rust let client = Qdrant::from_url(\"https://localhost:6334\") ``` ```java client = new QdrantClient( QdrantGrpcClient.newBuilder(\"localhost\", 6334, true) catch (Exception e) { System.out.println(e.getMessage()); // PERMISSION_DENIED } ``` ```csharp client = new QdrantClient(host: \"localhost\", , , apiKey: \"\"); try { await client.UpsertAsync( collectionName: \"other_collection\", List { new() { Id = 2, Vectors = new[] { 0.5f, 0.6f, 0.7f, 0.8f } } } ); } catch (Exception e) { Console.WriteLine(e.Message); // PermissionDenied } ``` ```go client, err = qdrant.NewClient(&qdrant.Config{ Host: \"localhost\", , APIKey: \"\", , }) if err != nil { panic(err) } _, err = client.Upsert(context.Background(), &qdrant.UpsertPoints{ CollectionName: \"other_collection\", Points: []*qdrant.PointStruct{ { (2), (0.5, 0.6, 0.7, 0.8), }, }, }) if err != nil { fmt.Println(err) // PermissionDenied } ``` See [Security > Granular Access Control with JWT](https://qdrant.tech/documentation/security/index.md#granular-access-api-keys) for the full list of available JWT claims and the complete access-level table. --- ## What's Next Your instance now has TLS encryption, API key authentication, a read-only key for query consumers, and collection-scoped JWT tokens. For production deployments, also [Network Bind](https://qdrant.tech/documentation/security/index.md#network-bind) — restrict which network interfaces Qdrant listens on. - [API Key Rotation](https://qdrant.tech/documentation/security/index.md#rotate-an-admin-api-key) — rotate admin API keys in a distributed deployment without downtime. - [Production Checklist](https://qdrant.tech/documentation/production-checklist/index.md) — a full checklist of security and reliability settings for production.\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:32.674Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":0,"totalLines":3,"estimatedTokens":2737}}323{"id":"doc-using_libvirt_with_the_custom_executor_gitlab_do-698b4c12","source":"documentation","title":"Using libvirt with the Custom executor | GitLab Docs","url":"https://docs.gitlab.com/runner/executors/custom_examples/libvirt/","text":"Getting startedConfigure GitLabConfigure GitLab DuoUpdate your settingsEnable features behind feature flagsMaintain GitLabMonitor GitLabSecure GitLabAdminister usersAdminister GitLab DedicatedAdminister GitLab RunnerGetting startedCreate and manage runnersRegister a runnerRunner executorsCustomlibvirtLXDDockerDocker MachineDocker AutoscalerInstanceKubernetesShellSSHParallelsVirtualBoxConfigure runnersAutoscale configurationMonitor runner performanceRunner fleet configuration and best practicesGitLab Docs /Administer /Administer GitLab Runner /Runner executors /Custom /libvirtHelp us learn about your current experience with the documentation. Take the survey.Using libvirt with the Custom , Premium, , GitLab Self-Managed, GitLab DedicatedUsing libvirt, the Custom executor driver will create a new disk and VM for every job it executes, after which the disk and VM will be deleted.This document does not try to explain how to set up libvirt, since it’s out of scope. However, this driver was tested using GCP Nested Virtualization, which also has details on how to set up libvirt with bridge networking. This example will use the default network that comes with when installing libvirt so make sure it’s running.This driver requires bridge networking since each VM needs to have it’s own dedicated IP address so GitLab Runner can SSH inside of it to run commands. An SSH key can be generated using the following commands.Build the base imageA base disk VM image is created so that dependencies are not downloaded every build. Build it for the guest operating system family you run.Debian and Ubuntu (virt-builder)virt-builder creates the base image directly from a debian-12 \\ --size 8G \\ --output /var/lib/libvirt/images/gitlab-runner-base.qcow2 \\ --format qcow2 \\ --hostname gitlab-runner-bookworm \\ --network \\ --install curl \\ --run-command 'curl -L \"https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.deb.sh\" | bash' \\ --run-command 'curl -s \"https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh\" | bash' \\ --run-command 'useradd -m -p \"\" gitlab-runner -s /bin/bash' \\ --install gitlab-runner,git,git-lfs,openssh-server \\ --run-command \"git lfs install --skip-repo\" \\ --ssh-inject :/root/.ssh/id_rsa.pub \\ --run-command \"echo 'gitlab-runner ALL=(ALL) ' >> /etc/sudoers\" \\ --run-command \"sed -E 's/GRUB_CMDLINE_LINUX=\\\"\\\"/GRUB_CMDLINE_LINUX=\\\"net.ifnames=0 biosdevname=0\\\"/' -i /etc/default/grub\" \\ --run-command \"grub-mkconfig -o /boot/grub/grub.cfg\" \\ --run-command \"echo 'auto eth0' >> /etc/network/interfaces\" \\ --run-command \"echo 'allow-hotplug eth0' >> /etc/network/interfaces\" \\ --run-command \"echo 'iface eth0 inet dhcp' >> /etc/network/interfaces\"The previous command installs all the prerequisites specified earlier.virt-builder sets a root password automatically and prints it at the end. To set your own, pass --root-password password:$SOME_PASSWORD.RHEL, CentOS, and AlmaLinux (virt-customize)virt-builder ships no licensed RHEL guest template. Download the distribution’s GenericCloud qcow2 and customize it offline with virt-customize. This example uses the AlmaLinux 9 x86_64 image; substitute the RHEL or CentOS Stream 9 image, or a different architecture, as needed.IMAGES=/var/lib/libvirt/images BASE=\"$IMAGES/gitlab-runner-base.qcow2\" curl -fL \"https://repo.almalinux.org/almalinux/9/cloud/x86_64/images/AlmaLinux-9-GenericCloud-latest.x86_64.qcow2\" -o \"$BASE\" qemu-img resize \"$BASE\" 12G virt-customize -a \"$BASE\" \\ --run-command 'curl -L \"https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.rpm.sh\" | bash' \\ --run-command 'curl -L \"https://packagecloud.io/install/repositories/github/git-lfs/script.rpm.sh\" | bash' \\ --install gitlab-runner,git,git-lfs,openssh-server \\ --run-command 'git lfs install --skip-repo' \\ --run-command 'id gitlab-runner >/dev/null 2>&1 || useradd -m -s /bin/bash gitlab-runner' \\ --ssh-inject :/root/.ssh/id_rsa.pub \\ --run-command 'echo \"gitlab-runner ALL=(ALL) \" > /etc/sudoers.d/gitlab-runner' \\ --run-command 'systemctl enable sshd' \\ --selinux-relabelRHEL-family the PrepareThe prepare the disk to a new path.Installs a new VM from the copied disk.Waits for the VM to get an IP.Waits for SSH to respond on the VM.#!/usr/bin/env bash # /opt/libvirt-driver/prepare.sh currentDir=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" >/dev/null 2>&1 && pwd )\" source ${currentDir}/base.sh # Get variables from base script. set -eo pipefail # trap any error, and mark it as a system failure. trap \"exit $SYSTEM_FAILURE_EXIT_CODE\" ERR # Copy base disk to use for Job. qemu-img create -f qcow2 -b \"$BASE_VM_IMAGE\" \"$VM_IMAGE\" -F qcow2 # Install the VM # To boot VM in UEFI mode, uefi virt-install \\ --name \"$VM_ID\" \\ --os-variant debian12 \\ --disk \"$VM_IMAGE\" \\ --import \\ --vcpus=2 \\ --ram=2048 \\ --network default \\ --graphics none \\ --noautoconsole # Wait for VM to get IP echo 'Waiting for VM to get IP' for i in $(seq 1 300); do VM_IP=$(_get_vm_ip) if [ -n \"$VM_IP\" ]; then echo \"VM got IP: $VM_IP\" break fi if [ \"$i\" == \"300\" ]; then echo 'Waited 300 seconds for VM to start, exiting...' # Inform GitLab Runner that this is a system failure, so it # should be retried. exit \"$SYSTEM_FAILURE_EXIT_CODE\" fi sleep 1s done # Wait for ssh to become available echo \"Waiting for sshd to be available\" for i in $(seq 1 300); do if ssh -i /root/.ssh/id_rsa -o StrictHostKeyChecking=no gitlab-runner@$VM_IP >/dev/null 2>/dev/null; then break fi if [ \"$i\" == \"300\" ]; then echo 'Waited 300 seconds for sshd to start, exiting...' # Inform GitLab Runner that this is a system failure, so it # should be retried. exit \"$SYSTEM_FAILURE_EXIT_CODE\" fi sleep 1s doneRunThis will run the script generated by GitLab Runner by sending the content of the script to the VM via STDIN through SSH.#!/usr/bin/env bash # /opt/libvirt-driver/run.sh currentDir=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" >/dev/null 2>&1 && pwd )\" source ${currentDir}/base.sh # Get variables from base script. VM_IP=$(_get_vm_ip) ssh -i /root/.ssh/id_rsa -o StrictHostKeyChecking=no gitlab-runner@$VM_IP /bin/bash < \"${1}\" if [ $? -ne 0 ]; then # Exit using the variable, to make the build as failure in GitLab # CI. exit \"$BUILD_FAILURE_EXIT_CODE\" fiCleanupThis script removes the VM and deletes the disk.#!/usr/bin/env bash # /opt/libvirt-driver/cleanup.sh currentDir=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" >/dev/null 2>&1 && pwd )\" source ${currentDir}/base.sh # Get variables from base script. set -eo pipefail # Destroy VM and wait 300 second. for i in $(seq 1 300); do virsh destroy \"$VM_ID\" >/dev/null 2>&1 if [[ \"$(virsh domstate \"$VM_ID\" 2>/dev/null | tr '[:upper:]' '[:lower:]')\" =~ shut\\ off|destroyed|^$ ]]; then break fi if [ $i -eq 300 ]; then exit \"$SYSTEM_FAILURE_EXIT_CODE\" fi sleep 1 done # Undefine VM. virsh undefine \"$VM_ID\" || virsh undefine \"$VM_ID\" --nvram # Delete VM disk. if [ -f \"$VM_IMAGE\" ]; then rm \"$VM_IMAGE\" fiBuild the base imageDebian and Ubuntu (virt-builder)RHEL, CentOS, and AlmaLinux (virt-customize)ConfigurationBasePrepareRunCleanup\n\nExample:\n```shell\nvirt-builder debian-12 \\\n    --size 8G \\\n    --output /var/lib/libvirt/images/gitlab-runner-base.qcow2 \\\n    --format qcow2 \\\n    --hostname gitlab-runner-bookworm \\\n    --network \\\n    --install curl \\\n    --run-command 'curl -L \"https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.deb.sh\" | bash' \\\n    --run-command 'curl -s \"https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh\" | bash' \\\n    --run-command 'useradd -m -p \"\" gitlab-runner -s /bin/bash' \\\n    --install gitlab-runner,git,git-lfs,openssh-server \\\n    --run-command \"git lfs install --skip-repo\" \\\n    --ssh-inject gitlab-runner:file:/root/.ssh/id_rsa.pub \\\n    --run-command \"echo 'gitlab-runner ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers\" \\\n    --run-command \"sed -E 's/GRUB_CMDLINE_LINUX=\\\"\\\"/GRUB_CMDLINE_LINUX=\\\"net.ifnames=0 biosdevname=0\\\"/' -i /etc/default/grub\" \\\n    --run-command \"grub-mkconfig -o /boot/grub/grub.cfg\" \\\n    --run-command \"echo 'auto eth0' >> /etc/network/interfaces\" \\\n    --run-command \"echo 'allow-hotplug eth0' >> /etc/network/interfaces\" \\\n    --run-command \"echo 'iface eth0 inet dhcp' >> /etc/network/interfaces\"\n```\n\nExample:\n```shell\nIMAGES=/var/lib/libvirt/images\nBASE=\"$IMAGES/gitlab-runner-base.qcow2\"\n\ncurl -fL \"https://repo.almalinux.org/almalinux/9/cloud/x86_64/images/AlmaLinux-9-GenericCloud-latest.x86_64.qcow2\" -o \"$BASE\"\nqemu-img resize \"$BASE\" 12G\n\nvirt-customize -a \"$BASE\" \\\n    --run-command 'curl -L \"https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.rpm.sh\" | bash' \\\n    --run-command 'curl -L \"https://packagecloud.io/install/repositories/github/git-lfs/script.rpm.sh\" | bash' \\\n    --install gitlab-runner,git,git-lfs,openssh-server \\\n    --run-command 'git lfs install --skip-repo' \\\n    --run-command 'id gitlab-runner >/dev/null 2>&1 || useradd -m -s /bin/bash gitlab-runner' \\\n    --ssh-inject gitlab-runner:file:/root/.ssh/id_rsa.pub \\\n    --run-command 'echo \"gitlab-runner ALL=(ALL) NOPASSWD: ALL\" > /etc/sudoers.d/gitlab-runner' \\\n    --run-command 'systemctl enable sshd' \\\n    --selinux-relabel\n```\n\nExample:\n```toml\nconcurrent = 1\ncheck_interval = 0\n\n[session_server]\n  session_timeout = 1800\n\n[[runners]]\n  name = \"libvirt-driver\"\n  url = \"https://gitlab.com/\"\n  token = \"xxxxx\"\n  executor = \"custom\"\n  builds_dir = \"/home/gitlab-runner/builds\"\n  cache_dir = \"/home/gitlab-runner/cache\"\n  [runners.custom_build_dir]\n  [runners.cache]\n    [runners.cache.s3]\n    [runners.cache.gcs]\n  [runners.custom]\n    prepare_exec = \"/opt/libvirt-driver/prepare.sh\" # Path to a bash script to create VM.\n    run_exec = \"/opt/libvirt-driver/run.sh\" # Path to a bash script to run script inside of VM over ssh.\n    cleanup_exec = \"/opt/libvirt-driver/cleanup.sh\" # Path to a bash script to delete VM and disks.\n```\n\nExample:\n```shell\n#!/usr/bin/env bash\n\n# /opt/libvirt-driver/base.sh\n\nVM_IMAGES_PATH=\"/var/lib/libvirt/images\"\nBASE_VM_IMAGE=\"$VM_IMAGES_PATH/gitlab-runner-base.qcow2\"\nVM_ID=\"runner-$CUSTOM_ENV_CI_RUNNER_ID-project-$CUSTOM_ENV_CI_PROJECT_ID-concurrent-$CUSTOM_ENV_CI_CONCURRENT_PROJECT_ID-job-$CUSTOM_ENV_CI_JOB_ID\"\nVM_IMAGE=\"$VM_IMAGES_PATH/$VM_ID.qcow2\"\n\n# Talk to the system libvirt instance, where these VMs live, rather than the\n# per-user session instance.\nexport LIBVIRT_DEFAULT_URI=\"qemu:///system\"\n\n_get_vm_ip() {\n    virsh -q domifaddr \"$VM_ID\" | awk '{print $4}' | sed -E 's|/([0-9]+)?$||'\n}\n```\n\nExample:\n```shell\n#!/usr/bin/env bash\n\n# /opt/libvirt-driver/prepare.sh\n\ncurrentDir=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" >/dev/null 2>&1 && pwd )\"\nsource ${currentDir}/base.sh # Get variables from base script.\n\nset -eo pipefail\n\n# trap any error, and mark it as a system failure.\ntrap \"exit $SYSTEM_FAILURE_EXIT_CODE\" ERR\n\n# Copy base disk to use for Job.\nqemu-img create -f qcow2 -b \"$BASE_VM_IMAGE\" \"$VM_IMAGE\" -F qcow2\n\n# Install the VM\n# To boot VM in UEFI mode, add: --boot uefi\nvirt-install \\\n    --name \"$VM_ID\" \\\n    --os-variant debian12 \\\n    --disk \"$VM_IMAGE\" \\\n    --import \\\n    --vcpus=2 \\\n    --ram=2048 \\\n    --network default \\\n    --graphics none \\\n    --noautoconsole\n\n# Wait for VM to get IP\necho 'Waiting for VM to get IP'\nfor i in $(seq 1 300); do\n    VM_IP=$(_get_vm_ip)\n\n    if [ -n \"$VM_IP\" ]; then\n        echo \"VM got IP: $VM_IP\"\n        break\n    fi\n\n    if [ \"$i\" == \"300\" ]; then\n        echo 'Waited 300 seconds for VM to start, exiting...'\n        # Inform GitLab Runner that this is a system failure, so it\n        # should be retried.\n        exit \"$SYSTEM_FAILURE_EXIT_CODE\"\n    fi\n\n    sleep 1s\ndone\n\n# Wait for ssh to become available\necho \"Waiting for sshd to be available\"\nfor i in $(seq 1 300); do\n    if ssh -i /root/.ssh/id_rsa -o StrictHostKeyChecking=no gitlab-runner@$VM_IP >/dev/null 2>/dev/null; then\n        break\n    fi\n\n    if [ \"$i\" == \"300\" ]; then\n        echo 'Waited 300 seconds for sshd to start, exiting...'\n        # Inform GitLab Runner that this is a system failure, so it\n        # should be retried.\n        exit \"$SYSTEM_FAILURE_EXIT_CODE\"\n    fi\n\n    sleep 1s\ndone\n```\n\nExample:\n```shell\n#!/usr/bin/env bash\n\n# /opt/libvirt-driver/run.sh\n\ncurrentDir=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" >/dev/null 2>&1 && pwd )\"\nsource ${currentDir}/base.sh # Get variables from base script.\n\nVM_IP=$(_get_vm_ip)\n\nssh -i /root/.ssh/id_rsa -o StrictHostKeyChecking=no gitlab-runner@$VM_IP /bin/bash < \"${1}\"\nif [ $? -ne 0 ]; then\n    # Exit using the variable, to make the build as failure in GitLab\n    # CI.\n    exit \"$BUILD_FAILURE_EXIT_CODE\"\nfi\n```\n\nExample:\n```shell\n#!/usr/bin/env bash\n\n# /opt/libvirt-driver/cleanup.sh\n\ncurrentDir=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" >/dev/null 2>&1 && pwd )\"\nsource ${currentDir}/base.sh # Get variables from base script.\n\nset -eo pipefail\n\n# Destroy VM and wait 300 second.\nfor i in $(seq 1 300); do\n  virsh destroy \"$VM_ID\" >/dev/null 2>&1\n  if [[ \"$(virsh domstate \"$VM_ID\" 2>/dev/null | tr '[:upper:]' '[:lower:]')\" =~ shut\\ off|destroyed|^$ ]]; then\n      break\n  fi\n  if [ $i -eq 300 ]; then\n     exit \"$SYSTEM_FAILURE_EXIT_CODE\"\n  fi\n  sleep 1\ndone\n\n# Undefine VM.\nvirsh undefine \"$VM_ID\" || virsh undefine \"$VM_ID\" --nvram\n\n# Delete VM disk.\nif [ -f \"$VM_IMAGE\" ]; then\n    rm \"$VM_IMAGE\"\nfi\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:13.970Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":7,"totalLines":210,"estimatedTokens":3330}}324{"id":"doc-troubleshooting_api_security_testing_jobs_gitlab-b14ba571","source":"documentation","title":"Troubleshooting API security testing jobs | GitLab Docs","url":"https://docs.gitlab.com/user/application_security/api_security_testing/troubleshooting/","text":"Example:\n```log\nFailed to bind to address http://127.0.0.1:5500: address already in use.\n```\n\nExample:\n```yaml\nstages:\n  - dast\n\ninclude:\n  - template: API-Security.gitlab-ci.yml\n\nvariables:\n  APISEC_TARGET_URL: http://test-deployment/\n  APISEC_OPENAPI: test-api-specification.json\n```\n\nExample:\n```yaml\ndeploy-test-target:\n  script:\n    # Perform deployment steps\n    # Create environment_url.txt (example)\n    - echo http://${CI_PROJECT_ID}-${CI_ENVIRONMENT_SLUG}.example.org > environment_url.txt\n\n  artifacts:\n    paths:\n      - environment_url.txt\n```\n\nExample:\n```yaml\nstages:\n  - dast\n\ninclude:\n  - template: API-Security.gitlab-ci.yml\n\nvariables:\n  APISEC_PROFILE: Quick\n  APISEC_TARGET_URL: http://test-deployment/\n  APISEC_OPENAPI: test-api-specification.json\n  APISEC_OPENAPI_RELAXED_VALIDATION: 'On'\n```\n\nExample:\n```plaintext\nError, error occurred trying to download `<URL>`:\nThere was an error when retrieving content from Uri:' <URL>'.\nError:The SSL connection could not be established, see inner exception.\n```\n\nExample:\n```yaml\nstages:\n  - dast\n\ninclude:\n  - template: API-Security.gitlab-ci.yml\n\nvariables:\n  APISEC_TARGET_URL: https://test-deployment/\n  APISEC_OPENAPI: https://specs/openapi.json\n```\n\nExample:\n```yaml\nstages:\n  - dast\n\ninclude:\n  - template: API-Security.gitlab-ci.yml\n\nvariables:\n  APISEC_TARGET_URL: https://test-deployment/\n  APISEC_OPENAPI: http://specs/openapi.json\n```\n\nExample:\n```plaintext\nRunning with gitlab-runner 15.6.0~beta.186.ga889181a (a889181a)\n  on blue-2.shared.runners-manager.gitlab.com/default XxUrkriX\nResolving secrets\n00:00\nPreparing the \"docker+machine\" executor\n00:06\nUsing Docker executor with image registry.gitlab.com/security-products/api-security:2 ...\nStarting service registry.example.com/my-target-app:latest ...\nPulling docker image registry.example.com/my-target-app:latest ...\nWARNING: Failed to pull image with policy \"always\": Error response from daemon: Get https://registry.example.com/my-target-app/manifests/latest: unauthorized (manager.go:237:0s)\nERROR: Job failed: failed to pull image \"registry.example.com/my-target-app:latest\" with specified policies [always]: Error response from daemon: Get https://registry.example.com/my-target-app/manifests/latest: unauthorized (manager.go:237:0s)\n```\n\nExample:\n```json\n{\n    \"auths\": {\n        \"registry.example.com\": {\n            \"auth\": \"abcdefghijklmn\"\n        }\n    }\n}\n```\n\nExample:\n```log\nRunning with gitlab-runner 15.6.0~beta.186.ga889181a (a889181a)\n  on blue-4.shared.runners-manager.gitlab.com/default J2nyww-s\nResolving secrets\n00:00\nPreparing the \"docker+machine\" executor\n00:56\nUsing Docker executor with image registry.gitlab.com/security-products/api-security:2 ...\nStarting service registry.example.com/my-target-app:latest ...\nAuthenticating with credentials from $DOCKER_AUTH_CONFIG\nPulling docker image registry.example.com/my-target-app:latest ...\nUsing docker image sha256:139c39668e5e4417f7d0eb0eeb74145ba862f4f3c24f7c6594ecb2f82dc4ad06 for registry.example.com/my-target-app:latest with digest registry.example.com/my-target-\napp@sha256:2b69fc7c3627dbd0ebaa17674c264fcd2f2ba21ed9552a472acf8b065d39039c ...\nWaiting for services to be up and running (timeout 30 seconds)...\n```\n\nExample:\n```shell\n$ sudo apk add nodejs\n\nsudo: The \"no new privileges\" flag is set, which prevents sudo from running as root.\n\nsudo: If sudo is running in a container, you may need to adjust the container configuration to disable the flag.\n```\n\nExample:\n```yaml\napi_security:\n  image:\n    name: $SECURE_ANALYZERS_PREFIX/$APISEC_IMAGE:$APISEC_VERSION$APISEC_IMAGE_SUFFIX\n    docker:\n      user: root\n before_script:\n   - whoami\n```\n\nExample:\n```log\nExecuting \"step_script\" stage of the job script\nUsing docker image sha256:8b95f188b37d6b342dc740f68557771bb214fe520a5dc78a88c7a9cc6a0f9901 for registry.gitlab.com/security-products/api-security:5 with digest registry.gitlab.com/security-products/api-security@sha256:092909baa2b41db8a7e3584f91b982174772abdfe8ceafc97cf567c3de3179d1 ...\n$ whoami\nroot\n$ /peach/analyzer-api-security\n17:17:14 [INF] API Security: Gitlab API Security\n17:17:14 [INF] API Security: -------------------\n17:17:14 [INF] API Security:\n17:17:14 [INF] API Security: version: 5.7.0\n```\n\nExample:\n```yaml\nARG SECURE_ANALYZERS_PREFIX\nARG APISEC_IMAGE\nARG APISEC_VERSION\nARG APISEC_IMAGE_SUFFIX\nFROM $SECURE_ANALYZERS_PREFIX/$APISEC_IMAGE:$APISEC_VERSION$APISEC_IMAGE_SUFFIX\nUSER root\n\nRUN pip install ...\nRUN apk add ...\n\nUSER gitlab\n```\n\nExample:\n```shell\nTARGET_NAME=apisec-$CI_COMMIT_SHA\ndocker build -t $TARGET_IMAGE \\\n  --build-arg \"SECURE_ANALYZERS_PREFIX=$SECURE_ANALYZERS_PREFIX\" \\\n  --build-arg \"APISEC_IMAGE=$APISEC_IMAGE\" \\\n  --build-arg \"APISEC_VERSION=$APISEC_VERSION\" \\\n  --build-arg \"APISEC_IMAGE_SUFFIX=$APISEC_IMAGE_SUFFIX\" \\\n  .\ndocker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY\ndocker push $TARGET_IMAGE\n```\n\nExample:\n```yaml\napi_security:\n  image: apisec-$CI_COMMIT_SHA\n```\n\nExample:\n```plaintext\n05:48:38 [ERR] API Security: Testing failed: An unexpected exception occurred: Index was outside the bounds of the array.\n```\n\nExample:\n```plaintext\n08:45:43.616 [ERR] <Peach.Web.Core.Services.WebRunnerMachine> Unexpected exception in WebRunnerMachine::Run()\nSystem.IndexOutOfRangeException: Index was outside the bounds of the array.\n   at Peach.Web.Runner.Services.RunnerOptions.GetHeaders() in /builds/gitlab-org/security-products/analyzers/api-fuzzing-src/web/PeachWeb/Runner/Services/[RunnerOptions.cs:line 362\n   at Peach.Web.Runner.Services.RunnerService.Start(Job job, IRunnerOptions options) in /builds/gitlab-org/security-products/analyzers/api-fuzzing-src/web/PeachWeb/Runner/Services/RunnerService.cs:line 67\n   at Peach.Web.Core.Services.WebRunnerMachine.Run(IRunnerOptions runnerOptions, CancellationToken token) in /builds/gitlab-org/security-products/analyzers/api-fuzzing-src/web/PeachWeb/Core/Services/WebRunnerMachine.cs:line 321\n08:45:43.634 [WRN] <Peach.Web.Core.Services.WebRunnerMachine> * Session failed: An unexpected exception occurred: Index was outside the bounds of the array.\n08:45:43.677 [INF] <Peach.Web.Core.Services.WebRunnerMachine> Finished testing. Performed a total of 0 requests.\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:17:14.001Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":18,"totalLines":206,"estimatedTokens":1553}}325{"id":"doc-redis_strings_docs-f7943ddb","source":"documentation","title":"Redis Strings | Docs","url":"https://redis.io/docs/latest/develop/data-types/strings/","text":"{\"categories\":[\"docs\",\"develop\",\"stack\",\"oss\",\"rs\",\"rc\",\"kubernetes\",\"clients\"],\"description\":\"Introduction to Redis strings\",\"duplicateOf\":\"head:data-ai-metadata\",\"location\":\"body\",\"title\":\"Redis Strings\",\"tableOfContents\":{\"sections\":[{\"id\":\"strings-as-counters\",\"title\":\"Strings as counters\"},{\"id\":\"limits\",\"title\":\"Limits\"},{\"id\":\"bitwise-and-bitfield-operations\",\"title\":\"Bitwise and bitfield operations\"},{\"id\":\"performance\",\"title\":\"Performance\"},{\"id\":\"alternatives\",\"title\":\"Alternatives\"},{\"id\":\"learn-more\",\"title\":\"Learn more\"}]},\"codeExamples\":[{\"codetabsId\":\"set_tutorial-stepset_get\",\"commands\":[{\"acl_categories\":[\"@write\",\"@string\",\"@slow\"],\"complexity\":\"O(1)\",\"name\":\"SET\"},{\"acl_categories\":[\"@read\",\"@string\",\"@fast\"],\"complexity\":\"O(1)\",\"name\":\"GET\"}],\"description\":\"Foundational: Set and retrieve string values using SET and GET (overwrites existing values)\",\"difficulty\":\"beginner\",\"id\":\"set_get\",\"languages\":[{\"id\":\"redis-cli\",\"panelId\":\"panel_redis-cli_set_tutorial-stepset_get\"},{\"clientId\":\"redis-py\",\"clientName\":\"redis-py\",\"id\":\"Python\",\"langId\":\"python\",\"panelId\":\"panel_Python_set_tutorial-stepset_get\"},{\"id\":\"Node-js\",\"panelId\":\"panel_Nodejs_set_tutorial-stepset_get\"},{\"clientId\":\"jedis\",\"clientName\":\"Jedis\",\"id\":\"Java-Sync\",\"langId\":\"java\",\"panelId\":\"panel_Java-Sync_set_tutorial-stepset_get\"},{\"clientId\":\"lettuce\",\"clientName\":\"Lettuce\",\"id\":\"Java-Async\",\"langId\":\"java\",\"panelId\":\"panel_Java-Async_set_tutorial-stepset_get\"},{\"clientId\":\"lettuce\",\"clientName\":\"Lettuce\",\"id\":\"Java-Reactive\",\"langId\":\"java\",\"panelId\":\"panel_Java-Reactive_set_tutorial-stepset_get\"},{\"clientId\":\"go-redis\",\"clientName\":\"go-redis\",\"id\":\"Go\",\"langId\":\"go\",\"panelId\":\"panel_Go_set_tutorial-stepset_get\"},{\"id\":\"dotnet-Sync (SE-Redis)\",\"panelId\":\"panel_Csharp-Sync (SERedis)_set_tutorial-stepset_get\"},{\"clientId\":\"predis\",\"clientName\":\"Predis\",\"id\":\"PHP\",\"langId\":\"php\",\"panelId\":\"panel_PHP_set_tutorial-stepset_get\"},{\"clientId\":\"redis-rb\",\"clientName\":\"redis-rb\",\"id\":\"Ruby\",\"langId\":\"ruby\",\"panelId\":\"panel_Ruby_set_tutorial-stepset_get\"},{\"clientId\":\"redis-rs\",\"clientName\":\"redis-rs\",\"id\":\"Rust-Sync\",\"langId\":\"rust\",\"panelId\":\"panel_Rust-Sync_set_tutorial-stepset_get\"},{\"clientId\":\"redis-rs\",\"clientName\":\"redis-rs\",\"id\":\"Rust-Async\",\"langId\":\"rust\",\"panelId\":\"panel_Rust-Async_set_tutorial-stepset_get\"}]},{\"buildsUpon\":[\"set_get\"],\"codetabsId\":\"set_tutorial-stepsetnx_xx\",\"commands\":[{\"acl_categories\":[\"@write\",\"@string\",\"@slow\"],\"complexity\":\"O(1)\",\"name\":\"SET\"}],\"description\":\"Conditional SET NX and XX options to control key existence when you need atomic compare-and-set behavior\",\"difficulty\":\"intermediate\",\"id\":\"setnx_xx\",\"languages\":[{\"id\":\"redis-cli\",\"panelId\":\"panel_redis-cli_set_tutorial-stepsetnx_xx\"},{\"clientId\":\"redis-py\",\"clientName\":\"redis-py\",\"id\":\"Python\",\"langId\":\"python\",\"panelId\":\"panel_Python_set_tutorial-stepsetnx_xx\"},{\"id\":\"Node-js\",\"panelId\":\"panel_Nodejs_set_tutorial-stepsetnx_xx\"},{\"clientId\":\"jedis\",\"clientName\":\"Jedis\",\"id\":\"Java-Sync\",\"langId\":\"java\",\"panelId\":\"panel_Java-Sync_set_tutorial-stepsetnx_xx\"},{\"clientId\":\"lettuce\",\"clientName\":\"Lettuce\",\"id\":\"Java-Async\",\"langId\":\"java\",\"panelId\":\"panel_Java-Async_set_tutorial-stepsetnx_xx\"},{\"clientId\":\"lettuce\",\"clientName\":\"Lettuce\",\"id\":\"Java-Reactive\",\"langId\":\"java\",\"panelId\":\"panel_Java-Reactive_set_tutorial-stepsetnx_xx\"},{\"clientId\":\"go-redis\",\"clientName\":\"go-redis\",\"id\":\"Go\",\"langId\":\"go\",\"panelId\":\"panel_Go_set_tutorial-stepsetnx_xx\"},{\"id\":\"dotnet-Sync (SE-Redis)\",\"panelId\":\"panel_Csharp-Sync (SERedis)_set_tutorial-stepsetnx_xx\"},{\"clientId\":\"predis\",\"clientName\":\"Predis\",\"id\":\"PHP\",\"langId\":\"php\",\"panelId\":\"panel_PHP_set_tutorial-stepsetnx_xx\"},{\"clientId\":\"redis-rb\",\"clientName\":\"redis-rb\",\"id\":\"Ruby\",\"langId\":\"ruby\",\"panelId\":\"panel_Ruby_set_tutorial-stepsetnx_xx\"},{\"clientId\":\"redis-rs\",\"clientName\":\"redis-rs\",\"id\":\"Rust-Sync\",\"langId\":\"rust\",\"panelId\":\"panel_Rust-Sync_set_tutorial-stepsetnx_xx\"},{\"clientId\":\"redis-rs\",\"clientName\":\"redis-rs\",\"id\":\"Rust-Async\",\"langId\":\"rust\",\"panelId\":\"panel_Rust-Async_set_tutorial-stepsetnx_xx\"}]},{\"buildsUpon\":[\"set_get\"],\"codetabsId\":\"set_tutorial-stepmset\",\"commands\":[{\"acl_categories\":[\"@write\",\"@string\",\"@slow\"],\"complexity\":\"O(N)\",\"name\":\"MSET\"},{\"acl_categories\":[\"@read\",\"@string\",\"@fast\"],\"complexity\":\"O(N)\",\"name\":\"MGET\"}],\"description\":\"Set and retrieve multiple values using MSET and MGET when you need to reduce round trips to the server\",\"difficulty\":\"beginner\",\"id\":\"mset\",\"languages\":[{\"id\":\"redis-cli\",\"panelId\":\"panel_redis-cli_set_tutorial-stepmset\"},{\"clientId\":\"redis-py\",\"clientName\":\"redis-py\",\"id\":\"Python\",\"langId\":\"python\",\"panelId\":\"panel_Python_set_tutorial-stepmset\"},{\"id\":\"Node-js\",\"panelId\":\"panel_Nodejs_set_tutorial-stepmset\"},{\"clientId\":\"jedis\",\"clientName\":\"Jedis\",\"id\":\"Java-Sync\",\"langId\":\"java\",\"panelId\":\"panel_Java-Sync_set_tutorial-stepmset\"},{\"clientId\":\"lettuce\",\"clientName\":\"Lettuce\",\"id\":\"Java-Async\",\"langId\":\"java\",\"panelId\":\"panel_Java-Async_set_tutorial-stepmset\"},{\"clientId\":\"lettuce\",\"clientName\":\"Lettuce\",\"id\":\"Java-Reactive\",\"langId\":\"java\",\"panelId\":\"panel_Java-Reactive_set_tutorial-stepmset\"},{\"clientId\":\"go-redis\",\"clientName\":\"go-redis\",\"id\":\"Go\",\"langId\":\"go\",\"panelId\":\"panel_Go_set_tutorial-stepmset\"},{\"id\":\"dotnet-Sync (SE-Redis)\",\"panelId\":\"panel_Csharp-Sync (SERedis)_set_tutorial-stepmset\"},{\"clientId\":\"predis\",\"clientName\":\"Predis\",\"id\":\"PHP\",\"langId\":\"php\",\"panelId\":\"panel_PHP_set_tutorial-stepmset\"},{\"clientId\":\"redis-rb\",\"clientName\":\"redis-rb\",\"id\":\"Ruby\",\"langId\":\"ruby\",\"panelId\":\"panel_Ruby_set_tutorial-stepmset\"},{\"clientId\":\"redis-rs\",\"clientName\":\"redis-rs\",\"id\":\"Rust-Sync\",\"langId\":\"rust\",\"panelId\":\"panel_Rust-Sync_set_tutorial-stepmset\"},{\"clientId\":\"redis-rs\",\"clientName\":\"redis-rs\",\"id\":\"Rust-Async\",\"langId\":\"rust\",\"panelId\":\"panel_Rust-Async_set_tutorial-stepmset\"}]},{\"buildsUpon\":[\"set_get\"],\"codetabsId\":\"set_tutorial-stepincr\",\"commands\":[{\"acl_categories\":[\"@write\",\"@string\",\"@slow\"],\"complexity\":\"O(1)\",\"name\":\"SET\"},{\"acl_categories\":[\"@write\",\"@string\",\"@fast\"],\"complexity\":\"O(1)\",\"name\":\"INCR\"},{\"acl_categories\":[\"@write\",\"@string\",\"@fast\"],\"complexity\":\"O(1)\",\"name\":\"INCRBY\"}],\"description\":\"Atomic string values using INCR and INCRBY when you need thread-safe operations (initializes to 0 if key doesn\\u0026amp;#39;t exist)\",\"difficulty\":\"beginner\",\"id\":\"incr\",\"languages\":[{\"id\":\"redis-cli\",\"panelId\":\"panel_redis-cli_set_tutorial-stepincr\"},{\"clientId\":\"redis-py\",\"clientName\":\"redis-py\",\"id\":\"Python\",\"langId\":\"python\",\"panelId\":\"panel_Python_set_tutorial-stepincr\"},{\"id\":\"Node-js\",\"panelId\":\"panel_Nodejs_set_tutorial-stepincr\"},{\"clientId\":\"jedis\",\"clientName\":\"Jedis\",\"id\":\"Java-Sync\",\"langId\":\"java\",\"panelId\":\"panel_Java-Sync_set_tutorial-stepincr\"},{\"clientId\":\"lettuce\",\"clientName\":\"Lettuce\",\"id\":\"Java-Async\",\"langId\":\"java\",\"panelId\":\"panel_Java-Async_set_tutorial-stepincr\"},{\"clientId\":\"lettuce\",\"clientName\":\"Lettuce\",\"id\":\"Java-Reactive\",\"langId\":\"java\",\"panelId\":\"panel_Java-Reactive_set_tutorial-stepincr\"},{\"clientId\":\"go-redis\",\"clientName\":\"go-redis\",\"id\":\"Go\",\"langId\":\"go\",\"panelId\":\"panel_Go_set_tutorial-stepincr\"},{\"id\":\"dotnet-Sync (SE-Redis)\",\"panelId\":\"panel_Csharp-Sync (SERedis)_set_tutorial-stepincr\"},{\"clientId\":\"predis\",\"clientName\":\"Predis\",\"id\":\"PHP\",\"langId\":\"php\",\"panelId\":\"panel_PHP_set_tutorial-stepincr\"},{\"clientId\":\"redis-rb\",\"clientName\":\"redis-rb\",\"id\":\"Ruby\",\"langId\":\"ruby\",\"panelId\":\"panel_Ruby_set_tutorial-stepincr\"},{\"clientId\":\"redis-rs\",\"clientName\":\"redis-rs\",\"id\":\"Rust-Sync\",\"langId\":\"rust\",\"panelId\":\"panel_Rust-Sync_set_tutorial-stepincr\"},{\"clientId\":\"redis-rs\",\"clientName\":\"redis-rs\",\"id\":\"Rust-Async\",\"langId\":\"rust\",\"panelId\":\"panel_Rust-Async_set_tutorial-stepincr\"}]}]}\n\nAll products Redis Software Redis Cloud Redis Open Source Redis Insight Redis Enterprise for K8s Redis Data Integration Client Libraries ESC\n\nExample:\n```python\nres1 = r.set(\"bike:1\", \"Deimos\")\nprint(res1)  # True\nres2 = r.get(\"bike:1\")\nprint(res2)  # Deimos\n```\n\nExample:\n```python\n\"\"\"\nCode samples for String doc pages:\n    https://redis.io/docs/latest/develop/data-types/strings/\n\"\"\"\n\nimport redis\n\nr = redis.Redis(decode_responses=True)\n\nres1 = r.set(\"bike:1\", \"Deimos\")\nprint(res1)  # True\nres2 = r.get(\"bike:1\")\nprint(res2)  # Deimos\n\n\n# Recreate the bike:1 key so this example runs on its own.\nr.set(\"bike:1\", \"Deimos\")\n\nres3 = r.set(\"bike:1\", \"bike\", nx=True)\nprint(res3)  # None\nprint(r.get(\"bike:1\"))  # Deimos\nres4 = r.set(\"bike:1\", \"bike\", xx=True)\nprint(res4)  # True\n\n\nres5 = r.mset({\"bike:1\": \"Deimos\", \"bike:2\": \"Ares\", \"bike:3\": \"Vanth\"})\nprint(res5)  # True\nres6 = r.mget([\"bike:1\", \"bike:2\", \"bike:3\"])\nprint(res6)  # ['Deimos', 'Ares', 'Vanth']\n\n\nr.set(\"total_crashes\", 0)\nres7 = r.incr(\"total_crashes\")\nprint(res7)  # 1\nres8 = r.incrby(\"total_crashes\", 10)\nprint(res8)  # 11\n```\n\nExample:\n```node\nconst res1 = await client.set(\"bike:1\", \"Deimos\");\nconsole.log(res1);  // OK\nconst res2 = await client.get(\"bike:1\");\nconsole.log(res2);  // Deimos\n```\n\nExample:\n```node\nimport assert from 'assert';\nimport { createClient } from 'redis';\n\nconst client = createClient();\nawait client.connect();\n\nconst res1 = await client.set(\"bike:1\", \"Deimos\");\nconsole.log(res1);  // OK\nconst res2 = await client.get(\"bike:1\");\nconsole.log(res2);  // Deimos\n\n\n// Recreate the bike:1 key so this example runs on its own.\nawait client.set(\"bike:1\", \"Deimos\");\n\nconst res3 = await client.set(\"bike:1\", \"bike\", {'NX': true});\nconsole.log(res3);  // null\nconsole.log(await client.get(\"bike:1\"));  // Deimos\nconst res4 = await client.set(\"bike:1\", \"bike\", {'XX': true});\nconsole.log(res4);  // OK\n\n\nconst res5 = await client.mSet([\n  [\"bike:1\", \"Deimos\"],\n  [\"bike:2\", \"Ares\"],\n  [\"bike:3\", \"Vanth\"]\n]);\n\nconsole.log(res5);  // OK\nconst res6 = await client.mGet([\"bike:1\", \"bike:2\", \"bike:3\"]);\nconsole.log(res6);  // ['Deimos', 'Ares', 'Vanth']\n\n\nawait client.set(\"total_crashes\", 0);\nconst res7 = await client.incr(\"total_crashes\");\nconsole.log(res7); // 1\nconst res8 = await client.incrBy(\"total_crashes\", 10);\nconsole.log(res8); // 11\n```\n\nExample:\n```java\nString res1 = jedis.set(\"bike:1\", \"Deimos\");\n      System.out.println(res1); // OK\n      String res2 = jedis.get(\"bike:1\");\n      System.out.println(res2); // Deimos\n```\n\nExample:\n```java\npackage io.redis.examples;\n\n\nimport redis.clients.jedis.UnifiedJedis;\nimport redis.clients.jedis.params.SetParams;\n\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.List;\n\npublic class StringExample {\n\n  public void run() {\n    try (UnifiedJedis jedis = new UnifiedJedis(\"redis://localhost:6379\")) {\n\n      String res1 = jedis.set(\"bike:1\", \"Deimos\");\n      System.out.println(res1); // OK\n      String res2 = jedis.get(\"bike:1\");\n      System.out.println(res2); // Deimos\n\n\n      // Recreate the bike:1 key so this example runs on its own.\n      jedis.set(\"bike:1\", \"Deimos\");\n\n      Long res3 = jedis.setnx(\"bike:1\", \"bike\");\n      System.out.println(res3); // 0 (because key already exists)\n      System.out.println(jedis.get(\"bike:1\")); // Deimos (value is unchanged)\n      String res4 = jedis.set(\"bike:1\", \"bike\", SetParams.setParams().xx()); // set the value to \"bike\" if it\n      // already\n      // exists\n      System.out.println(res4); // OK\n\n\n      String res5 = jedis.mset(\"bike:1\", \"Deimos\", \"bike:2\", \"Ares\", \"bike:3\", \"Vanth\");\n      System.out.println(res5); // OK\n      List<String> res6 = jedis.mget(\"bike:1\", \"bike:2\", \"bike:3\");\n      System.out.println(res6); // [Deimos, Ares, Vanth]\n\n\n      jedis.set(\"total_crashes\", \"0\");\n      Long res7 = jedis.incr(\"total_crashes\");\n      System.out.println(res7); // 1\n      Long res8 = jedis.incrBy(\"total_crashes\", 10);\n      System.out.println(res8); // 11\n\n    }\n  }\n}\n```\n\nExample:\n```java\nCompletableFuture<Void> setAndGet = asyncCommands.set(\"bike:1\", \"Deimos\").thenCompose(v -> {\n                System.out.println(v); // >>> OK\n                return asyncCommands.get(\"bike:1\");\n            })\n                    .thenAccept(System.out::println) // >>> Deimos\n                    .toCompletableFuture();\n```\n\nExample:\n```java\npackage io.redis.examples.async;\n\nimport io.lettuce.core.*;\nimport io.lettuce.core.api.async.RedisAsyncCommands;\nimport io.lettuce.core.api.StatefulRedisConnection;\n\n\nimport java.util.*;\nimport java.util.concurrent.CompletableFuture;\n\npublic class StringExample {\n\n    public void run() {\n        RedisClient redisClient = RedisClient.create(\"redis://localhost:6379\");\n\n        try (StatefulRedisConnection<String, String> connection = redisClient.connect()) {\n            RedisAsyncCommands<String, String> asyncCommands = connection.async();\n\n            CompletableFuture<Void> setAndGet = asyncCommands.set(\"bike:1\", \"Deimos\").thenCompose(v -> {\n                System.out.println(v); // >>> OK\n                return asyncCommands.get(\"bike:1\");\n            })\n                    .thenAccept(System.out::println) // >>> Deimos\n                    .toCompletableFuture();\n            setAndGet.join();\n\n            // Recreate the bike:1 key so this example runs on its own.\n            CompletableFuture<Void> setnx = asyncCommands.set(\"bike:1\", \"Deimos\")\n                    .thenCompose(setup -> asyncCommands.setnx(\"bike:1\", \"bike\")).thenCompose(v -> {\n                        System.out.println(v); // >>> false (because key already exists)\n                        return asyncCommands.get(\"bike:1\");\n                    })\n                    .thenAccept(System.out::println) // >>> Deimos (value is unchanged)\n                    .toCompletableFuture();\n            setnx.join();\n\n            // set the value to \"bike\" if it already exists\n            CompletableFuture<Void> setxx = asyncCommands.set(\"bike:1\", \"bike\", SetArgs.Builder.xx())\n                    .thenAccept(System.out::println) // >>> OK\n                    .toCompletableFuture();\n            setxx.join();\n\n            Map<String, String> bikeMap = new HashMap<>();\n            bikeMap.put(\"bike:1\", \"Deimos\");\n            bikeMap.put(\"bike:2\", \"Ares\");\n            bikeMap.put(\"bike:3\", \"Vanth\");\n\n            CompletableFuture<Void> mset = asyncCommands.mset(bikeMap).thenCompose(v -> {\n                System.out.println(v); // >>> OK\n                return asyncCommands.mget(\"bike:1\", \"bike:2\", \"bike:3\");\n            })\n                    .thenAccept(System.out::println)\n                    // >>> [KeyValue[bike:1, Deimos], KeyValue[bike:2, Ares], KeyValue[bike:3,\n                    // Vanth]]\n                    .toCompletableFuture();\n            mset.join();\n\n            CompletableFuture<Void> incrby = asyncCommands.set(\"total_crashes\", \"0\")\n                    .thenCompose(v -> asyncCommands.incr(\"total_crashes\")).thenCompose(v -> {\n                        System.out.println(v); // >>> 1\n                        return asyncCommands.incrby(\"total_crashes\", 10);\n                    })\n                    .thenAccept(System.out::println) // >>> 11\n                    .toCompletableFuture();\n            incrby.join();\n        } finally {\n            redisClient.shutdown();\n        }\n    }\n\n}\n```\n\nExample:\n```java\nMono<Void> setAndGet = reactiveCommands.set(\"bike:1\", \"Deimos\").doOnNext(v -> {\n                System.out.println(v); // OK\n            }).flatMap(v -> reactiveCommands.get(\"bike:1\")).doOnNext(res -> {\n                System.out.println(res); // Deimos\n            }).then();\n```\n\nExample:\n```java\npackage io.redis.examples.reactive;\n\nimport io.lettuce.core.*;\nimport io.lettuce.core.api.reactive.RedisReactiveCommands;\nimport io.lettuce.core.api.StatefulRedisConnection;\nimport reactor.core.publisher.Mono;\n\nimport java.util.*;\n\n\npublic class StringExample {\n\n    public void run() {\n        RedisClient redisClient = RedisClient.create(\"redis://localhost:6379\");\n\n        try (StatefulRedisConnection<String, String> connection = redisClient.connect()) {\n            RedisReactiveCommands<String, String> reactiveCommands = connection.reactive();\n\n            Mono<Void> setAndGet = reactiveCommands.set(\"bike:1\", \"Deimos\").doOnNext(v -> {\n                System.out.println(v); // OK\n            }).flatMap(v -> reactiveCommands.get(\"bike:1\")).doOnNext(res -> {\n                System.out.println(res); // Deimos\n            }).then();\n\n            // Recreate the bike:1 key so this example runs on its own.\n            Mono<Void> setnx = reactiveCommands.set(\"bike:1\", \"Deimos\")\n                    .flatMap(setup -> reactiveCommands.setnx(\"bike:1\", \"bike\")).doOnNext(v -> {\n                        System.out.println(v); // false (because key already exists)\n                    }).flatMap(v -> reactiveCommands.get(\"bike:1\")).doOnNext(res -> {\n                        System.out.println(res); // Deimos (value is unchanged)\n                    }).then();\n\n            Mono<Void> setxx = reactiveCommands.set(\"bike:1\", \"bike\", SetArgs.Builder.xx()).doOnNext(res -> {\n                System.out.println(res); // OK\n            }).then();\n\n            Map<String, String> bikeMap = new HashMap<>();\n            bikeMap.put(\"bike:1\", \"Deimos\");\n            bikeMap.put(\"bike:2\", \"Ares\");\n            bikeMap.put(\"bike:3\", \"Vanth\");\n\n            Mono<Void> mset = reactiveCommands.mset(bikeMap).doOnNext(System.out::println) // OK\n                    .flatMap(v -> reactiveCommands.mget(\"bike:1\", \"bike:2\", \"bike:3\").collectList()).doOnNext(res -> {\n                        System.out.println(res); // [KeyValue[bike:1, Deimos], KeyValue[bike:2, Ares], KeyValue[bike:3, Vanth]]\n                    }).then();\n\n            Mono<Void> incrby = reactiveCommands.set(\"total_crashes\", \"0\").flatMap(v -> reactiveCommands.incr(\"total_crashes\"))\n                    .doOnNext(v -> {\n                        System.out.println(v); // 1\n                    }).flatMap(v -> reactiveCommands.incrby(\"total_crashes\", 10)).doOnNext(res -> {\n                        System.out.println(res); // 11\n                    }).then();\n\n            // Run the steps sequentially: several of them mutate bike:1, so a\n            // shared Mono.when() would race them against each other's reads.\n            setAndGet.then(setnx).then(setxx).then(mset).then(incrby).block();\n\n        } finally {\n            redisClient.shutdown();\n        }\n    }\n\n}\n```\n\nExample:\n```go\nres1, err := rdb.Set(ctx, \"bike:1\", \"Deimos\", 0).Result()\n\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Println(res1) // >>> OK\n\n\tres2, err := rdb.Get(ctx, \"bike:1\").Result()\n\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Println(res2) // >>> Deimos\n```\n\nExample:\n```go\npackage example_commands_test\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/redis/go-redis/v9\"\n)\n\nfunc ExampleClient_set_get() {\n\tctx := context.Background()\n\n\trdb := redis.NewClient(&redis.Options{\n\t\tAddr:     \"localhost:6379\",\n\t\tPassword: \"\", // no password docs\n\t\tDB:       0,  // use default DB\n\t})\n\n\n\tres1, err := rdb.Set(ctx, \"bike:1\", \"Deimos\", 0).Result()\n\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Println(res1) // >>> OK\n\n\tres2, err := rdb.Get(ctx, \"bike:1\").Result()\n\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Println(res2) // >>> Deimos\n\n}\n\nfunc ExampleClient_setnx_xx() {\n\tctx := context.Background()\n\n\trdb := redis.NewClient(&redis.Options{\n\t\tAddr:     \"localhost:6379\",\n\t\tPassword: \"\", // no password docs\n\t\tDB:       0,  // use default DB\n\t})\n\n\n\t// Recreate the bike:1 key so this example runs on its own.\n\trdb.Set(ctx, \"bike:1\", \"Deimos\", 0)\n\n\tres3, err := rdb.SetNX(ctx, \"bike:1\", \"bike\", 0).Result()\n\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Println(res3) // >>> false\n\n\tres4, err := rdb.Get(ctx, \"bike:1\").Result()\n\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Println(res4) // >>> Deimos\n\n\tres5, err := rdb.SetXX(ctx, \"bike:1\", \"bike\", 0).Result()\n\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Println(res5) // >>> OK\n\n}\n\nfunc ExampleClient_mset() {\n\tctx := context.Background()\n\n\trdb := redis.NewClient(&redis.Options{\n\t\tAddr:     \"localhost:6379\",\n\t\tPassword: \"\", // no password docs\n\t\tDB:       0,  // use default DB\n\t})\n\n\n\tres6, err := rdb.MSet(ctx, \"bike:1\", \"Deimos\", \"bike:2\", \"Ares\", \"bike:3\", \"Vanth\").Result()\n\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Println(res6) // >>> OK\n\n\tres7, err := rdb.MGet(ctx, \"bike:1\", \"bike:2\", \"bike:3\").Result()\n\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Println(res7) // >>> [Deimos Ares Vanth]\n\n}\n\nfunc ExampleClient_incr() {\n\tctx := context.Background()\n\n\trdb := redis.NewClient(&redis.Options{\n\t\tAddr:     \"localhost:6379\",\n\t\tPassword: \"\", // no password docs\n\t\tDB:       0,  // use default DB\n\t})\n\n\n\tres8, err := rdb.Set(ctx, \"total_crashes\", \"0\", 0).Result()\n\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Println(res8) // >>> OK\n\n\tres9, err := rdb.Incr(ctx, \"total_crashes\").Result()\n\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Println(res9) // >>> 1\n\n\tres10, err := rdb.IncrBy(ctx, \"total_crashes\", 10).Result()\n\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Println(res10) // >>> 11\n\n}\n```\n\nExample:\n```c\nvar res1 = db.StringSet(\"bike:1\", \"Deimos\");\n        Console.WriteLine(res1); // true\n        var res2 = db.StringGet(\"bike:1\");\n        Console.WriteLine(res2); // Deimos\n```\n\nExample:\n```c\npublic class StringSnippets\n{\n    public void Run()\n    {\n        var muxer = ConnectionMultiplexer.Connect(\"localhost:6379\");\n        var db = muxer.GetDatabase();\n\n\n\n        var res1 = db.StringSet(\"bike:1\", \"Deimos\");\n        Console.WriteLine(res1); // true\n        var res2 = db.StringGet(\"bike:1\");\n        Console.WriteLine(res2); // Deimos\n\n\n        // Recreate the bike:1 key so this example runs on its own.\n        db.StringSet(\"bike:1\", \"Deimos\");\n\n        var res3 = db.StringSet(\"bike:1\", \"bike\", when: When.NotExists);\n        Console.WriteLine(res3); // false\n        Console.WriteLine(db.StringGet(\"bike:1\"));\n        var res4 = db.StringSet(\"bike:1\", \"bike\", when: When.Exists);\n        Console.WriteLine(res4); // true\n\n\n        var res5 = db.StringSet([\n            new (\"bike:1\", \"Deimos\"), new(\"bike:2\", \"Ares\"), new(\"bike:3\", \"Vanth\")\n        ]);\n        Console.WriteLine(res5);\n        var res6 = db.StringGet([\"bike:1\", \"bike:2\", \"bike:3\"]);\n        Console.WriteLine(string.Join(\", \", res6));\n\n\n        db.StringSet(\"total_crashes\", 0);\n        var res7 = db.StringIncrement(\"total_crashes\");\n        Console.WriteLine(res7); // 1\n        var res8 = db.StringIncrement(\"total_crashes\", 10);\n        Console.WriteLine(res8);\n\n    }\n}\n```\n\nExample:\n```php\n$res1 = $r->set('bike:1', 'Deimos');\n        echo \"$res1\" . PHP_EOL;\n        // >>> OK\n\n        $res2 = $r->get('bike:1');\n        echo \"$res2\" . PHP_EOL;\n        // >>> Deimos\n```\n\nExample:\n```php\n<?php\n\nrequire 'vendor/autoload.php';\n\nuse Predis\\Client as PredisClient;\n\nclass DtStringTest\n{\n    public function testDtString() {\n        $r = new PredisClient([\n            'scheme'   => 'tcp',\n            'host'     => '127.0.0.1',\n            'port'     => 6379,\n            'password' => '',\n            'database' => 0,\n        ]);\n\n        $res1 = $r->set('bike:1', 'Deimos');\n        echo \"$res1\" . PHP_EOL;\n        // >>> OK\n\n        $res2 = $r->get('bike:1');\n        echo \"$res2\" . PHP_EOL;\n        // >>> Deimos\n\n        // Recreate the bike:1 key so this example runs on its own.\n        $r->set('bike:1', 'Deimos');\n\n        $res3 = $r->set('bike:1', 'bike', 'nx');\n        echo \"$res3\" . PHP_EOL;\n        // >>> (null)\n        \n        echo $r->get('bike:1') . PHP_EOL;\n        // >>> Deimos\n\n        $res4 = $r->set('bike:1', 'bike', 'xx');\n        echo \"$res4\" . PHP_EOL;\n        // >>> OK\n\n        $res5 = $r->mset([\n            'bike:1' => 'Deimos', 'bike:2' => 'Ares', 'bike:3' => 'Vanth'\n        ]);\n        echo \"$res5\" . PHP_EOL;\n        // >>> OK\n\n        $res6 = $r->mget(['bike:1', 'bike:2', 'bike:3']);\n        echo json_encode($res6) . PHP_EOL;\n        // >>> [\"Deimos\",\"Ares\",\"Vanth\"]\n\n        $r->set('total_crashes', 0);\n        $res7 = $r->incr('total_crashes');\n        echo \"$res7\" . PHP_EOL;\n        // >>> 1\n\n        $res8 = $r->incrby('total_crashes', 10);\n        echo \"$res8\" . PHP_EOL;\n        // >>> 11\n    }\n}\n```\n\nExample:\n```ruby\nres1 = r.set('bike:1', 'Deimos')\nputs res1 # OK\n\nres2 = r.get('bike:1')\nputs res2 # Deimos\n```\n\nExample:\n```ruby\nrequire 'redis'\n\nr = Redis.new\n\nres1 = r.set('bike:1', 'Deimos')\nputs res1 # OK\n\nres2 = r.get('bike:1')\nputs res2 # Deimos\n\n\n# Recreate the bike:1 key so this example runs on its own.\nr.set('bike:1', 'Deimos')\n\nres3 = r.set('bike:1', 'bike', nx: true)\nputs res3 # false\n\nputs r.get('bike:1') # Deimos\n\nres4 = r.set('bike:1', 'bike', xx: true)\nputs res4 # true\n\n\nres5 = r.mset('bike:1', 'Deimos', 'bike:2', 'Ares', 'bike:3', 'Vanth')\nputs res5 # OK\n\nres6 = r.mget('bike:1', 'bike:2', 'bike:3')\nputs res6.inspect # [\"Deimos\", \"Ares\", \"Vanth\"]\n\n\nr.set('total_crashes', 0)\n\nres7 = r.incr('total_crashes')\nputs res7 # 1\n\nres8 = r.incrby('total_crashes', 10)\nputs res8 # 11\n```\n\nExample:\n```rust\nif let Ok(res) = r.set(\"bike:1\", \"Deimos\") {\n            let res: String = res;\n            println!(\"{res}\");    // >>> OK\n        }\n\n        match r.get(\"bike:1\") {\n            Ok(res) => {\n                let res: String = res;\n                println!(\"{res}\");   // >>> Deimos\n            },\n            Err(e) => {\n                println!(\"Error getting bike:1: {e}\");\n                return;\n            }\n        };\n```\n\nExample:\n```rust\nmod strings_tests {\n    use redis::{Commands, ExistenceCheck};\n\n    fn run() {\n        let mut r = match redis::Client::open(\"redis://127.0.0.1\") {\n            Ok(client) => {\n                match client.get_connection() {\n                    Ok(conn) => conn,\n                    Err(e) => {\n                        println!(\"Failed to connect to Redis: {e}\");\n                        return;\n                    }\n                }\n            },\n            Err(e) => {\n                println!(\"Failed to create Redis client: {e}\");\n                return;\n            }\n        };\n\n        if let Ok(res) = r.set(\"bike:1\", \"Deimos\") {\n            let res: String = res;\n            println!(\"{res}\");    // >>> OK\n        }\n\n        match r.get(\"bike:1\") {\n            Ok(res) => {\n                let res: String = res;\n                println!(\"{res}\");   // >>> Deimos\n            },\n            Err(e) => {\n                println!(\"Error getting bike:1: {e}\");\n                return;\n            }\n        };\n\n        // Recreate the bike:1 key so this example runs on its own.\n        let _: () = r.set(\"bike:1\", \"Deimos\").expect(\"Failed to set\");\n\n        if let Ok(res) = r.set_options(\"bike:1\", \"bike\", redis::SetOptions::default().conditional_set(ExistenceCheck::NX)) {\n            let res: bool = res;\n            println!(\"{res}\");    // >>> false\n        }\n\n        match r.get(\"bike:1\") {\n            Ok(res) => {\n                let res: String = res;\n                println!(\"{res}\");   // >>> Deimos\n            },\n            Err(e) => {\n                println!(\"Error getting bike:1: {e}\");\n                return;\n            }\n        };\n\n        if let Ok(res) = r.set_options(\"bike:1\", \"bike\", redis::SetOptions::default().conditional_set(ExistenceCheck::XX)) {\n            let res: String = res;\n            println!(\"{res}\");    // >>> OK\n        }\n        \n        match r.get(\"bike:1\") {\n            Ok(res) => {\n                let res: String = res;\n                println!(\"{res}\");   // >>> bike\n            },\n            Err(e) => {\n                println!(\"Error getting bike:1: {e}\");\n                return;\n            }\n        };\n\n        if let Ok(res) = r.mset(&[(\"bike:1\", \"Deimos\"), (\"bike:2\", \"Ares\"), (\"bike:3\", \"Vanth\")]) {\n            let res: String = res;\n            println!(\"{res}\");    // >>> OK\n        }\n\n        match r.mget(&[\"bike:1\", \"bike:2\", \"bike:3\"]) {\n            Ok(res) => {\n                let res: Vec<String> = res;\n                println!(\"{res:?}\");   // >>> [\"Deimos\", \"Ares\", \"Vanth\"]\n            },\n            Err(e) => {\n                println!(\"Error getting values: {e}\");\n                return;\n            }\n        };\n\n        if let Ok(res) = r.set(\"total_crashes\", 0) {\n            let res: String = res;\n            println!(\"{res}\");    // >>> OK\n        }\n\n        if let Ok(res) = r.incr(\"total_crashes\", 1) {\n            let res: i32 = res;\n            println!(\"{res}\");    // >>> 1\n        }\n\n        if let Ok(res) = r.incr(\"total_crashes\", 10) {\n            let res: i32 = res;\n            println!(\"{res}\");    // >>> 11\n        }\n    }\n}\n```\n\nExample:\n```rust\nif let Ok(res) = r.set(\"bike:1\", \"Deimos\").await {\n            let res: String = res;\n            println!(\"{res}\");    // >>> OK\n        }\n\n        match r.get(\"bike:1\").await {\n            Ok(res) => {\n                let res: String = res;\n                println!(\"{res}\");   // >>> Deimos\n            },\n            Err(e) => {\n                println!(\"Error getting foo: {e}\");\n                return;\n            }\n        };\n```\n\nExample:\n```rust\nmod tests {\n    use redis::{AsyncCommands, ExistenceCheck};\n\n    async fn run() {\n        let mut r = match redis::Client::open(\"redis://127.0.0.1\") {\n            Ok(client) => {\n                match client.get_multiplexed_async_connection().await {\n                    Ok(conn) => conn,\n                    Err(e) => {\n                        println!(\"Failed to connect to Redis: {e}\");\n                        return;\n                    }\n                }\n            },\n            Err(e) => {\n                println!(\"Failed to create Redis client: {e}\");\n                return;\n            }\n        };\n\n        if let Ok(res) = r.set(\"bike:1\", \"Deimos\").await {\n            let res: String = res;\n            println!(\"{res}\");    // >>> OK\n        }\n\n        match r.get(\"bike:1\").await {\n            Ok(res) => {\n                let res: String = res;\n                println!(\"{res}\");   // >>> Deimos\n            },\n            Err(e) => {\n                println!(\"Error getting foo: {e}\");\n                return;\n            }\n        };\n\n        // Recreate the bike:1 key so this example runs on its own.\n        let _: () = r.set(\"bike:1\", \"Deimos\").await.expect(\"Failed to set\");\n\n        if let Ok(res) = r.set_options(\"bike:1\", \"bike\", redis::SetOptions::default().conditional_set(ExistenceCheck::NX)).await {\n            let res: bool = res;\n            println!(\"{res}\");    // >>> false\n        }\n\n        match r.get(\"bike:1\").await {\n            Ok(res) => {\n                let res: String = res;\n                println!(\"{res}\");   // >>> Deimos\n            },\n            Err(e) => {\n                println!(\"Error getting foo: {e}\");\n                return;\n            }\n        };\n\n        if let Ok(res) = r.set_options(\"bike:1\", \"bike\", redis::SetOptions::default().conditional_set(ExistenceCheck::XX)).await {\n            let res: String = res;\n            println!(\"{res}\");    // >>> OK\n        }\n\n        match r.get(\"bike:1\").await {\n            Ok(res) => {\n                let res: String = res;\n                println!(\"{res}\");   // >>> bike\n            },\n            Err(e) => {\n                println!(\"Error getting foo: {e}\");\n                return;\n            }\n        };\n\n        if let Ok(res) = r.mset(&[(\"bike:1\", \"Deimos\"), (\"bike:2\", \"Ares\"), (\"bike:3\", \"Vanth\")]).await {\n            let res: String = res;\n            println!(\"{res}\");    // >>> OK\n        }\n\n        match r.mget(&[\"bike:1\", \"bike:2\", \"bike:3\"]).await {\n            Ok(res) => {\n                let res: Vec<String> = res;\n                println!(\"{res:?}\");   // >>> [\"Deimos\", \"Ares\", \"Vanth\"]\n            },\n            Err(e) => {\n                println!(\"Error getting foo: {e}\");\n                return;\n            }\n        };\n\n        if let Ok(res) = r.set(\"total_crashes\", 0).await {\n            let res: String = res;\n            println!(\"{res}\");    // >>> OK\n        }\n\n        if let Ok(res) = r.incr(\"total_crashes\", 1).await {\n            let res: i32 = res;\n            println!(\"{res}\");    // >>> 1\n        }\n\n        if let Ok(res) = r.incr(\"total_crashes\", 10).await {\n            let res: i32 = res;\n            println!(\"{res}\");    // >>> 11\n        }\n    }\n}\n```\n\nExample:\n```python\n# Recreate the bike:1 key so this example runs on its own.\nr.set(\"bike:1\", \"Deimos\")\n\nres3 = r.set(\"bike:1\", \"bike\", nx=True)\nprint(res3)  # None\nprint(r.get(\"bike:1\"))  # Deimos\nres4 = r.set(\"bike:1\", \"bike\", xx=True)\nprint(res4)  # True\n```\n\nExample:\n```node\n// Recreate the bike:1 key so this example runs on its own.\nawait client.set(\"bike:1\", \"Deimos\");\n\nconst res3 = await client.set(\"bike:1\", \"bike\", {'NX': true});\nconsole.log(res3);  // null\nconsole.log(await client.get(\"bike:1\"));  // Deimos\nconst res4 = await client.set(\"bike:1\", \"bike\", {'XX': true});\nconsole.log(res4);  // OK\n```\n\nExample:\n```java\n// Recreate the bike:1 key so this example runs on its own.\n      jedis.set(\"bike:1\", \"Deimos\");\n\n      Long res3 = jedis.setnx(\"bike:1\", \"bike\");\n      System.out.println(res3); // 0 (because key already exists)\n      System.out.println(jedis.get(\"bike:1\")); // Deimos (value is unchanged)\n      String res4 = jedis.set(\"bike:1\", \"bike\", SetParams.setParams().xx()); // set the value to \"bike\" if it\n      // already\n      // exists\n      System.out.println(res4); // OK\n```\n\nExample:\n```java\n// Recreate the bike:1 key so this example runs on its own.\n            CompletableFuture<Void> setnx = asyncCommands.set(\"bike:1\", \"Deimos\")\n                    .thenCompose(setup -> asyncCommands.setnx(\"bike:1\", \"bike\")).thenCompose(v -> {\n                        System.out.println(v); // >>> false (because key already exists)\n                        return asyncCommands.get(\"bike:1\");\n                    })\n                    .thenAccept(System.out::println) // >>> Deimos (value is unchanged)\n                    .toCompletableFuture();\n            setnx.join();\n\n            // set the value to \"bike\" if it already exists\n            CompletableFuture<Void> setxx = asyncCommands.set(\"bike:1\", \"bike\", SetArgs.Builder.xx())\n                    .thenAccept(System.out::println) // >>> OK\n                    .toCompletableFuture();\n            setxx.join();\n```\n\nExample:\n```java\n// Recreate the bike:1 key so this example runs on its own.\n            Mono<Void> setnx = reactiveCommands.set(\"bike:1\", \"Deimos\")\n                    .flatMap(setup -> reactiveCommands.setnx(\"bike:1\", \"bike\")).doOnNext(v -> {\n                        System.out.println(v); // false (because key already exists)\n                    }).flatMap(v -> reactiveCommands.get(\"bike:1\")).doOnNext(res -> {\n                        System.out.println(res); // Deimos (value is unchanged)\n                    }).then();\n\n            Mono<Void> setxx = reactiveCommands.set(\"bike:1\", \"bike\", SetArgs.Builder.xx()).doOnNext(res -> {\n                System.out.println(res); // OK\n            }).then();\n```\n\nExample:\n```go\n// Recreate the bike:1 key so this example runs on its own.\n\trdb.Set(ctx, \"bike:1\", \"Deimos\", 0)\n\n\tres3, err := rdb.SetNX(ctx, \"bike:1\", \"bike\", 0).Result()\n\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Println(res3) // >>> false\n\n\tres4, err := rdb.Get(ctx, \"bike:1\").Result()\n\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Println(res4) // >>> Deimos\n\n\tres5, err := rdb.SetXX(ctx, \"bike:1\", \"bike\", 0).Result()\n\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Println(res5) // >>> OK\n```\n\nExample:\n```c\n// Recreate the bike:1 key so this example runs on its own.\n        db.StringSet(\"bike:1\", \"Deimos\");\n\n        var res3 = db.StringSet(\"bike:1\", \"bike\", when: When.NotExists);\n        Console.WriteLine(res3); // false\n        Console.WriteLine(db.StringGet(\"bike:1\"));\n        var res4 = db.StringSet(\"bike:1\", \"bike\", when: When.Exists);\n        Console.WriteLine(res4); // true\n```\n\nExample:\n```php\n// Recreate the bike:1 key so this example runs on its own.\n        $r->set('bike:1', 'Deimos');\n\n        $res3 = $r->set('bike:1', 'bike', 'nx');\n        echo \"$res3\" . PHP_EOL;\n        // >>> (null)\n        \n        echo $r->get('bike:1') . PHP_EOL;\n        // >>> Deimos\n\n        $res4 = $r->set('bike:1', 'bike', 'xx');\n        echo \"$res4\" . PHP_EOL;\n        // >>> OK\n```\n\nExample:\n```ruby\n# Recreate the bike:1 key so this example runs on its own.\nr.set('bike:1', 'Deimos')\n\nres3 = r.set('bike:1', 'bike', nx: true)\nputs res3 # false\n\nputs r.get('bike:1') # Deimos\n\nres4 = r.set('bike:1', 'bike', xx: true)\nputs res4 # true\n```\n\nExample:\n```rust\n// Recreate the bike:1 key so this example runs on its own.\n        let _: () = r.set(\"bike:1\", \"Deimos\").expect(\"Failed to set\");\n\n        if let Ok(res) = r.set_options(\"bike:1\", \"bike\", redis::SetOptions::default().conditional_set(ExistenceCheck::NX)) {\n            let res: bool = res;\n            println!(\"{res}\");    // >>> false\n        }\n\n        match r.get(\"bike:1\") {\n            Ok(res) => {\n                let res: String = res;\n                println!(\"{res}\");   // >>> Deimos\n            },\n            Err(e) => {\n                println!(\"Error getting bike:1: {e}\");\n                return;\n            }\n        };\n\n        if let Ok(res) = r.set_options(\"bike:1\", \"bike\", redis::SetOptions::default().conditional_set(ExistenceCheck::XX)) {\n            let res: String = res;\n            println!(\"{res}\");    // >>> OK\n        }\n        \n        match r.get(\"bike:1\") {\n            Ok(res) => {\n                let res: String = res;\n                println!(\"{res}\");   // >>> bike\n            },\n            Err(e) => {\n                println!(\"Error getting bike:1: {e}\");\n                return;\n            }\n        };\n```\n\nExample:\n```rust\n// Recreate the bike:1 key so this example runs on its own.\n        let _: () = r.set(\"bike:1\", \"Deimos\").await.expect(\"Failed to set\");\n\n        if let Ok(res) = r.set_options(\"bike:1\", \"bike\", redis::SetOptions::default().conditional_set(ExistenceCheck::NX)).await {\n            let res: bool = res;\n            println!(\"{res}\");    // >>> false\n        }\n\n        match r.get(\"bike:1\").await {\n            Ok(res) => {\n                let res: String = res;\n                println!(\"{res}\");   // >>> Deimos\n            },\n            Err(e) => {\n                println!(\"Error getting foo: {e}\");\n                return;\n            }\n        };\n\n        if let Ok(res) = r.set_options(\"bike:1\", \"bike\", redis::SetOptions::default().conditional_set(ExistenceCheck::XX)).await {\n            let res: String = res;\n            println!(\"{res}\");    // >>> OK\n        }\n\n        match r.get(\"bike:1\").await {\n            Ok(res) => {\n                let res: String = res;\n                println!(\"{res}\");   // >>> bike\n            },\n            Err(e) => {\n                println!(\"Error getting foo: {e}\");\n                return;\n            }\n        };\n```\n\nExample:\n```python\nres5 = r.mset({\"bike:1\": \"Deimos\", \"bike:2\": \"Ares\", \"bike:3\": \"Vanth\"})\nprint(res5)  # True\nres6 = r.mget([\"bike:1\", \"bike:2\", \"bike:3\"])\nprint(res6)  # ['Deimos', 'Ares', 'Vanth']\n```\n\nExample:\n```node\nconst res5 = await client.mSet([\n  [\"bike:1\", \"Deimos\"],\n  [\"bike:2\", \"Ares\"],\n  [\"bike:3\", \"Vanth\"]\n]);\n\nconsole.log(res5);  // OK\nconst res6 = await client.mGet([\"bike:1\", \"bike:2\", \"bike:3\"]);\nconsole.log(res6);  // ['Deimos', 'Ares', 'Vanth']\n```\n\nExample:\n```java\nString res5 = jedis.mset(\"bike:1\", \"Deimos\", \"bike:2\", \"Ares\", \"bike:3\", \"Vanth\");\n      System.out.println(res5); // OK\n      List<String> res6 = jedis.mget(\"bike:1\", \"bike:2\", \"bike:3\");\n      System.out.println(res6); // [Deimos, Ares, Vanth]\n```\n\nExample:\n```java\nMap<String, String> bikeMap = new HashMap<>();\n            bikeMap.put(\"bike:1\", \"Deimos\");\n            bikeMap.put(\"bike:2\", \"Ares\");\n            bikeMap.put(\"bike:3\", \"Vanth\");\n\n            CompletableFuture<Void> mset = asyncCommands.mset(bikeMap).thenCompose(v -> {\n                System.out.println(v); // >>> OK\n                return asyncCommands.mget(\"bike:1\", \"bike:2\", \"bike:3\");\n            })\n                    .thenAccept(System.out::println)\n                    // >>> [KeyValue[bike:1, Deimos], KeyValue[bike:2, Ares], KeyValue[bike:3,\n                    // Vanth]]\n                    .toCompletableFuture();\n```\n\nExample:\n```java\nMap<String, String> bikeMap = new HashMap<>();\n            bikeMap.put(\"bike:1\", \"Deimos\");\n            bikeMap.put(\"bike:2\", \"Ares\");\n            bikeMap.put(\"bike:3\", \"Vanth\");\n\n            Mono<Void> mset = reactiveCommands.mset(bikeMap).doOnNext(System.out::println) // OK\n                    .flatMap(v -> reactiveCommands.mget(\"bike:1\", \"bike:2\", \"bike:3\").collectList()).doOnNext(res -> {\n                        System.out.println(res); // [KeyValue[bike:1, Deimos], KeyValue[bike:2, Ares], KeyValue[bike:3, Vanth]]\n                    }).then();\n```\n\nExample:\n```go\nres6, err := rdb.MSet(ctx, \"bike:1\", \"Deimos\", \"bike:2\", \"Ares\", \"bike:3\", \"Vanth\").Result()\n\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Println(res6) // >>> OK\n\n\tres7, err := rdb.MGet(ctx, \"bike:1\", \"bike:2\", \"bike:3\").Result()\n\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Println(res7) // >>> [Deimos Ares Vanth]\n```\n\nExample:\n```c\nvar res5 = db.StringSet([\n            new (\"bike:1\", \"Deimos\"), new(\"bike:2\", \"Ares\"), new(\"bike:3\", \"Vanth\")\n        ]);\n        Console.WriteLine(res5);\n        var res6 = db.StringGet([\"bike:1\", \"bike:2\", \"bike:3\"]);\n        Console.WriteLine(string.Join(\", \", res6));\n```\n\nExample:\n```php\n$res5 = $r->mset([\n            'bike:1' => 'Deimos', 'bike:2' => 'Ares', 'bike:3' => 'Vanth'\n        ]);\n        echo \"$res5\" . PHP_EOL;\n        // >>> OK\n\n        $res6 = $r->mget(['bike:1', 'bike:2', 'bike:3']);\n        echo json_encode($res6) . PHP_EOL;\n        // >>> [\"Deimos\",\"Ares\",\"Vanth\"]\n```\n\nExample:\n```ruby\nres5 = r.mset('bike:1', 'Deimos', 'bike:2', 'Ares', 'bike:3', 'Vanth')\nputs res5 # OK\n\nres6 = r.mget('bike:1', 'bike:2', 'bike:3')\nputs res6.inspect # [\"Deimos\", \"Ares\", \"Vanth\"]\n```\n\nExample:\n```rust\nif let Ok(res) = r.mset(&[(\"bike:1\", \"Deimos\"), (\"bike:2\", \"Ares\"), (\"bike:3\", \"Vanth\")]) {\n            let res: String = res;\n            println!(\"{res}\");    // >>> OK\n        }\n\n        match r.mget(&[\"bike:1\", \"bike:2\", \"bike:3\"]) {\n            Ok(res) => {\n                let res: Vec<String> = res;\n                println!(\"{res:?}\");   // >>> [\"Deimos\", \"Ares\", \"Vanth\"]\n            },\n            Err(e) => {\n                println!(\"Error getting values: {e}\");\n                return;\n            }\n        };\n```\n\nExample:\n```rust\nif let Ok(res) = r.mset(&[(\"bike:1\", \"Deimos\"), (\"bike:2\", \"Ares\"), (\"bike:3\", \"Vanth\")]).await {\n            let res: String = res;\n            println!(\"{res}\");    // >>> OK\n        }\n\n        match r.mget(&[\"bike:1\", \"bike:2\", \"bike:3\"]).await {\n            Ok(res) => {\n                let res: Vec<String> = res;\n                println!(\"{res:?}\");   // >>> [\"Deimos\", \"Ares\", \"Vanth\"]\n            },\n            Err(e) => {\n                println!(\"Error getting foo: {e}\");\n                return;\n            }\n        };\n```\n\nExample:\n```python\nr.set(\"total_crashes\", 0)\nres7 = r.incr(\"total_crashes\")\nprint(res7)  # 1\nres8 = r.incrby(\"total_crashes\", 10)\nprint(res8)  # 11\n```\n\nExample:\n```node\nawait client.set(\"total_crashes\", 0);\nconst res7 = await client.incr(\"total_crashes\");\nconsole.log(res7); // 1\nconst res8 = await client.incrBy(\"total_crashes\", 10);\nconsole.log(res8); // 11\n```\n\nExample:\n```java\njedis.set(\"total_crashes\", \"0\");\n      Long res7 = jedis.incr(\"total_crashes\");\n      System.out.println(res7); // 1\n      Long res8 = jedis.incrBy(\"total_crashes\", 10);\n      System.out.println(res8); // 11\n```\n\nExample:\n```java\nCompletableFuture<Void> incrby = asyncCommands.set(\"total_crashes\", \"0\")\n                    .thenCompose(v -> asyncCommands.incr(\"total_crashes\")).thenCompose(v -> {\n                        System.out.println(v); // >>> 1\n                        return asyncCommands.incrby(\"total_crashes\", 10);\n                    })\n                    .thenAccept(System.out::println) // >>> 11\n                    .toCompletableFuture();\n```\n\nExample:\n```java\nMono<Void> incrby = reactiveCommands.set(\"total_crashes\", \"0\").flatMap(v -> reactiveCommands.incr(\"total_crashes\"))\n                    .doOnNext(v -> {\n                        System.out.println(v); // 1\n                    }).flatMap(v -> reactiveCommands.incrby(\"total_crashes\", 10)).doOnNext(res -> {\n                        System.out.println(res); // 11\n                    }).then();\n```\n\nExample:\n```go\nres8, err := rdb.Set(ctx, \"total_crashes\", \"0\", 0).Result()\n\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Println(res8) // >>> OK\n\n\tres9, err := rdb.Incr(ctx, \"total_crashes\").Result()\n\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Println(res9) // >>> 1\n\n\tres10, err := rdb.IncrBy(ctx, \"total_crashes\", 10).Result()\n\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Println(res10) // >>> 11\n```\n\nExample:\n```c\ndb.StringSet(\"total_crashes\", 0);\n        var res7 = db.StringIncrement(\"total_crashes\");\n        Console.WriteLine(res7); // 1\n        var res8 = db.StringIncrement(\"total_crashes\", 10);\n        Console.WriteLine(res8);\n```\n\nExample:\n```php\n$r->set('total_crashes', 0);\n        $res7 = $r->incr('total_crashes');\n        echo \"$res7\" . PHP_EOL;\n        // >>> 1\n\n        $res8 = $r->incrby('total_crashes', 10);\n        echo \"$res8\" . PHP_EOL;\n        // >>> 11\n```\n\nExample:\n```ruby\nr.set('total_crashes', 0)\n\nres7 = r.incr('total_crashes')\nputs res7 # 1\n\nres8 = r.incrby('total_crashes', 10)\nputs res8 # 11\n```\n\nExample:\n```rust\nif let Ok(res) = r.set(\"total_crashes\", 0) {\n            let res: String = res;\n            println!(\"{res}\");    // >>> OK\n        }\n\n        if let Ok(res) = r.incr(\"total_crashes\", 1) {\n            let res: i32 = res;\n            println!(\"{res}\");    // >>> 1\n        }\n\n        if let Ok(res) = r.incr(\"total_crashes\", 10) {\n            let res: i32 = res;\n            println!(\"{res}\");    // >>> 11\n        }\n```\n\nExample:\n```rust\nif let Ok(res) = r.set(\"total_crashes\", 0).await {\n            let res: String = res;\n            println!(\"{res}\");    // >>> OK\n        }\n\n        if let Ok(res) = r.incr(\"total_crashes\", 1).await {\n            let res: i32 = res;\n            println!(\"{res}\");    // >>> 1\n        }\n\n        if let Ok(res) = r.incr(\"total_crashes\", 10).await {\n            let res: i32 = res;\n            println!(\"{res}\");    // >>> 11\n        }\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:40.498Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":55,"totalLines":1427,"estimatedTokens":11578}}326{"id":"doc-go_client_for_redis_docs-60f8f18b","source":"documentation","title":"Go client for Redis | Docs","url":"https://redis.io/docs/latest/integrate/go-redis/","text":"{\"categories\":[\"docs\",\"integrate\",\"oss\",\"rs\",\"rc\"],\"description\":\"Learn how to build with Redis and Go\",\"duplicateOf\":\"head:data-ai-metadata\",\"group\":\"library\",\"location\":\"body\",\"title\":\"Go client for Redis\",\"tableOfContents\":{\"sections\":[{\"id\":\"overview\",\"title\":\"Overview\"},{\"id\":\"key-features\",\"title\":\"Key Features\"},{\"id\":\"getting-started\",\"title\":\"Getting Started\"}]},\"codeExamples\":[]}\n\nAll products Redis Software Redis Cloud Redis Open Source Redis Insight Redis Enterprise for K8s Redis Data Integration Client Libraries ESC\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:40.594Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":0,"totalLines":5,"estimatedTokens":137}}327{"id":"doc-cluster_migration_docs-6643525d","source":"documentation","title":"CLUSTER MIGRATION | Docs","url":"https://redis.io/docs/latest/commands/cluster-migration/","text":"{\"acl_categories\":[\"@admin\",\"@slow\",\"@dangerous\"],\"arguments\":[{\"arguments\":[{\"arguments\":[{\"display_text\":\"start-slot\",\"name\":\"start-slot\",\"type\":\"integer\"},{\"display_text\":\"end-slot\",\"name\":\"end-slot\",\"type\":\"integer\"}],\"multiple\":true,\"name\":\"import\",\"token\":\"IMPORT\",\"type\":\"block\"},{\"arguments\":[{\"display_text\":\"task-id\",\"name\":\"task-id\",\"token\":\"ID\",\"type\":\"string\"},{\"display_text\":\"all\",\"name\":\"all\",\"token\":\"ALL\",\"type\":\"pure-token\"}],\"name\":\"cancel\",\"token\":\"CANCEL\",\"type\":\"oneof\"},{\"arguments\":[{\"display_text\":\"task-id\",\"name\":\"task-id\",\"optional\":true,\"token\":\"ID\",\"type\":\"string\"},{\"display_text\":\"all\",\"name\":\"all\",\"optional\":true,\"token\":\"ALL\",\"type\":\"pure-token\"}],\"name\":\"status\",\"token\":\"STATUS\",\"type\":\"oneof\"}],\"name\":\"subcommand\",\"type\":\"oneof\"}],\"arity\":-4,\"categories\":[\"docs\",\"develop\",\"stack\",\"oss\",\"rs\",\"rc\",\"oss\",\"kubernetes\",\"clients\"],\"command_flags\":[\"admin\",\"stale\",\"no_async_loading\"],\"complexity\":\"O(N) where N is the total number of the slots between the start slot and end slot arguments.\",\"description\":\"Start, monitor, and cancel atomic slot migration tasks.\",\"duplicateOf\":\"head:data-ai-metadata\",\"group\":\"cluster\",\"location\":\"body\",\"since\":\"8.4.0\",\"syntax_fmt\":\"CLUSTER MIGRATION \\u003cIMPORT start-slot end-slot\\n [start-slot end-slot ...] | CANCEL \\u003cID task-id | ALL\\u003e |\\n STATUS \\u003c[ID task-id] | [ALL]\\u003e\\u003e\",\"title\":\"CLUSTER MIGRATION\",\"tableOfContents\":{\"sections\":[]},\"codeExamples\":[]}\n\nAll products Redis Software Redis Cloud Redis Open Source Redis Insight Redis Enterprise for K8s Redis Data Integration Client Libraries ESC\n\nExample:\n```text\nCLUSTER MIGRATION <IMPORT start-slot end-slot\n  [start-slot end-slot ...] | CANCEL <ID task-id | ALL> |\n  STATUS <[ID task-id] | [ALL]>>\n```\n\nExample:\n```bash\nCLUSTER MIGRATION IMPORT 0 1000 2000 3000\n```\n\nExample:\n```bash\nCLUSTER MIGRATION STATUS ALL\n```\n\nExample:\n```bash\nCLUSTER MIGRATION STATUS ID 24cf41718b20f7f05901743dffc40bc9b15db339\n```\n\nExample:\n```bash\nCLUSTER MIGRATION CANCEL ID 24cf41718b20f7f05901743dffc40bc9b15db339\n```\n\nExample:\n```bash\nCLUSTER MIGRATION CANCEL ALL\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:40.819Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":6,"totalLines":37,"estimatedTokens":529}}328{"id":"doc-cms_initbyprob_docs-a9aa38db","source":"documentation","title":"CMS.INITBYPROB | Docs","url":"https://redis.io/docs/latest/commands/cms.initbyprob/","text":"{\"acl_categories\":[\"@cms\",\"@write\",\"@fast\"],\"arguments\":[{\"name\":\"key\",\"type\":\"key\"},{\"name\":\"error\",\"type\":\"double\"},{\"name\":\"probability\",\"type\":\"double\"}],\"categories\":[\"docs\",\"develop\",\"stack\",\"oss\",\"rs\",\"rc\",\"oss\",\"kubernetes\",\"clients\"],\"complexity\":\"O(1)\",\"description\":\"Initializes a Count-Min Sketch to accommodate requested tolerances.\",\"duplicateOf\":\"head:data-ai-metadata\",\"group\":\"cms\",\"location\":\"body\",\"since\":\"2.0.0\",\"syntax_fmt\":\"CMS.INITBYPROB key error probability\",\"title\":\"CMS.INITBYPROB\",\"tableOfContents\":{\"sections\":[{\"id\":\"required-arguments\",\"title\":\"Required arguments\"},{\"id\":\"examples\",\"title\":\"Examples\"},{\"id\":\"redis-software-and-redis-cloud-compatibility\",\"title\":\"Redis Software and Redis Cloud compatibility\"},{\"id\":\"return-information\",\"title\":\"Return information\"}]},\"codeExamples\":[]}\n\nAll products Redis Software Redis Cloud Redis Open Source Redis Insight Redis Enterprise for K8s Redis Data Integration Client Libraries ESC\n\nExample:\n```text\nCMS.INITBYPROB key error probability\n```\n\nExample:\n```text\ninitbyprob(\n    key: str,\n    error: float,  // Estimate size of error as percent of total\n    probability: float  // Desired probability for inflated count\n) → bool  // True if created successfully\n```\n\nExample:\n```text\nCMS.INITBYPROB(\n    key: RedisArgument,\n    error: number,  // Error rate as decimal between 0 and 1\n    probability: number  // Probability for inflated count\n) → SimpleStringReply<'OK'>  // OK on success\n```\n\nExample:\n```text\ncmsInitByProb(\n    key: String,\n    error: double,\n    probability: double\n) → String  // OK\n```\n\nExample:\n```text\nCMSInitByProb(\n    ctx: context.Context,\n    key: string,\n    errorRate: float64,\n    probability: float64\n) → *StatusCmd  // Status command result\n```\n\nExample:\n```text\nInitByProb(\n    key: RedisKey,\n    error: double,\n    probability: double\n) → bool  // True if created successfully\n```\n\nExample:\n```text\nInitByProbAsync(\n    key: RedisKey,\n    error: double,\n    probability: double\n) → Task<bool>  // True if created successfully\n```\n\nExample:\n```text\ncmsinitbyprob(\n    key: string,\n    error: float,\n    probability: float\n) → string  // OK\n```\n\nExample:\n```text\nredis> CMS.INITBYPROB test 0.001 0.01\nOK\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:40.823Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":9,"totalLines":80,"estimatedTokens":559}}329{"id":"doc-ft_aliasdel_docs-d92e414b","source":"documentation","title":"FT.ALIASDEL | Docs","url":"https://redis.io/docs/latest/commands/ft.aliasdel/","text":"{\"acl_categories\":[\"@search\"],\"arguments\":[{\"name\":\"alias\",\"type\":\"string\"}],\"categories\":[\"docs\",\"develop\",\"stack\",\"oss\",\"rs\",\"rc\",\"oss\",\"kubernetes\",\"clients\"],\"complexity\":\"O(1)\",\"description\":\"Deletes an alias from the index\",\"duplicateOf\":\"head:data-ai-metadata\",\"group\":\"search\",\"location\":\"body\",\"since\":\"1.0.0\",\"syntax_fmt\":\"FT.ALIASDEL alias\",\"title\":\"FT.ALIASDEL\",\"tableOfContents\":{\"sections\":[{\"id\":\"required-arguments\",\"title\":\"Required arguments\"},{\"id\":\"examples\",\"title\":\"Examples\"},{\"id\":\"redis-software-and-redis-cloud-compatibility\",\"title\":\"Redis Software and Redis Cloud compatibility\"},{\"id\":\"return-information\",\"title\":\"Return information\"},{\"id\":\"see-also\",\"title\":\"See also\"}]},\"codeExamples\":[]}\n\nAll products Redis Software Redis Cloud Redis Open Source Redis Insight Redis Enterprise for K8s Redis Data Integration Client Libraries ESC\n\nExample:\n```text\nFT.ALIASDEL alias\n```\n\nExample:\n```text\naliasdel(\n    alias: str  // The alias name to delete\n) → str  // OK on success\n```\n\nExample:\n```text\nALIASDEL(\n    alias: RedisArgument  // The alias name\n) → Promise<string>  // OK on success\n```\n\nExample:\n```text\nftAliasDel(\n    aliasName: String  // The alias name\n) → String  // OK on success\n```\n\nExample:\n```text\nFTAliasDel(\n    ctx: context.Context,\n    alias: string  // The alias name\n) → *StatusCmd  // OK on success\n```\n\nExample:\n```text\nAliasDel(\n    alias: string  // The alias name\n) → bool  // true if the alias was deleted\n```\n\nExample:\n```text\nAliasDelAsync(\n    alias: string  // The alias name\n) → Task<bool>  // true if the alias was deleted\n```\n\nExample:\n```text\nftaliasdel(\n    $alias: string  // The alias name\n) → Status  // OK on success\n```\n\nExample:\n```bash\n127.0.0.1:6379> FT.ALIASDEL alias\nOK\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:40.826Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":9,"totalLines":66,"estimatedTokens":441}}330{"id":"doc-flushdb_docs-04727068","source":"documentation","title":"FLUSHDB | Docs","url":"https://redis.io/docs/latest/commands/flushdb/","text":"{\"acl_categories\":[\"@keyspace\",\"@write\",\"@slow\",\"@dangerous\"],\"arguments\":[{\"arguments\":[{\"display_text\":\"async\",\"name\":\"async\",\"since\":\"4.0.0\",\"token\":\"ASYNC\",\"type\":\"pure-token\"},{\"display_text\":\"sync\",\"name\":\"sync\",\"since\":\"6.2.0\",\"token\":\"SYNC\",\"type\":\"pure-token\"}],\"name\":\"flush-type\",\"optional\":true,\"type\":\"oneof\"}],\"arity\":-1,\"categories\":[\"docs\",\"develop\",\"stack\",\"oss\",\"rs\",\"rc\",\"oss\",\"kubernetes\",\"clients\"],\"command_flags\":[\"write\"],\"complexity\":\"O(N) where N is the number of keys in the selected database\",\"description\":\"Remove all keys from the current database.\",\"duplicateOf\":\"head:data-ai-metadata\",\"group\":\"server\",\"location\":\"body\",\"since\":\"1.0.0\",\"syntax_fmt\":\"FLUSHDB [ASYNC | SYNC]\",\"title\":\"FLUSHDB\",\"tableOfContents\":{\"sections\":[{\"id\":\"optional-arguments\",\"title\":\"Optional arguments\"},{\"id\":\"details\",\"title\":\"Details\"},{\"id\":\"redis-software-and-redis-cloud-compatibility\",\"title\":\"Redis Software and Redis Cloud compatibility\"},{\"id\":\"return-information\",\"title\":\"Return information\"}]},\"codeExamples\":[]}\n\nAll products Redis Software Redis Cloud Redis Open Source Redis Insight Redis Enterprise for K8s Redis Data Integration Client Libraries ESC\n\nExample:\n```text\nFLUSHDB [ASYNC | SYNC]\n```\n\nExample:\n```text\nflushdb(\n    asynchronous: bool,  // Async flush\n    **kwargs: Any\n) → ResponseT\n```\n\nExample:\n```text\nFLUSHDB(\n    mode: RedisFlushMode  // Optional flush mode (ASYNC or SYNC)\n) → SimpleStringReply\n```\n\nExample:\n```text\nflushDB() → String  // OK\n\nflushDB(\n    flushMode: FlushMode  // Flush mode\n) → String  // OK\n```\n\nExample:\n```text\nflushdb() → String\n\nflushdb(\n    flushMode: FlushMode\n) → String\n\nflushdbAsync() → String\n```\n\nExample:\n```text\nflushdb() → RedisFuture<String>\n\nflushdb(\n    flushMode: FlushMode\n) → RedisFuture<String>\n\nflushdbAsync() → RedisFuture<String>\n```\n\nExample:\n```text\nflushdb() → Mono<String>\n\nflushdb(\n    flushMode: FlushMode\n) → Mono<String>\n\nflushdbAsync() → Mono<String>\n```\n\nExample:\n```text\nFlushDB(\n    ctx: context.Context  // Context\n) → *StatusCmd\n```\n\nExample:\n```text\nflushdb() → mixed\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:40.828Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":9,"totalLines":79,"estimatedTokens":522}}331{"id":"doc-json_arrindex_docs-597dbb0b","source":"documentation","title":"JSON.ARRINDEX | Docs","url":"https://redis.io/docs/latest/commands/json.arrindex/","text":"{\"acl_categories\":[\"@json\",\"@read\",\"@slow\"],\"arguments\":[{\"name\":\"key\",\"type\":\"key\"},{\"name\":\"path\",\"type\":\"string\"},{\"name\":\"value\",\"type\":\"string\"},{\"arguments\":[{\"name\":\"start\",\"type\":\"integer\"},{\"name\":\"stop\",\"optional\":true,\"type\":\"integer\"}],\"name\":\"range\",\"optional\":true,\"type\":\"block\"}],\"categories\":[\"docs\",\"develop\",\"stack\",\"oss\",\"rs\",\"rc\",\"oss\",\"kubernetes\",\"clients\"],\"complexity\":\"O(N) when path is evaluated to a single value where N is the size of the array, O(N) when path is evaluated to multiple values, where N is the size of the key\",\"description\":\"Returns the index of the first occurrence of a JSON scalar value in the array at path\",\"duplicateOf\":\"head:data-ai-metadata\",\"group\":\"json\",\"location\":\"body\",\"since\":\"1.0.0\",\"syntax_fmt\":\"JSON.ARRINDEX key path value [start [stop]]\",\"title\":\"JSON.ARRINDEX\",\"tableOfContents\":{\"sections\":[{\"id\":\"required-arguments\",\"title\":\"Required arguments\"},{\"id\":\"optional-arguments\",\"title\":\"Optional arguments\"},{\"id\":\"examples\",\"title\":\"Examples\"},{\"id\":\"redis-software-and-redis-cloud-compatibility\",\"title\":\"Redis Software and Redis Cloud compatibility\"},{\"id\":\"return-information\",\"title\":\"Return information\"},{\"id\":\"see-also\",\"title\":\"See also\"},{\"id\":\"related-topics\",\"title\":\"Related topics\"}]},\"codeExamples\":[]}\n\nAll products Redis Software Redis Cloud Redis Open Source Redis Insight Redis Enterprise for K8s Redis Data Integration Client Libraries ESC\n\nExample:\n```text\nJSON.ARRINDEX key path value [start [stop]]\n```\n\nExample:\n```text\narrindex(\n    name: str,\n    path: str,\n    scalar: int,\n    start: Optional[int] = None,\n    stop: Optional[int] = None\n) → List[Optional[int]]\n```\n\nExample:\n```text\nARRINDEX(\n    key: RedisArgument,\n    path: RedisArgument,\n    json: RedisJSON,\n    options?: JsonArrIndexOptions\n) → Any\n```\n\nExample:\n```text\njsonArrIndex(\n    key: String,\n    path: Path,\n    scalar: Object\n) → long\n\njsonArrIndex(\n    key: String,\n    path: Path2,\n    scalar: Object\n) → List<Long>\n```\n\nExample:\n```text\njsonArrindex(\n    key: K,  // the key holding the JSON document.\n    jsonPath: JsonPath,  // the JsonPath pointing to the array inside the document.\n    value: JsonValue,\n    range: JsonRangeArgs  // the JsonRangeArgs to search within.\n) → List<Long>  // Long the index hosting the searched element, -1 if not found or null if the specified path is not an array. @since 6.8\n\njsonArrindex(\n    key: K,  // the key holding the JSON document.\n    jsonPath: JsonPath,  // the JsonPath pointing to the array inside the document.\n    value: JsonValue\n) → List<Long>  // Long the index hosting the searched element, -1 if not found or null if the specified path is not an array. @since 6.8\n\njsonArrindex(\n    key: K,  // the key holding the JSON document.\n    jsonPath: JsonPath,  // the JsonPath pointing to the array inside the document.\n    jsonString: String  // the JSON string to search for.\n) → List<Long>  // Long the index hosting the searched element, -1 if not found or null if the specified path is not an array. @since 6.8\n\njsonArrindex(\n    key: K,  // the key holding the JSON document.\n    jsonPath: JsonPath,  // the JsonPath pointing to the array inside the document.\n    jsonString: String,  // the JSON string to search for.\n    range: JsonRangeArgs  // the JsonRangeArgs to search within.\n) → List<Long>  // Long the index hosting the searched element, -1 if not found or null if the specified path is not an array. @since 6.8\n```\n\nExample:\n```text\njsonArrindex(\n    key: K,  // the key holding the JSON document.\n    jsonPath: JsonPath,  // the JsonPath pointing to the array inside the document.\n    value: JsonValue,\n    range: JsonRangeArgs  // the JsonRangeArgs to search within.\n) → RedisFuture<List<Long>>  // Long the index hosting the searched element, -1 if not found or null if the specified path is not an array. @since 6.8\n\njsonArrindex(\n    key: K,  // the key holding the JSON document.\n    jsonPath: JsonPath,  // the JsonPath pointing to the array inside the document.\n    value: JsonValue\n) → RedisFuture<List<Long>>  // Long the index hosting the searched element, -1 if not found or null if the specified path is not an array. @since 6.8\n\njsonArrindex(\n    key: K,  // the key holding the JSON document.\n    jsonPath: JsonPath,  // the JsonPath pointing to the array inside the document.\n    jsonString: String  // the JSON string to search for.\n) → RedisFuture<List<Long>>  // Long the index hosting the searched element, -1 if not found or null if the specified path is not an array. @since 6.8\n\njsonArrindex(\n    key: K,  // the key holding the JSON document.\n    jsonPath: JsonPath,  // the JsonPath pointing to the array inside the document.\n    jsonString: String,  // the JSON string to search for.\n    range: JsonRangeArgs  // the JsonRangeArgs to search within.\n) → RedisFuture<List<Long>>  // Long the index hosting the searched element, -1 if not found or null if the specified path is not an array. @since 6.8\n```\n\nExample:\n```text\njsonArrindex(\n    key: K,  // the key holding the JSON document.\n    jsonPath: JsonPath,  // the JsonPath pointing to the array inside the document.\n    value: JsonValue,\n    range: JsonRangeArgs  // the JsonRangeArgs to search within.\n) → Flux<Long>  // Long the index hosting the searched element, -1 if not found or null if the specified path is not an array. @since 6.8\n\njsonArrindex(\n    key: K,  // the key holding the JSON document.\n    jsonPath: JsonPath,  // the JsonPath pointing to the array inside the document.\n    value: JsonValue\n) → Flux<Long>  // Long the index hosting the searched element, -1 if not found or null if the specified path is not an array. @since 6.8\n\njsonArrindex(\n    key: K,  // the key holding the JSON document.\n    jsonPath: JsonPath,  // the JsonPath pointing to the array inside the document.\n    jsonString: String  // the JSON string to search for.\n) → Flux<Long>  // Long the index hosting the searched element, -1 if not found or null if the specified path is not an array. @since 6.8\n\njsonArrindex(\n    key: K,  // the key holding the JSON document.\n    jsonPath: JsonPath,  // the JsonPath pointing to the array inside the document.\n    jsonString: String,  // the JSON string to search for.\n    range: JsonRangeArgs  // the JsonRangeArgs to search within.\n) → Flux<Long>  // Long the index hosting the searched element, -1 if not found or null if the specified path is not an array. @since 6.8\n```\n\nExample:\n```text\nJSONArrIndex(\n    ctx: context.Context,\n    key: Any,\n    path: string,\n    value: ...interface{}\n) → *IntSliceCmd\n```\n\nExample:\n```text\nArrIndex(\n    key: RedisKey,\n    path: string,\n    value: object,\n    start: long?,\n    stop: long?\n) → long?[]\n```\n\nExample:\n```text\njsonarrindex(\n    $key: string,\n    $path: string,\n    $value: string,\n    int $start = 0: Any,\n    int $stop = 0: Any\n) → array\n```\n\nExample:\n```text\njson_arr_index(\n    key: K,  // The key holding the JSON document.\n    path: P,  // The path to the target array.\n    value: &V  // The JSON value to search for.\n) → (RV)  // The index of the first matching element.\n\njson_arr_index_ss(\n    key: K,  // The key holding the JSON document.\n    path: P,  // The path to the target array.\n    value: &V,  // The JSON value to search for.\n    start: &isize,  // The start offset for the search.\n    stop: &isize  // The stop offset for the search.\n) → (RV)  // The index of the first matching element in the requested range.\n```\n\nExample:\n```bash\nredis> JSON.SET item:1 $ '{\"name\":\"Noise-cancelling Bluetooth headphones\",\"description\":\"Wireless Bluetooth headphones with noise-cancelling technology\",\"connection\":{\"wireless\":true,\"type\":\"Bluetooth\"},\"price\":99.98,\"stock\":25,\"colors\":[\"black\",\"silver\"]}'\nOK\n```\n\nExample:\n```bash\nredis> JSON.ARRAPPEND item:1 $.colors '\"blue\"'\n1) (integer) 3\n```\n\nExample:\n```bash\nredis> JSON.GET item:1\n\"{\\\"name\\\":\\\"Noise-cancelling Bluetooth headphones\\\",\\\"description\\\":\\\"Wireless Bluetooth headphones with noise-cancelling technology\\\",\\\"connection\\\":{\\\"wireless\\\":true,\\\"type\\\":\\\"Bluetooth\\\"},\\\"price\\\":99.98,\\\"stock\\\":25,\\\"colors\\\":[\\\"black\\\",\\\"silver\\\",\\\"blue\\\"]}\"\n```\n\nExample:\n```bash\nredis> JSON.GET item:1 '$.colors[*]'\n\"[\\\"black\\\",\\\"silver\\\",\\\"blue\\\"]\"\n```\n\nExample:\n```bash\nredis> JSON.ARRINSERT item:1 $.colors 2 '\"yellow\"' '\"gold\"'\n1) (integer) 5\n```\n\nExample:\n```bash\nredis> JSON.GET item:1 $.colors\n\"[[\\\"black\\\",\\\"silver\\\",\\\"yellow\\\",\\\"gold\\\",\\\"blue\\\"]]\"\n```\n\nExample:\n```bash\nredis> JSON.ARRINDEX item:1 $..colors '\"silver\"'\n1) (integer) 1\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:40.969Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":18,"totalLines":224,"estimatedTokens":2129}}332{"id":"doc-json_arrtrim_docs-f83b0f26","source":"documentation","title":"JSON.ARRTRIM | Docs","url":"https://redis.io/docs/latest/commands/json.arrtrim/","text":"{\"acl_categories\":[\"@json\",\"@write\",\"@slow\"],\"arguments\":[{\"name\":\"key\",\"type\":\"key\"},{\"name\":\"path\",\"type\":\"string\"},{\"name\":\"start\",\"type\":\"integer\"},{\"name\":\"stop\",\"type\":\"integer\"}],\"categories\":[\"docs\",\"develop\",\"stack\",\"oss\",\"rs\",\"rc\",\"oss\",\"kubernetes\",\"clients\"],\"complexity\":\"O(N) when path is evaluated to a single value where N is the size of the array, O(N) when path is evaluated to multiple values, where N is the size of the key\",\"description\":\"Trims the array at path to contain only the specified inclusive range of indices from start to stop\",\"duplicateOf\":\"head:data-ai-metadata\",\"group\":\"json\",\"location\":\"body\",\"since\":\"1.0.0\",\"syntax_fmt\":\"JSON.ARRTRIM key path start stop\",\"title\":\"JSON.ARRTRIM\",\"tableOfContents\":{\"sections\":[{\"id\":\"required-arguments\",\"title\":\"Required arguments\"},{\"id\":\"optional-arguments\",\"title\":\"Optional arguments\"},{\"id\":\"examples\",\"title\":\"Examples\"},{\"id\":\"redis-software-and-redis-cloud-compatibility\",\"title\":\"Redis Software and Redis Cloud compatibility\"},{\"id\":\"return-information\",\"title\":\"Return information\"},{\"id\":\"see-also\",\"title\":\"See also\"},{\"id\":\"related-topics\",\"title\":\"Related topics\"}]},\"codeExamples\":[]}\n\nAll products Redis Software Redis Cloud Redis Open Source Redis Insight Redis Enterprise for K8s Redis Data Integration Client Libraries ESC\n\nExample:\n```text\nJSON.ARRTRIM key path start stop\n```\n\nExample:\n```text\narrtrim(\n    name: str,\n    path: str,\n    start: int,\n    stop: int\n) → List[Optional[int]]\n```\n\nExample:\n```text\nARRTRIM(\n    key: RedisArgument,\n    path: RedisArgument,\n    start: number,\n    stop: number\n) → Any\n```\n\nExample:\n```text\njsonArrTrim(\n    key: String,\n    path: Path,\n    start: int,\n    stop: int\n) → Long\n\njsonArrTrim(\n    key: String,\n    path: Path2,\n    start: int,\n    stop: int\n) → List<Long>\n```\n\nExample:\n```text\njsonArrtrim(\n    key: K,  // the key holding the JSON document.\n    jsonPath: JsonPath,  // the JsonPath pointing to the array inside the document.\n    range: JsonRangeArgs  // the JsonRangeArgs to trim by.\n) → List<Long>  // Long the resulting size of the arrays after the trimming, or null if the path does not exist. @since 6.5\n```\n\nExample:\n```text\njsonArrtrim(\n    key: K,  // the key holding the JSON document.\n    jsonPath: JsonPath,  // the JsonPath pointing to the array inside the document.\n    range: JsonRangeArgs  // the JsonRangeArgs to trim by.\n) → RedisFuture<List<Long>>  // Long the resulting size of the arrays after the trimming, or null if the path does not exist. @since 6.5\n```\n\nExample:\n```text\njsonArrtrim(\n    key: K,  // the key holding the JSON document.\n    jsonPath: JsonPath,  // the JsonPath pointing to the array inside the document.\n    range: JsonRangeArgs  // the JsonRangeArgs to trim by.\n) → Flux<Long>  // Long the resulting size of the arrays after the trimming, or null if the path does not exist. @since 6.5\n```\n\nExample:\n```text\nJSONArrTrim(\n    ctx: context.Context,\n    key: Any,\n    path: string\n) → *IntSliceCmd\n```\n\nExample:\n```text\nArrTrim(\n    key: RedisKey,\n    path: string,\n    start: long,\n    stop: long\n) → long?[]\n```\n\nExample:\n```text\njsonarrtrim(\n    $key: string,\n    $path: string,\n    $start: int,\n    $stop: int\n) → array\n```\n\nExample:\n```text\njson_arr_trim(\n    key: K,  // The key holding the JSON document.\n    path: P,  // The path to the target array.\n    start: i64,  // The inclusive start index to keep.\n    stop: i64  // The inclusive stop index to keep.\n) → (RV)  // The length of the array after trimming.\n```\n\nExample:\n```bash\nredis> JSON.SET key $\n\"[{\\\"name\\\":\\\"Healthy headphones\\\",\\\"description\\\":\\\"Wireless Bluetooth headphones with noise-cancelling technology\\\",\\\"connection\\\":{\\\"wireless\\\":true,\\\"type\\\":\\\"Bluetooth\\\"},\\\"price\\\":99.98,\\\"stock\\\":25,\\\"colors\\\":[\\\"black\\\",\\\"silver\\\"],\\\"max_level\\\":[60,70,80]},{\\\"name\\\":\\\"Noisy headphones\\\",\\\"description\\\":\\\"Wireless Bluetooth headphones with noise-cancelling technology\\\",\\\"connection\\\":{\\\"wireless\\\":true,\\\"type\\\":\\\"Bluetooth\\\"},\\\"price\\\":99.98,\\\"stock\\\":25,\\\"colors\\\":[\\\"black\\\",\\\"silver\\\"],\\\"max_level\\\":[85,90,100,120]}]\"\nOK\n```\n\nExample:\n```bash\nredis> JSON.ARRAPPEND key $.[1].max_level 140 160 180 200 220 240 260 280\n1) (integer) 12\n```\n\nExample:\n```bash\nredis> JSON.GET key $.[1].max_level\n\"[[85,90,100,120,140,160,180,200,220,240,260,280]]\"\n```\n\nExample:\n```bash\nredis> JSON.ARRTRIM key $.[1].max_level 4 8\n1) (integer) 5\n```\n\nExample:\n```bash\nredis> JSON.GET key $.[1].max_level\n\"[[140,160,180,200,220]]\"\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:40.979Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":16,"totalLines":144,"estimatedTokens":1123}}333{"id":"doc-nested_objects_and_arrays_surrealdb-281a4dcd","source":"documentation","title":"Nested objects and arrays | SurrealDB","url":"https://surrealdb.com/docs/learn/data-models/document/nested-objects-and-arrays","text":"Example:\n```text\n[\n\t{\n\t\taddresses: [\n\t\t\t{\n\t\t\t\taddress_line: '123 Maple St',\n\t\t\t\tcity: 'Springfield',\n\t\t\t\tcountry: 'USA',\n\t\t\t\ttype: 'home'\n\t\t\t},\n\t\t\t{\n\t\t\t\taddress_line: '456 Oak Ave',\n\t\t\t\tcity: 'Metropolis',\n\t\t\t\tcountry: 'USA',\n\t\t\t\ttype: 'work'\n\t\t\t}\n\t\t],\n\t\tage: 29,\n\t\temail: 'alice@example.com',\n\t\tid: 'users:a2ndbh1hsquvkvthws09',\n\t\tname: 'Alice Smith'\n\t}\n]\n```\n\nExample:\n```text\nSELECT * FROM users;\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:45.213Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":2,"totalLines":32,"estimatedTokens":105}}334{"id":"doc-kotlin_surrealdb-b5afb43a","source":"documentation","title":"Kotlin | SurrealDB","url":"https://surrealdb.com/docs/languages/kotlin","text":"Example:\n```text\nimport com.surrealdb.kotlin.SurrealClient\nimport com.surrealdb.kotlin.SurrealClientConfig\n```\n\nExample:\n```text\nimport com.surrealdb.kotlin.SurrealClient\nimport com.surrealdb.kotlin.SurrealClientConfig\nimport kotlinx.coroutines.runBlocking\nimport kotlinx.serialization.json.buildJsonObject\nimport kotlinx.serialization.json.put\n\nfun main() = runBlocking {\n    val client = SurrealClient(SurrealClientConfig(url = \"ws://localhost:8000\"))\n\n    client.signin(buildJsonObject {\n        put(\"user\", \"root\")\n        put(\"pass\", \"root\")\n    })\n    client.use(\"surrealdb\", \"docs\")\n\n    // ...\n\n    client.close()\n}\n```\n\nExample:\n```text\nimport kotlinx.serialization.Serializable\n\n@Serializable\ndata class Person(val name: String, val age: Int)\n```\n\nExample:\n```text\nimport com.surrealdb.kotlin.query.RecordId\nimport com.surrealdb.kotlin.query.Table\nimport com.surrealdb.kotlin.query.awaitAs\nimport kotlinx.serialization.json.buildJsonObject\nimport kotlinx.serialization.json.put\n\nval created: Person = client\n    .create(RecordId(\"person\", \"john\"))\n    .content(buildJsonObject {\n        put(\"name\", \"John\")\n        put(\"age\", 32)\n    })\n    .awaitAs()\n```\n\nExample:\n```text\nimport com.surrealdb.kotlin.query.Table\nimport com.surrealdb.kotlin.query.field\nimport com.surrealdb.kotlin.query.gte\nimport com.surrealdb.kotlin.query.awaitAs\n\nval adults: List<Person> = client\n    .select(Table(\"person\"))\n    .where(field(\"age\") gte 18)\n    .limit(50)\n    .awaitAs()\n```\n\nExample:\n```text\nimport kotlinx.serialization.json.buildJsonObject\nimport kotlinx.serialization.json.put\n\nval people: List<Person> = client.queryAs(\n    \"SELECT * FROM person WHERE age > \\$min_age\",\n    buildJsonObject { put(\"min_age\", 25) },\n)\n```\n\nExample:\n```text\nclient.close()\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:45.220Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":7,"totalLines":85,"estimatedTokens":444}}335{"id":"doc-typescript_documentation_narrowing-b2adaad0","source":"documentation","title":"TypeScript: Documentation - Narrowing","url":"https://www.typescriptlang.org/docs/handbook/2/narrowing.html","text":"Example:\n```text\nfunction padLeft(padding: number | string, input: string): string {  throw new Error(\"Not implemented yet!\");}\n```\n\nExample:\n```text\nfunction padLeft(padding: number | string, input: string): string {  return \" \".repeat(padding) + input;Argument of type 'string | number' is not assignable to parameter of type 'number'.\n  Type 'string' is not assignable to type 'number'.2345Argument of type 'string | number' is not assignable to parameter of type 'number'.\n  Type 'string' is not assignable to type 'number'.}\n```\n\nExample:\n```text\nfunction padLeft(padding: number | string, input: string): string {  if (typeof padding === \"number\") {    return \" \".repeat(padding) + input;  }  return padding + input;}\n```\n\nExample:\n```text\nfunction padLeft(padding: number | string, input: string): string {  if (typeof padding === \"number\") {    return \" \".repeat(padding) + input;                        (parameter) padding: number  }  return padding + input;           (parameter) padding: string}\n```\n\nExample:\n```text\nfunction printAll(strs: string | string[] | null) {  if (typeof strs === \"object\") {    for (const s of strs) {'strs' is possibly 'null'.18047'strs' is possibly 'null'.      console.log(s);    }  } else if (typeof strs === \"string\") {    console.log(strs);  } else {    // do nothing  }}\n```\n\nExample:\n```text\nfunction getUsersOnlineMessage(numUsersOnline: number) {  if (numUsersOnline) {    return `There are ${numUsersOnline} online now!`;  }  return \"Nobody's here. :(\";}\n```\n\nExample:\n```text\n// both of these result in 'true'Boolean(\"hello\"); // type: boolean, value: true!!\"world\"; // type: true,    value: trueThis kind of expression is always truthy.2872This kind of expression is always truthy.\n```\n\nExample:\n```text\nfunction printAll(strs: string | string[] | null) {  if (strs && typeof strs === \"object\") {    for (const s of strs) {      console.log(s);    }  } else if (typeof strs === \"string\") {    console.log(strs);  }}\n```\n\nExample:\n```text\nTypeError: null is not iterable\n```\n\nExample:\n```text\nfunction printAll(strs: string | string[] | null) {  // !!!!!!!!!!!!!!!!  //  DON'T DO THIS!  //   KEEP READING  // !!!!!!!!!!!!!!!!  if (strs) {    if (typeof strs === \"object\") {      for (const s of strs) {        console.log(s);      }    } else if (typeof strs === \"string\") {      console.log(strs);    }  }}\n```\n\nExample:\n```text\nfunction multiplyAll(  values: number[] | undefined,  factor: number): number[] | undefined {  if (!values) {    return values;  } else {    return values.map((x) => x * factor);  }}\n```\n\nExample:\n```text\nfunction example(x: string | number, y: string | boolean) {  if (x === y) {    // We can now call any 'string' method on 'x' or 'y'.    x.toUpperCase();          (method) String.toUpperCase(): string    y.toLowerCase();          (method) String.toLowerCase(): string  } else {    console.log(x);               (parameter) x: string | number    console.log(y);               (parameter) y: string | boolean  }}\n```\n\nExample:\n```text\nfunction printAll(strs: string | string[] | null) {  if (strs !== null) {    if (typeof strs === \"object\") {      for (const s of strs) {                       (parameter) strs: string[]        console.log(s);      }    } else if (typeof strs === \"string\") {      console.log(strs);                   (parameter) strs: string    }  }}\n```\n\nExample:\n```text\ninterface Container {  value: number | null | undefined;} function multiplyValue(container: Container, factor: number) {  // Remove both 'null' and 'undefined' from the type.  if (container.value != null) {    console.log(container.value);                           (property) Container.value: number     // Now we can safely multiply 'container.value'.    container.value *= factor;  }}\n```\n\nExample:\n```text\ntype Fish = { swim: () => void };type Bird = { fly: () => void }; function move(animal: Fish | Bird) {  if (\"swim\" in animal) {    return animal.swim();  }   return animal.fly();}\n```\n\nExample:\n```text\ntype Fish = { swim: () => void };type Bird = { fly: () => void };type Human = { swim?: () => void; fly?: () => void }; function move(animal: Fish | Bird | Human) {  if (\"swim\" in animal) {    animal;      (parameter) animal: Fish | Human  } else {    animal;      (parameter) animal: Bird | Human  }}\n```\n\nExample:\n```text\nfunction logValue(x: Date | string) {  if (x instanceof Date) {    console.log(x.toUTCString());               (parameter) x: Date  } else {    console.log(x.toUpperCase());               (parameter) x: string  }}\n```\n\nExample:\n```text\nlet x = Math.random() < 0.5 ? 10 : \"hello world!\";   let x: string | numberx = 1; console.log(x);           let x: numberx = \"goodbye!\"; console.log(x);           let x: string\n```\n\nExample:\n```text\nlet x = Math.random() < 0.5 ? 10 : \"hello world!\";   let x: string | numberx = 1; console.log(x);           let x: numberx = true;Type 'boolean' is not assignable to type 'string | number'.2322Type 'boolean' is not assignable to type 'string | number'. console.log(x);           let x: string | number\n```\n\nExample:\n```text\nfunction padLeft(padding: number | string, input: string) {  if (typeof padding === \"number\") {    return \" \".repeat(padding) + input;  }  return padding + input;}\n```\n\nExample:\n```text\nfunction example() {  let x: string | number | boolean;   x = Math.random() < 0.5;   console.log(x);             let x: boolean   if (Math.random() < 0.5) {    x = \"hello\";    console.log(x);               let x: string  } else {    x = 100;    console.log(x);               let x: number  }   return x;        let x: string | number}\n```\n\nExample:\n```text\nfunction isFish(pet: Fish | Bird): pet is Fish {  return (pet as Fish).swim !== undefined;}\n```\n\nExample:\n```text\n// Both calls to 'swim' and 'fly' are now okay.let pet = getSmallPet(); if (isFish(pet)) {  pet.swim();} else {  pet.fly();}\n```\n\nExample:\n```text\nconst zoo: (Fish | Bird)[] = [getSmallPet(), getSmallPet(), getSmallPet()];const underWater1: Fish[] = zoo.filter(isFish);// or, equivalentlyconst underWater2: Fish[] = zoo.filter(isFish) as Fish[]; // The predicate may need repeating for more complex examplesconst underWater3: Fish[] = zoo.filter((pet): pet is Fish => {  if (pet.name === \"sharkey\") return false;  return isFish(pet);});\n```\n\nExample:\n```text\ninterface Shape {  kind: \"circle\" | \"square\";  radius?: number;  sideLength?: number;}\n```\n\nExample:\n```text\nfunction handleShape(shape: Shape) {  // oops!  if (shape.kind === \"rect\") {This comparison appears to be unintentional because the types '\"circle\" | \"square\"' and '\"rect\"' have no overlap.2367This comparison appears to be unintentional because the types '\"circle\" | \"square\"' and '\"rect\"' have no overlap.    // ...  }}\n```\n\nExample:\n```text\nfunction getArea(shape: Shape) {  return Math.PI * shape.radius ** 2;'shape.radius' is possibly 'undefined'.18048'shape.radius' is possibly 'undefined'.}\n```\n\nExample:\n```text\nfunction getArea(shape: Shape) {  if (shape.kind === \"circle\") {    return Math.PI * shape.radius ** 2;'shape.radius' is possibly 'undefined'.18048'shape.radius' is possibly 'undefined'.  }}\n```\n\nExample:\n```text\nfunction getArea(shape: Shape) {  if (shape.kind === \"circle\") {    return Math.PI * shape.radius! ** 2;  }}\n```\n\nExample:\n```text\ninterface Circle {  kind: \"circle\";  radius: number;} interface Square {  kind: \"square\";  sideLength: number;} type Shape = Circle | Square;\n```\n\nExample:\n```text\nfunction getArea(shape: Shape) {  return Math.PI * shape.radius ** 2;Property 'radius' does not exist on type 'Shape'.\n  Property 'radius' does not exist on type 'Square'.2339Property 'radius' does not exist on type 'Shape'.\n  Property 'radius' does not exist on type 'Square'.}\n```\n\nExample:\n```text\nfunction getArea(shape: Shape) {  if (shape.kind === \"circle\") {    return Math.PI * shape.radius ** 2;                      (parameter) shape: Circle  }}\n```\n\nExample:\n```text\nfunction getArea(shape: Shape) {  switch (shape.kind) {    case \"circle\":      return Math.PI * shape.radius ** 2;                        (parameter) shape: Circle    case \"square\":      return shape.sideLength ** 2;              (parameter) shape: Square  }}\n```\n\nExample:\n```text\ntype Shape = Circle | Square; function getArea(shape: Shape) {  switch (shape.kind) {    case \"circle\":      return Math.PI * shape.radius ** 2;    case \"square\":      return shape.sideLength ** 2;    default:      const _exhaustiveCheck: never = shape;      return _exhaustiveCheck;  }}\n```\n\nExample:\n```text\ninterface Triangle {  kind: \"triangle\";  sideLength: number;} type Shape = Circle | Square | Triangle; function getArea(shape: Shape) {  switch (shape.kind) {    case \"circle\":      return Math.PI * shape.radius ** 2;    case \"square\":      return shape.sideLength ** 2;    default:      const _exhaustiveCheck: never = shape;Type 'Triangle' is not assignable to type 'never'.2322Type 'Triangle' is not assignable to type 'never'.      return _exhaustiveCheck;  }}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:47.344Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":35,"totalLines":180,"estimatedTokens":2244}}336{"id":"doc-typescript_documentation_conditional_types-27e2f7bd","source":"documentation","title":"TypeScript: Documentation - Conditional Types","url":"https://www.typescriptlang.org/docs/handbook/2/conditional-types.html","text":"Example:\n```text\ninterface Animal {  live(): void;}interface Dog extends Animal {  woof(): void;} type Example1 = Dog extends Animal ? number : string;        type Example1 = number type Example2 = RegExp extends Animal ? number : string;        type Example2 = string\n```\n\nExample:\n```text\nSomeType extends OtherType ? TrueType : FalseType;\n```\n\nExample:\n```text\ninterface IdLabel {  id: number /* some fields */;}interface NameLabel {  name: string /* other fields */;} function createLabel(id: number): IdLabel;function createLabel(name: string): NameLabel;function createLabel(nameOrId: string | number): IdLabel | NameLabel;function createLabel(nameOrId: string | number): IdLabel | NameLabel {  throw \"unimplemented\";}\n```\n\nExample:\n```text\ntype NameOrId<T extends number | string> = T extends number  ? IdLabel  : NameLabel;\n```\n\nExample:\n```text\nfunction createLabel<T extends number | string>(idOrName: T): NameOrId<T> {  throw \"unimplemented\";} let a = createLabel(\"typescript\");   let a: NameLabel let b = createLabel(2.8);   let b: IdLabel let c = createLabel(Math.random() ? \"hello\" : 42);let c: NameLabel | IdLabel\n```\n\nExample:\n```text\ntype MessageOf<T> = T[\"message\"];Type '\"message\"' cannot be used to index type 'T'.2536Type '\"message\"' cannot be used to index type 'T'.\n```\n\nExample:\n```text\ntype MessageOf<T extends { message: unknown }> = T[\"message\"]; interface Email {  message: string;} type EmailMessageContents = MessageOf<Email>;              type EmailMessageContents = string\n```\n\nExample:\n```text\ntype MessageOf<T> = T extends { message: unknown } ? T[\"message\"] : never; interface Email {  message: string;} interface Dog {  bark(): void;} type EmailMessageContents = MessageOf<Email>;              type EmailMessageContents = string type DogMessageContents = MessageOf<Dog>;             type DogMessageContents = never\n```\n\nExample:\n```text\ntype Flatten<T> = T extends any[] ? T[number] : T; // Extracts out the element type.type Str = Flatten<string[]>;     type Str = string // Leaves the type alone.type Num = Flatten<number>;     type Num = number\n```\n\nExample:\n```text\ntype Flatten<Type> = Type extends Array<infer Item> ? Item : Type;\n```\n\nExample:\n```text\ntype GetReturnType<Type> = Type extends (...args: never[]) => infer Return  ? Return  : never; type Num = GetReturnType<() => number>;     type Num = number type Str = GetReturnType<(x: string) => string>;     type Str = string type Bools = GetReturnType<(a: boolean, b: boolean) => boolean[]>;      type Bools = boolean[]\n```\n\nExample:\n```text\ndeclare function stringOrNum(x: string): number;declare function stringOrNum(x: number): string;declare function stringOrNum(x: string | number): string | number; type T1 = ReturnType<typeof stringOrNum>;     type T1 = string | number\n```\n\nExample:\n```text\ntype ToArray<Type> = Type extends any ? Type[] : never;\n```\n\nExample:\n```text\ntype ToArray<Type> = Type extends any ? Type[] : never; type StrArrOrNumArr = ToArray<string | number>;           type StrArrOrNumArr = string[] | number[]\n```\n\nExample:\n```text\nstring | number;\n```\n\nExample:\n```text\nToArray<string> | ToArray<number>;\n```\n\nExample:\n```text\nstring[] | number[];\n```\n\nExample:\n```text\ntype ToArrayNonDist<Type> = [Type] extends [any] ? Type[] : never; // 'ArrOfStrOrNum' is no longer a union.type ArrOfStrOrNum = ToArrayNonDist<string | number>;          type ArrOfStrOrNum = (string | number)[]\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:47.351Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":18,"totalLines":91,"estimatedTokens":855}}337{"id":"doc-typescript_documentation_module_plugin-53bcc605","source":"documentation","title":"TypeScript: Documentation - Module: Plugin","url":"https://www.typescriptlang.org/docs/handbook/declaration-files/templates/module-plugin-d-ts.html","text":"Example:\n```text\nimport { greeter } from \"super-greeter\";// Normal Greeter APIgreeter(2);greeter(\"Hello world\");// Now we extend the object with a new function at runtimeimport \"hyper-super-greeter\";greeter.hyperGreet();\n```\n\nExample:\n```text\n/*~ This example shows how to have multiple overloads for your function */export interface GreeterFunction {  (name: string): void  (time: number): void}/*~ This example shows how to export a function specified by an interface */export const greeter: GreeterFunction;\n```\n\nExample:\n```text\n// Type definitions for [~THE LIBRARY NAME~] [~OPTIONAL VERSION NUMBER~]// Project: [~THE PROJECT NAME~]// Definitions by: [~YOUR NAME~] <[~A URL FOR YOU~]>/*~ This is the module plugin template file. You should rename it to index.d.ts *~ and place it in a folder with the same name as the module. *~ For example, if you were writing a file for \"super-greeter\", this *~ file should be 'super-greeter/index.d.ts' *//*~ On this line, import the module which this module adds to */import { greeter } from \"super-greeter\";/*~ Here, declare the same module as the one you imported above *~ then we expand the existing declaration of the greeter function */export module \"super-greeter\" {  export interface GreeterFunction {    /** Greets even better! */    hyperGreet(): void;  }}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:47.373Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":3,"totalLines":16,"estimatedTokens":332}}338{"id":"doc-typescript_documentation_configuring_watch-f448d285","source":"documentation","title":"TypeScript: Documentation - Configuring Watch","url":"https://www.typescriptlang.org/docs/handbook/configuring-watch.html","text":"Example:\n```typescript\n{  // Some typical compiler options  \"compilerOptions\": {    \"target\": \"es2020\",    \"moduleResolution\": \"node\"    // ...  },  // NEW: Options for file/directory watching  \"watchOptions\": {    // Use native file system events for files and directories    \"watchFile\": \"useFsEvents\",    \"watchDirectory\": \"useFsEvents\",    // Poll files for updates more frequently    // when they're updated a lot.    \"fallbackPolling\": \"dynamicPriority\",    // Don't coalesce watch notification    \"synchronousWatchDirectory\": true,    // Finally, two additional settings for reducing the amount of possible    // files to track  work from these directories    \"excludeDirectories\": [\"**/node_modules\", \"_build\"],    \"excludeFiles\": [\"build/fileWhichChangesOften.ts\"]  }}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:47.379Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":1,"totalLines":6,"estimatedTokens":199}}339{"id":"doc-submitting_applications_spark_4_2_0_documentatio-11bc62dd","source":"documentation","title":"Submitting Applications - Spark 4.2.0 Documentation","url":"https://spark.apache.org/docs/latest/submitting-applications.html","text":"Submitting Applications The spark-submit script in Spark’s bin directory is used to launch applications on a cluster. It can use all of Spark’s supported cluster managers through a uniform interface so you don’t have to configure your application especially for each one. Bundling Your Application’s Dependencies If your code depends on other projects, you will need to package them alongside your application in order to distribute the code to a Spark cluster. To do this, create an assembly jar (or “uber” jar) containing your code and its dependencies. Both sbt and Maven have assembly plugins. When creating assembly jars, list Spark and Hadoop as provided dependencies; these need not be bundled since they are provided by the cluster manager at runtime. Once you have an assembled jar you can call the bin/spark-submit script as shown here while passing your jar. For Python, you can use the --py-files argument of spark-submit to add .py, .zip or .egg files to be distributed with your application. If you depend on multiple Python files we recommend packaging them into a .zip or .egg. For third-party Python dependencies, see Python Package Management. Launching Applications with spark-submit Once a user application is bundled, it can be launched using the bin/spark-submit script. This script takes care of setting up the classpath with Spark and its dependencies, and can support different cluster managers and deploy modes that Spark /bin/spark-submit \\ --class <main-class> \\ --master <master-url> \\ --deploy-mode <deploy-mode> \\ --conf <key>=<value> \\ ... # other options <application-jar> \\ [application-arguments] Some of the commonly used options : The entry point for your application (e.g. org.apache.spark.examples.SparkPi) master URL for the cluster (e.g. spark://23.195.26.187:7077) to deploy your driver on the worker nodes (cluster) or locally as an external client (client) (default: client) † Spark configuration property in key=value format. For values that contain spaces wrap “key=value” in quotes (as shown). Multiple configurations should be passed as separate arguments. (e.g. --conf <key>=<value> --conf <key2>=<value2>) to a bundled jar including your application and all dependencies. The URL must be globally visible inside of your cluster, for instance, an hdfs:// path or a file:// path that is present on all nodes. passed to the main method of your main class, if any † A common deployment strategy is to submit your application from a gateway machine that is physically co-located with your worker machines (e.g. Master node in a standalone EC2 cluster). In this setup, client mode is appropriate. In client mode, the driver is launched directly within the spark-submit process which acts as a client to the cluster. The input and output of the application is attached to the console. Thus, this mode is especially suitable for applications that involve the REPL (e.g. Spark shell). Alternatively, if your application is submitted from a machine far from the worker machines (e.g. locally on your laptop), it is common to use cluster mode to minimize network latency between the drivers and the executors. Currently, the standalone mode does not support cluster mode for Python applications. For Python applications, simply pass a .py file in the place of <application-jar>, and add Python .zip, .egg or .py files to the search path with --py-files. There are a few options available that are specific to the cluster manager that is being used. For example, with a Spark standalone cluster with cluster deploy mode, you can also specify --supervise to make sure that the driver is automatically restarted if it fails with a non-zero exit code. To enumerate all such options available to spark-submit, run it with --help. Here are a few examples of common options: # Run application locally on 8 cores ./bin/spark-submit \\ --class org.apache.spark.examples.SparkPi \\ --master \"local[8]\" \\ /path/to/examples.jar \\ 100 # Run on a Spark standalone cluster in client deploy mode ./bin/spark-submit \\ --class org.apache.spark.examples.SparkPi \\ --master spark://207.184.161.138:7077 \\ --executor-memory 20G \\ --total-executor-cores 100 \\ /path/to/examples.jar \\ 1000 # Run on a Spark standalone cluster in cluster deploy mode with supervise ./bin/spark-submit \\ --class org.apache.spark.examples.SparkPi \\ --master spark://207.184.161.138:7077 \\ --deploy-mode cluster \\ --supervise \\ --executor-memory 20G \\ --total-executor-cores 100 \\ /path/to/examples.jar \\ 1000 # Run on a YARN cluster in cluster deploy mode export HADOOP_CONF_DIR=XXX ./bin/spark-submit \\ --class org.apache.spark.examples.SparkPi \\ --master yarn \\ --deploy-mode cluster \\ --executor-memory 20G \\ --num-executors 50 \\ /path/to/examples.jar \\ 1000 # Run a Python application on a Spark standalone cluster ./bin/spark-submit \\ --master spark://207.184.161.138:7077 \\ examples/src/main/python/pi.py \\ 1000 # Run on a Kubernetes cluster in cluster deploy mode ./bin/spark-submit \\ --class org.apache.spark.examples.SparkPi \\ --master k8s://xx.yy.zz.ww:443 \\ --deploy-mode cluster \\ --executor-memory 20G \\ --num-executors 50 \\ http://path/to/examples.jar \\ 1000 Master URLs The master URL passed to Spark can be in one of the following URLMeaning local Run Spark locally with one worker thread (i.e. no parallelism at all). local[K] Run Spark locally with K worker threads (ideally, set this to the number of cores on your machine). local[K,F] Run Spark locally with K worker threads and F maxFailures (see spark.task.maxFailures for an explanation of this variable). local[*] Run Spark locally with as many worker threads as logical cores on your machine. local[*,F] Run Spark locally with as many worker threads as logical cores on your machine and F maxFailures. local-cluster[N,C,M] Local-cluster mode is only for unit tests. It emulates a distributed cluster in a single JVM with N number of workers, C cores per worker and M MiB of memory per worker. spark://HOST:PORT Connect to the given Spark standalone cluster master. The port must be whichever one your master is configured to use, which is 7077 by default. spark://HOST1:PORT1,HOST2:PORT2 Connect to the given Spark standalone cluster with standby masters with Zookeeper. The list must have all the master hosts in the high availability cluster set up with Zookeeper. The port must be whichever each master is configured to use, which is 7077 by default. yarn Connect to a YARN cluster in client or cluster mode depending on the value of --deploy-mode. The cluster location will be found based on the HADOOP_CONF_DIR or YARN_CONF_DIR variable. k8s://HOST:PORT Connect to a Kubernetes cluster in client or cluster mode depending on the value of --deploy-mode. The HOST and PORT refer to the Kubernetes API Server. It connects using TLS by default. In order to force it to use an unsecured connection, you can use k8s://http://HOST:PORT. Loading Configuration from a File The spark-submit script can load default Spark configuration values from a properties file and pass them on to your application. The file can be specified via the --properties-file parameter. When this is not specified, by default Spark will read options from conf/spark-defaults.conf in the SPARK_HOME directory. An additional flag --load-spark-defaults can be used to tell Spark to load configurations from conf/spark-defaults.conf even when a property file is provided via --properties-file. This is useful, for instance, when users want to put system-wide default settings in the former while user/cluster specific settings in the latter. Loading default Spark configurations this way can obviate the need for certain flags to spark-submit. For instance, if the spark.master property is set, you can safely omit the --master flag from spark-submit. In general, configuration values explicitly set on a SparkConf take the highest precedence, then flags passed to spark-submit, then values in the defaults file. If you are ever unclear where configuration options are coming from, you can print out fine-grained debugging information by running spark-submit with the --verbose option. Advanced Dependency Management When using spark-submit, the application jar along with any jars included with the --jars option will be automatically transferred to the cluster. URLs supplied after --jars must be separated by commas. That list is included in the driver and executor classpaths. Directory expansion does not work with --jars. Spark uses the following URL scheme to allow different strategies for disseminating : - Absolute paths and file:/ URIs are served by the driver’s HTTP file server, and every executor pulls the file from the driver HTTP server. hdfs:, http:, https:, these pull down files and JARs from the URI as expected a URI starting with local:/ is expected to exist as a local file on each worker node. This means that no network IO will be incurred, and works well for large files/JARs that are pushed to each worker, or shared via NFS, GlusterFS, etc. Note that JARs and files are copied to the working directory for each SparkContext on the executor nodes. This can use up a significant amount of space over time and will need to be cleaned up. With YARN, cleanup is handled automatically, and with Spark standalone, automatic cleanup can be configured with the spark.worker.cleanup.appDataTtl property. Users may also include any other dependencies by supplying a comma-delimited list of Maven coordinates with --packages. All transitive dependencies will be handled when using this command. Additional repositories (or resolvers in SBT) can be added in a comma-delimited fashion with the flag --repositories. (Note that credentials for password-protected repositories can be supplied in some cases in the repository URI, such as in https://user:password@host/.... Be careful when supplying credentials this way.) These commands can be used with pyspark, spark-shell, and spark-submit to include Spark Packages. For Python, the equivalent --py-files option can be used to distribute .egg, .zip and .py libraries to executors. More Information Once you have deployed your application, the cluster mode overview describes the components involved in distributed execution, and how to monitor and debug applications.\n\nExample:\n```bash\n./bin/spark-submit \\\n  --class <main-class> \\\n  --master <master-url> \\\n  --deploy-mode <deploy-mode> \\\n  --conf <key>=<value> \\\n  ... # other options\n  <application-jar> \\\n  [application-arguments]\n```\n\nExample:\n```bash\n# Run application locally on 8 cores\n./bin/spark-submit \\\n  --class org.apache.spark.examples.SparkPi \\\n  --master \"local[8]\" \\\n  /path/to/examples.jar \\\n  100\n\n# Run on a Spark standalone cluster in client deploy mode\n./bin/spark-submit \\\n  --class org.apache.spark.examples.SparkPi \\\n  --master spark://207.184.161.138:7077 \\\n  --executor-memory 20G \\\n  --total-executor-cores 100 \\\n  /path/to/examples.jar \\\n  1000\n\n# Run on a Spark standalone cluster in cluster deploy mode with supervise\n./bin/spark-submit \\\n  --class org.apache.spark.examples.SparkPi \\\n  --master spark://207.184.161.138:7077 \\\n  --deploy-mode cluster \\\n  --supervise \\\n  --executor-memory 20G \\\n  --total-executor-cores 100 \\\n  /path/to/examples.jar \\\n  1000\n\n# Run on a YARN cluster in cluster deploy mode\nexport HADOOP_CONF_DIR=XXX\n./bin/spark-submit \\\n  --class org.apache.spark.examples.SparkPi \\\n  --master yarn \\\n  --deploy-mode cluster \\\n  --executor-memory 20G \\\n  --num-executors 50 \\\n  /path/to/examples.jar \\\n  1000\n\n# Run a Python application on a Spark standalone cluster\n./bin/spark-submit \\\n  --master spark://207.184.161.138:7077 \\\n  examples/src/main/python/pi.py \\\n  1000\n\n# Run on a Kubernetes cluster in cluster deploy mode\n./bin/spark-submit \\\n  --class org.apache.spark.examples.SparkPi \\\n  --master k8s://xx.yy.zz.ww:443 \\\n  --deploy-mode cluster \\\n  --executor-memory 20G \\\n  --num-executors 50 \\\n  http://path/to/examples.jar \\\n  1000\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:43.068Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":2,"totalLines":72,"estimatedTokens":2991}}340{"id":"doc-rag_with_permissions_supabase_docs-7f7610a4","source":"documentation","title":"RAG with Permissions | Supabase Docs","url":"https://supabase.com/docs/guides/ai/rag-with-permissions","text":"AI & VectorsLearnRAG with Permissions\n\nExample:\n```text\n1-- Track documents/pages/files/etc2create table documents (3  id bigint primary key generated always as identity,4  name text not null,5  owner_id uuid not null references auth.users (id) default auth.uid(),6  created_at timestamp with time zone not null default now()7);89-- Store the content and embedding vector for each section in the document10-- with a reference to original document (one-to-many)11create table document_sections (12  id bigint primary key generated always as identity,13  document_id bigint not null references documents (id),14  content text not null,15  embedding extensions.vector (384)16);\n```\n\nExample:\n```text\n1-- Grant the privileges the roles need2GRANT SELECT ON public.document_sections TO authenticated;34-- enable row level security5alter table document_sections enable row level security;67-- setup RLS for select operations8create policy \"Users can query their own document sections\"9on document_sections for select to authenticated using (10  document_id in (11    select id12    from documents13    where (owner_id = (select auth.uid()))14  )15);\n```\n\nExample:\n```text\n1select * from document_sections;\n```\n\nExample:\n```text\n1-- Perform inner product similarity based on a match_threshold2select *3from document_sections4where document_sections.embedding <#> embedding < -match_threshold5order by document_sections.embedding <#> embedding;\n```\n\nExample:\n```text\n1create table document_owners (2  id bigint primary key generated always as identity,3  owner_id uuid not null references auth.users (id) default auth.uid(),4  document_id bigint not null references documents (id)5);\n```\n\nExample:\n```text\n1create policy \"Users can query their own document sections\"2on document_sections for select to authenticated using (3  document_id in (4    select document_id5    from document_owners6    where (owner_id = (select auth.uid()))7  )8);\n```\n\nExample:\n```text\n1create table public.users (2  id bigint primary key generated always as identity,3  email text not null,4  created_at timestamp with time zone not null default now()5);67create table public.documents (8  id bigint primary key generated always as identity,9  name text not null,10  owner_id bigint not null references public.users (id),11  created_at timestamp with time zone not null default now()12);\n```\n\nExample:\n```text\n1create schema external;2create extension postgres_fdw with schema extensions;34-- Setup the foreign server5create server foreign_server6  foreign data wrapper postgres_fdw7  options (host '<db-host>', port '<db-port>', dbname '<db-name>');89-- Map local 'authenticated' role to external 'postgres' user10create user mapping for authenticated11  server foreign_server12  options (user 'postgres', password '<user-password>');1314-- Import foreign 'users' and 'documents' tables into 'external' schema15import foreign schema public limit to (users, documents)16  from server foreign_server into external;\n```\n\nExample:\n```text\n1create table document_sections (2  id bigint primary key generated always as identity,3  document_id bigint not null,4  content text not null,5  embedding extensions.vector (384)6);\n```\n\nExample:\n```text\n1-- enable row level security2alter table document_sections enable row level security;34-- setup RLS for select operations5create policy \"Users can query their own document sections\"6on document_sections for select to authenticated using (7  document_id in (8    select id9    from external.documents10    where owner_id = current_setting('app.current_user_id')::bigint11  )12);\n```\n\nExample:\n```text\n1set app.current_user_id = '<current-user-id>';\n```\n\nExample:\n```text\n1-- Only document sections owned by the user are returned2select *3from document_sections4where document_sections.embedding <#> embedding < -match_threshold5order by document_sections.embedding <#> embedding;\n```\n\nExample:\n```text\n1-- enable row level security2alter table document_sections enable row level security;34-- setup RLS for select operations5create policy \"Users can query their own document sections\"6on document_sections for select to authenticated using (7  document_id in (8    select id9    from documents10    where (owner_id = (select auth.uid()))11  )12);\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:44.210Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":13,"totalLines":68,"estimatedTokens":1069}}341{"id":"doc-python_client_supabase_docs-d6689c0d","source":"documentation","title":"Python client | Supabase Docs","url":"https://supabase.com/docs/guides/ai/vecs-python-client","text":"AI & VectorsPython ExamplesDeveloping locally with Vecs\n\nExample:\n```text\n1# Initialize your project2supabase init34# Start Postgres5supabase start\n```\n\nExample:\n```text\n1import vecs23# create vector store client4vx = vecs.create_client(\"postgresql://postgres:postgres@localhost:54322/postgres\")56# create a collection of vectors with 3 dimensions7docs = vx.get_or_create_collection(name=\"docs\", dimension=3)\n```\n\nExample:\n```text\n1import vecs23# create vector store client4docs = vecs.get_or_create_collection(name=\"docs\", dimension=3)56# a collection of vectors with 3 dimensions7vectors=[8  (\"vec0\", [0.1, 0.2, 0.3], {\"year\": 1973}),9  (\"vec1\", [0.7, 0.8, 0.9], {\"year\": 2012})10]1112# insert our vectors13docs.upsert(vectors=vectors)\n```\n\nExample:\n```text\n1import vecs23docs = vecs.get_or_create_collection(name=\"docs\", dimension=3)45# query the collection filtering metadata for \"year\" = 20126docs.query(7    data=[0.4,0.5,0.6],      # required8    limit=1,                         # number of records to return9    filters={\"year\": {\"$eq\": 2012}}, # metadata filters10)\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:44.224Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":4,"totalLines":23,"estimatedTokens":274}}342{"id":"doc-getting_started_with_edge_functions_supabase_doc-0bea8eae","source":"documentation","title":"Getting Started with Edge Functions | Supabase Docs","url":"https://supabase.com/docs/guides/functions/quickstart","text":"Edge FunctionsGetting startedQuickstart (CLI)\n\nExample:\n```text\n1mkdir my-edge-functions-project2cd my-edge-functions-project3supabase init\n```\n\nExample:\n```text\n1cd your-existing-project2supabase init # Initialize Supabase, if you haven't already\n```\n\nExample:\n```text\n1supabase functions new hello-world\n```\n\nExample:\n```text\n1export default {2  fetch: withSupabase({ auth: ['publishable', 'secret'] }, async (req, ctx) => {3    const { name } = await req.json()45    return Response.json({6      message: `Hello ${name}!`,7    })8  }),9}\n```\n\nExample:\n```text\n1supabase start  # Start all Supabase services2supabase functions serve hello-world\n```\n\nExample:\n```text\n1curl -i --location --request POST 'http://127.0.0.1:54321/functions/v1/hello-world' \\2    --header 'apiKey: <SUPABASE_PUBLISHABLE_KEY>' \\3    --data '{\"name\":\"Functions\"}'\n```\n\nExample:\n```text\n1{ \"message\": \"Hello Functions!\" }\n```\n\nExample:\n```text\n1supabase login\n```\n\nExample:\n```text\n1supabase projects list\n```\n\nExample:\n```text\n1supabase link --project-ref [YOUR_PROJECT_ID]\n```\n\nExample:\n```text\n1supabase functions deploy hello-world\n```\n\nExample:\n```text\n1supabase functions deploy\n```\n\nExample:\n```text\n1supabase functions deploy hello-world --use-api\n```\n\nExample:\n```text\n1curl --request POST 'https://[YOUR_PROJECT_ID].supabase.co/functions/v1/hello-world' \\2  --header 'apikey: <SUPABASE_PUBLISHABLE_KEY>' \\3  --header 'Content-Type: application/json' \\4  --data '{\"name\":\"Production\"}'\n```\n\nExample:\n```text\n1{ \"message\": \"Hello Production!\" }\n```\n\nExample:\n```text\n1import { createClient } from '@supabase/supabase-js'23const supabase = createClient('https://[YOUR_PROJECT_ID].supabase.co', 'YOUR_PUBLISHABLE_KEY')45const { data, error } = await supabase.functions.invoke('hello-world', {6  body: { name: 'JavaScript' },7})89console.log(data) // { message: \"Hello JavaScript!\" }\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:44.230Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":16,"totalLines":83,"estimatedTokens":471}}343{"id":"doc-regional_invocations_supabase_docs-106a3c97","source":"documentation","title":"Regional Invocations | Supabase Docs","url":"https://supabase.com/docs/guides/functions/regional-invocation","text":"Edge FunctionsPlatformRegional invocations\n\nExample:\n```text\n1import { createClient, FunctionRegion } from '@supabase/supabase-js'23const { data, error } = await supabase.functions.invoke('function-name', {4  ...5  region: FunctionRegion.UsEast1, // Execute in us-east-1 region6})\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:44.233Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":1,"totalLines":8,"estimatedTokens":75}}344{"id":"doc-generating_og_images_supabase_docs-9addc2ea","source":"documentation","title":"Generating OG Images | Supabase Docs","url":"https://supabase.com/docs/guides/functions/examples/og-image","text":"Edge FunctionsExamplesGenerating OG images\n\nExample:\n```text\n1import { ImageResponse } from 'npm:@vercel/og@^0'2import React from 'npm:react@^19'34export default function handler(req: Request) {5  return new ImageResponse(6    <div7      style={{8        width: '100%',9        height: '100%',10        display: 'flex',11        alignItems: 'center',12        justifyContent: 'center',13        fontSize: 128,14        background: 'lavender',15      }}16    >17      Hello OG Image!18    </div>19  )20}\n```\n\nExample:\n```text\n1import { withSupabase } from 'npm:@supabase/server@^1'23import handler from './handler.tsx'45console.log('Hello from og-image Function!')67// Public image endpoint, so deploy with --no-verify-jwt.8export default { fetch: withSupabase({ auth: 'none' }, handler) }\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:44.234Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":2,"totalLines":13,"estimatedTokens":202}}345{"id":"doc-update_your_self_hosted_deployment_supabase_docs-23f9e612","source":"documentation","title":"Update Your Self-Hosted Deployment | Supabase Docs","url":"https://supabase.com/docs/guides/self-hosting/updating","text":"Self-HostingUpdate your deployment\n\nExample:\n```text\n1curl -fsSL https://raw.githubusercontent.com/supabase/supabase/master/docker/update.sh -o update.sh\n```\n\nExample:\n```text\n1sh update.sh --dry-run\n```\n\nExample:\n```text\n1sh update.sh\n```\n\nExample:\n```text\n1sh run.sh pull2sh run.sh recreate\n```\n\nExample:\n```text\n1<<<<<<< yours (docker-compose.yml)2      image: supabase/studio:your-pinned-tag3=======4      image: supabase/studio:new-tag5>>>>>>> new (self-hosted/v0.7.0)\n```\n\nExample:\n```text\n1curl -fsSL https://raw.githubusercontent.com/supabase/supabase/self-hosted/v0.7.0/docker/run.sh > run.sh\n```\n\nExample:\n```text\n1git -C ./supabase show self-hosted/v0.7.0:docker/run.sh > run.sh\n```\n\nExample:\n```text\n1sh update.sh --to self-hosted/v0.7.0\n```\n\nExample:\n```text\n1git clone --filter=blob:none https://github.com/supabase/supabase2cd supabase34# Browse docker/ history, newest first, as \"date short-hash subject\":5git log --date=short --format='%ad %h %s' -- docker67# Expand the short hash you picked into the full SHA update.sh needs:8git rev-parse <short-hash>\n```\n\nExample:\n```text\n1printf 'ref=<full-40-char-sha>\\n' > .supabase-version\n```\n\nExample:\n```text\n1printf 'ref=self-hosted/v0.7.0\\n' > .supabase-version\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:44.239Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":11,"totalLines":58,"estimatedTokens":311}}346{"id":"doc-supabase_docs_troubleshooting_how_do_i_make_the_-9f09ac2f","source":"documentation","title":"Supabase Docs | Troubleshooting | How do I make the cookies HttpOnly?","url":"https://supabase.com/docs/guides/troubleshooting/how-do-i-make-the-cookies-httponly-vwweFx","text":"DOCSStartProducts Build Manage Reference Resources DOCSSearch docs...Ctrl KDOCSStartProducts Build Manage Reference Resources DOCSSearch docs...Ctrl KHow do I make the cookies HttpOnly?This is not necessary. Both the access token and refresh token are designed to be passed around to different components in your application. The browser-based side of your application needs access to the refresh token to properly maintain a browser session anyway.MetadataProductsAuthKeywordscookiesHttpOnlyIs this helpful? No Yes View discussion on GitHubNeed some help?Contact supportLatest product updates?See ChangelogSomething's not right?Check system status© Supabase Inc—ContributingAuthor StyleguideOpen SourceSupaSquadPrivacy SettingsTwitterGitHubDiscordYoutube\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:44.283Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":0,"totalLines":3,"estimatedTokens":193}}347{"id":"doc-supabase_docs_troubleshooting_resolving_database-3336ff71","source":"documentation","title":"Supabase Docs | Troubleshooting | Resolving database hostname and managing your IP address","url":"https://supabase.com/docs/guides/troubleshooting/resolving-database-hostname-and-managing-your-ip-address-pVlwE0","text":"DOCSStartProducts Build Manage Reference Resources DOCSSearch docs...Ctrl KDOCSStartProducts Build Manage Reference Resources DOCSSearch docs...Ctrl KResolving database hostname and managing your IP addressFinding your database hostname# Your database's hostname is crucial for establishing a direct connection. It resolves to the underlying IP address of your database. To find your hostname, navigate to the dashboard and click Connect. Look at the Direct connection string and click the View parameters under it to see the hostname. Example Managing your IP address# To determine your current IP address, you can use an IP address lookup website or the terminal nslookup hostname and press Enter. This command queries the domain name servers to find the IP address of the given hostname. Example IPv6 :d014:1c06:5f0c:d7a9:8616:bee2:30df IPv6 address# Upon project creation, a static IPv6 address is assigned. However, it's essential to understand that this IPv6 address can change due to specific a project is paused or resumed. During database version upgrades. IPv4 address# Opting for the static IPv4 add-on provides a more stable connection address. The IPv4 address remains constant project is paused or resumed. Unlike the IPv6 address, upgrading your database does not affect the IPv4 address. MetadataProductsDatabaseKeywordshostnameipipv4ipv6Is this helpful? No Yes View discussion on GitHubNeed some help?Contact supportLatest product updates?See ChangelogSomething's not right?Check system status© Supabase Inc—ContributingAuthor StyleguideOpen SourceSupaSquadPrivacy SettingsTwitterGitHubDiscordYoutube\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:44.302Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":0,"totalLines":3,"estimatedTokens":408}}348{"id":"doc-remove_superuser_access_from_studio_supabase_doc-f513dc87","source":"documentation","title":"Remove Superuser Access from Studio | Supabase Docs","url":"https://supabase.com/docs/guides/self-hosting/remove-superuser-access","text":"Self-HostingHow-to GuidesRemove superuser access\n\nExample:\n```text\n1sh utils/reassign-owner.sh\n```\n\nExample:\n```text\n1studio:2  environment:3    POSTGRES_USER_READ_WRITE: postgres\n```\n\nExample:\n```text\n1meta:2  environment:3    PG_META_DB_USER: postgres\n```\n\nExample:\n```text\n1sh run.sh recreate\n```\n\nExample:\n```text\n1select current_user;2-- expected result: postgres\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:44.316Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":5,"totalLines":28,"estimatedTokens":97}}349{"id":"doc-supabase_docs_troubleshooting_cloudflare_origin_-87fcda22","source":"documentation","title":"Supabase Docs | Troubleshooting | 'Cloudflare Origin Error 1016' on Custom Domain","url":"https://supabase.com/docs/guides/troubleshooting/cloudflare-origin-error-1016-on-custom-domain-a57af4","text":"DOCSStartProducts Build Manage Reference Resources DOCSSearch docs...Ctrl KDOCSStartProducts Build Manage Reference Resources DOCSSearch docs...Ctrl K'Cloudflare Origin Error 1016' on Custom DomainWhen encountering a 'Cloudflare Origin Error 1016' when accessing a custom domain URL, it indicates an SSL certificate validation failure. This error typically occurs because the custom domain's SSL certificate has expired, leading Cloudflare to deactivate routing to the origin server. How to resolve this issue# Navigate to your project's custom domain settings. Initiate a DNS record re-verification. This action prompts an attempt to renew the SSL certificate. If the error persists after re-verification, remove the custom domain configuration from your project. Re-add the custom domain configuration. Ensure all DNS records are correctly established as instructed by the dashboard. This process forces a hard reset and triggers a new certificate request. MetadataProductsPlatformRelated error codes10160Is this helpful? No Yes Need some help?Contact supportLatest product updates?See ChangelogSomething's not right?Check system status© Supabase Inc—ContributingAuthor StyleguideOpen SourceSupaSquadPrivacy SettingsTwitterGitHubDiscordYoutube\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:44.322Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":0,"totalLines":3,"estimatedTokens":315}}350{"id":"doc-supabase_docs_troubleshooting_can_t_access_supab-c9d7d19d","source":"documentation","title":"Supabase Docs | Troubleshooting | Can’t Access Supabase Project When Using Lovable Cloud","url":"https://supabase.com/docs/guides/troubleshooting/cant-access-supabase-project-lovable-cloud","text":"DOCSStartProducts Build Manage Reference Resources DOCSSearch docs...Ctrl KDOCSStartProducts Build Manage Reference Resources DOCSSearch docs...Ctrl KCan’t Access Supabase Project When Using Lovable CloudProblem# Your Lovable project has Lovable Cloud enabled, and you’re trying to connect directly to your Supabase project. However, you don’t see the project listed on your Supabase Dashboard, or you’re unable to access it through your Supabase account. Why this occurs# When you create a project connected to Lovable Cloud, the underlying Supabase instance is provisioned and managed entirely by Lovable. These projects are not owned by your Supabase account, so they don't appear on your Supabase Dashboard or be accessible using your Supabase credentials. How to diagnose# You might be affected by this recently created a project on Lovable and enabled the backend from the chat interface. By default, the Lovable platform uses Lovable Cloud for backend hosting. You see Supabase references in your project’s configuration but can’t access the project from your Supabase Dashboard. The project ID or credentials used in your Lovable setup don’t match any project under your Supabase account. How to fix# There is no automated way to transfer a Supabase project from Lovable Cloud to your own Supabase account. However, you can manually clone your project backend and migrate your data following Lovable’s official Guide (Lovable Docs) This process allows you to create a new Supabase project under your own account and connect it independently. There are certain limitations described in Lovable’s documentation, so review the guide carefully before proceeding. How to prevent# If you want direct access to your Supabase project from the start, make sure enabling Lovable Cloud if you plan to manage your Supabase project independently. Create your project directly from the Supabase Dashboard and then manually connect your Lovable project to your Supabase project, or start your Lovable project already connected to your own Supabase project from the beginning. Additional resources# For more information, read the Lovable Cloud FAQ Frequently asked questions# Can I get access to the Supabase SQL editor when using Lovable Cloud?Why doesn't my Supabase project appear on my dashboard?Can I disconnect my project from Lovable Cloud and connect it to my own Supabase account?I can't get my database URL to connect from an external tool (like BI tools or Postgres connectors).I can't get my service role key to integrate an external service (like n8n or Make.com).MetadataProductsAiKeywordslovablelovable cloudIs this helpful? No Yes Need some help?Contact supportLatest product updates?See ChangelogSomething's not right?Check system status© Supabase Inc—ContributingAuthor StyleguideOpen SourceSupaSquadPrivacy SettingsTwitterGitHubDiscordYoutube\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:44.327Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":0,"totalLines":3,"estimatedTokens":717}}351{"id":"doc-under_the_hood_webpack-16eb6a22","source":"documentation","title":"Under The Hood | webpack","url":"https://webpack.js.org/concepts/under-the-hood/","text":"Example:\n```js\nimport app from \"./app.js\";\n```\n\nExample:\n```js\nexport default \"the app\";\n```\n\nExample:\n```js\nexport default {\n  entry: \"./index.js\",\n};\n```\n\nExample:\n```js\nexport default {\n  entry: {\n    home: \"./home.js\",\n    about: \"./about.js\",\n  },\n};\n```\n\nExample:\n```js\nexport default {\n  entry: \"./src/index.jsx\",\n};\n```\n\nExample:\n```jsx\nimport { createRoot } from \"react-dom/client\";\n\nimport(\"./app.jsx\").then((App) => {\n  const root = createRoot(document.getElementById(\"root\"));\n  root.render(<App />);\n});\n```\n\nExample:\n```jsx\nimport(\n  /* webpackChunkName: \"app\" */\n  \"./app.jsx\"\n).then((App) => {\n  const root = createRoot(document.getElementById(\"root\"));\n  root.render(<App />);\n});\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:53.975Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":7,"totalLines":56,"estimatedTokens":179}}352{"id":"doc-app_navigation_sveltekit_docs-1c0b2065","source":"documentation","title":"$app/navigation • SvelteKit Docs","url":"https://svelte.dev/docs/kit/$app-navigation","text":"Example:\n```text\nimport {\n\tfunction afterNavigate(callback: (navigation: import(\"@sveltejs/kit\").AfterNavigate) => void): voidA lifecycle function that runs the supplied callback when the current component mounts, and also whenever we navigate to a URL.\nafterNavigate must be called during a component initialization. It remains active as long as the component is mounted.\nafterNavigate,\n\tfunction beforeNavigate(callback: (navigation: import(\"@sveltejs/kit\").BeforeNavigate) => void): voidA navigation interceptor that triggers before we navigate to a URL, whether by clicking a link, calling goto(...), or using the browser back/forward controls.\nCalling cancel() will prevent the navigation from completing. If navigation.type === 'leave' — meaning the user is navigating away from the app (or closing the tab) — calling cancel will trigger the native browser unload confirmation dialog. In this case, the navigation may or may not be cancelled depending on the user’s response.\nWhen a navigation isn’t to a SvelteKit-owned route (and therefore controlled by SvelteKit’s client-side router), navigation.to.route.id will be null.\nIf the navigation will (if not cancelled) cause the document to unload — in other words 'leave' navigations and 'link' navigations where navigation.to.route === null — navigation.willUnload is true.\nbeforeNavigate must be called during a component initialization. It remains active as long as the component is mounted.\nbeforeNavigate,\n\tfunction disableScrollHandling(): voidIf called when the page is being updated following a navigation (in onMount or afterNavigate or an action, for example), this disables SvelteKit’s built-in scroll handling.\nThis is generally discouraged, since it breaks user expectations.\ndisableScrollHandling,\n\tfunction goto(url: string | URL, opts?: {\n    replaceState?: boolean | undefined;\n    noScroll?: boolean | undefined;\n    keepFocus?: boolean | undefined;\n    invalidateAll?: boolean | undefined;\n    invalidate?: (string | URL | ((url: URL) => boolean))[] | undefined;\n    state?: App.PageState | undefined;\n}): Promise<void>Allows you to navigate programmatically to a given route, with options such as keeping the current element focused.\nReturns a Promise that resolves when SvelteKit navigates (or fails to navigate, in which case the promise rejects) to the specified url.\nFor external URLs, use window.location = url instead of calling goto(url).\n@paramurl Where to navigate to. Note that if you've set config.kit.paths.base and the URL is root-relative, you need to prepend the base path if you want to navigate within the app.@paramopts Options related to the navigationgoto,\n\tfunction invalidate(resource: string | URL | ((url: URL) => boolean)): Promise<void>Causes any load functions belonging to the currently active page to re-run if they depend on the url in question, via fetch or depends. Returns a Promise that resolves when the page is subsequently updated.\nIf the argument is given as a string or URL, it must resolve to the same URL that was passed to fetch or depends (including query parameters).\nTo create a custom identifier, use a string beginning with [a-z]+: (e.g. custom:state) — this is a valid URL.\nThe function argument can be used define a custom predicate. It receives the full URL and causes load to rerun if true is returned.\nThis can be useful if you want to invalidate based on a pattern instead of a exact match.\n// Example: Match '/path' regardless of the query parameters\nimport { function invalidate(resource: string | URL | ((url: URL) => boolean)): Promise<void>Causes any load functions belonging to the currently active page to re-run if they depend on the url in question, via fetch or depends. Returns a Promise that resolves when the page is subsequently updated.\nIf the argument is given as a string or URL, it must resolve to the same URL that was passed to fetch or depends (including query parameters).\nTo create a custom identifier, use a string beginning with [a-z]+: (e.g. custom:state) — this is a valid URL.\nThe function argument can be used define a custom predicate. It receives the full URL and causes load to rerun if true is returned.\nThis can be useful if you want to invalidate based on a pattern instead of a exact match.\n// Example: Match '/path' regardless of the query parameters\nimport { invalidate } from '$app/navigation';\n\ninvalidate((url) => url.pathname === '/path');@paramresource The invalidated URLreferenceinvalidate } from '$app/navigation';\n\nfunction invalidate(resource: string | URL | ((url: URL) => boolean)): Promise<void>Causes any load functions belonging to the currently active page to re-run if they depend on the url in question, via fetch or depends. Returns a Promise that resolves when the page is subsequently updated.\nIf the argument is given as a string or URL, it must resolve to the same URL that was passed to fetch or depends (including query parameters).\nTo create a custom identifier, use a string beginning with [a-z]+: (e.g. custom:state) — this is a valid URL.\nThe function argument can be used define a custom predicate. It receives the full URL and causes load to rerun if true is returned.\nThis can be useful if you want to invalidate based on a pattern instead of a exact match.\n// Example: Match '/path' regardless of the query parameters\nimport { invalidate } from '$app/navigation';\n\ninvalidate((url) => url.pathname === '/path');@paramresource The invalidated URLreferenceinvalidate((url: URLurl) => url: URLurl.URL.pathname: stringThe pathname property of the URL interface represents a location in a hierarchical structure. It is a string constructed from a list of path segments, each of which is prefixed by a / character.\nMDN Reference\npathname === '/path');@paramresource The invalidated URLinvalidate,\n\tfunction invalidateAll(): Promise<void>Causes all load and query functions belonging to the currently active page to re-run. Returns a Promise that resolves when the page is subsequently updated.\ninvalidateAll,\n\tfunction onNavigate(callback: (navigation: import(\"@sveltejs/kit\").OnNavigate) => MaybePromise<void | (() => void)>): voidA lifecycle function that runs the supplied callback immediately before we navigate to a new URL except during full-page navigations.\nIf you return a Promise, SvelteKit will wait for it to resolve before completing the navigation. This allows you to — for example — use document.startViewTransition. Avoid promises that are slow to resolve, since navigation will appear stalled to the user.\nIf a function (or a Promise that resolves to a function) is returned from the callback, it will be called once the DOM has updated.\nonNavigate must be called during a component initialization. It remains active as long as the component is mounted.\nonNavigate,\n\tfunction preloadCode(pathname: string): Promise<void>Programmatically imports the code for routes that haven’t yet been fetched.\nTypically, you might call this to speed up subsequent navigation.\nYou can specify routes by any matching pathname such as /about (to match src/routes/about/+page.svelte) or /blog/* (to match src/routes/blog/[slug]/+page.svelte).\nUnlike preloadData, this won’t call load functions.\nReturns a Promise that resolves when the modules have been imported.\npreloadCode,\n\tfunction preloadData(href: string): Promise<{\n    type: \"loaded\";\n    status: number;\n    data: Record<string, any>;\n} | {\n    type: \"redirect\";\n    location: string;\n}>Programmatically preloads the given page, which means\n\nensuring that the code for the page is loaded, and\ncalling the page’s load function with the appropriate options.\n\nThis is the same behaviour that SvelteKit triggers when the user taps or mouses over an <a> element with data-sveltekit-preload-data.\nIf the next navigation is to href, the values returned from load will be used, making navigation instantaneous.\nReturns a Promise that resolves with the result of running the new route’s load functions once the preload is complete.\n@paramhref Page to preloadpreloadData,\n\tfunction pushState(url: string | URL, state: App.PageState): voidProgrammatically create a new history entry with the given page.state. To use the current URL, you can pass '' as the first argument. Used for shallow routing.\npushState,\n\tfunction refreshAll({ includeLoadFunctions }?: {\n    includeLoadFunctions?: boolean;\n}): Promise<void>Causes all currently active remote functions to refresh, and all load functions belonging to the currently active page to re-run (unless disabled via the option argument).\nReturns a Promise that resolves when the page is subsequently updated.\nrefreshAll,\n\tfunction replaceState(url: string | URL, state: App.PageState): voidProgrammatically replace the current history entry with the given page.state. To use the current URL, you can pass '' as the first argument. Used for shallow routing.\nreplaceState\n} from '$app/navigation';function afterNavigate(callback: (navigation: import(\"@sveltejs/kit\").AfterNavigate) => void): voidcallbackafterNavigatefunction beforeNavigate(callback: (navigation: import(\"@sveltejs/kit\").BeforeNavigate) => void): voidgoto(...)cancel()navigation.type === 'leave'cancelnavigation.to.route.idnull'leave''link'navigation.to.route === nullnavigation.willUnloadtruebeforeNavigatefunction disableScrollHandling(): voidonMountafterNavigatefunction goto(url: string | URL, opts?: {\n    replaceState?: boolean | undefined;\n    noScroll?: boolean | undefined;\n    keepFocus?: boolean | undefined;\n    invalidateAll?: boolean | undefined;\n    invalidate?: (string | URL | ((url: URL) => boolean))[] | undefined;\n    state?: App.PageState | undefined;\n}): Promise<void>function goto(url: string | URL, opts?: {\n    replaceState?: boolean | undefined;\n    noScroll?: boolean | undefined;\n    keepFocus?: boolean | undefined;\n    invalidateAll?: boolean | undefined;\n    invalidate?: (string | URL | ((url: URL) => boolean))[] | undefined;\n    state?: App.PageState | undefined;\n}): Promise<void>urlwindow.location = urlgoto(url)config.kit.paths.basefunction invalidate(resource: string | URL | ((url: URL) => boolean)): Promise<void>loadurlfetchdependsPromisestringURLfetchdepends[a-z]+:custom:statefunctionURLloadtrue// Example: Match '/path' regardless of the query parameters\nimport { function invalidate(resource: string | URL | ((url: URL) => boolean)): Promise<void>Causes any load functions belonging to the currently active page to re-run if they depend on the url in question, via fetch or depends. Returns a Promise that resolves when the page is subsequently updated.\nIf the argument is given as a string or URL, it must resolve to the same URL that was passed to fetch or depends (including query parameters).\nTo create a custom identifier, use a string beginning with [a-z]+: (e.g. custom:state) — this is a valid URL.\nThe function argument can be used define a custom predicate. It receives the full URL and causes load to rerun if true is returned.\nThis can be useful if you want to invalidate based on a pattern instead of a exact match.\n// Example: Match '/path' regardless of the query parameters\nimport { invalidate } from '$app/navigation';\n\ninvalidate((url) => url.pathname === '/path');@paramresource The invalidated URLreferenceinvalidate } from '$app/navigation';\n\nfunction invalidate(resource: string | URL | ((url: URL) => boolean)): Promise<void>Causes any load functions belonging to the currently active page to re-run if they depend on the url in question, via fetch or depends. Returns a Promise that resolves when the page is subsequently updated.\nIf the argument is given as a string or URL, it must resolve to the same URL that was passed to fetch or depends (including query parameters).\nTo create a custom identifier, use a string beginning with [a-z]+: (e.g. custom:state) — this is a valid URL.\nThe function argument can be used define a custom predicate. It receives the full URL and causes load to rerun if true is returned.\nThis can be useful if you want to invalidate based on a pattern instead of a exact match.\n// Example: Match '/path' regardless of the query parameters\nimport { invalidate } from '$app/navigation';\n\ninvalidate((url) => url.pathname === '/path');@paramresource The invalidated URLreferenceinvalidate((url: URLurl) => url: URLurl.URL.pathname: stringThe pathname property of the URL interface represents a location in a hierarchical structure. It is a string constructed from a list of path segments, each of which is prefixed by a / character.\nMDN Reference\npathname === '/path');function invalidate(resource: string | URL | ((url: URL) => boolean)): Promise<void>loadurlfetchdependsPromisestringURLfetchdepends[a-z]+:custom:statefunctionURLloadtrue// Example: Match '/path' regardless of the query parameters\nimport { invalidate } from '$app/navigation';\n\ninvalidate((url) => url.pathname === '/path');function invalidate(resource: string | URL | ((url: URL) => boolean)): Promise<void>loadurlfetchdependsPromisestringURLfetchdepends[a-z]+:custom:statefunctionURLloadtrue// Example: Match '/path' regardless of the query parameters\nimport { invalidate } from '$app/navigation';\n\ninvalidate((url) => url.pathname === '/path');url: URLurl: URLURL.pathname: stringpathnamefunction invalidateAll(): Promise<void>loadqueryPromisefunction onNavigate(callback: (navigation: import(\"@sveltejs/kit\").OnNavigate) => MaybePromise<void | (() => void)>): voidcallbackPromisedocument.startViewTransitionPromiseonNavigatefunction preloadCode(pathname: string): Promise<void>/aboutsrc/routes/about/+page.svelte/blog/*src/routes/blog/[slug]/+page.sveltepreloadDataloadfunction preloadData(href: string): Promise<{\n    type: \"loaded\";\n    status: number;\n    data: Record<string, any>;\n} | {\n    type: \"redirect\";\n    location: string;\n}>function preloadData(href: string): Promise<{\n    type: \"loaded\";\n    status: number;\n    data: Record<string, any>;\n} | {\n    type: \"redirect\";\n    location: string;\n}><a>data-sveltekit-preload-datahrefloadfunction pushState(url: string | URL, state: App.PageState): voidpage.state''function refreshAll({ includeLoadFunctions }?: {\n    includeLoadFunctions?: boolean;\n}): Promise<void>function refreshAll({ includeLoadFunctions }?: {\n    includeLoadFunctions?: boolean;\n}): Promise<void>loadPromisefunction replaceState(url: string | URL, state: App.PageState): voidpage.state''\n```\n\nExample:\n```text\nfunction goto(url: string | URL, opts?: {\n    replaceState?: boolean | undefined;\n    noScroll?: boolean | undefined;\n    keepFocus?: boolean | undefined;\n    invalidateAll?: boolean | undefined;\n    invalidate?: (string | URL | ((url: URL) => boolean))[] | undefined;\n    state?: App.PageState | undefined;\n}): Promise<void>\n```\n\nExample:\n```text\n// Example: Match '/path' regardless of the query parameters\nimport { function invalidate(resource: string | URL | ((url: URL) => boolean)): Promise<void>Causes any load functions belonging to the currently active page to re-run if they depend on the url in question, via fetch or depends. Returns a Promise that resolves when the page is subsequently updated.\nIf the argument is given as a string or URL, it must resolve to the same URL that was passed to fetch or depends (including query parameters).\nTo create a custom identifier, use a string beginning with [a-z]+: (e.g. custom:state) — this is a valid URL.\nThe function argument can be used define a custom predicate. It receives the full URL and causes load to rerun if true is returned.\nThis can be useful if you want to invalidate based on a pattern instead of a exact match.\n// Example: Match '/path' regardless of the query parameters\nimport { invalidate } from '$app/navigation';\n\ninvalidate((url) => url.pathname === '/path');@paramresource The invalidated URLreferenceinvalidate } from '$app/navigation';\n\nfunction invalidate(resource: string | URL | ((url: URL) => boolean)): Promise<void>Causes any load functions belonging to the currently active page to re-run if they depend on the url in question, via fetch or depends. Returns a Promise that resolves when the page is subsequently updated.\nIf the argument is given as a string or URL, it must resolve to the same URL that was passed to fetch or depends (including query parameters).\nTo create a custom identifier, use a string beginning with [a-z]+: (e.g. custom:state) — this is a valid URL.\nThe function argument can be used define a custom predicate. It receives the full URL and causes load to rerun if true is returned.\nThis can be useful if you want to invalidate based on a pattern instead of a exact match.\n// Example: Match '/path' regardless of the query parameters\nimport { invalidate } from '$app/navigation';\n\ninvalidate((url) => url.pathname === '/path');@paramresource The invalidated URLreferenceinvalidate((url: URLurl) => url: URLurl.URL.pathname: stringThe pathname property of the URL interface represents a location in a hierarchical structure. It is a string constructed from a list of path segments, each of which is prefixed by a / character.\nMDN Reference\npathname === '/path');function invalidate(resource: string | URL | ((url: URL) => boolean)): Promise<void>loadurlfetchdependsPromisestringURLfetchdepends[a-z]+:custom:statefunctionURLloadtrue// Example: Match '/path' regardless of the query parameters\nimport { invalidate } from '$app/navigation';\n\ninvalidate((url) => url.pathname === '/path');function invalidate(resource: string | URL | ((url: URL) => boolean)): Promise<void>loadurlfetchdependsPromisestringURLfetchdepends[a-z]+:custom:statefunctionURLloadtrue// Example: Match '/path' regardless of the query parameters\nimport { invalidate } from '$app/navigation';\n\ninvalidate((url) => url.pathname === '/path');url: URLurl: URLURL.pathname: stringpathname\n```\n\nExample:\n```text\n// Example: Match '/path' regardless of the query parameters\nimport { invalidate } from '$app/navigation';\n\ninvalidate((url) => url.pathname === '/path');\n```\n\nExample:\n```text\nfunction preloadData(href: string): Promise<{\n    type: \"loaded\";\n    status: number;\n    data: Record<string, any>;\n} | {\n    type: \"redirect\";\n    location: string;\n}>\n```\n\nExample:\n```text\nfunction refreshAll({ includeLoadFunctions }?: {\n    includeLoadFunctions?: boolean;\n}): Promise<void>\n```\n\nExample:\n```text\nfunction afterNavigate(\n\tcallback: (\n\t\tnavigation: import('@sveltejs/kit').AfterNavigate\n\t) => void\n): void;\n```\n\nExample:\n```text\nfunction beforeNavigate(\n\tcallback: (\n\t\tnavigation: import('@sveltejs/kit').BeforeNavigate\n\t) => void\n): void;\n```\n\nExample:\n```text\nfunction disableScrollHandling(): void;\n```\n\nExample:\n```text\nfunction goto(\n\turl: string | URL,\n\topts?: {\n\t\treplaceState?: boolean | undefined;\n\t\tnoScroll?: boolean | undefined;\n\t\tkeepFocus?: boolean | undefined;\n\t\tinvalidateAll?: boolean | undefined;\n\t\tinvalidate?:\n\t\t\t| (string | URL | ((url: URL) => boolean))[]\n\t\t\t| undefined;\n\t\tstate?: App.PageState | undefined;\n\t}\n): Promise<void>;\n```\n\nExample:\n```text\nfunction invalidate(\n\tresource: string | URL | ((url: URL) => boolean)\n): Promise<void>;\n```\n\nExample:\n```text\nfunction invalidateAll(): Promise<void>;\n```\n\nExample:\n```text\nfunction onNavigate(\n\tcallback: (\n\t\tnavigation: import('@sveltejs/kit').OnNavigate\n\t) => MaybePromise<(() => void) | void>\n): void;\n```\n\nExample:\n```text\nfunction preloadCode(pathname: string): Promise<void>;\n```\n\nExample:\n```text\nfunction preloadData(href: string): Promise<\n\t| {\n\t\t\ttype: 'loaded';\n\t\t\tstatus: number;\n\t\t\tdata: Record<string, any>;\n\t  }\n\t| {\n\t\t\ttype: 'redirect';\n\t\t\tlocation: string;\n\t  }\n>;\n```\n\nExample:\n```text\nfunction pushState(\n\turl: string | URL,\n\tstate: App.PageState\n): void;\n```\n\nExample:\n```text\nfunction refreshAll({\n\tincludeLoadFunctions\n}?: {\n\tincludeLoadFunctions?: boolean;\n}): Promise<void>;\n```\n\nExample:\n```text\nfunction replaceState(\n\turl: string | URL,\n\tstate: App.PageState\n): void;\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:46.268Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":18,"totalLines":331,"estimatedTokens":4958}}353{"id":"doc-https_svelte_dev_docs_svelte_svelte_action_llms_-930f3c0e","source":"documentation","title":"https://svelte.dev/docs/svelte/svelte-action/llms.txt","url":"https://svelte.dev/docs/svelte/svelte-action/llms.txt","text":"= (node, param = { }) => { // ... } ``` `Action` and `Action` both signal that the action accepts no parameters. You can return an object with methods `update` and `destroy` from the function and type which additional attributes and events it has. See interface `ActionReturn` for more details. ```dts interface Action< Element = HTMLElement, Parameter = undefined, Attributes extends Record = Record< never, any > > {/*…*/} ``` ```dts ( ...args: undefined extends Parameter ? [node: Node, parameter?: Parameter] : [node: Node, ] ): void | ActionReturn; ``` ## ActionReturn Actions can return an object containing the two properties defined in this interface. Both are optional. - action can have a parameter. This method will be called whenever that parameter changes, immediately after Svelte has applied updates to the markup. `ActionReturn` and `ActionReturn` both mean that the action accepts no parameters. - that is called after the element is unmounted Additionally, you can specify which additional attributes and events the action enables on the applied element. This applies to TypeScript typings only and has no effect at runtime. Example usage: ```ts interface Attributes { newprop?: string; 'on:event': (e: CustomEvent) => void; } export function myAction(node: HTMLElement, ): ActionReturn { // ... return { update: (updatedParameter) => {...}, destroy: () => {...} }; } ``` ```dts interface ActionReturn< Parameter = undefined, Attributes extends Record = Record< never, any > > {/*…*/} ``` ```dts update?: (parameter: Parameter) => void; ``` ```dts destroy?: () => void; ```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:46.325Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":0,"totalLines":3,"estimatedTokens":402}}354{"id":"doc-https_svelte_dev_docs_svelte_svelte_motion_llms_-497b231c","source":"documentation","title":"https://svelte.dev/docs/svelte/svelte-motion/llms.txt","url":"https://svelte.dev/docs/svelte/svelte-motion/llms.txt","text":"[CALLOUT]\nAvailable since 5.8.0\n\n```dts class Spring {/*…*/} ``` ```dts constructor(value: T, options?: SpringOptions); ``` ```dts static of(fn: () => U, options?: SpringOptions): Spring; ``` Create a spring whose value is bound to the return value of `fn`. This must be called inside an effect root (for example, during component initialisation). ```svelte ``` ```dts set(value: T, options?: SpringUpdateOptions): Promise; ``` Sets `spring.target` to `value` and returns a `Promise` that resolves if and when `spring.current` catches up to it. If `options.instant` is `true`, `spring.current` immediately matches `spring.target`. If `options.preserveMomentum` is provided, the spring will continue on its current trajectory for the specified number of milliseconds. This is useful for things like 'fling' gestures. ```dts ``` ```dts ``` ```dts ``` ```dts ``` The end value of the spring. This property only exists on the `Spring` class, not the legacy `spring` store. ```dts get current(): T; ``` The current value of the spring. This property only exists on the `Spring` class, not the legacy `spring` store.\n\n## Tween Available since 5.8.0 A wrapper for a value that tweens smoothly to its target value. Changes to `tween.target` will cause `tween.current` to move towards it over time, taking account of the `delay`, `duration` and `easing` options. ```svelte ``` ```dts class Tween {/*…*/} ``` ```dts static of(fn: () => U, options?: TweenOptions | undefined): Tween; ``` Create a tween whose value is bound to the return value of `fn`. This must be called inside an effect root (for example, during component initialisation). ```svelte ``` ```dts constructor(value: T, options?: TweenOptions); ``` ```dts set(value: T, options?: TweenOptions | undefined): Promise; ``` Sets `tween.target` to `value` and returns a `Promise` that resolves if and when `tween.current` catches up to it. If `options` are provided, they will override the tween's defaults. ```dts get current(): T; ``` ```dts set target(v: T); ``` ```dts get target(): T; ``` ## prefersReducedMotion Available since 5.7.0 A [media query](/docs/svelte/svelte-reactivity#MediaQuery) that matches if the user [prefers reduced motion](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion). ```svelte visible = !visible}> toggle {#if visible} flies in, unless the user prefers reduced motion {/if} ``` ```dts const ``` ## spring Use [`Spring`](/docs/svelte/svelte-motion#Spring) instead The spring function in Svelte creates a store whose value is animated, with a motion that simulates the behavior of a spring. This means when the value changes, instead of transitioning at a steady rate, it \"bounces\" like a spring would, depending on the physics parameters provided. This adds a level of realism to the transitions and can enhance the user experience. ```dts function spring( value?: T | undefined, opts?: SpringOptions | undefined ): Spring; ``` ## tweened Use [`Tween`](/docs/svelte/svelte-motion#Tween) instead A tweened store in Svelte is a special type of store that provides smooth transitions between state values over time. ```dts function tweened( value?: T | undefined, defaults?: TweenOptions | undefined ): Tweened; ``` ## Spring ```dts interface Spring extends Readable {/*…*/} ``` ```dts set(new_value: T, opts?: SpringUpdateOptions): Promise; ``` ```dts update: (fn: Updater, opts?: SpringUpdateOptions) => Promise; ``` - deprecated Only exists on the legacy `spring` store, not the `Spring` class ```dts subscribe(fn: (value: T) => void): Unsubscriber; ``` - deprecated Only exists on the legacy `spring` store, not the `Spring` class ```dts ``` ```dts ``` ```dts ``` ## SpringOptions ```dts interface SpringOptions {/*…*/} ``` ```dts stiffness?: number; ``` ```dts damping?: number; ``` ```dts precision?: number; ``` ## SpringUpdateOptions ```dts interface SpringUpdateOptions {/*…*/} ``` ```dts hard?: any; ``` - deprecated Only use this for the spring store; does nothing when set on the Spring class ```dts soft?: string | number | boolean; ``` - deprecated Only use this for the spring store; does nothing when set on the Spring class ```dts instant?: boolean; ``` Only use this for the Spring class; does nothing when set on the spring store ```dts preserveMomentum?: number; ``` Only use this for the Spring class; does nothing when set on the spring store ## TweenOptions ```dts interface TweenOptions {/*…*/} ``` ```dts delay?: number; ``` ```dts duration?: number | ((from: T, ) => number); ``` ```dts easing?: (t: number) => number; ``` ```dts interpolate?: (a: T, ) => (t: number) => T; ``` ## Tweened ```dts interface Tweened extends Readable {/*…*/} ``` ```dts set(value: T, opts?: TweenOptions): Promise; ``` ```dts update(updater: Updater, opts?: TweenOptions): Promise; ``` ## Updater ```dts type Updater = (target_value: T, ) => T; ```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:46.326Z","totalSectionsIncluded":3,"totalCodeBlocksIncluded":0,"totalLines":8,"estimatedTokens":1220}}355{"id":"doc-https_svelte_dev_docs_svelte_svelte_store_llms_t-11e97f9e","source":"documentation","title":"https://svelte.dev/docs/svelte/svelte-store/llms.txt","url":"https://svelte.dev/docs/svelte/svelte-store/llms.txt","text":"```dts function derived( , fn: ( , set: (value: T) => void, update: (fn: Updater) => void ) => Unsubscriber | void, initial_value?: T | undefined ): Readable; ```\n\n```dts function derived( , fn: (values: StoresValues) => T, initial_value?: T | undefined ): Readable; ``` ## fromStore ```dts function fromStore(store: Writable): { }; ``` ```dts function fromStore(store: Readable): { readonly }; ``` ## get Get the current value from a store by subscribing and immediately unsubscribing. ```dts function get(store: Readable): T; ``` ## readable Creates a `Readable` store that allows reading by subscription. ```dts function readable( value?: T | undefined, start?: StartStopNotifier | undefined ): Readable; ``` ## readonly Takes a store and returns a new one derived from the old one that is readable. ```dts function readonly(store: Readable): Readable; ``` ## toStore ```dts function toStore( get: () => V, set: (v: V) => void ): Writable; ``` ```dts function toStore(get: () => V): Readable; ``` ## writable Create a `Writable` store that allows both updating and reading by subscription. ```dts function writable( value?: T | undefined, start?: StartStopNotifier | undefined ): Writable; ``` ## Readable Readable interface for subscribing. ```dts interface Readable {/*…*/} ``` ```dts subscribe(this: void, , invalidate?: () => void): Unsubscriber; ``` - `run` subscription callback - `invalidate` cleanup callback Subscribe on value changes. ## StartStopNotifier Start and stop notification callbacks. This function is called when the first subscriber subscribes. ```dts type StartStopNotifier = ( set: (value: T) => void, update: (fn: Updater) => void ) => void | (() => void); ``` ## Subscriber Callback to inform of a value updates. ```dts type Subscriber = (value: T) => void; ``` ## Unsubscriber Unsubscribes from value updates. ```dts type Unsubscriber = () => void; ``` ## Updater Callback to update a value. ```dts type Updater = (value: T) => T; ``` ## Writable Writable interface for both updating and subscribing. ```dts interface Writable extends Readable {/*…*/} ``` ```dts set(this: void, ): void; ``` - `value` to set Set value and inform subscribers. ```dts update(this: void, ): void; ``` - `updater` callback Update value using callback and inform subscribers.\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:46.332Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":0,"totalLines":5,"estimatedTokens":575}}356{"id":"doc-social_network_patterns_surrealdb-49458ff7","source":"documentation","title":"Social network patterns | SurrealDB","url":"https://surrealdb.com/docs/learn/data-models/graph/social-network-patterns","text":"Example:\n```text\n-- Create 4 'npc' records\nCREATE |npc:1..5|;\n\nFOR $npc IN SELECT * FROM npc {\n    -- Give each npc 20 random interactions\n    FOR $_ IN 0..20 {\n      -- Looks for a random NPC, use array::complement to filter out self\n      LET $counterpart = rand::enum(array::complement((SELECT *\n        FROM npc), [$npc]));\n      -- See if they have a relation yet\n      LET $existing = SELECT * FROM knows WHERE in = $npc.id\n        AND out = $counterpart.id;\n      -- If relation exists, increase 'greeted' by one\n      IF !!$existing {\n        UPDATE $existing SET greeted += 1;\n      -- Otherwise create the relation and set 'greeted' to 1\n      } ELSE {\n        RELATE $npc->knows->$counterpart SET greeted = 1;\n      }  \n    };\n};\n\nSELECT \n\tid, \n\t->knows.{ like_strength: greeted, with: out } AS relations\n\tFROM npc;\n```\n\nExample:\n```text\n[\n\t{\n\t\tid: npc:1,\n\t\trelations: [\n\t\t\t{\n\t\t\t\tlike_strength: 8,\n\t\t\t\twith: npc:3\n\t\t\t},\n\t\t\t{\n\t\t\t\tlike_strength: 8,\n\t\t\t\twith: npc:4\n\t\t\t},\n\t\t\t{\n\t\t\t\tlike_strength: 4,\n\t\t\t\twith: npc:2\n\t\t\t}\n\t\t]\n\t},\n\t{\n\t\tid: npc:2,\n\t\trelations: [\n\t\t\t{\n\t\t\t\tlike_strength: 10,\n\t\t\t\twith: npc:1\n\t\t\t},\n\t\t\t{\n\t\t\t\tlike_strength: 4,\n\t\t\t\twith: npc:3\n\t\t\t},\n\t\t\t{\n\t\t\t\tlike_strength: 6,\n\t\t\t\twith: npc:4\n\t\t\t}\n\t\t]\n\t},\n\t{\n\t\tid: npc:3,\n\t\trelations: [\n\t\t\t{\n\t\t\t\tlike_strength: 6,\n\t\t\t\twith: npc:2\n\t\t\t},\n\t\t\t{\n\t\t\t\tlike_strength: 3,\n\t\t\t\twith: npc:4\n\t\t\t},\n\t\t\t{\n\t\t\t\tlike_strength: 11,\n\t\t\t\twith: npc:1\n\t\t\t}\n\t\t]\n\t},\n\t{\n\t\tid: npc:4,\n\t\trelations: [\n\t\t\t{\n\t\t\t\tlike_strength: 7,\n\t\t\t\twith: npc:1\n\t\t\t},\n\t\t\t{\n\t\t\t\tlike_strength: 6,\n\t\t\t\twith: npc:3\n\t\t\t},\n\t\t\t{\n\t\t\t\tlike_strength: 7,\n\t\t\t\twith: npc:2\n\t\t\t}\n\t\t]\n\t}\n]\n```\n\nExample:\n```text\n-- Create 4 'npc' records\nCREATE |npc:1..5|;\n\nFOR $npc IN SELECT * FROM npc {\n    -- Give each npc 20 random interactions\n    FOR $_ IN 0..20 {\n      -- Looks for a random NPC, use array::complement to filter out self\n      LET $counterpart = rand::enum(array::complement((SELECT *\n        FROM npc), [$npc]));\n      RELATE $npc->greeted->$counterpart;\n    };\n};\n\nSELECT \n\tcount() AS like_strength, \n\tin AS npc, \n\tout AS counterpart\nFROM greeted\nGROUP BY npc, counterpart;\n```\n\nExample:\n```text\n[\n\t{\n\t\tcounterpart: npc:2,\n\t\tlike_strength: 6,\n\t\tnpc: npc:1\n\t},\n\t{\n\t\tcounterpart: npc:3,\n\t\tlike_strength: 9,\n\t\tnpc: npc:1\n\t},\n\t{\n\t\tcounterpart: npc:4,\n\t\tlike_strength: 5,\n\t\tnpc: npc:1\n\t},\n\t{\n\t\tcounterpart: npc:1,\n\t\tlike_strength: 9,\n\t\tnpc: npc:2\n\t},\n\t{\n\t\tcounterpart: npc:3,\n\t\tlike_strength: 6,\n\t\tnpc: npc:2\n\t},\n\t{\n\t\tcounterpart: npc:4,\n\t\tlike_strength: 5,\n\t\tnpc: npc:2\n\t},\n\t{\n\t\tcounterpart: npc:1,\n\t\tlike_strength: 10,\n\t\tnpc: npc:3\n\t},\n\t{\n\t\tcounterpart: npc:2,\n\t\tlike_strength: 7,\n\t\tnpc: npc:3\n\t},\n\t{\n\t\tcounterpart: npc:4,\n\t\tlike_strength: 3,\n\t\tnpc: npc:3\n\t},\n\t{\n\t\tcounterpart: npc:1,\n\t\tlike_strength: 6,\n\t\tnpc: npc:4\n\t},\n\t{\n\t\tcounterpart: npc:2,\n\t\tlike_strength: 4,\n\t\tnpc: npc:4\n\t},\n\t{\n\t\tcounterpart: npc:3,\n\t\tlike_strength: 10,\n\t\tnpc: npc:4\n\t}\n]\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:45.231Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":4,"totalLines":194,"estimatedTokens":720}}357{"id":"doc-livequery_surrealdb-a926ccbd","source":"documentation","title":"LiveQuery | SurrealDB","url":"https://surrealdb.com/docs/reference/dotnet/methods/live-query","text":"Example:\n```text\nawait db.LiveQuery<T>(sql)\n```\n\nExample:\n```text\nconst string table = \"person\"; \nawait using var liveQuery = await db.LiveQuery<Person>($\"LIVE SELECT * FROM type::table({table});\");\n\n// Consume the live query...\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:45.238Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":2,"totalLines":14,"estimatedTokens":62}}358{"id":"doc-rawquery_surrealdb-730083f2","source":"documentation","title":"RawQuery | SurrealDB","url":"https://surrealdb.com/docs/reference/dotnet/methods/raw-query","text":"Example:\n```text\nawait db.RawQuery(sql, params)\n```\n\nExample:\n```text\n// Assign the variable on the connection\nvar @params = new Dictionary<string, object> { { \"table\",\n    \"person\" } };\nvar result = await db.RawQuery(\"CREATE person; SELECT * FROM type::table($table);\", @params);\n\n// Get the first result from the first query\nvar created = result.GetValue<Person>(0);\n\n// Get all of the results from the second query\nvar people = result.GetValue<List<Person>>(1);\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:45.239Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":2,"totalLines":20,"estimatedTokens":121}}359{"id":"doc-sample_queries_surrealdb-f323237a","source":"documentation","title":"Sample queries | SurrealDB","url":"https://surrealdb.com/docs/learn/querying/gql/sample-queries","text":"Example:\n```text\neval::gql(\"MATCH (n:person) RETURN n.name AS name ORDER BY name\");\n-- [{ name: 'A' }, { name: 'B' }, { name: 'C' }]\n```\n\nExample:\n```text\nMATCH (n:person) RETURN n.name AS name ORDER BY name\n```\n\nExample:\n```text\ncurl -sS -X POST -u \"root:secret\" \\\n  -H \"Surreal-NS: main\" -H \"Surreal-DB: main\" \\\n  -H \"Accept: application/json\" -H \"Content-Type: text/plain\" \\\n  -d 'MATCH (n:person) RETURN n.name AS name ORDER BY name' \\\n  http://localhost:8000/gql\n```\n\nExample:\n```text\n[\n\t{ \"name\": \"A\" },\n\t{ \"name\": \"B\" },\n\t{ \"name\": \"C\" }\n]\n```\n\nExample:\n```text\nMATCH (a:person)-[k:knows]->(b:person)\nWHERE k.since > 2020\nRETURN a.name, b.name\nORDER BY a.name\n```\n\nExample:\n```text\ncurl -sS -X POST -u \"root:secret\" \\\n  -H \"Surreal-NS: main\" -H \"Surreal-DB: main\" \\\n  -H \"Accept: application/json\" -H \"Content-Type: text/plain\" \\\n  -d 'MATCH (a:person)-[k:knows]->(b:person) WHERE k.since > 2020 RETURN a.name, b.name ORDER BY a.name' \\\n  http://localhost:8000/gql\n```\n\nExample:\n```text\n[\n\t{ \"a.name\": \"A\", \"b.name\": \"B\" }\n]\n```\n\nExample:\n```text\nMATCH (a:person)\nOPTIONAL MATCH (a)-[k:knows]->(b:city)\nRETURN a.name AS name, b.name AS city\nORDER BY name\n```\n\nExample:\n```text\ncurl -sS -X POST -u \"root:secret\" \\\n  -H \"Surreal-NS: main\" -H \"Surreal-DB: main\" \\\n  -H \"Accept: application/json\" -H \"Content-Type: text/plain\" \\\n  -d 'MATCH (a:person) OPTIONAL MATCH (a)-[k:knows]->(b:city) RETURN a.name AS name, b.name AS city ORDER BY name' \\\n  http://localhost:8000/gql\n```\n\nExample:\n```text\n[\n\t{ \"name\": \"A\", \"city\": \"London\" },\n\t{ \"name\": \"B\", \"city\": null },\n\t{ \"name\": \"C\", \"city\": null }\n]\n```\n\nExample:\n```text\nMATCH (a:person)-[:knows]->(b:person)\nRETURN a.name AS name, count(*) AS c\nGROUP BY a.name\nORDER BY name\n```\n\nExample:\n```text\ncurl -sS -X POST -u \"root:secret\" \\\n  -H \"Surreal-NS: main\" -H \"Surreal-DB: main\" \\\n  -H \"Accept: application/json\" -H \"Content-Type: text/plain\" \\\n  -d 'MATCH (a:person)-[:knows]->(b:person) RETURN a.name AS name, count(*) AS c GROUP BY a.name ORDER BY name' \\\n  http://localhost:8000/gql\n```\n\nExample:\n```text\n[\n\t{ \"name\": \"A\", \"c\": 1 },\n\t{ \"name\": \"B\", \"c\": 2 },\n\t{ \"name\": \"C\", \"c\": 1 }\n]\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:45.244Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":13,"totalLines":106,"estimatedTokens":541}}360{"id":"doc-module_architecture_surrealdb-b10a35a4","source":"documentation","title":"Module architecture | SurrealDB","url":"https://surrealdb.com/docs/learn/extensions/guides/module-architecture","text":"Example:\n```text\nsurreal start --lazy-surrealism\n```\n\nExample:\n```text\nSURREAL_LAZY_SURREALISM=true surreal start\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:45.251Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":2,"totalLines":11,"estimatedTokens":33}}361{"id":"doc-table_surrealdb-e637eea1","source":"documentation","title":"Table | SurrealDB","url":"https://surrealdb.com/docs/reference/golang/api/values/table","text":"Example:\n```text\ntype Table string\n```\n\nExample:\n```text\ns := table.String()\n```\n\nExample:\n```text\nimport \"github.com/surrealdb/surrealdb.go/pkg/models\"\n\npersons, err := surrealdb.Select[[]Person](ctx, db, models.Table(\"persons\"))\n\n_, err = surrealdb.Insert[Person](ctx, db, models.Table(\"persons\"), data)\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:45.253Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":3,"totalLines":20,"estimatedTokens":81}}362{"id":"doc-query_builders_surrealdb-c28293d9","source":"documentation","title":"Query builders | SurrealDB","url":"https://surrealdb.com/docs/reference/mojo/concepts/query-builders","text":"Example:\n```text\nvar qb = client.select_builder(\"person\")\n    .fields(\"id, name, age\")\n    .where_clause(\"age >= 18\")\n    .order_by(\"age DESC\")\n    .limit(20)\n\nvar resp = client.query_select(qb)\n```\n\nExample:\n```text\nvar qb = client.select_builder(\"person\")\n    .fields(\"name, age\")\n    .where_clause(\"age >= 18\")\n    .limit(10)\n\nprint(qb.build())  # SELECT name, age FROM person WHERE age >= 18 LIMIT 10;\n```\n\nExample:\n```text\nvar cb = client.create_builder(\"person\").content('{ \"name\": \"Chiru\" }')\nvar resp = client.query(cb.build())\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:45.255Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":3,"totalLines":28,"estimatedTokens":139}}363{"id":"doc-codecs_surrealdb-cebe00d1","source":"documentation","title":"Codecs | SurrealDB","url":"https://surrealdb.com/docs/reference/javascript/concepts/codecs","text":"Example:\n```text\nimport { Surreal } from 'surrealdb';\n\nconst db = new Surreal({\n    codecOptions: {\n        useNativeDates: true,\n    },\n});\n```\n\nExample:\n```text\nimport { CborCodec, JsonCodec, type CodecOptions } from '@surrealdb/sqon';\nimport { Surreal } from 'surrealdb';\n\nconst db = new Surreal({\n    codecOptions: {\n        valueDecodeVisitor: (value) => {\n            // Transform decoded values before they reach your application\n            return value;\n        },\n    },\n    codecs: {\n        cbor: (options: CodecOptions) => new CborCodec(options),\n        json: (options: CodecOptions) => new JsonCodec(options),\n    },\n});\n```\n\nExample:\n```text\nbun add @surrealdb/sqon\n```\n\nExample:\n```text\nimport { CborCodec, RecordId, Decimal, Duration } from '@surrealdb/sqon';\n\nconst codec = new CborCodec({\n\t// optional options\n});\n\nconst payload = {\n    id: new RecordId('order', 42),\n    total: new Decimal('99.95'),\n    sla: Duration.parse('24h'),\n};\n\nconst bytes = codec.encode(payload);\nconst restored = codec.decode<typeof payload>(bytes);\n\nconsole.log(restored.id instanceof RecordId); // true\nconsole.log(restored.total instanceof Decimal); // true\n```\n\nExample:\n```text\nimport { JsonCodec, RecordId, DateTime } from '@surrealdb/sqon';\n\nconst codec = new JsonCodec({\n\t// optional options\n});\n\nconst value = {\n    created: DateTime.parse('2024-01-15T12:00:00.123456789Z'),\n    author: new RecordId('user', 'tobie'),\n};\n\nconst sqonJson = codec.encode(value);\n```\n\nExample:\n```text\n{\n    \"created\": { \"$datetime\": \"2024-01-15T12:00:00.123456789Z\" },\n    \"author\": { \"$recordId\": { \"tb\": \"user\", \"id\": \"tobie\" } }\n}\n```\n\nExample:\n```text\nconst restored = codec.decode<typeof value>(sqonJson);\nconsole.log(restored.author instanceof RecordId); // true\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:45.269Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":7,"totalLines":87,"estimatedTokens":444}}364{"id":"doc-error_handling_surrealdb-76c3cb01","source":"documentation","title":"Error handling | SurrealDB","url":"https://surrealdb.com/docs/reference/javascript/concepts/error-handling","text":"Example:\n```text\nimport { SurrealError, AuthenticationError, ConnectionUnavailableError } from 'surrealdb';\n\ntry {\n    await db.signin({ username: 'user', password: 'pass' });\n} catch (error) {\n    if (error instanceof AuthenticationError) {\n        console.error('Invalid credentials');\n    } else if (error instanceof ConnectionUnavailableError) {\n        console.error('Not connected to a database');\n    } else if (error instanceof SurrealError) {\n        console.error('SDK error:', error.message);\n    }\n}\n```\n\nExample:\n```text\nimport { ConnectionUnavailableError, HttpConnectionError } from 'surrealdb';\n\ntry {\n    await db.connect('ws://localhost:8000');\n} catch (error) {\n    if (error instanceof HttpConnectionError) {\n        console.error(`HTTP ${error.status}: ${error.statusText}`);\n    }\n}\n```\n\nExample:\n```text\nimport { UnsupportedEngineError } from 'surrealdb';\n\ntry {\n    await db.connect('mem://');\n} catch (error) {\n    if (error instanceof UnsupportedEngineError) {\n        console.error(`Engine \"${error.engine}\" is not registered`);\n    }\n}\n```\n\nExample:\n```text\nimport { AuthenticationError, MissingNamespaceDatabaseError } from 'surrealdb';\n\ntry {\n    await db.use({ namespace: 'main', database: 'main' });\n    await db.signin({ username: 'admin', password: 'secret' });\n} catch (error) {\n    if (error instanceof MissingNamespaceDatabaseError) {\n        console.error('No namespace or database selected');\n    } else if (error instanceof AuthenticationError) {\n        console.error('Authentication failed:', error.cause);\n    }\n}\n```\n\nExample:\n```text\nimport { ResponseError } from 'surrealdb';\n\ntry {\n    await db.query('INVALID QUERY');\n} catch (error) {\n    if (error instanceof ResponseError) {\n        console.error(`Database error [${error.code}]: ${error.message}`);\n    }\n}\n```\n\nExample:\n```text\nimport { UnsupportedVersionError } from 'surrealdb';\n\ntry {\n    await db.connect('ws://localhost:8000');\n} catch (error) {\n    if (error instanceof UnsupportedVersionError) {\n        console.error(\n            `Version ${error.version} is not supported. ` +\n            `Requires >= ${error.minimum} and < ${error.maximum}`\n        );\n    }\n}\n```\n\nExample:\n```text\nimport { Features, UnsupportedFeatureError } from 'surrealdb';\n\nif (db.isFeatureSupported(Features.LiveQueries)) {\n    const live = await db.live(new Table('users'));\n}\n```\n\nExample:\n```text\nimport { ReconnectExhaustionError, UnexpectedConnectionError } from 'surrealdb';\n\ndb.subscribe('error', (error) => {\n    if (error instanceof ReconnectExhaustionError) {\n        console.error('All reconnection attempts failed');\n    } else if (error instanceof UnexpectedConnectionError) {\n        console.error('Connection error:', error.cause);\n    }\n});\n```\n\nExample:\n```text\nimport { ConnectionUnavailableError, ResponseError } from 'surrealdb';\n\nasync function withRetry<T>(fn: () => Promise<T>, maxRetries = 3): Promise<T> {\n    for (let attempt = 0; attempt < maxRetries; attempt++) {\n        try {\n            return await fn();\n        } catch (error) {\n            if (error instanceof ConnectionUnavailableError) {\n                await db.connect('ws://localhost:8000');\n                continue;\n            }\n            if (error instanceof ResponseError && attempt < maxRetries - 1) {\n                continue;\n            }\n            throw error;\n        }\n    }\n    throw new Error('Max retries exceeded');\n}\n\nconst users = await withRetry(() => db.select(new Table('users')));\n```\n\nExample:\n```text\nconst [n] = await db\n    .query<[number]>('UPDATE counter:c SET n += 1 RETURN n')\n    .retry({ attempts: 3 })\n    .collect();\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:45.270Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":10,"totalLines":144,"estimatedTokens":913}}365{"id":"doc-upsert_surrealdb-c590a263","source":"documentation","title":"upsert | SurrealDB","url":"https://surrealdb.com/docs/reference/mojo/methods/upsert","text":"Example:\n```text\nclient.upsert(thing, content_json, session, txn)\n```\n\nExample:\n```text\nvar resp = client.upsert(\"person:chiru\", '{ \"name\": \"Chiru\", \"age\": 31 }')\n```\n\nExample:\n```text\nUPSERT $thing CONTENT $content_json;\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:45.311Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":3,"totalLines":16,"estimatedTokens":60}}366{"id":"doc-remove_surrealdb-5eda5e5f","source":"documentation","title":"REMOVE | SurrealDB","url":"https://surrealdb.com/docs/reference/query-language/statements/remove","text":"Example:\n```text\nREMOVE [\n    ACCESS    [ IF EXISTS ] @name ON [ NAMESPACE | DATABASE ]\n  | ANALYZER  [ IF EXISTS ] @name\n  | API       [ IF EXISTS ] @name\n  | CONFIG    [ IF EXISTS ] [ GRAPHQL | API | DEFAULT ]\n  | DATABASE  [ IF EXISTS ] @name\n  | EVENT     [ IF EXISTS ] @name ON [ TABLE ] @table\n  | FIELD     [ IF EXISTS ] @name ON [ TABLE ] @table\n  | FUNCTION  [ IF EXISTS ] @name\n  | INDEX     [ IF EXISTS ] @name ON [ TABLE ] @table\n  | NAMESPACE [ IF EXISTS ] @name\n  | PARAM     [ IF EXISTS ] @name\n  | TABLE     [ IF EXISTS ] @name\n  | USER      [ IF EXISTS ] @name ON [ ROOT | NAMESPACE | DATABASE ]\n]\n```\n\nExample:\n```text\nREMOVE NAMESPACE surrealdb;\n\nREMOVE DATABASE blog;\n\nREMOVE USER writer ON NAMESPACE;\n\nREMOVE USER writer ON DATABASE;\n\nREMOVE ACCESS token ON NAMESPACE;\n\nREMOVE ACCESS user ON DATABASE;\n\nREMOVE EVENT new_post ON TABLE article;\n\n-- Only works for Schemafull tables (i.e. tables with a schema)\nREMOVE FIELD tags ON TABLE article;\n\nREMOVE INDEX authors ON TABLE article;\n\n-- Fails if a full-text index still references this analyzer (remove the index first)\nREMOVE ANALYZER example_ascii;\n\nREMOVE FUNCTION fn::update_author;\n\nREMOVE PARAM $author;\n\nREMOVE TABLE article;\n```\n\nExample:\n```text\nREMOVE NAMESPACE IF EXISTS surrealdb;\n\nREMOVE DATABASE IF EXISTS blog;\n\nREMOVE USER IF EXISTS writer ON NAMESPACE;\n\nREMOVE USER IF EXISTS writer ON DATABASE;\n\nREMOVE ACCESS IF EXISTS token ON NAMESPACE;\n\nREMOVE ACCESS IF EXISTS user ON DATABASE;\n\nREMOVE EVENT IF EXISTS new_post ON TABLE article;\n\nREMOVE FIELD IF EXISTS tags ON TABLE article;\n\nREMOVE INDEX IF EXISTS authors ON TABLE article;\n\nREMOVE ANALYZER IF EXISTS example_ascii;\n\nREMOVE FUNCTION IF EXISTS fn::update_author;\n\nREMOVE PARAM IF EXISTS $author;\n\nREMOVE TABLE IF EXISTS article;\n```\n\nExample:\n```text\nDEFINE TABLE pc;\nDEFINE TABLE pc_agg AS SELECT count(), class FROM pc GROUP BY class;\nCREATE |pc:3| SET class = \"Wizard\";\nCREATE |pc:10| SET class = \"Warrior\";\nSELECT * FROM pc_agg;\n-- Error: pc_agg requires pc to work\nREMOVE TABLE pc;\nREMOVE TABLE pc_agg;\n-- pc_agg is now gone, pc can be removed too\nREMOVE TABLE pc;\n```\n\nExample:\n```text\n-------- Query --------\n\n[\n  { \n    class: 'Warrior', \n    count: 10, \n    id: pc_agg:['Warrior'] \n  }, \n  { \n    class: 'Wizard', \n    count: 3, \n    id: pc_agg:['Wizard'] \n  }\n]\n\n-------- Query --------\n\n'Invalid query: Cannot delete table `pc` on which a view is defined, table(s) `pc_agg` are defined as a view on this table.'\n```\n\nExample:\n```text\nDEFINE FIELD name ON person TYPE string;\nCREATE person:one SET name = \"Billy\";\nREMOVE FIELD name ON person;\n\nSELECT * FROM person; -- 'name' data is still there\nUPDATE person; -- Does nothing\n-- [{ id: person:one, name: 'Billy' }]\nUPDATE person SET name = NONE; -- Must unset to remove 'name' data\n```\n\nExample:\n```text\nDEFINE TABLE person SCHEMAFULL;\nDEFINE FIELD name ON person TYPE string;\nCREATE person:one SET name = \"Billy\";\nREMOVE FIELD name ON person;\n\nSELECT * FROM person; -- 'name' data is still there\nUPDATE person; -- Found field 'name', but no such field exists for table 'person'\nDEFINE FIELD created_at ON person TYPE datetime; -- Define a new field\n\n-- Works because values matche schema: 'name' is set to NONE, 'created_at' has a datetime value\nUPDATE person SET name = NONE, created_at = time::now();\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:45.313Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":7,"totalLines":143,"estimatedTokens":832}}367{"id":"doc-health_surrealdb-4676d78f","source":"documentation","title":"health | SurrealDB","url":"https://surrealdb.com/docs/reference/rust/methods/health","text":"Example:\n```text\ndb.health().await?\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:45.343Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":1,"totalLines":6,"estimatedTokens":14}}368{"id":"doc-types_after_3_0_surrealdb-d0dd3aae","source":"documentation","title":"Types after 3.0 | SurrealDB","url":"https://surrealdb.com/docs/reference/rust/concepts/rust-after-30","text":"Example:\n```text\nuse surrealdb::engine::any::connect;\nuse surrealdb::types::SurrealValue;\n\n#[derive(Debug, SurrealValue)]\nstruct Employee {\n    name: String,\n    active: bool,\n}\n\n#[tokio::main]\nasync fn main() {\n    let db = connect(\"memory\").await.unwrap();\n\n    db.use_ns(\"ns\").use_db(\"db\").await.unwrap();\n\n    let mut res = db\n        .query(\"CREATE employee:bobby SET name = 'Bobby', active = true\")\n        .await\n        .unwrap();\n\n    let bobby = res.take::<Option<Employee>>(0).unwrap().unwrap();\n\n    // Employee { name: \"Bobby\", active: true }\n    println!(\"{bobby:?}\");\n}\n```\n\nExample:\n```text\nuse surrealdb::engine::any::connect;\nuse surrealdb::types::{Datetime, Error, Kind, SurrealValue, Value};\n\n#[derive(Debug)]\nstruct MyOwnDateTime(i64);\n\nimpl SurrealValue for MyOwnDateTime {\n    fn kind_of() -> Kind {\n        Kind::Datetime\n    }\n\n    fn into_value(self) -> Value {\n        Value::Datetime(Datetime::from_timestamp(self.0, 0).unwrap())\n    }\n\n    fn from_value(value: Value) -> Result<Self, Error>\n    where\n        Self: Sized,\n    {\n        match value {\n            Value::Datetime(n) => Ok(MyOwnDateTime(n.timestamp_millis())),\n            _ => Err(Error::thrown(\"No good\".to_string())),\n        }\n    }\n}\n\n#[tokio::main]\nasync fn main() {\n    let db = connect(\"memory\").await.unwrap();\n\n    db.use_ns(\"main\").use_db(\"main\").await.unwrap();\n\n    println!(\n        \"{:?}\",\n        db.query(\"time::now()\")\n            .await\n            .unwrap()\n            .take::<Option<MyOwnDateTime>>(0)\n    );\n}\n```\n\nExample:\n```text\n#[tokio::main]\nasync fn main() {\n    let db = connect(\"memory\").await.unwrap();\n\n    db.use_ns(\"main\").use_db(\"main\").await.unwrap();\n\n    println!(\n        \"{:?}\\n\",\n        db.query(\"time::now()\")\n            .await\n            .unwrap()\n            .take::<Option<MyOwnDateTime>>(0)\n    );\n\n    println!(\n        \"{:?}\",\n        db.query(\"CREATE person\")\n            .await\n            .unwrap()\n            .take::<Option<MyOwnDateTime>>(0)\n    );\n}\n```\n\nExample:\n```text\nOk(Some(MyOwnDateTime(1760330504574)))\n\nErr(InternalError(\"Couldn't convert Object(Object({\\\"id\\\": RecordId(RecordId { table: \\\"person\\\", key: String(\\\"tcblzaktx3ponin9dyci\\\") })})) to MyOwnDateTime\"))\n```\n\nExample:\n```text\nfn kind_of() -> surrealdb_types::Kind {\n    kind!({ status: \"good\" } | { status: \"goodwithnotification\", notification: string} | { status: \"error\", at: datetime, reason: string })\n}\n```\n\nExample:\n```text\nfn kind_of() -> surrealdb_types::Kind {\n    surrealdb_types::Kind::Either(\n        vec!([\n            surrealdb_types::Kind::Literal(\n                surrealdb_types::KindLiteral::Object(\n                    std::collections::BTreeMap::from([\n                        (\n                            \"status\".to_string(),\n                            surrealdb_types::Kind::Literal(\n                                surrealdb_types::KindLiteral::String(\"good\".to_string()),\n                            ),\n                        ),\n                    ]),\n                ),\n            ),\n            surrealdb_types::Kind::Literal(\n                surrealdb_types::KindLiteral::Object(\n                    std::collections::BTreeMap::from([\n                        (\n                            \"status\".to_string(),\n                            surrealdb_types::Kind::Literal(\n                                surrealdb_types::KindLiteral::String(\n                                    \"goodwithnotification\".to_string(),\n                                ),\n                            ),\n                        ),\n                        (\"notification\".to_string(), surrealdb_types::Kind::String),\n                    ]),\n                ),\n            ),\n            surrealdb_types::Kind::Literal(\n                surrealdb_types::KindLiteral::Object(\n                    std::collections::BTreeMap::from([\n                        (\n                            \"status\".to_string(),\n                            surrealdb_types::Kind::Literal(\n                                surrealdb_types::KindLiteral::String(\"error\".to_string()),\n                            ),\n                        ),\n                        (\"at\".to_string(), surrealdb_types::Kind::Datetime),\n                        (\"reason\".to_string(), surrealdb_types::Kind::String),\n                    ]),\n                ),\n            ),\n            ]),\n        ),\n}\n```\n\nExample:\n```text\nuse surrealdb::engine::any::connect;\nuse surrealdb_types::{Datetime, Error, Object, SurrealValue, ToSql, Value, kind};\n\n#[derive(SurrealValue)]\nstruct MyError {\n    at: Datetime,\n    reason: String,\n}\n\nenum Response {\n    Good,\n    GoodWithNotification(String),\n    Error(MyError),\n}\n\nimpl SurrealValue for Response {\n    fn kind_of() -> surrealdb_types::Kind {\n        kind!({ status: \"good\" } | { status: \"goodwithnotification\", notification: string} | { status: \"error\", at: datetime, reason: string })\n    }\n\n    fn into_value(self) -> Value {\n        let mut obj = Object::new();\n        match self {\n            Response::Good => {\n                obj.insert(\"status\", \"good\");\n            }\n            Response::GoodWithNotification(n) => {\n                obj.insert(\"status\", \"goodwithnotification\");\n                obj.insert(\"notification\", n);\n            }\n            Response::Error(e) => {\n                obj.insert(\"status\", \"error\");\n                obj.insert(\"at\", e.at);\n                obj.insert(\"reason\", e.reason);\n            }\n        }\n        Value::Object(obj)\n    }\n\n    fn from_value(value: Value) -> Result<Self, Error>\n    where\n        Self: Sized,\n    {\n        let Value::Object(o) = value else {\n            return Err(Error::thrown(\"Should have been an object\".to_string()));\n        };\n        let Some(Value::String(status)) = o.get(\"status\") else {\n            return Err(Error::thrown(\n                \"Error trying to get 'status' field\".to_string(),\n            ));\n        };\n        match status.as_str() {\n            \"Good\" => Ok(Response::Good),\n            status @ \"GoodWithNotification\" => {\n                Ok(Response::GoodWithNotification(status.to_string()))\n            }\n            \"Error\" => {\n                let Some(Value::Datetime(at)) = o.get(\"at\") else {\n                    return Err(Error::thrown(\"Error trying to get 'at' field\".to_string()));\n                };\n                let Some(Value::String(reason)) = o.get(\"reason\") else {\n                    return Err(Error::thrown(\n                        \"Error trying to get 'reason' field\".to_string(),\n                    ));\n                };\n                Ok(Response::Error(MyError {\n                    at: at.clone(),\n                    reason: reason.clone(),\n                }))\n            }\n            _ => Err(Error::thrown(\"No status field for some reason\".to_string())),\n        }\n    }\n\n    fn is_value(value: &Value) -> bool {\n        value.is_kind(&Self::kind_of())\n    }\n}\n\n#[tokio::main]\nasync fn main() {\n    let db = connect(\"memory\").await.unwrap();\n    db.use_ns(\"main\").use_db(\"main\").await.unwrap();\n\n    // Turning DB results into Rust enum\n    let mut statuses = db.query(\"\n        { status: 'Good' };\n        { status: 'GoodWithNotification', notification: 'We need things to make us go. We need help.' };\n        { status: 'Error', at: d'1914-07-28', reason: 'General conflagration'};\n    \").await.unwrap();\n\n    println!(\n        \"Good: {}\",\n        statuses\n            .take::<Option<Response>>(0)\n            .unwrap()\n            .unwrap()\n            .into_value()\n            .to_sql_pretty()\n    );\n    println!(\n        \"Good with notification: {}\",\n        statuses\n            .take::<Option<Response>>(1)\n            .unwrap()\n            .unwrap()\n            .into_value()\n            .to_sql_pretty()\n    );\n    println!(\n        \"Error: {}\",\n        statuses\n            .take::<Option<Response>>(2)\n            .unwrap()\n            .unwrap()\n            .into_value()\n            .to_sql_pretty()\n    );\n\n    // Turn Rust enum into Values,\n    // use them in the CONTENT clause\n    // and then print the result\n    let good = Response::Good;\n    let good_but = Response::GoodWithNotification(\"Keep it up!\".into());\n    let error = Response::Error(MyError {\n        at: Datetime::now(),\n        reason: \"Error: can't think of interesting error message\".into(),\n    });\n\n    println!(\n        \"Good: {:?}\",\n        db.query(\"CREATE result CONTENT $content\")\n            .bind((\"content\", good))\n            .await\n            .unwrap()\n            .take::<Option<Value>>(0)\n            .unwrap()\n            .unwrap()\n            .to_sql()\n    );\n    println!(\n        \"Good but: {:?}\",\n        db.query(\"CREATE result CONTENT $content\")\n            .bind((\"content\", good_but))\n            .await\n            .unwrap()\n            .take::<Option<Value>>(0)\n            .unwrap()\n            .unwrap()\n            .to_sql()\n    );\n    println!(\n        \"Error: {:?}\",\n        db.query(\"CREATE result CONTENT $content\")\n            .bind((\"content\", error))\n            .await\n            .unwrap()\n            .take::<Option<Value>>(0)\n            .unwrap()\n            .unwrap()\n            .to_sql()\n    );\n}\n```\n\nExample:\n```text\nuse surrealdb::types::{Value, array, object, set};\n\nfn main() {\n    let obj = object! {\n        name: \"Aeon\",\n        age: 30,\n        \"home-town\": \"Bregna\",\n    };\n\n    let arr = array![1, \"two\", true];\n\n    let tags = set! {\n        Value::from_t(\"rust\"),\n        Value::from_t(\"surrealdb\"),\n        Value::from_t(\"rust\"),\n    };\n\n    println!(\"{obj:?}\");\n    println!(\"{arr:?}\");\n    println!(\"{tags:?}\");\n}\n```\n\nExample:\n```text\nObject({\"age\": Number(Int(30)), \"home-town\": String(\"Bregna\"), \"name\": String(\"Aeon\")})\nArray([Number(Int(1)), String(\"two\"), Bool(true)])\nSet({String(\"rust\"), String(\"surrealdb\")})\n```\n\nExample:\n```text\nuse surrealdb::engine::any::connect;\nuse surrealdb::types::{RecordId, SurrealValue, vars};\n\n#[derive(Debug, SurrealValue)]\nstruct Person {\n    id: RecordId,\n    name: String,\n    age: i64,\n}\n\n#[tokio::main]\nasync fn main() -> surrealdb::Result<()> {\n    let db = connect(\"mem://\").await?;\n    db.use_ns(\"main\").use_db(\"main\").await?;\n\n    let sql = \"\n        CREATE type::table($table) SET name = $name, age = $age;\n        SELECT * FROM type::table($table) WHERE age >= $min_age;\n    \";\n\n    let mut result = db\n        .query(sql)\n        .bind(vars! {\n            table: \"person\",\n            name: \"Aeon\",\n            age: 30,\n            min_age: 18,\n        })\n        .await?;\n\n    let created: Option<Person> = result.take(0)?;\n    dbg!(created);\n    let adults: Vec<Person> = result.take(1)?;\n    dbg!(adults);\n    Ok(())\n}\n```\n\nExample:\n```text\nuse surrealdb_types::{SurrealValue, Value};\n\nfn main() {\n    let string_val = \"string\".into_value();\n    assert!(string_val.is_string());\n    assert_eq!(string_val, Value::String(\"string\".into()));\n}\n```\n\nExample:\n```text\nuse std::collections::HashMap;\n\nuse surrealdb::engine::any::connect;\nuse surrealdb_types::{SurrealValue, Value};\n\n#[tokio::main]\nasync fn main() {\n    let db = connect(\"memory\").await.unwrap();\n    db.use_ns(\"db\").use_db(\"db\").await.unwrap();\n\n    let mut map = HashMap::new();\n    map.insert(\"name\".to_string(), \"Billy\");\n    map.insert(\"id\".to_string(), \"person:one\");\n\n    // Turn HashMap into SurrealDB Value\n    let as_person = map.into_value();\n\n    // Object(Object({\"id\": String(\"person:one\"), \"name\": String(\"Billy\")}))\n    println!(\"{as_person:?}\");\n\n    // Insert it into a query to create a record\n    let res = db\n        .query(\"CREATE ONLY person CONTENT $person\")\n        .bind((\"person\", as_person))\n        .await\n        .unwrap()\n        .take::<Value>(0)\n        .unwrap();\n\n    // Object(Object({\"id\": RecordId(RecordId { table: \"person\", key: String(\"person:one\") }), \"name\": String(\"Billy\")}))\n    println!(\"{res:?}\");\n}\n```\n\nExample:\n```text\nuse std::str::FromStr;\n\nuse surrealdb::engine::any::connect;\nuse surrealdb_types::{Array, Datetime, RecordId, RecordIdKey, Value};\n\n#[tokio::main]\nasync fn main() {\n    let db = connect(\"memory\").await.unwrap();\n    db.use_ns(\"db\").use_db(\"db\").await.unwrap();\n\n    let date = \"2025-10-13T05:16:11.343Z\";\n\n    let complex_id = RecordId {\n        table: \"weather\".into(),\n        key: RecordIdKey::Array(Array::from(vec![\n            Value::String(\"London\".to_string()),\n            Value::Datetime(Datetime::from_str(date).unwrap()),\n        ])),\n    };\n\n    let mut res = db\n        .query(\"CREATE ONLY weather SET id = $id\")\n        .bind((\"id\", complex_id))\n        .await\n        .unwrap();\n\n    // Object(Object({\"id\": RecordId(RecordId { table: \"weather\", key: Array(Array([String(\"London\"), Datetime(Datetime(2025-10-13T05:16:11.343Z))])) })}))\n    println!(\"{:?}\", res.take::<Value>(0).unwrap());\n}\n```\n\nExample:\n```text\nuse std::collections::HashMap;\nuse surrealdb_types::SurrealValue;\n\nfn main() {\n    // true\n    println!(\"{}\", \"string\".into_value().is::<String>());\n\n    let mut map = HashMap::new();\n    map.insert(\"name\".to_string(), \"Billy\");\n    map.insert(\"id\".to_string(), \"person:one\");\n\n    // true\n    println!(\"{}\", map.clone().into_value().is::<HashMap<String, &str>>());\n    // Also true\n    println!(\"{}\", map.into_value().is::<HashMap<String, String>>());\n}\n```\n\nExample:\n```text\nuse surrealdb::engine::any::connect;\nuse surrealdb_types::{SurrealValue, Value};\n\n#[tokio::main]\nasync fn main() {\n    let db = connect(\"memory\").await.unwrap();\n    db.use_ns(\"db\").use_db(\"db\").await.unwrap();\n\n    let value = db\n        .query(\"CREATE ONLY person:one SET age = 21\")\n        .await\n        .unwrap()\n        .take::<Value>(0)\n        .unwrap();\n\n    // Object(Object({\"age\": Number(Int(21)), \"id\": RecordId(RecordId { table: \"person\", key: String(\"one\") })}))\n    println!(\"{value:?}\");\n    // Object {\"age\": Number(21), \"id\": String(\"person:one\")}\n    println!(\"{:?}\", value.clone().into_json_value());\n\n    // Round trip\n    value.into_json_value().into_value();\n}\n```\n\nExample:\n```text\nuse surrealdb::engine::any::connect;\nuse surrealdb_types::{SurrealValue, ToSql};\n\n#[derive(SurrealValue)]\nstruct UserData {\n    num: i32,\n    other_num: i32,\n}\n\n#[derive(SurrealValue)]\n#[surreal(default)]\nstruct UserDataDefault {\n    num: i32,\n    other_num: i32,\n}\n\nimpl Default for UserDataDefault {\n    fn default() -> Self {\n        UserDataDefault {\n            num: 10,\n            other_num: 20,\n        }\n    }\n}\n\n#[tokio::main]\nasync fn main() {\n    let db = connect(\"memory\").await.unwrap();\n    db.use_ns(\"ns\").use_db(\"db\").await.unwrap();\n\n    let mut has_two_fields = db\n        .query(\"CREATE user SET num = 10, other_num = 20\")\n        .await\n        .unwrap();\n\n    let mut has_one_field = db.query(\"CREATE user SET num = 5\").await.unwrap();\n\n    println!(\n        \"Regular deserialization from DB result: {}\",\n        has_two_fields\n            .take::<Option<UserData>>(0)\n            .unwrap()\n            .unwrap()\n            .into_value()\n            .to_sql()\n    );\n\n    println!(\n        \"Deserialization using DB result plus default value: {}\",\n        has_one_field\n            .take::<Option<UserDataDefault>>(0)\n            .unwrap()\n            .unwrap()\n            .into_value()\n            .to_sql()\n    )\n}\n```\n\nExample:\n```text\nRegular deserialization from DB result: { num: 10, other_num: 20 }\nDeserialization using DB result plus default value: { num: 5, other_num: 20 }\n```\n\nExample:\n```text\nuse surrealdb_types::{SurrealValue, ToSql};\n\n#[derive(SurrealValue)]\nstruct UserData {\n    num: i32,\n}\n\n#[derive(SurrealValue)]\nstruct UserDataRename {\n    #[surreal(rename = \"user_num\")]\n    num: i32,\n}\n\nfn main() {\n    let user_data = UserData { num: 555 };\n    let user_data_rename = UserDataRename { num: 555 };\n\n    println!(\"Before rename: {}\", user_data.into_value().to_sql());\n    println!(\"After rename: {}\", user_data_rename.into_value().to_sql());\n}\n```\n\nExample:\n```text\nBefore rename: { num: 555 }\nAfter rename: { user_num: 555 }\n```\n\nExample:\n```text\nuse surrealdb_types::{SurrealValue, ToSql};\n\n#[derive(SurrealValue)]\n#[surreal(rename_all = \"camelCase\")]\nstruct UserProfile {\n    full_name: String,\n    years_old: i64,\n}\n\nfn main() {\n    let profile = UserProfile {\n        full_name: \"Ada\".into(),\n        years_old: 36,\n    };\n    // { fullName: 'Ada', yearsOld: 36 }\n    println!(\"{}\", profile.into_value().to_sql());\n}\n```\n\nExample:\n```text\nuse surrealdb_types::{SurrealValue, ToSql};\n\n#[derive(SurrealValue)]\nstruct Coords {\n    x: i64,\n    y: i64,\n}\n\n#[derive(SurrealValue)]\nstruct Point {\n    name: String,\n    #[surreal(flatten)]\n    coords: Coords,\n}\n\nfn main() {\n    let point = Point {\n        name: \"origin\".into(),\n        coords: Coords { x: 0, y: 0 },\n    };\n    // { name: 'origin', x: 0, y: 0 }\n    println!(\"{}\", point.into_value().to_sql());\n}\n```\n\nExample:\n```text\nuse surrealdb_types::{SurrealValue, ToSql};\n\n#[derive(SurrealValue)]\nenum LogLevel {\n    Debug(String),\n    Info(String),\n}\n\n#[derive(SurrealValue)]\n#[surreal(uppercase)]\nenum LogLevelUpper {\n    Debug(String),\n    Info(String),\n}\n\n#[derive(SurrealValue)]\n#[surreal(lowercase)]\nenum LogLevelLower {\n    Debug(String),\n    Info(String),\n}\n\nfn main() {\n    let log_level = LogLevel::Debug(\"User1\".into());\n    let log_level_upper = LogLevelUpper::Debug(\"User1\".into());\n    let log_level_lower = LogLevelLower::Debug(\"User1\".into());\n\n    println!(\"Before attribute: {}\", log_level.into_value().to_sql());\n    println!(\"After uppercase: {}\", log_level_upper.into_value().to_sql());\n    println!(\"After lowercase: {}\", log_level_lower.into_value().to_sql());\n}\n```\n\nExample:\n```text\nBefore attribute: { Debug: 'User1' }\nAfter uppercase: { DEBUG: 'User1' }\nAfter lowercase: { debug: 'User1' }\n```\n\nExample:\n```text\nuse surrealdb_types::{SurrealValue, ToSql};\n\n#[derive(SurrealValue)]\nstruct UserData(i32);\n\n#[derive(SurrealValue)]\n#[surreal(tuple)]\nstruct UserDataTuple(i32);\n\nfn main() {\n    println!(\n        \"Without tuple attribute: {}\",\n        UserData(555).into_value().to_sql()\n    );\n    println!(\n        \"With tuple attribute: {}\",\n        UserDataTuple(555).into_value().to_sql()\n    );\n}\n```\n\nExample:\n```text\nWithout tuple attribute: 555\nWith tuple attribute: [555]\n```\n\nExample:\n```text\nuse surrealdb_types::{SurrealValue, ToSql};\n\n#[derive(SurrealValue)]\nenum LogLevel {\n    Debug(String),\n    Info(String),\n}\n\n#[derive(SurrealValue)]\n#[surreal(untagged)]\nenum LogLevelUntagged {\n    Debug(String),\n    Info(String),\n}\n\nfn main() {\n    let log_level = LogLevel::Debug(\"User1\".into());\n    let log_level_untagged = LogLevelUntagged::Debug(\"User1\".into());\n\n    println!(\"Before untagged: {}\", log_level.into_value().to_sql());\n    println!(\n        \"After untagged: {}\",\n        log_level_untagged.into_value().to_sql()\n    );\n}\n```\n\nExample:\n```text\nBefore untagged: { Debug: 'User1' }\nAfter untagged: 'User1'\n```\n\nExample:\n```text\nuse surrealdb_types::{SurrealValue, ToSql};\n\n#[derive(SurrealValue)]\nenum LogLevel {\n    Debug,\n    Info,\n}\n\n#[derive(SurrealValue)]\n#[surreal(tag = \"log_level\")]\nenum LogLevelTag {\n    Debug,\n    Info,\n}\n\nfn main() {\n    let log_level = LogLevel::Debug;\n    let log_level_tag = LogLevelTag::Debug;\n    println!(\"\\n___surreal(tag)___\");\n    println!(\"Before tag: {}\", log_level.into_value().to_sql());\n    println!(\"After tag: {}\", log_level_tag.into_value().to_sql());\n}\n```\n\nExample:\n```text\nBefore tag: { Debug: {  } }\nAfter tag: { log_level: 'Debug' }\n```\n\nExample:\n```text\nuse surrealdb_types::{SurrealValue, ToSql};\n\n#[derive(SurrealValue)]\nenum LogLevel {\n    Debug(String),\n    Info(String),\n}\n\n#[derive(SurrealValue)]\n#[surreal(tag = \"log_level\", content = \"user\")]\nenum LogLevelContent {\n    Debug(String),\n    Info(String),\n}\n\nfn main() {\n    let log_level = LogLevel::Debug(\"User1\".to_string());\n    let log_level_tag = LogLevelContent::Debug(\"User1\".to_string());\n\n    println!(\"Before content: {}\", log_level.into_value().to_sql());\n    println!(\"After content: {}\", log_level_tag.into_value().to_sql());\n}\n```\n\nExample:\n```text\nBefore content: { Debug: 'User1' }\nAfter content: { log_level: 'Debug', user: 'User1' }\n```\n\nExample:\n```text\nuse surrealdb_types::{SurrealValue, ToSql, Value};\n\n#[derive(SurrealValue)]\n#[surreal(tag = \"kind\", content = \"details\", skip_content_if = \"Value::is_empty\")]\nenum ApiStatus {\n    Ok,\n    Error { message: String },\n}\n\nfn main() {\n    // Unit variant: content omitted when empty\n    // { kind: 'Ok' }\n    println!(\"{}\", ApiStatus::Ok.into_value().to_sql());\n\n    // Named variant: content present when there is data\n    // { kind: 'Error', details: { message: 'boom' } }\n    println!(\n        \"{}\",\n        ApiStatus::Error {\n            message: \"boom\".into()\n        }\n        .into_value()\n        .to_sql()\n    );\n}\n```\n\nExample:\n```text\nuse surrealdb_types::SurrealValue;\n\n#[derive(Debug, PartialEq, SurrealValue)]\n#[surreal(untagged)]\nenum WireFlag {\n    #[surreal(value = true)]\n    On,\n    #[surreal(value = false)]\n    Off,\n    #[surreal(other)]\n    Unknown,\n}\n```\n\nExample:\n```text\nuse surrealdb_types::{SurrealValue, ToSql};\n\nfn main() {\n    #[derive(Clone, Debug, SurrealValue)]\n    #[surreal(untagged)]\n    pub enum LogLevel {\n        Regular,\n        Verbose,\n        Off,\n    }\n\n    #[derive(Clone, Debug, SurrealValue)]\n    #[surreal(untagged)]\n    pub enum LogLevelValue {\n        #[surreal(value = \"info\")]\n        Regular,\n        #[surreal(value = \"debug\")]\n        Verbose,\n        #[surreal(value = NONE)]\n        Off,\n    }\n\n    println!(\"Only untagged: {}\", LogLevel::Off.into_value().to_sql());\n    println!(\n        \"Untagged plus value: {}\",\n        LogLevelValue::Off.into_value().to_sql()\n    );\n}\n```\n\nExample:\n```text\nWith only untagged: 'Off'\nWith untagged plus substitute value: NONE\n```\n\nExample:\n```text\nuse surrealdb_types::{SurrealValue, ToSql};\nuse serde::{Serialize, Deserialize};\n\n#[derive(Clone, Debug, Serialize, Deserialize)]\npub struct ExternStruct {\n    foo: String,\n    bar: String,\n}\n\n#[derive(Clone, Debug, SurrealValue)]\npub struct OurStruct {\n    baz: String,\n    #[surreal(wrap)]\n    external: ExternStruct\n}\n```\n\nExample:\n```text\nuse surrealdb_types::{SurrealValue, Value};\n\n#[derive(SurrealValue, Debug, PartialEq)]\n#[surreal(untagged)]\nenum EnumMixedWithValue {\n    #[surreal(value = false)]\n    None,\n    Some(Vec<String>),\n}\n\n#[derive(SurrealValue, Debug, PartialEq)]\n#[surreal(tag = \"tag\", content = \"content\")]\nenum EnumTaggedWithTagAndContent {\n    Foo,\n    Bar { prop: String },\n    Baz(String),\n    Qux(String, i64),\n}\n\n#[derive(SurrealValue, Debug, PartialEq)]\n#[surreal(tag = \"tag\", content = \"content\", lowercase)]\nenum EnumTaggedWithTagAndContentLowercase {\n    Foo,\n}\n\n#[derive(SurrealValue, Debug, PartialEq)]\n#[surreal(tag = \"tag\", content = \"content\", uppercase)]\nenum EnumTaggedWithTagAndContentUppercase {\n    Foo,\n}\n\n#[derive(SurrealValue, Debug, PartialEq)]\n#[surreal(tag = \"tag\")]\nenum EnumTaggedWithTag {\n    Foo,\n    Bar { prop: String },\n}\n\n#[derive(SurrealValue, Debug, PartialEq)]\n#[surreal(tag = \"tag\", lowercase)]\nenum EnumTaggedWithTagLowercase {\n    Foo,\n}\n\n#[derive(SurrealValue, Debug, PartialEq)]\n#[surreal(tag = \"tag\", uppercase)]\nenum EnumTaggedWithTagUppercase {\n    Foo,\n}\n\n#[derive(SurrealValue, Debug, PartialEq)]\nenum EnumTaggedVariant {\n    Foo,\n    Bar { prop: String },\n    Baz(String),\n    Qux(String, i64),\n}\n\n#[derive(SurrealValue, Debug, PartialEq)]\n#[surreal(lowercase)]\nenum EnumTaggedVariantLowercase {\n    Foo,\n}\n\n#[derive(SurrealValue, Debug, PartialEq)]\n#[surreal(uppercase)]\nenum EnumTaggedVariantUppercase {\n    Foo,\n}\n\n#[derive(SurrealValue, Debug, PartialEq)]\n#[surreal(untagged)]\nenum EnumUnitValue {\n    #[surreal(value = true)]\n    True,\n    #[surreal(value = false)]\n    False,\n    #[surreal(value = null)]\n    Null,\n    #[surreal(value = none)]\n    None,\n    #[surreal(value = \"Hello\")]\n    String,\n    #[surreal(value = 123)]\n    Int,\n    #[surreal(value = 123.45)]\n    Float,\n}\n\n#[derive(SurrealValue, Debug, PartialEq)]\n#[surreal(untagged)]\nenum EnumUntagged {\n    Foo,\n    Bar,\n}\n\n#[derive(SurrealValue, Debug, PartialEq)]\n#[surreal(untagged, lowercase)]\nenum EnumUntaggedLowercase {\n    Foo,\n    Bar,\n}\n\n#[derive(SurrealValue, Debug, PartialEq)]\n#[surreal(untagged, uppercase)]\nenum EnumUntaggedUppercase {\n    Foo,\n    Bar,\n}\n\n#[derive(SurrealValue, Debug, PartialEq)]\nstruct PersonRenamed {\n    #[surreal(rename = \"full_name\")]\n    name: String,\n    #[surreal(rename = \"years_old\")]\n    age: i64,\n}\n\n#[derive(SurrealValue, Debug, PartialEq)]\n#[surreal(tuple)]\nstruct StringWrapperTuple(String);\n\n#[derive(SurrealValue, Debug, PartialEq)]\n#[surreal(value = true)]\nstruct UnitStructWithValue;\n\n#[derive(Clone, Debug, SurrealValue, PartialEq)]\n#[surreal(default)]\nstruct TestDefault {\n    str: String,\n    boolean: bool,\n    optional: Option<String>,\n}\n\nimpl Default for TestDefault {\n    fn default() -> Self {\n        TestDefault {\n            str: \"default\".to_string(),\n            boolean: true,\n            optional: None,\n        }\n    }\n}\n\nfn main() {}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:45.348Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":37,"totalLines":1097,"estimatedTokens":6259}}369{"id":"doc-comments_surrealdb-90386ea0","source":"documentation","title":"Comments | SurrealDB","url":"https://surrealdb.com/docs/reference/query-language/language-primitives/comments","text":"Example:\n```text\n/*\nIn SurrealQL, comments can be written as single-line\nor multi-line comments, and comments can be used and\ninterspersed within statements.\n*/\n\nSELECT * FROM /* get all users */ user;\n\n# There are a number of ways to use single-line comments\nSELECT * FROM user;\n\n// Alternatively using two forward-slash characters\nSELECT * FROM user;\n\n-- Another way is to use two dash characters\nSELECT * FROM user;\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:45.357Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":1,"totalLines":21,"estimatedTokens":109}}370{"id":"doc-regex_surrealdb-0028fe18","source":"documentation","title":"Regex | SurrealDB","url":"https://surrealdb.com/docs/reference/query-language/language-primitives/data-types/regex","text":"Example:\n```text\n-- Either 'a' or 'b'\n<regex> \"a|b\" = \"a\";\n\n-- Either color or colour\n<regex> \"col(o|ou)r\" = \"colour\";\n\n-- Case-insensitive match on English color, colour, or French couleur\n<regex> \"((?i)col(o|ou)r|couleur)\" = \"COULEUR\";\n```\n\nExample:\n```text\nstring::matches(\"a\", \"a|b\");\nstring::matches(\"colour\", \"col(o|ou)r\");\nstring::matches(\"COULEUR\", \"((?i)col(o|ou)r|couleur)\");\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:45.360Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":2,"totalLines":20,"estimatedTokens":101}}371{"id":"doc-configuration_surrealdb-c879349a","source":"documentation","title":"Configuration | SurrealDB","url":"https://surrealdb.com/docs/reference/php/frameworks/laravel/configuration","text":"Example:\n```text\nSURREALDB_CONNECTION=default\nSURREALDB_URL=ws://127.0.0.1:8000/rpc\nSURREALDB_NAMESPACE=test\nSURREALDB_DATABASE=test\nSURREALDB_USERNAME=root\nSURREALDB_PASSWORD=root\nSURREALDB_AUTO_CONNECT=true\nSURREALDB_CONNECT_ON_RESOLVE=true\nSURREALDB_DISCONNECT_ON_TERMINATE=true\nSURREALDB_HEALTH_CHECK_ON_RESOLVE=false\n```\n\nExample:\n```text\n'default' => env('SURREALDB_CONNECTION', 'default'),\n\n'connections' => [\n    'default' => [\n        'url' => env('SURREALDB_URL', 'ws://127.0.0.1:8000/rpc'),\n        'namespace' => env('SURREALDB_NAMESPACE', 'test'),\n        'database' => env('SURREALDB_DATABASE', 'test'),\n        // auth, lifecycle, and driver options...\n    ],\n\n    'analytics' => [\n        'url' => env('SURREALDB_ANALYTICS_URL'),\n        'namespace' => env('SURREALDB_ANALYTICS_NAMESPACE'),\n        'database' => env('SURREALDB_ANALYTICS_DATABASE'),\n        'auto_connect' => false,\n    ],\n],\n```\n\nExample:\n```text\n'executor' => env('SURQLIZE_EXECUTOR', 'surrealdb.connection'),\n\n'models' => [\n    App\\Models\\User::class,\n],\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:45.387Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":3,"totalLines":45,"estimatedTokens":265}}372{"id":"doc-agentops_spectron-c16a4013","source":"documentation","title":"AgentOps | Spectron","url":"https://surrealdb.com/docs/spectron/integrations/observability/agentops","text":"Example:\n```text\npip install agentops openai\npip install --pre surrealdb\n```\n\nExample:\n```text\nexport AGENTOPS_API_KEY=\"...\"\nexport SPECTRON_ENDPOINT=\"https://api.spectron.example\"\nexport SPECTRON_CONTEXT=\"acme-prod\"\nexport SPECTRON_API_KEY=\"sk-spec-...\"\n```\n\nExample:\n```text\nimport os\nimport agentops\nfrom openai import OpenAI\nfrom surrealdb import Spectron\n\nagentops.init(os.environ[\"AGENTOPS_API_KEY\"])\n\nllm = OpenAI()\nmemory = Spectron(\n    endpoint=os.environ[\"SPECTRON_ENDPOINT\"],\n    context=os.environ[\"SPECTRON_CONTEXT\"],\n    api_key=os.environ[\"SPECTRON_API_KEY\"],\n)\nscope = [\"org/acme/user/alice\"]\n\ndef answer(user_message: str) -> str:\n    block = memory.query_context(user_message, k=8, lens=scope)\n\n    completion = llm.chat.completions.create(\n        model=\"gpt-4o\",\n        messages=[\n            {\"role\": \"system\", \"content\": f\"You are a helpful assistant.\\n\\n## Memory\\n{block}\"},\n            {\"role\": \"user\", \"content\": user_message},\n        ],\n    )\n    reply = completion.choices[0].message.content\n\n    memory.remember_many(\n        [{\"role\": \"user\", \"content\": user_message}, {\"role\": \"assistant\", \"content\": reply}],\n        scopes=scope,\n    )\n    return reply\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:45.407Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":3,"totalLines":51,"estimatedTokens":302}}373{"id":"doc-transition_timing_function_transitions_animation-5cadb09e","source":"documentation","title":"transition-timing-function - Transitions & Animation - Tailwind CSS","url":"https://tailwindcss.com/docs/transition-timing-function","text":"Example:\n```text\n<button class=\"duration-300 ease-in ...\">Button A</button><button class=\"duration-300 ease-out ...\">Button B</button><button class=\"duration-300 ease-in-out ...\">Button C</button>\n```\n\nExample:\n```text\n<button class=\"ease-[cubic-bezier(0.95,0.05,0.795,0.035)] ...\">  <!-- ... --></button>\n```\n\nExample:\n```text\n<button class=\"ease-(--my-ease) ...\">  <!-- ... --></button>\n```\n\nExample:\n```text\n<button class=\"ease-out md:ease-in ...\">  <!-- ... --></button>\n```\n\nExample:\n```text\n@theme {  --ease-in-expo: cubic-bezier(0.95, 0.05, 0.795, 0.035); }\n```\n\nExample:\n```text\n<button class=\"ease-in-expo\">  <!-- ... --></button>\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:47.156Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":6,"totalLines":31,"estimatedTokens":165}}374{"id":"doc-install_tailwind_css_with_ruby_on_rails_tailwind-6ec46b27","source":"documentation","title":"Install Tailwind CSS with Ruby on Rails - Tailwind CSS","url":"https://tailwindcss.com/docs/installation/framework-guides/ruby-on-rails","text":"Example:\n```text\nrails new my-projectcd my-project\n```\n\nExample:\n```text\nbundle add tailwindcss-rails./bin/rails tailwindcss:install\n```\n\nExample:\n```text\n./bin/dev\n```\n\nExample:\n```text\n<h1 class=\"text-3xl font-bold underline\">  Hello world!</h1>\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:47.167Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":4,"totalLines":21,"estimatedTokens":67}}375{"id":"doc-content_typography_tailwind_css-59da1988","source":"documentation","title":"content - Typography - Tailwind CSS","url":"https://tailwindcss.com/docs/content","text":"Example:\n```text\n<p>Higher resolution means more than just a better-quality image. With aRetina 6K display, <a class=\"text-blue-600 after:content-['_↗']\" href=\"...\">Pro Display XDR</a> gives you nearly 40 percent more screen real estate thana 5K display.</p>\n```\n\nExample:\n```text\n<p before=\"Hello World\" class=\"before:content-[attr(before)] ...\">  <!-- ... --></p>\n```\n\nExample:\n```text\n<p class=\"before:content-['Hello_World'] ...\"></p>\n```\n\nExample:\n```text\n<p class=\"before:content-['Hello\\_World']\"></p>\n```\n\nExample:\n```text\n<p class=\"content-(--my-content)\"></p>\n```\n\nExample:\n```text\n<p class=\"before:content-['Mobile'] md:before:content-['Desktop'] ...\"></p>\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:47.209Z","totalSectionsIncluded":0,"totalCodeBlocksIncluded":6,"totalLines":31,"estimatedTokens":172}}376{"id":"doc-comments_overview-769d896f","source":"documentation","title":"Comments Overview","url":"https://vercel.com/docs/comments","text":"Cross-link (/docs/comments)From the Vercel docs graph (built :14.592Z), spanning vercel.com docs + KB, nextjs.org, ai-sdk.dev, and other Vercel documentation sites. Full graph as ://vercel.com/docs/graph.jsonSemantically closest pagesEnabling Comments — Learn when and where Comments are available, and how to enable and disable Comments at the account, project, and sessionUsing Comments — This guide will help you get started with using Comments with your Vercel Preview Deployments.Managing Comments — Learn how to manage Comments on your Preview Deployments from Team members and invited collaborators.Integrations — Learn how Comments integrates with Git providers like GitHub, GitLab, and BitBucket, as well as the Vercel app for SlackToolbar — Learn how to use the Vercel Toolbar to leave feedback, navigate through important dashboard pages, share deployments, usThis page links to (9)Enabling Comments — Learn when and where Comments are available, and how to enable and disable Comments at the account, project, and sessionIntegrations — Learn how Comments integrates with Git providers like GitHub, GitLab, and BitBucket, as well as the Vercel app for SlackManaging Comments — Learn how to manage Comments on your Preview Deployments from Team members and invited collaborators.Using Comments — This guide will help you get started with using Comments with your Vercel Preview Deployments.Environments — Environments are for developing locally, testing changes in a pre-production environment, and serving end-users in produSharing a Preview Deployment — Learn how to share a preview deployment with your team and external collaborators.Toolbar — Learn how to use the Vercel Toolbar to leave feedback, navigate through important dashboard pages, share deployments, usAdd to Environments — Learn how to use the Vercel Toolbar in production and local environments.Add to Production — Learn how to add the Vercel Toolbar to your production environment and how your team members can use tooling to access tPages that link here (12)By (12)Account Management — Learn how to manage your Vercel account and team members.Tools — Available tools in Vercel MCP for searching docs, managing teams, projects, deployments, Web Analytics, runtime logs andBypass Deployment Protection — Learn how to bypass Deployment Protection for specific domains, or for all deployments in a project.Sharable Links — Learn how to share your deployments with external users.Restrict access to deployments with Vercel Authentication — Vercel Authentication restricts access to your deployments so only authorized users can view and comment on your site.Sharing a Preview Deployment — Learn how to share a preview deployment with your team and external collaborators.Glossary — Learn about the terms and concepts used in Vercel's products and documentation.Kubernetes — Deploy your frontend on Vercel alongside your existing Kubernetes infrastructure.Hobby Plan — Learn about the Hobby plan and how it compares to the Pro plan.General Settings — Configure basic settings for your Vercel project, including the project name, build and development settings, root direcTransferring a project — Learn how to transfer a project between Vercel teams.Toolbar — Learn how to use the Vercel Toolbar to leave feedback, navigate through important dashboard pages, share deployments, us\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:51.080Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":0,"totalLines":3,"estimatedTokens":842}}377{"id":"doc-observability-9344c44e","source":"documentation","title":"Observability","url":"https://vercel.com/docs/observability","text":"Cross-link (/docs/observability)From the Vercel docs graph (built :14.592Z), spanning vercel.com docs + KB, nextjs.org, ai-sdk.dev, and other Vercel documentation sites. Full graph as ://vercel.com/docs/graph.jsonSemantically closest pagesObservability Plus — Learn about using Observability Plus and its limits.Manage & Optimize — Learn how to understand the different charts in the Vercel dashboard, how usage relates to billing, and how to optimizeInsights — List of available data sources that you can view and monitor with Observability on Vercel.Query — Query and visualize your Vercel usage, traffic, and more in observability.Monitoring — Query and visualize your Vercel usage, traffic, and more with Monitoring.This page links to (5)Notebooks — Learn more about Notebooks and how they allow you to organize and save your queries.Debug 500 Errors — Find, fix, and verify production 500 errors using the Vercel CLI.Insights — List of available data sources that you can view and monitor with Observability on Vercel.Observability Plus — Learn about using Observability Plus and its limits.Monitoring — Query and visualize your Vercel usage, traffic, and more with Monitoring.Pages that link here (52)By (27) · workflow (1) · vercel-docs (24)From vercel-kbHow to architect an AI evaluation dashboard on Vercel — Map eval orchestration, traces, and run storage to AI Gateway, Observability, and Marketplace Postgres, and learn when sHow to prepare your storefront for Black Friday traffic — A practical checklist for keeping your storefront fast and your checkout path healthy through Black Friday and Cyber MonDebug routing on Vercel — Learn how to debug how Vercel decides where to route your requestRunning Docker on Vercel — Learn how to run Docker on Vercel by deploying OCI container images as Vercel Functions, storing them in Vercel ContaineHosting your API on Vercel — Learn how to build and scale performant APIs on Vercel.How do I lower my Vercel Function execution time? — Learn how to lower your Serverless Function execution time.Building AI apps on overview — Learn the key AI concepts and tools for building and scaling AI apps.How to Optimize Next.js + Sitecore JSS — This guide covers performance and usage considerations when building and deploying your Next.js and Sitecore JSS applicaHow to Optimize RSC Payload Size — Learn how to use React Server Components efficiently in Next.js to reduce cost and improve performanceHow to Utilize Vercel’s Bot Management Features — A practical, step-by-step guide to identifying unwanted automated traffic and securing your Vercel apps with Bot ProtectHow can I improve function cold start performance on Vercel? — Learn how to confirm whether cold starts cause function latency on Vercel, and how Fluid compute reduces how often theyIncremental Migrations with Microfrontends — Learn how to migrate legacy applications using microfrontendsInvestigate latency issues and slowness on Vercel — Learn how to use Observability to investigate latency issues and slowness on Vercel.Translate Kubernetes manifests to vercel.json — Translate Kubernetes Deployments, Services, Ingress, ConfigMaps, and CronJobs into vercel.json configuration and VercelMigrate self-hosted Next.js and containers from AWS to Vercel — Migrate containers from AWS to with Dockerfile.vercel, keep RDS, S3, and SQS in AWS over OIDC, and cut ovTroubleshoot and optimize Active CPU usage on Fluid compute — Diagnose which routes drive Active CPU usage and learn to optimize it. Separate traffic growth from per-request CPU workProduction architecture for a RAG chatbot on Vercel — Architect a production RAG chatbot on Vercel Functions with Fluid compute, AI Gateway, and a region-pinned vector store.How to ship an H3 app on Vercel — Deploy an H3 app to Vercel with zero configuration. Learn to configure streaming, middleware, cron jobs, the Bun runtimeHow to ship a Koa app on Vercel — Deploy a Koa app to Vercel with zero configuration. Learn how to ship from the Vercel CLI or Git, and configure responseHow to ship a NestJS app on Vercel — Deploy a NestJS app to Vercel with zero configuration. Learn how to ship from a template, the Nest CLI, or Git, and confTroubleshooting Build Error: \"Build step did not complete within the maximum of 45 minutes\" — Learn common reasons Vercel builds hit the 45-minute limit and how to reduce build times so your deployments stay fast aTroubleshooting Builds Failing with SIGKILL or Out of Memory Errors — Learn how to troubleshoot builds failing with SIGKILL or Out of Memory errors on a Vercel Deployment.Understand the Cost Impact of Function Invocations — Learn how to use Observability to understand function invocations and their cost impact.Using Vercel as a Standalone CDN — Use Vercel's external rewrites to proxy and cache content from external websites or APIs through Vercel's global edge neDoes Vercel support Kubernetes? — Vercel doesn't run Kubernetes clusters. Learn how Kubernetes workloads like Deployments, Ingress, ConfigMaps, and CronJoHow to Build a Weather API with Nitro and Vercel — Provide real-time weather data to apps and websites with a single Nitro route, Vercel cache storage, and Observability.How to stop Vercel Functions from timing out — Vercel Functions that time out usually trace back to a few causes. Learn how Fluid Compute fixes most of them and how toFrom workflowStep executed multiple times — Diagnose duplicate step_started events caused by function timeouts, OOMs, or network issues.From vercel-docsBot Management — Learn how to manage bot traffic to your site.eve — Learn how to deploy and run durable backend AI agents built with the open-source eve framework on Vercel.Observability — View agent runs in the Vercel dashboard with no setup, and optionally export AI SDK spans through OpenTelemetry.Nitro — Deploy Nitro applications to Vercel with zero configuration. Learn about observability, ISR, and custom build configuratCreate React App — Learn how to use Vercel's features with Create React AppVite + Nitro — Add a backend to any Vite app with Nitro and deploy to Vercel with zero configuration.Container Images — Deploy OCI container images with a Dockerfile or Containerfile on Vercel Functions.Debug Slow Functions — Diagnose and fix slow Vercel Functions using CLI tools, logs, and timing analysis.Kubernetes — Deploy your frontend on Vercel alongside your existing Kubernetes infrastructure.Limits — Look up account limits, usage summaries, rate limits, and resource constraints for every Vercel plan.Manage & Optimize — Learn how to understand the different charts in the Vercel dashboard, how usage relates to billing, and how to optimizeTesting & Troubleshooting — Learn about testing & troubleshooting on Vercel.Debug 500 Errors — Find, fix, and verify production 500 errors using the Vercel CLI.Observability Plus — Learn about using Observability Plus and its limits.Plans — Learn about the different plans available on Vercel.Enterprise Plan — Learn about the Enterprise plan for Vercel, including features, pricing, and more.Pricing — Learn about Vercel's pricing model, including the resources and services that are billed, and how they are priced.Products — Explore all Vercel products and capabilities.Projects — A project is the application that you have deployed to Vercel.Getting Started — In this quickstart guide, you'll discover how to create and execute a query to visualize the most popular posts on yourRouting Middleware — Learn how you can use Routing Middleware, code that executes before a request is processed on a site, to provide speed aSession Tracing — Learn how to trace your sessions to understand performance and infrastructure details.Blob — Vercel Blob is a scalable, cost-effective object storage service with private and public access modes for files of any sPricing and Limits — Understand how Vercel Workflows billing works and the limits that apply to runs, streams, and platform resources.\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:51.182Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":0,"totalLines":3,"estimatedTokens":1995}}378{"id":"doc-services-43644ae2","source":"documentation","title":"Services","url":"https://vercel.com/docs/services","text":"Cross-link (/docs/services)From the Vercel docs graph (built :14.592Z), spanning vercel.com docs + KB, nextjs.org, ai-sdk.dev, and other Vercel documentation sites. Full graph as ://vercel.com/docs/graph.jsonSemantically closest pagesExperimental Services — The experimentalServices configuration model for deploying multiple backends and frontends in a single Vercel project.The Complete Guide to Vercel Services — Vercel Services let you deploy multiple frontends and backends in one project on a shared domain. Learn how to define seServices — Learn how a deployment with multiple services is structured in the Build Output API.Routing — Learn how Vercel routes public requests to services and how each service handles its own routes.Service configuration reference — Options available for service configuration.This page links to (7)Container Images — Deploy OCI container images with a Dockerfile or Containerfile on Vercel Functions.Concepts — Learn delivery, retries, visibility timeouts, and deployment isolation in Vercel Queues.Service bindings — Call one service from another using caller-declared service bindings.Service configuration reference — Options available for service configuration.Experimental Services — The experimentalServices configuration model for deploying multiple backends and frontends in a single Vercel project.Pricing and Limits — Understand how billing works for Vercel Services, what's charged, and which limits apply.Routing — Learn how Vercel routes public requests to services and how each service handles its own routes.Pages that link here (31)By (2) · vercel-kb (15) · vercel-docs (14)From eveNuxt — Run an eve agent and a Nuxt app as one project with the eve/nuxt module.SvelteKit — Run an eve agent and a SvelteKit app as one project with the eveSvelteKit Vite plugin.From vercel-kbDeploy Go apps on Vercel using Docker — Deploy an existing Dockerized Go app to Vercel using Memos as a real-world example, with Neon Postgres for durable data.Deploy a Node.js Fastify app on Vercel with Docker — Build a Node.js application with Fastify and Docker, then deploy it to Vercel Functions. Learn how to configure environmDeploy PHP on Vercel with Docker — Build a PHP application with FrankenPHP and Docker, then deploy it to Vercel Functions with managed configuration, storaDeploy Rust on Vercel with Docker — Build a Rust application with Axum and Docker, then deploy it to Vercel Functions. Learn how to configure environment vaHow Docker Compose concepts map to Vercel — Translate your Docker Compose file to services become Vercel Services, networks become bindings, and volRunning Docker on Vercel vs Render — Compare how Vercel and Render run Docker workloads, including deployment model, scaling, image sources, state, and netwoDeploy ASP.NET Core on Vercel with Docker — Build a .NET application with Docker and deploy it to Vercel Functions. Learn how to configure environment variables, inTranslate Kubernetes manifests to vercel.json — Translate Kubernetes Deployments, Services, Ingress, ConfigMaps, and CronJobs into vercel.json configuration and VercelHow to migrate from Google Cloud Run to Vercel — Migrate from Cloud Run to Vercel by copying your Dockerfile to Dockerfile.vercel, aligning the PORT contract, moving secHow to migrate from Render to Vercel — Migrate from Render to web services, cron jobs, and containers to their equivalents, and handle what doesn'tBuild Figma-style multiplayer cursors with WebSockets on Vercel — Learn how to build Figma-style multiplayer cursors with Next.js and FastAPI, kept consistent across multiple Vercel FuncBuild Notion-style real-time presence with WebSockets on Vercel — Build the avatar faces that appear when a teammate opens a page and vanish when they leave. Powered by a Hono WebSocketChoosing how to structure your application on Vercel — Compare three ways to structure an application on Vercel (a single framework, one project with Services, or separate prDoes Vercel support Kubernetes? — Vercel doesn't run Kubernetes clusters. Learn how Kubernetes workloads like Deployments, Ingress, ConfigMaps, and CronJoHow Vercel Services run on Fluid compute — The backends in a Vercel Services project run as Vercel Functions on Fluid compute by default. Learn how optimized concuFrom vercel-docsServices — Learn how a deployment with multiple services is structured in the Build Output API.Container Images — Deploy OCI container images with a Dockerfile or Containerfile on Vercel Functions.Go — Learn how to use the Go runtime to run Go APIs on Vercel.Node.js — Learn how to use the Node.js runtime to create functions and deploy Node.js servers on Vercel.Python — Learn how to use the Python runtime to run Python applications on Vercel.Functions in /api — Learn about functions in /api on Vercel.Glossary — Learn about the terms and concepts used in Vercel's products and documentation.vercel.json — Learn how to use vercel.json to configure and override the default behavior of Vercel from within your project.Concepts — Learn delivery, retries, visibility timeouts, and deployment isolation in Vercel Queues.Poll Mode — Consume messages from Vercel Queues by polling on your own schedule, from any environment.Rewrites — Learn how to use rewrites to send users to different URLs without modifying the visible URL.Service bindings — Call one service from another using caller-declared service bindings.Experimental Services — The experimentalServices configuration model for deploying multiple backends and frontends in a single Vercel project.Routing — Learn how Vercel routes public requests to services and how each service handles its own routes.\n\nExample:\n```text\n{\n  \"services\": {\n    \"my_frontend\": {\n      \"root\": \"frontend/\"\n    },\n    \"my_backend\": {\n      \"root\": \"backend/\",\n      \"entrypoint\": \"main:app\"\n    }\n  },\n  \"rewrites\": [\n    { \"source\": \"/api/(.*)\", \"destination\": { \"service\": \"my_backend\" } },\n    { \"source\": \"/(.*)\", \"destination\": { \"service\": \"my_frontend\" } }\n  ]\n}\n```\n\nExample:\n```text\n{\n  \"services\": { \"api\": { \"root\": \"api/\" } },\n  \"rewrites\": [ { \"source\": \"/(.*)\", \"destination\": { \"service\": \"api\" } } ]\n}\n```\n\nExample:\n```text\n{\n  \"services\": {\n    \"frontend\": {\n      \"runtime\": \"container\",\n      \"root\": \"frontend/\"\n    },\n    \"backend\": {\n      \"runtime\": \"container\",\n      \"root\": \"backend/\"\n    }\n  }\n}\n```\n\nExample:\n```text\nvercel dev\n```\n\nExample:\n```text\nvercel dev -L\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:51.202Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":5,"totalLines":56,"estimatedTokens":1612}}379{"id":"doc-rolling_releases-97e038b7","source":"documentation","title":"Rolling Releases","url":"https://vercel.com/docs/rolling-releases","text":"Cross-link Releases (/docs/rolling-releases)From the Vercel docs graph (built :14.592Z), spanning vercel.com docs + KB, nextjs.org, ai-sdk.dev, and other Vercel documentation sites. Full graph as ://vercel.com/docs/graph.jsonSemantically closest pagesvercel rolling-release — Learn how to manage your project's rolling releases using the vercel rolling-release CLI command.Rolling Release Deployment — Gradually roll out a production deployment using traffic stages, monitoring, and automated abort.How to gradually roll out new versions of your backend — Incrementally release updates to your backend to minimize impact of mistakes.Complete the rolling release for the projectStart a rolling release for the projectThis page links to (8)vercel promote — Learn how to promote an existing deployment using the vercel promote CLI command.vercel rolling-release — Learn how to manage your project's rolling releases using the vercel rolling-release CLI command.Instant Rollback — Learn how to perform an Instant Rollback on your production deployments and quickly roll back to a previously deployed pProject Settings — Use the project settings, to configure custom domains, environment variables, Git, integrations, deployment protection,Point production traffic to a previous production deployment by IDGet rolling release billing statusSkew Protection — Learn how Vercel's Skew Protection ensures that the client and server stay in sync for any particular deployment.Speed Insights — This page lists out and explains all the performance metrics provided by Vercel's Speed Insights feature.Pages that link here (19)By (11) · vercel-docs (8)From vercel-kbImplementing Blue-Green Deployments on Vercel — This guide outlines how to implement blue-green deployments on Vercel, leveraging GitHub Actions for seamless and controConnection Pooling with Vercel Functions — Learn best practices for connecting to relational databases with Vercel Functions and Fluid computeDebug routing on Vercel — Learn how to debug how Vercel decides where to route your requestHow to gradually roll out new versions of your backend — Incrementally release updates to your backend to minimize impact of mistakes.Implementing Canary Deployments on Vercel — This guide explains how to set up canary deployments on Vercel, enabling developers to gradually roll out new versions tVercel vs Akamai — A detailed guide to Vercel vs models, AI infrastructure, framework support, media streaming, CDN capabilVercel vs Fastly — A detailed guide to Vercel vs application platform vs edge infrastructure layer, covering framework sVercel vs Netlify — A detailed guide to Vercel vs , compute architecture, AI infrastructure, security, and when to choose eVercel vs Northflank — A detailed guide to Vercel vs compute, CDN and caching, security defaults, AI infrastructure, GPU compVercel vs Railway — A detailed guide to Vercel vs vs always-on containers, container images via Dockerfile.vercel, frameVercel vs Render — A detailed guide to Vercel vs models, AI infrastructure, Docker support, background workers, and when toFrom vercel-docsAudit Logs — Learn how to track and analyze your team members' activities.vercel rolling-release — Learn how to manage your project's rolling releases using the vercel rolling-release CLI command.Deployment Checks — Set conditions that must be met before proceeding to the next phase of the deployment lifecycle.Backends — Vercel supports a wide range of the most popular backend frameworks, optimizing how your application builds and runs noGlossary — Learn about the terms and concepts used in Vercel's products and documentation.How Vercel CDN works — Learn how Vercel's CDN processes requests through routing, caching, and compute layers to deliver your content with lowDeploy MCP servers — Learn how to deploy Model Context Protocol (MCP) servers on Vercel with OAuth authentication and efficient scaling.Rolling Release Deployment — Gradually roll out a production deployment using traffic stages, monitoring, and automated abort.\n\nExample:\n```text\ncurl -X POST \"https://api.vercel.com/v1/projects/my-project/rolling-release/start?teamId=team_123\" \\\n  -H \"Authorization: Bearer $VERCEL_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"canaryDeploymentId\":\"dpl_abc123\"}'\n```\n\nExample:\n```text\ncurl -X POST \"https://api.vercel.com/v1/projects/my-project/rolling-release/complete?teamId=team_123\" \\\n  -H \"Authorization: Bearer $VERCEL_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"canaryDeploymentId\":\"dpl_abc123\"}'\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:51.205Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":2,"totalLines":19,"estimatedTokens":1139}}380{"id":"doc-troubleshooting_domains-8011a81f","source":"documentation","title":"Troubleshooting domains","url":"https://vercel.com/docs/domains/troubleshooting","text":"Cross-link Domains (/docs/domains/troubleshooting)From the Vercel docs graph (built :14.592Z), spanning vercel.com docs + KB, nextjs.org, ai-sdk.dev, and other Vercel documentation sites. Full graph as ://vercel.com/docs/graph.jsonSemantically closest pagesWorking with Domains — Learn how domains work and the options Vercel provides for managing them.Can I use my domain on Vercel with A records? — Point your apex domain to Vercel with an A record (76.76.21.21 or your domain card's value), pair it with a www CNAME,How can I manage my Vercel DNS records? — Add, edit, and delete Vercel DNS records from the dashboard, CLI, or REST API, and fix the Invalid Configuration error oConfiguring Domains — Add, verify, redirect, and remove wildcard and custom domains for a multi-tenant application using the Vercel SDK.Managing DNS Records — Learn how to add, verify, and remove DNS records for your domains on Vercel with this guide.PrerequisitesDomains — Learn the fundamentals of how domains, DNS, and nameservers work on Vercel.This page links to (15)Account Management — Learn how to manage your Vercel account and team members.Managing DNS Records — Learn how to add, verify, and remove DNS records for your domains on Vercel with this guide.Working with DNS — Learn how DNS works in order to properly configure your domain.Working with Domains — Learn how domains work and the options Vercel provides for managing them.Adding a Domain — Learn how to add a custom domain to your Vercel project, verify it, and correctly set the DNS or Nameserver values.Transferring Domains — Domains can be transferred to another team or project within Vercel, or to and from a third-party registrar. Learn how tWorking with SSL — Learn how Vercel uses SSL certification to keep your site secure.Pro Plan — Learn about the Vercel Pro plan with credit-based billing, free viewer seats, and self-serve enterprise features for proCan I get a refund for a domain purchased or renewed with Vercel? — Information on getting a refund for a domain purchased or renewed with Vercel.Why is my domain not automatically generating an SSL/TLS certificate? — Information on why a domain may not be automatically generating an SSL/TLS certificate.How long will it take for my Vercel DNS records to update? — Information on the length of time it may take for Vercel DNS changes to take place.How can I manage my Vercel DNS records? — Add, edit, and delete Vercel DNS records from the dashboard, CLI, or REST API, and fix the Invalid Configuration error oHow do I send and receive emails with my Vercel purchased domain? — Information on how to send and receive emails with a domain purchased from Vercel.Why am I no longer receiving email after adding my domain to Vercel? — Fix email that stopped working after adding your domain to Vercel, with a concrete MX record table and the DNS preset clWhy must we use the Domain Nameservers method for Wildcard Domains on Vercel? — Learn why the domain Nameservers method is needed to set up a wildcard domain as custom domain.Pages that link here (10)By (4) · vercel-docs (6)From vercel-kbCan I use my domain on Vercel with A records? — Point your apex domain to Vercel with an A record (76.76.21.21 or your domain card's value), pair it with a www CNAME,Debug routing on Vercel — Learn how to debug how Vercel decides where to route your requestHow can I manage my Vercel DNS records? — Add, edit, and delete Vercel DNS records from the dashboard, CLI, or REST API, and fix the Invalid Configuration error oHow to resolve IP blocking issues — Learn to troubleshoot IP blocking issues for both shared and personal networks.From vercel-docsDomains — Learn the fundamentals of how domains, DNS, and nameservers work on Vercel.Working with DNS — Learn how DNS works in order to properly configure your domain.Working with Domains — Learn how domains work and the options Vercel provides for managing them.Working with Nameservers — Learn about nameservers and the benefits Vercel nameservers provide.Working with SSL — Learn how Vercel uses SSL certification to keep your site secure.Production Checklist — Ensure your application is ready for launch with this comprehensive production checklist by the Vercel engineering team.\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:51.259Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":0,"totalLines":3,"estimatedTokens":1064}}381{"id":"doc-vercel_commerce_and_payments_integrations-dfed6d96","source":"documentation","title":"Vercel Commerce and Payments Integrations","url":"https://vercel.com/docs/integrations/ecommerce?from=graph","text":"Cross-link and Payments (/docs/integrations/ecommerce)From the Vercel docs graph (built :14.592Z), spanning vercel.com docs + KB, nextjs.org, ai-sdk.dev, and other Vercel documentation sites. Full graph as ://vercel.com/docs/graph.jsonSemantically closest pagesStripe — Connect your Stripe account to Vercel and accept payments in your applications.Overview — Learn how to extend Vercel's capabilities by integrating with your preferred providers for AI, databases, headless conteInstall an Integration — Learn how to pair Vercel's functionality with a third-party service to streamline observability, integrate with testingHow to deploy a Next.js online store with Stripe — Learn how to build and deploy a Next.js e-commerce store with Stripe payments on Vercel. This step-by-step guide coversMarketplace Vercel API — Learn about marketplace vercel api on Vercel.PrerequisitesOverview — Learn how to extend Vercel's capabilities by integrating with your preferred providers for AI, databases, headless conteThis page links to (2)Stripe — Connect your Stripe account to Vercel and accept payments in your applications.Deploy a headless Shopify storefront with Vercel — Deploy a headless Shopify storefront using the Next.js Commerce template on Vercel\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:51.359Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":0,"totalLines":3,"estimatedTokens":317}}382{"id":"doc-vercel_build-bc4956ee","source":"documentation","title":"vercel build","url":"https://vercel.com/docs/cli/build","text":"Cross-link build (/docs/cli/build)From the Vercel docs graph (built :14.592Z), spanning vercel.com docs + KB, nextjs.org, ai-sdk.dev, and other Vercel documentation sites. Full graph as ://vercel.com/docs/graph.jsonSemantically closest pagesDeploying from CLI — Learn how to deploy your Vercel Projects from Vercel CLI using the vercel or vercel deploy commands.vercel deploy — Learn how to deploy your Vercel projects using the vercel deploy CLI command.Build System — Learn how Vercel transforms your source code into optimized assets ready to serve globally.vercel dev — Learn how to replicate the Vercel deployment environment locally and test your Vercel Project before deploying using theBuilds — Understand how the build step works when creating a Vercel Deployment.PrerequisitesCLI — Learn how to use the Vercel command-line interface (CLI) to manage and configure your Vercel Projects from the commandThis page links to (3)Build Output API — The Build Output API is a file-system-based specification for a directory structure that can produce a Vercel deploymentEnvironments — Environments are for developing locally, testing changes in a pre-production environment, and serving end-users in produHow can I use the Vercel CLI for custom workflows? — You can use the Vercel CLI to deploy any application, including custom git providers and restricted source code.Pages that link here (5)By (1) · vercel-docs (4)From vercel-kbTroubleshooting Vercel Cron Jobs — Learn how to troubleshoot cron jobs that aren't being run or logged when using Vercel Cron Jobs.From vercel-docsCLI — Learn how to use the Vercel command-line interface (CLI) to manage and configure your Vercel Projects from the commandvercel deploy — Learn how to deploy your Vercel projects using the vercel deploy CLI command.Deploying from CLI — Learn how to deploy your Vercel Projects from Vercel CLI using the vercel or vercel deploy commands.vercel env — Learn how to manage your environment variables in your Vercel Projects using the vercel env CLI command.\n\nExample:\n```text\nvercel build\n```\n\nExample:\n```text\nvercel build --prod\n```\n\nExample:\n```text\nvercel build --yes\n```\n\nExample:\n```text\nvercel build --target=staging\n```\n\nExample:\n```text\nvercel build --output ./custom-output\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:51.385Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":5,"totalLines":28,"estimatedTokens":570}}383{"id":"doc-vercel_cache-2762395e","source":"documentation","title":"vercel cache","url":"https://vercel.com/docs/cli/cache","text":"Cross-link cache (/docs/cli/cache)From the Vercel docs graph (built :14.592Z), spanning vercel.com docs + KB, nextjs.org, ai-sdk.dev, and other Vercel documentation sites. Full graph as ://vercel.com/docs/graph.jsonSemantically closest pagesPurge CDN Cache — Learn how to invalidate and delete cached content on Vercel's CDN, including cache keys and manual purging options.Debug Cache Issues — Diagnose stale content and fix CDN cache, data cache, and build cache issues using the CLI.Manage cache tags for external origins — Learn how to use cache tags to optimally serve fresh content on Vercel when content from your external origin changesData Cache — Vercel Data Cache is a specialized cache that stores responses from data fetches in Next.js App RouterCache Status — Understand the cache status and reason shown for each request in Vercel logs, and what causes a response to miss, bypassPrerequisitesCLI — Learn how to use the Vercel command-line interface (CLI) to manage and configure your Vercel Projects from the commandThis page links to (3)CDN Cache — Learn how Vercel's CDN cache stores your content across a global network to reduce latency and origin load.Purge CDN Cache — Learn how to invalidate and delete cached content on Vercel's CDN, including cache keys and manual purging options.Runtime Cache — Vercel Runtime Cache is a specialized cache that stores responses from data fetches in Vercel functionsPages that link here (3)By (3)Debug Cache Issues — Diagnose stale content and fix CDN cache, data cache, and build cache issues using the CLI.Purge CDN Cache — Learn how to invalidate and delete cached content on Vercel's CDN, including cache keys and manual purging options.CLI — Learn how to use the Vercel command-line interface (CLI) to manage and configure your Vercel Projects from the command\n\nExample:\n```text\nvercel cache purge\n```\n\nExample:\n```text\nvercel cache purge --type cdn\n```\n\nExample:\n```text\nvercel cache purge --type data\n```\n\nExample:\n```text\nvercel cache invalidate --tag blog-posts\n```\n\nExample:\n```text\nvercel cache dangerously-delete --tag blog-posts\n```\n\nExample:\n```text\nvercel cache invalidate --srcimg /api/avatar/1\n```\n\nExample:\n```text\nvercel cache dangerously-delete --srcimg /api/avatar/1\n```\n\nExample:\n```text\nvercel cache dangerously-delete --srcimg /api/avatar/1 --revalidation-deadline-seconds 604800\n```\n\nExample:\n```text\nvercel cache invalidate --tag blog-posts,user-profiles,homepage\n```\n\nExample:\n```text\nvercel cache dangerously-delete --tag blog-posts --revalidation-deadline-seconds 3600\n```\n\nExample:\n```text\nvercel cache purge --yes\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:51.386Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":11,"totalLines":58,"estimatedTokens":655}}384{"id":"doc-vercel_global_config-b1cb26c4","source":"documentation","title":"vercel global-config","url":"https://vercel.com/docs/cli/global-config","text":"Cross-link global-config (/docs/cli/global-config)From the Vercel docs graph (built :14.592Z), spanning vercel.com docs + KB, nextjs.org, ai-sdk.dev, and other Vercel documentation sites. Full graph as ://vercel.com/docs/graph.jsonSemantically closest pagesGlobal Configs & Dashboard — Learn how to create, view and update your Global Configs and the data inside them in your Vercel Dashboard at the HobbyUsing Global Config — Learn how to use Global Configs in your projects.Global Configs & REST API — Learn how to use the Vercel REST API to create and update Global Configs. You can also read data stored in Global ConfigGet Global Config itemsCreate a Global ConfigPrerequisitesCLI — Learn how to use the Vercel command-line interface (CLI) to manage and configure your Vercel Projects from the commandThis page links to (3)Global Config — A Global Config is a global data store that enables experimentation with feature flags, A/B testing, critical redirects,Global Configs & Dashboard — Learn how to create, view and update your Global Configs and the data inside them in your Vercel Dashboard at the HobbyUpdate Global Config items in batchPages that link here (2)By (2)CLI — Learn how to use the Vercel command-line interface (CLI) to manage and configure your Vercel Projects from the commandMigration Guide — Learn what changed when Edge Config was renamed to Global Config, and how to migrate your connection strings, SDK, and e\n\nExample:\n```text\nvercel global-config [subcommand]\n```\n\nExample:\n```text\nvercel global-config\nvercel global-config list\nvercel global-config list --format json\n```\n\nExample:\n```text\nvercel global-config add flags\nvercel global-config add flags --items '{\"betaUiEnabled\":true,\"region\":\"sfo1\"}'\n```\n\nExample:\n```text\nvercel global-config get flags\nvercel global-config get ecfg_abc123 --format json\n```\n\nExample:\n```text\nvercel global-config update flags --slug feature-flags\nvercel global-config update flags --patch '{\"items\":[{\"operation\":\"upsert\",\"key\":\"betaUiEnabled\",\"value\":true}]}'\n```\n\nExample:\n```text\nvercel global-config remove flags --yes\n```\n\nExample:\n```text\nvercel global-config items flags\nvercel global-config items flags --key betaUiEnabled\n```\n\nExample:\n```text\nvercel global-config tokens flags\nvercel global-config tokens flags --add \"Production read\"\nvercel global-config tokens flags --remove tok_abc123 --yes\n```\n\nExample:\n```text\nvercel global-config backups flags\nvercel global-config backups flags --backup-version backup_version_abc123 --format json\nvercel global-config backups flags --restore backup_version_abc123 --yes\n```\n\nExample:\n```text\nvercel global-config add flags --items '{\"betaUiEnabled\":false,\"region\":\"sfo1\"}'\n```\n\nExample:\n```text\nvercel global-config update flags --patch '{\"items\":[\n  {\"operation\":\"upsert\",\"key\":\"betaUiEnabled\",\"value\":true},\n  {\"operation\":\"delete\",\"key\":\"oldFlag\"}\n]}'\n```\n\nExample:\n```text\nvercel global-config tokens flags --add \"Production read\"\n```\n\nExample:\n```text\nvercel global-config backups flags --restore backup_version_abc123 --yes\n```\n\nExample:\n```text\nhttps://global-config.vercel.com/<globalConfigId>?token=<token>\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:51.406Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":14,"totalLines":86,"estimatedTokens":789}}385{"id":"doc-deployment_protection_exceptions-a299a453","source":"documentation","title":"Deployment Protection Exceptions","url":"https://vercel.com/docs/deployment-protection/methods-to-bypass-deployment-protection/deployment-protection-exceptions","text":"Deployment ProtectionBypass Deployment ProtectionExceptions\n\nCross-link (/docs/deployment-protection/methods-to-bypass-deployment-protection/deployment-protection-exceptions)From the Vercel docs graph (built :14.592Z), spanning vercel.com docs + KB, nextjs.org, ai-sdk.dev, and other Vercel documentation sites. Full graph as ://vercel.com/docs/graph.jsonSemantically closest pagesDeployment Protection — Learn how to control access to your Vercel project's preview and production URLs with Deployment Protection. Configure pBypass Deployment Protection — Learn how to bypass Deployment Protection for specific domains, or for all deployments in a project.Protect Deployments — Vercel offers several methods to protect your Authentication, Passport, Password Protection, and TruHow to lock down deployments on Vercel and v0 — Protect who can see your deployments.Restrict access to deployments with Vercel Authentication — Vercel Authentication restricts access to your deployments so only authorized users can view and comment on your site.PrerequisitesDeployment Protection — Learn how to control access to your Vercel project's preview and production URLs with Deployment Protection. Configure pBypass Deployment Protection — Learn how to bypass Deployment Protection for specific domains, or for all deployments in a project.This page links to (4)Deployment Protection — Learn how to control access to your Vercel project's preview and production URLs with Deployment Protection. Configure pPassword Protection — Require visitors to enter a password before they can view your deployments.Trusted IPs — Trusted IPs let you restrict access to your deployments to a list of allowed IP addresses.Restrict access to deployments with Vercel Authentication — Vercel Authentication restricts access to your deployments so only authorized users can view and comment on your site.Pages that link here (5)By (1) · vercel-docs (4)From eveSlack — Reach your agent from Slack app mentions and DMs with Vercel Connect-managed credentials, threaded replies, and interactFrom vercel-docsDeployment Protection — Learn how to control access to your Vercel project's preview and production URLs with Deployment Protection. Configure pAutomated & Agent Access — Grant AI agents, CI/CD pipelines, MCP servers, and testing tools access to Vercel deployments that have Deployment ProteBypass Deployment Protection — Learn how to bypass Deployment Protection for specific domains, or for all deployments in a project.Security — Learn about security on Vercel.\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:51.464Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":0,"totalLines":5,"estimatedTokens":638}}386{"id":"doc-quickstart-f799c29d","source":"documentation","title":"Quickstart","url":"https://vercel.com/docs/connect/quickstart","text":"Cross-link (/docs/connect/quickstart)From the Vercel docs graph (built :14.592Z), spanning vercel.com docs + KB, nextjs.org, ai-sdk.dev, and other Vercel documentation sites. Full graph as ://vercel.com/docs/graph.jsonSemantically closest pagesConnect — Use Vercel Connect to create connectors, authorize provider access, request provider tokens at runtime, and run agent woAuthentication — Every Vercel Connect token request has two legs that both have to caller calling Vercel Connect, and VGive your agents secure access to third-party APIs — Use Vercel Connect to call provider APIs like Slack, GitHub, Linear, Discord, Notion, Figma, Snowflake, and Salesforce fSDK Reference — API reference for @vercel/connect, the TypeScript SDK for requesting runtime tokens from Vercel Connect.Build an integrations hub with Nuxt and Vercel Connect — Build an Integrations Hub with Nuxt and Vercel Connect. Connect GitHub and Linear over OAuth and mint short-lived tokensPrerequisitesConnect — Use Vercel Connect to create connectors, authorize provider access, request provider tokens at runtime, and run agent woThis page links to (8)CLI — Learn how to use the Vercel command-line interface (CLI) to manage and configure your Vercel Projects from the commandvercel connect — Learn how to manage Vercel Connect connectors using the vercel connect CLI command.Concepts — Understand the core building blocks of Vercel , installations, tokens, project links, triggers, and aAuthentication — Every Vercel Connect token request has two legs that both have to caller calling Vercel Connect, and VTokens — Short-lived provider credentials issued by Vercel Connect. Each token request specifies a subject, optional installationPricing and Limits — How Vercel Connect is billed across plans, how to stop being billed, and the platform limits that apply during beta.SDK Reference — API reference for @vercel/connect, the TypeScript SDK for requesting runtime tokens from Vercel Connect.Environments — Environments are for developing locally, testing changes in a pre-production environment, and serving end-users in produPages that link here (12)By (6) · vercel-docs (6)From vercel-kbBuild your own Slackbot with Vercel Connect — Learn how to build your very own Slackbot with Chat SDK and AI SDK. Vercel Connect supplies runtime Slack tokens and forBuild a GitHub agent with Vercel Connect — Build a GitHub agent that helps your team work through issues and PRs. Chat SDK handles the interactivity and AI SDK runBuild a Linear agent with Vercel Connect — Build a native Linear Agent that helps your team manage issues. Mention it on any issue and it responds in real time, poBuild an integrations hub with Nuxt and Vercel Connect — Build an Integrations Hub with Nuxt and Vercel Connect. Connect GitHub and Linear over OAuth and mint short-lived tokensHow to build a Slack bot that manages files in Vercel Blob — Build a Slack bot using Chat SDK, AI SDK, and Files SDK that can list, read, upload, and delete files in Vercel Blob thrGive your agents secure access to third-party APIs — Use Vercel Connect to call provider APIs like Slack, GitHub, Linear, Discord, Notion, Figma, Snowflake, and Salesforce fFrom vercel-docsvercel connect — Learn how to manage Vercel Connect connectors using the vercel connect CLI command.Connect — Use Vercel Connect to create connectors, authorize provider access, request provider tokens at runtime, and run agent woConcepts — Understand the core building blocks of Vercel , installations, tokens, project links, triggers, and aConnectors — A connector is the team-owned record that represents one third-party service. Its type determines which capabilities areTriggers — Incoming webhooks from third-party services, verified by Vercel Connect and forwarded to your projects.SDK Reference — API reference for @vercel/connect, the TypeScript SDK for requesting runtime tokens from Vercel Connect.\n\nExample:\n```text\nmkdir my-connect-app && cd my-connect-app\npnpm init\nvercel link\n```\n\nExample:\n```text\nvercel env pull\n```\n\nExample:\n```text\nvercel connect create mcp.linear.app --name linear\n```\n\nExample:\n```text\nvercel connect attach oauth/linear\n```\n\nExample:\n```text\nnpm install @vercel/connect dotenv @types/node tsx typescript\n```\n\nExample:\n```text\nyarn add @vercel/connect dotenv @types/node tsx typescript\n```\n\nExample:\n```text\npnpm add @vercel/connect dotenv @types/node tsx typescript\n```\n\nExample:\n```text\nbun add @vercel/connect dotenv @types/node tsx typescript\n```\n\nExample:\n```text\nimport { config } from 'dotenv';\nconfig({ path: '.env.local' });\n \nimport {\n  getTokenResponse,\n  UserAuthorizationRequiredError,\n} from '@vercel/connect';\n \nconst userId = 'user_demo_123';\n \nasync function main() {\n  try {\n    const response = await getTokenResponse('oauth/linear', {\n      subject: { type: 'user', id: userId },\n      scopes: ['read'],\n    });\n \n    console.log(`Got token for ${userId} on ${response.connector.uid}`);\n    console.log(`Expires at: ${new Date(response.expiresAt).toISOString()}`);\n  } catch (error) {\n    if (error instanceof UserAuthorizationRequiredError) {\n      console.log(`User ${userId} has not authorized Linear yet.`);\n      console.log('In a real app, surface the consent URL to the user here.');\n      return;\n    }\n    throw error;\n  }\n}\n \nmain().catch(console.error);\n```\n\nExample:\n```text\nimport { startAuthorization } from '@vercel/connect';\n \nconst { url } = await startAuthorization('oauth/linear', {\n  subject: { type: 'user', id: userId },\n  scopes: ['read'],\n});\n \n// In a web app, redirect the user to `url`.\nconsole.log(`Send the user to: ${url}`);\n```\n\nExample:\n```text\npnpm tsx index.ts\n```\n\nExample:\n```text\nUser user_demo_123 has not authorized Linear yet.\nIn a real app, surface the consent URL to the user here.\n```\n\nExample:\n```text\nGot token for user_demo_123 on oauth/linear\nExpires at: 2026-06-03T22:42:00.000Z\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:51.504Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":13,"totalLines":109,"estimatedTokens":1478}}387{"id":"doc-vite_nitro_on_vercel-3c031c14","source":"documentation","title":"Vite + Nitro on Vercel","url":"https://vercel.com/docs/frameworks/full-stack/vite-with-nitro","text":"FrameworksFull-stackVite + Nitro\n\nCross-link + Nitro (/docs/frameworks/full-stack/vite-with-nitro)From the Vercel docs graph (built :14.592Z), spanning vercel.com docs + KB, nextjs.org, ai-sdk.dev, and other Vercel documentation sites. Full graph as ://vercel.com/docs/graph.jsonSemantically closest pagesNitro — Deploy Nitro applications to Vercel with zero configuration. Learn about observability, ISR, and custom build configuratHow to ship a Nitro app on Vercel — Deploy a Nitro app to Vercel with zero configuration. Learn how to ship from a template, the Vercel CLI, or Git, and conNuxt — Learn how to use Vercel's features with Nuxt.What is the Nitro Vite plugin? — The Nitro Vite plugin (nitro/vite) adds SSR, API routes, and deploy-anywhere server builds to any Vite app. Learn whatVite — Learn how to use Vercel's features with Vite.PrerequisitesSupported Frameworks — Vercel supports a wide range of the most popular frameworks, optimizing how your application builds and runs no matter wFull-stack — Vercel supports a wide range of the most popular backend frameworks, optimizing how your application builds and runs noThis page links to (8)Overview — Vercel's CDN is a globally distributed platform that handles routing, caching, security, and compression for every deploSystem Environment Variables — System environment variables are automatically populated by Vercel, such as the URL of the deployment or the name of theFluid Compute — Learn about fluid compute, an execution model for Vercel Functions that provides a more flexible and efficient way to ruSupported Frameworks — Vercel supports a wide range of the most popular frameworks, optimizing how your application builds and runs no matter wNuxt — Learn how to use Vercel's features with Nuxt.Functions — Run server-side code on Vercel without managing a server.Incremental Static Regeneration — ISR serves cached static pages while regenerating content in the background. Vercel\\Overview — Observability on Vercel provides framework-aware insights enabling you to optimize infrastructure and application perforPages that link here (2)By (1) · vercel-docs (1)From vercel-kbWhat is the Nitro Vite plugin? — The Nitro Vite plugin (nitro/vite) adds SSR, API routes, and deploy-anywhere server builds to any Vite app. Learn whatFrom vercel-docsVite — Learn how to use Vercel's features with Vite.\n\nExample:\n```text\npnpm i nitro\n```\n\nExample:\n```text\nyarn add nitro\n```\n\nExample:\n```text\nnpm i nitro\n```\n\nExample:\n```text\nbun add nitro\n```\n\nExample:\n```text\nimport { defineConfig } from 'vite';\nimport { nitro } from 'nitro/vite';\n \nexport default defineConfig({\n  plugins: [nitro()],\n});\n```\n\nExample:\n```text\nimport { defineHandler } from 'nitro/h3';\n \nexport default defineHandler(() => 'Hello from the server!');\n```\n\nExample:\n```text\nimport { defineHandler } from 'nitro/h3';\n \nexport default defineHandler((event) => {\n  const { id } = event.context.params!;\n  return { userId: id };\n});\n```\n\nExample:\n```text\nimport { defineHandler } from 'nitro/h3';\n \nexport default defineHandler(async (event) => {\n  const body = await event.req.json();\n  return { message: 'User created', data: body };\n});\n```\n\nExample:\n```text\npnpm i nitro react react-dom @vitejs/plugin-react\n```\n\nExample:\n```text\nyarn add nitro react react-dom @vitejs/plugin-react\n```\n\nExample:\n```text\nnpm i nitro react react-dom @vitejs/plugin-react\n```\n\nExample:\n```text\nbun add nitro react react-dom @vitejs/plugin-react\n```\n\nExample:\n```text\nimport { defineConfig } from 'vite';\nimport { nitro } from 'nitro/vite';\nimport react from '@vitejs/plugin-react';\n \nexport default defineConfig({\n  plugins: [nitro(), react()],\n});\n```\n\nExample:\n```text\nimport { useState } from 'react';\n \nexport function App() {\n  const [count, setCount] = useState(0);\n  return (\n    <>\n      <h1>Vite + Nitro + React</h1>\n      <button onClick={() => setCount((c) => c + 1)}>Count is {count}</button>\n    </>\n  );\n}\n```\n\nExample:\n```text\nimport '@vitejs/plugin-react/preamble';\nimport { hydrateRoot } from 'react-dom/client';\nimport { App } from './app.tsx';\n \nhydrateRoot(document.querySelector('#app')!, <App />);\n```\n\nExample:\n```text\nimport './styles.css';\nimport { renderToReadableStream } from 'react-dom/server.edge';\nimport { App } from './app.tsx';\n \nimport clientAssets from './entry-client?assets=client';\nimport serverAssets from './entry-server?assets=ssr';\n \nexport default {\n  async fetch(_req: Request) {\n    const assets = clientAssets.merge(serverAssets);\n    return new Response(\n      await renderToReadableStream(\n        <html lang=\"en\">\n          <head>\n            <meta\n              name=\"viewport\"\n              content=\"width=device-width, initial-scale=1.0\"\n            />\n            {assets.css.map((attr: any) => (\n              <link key={attr.href} rel=\"stylesheet\" {...attr} />\n            ))}\n            {assets.js.map((attr: any) => (\n              <link key={attr.href} rel=\"modulepreload\" {...attr} />\n            ))}\n            <script type=\"module\" src={assets.entry} />\n          </head>\n          <body id=\"app\">\n            <App />\n          </body>\n        </html>,\n      ),\n      { headers: { 'Content-Type': 'text/html;charset=utf-8' } },\n    );\n  },\n};\n```\n\nExample:\n```text\n{\n  \"extends\": \"nitro/tsconfig\",\n  \"compilerOptions\": {\n    \"jsx\": \"react-jsx\",\n    \"jsxImportSource\": \"react\"\n  }\n}\n```\n\nExample:\n```text\npnpm i nitro vue vue-router @vitejs/plugin-vue\n```\n\nExample:\n```text\nyarn add nitro vue vue-router @vitejs/plugin-vue\n```\n\nExample:\n```text\nnpm i nitro vue vue-router @vitejs/plugin-vue\n```\n\nExample:\n```text\nbun add nitro vue vue-router @vitejs/plugin-vue\n```\n\nExample:\n```text\nimport { defineConfig } from 'vite';\nimport { nitro } from 'nitro/vite';\nimport vue from '@vitejs/plugin-vue';\n \nexport default defineConfig({\n  plugins: [vue(), nitro()],\n});\n```\n\nExample:\n```text\nimport type { RouteRecordRaw } from 'vue-router';\n \nexport const routes: RouteRecordRaw[] = [\n  {\n    path: '/',\n    name: 'home',\n    component: () => import('./pages/index.vue'),\n  },\n  {\n    path: '/about',\n    name: 'about',\n    component: () => import('./pages/about.vue'),\n  },\n];\n```\n\nExample:\n```text\nimport { createSSRApp } from 'vue';\nimport { RouterView, createRouter, createWebHistory } from 'vue-router';\nimport { routes } from './routes.ts';\n \nasync function main() {\n  const app = createSSRApp(RouterView);\n  const router = createRouter({ history: createWebHistory(), routes });\n  app.use(router);\n \n  await router.isReady();\n  app.mount('#root');\n}\n \nmain();\n```\n\nExample:\n```text\nimport { createSSRApp } from 'vue';\nimport { renderToString } from 'vue/server-renderer';\nimport { RouterView, createMemoryHistory, createRouter } from 'vue-router';\nimport { routes } from './routes.ts';\n \nimport clientAssets from './entry-client.ts?assets=client';\n \nexport default {\n  async fetch(request: Request): Promise<Response> {\n    const app = createSSRApp(RouterView);\n    const router = createRouter({ history: createMemoryHistory(), routes });\n    app.use(router);\n \n    const url = new URL(request.url);\n    await router.push(url.href.slice(url.origin.length));\n    await router.isReady();\n \n    const renderedApp = await renderToString(app);\n    const html = `<!DOCTYPE html>\n<html lang=\"en\"><head>\n  ${clientAssets.css.map((a: any) => `<link rel=\"stylesheet\" href=\"${a.href}\" />`).join('\\n')}\n  <script type=\"module\" src=\"${clientAssets.entry}\"></script>\n</head><body><div id=\"root\">${renderedApp}</div></body></html>`;\n \n    return new Response(html, {\n      headers: { 'Content-Type': 'text/html;charset=utf-8' },\n    });\n  },\n};\n```\n\nExample:\n```text\n{\n  \"extends\": \"nitro/tsconfig\"\n}\n```\n\nExample:\n```text\npnpm i nitro preact preact-render-to-string @preact/preset-vite\n```\n\nExample:\n```text\nyarn add nitro preact preact-render-to-string @preact/preset-vite\n```\n\nExample:\n```text\nnpm i nitro preact preact-render-to-string @preact/preset-vite\n```\n\nExample:\n```text\nbun add nitro preact preact-render-to-string @preact/preset-vite\n```\n\nExample:\n```text\nimport { defineConfig } from 'vite';\nimport { nitro } from 'nitro/vite';\nimport preact from '@preact/preset-vite';\n \nexport default defineConfig({\n  plugins: [nitro(), preact()],\n});\n```\n\nExample:\n```text\nimport { useState } from 'preact/hooks';\n \nexport function App() {\n  const [count, setCount] = useState(0);\n  return (\n    <button onClick={() => setCount((c) => c + 1)}>Count is {count}</button>\n  );\n}\n```\n\nExample:\n```text\nimport { hydrate } from 'preact';\nimport { App } from './app.tsx';\n \nhydrate(<App />, document.querySelector('#app')!);\n```\n\nExample:\n```text\nimport './styles.css';\nimport { renderToReadableStream } from 'preact-render-to-string/stream';\nimport { App } from './app.tsx';\n \nimport clientAssets from './entry-client?assets=client';\nimport serverAssets from './entry-server?assets=ssr';\n \nexport default {\n  async fetch(_req: Request) {\n    const assets = clientAssets.merge(serverAssets);\n    return new Response(\n      renderToReadableStream(\n        <html lang=\"en\">\n          <head>\n            <meta\n              name=\"viewport\"\n              content=\"width=device-width, initial-scale=1.0\"\n            />\n            {assets.css.map((attr: any) => (\n              <link key={attr.href} rel=\"stylesheet\" {...attr} />\n            ))}\n            {assets.js.map((attr: any) => (\n              <link key={attr.href} rel=\"modulepreload\" {...attr} />\n            ))}\n            <script type=\"module\" src={assets.entry} />\n          </head>\n          <body>\n            <div id=\"app\">\n              <App />\n            </div>\n          </body>\n        </html>,\n      ),\n      { headers: { 'Content-Type': 'text/html;charset=utf-8' } },\n    );\n  },\n};\n```\n\nExample:\n```text\n{\n  \"extends\": \"nitro/tsconfig\",\n  \"compilerOptions\": {\n    \"jsx\": \"react-jsx\",\n    \"jsxImportSource\": \"preact\"\n  }\n}\n```\n\nExample:\n```text\npnpm i nitro solid-js vite-plugin-solid\n```\n\nExample:\n```text\nyarn add nitro solid-js vite-plugin-solid\n```\n\nExample:\n```text\nnpm i nitro solid-js vite-plugin-solid\n```\n\nExample:\n```text\nbun add nitro solid-js vite-plugin-solid\n```\n\nExample:\n```text\nimport { defineConfig } from 'vite';\nimport { nitro } from 'nitro/vite';\nimport solid from 'vite-plugin-solid';\n \nexport default defineConfig({\n  plugins: [solid({ ssr: true }), nitro()],\n  esbuild: { jsx: 'preserve', jsxImportSource: 'solid-js' },\n});\n```\n\nExample:\n```text\nimport { createSignal } from 'solid-js';\n \nexport function App() {\n  const [count, setCount] = createSignal(0);\n  return (\n    <div>\n      <h1>Hello, Solid!</h1>\n      <button onClick={() => setCount((c) => c + 1)}>Count: {count()}</button>\n    </div>\n  );\n}\n```\n\nExample:\n```text\nimport { hydrate } from 'solid-js/web';\nimport './styles.css';\nimport { App } from './app.tsx';\n \nhydrate(() => <App />, document.querySelector('#app')!);\n```\n\nExample:\n```text\nimport { renderToStringAsync, HydrationScript } from 'solid-js/web';\nimport { App } from './app.tsx';\n \nimport clientAssets from './entry-client?assets=client';\nimport serverAssets from './entry-server?assets=ssr';\n \nexport default {\n  async fetch(_req: Request): Promise<Response> {\n    const appHTML = await renderToStringAsync(() => <App />);\n    const rootHTML = await renderToStringAsync(() => (\n      <Root appHTML={appHTML} />\n    ));\n    return new Response(rootHTML, {\n      headers: { 'Content-Type': 'text/html' },\n    });\n  },\n};\n \nfunction Root(props: { appHTML?: string }) {\n  const assets = clientAssets.merge(serverAssets);\n  return (\n    <html lang=\"en\">\n      <head>\n        <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n        {assets.css.map((attr: any) => (\n          <link rel=\"stylesheet\" {...attr} />\n        ))}\n        {assets.js.map((attr: any) => (\n          <link rel=\"modulepreload\" {...attr} />\n        ))}\n      </head>\n      <body>\n        <div id=\"app\" innerHTML={props.appHTML || ''} />\n        <HydrationScript />\n        <script type=\"module\" src={assets.entry} />\n      </body>\n    </html>\n  );\n}\n```\n\nExample:\n```text\n{\n  \"extends\": \"nitro/tsconfig\",\n  \"compilerOptions\": {\n    \"jsx\": \"preserve\",\n    \"jsxImportSource\": \"solid-js\"\n  }\n}\n```\n\nExample:\n```text\n<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>My App</title>\n  </head>\n  <body>\n    <div id=\"app\"><!--ssr-outlet--></div>\n  </body>\n</html>\n```\n\nExample:\n```text\nexport default {\n  async fetch(_req: Request) {\n    const content = '<p>Hello from the server!</p>';\n    return new Response(content, {\n      headers: { 'Content-Type': 'text/html;charset=utf-8' },\n    });\n  },\n};\n```\n\nExample:\n```text\nimport { defineNitroConfig } from 'nitro/config';\n \nexport default defineNitroConfig({\n  routeRules: {\n    // All routes revalidate every 60 seconds in the background\n    '/**': { isr: 60 },\n    // This route is generated on demand and cached permanently\n    '/static': { isr: true },\n    // This route is prerendered at build time and cached permanently\n    '/prerendered': { prerender: true },\n    // This route is always fresh\n    '/dynamic': { isr: false },\n  },\n});\n```\n\nExample:\n```text\nimport { defineNitroConfig } from 'nitro/config';\n \nexport default defineNitroConfig({\n  routeRules: {\n    '/products/**': {\n      isr: {\n        expiration: 60,\n        allowQuery: ['q'],\n        passQuery: true,\n      },\n    },\n  },\n});\n```\n\nExample:\n```text\nimport { defineNitroConfig } from 'nitro/config';\n \nexport default defineNitroConfig({\n  vercel: {\n    config: {\n      bypassToken: process.env.VERCEL_BYPASS_TOKEN,\n    },\n  },\n});\n```\n\nExample:\n```text\nimport { defineNitroConfig } from 'nitro/config';\n \nexport default defineNitroConfig({\n  runtimeConfig: {\n    apiToken: 'dev_token', // `dev_token` is the default value\n  },\n});\n```\n\nExample:\n```text\nimport { defineHandler } from 'nitro/h3';\nimport { useRuntimeConfig } from 'nitro/runtime-config';\n \nexport default defineHandler((event) => {\n  return useRuntimeConfig().apiToken; // Returns `dev_token`\n});\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:51.570Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":51,"totalLines":583,"estimatedTokens":3518}}388{"id":"doc-get_a_check_vercel_rest_api-b05d7103","source":"documentation","title":"Get a check | Vercel REST API","url":"https://vercel.com/docs/rest-api/checks-v2/get-a-check?from=graph","text":"Cross-link a check (/docs/rest-api/checks-v2/get-a-check)From the Vercel docs graph (built :14.592Z), spanning vercel.com docs + KB, nextjs.org, ai-sdk.dev, and other Vercel documentation sites. Full graph as ://vercel.com/docs/graph.jsonSemantically closest pagesCreate a checkGet a check runUpdate a checkList all checks for a projectDelete a checkThis page links to (1)Rest API — Learn about rest api on Vercel.Pages that link here (1)By (1)Rest API — Learn about rest api on Vercel.\n\nExample:\n```typescript\n1const response = await fetch('https://api.vercel.com/v2/projects/projectIdOrName/checks/checkId?teamId=string&slug=string', {2  method: 'GET',3  headers: {4    'Authorization': 'Bearer YOUR_ACCESS_TOKEN',5    'Content-Type': 'application/json',6  },7});8\n9const data = await response.json();10console.log(data);\n```\n\nExample:\n```json\n1{2  \"id\": \"icfg_1234567890\",3  \"name\": \"Example Name\",4  \"ownerId\": \"example_id\",5  \"projectId\": \"example_id\",6  \"isRerequestable\": \"false\",7  \"requires\": \"build-ready\",8  \"source\": {9    \"kind\": \"integration\",10    \"integrationId\": \"example_id\",11    \"integrationConfigurationId\": \"example_id\",12    \"resourceId\": \"example_id\",13    \"externalResourceId\": \"example_id\"14  },15  \"blocks\": \"build-start\",16  \"targets\": [],17  \"sourceKind\": \"git-provider\",18  \"sourceIntegrationConfigurationId\": \"example_id\",19  \"timeout\": \"123\",20  \"createdAt\": \"123\",21  \"updatedAt\": \"123\",22  \"deletedAt\": \"123\"23}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:51.631Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":2,"totalLines":14,"estimatedTokens":366}}389{"id":"doc-blocks-876c6212","source":"documentation","title":"Blocks","url":"https://vercel.com/docs/platforms/platform-elements/blocks","text":"Vercel for PlatformsPlatform ElementsBlocks\n\nCross-link (/docs/platforms/platform-elements/blocks)From the Vercel docs graph (built :14.592Z), spanning vercel.com docs + KB, nextjs.org, ai-sdk.dev, and other Vercel documentation sites. Full graph as ://vercel.com/docs/graph.jsonSemantically closest pagesPlatform Elements — Prebuilt server actions and UI blocks you can install to speed up common platform tasks.Claim Deployment — A component for users to claim ownership of Vercel deployments created on their behalf.Custom Domain — A complete domain management interface with DNS verification and real-time status tracking.Vercel for Platforms — Build platforms that serve multiple customers from a single codebase, with custom domains, wildcard subdomains, and autoDNS Table — A DNS record display component with one-click copying for guiding users through domain configuration.PrerequisitesVercel for Platforms — Build platforms that serve multiple customers from a single codebase, with custom domains, wildcard subdomains, and autoPlatform Elements — Prebuilt server actions and UI blocks you can install to speed up common platform tasks.This page links to (5)Claim Deployment — A component for users to claim ownership of Vercel deployments created on their behalf.Custom Domain — A complete domain management interface with DNS verification and real-time status tracking.Deploy Popover — A popover interface for deploying files to Vercel with real-time status tracking.DNS Table — A DNS record display component with one-click copying for guiding users through domain configuration.Report Abuse — A content moderation interface for reporting abuse with categorization, validation, and privacy-focused design.Pages that link here (1)By (1)Platform Elements — Prebuilt server actions and UI blocks you can install to speed up common platform tasks.\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:51.682Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":0,"totalLines":5,"estimatedTokens":468}}390{"id":"doc-create_resources_transfer_request_partner_api-0f4b6467","source":"documentation","title":"Create Resources Transfer Request | Partner API","url":"https://vercel.com/docs/integrations/create-integration/marketplace-api/reference/partner/create-resource-transfer","text":"This page is not in the current cross-link map.\n\nCreate Resources Transfer Request | Partner API\n\nExample:\n```typescript\n1const response = await fetch('/v1/installations/installationId/resource-transfer-requests', {2  method: 'POST',3  headers: {4    'Authorization': 'Bearer YOUR_ACCESS_TOKEN',5    'Content-Type': 'application/json',6  },7  body: JSON.stringify({8    \"resourceIds\": [],9    \"expiresAt\": \"123\"10  }),11});12\n13const data = await response.json();14console.log(data);\n```\n\nExample:\n```json\n1{2  \"providerClaimId\": \"example_id\"3}\n```\n\nExample:\n```json\n1{2  \"error\": {3    \"code\": \"validation_error\",4    \"message\": \"string\",5    \"user\": {6      \"message\": \"string\",7      \"url\": \"https://example.com\"8    },9    \"fields\": [10      {11        \"key\": \"string\",12        \"message\": \"string\"13      }14    ]15  }16}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:51.753Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":3,"totalLines":21,"estimatedTokens":211}}391{"id":"doc-sync_docs-a90c68e8","source":"documentation","title":"SYNC | Docs","url":"https://redis.io/docs/latest/commands/sync/","text":"{\"acl_categories\":[\"@admin\",\"@slow\",\"@dangerous\"],\"arity\":1,\"categories\":[\"docs\",\"develop\",\"stack\",\"oss\",\"rs\",\"rc\",\"oss\",\"kubernetes\",\"clients\"],\"command_flags\":[\"admin\",\"noscript\",\"no_async_loading\",\"no_multi\"],\"description\":\"An internal command used in replication.\",\"duplicateOf\":\"head:data-ai-metadata\",\"group\":\"server\",\"location\":\"body\",\"since\":\"1.0.0\",\"syntax_fmt\":\"SYNC\",\"title\":\"SYNC\",\"tableOfContents\":{\"sections\":[{\"id\":\"redis-software-and-redis-cloud-compatibility\",\"title\":\"Redis Software and Redis Cloud compatibility\"},{\"id\":\"return-information\",\"title\":\"Return information\"}]},\"codeExamples\":[]}\n\nAll products Redis Software Redis Cloud Redis Open Source Redis Insight Redis Enterprise for K8s Redis Data Integration Client Libraries ESC\n\nExample:\n```text\nSYNC\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:41.164Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":1,"totalLines":10,"estimatedTokens":199}}392{"id":"doc-ts_mrevrange_docs-09a0e231","source":"documentation","title":"TS.MREVRANGE | Docs","url":"https://redis.io/docs/latest/commands/ts.mrevrange/","text":"{\"acl_categories\":[\"@timeseries\",\"@read\",\"@slow\"],\"arguments\":[{\"name\":\"fromTimestamp\",\"type\":\"string\"},{\"name\":\"toTimestamp\",\"type\":\"string\"},{\"name\":\"LATEST\",\"optional\":true,\"since\":\"1.8.0\",\"type\":\"string\"},{\"multiple\":true,\"name\":\"Timestamp\",\"optional\":true,\"token\":\"FILTER_BY_TS\",\"type\":\"integer\"},{\"arguments\":[{\"name\":\"FILTER_BY_VALUE\",\"token\":\"FILTER_BY_VALUE\",\"type\":\"pure-token\"},{\"name\":\"min\",\"type\":\"double\"},{\"name\":\"max\",\"type\":\"double\"}],\"name\":\"fbv\",\"optional\":true,\"type\":\"block\"},{\"arguments\":[{\"name\":\"WITHLABELS\",\"token\":\"WITHLABELS\",\"type\":\"pure-token\"},{\"arguments\":[{\"name\":\"SELECTED_LABELS\",\"token\":\"SELECTED_LABELS\",\"type\":\"pure-token\"},{\"multiple\":true,\"name\":\"label1\",\"type\":\"string\"}],\"name\":\"SELECTED_LABELS_BLOCK\",\"type\":\"block\"}],\"name\":\"labels\",\"optional\":true,\"type\":\"oneof\"},{\"name\":\"count\",\"optional\":true,\"token\":\"COUNT\",\"type\":\"integer\"},{\"arguments\":[{\"name\":\"value\",\"optional\":true,\"token\":\"ALIGN\",\"type\":\"integer\"},{\"name\":\"aggregators\",\"token\":\"AGGREGATION\",\"type\":\"string\"},{\"name\":\"bucketDuration\",\"type\":\"integer\"},{\"name\":\"buckettimestamp\",\"optional\":true,\"since\":\"1.8.0\",\"token\":\"BUCKETTIMESTAMP\",\"type\":\"pure-token\"},{\"name\":\"empty\",\"optional\":true,\"since\":\"1.8.0\",\"token\":\"EMPTY\",\"type\":\"pure-token\"}],\"name\":\"aggregation\",\"optional\":true,\"type\":\"block\"},{\"arguments\":[{\"name\":\"l=v\",\"type\":\"string\"},{\"name\":\"l!=v\",\"type\":\"string\"},{\"name\":\"l=\",\"type\":\"string\"},{\"name\":\"l!=\",\"type\":\"string\"},{\"name\":\"l=(v1,v2,...)\",\"type\":\"string\"},{\"name\":\"l!=(v1,v2,...)\",\"type\":\"string\"}],\"multiple\":true,\"name\":\"filterExpr\",\"token\":\"FILTER\",\"type\":\"oneof\"},{\"arguments\":[{\"name\":\"GROUPBY\",\"token\":\"GROUPBY\",\"type\":\"pure-token\"},{\"name\":\"label\",\"type\":\"string\"},{\"name\":\"REDUCE\",\"type\":\"string\"},{\"name\":\"reducer\",\"type\":\"string\"}],\"name\":\"groupby\",\"optional\":true,\"type\":\"block\"},{\"name\":\"EXCLUDEEMPTY\",\"optional\":true,\"since\":\"8.10.0\",\"token\":\"EXCLUDEEMPTY\",\"type\":\"pure-token\"}],\"categories\":[\"docs\",\"develop\",\"stack\",\"oss\",\"rs\",\"rc\",\"oss\",\"kubernetes\",\"clients\"],\"complexity\":\"O(n/m+k) where n = Number of data points, m = Chunk size (data points per chunk), k = Number of data points that are in the requested ranges\",\"description\":\"Query a range across multiple time-series by filters in reverse direction\",\"duplicateOf\":\"head:data-ai-metadata\",\"group\":\"timeseries\",\"location\":\"body\",\"since\":\"1.4.0\",\"syntax_fmt\":\"TS.MREVRANGE fromTimestamp toTimestamp [LATEST]\\n [FILTER_BY_TS Timestamp [Timestamp ...]] [FILTER_BY_VALUE min max]\\n [WITHLABELS | SELECTED_LABELS label1 [label1 ...]] [COUNT count]\\n [[ALIGN value] AGGREGATION aggregators bucketDuration\\n [BUCKETTIMESTAMP] [EMPTY]] FILTER \\u003cl=v | l!=v | l= | l!= |\\n l=(v1,v2,...) | l!=(v1,v2,...) [l=v | l!=v | l= | l!= |\\n l=(v1,v2,...) | l!=(v1,v2,...) ...]\\u003e [GROUPBY label REDUCE\\n reducer] [EXCLUDEEMPTY]\",\"title\":\"TS.MREVRANGE\",\"tableOfContents\":{\"sections\":[{\"id\":\"required-arguments\",\"title\":\"Required arguments\"},{\"id\":\"optional-arguments\",\"title\":\"Optional arguments\"},{\"id\":\"examples\",\"title\":\"Examples\"},{\"id\":\"redis-software-and-redis-cloud-compatibility\",\"title\":\"Redis Software and Redis Cloud compatibility\"},{\"id\":\"return-information\",\"title\":\"Return information\"},{\"id\":\"see-also\",\"title\":\"See also\"},{\"id\":\"related-topics\",\"title\":\"Related topics\"}]},\"codeExamples\":[]}\n\nAll products Redis Software Redis Cloud Redis Open Source Redis Insight Redis Enterprise for K8s Redis Data Integration Client Libraries ESC\n\nExample:\n```text\nTS.MREVRANGE fromTimestamp toTimestamp\n  [LATEST]\n  [FILTER_BY_TS ts...]\n  [FILTER_BY_VALUE min max]\n  [WITHLABELS | <SELECTED_LABELS label...>]\n  [COUNT count]\n  [[ALIGN align] AGGREGATION aggregators bucketDuration [BUCKETTIMESTAMP bt] [EMPTY]]\n  FILTER filterExpr...\n  [GROUPBY label REDUCE reducer]\n  [EXCLUDEEMPTY]\n```\n\nExample:\n```text\nmrevrange(\n    from_time: Union[int, str],\n    to_time: Union[int, str],\n    filters: List[str],\n    count: Optional[int] = None,\n    aggregation_type: Optional[str] = None,\n    bucket_size_msec: Optional[int] = 0,\n    with_labels: Optional[bool] = False,\n    filter_by_ts: Optional[List[int]] = None,\n    filter_by_min_value: Optional[int] = None,\n    filter_by_max_value: Optional[int] = None,\n    groupby: Optional[str] = None,\n    reduce: Optional[str] = None,\n    select_labels: Optional[List[str]] = None,\n    align: Optional[Union[int, str]] = None,\n    latest: Optional[bool] = False,\n    bucket_timestamp: Optional[str] = None,\n    empty: Optional[bool] = False\n) → Any\n```\n\nExample:\n```text\nMREVRANGE(\n    fromTimestamp: Timestamp,\n    toTimestamp: Timestamp,\n    filter: RedisVariadicArgument,\n    options?: TsRangeOptions\n) → Any\n```\n\nExample:\n```text\ntsMRevRange(\n    fromTimestamp: long,\n    toTimestamp: long,\n    filters: String...\n) → Map<String, TSMRangeElements>  // multi range elements\n\ntsMRevRange(\n    multiRangeParams: TSMRangeParams\n) → Map<String, TSMRangeElements>  // multi range elements\n```\n\nExample:\n```text\nTSMRevRange(\n    ctx: context.Context,\n    fromTimestamp: int,\n    toTimestamp: int,\n    filterExpr: []string\n) → *MapStringSliceInterfaceCmd\n\nTSMRevRangeWithArgs(\n    ctx: context.Context,\n    fromTimestamp: int,\n    toTimestamp: int,\n    filterExpr: []string,\n    options: *TSMRevRangeOptions\n) → *MapStringSliceInterfaceCmd\n```\n\nExample:\n```text\nMRevRange(\n    fromTimeStamp: TimeStamp,\n    toTimeStamp: TimeStamp,\n    filter: IReadOnlyCollection<string>,\n    latest: bool,\n    filterByTs: IReadOnlyCollection<TimeStamp>?,\n    filterByValue: (long, long)?,\n    withLabels: bool?,\n    selectLabels: IReadOnlyCollection<string>?,\n    count: long?,\n    align: TimeStamp?,\n    aggregation: TsAggregation?,\n    timeBucket: long?,\n    bt: TsBucketTimestamps?,\n    empty: bool,\n    groupbyTuple: (string, TsReduce)?\n) → IReadOnlyList<(string key, IReadOnlyList<TimeSeriesLabel> labels, IReadOnlyList<TimeSeriesTuple> values)>\n```\n\nExample:\n```text\nMRevRangeAsync(\n    fromTimeStamp: TimeStamp,\n    toTimeStamp: TimeStamp,\n    filter: IReadOnlyCollection<string>,\n    latest: bool,\n    filterByTs: IReadOnlyCollection<TimeStamp>?,\n    filterByValue: (long, long)?,\n    withLabels: bool?,\n    selectLabels: IReadOnlyCollection<string>?,\n    count: long?,\n    align: TimeStamp?,\n    aggregation: TsAggregation?,\n    timeBucket: long?,\n    bt: TsBucketTimestamps?,\n    empty: bool,\n    groupbyTuple: (string, TsReduce)?\n) → Task<IReadOnlyList<(string key, IReadOnlyList<TimeSeriesLabel> labels, IReadOnlyList<TimeSeriesTuple> values)>>\n```\n\nExample:\n```text\ntsmrevrange(\n    $fromTimestamp: Any,\n    $toTimestamp: Any,\n    $arguments: MRangeArguments\n) → array\n```\n\nExample:\n```bash\n127.0.0.1:6379> TS.CREATE stock:A LABELS type stock name A\nOK\n127.0.0.1:6379> TS.CREATE stock:B LABELS type stock name B\nOK\n127.0.0.1:6379> TS.MADD stock:A 1000 100 stock:A 1010 110 stock:A 1020 120\n1) (integer) 1000\n2) (integer) 1010\n3) (integer) 1020\n127.0.0.1:6379> TS.MADD stock:B 1000 120 stock:B 1010 110 stock:B 1020 100\n1) (integer) 1000\n2) (integer) 1010\n3) (integer) 1020\n```\n\nExample:\n```bash\n127.0.0.1:6379> TS.MREVRANGE - + WITHLABELS FILTER type=stock GROUPBY type REDUCE max\n1) 1) \"type=stock\"\n   2) 1) 1) \"type\"\n         2) \"stock\"\n      2) 1) \"__reducer__\"\n         2) \"max\"\n      3) 1) \"__source__\"\n         2) \"stock:A,stock:B\"\n   3) 1) 1) (integer) 1020\n         2) 120\n      2) 1) (integer) 1010\n         2) 110\n      3) 1) (integer) 1000\n         2) 120\n```\n\nExample:\n```bash\n127.0.0.1:6379> TS.CREATE stock:A LABELS type stock name A\nOK\n127.0.0.1:6379> TS.CREATE stock:B LABELS type stock name B\nOK\n127.0.0.1:6379> TS.MADD stock:A 1000 100 stock:A 1010 110 stock:A 1020 120\n1) (integer) 1000\n2) (integer) 1010\n3) (integer) 1020\n127.0.0.1:6379> TS.MADD stock:B 1000 120 stock:B 1010 110 stock:B 1020 100\n1) (integer) 1000\n2) (integer) 1010\n3) (integer) 1020\n127.0.0.1:6379> TS.MADD stock:A 2000 200 stock:A 2010 210 stock:A 2020 220\n1) (integer) 2000\n2) (integer) 2010\n3) (integer) 2020\n127.0.0.1:6379> TS.MADD stock:B 2000 220 stock:B 2010 210 stock:B 2020 200\n1) (integer) 2000\n2) (integer) 2010\n3) (integer) 2020\n127.0.0.1:6379> TS.MADD stock:A 3000 300 stock:A 3010 310 stock:A 3020 320\n1) (integer) 3000\n2) (integer) 3010\n3) (integer) 3020\n127.0.0.1:6379> TS.MADD stock:B 3000 320 stock:B 3010 310 stock:B 3020 300\n1) (integer) 3000\n2) (integer) 3010\n3) (integer) 3020\n```\n\nExample:\n```bash\n127.0.0.1:6379> TS.MREVRANGE - + WITHLABELS AGGREGATION avg 1000 FILTER type=stock GROUPBY type REDUCE max\n1) 1) \"type=stock\"\n   2) 1) 1) \"type\"\n         2) \"stock\"\n      2) 1) \"__reducer__\"\n         2) \"max\"\n      3) 1) \"__source__\"\n         2) \"stock:A,stock:B\"\n   3) 1) 1) (integer) 3000\n         2) 310\n      2) 1) (integer) 2000\n         2) 210\n      3) 1) (integer) 1000\n         2) 110\n```\n\nExample:\n```bash\n127.0.0.1:6379> TS.ADD ts1 1548149180000 90 labels metric cpu metric_name system\n(integer) 1548149180000\n127.0.0.1:6379> TS.ADD ts1 1548149185000 45\n(integer) 1548149185000\n127.0.0.1:6379> TS.ADD ts2 1548149180000 99 labels metric cpu metric_name user\n(integer) 1548149180000\n127.0.0.1:6379> TS.MREVRANGE - + WITHLABELS FILTER metric=cpu GROUPBY metric_name REDUCE max\n1) 1) \"metric_name=system\"\n   2) 1) 1) \"metric_name\"\n         2) \"system\"\n      2) 1) \"__reducer__\"\n         2) \"max\"\n      3) 1) \"__source__\"\n         2) \"ts1\"\n   3) 1) 1) (integer) 1548149185000\n         2) 45\n      2) 1) (integer) 1548149180000\n         2) 90\n2) 1) \"metric_name=user\"\n   2) 1) 1) \"metric_name\"\n         2) \"user\"\n      2) 1) \"__reducer__\"\n         2) \"max\"\n      3) 1) \"__source__\"\n         2) \"ts2\"\n   3) 1) 1) (integer) 1548149180000\n         2) 99\n```\n\nExample:\n```bash\n127.0.0.1:6379> TS.ADD ts1 1548149180000 90 labels metric cpu metric_name system\n(integer) 1548149180000\n127.0.0.1:6379> TS.ADD ts1 1548149185000 45\n(integer) 1548149185000\n127.0.0.1:6379> TS.ADD ts2 1548149180000 99 labels metric cpu metric_name user\n(integer) 1548149180000\n127.0.0.1:6379> TS.MREVRANGE - + FILTER_BY_VALUE 90 100 WITHLABELS FILTER metric=cpu\n1) 1) \"ts1\"\n   2) 1) 1) \"metric\"\n         2) \"cpu\"\n      2) 1) \"metric_name\"\n         2) \"system\"\n   3) 1) 1) (integer) 1548149180000\n         2) 90\n2) 1) \"ts2\"\n   2) 1) 1) \"metric\"\n         2) \"cpu\"\n      2) 1) \"metric_name\"\n         2) \"user\"\n   3) 1) 1) (integer) 1548149180000\n         2) 99\n```\n\nExample:\n```bash\n127.0.0.1:6379> TS.ADD ts1 1548149180000 90 labels metric cpu metric_name system team NY\n(integer) 1548149180000\n127.0.0.1:6379> TS.ADD ts1 1548149185000 45\n(integer) 1548149185000\n127.0.0.1:6379> TS.ADD ts2 1548149180000 99 labels metric cpu metric_name user team SF\n(integer) 1548149180000\n127.0.0.1:6379> TS.MREVRANGE - + SELECTED_LABELS team FILTER metric=cpu\n1) 1) \"ts1\"\n   2) 1) 1) \"team\"\n         2) (nil)\n   3) 1) 1) (integer) 1548149185000\n         2) 45\n      2) 1) (integer) 1548149180000\n         2) 90\n2) 1) \"ts2\"\n   2) 1) 1) \"team\"\n         2) (nil)\n   3) 1) 1) (integer) 1548149180000\n         2) 99\n```\n\nExample:\n```bash\n127.0.0.1:6379> TS.CREATE s LABELS s 1 t 1\nOK\n127.0.0.1:6379> TS.CREATE t LABELS s 1 t 1\nOK\n127.0.0.1:6379> TS.CREATE u LABELS s 1 t 1\nOK\n127.0.0.1:6379> TS.MADD s 100 100 t 100 100 s 200 200 t 300 300 s 400 400 t 400 400 u 2000 2000\n1) (integer) 100\n2) (integer) 100\n3) (integer) 200\n4) (integer) 300\n5) (integer) 400\n6) (integer) 400\n7) (integer) 2000\n```\n\nExample:\n```bash\n127.0.0.1:6379> TS.MREVRANGE - 500 WITHLABELS EXCLUDEEMPTY FILTER s=1\n1) 1) \"s\"\n   2) 1) 1) \"s\"\n         2) \"1\"\n      2) 1) \"t\"\n         2) \"1\"\n   3) 1) 1) (integer) 400\n         2) 400\n      2) 1) (integer) 200\n         2) 200\n      3) 1) (integer) 100\n         2) 100\n2) 1) \"t\"\n   2) 1) 1) \"s\"\n         2) \"1\"\n      2) 1) \"t\"\n         2) \"1\"\n   3) 1) 1) (integer) 400\n         2) 400\n      2) 1) (integer) 300\n         2) 300\n      3) 1) (integer) 100\n         2) 100\n```\n\nExample:\n```bash\n127.0.0.1:6379> TS.MREVRANGE - 500 WITHLABELS FILTER s=1\n1) 1) \"s\"\n   ...\n2) 1) \"t\"\n   ...\n3) 1) \"u\"\n   2) 1) 1) \"s\"\n         2) \"1\"\n      2) 1) \"t\"\n         2) \"1\"\n   3) (empty array)\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:41.195Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":18,"totalLines":357,"estimatedTokens":2997}}393{"id":"doc-work_with_json_documents_docs-20a63930","source":"documentation","title":"Work with JSON documents | Docs","url":"https://redis.io/docs/latest/develop/clients/rust/json/","text":"{\"categories\":[\"docs\",\"develop\",\"stack\",\"oss\",\"rs\",\"rc\",\"oss\",\"kubernetes\",\"clients\"],\"description\":\"Learn how to store, read, and update JSON documents with redis-rs.\",\"duplicateOf\":\"head:data-ai-metadata\",\"location\":\"body\",\"relatedPages\":[\"/develop/data-types/json\",\"/develop/data-types/json/path\"],\"scope\":\"example\",\"title\":\"Work with JSON documents\",\"topics\":[\"JSON\",\"Rust\"],\"tableOfContents\":{\"sections\":[{\"id\":\"install\",\"title\":\"Install\"},{\"id\":\"import-the-required-crates\",\"title\":\"Import the required crates\"},{\"id\":\"create-some-json-data\",\"title\":\"Create some JSON data\"},{\"id\":\"connect-to-redis\",\"title\":\"Connect to Redis\"},{\"id\":\"store-and-retrieve-the-document\",\"title\":\"Store and retrieve the document\"},{\"id\":\"read-nested-fields\",\"title\":\"Read nested fields\"},{\"id\":\"update-part-of-the-document\",\"title\":\"Update part of the document\"},{\"id\":\"append-to-an-array\",\"title\":\"Append to an array\"},{\"id\":\"more-information\",\"title\":\"More information\"}]},\"codeExamples\":[{\"codetabsId\":\"rust_home_json-stepimport\",\"description\":\"Foundational: Import the Redis JSON traits and serde_json helpers needed to work with JSON documents in Rust\",\"difficulty\":\"beginner\",\"id\":\"import\",\"languages\":[{\"clientId\":\"redis-rs\",\"clientName\":\"redis-rs\",\"id\":\"Rust-Sync\",\"langId\":\"rust\",\"panelId\":\"panel_Rust-Sync_rust_home_json-stepimport\"},{\"clientId\":\"redis-rs\",\"clientName\":\"redis-rs\",\"id\":\"Rust-Async\",\"langId\":\"rust\",\"panelId\":\"panel_Rust-Async_rust_home_json-stepimport\"}]},{\"codetabsId\":\"rust_home_json-stepcreate_data\",\"description\":\"Foundational: Define a nested JSON document with objects and arrays using serde_json::json!\",\"difficulty\":\"beginner\",\"id\":\"create_data\",\"languages\":[{\"clientId\":\"redis-rs\",\"clientName\":\"redis-rs\",\"id\":\"Rust-Sync\",\"langId\":\"rust\",\"panelId\":\"panel_Rust-Sync_rust_home_json-stepcreate_data\"},{\"clientId\":\"redis-rs\",\"clientName\":\"redis-rs\",\"id\":\"Rust-Async\",\"langId\":\"rust\",\"panelId\":\"panel_Rust-Async_rust_home_json-stepcreate_data\"}]},{\"codetabsId\":\"rust_home_json-stepconnect\",\"description\":\"Foundational: Create a Redis client and open a sync or async connection from Rust\",\"difficulty\":\"beginner\",\"id\":\"connect\",\"languages\":[{\"clientId\":\"redis-rs\",\"clientName\":\"redis-rs\",\"id\":\"Rust-Sync\",\"langId\":\"rust\",\"panelId\":\"panel_Rust-Sync_rust_home_json-stepconnect\"},{\"clientId\":\"redis-rs\",\"clientName\":\"redis-rs\",\"id\":\"Rust-Async\",\"langId\":\"rust\",\"panelId\":\"panel_Rust-Async_rust_home_json-stepconnect\"}]},{\"codetabsId\":\"rust_home_json-stepset_get_doc\",\"description\":\"Foundational: Store a complete JSON document with JSON.SET and fetch it again with JSON.GET\",\"difficulty\":\"beginner\",\"id\":\"set_get_doc\",\"languages\":[{\"clientId\":\"redis-rs\",\"clientName\":\"redis-rs\",\"id\":\"Rust-Sync\",\"langId\":\"rust\",\"panelId\":\"panel_Rust-Sync_rust_home_json-stepset_get_doc\"},{\"clientId\":\"redis-rs\",\"clientName\":\"redis-rs\",\"id\":\"Rust-Async\",\"langId\":\"rust\",\"panelId\":\"panel_Rust-Async_rust_home_json-stepset_get_doc\"}]},{\"codetabsId\":\"rust_home_json-stepget_fields\",\"description\":\"Read nested JSON paths to retrieve selected fields and arrays without fetching the whole document\",\"difficulty\":\"beginner\",\"id\":\"get_fields\",\"languages\":[{\"clientId\":\"redis-rs\",\"clientName\":\"redis-rs\",\"id\":\"Rust-Sync\",\"langId\":\"rust\",\"panelId\":\"panel_Rust-Sync_rust_home_json-stepget_fields\"},{\"clientId\":\"redis-rs\",\"clientName\":\"redis-rs\",\"id\":\"Rust-Async\",\"langId\":\"rust\",\"panelId\":\"panel_Rust-Async_rust_home_json-stepget_fields\"}]},{\"codetabsId\":\"rust_home_json-stepupdate_fields\",\"description\":\"Update nested individual fields in place with JSON.SET and JSON.NUMINCRBY\",\"difficulty\":\"intermediate\",\"id\":\"update_fields\",\"languages\":[{\"clientId\":\"redis-rs\",\"clientName\":\"redis-rs\",\"id\":\"Rust-Sync\",\"langId\":\"rust\",\"panelId\":\"panel_Rust-Sync_rust_home_json-stepupdate_fields\"},{\"clientId\":\"redis-rs\",\"clientName\":\"redis-rs\",\"id\":\"Rust-Async\",\"langId\":\"rust\",\"panelId\":\"panel_Rust-Async_rust_home_json-stepupdate_fields\"}]},{\"codetabsId\":\"rust_home_json-stepupdate_array\",\"description\":\"Update new elements to a JSON array and read back the updated value\",\"difficulty\":\"intermediate\",\"id\":\"update_array\",\"languages\":[{\"clientId\":\"redis-rs\",\"clientName\":\"redis-rs\",\"id\":\"Rust-Sync\",\"langId\":\"rust\",\"panelId\":\"panel_Rust-Sync_rust_home_json-stepupdate_array\"},{\"clientId\":\"redis-rs\",\"clientName\":\"redis-rs\",\"id\":\"Rust-Async\",\"langId\":\"rust\",\"panelId\":\"panel_Rust-Async_rust_home_json-stepupdate_array\"}]}]}\n\nAll products Redis Software Redis Cloud Redis Open Source Redis Insight Redis Enterprise for K8s Redis Data Integration Client Libraries ESC\n\nExample:\n```toml\n[dependencies]\nserde_json = \"1\"\n\n# Sync API\nredis = { version = \"1.0.4\", features = [\"json\"] }\n\n# Async API with Tokio\ntokio = { version = \"1\", features = [\"full\"] }\nredis = { version = \"1.0.4\", features = [\"json\", \"tokio-comp\"] }\n```\n\nExample:\n```rust\nuse redis::{cmd, Commands, JsonCommands};\n    use serde_json::json;\n```\n\nExample:\n```rust\nmod tests {\n    use redis::{cmd, Commands, JsonCommands};\n    use serde_json::json;\n\n    fn run() {\n        let bike = json!({\n            \"model\": \"Deimos\",\n            \"brand\": \"Ergonom\",\n            \"price\": 4972,\n            \"specs\": {\n                \"material\": \"carbon\",\n                \"weight\": 8.7\n            },\n            \"colors\": [\"black\", \"silver\"],\n            \"inventory\": {\n                \"in_stock\": 12,\n                \"warehouse\": \"w1\"\n            }\n        });\n\n        let client =\n            redis::Client::open(\"redis://127.0.0.1\").expect(\"Failed to create Redis client\");\n        let mut r = client.get_connection().expect(\"Failed to connect to Redis\");\n\n\n        let stored: bool = r\n            .json_set(\"bike:1\", \"$\", &bike)\n            .expect(\"Failed to run JSON.SET\");\n        println!(\"{}\", if stored { \"OK\" } else { \"(nil)\" }); // >>> OK\n\n        let bike_json: String = r.json_get(\"bike:1\", \"$\").expect(\"Failed to run JSON.GET\");\n        println!(\"{bike_json}\");\n        // >>> [{\"model\":\"Deimos\",\"brand\":\"Ergonom\",\"price\":4972,\"specs\":{\"material\":\"carbon\",\"weight\":8.7},\"colors\":[\"black\",\"silver\"],\"inventory\":{\"in_stock\":12,\"warehouse\":\"w1\"}}]\n\n\n        let material: String = r\n            .json_get(\"bike:1\", \"$.specs.material\")\n            .expect(\"Failed to run JSON.GET\");\n        println!(\"{material}\"); // >>> [\"carbon\"]\n\n        let colors: String = r\n            .json_get(\"bike:1\", \"$.colors\")\n            .expect(\"Failed to run JSON.GET\");\n        println!(\"{colors}\"); // >>> [[\"black\",\"silver\"]]\n\n        let stock: String = r\n            .json_get(\"bike:1\", \"$.inventory.in_stock\")\n            .expect(\"Failed to run JSON.GET\");\n        println!(\"{stock}\"); // >>> [12]\n\n\n        let stock_set: bool = r\n            .json_set(\"bike:1\", \"$.inventory.in_stock\", &json!(8))\n            .expect(\"Failed to update stock\");\n        println!(\"{}\", if stock_set { \"OK\" } else { \"(nil)\" }); // >>> OK\n\n        let new_price: String = cmd(\"JSON.NUMINCRBY\")\n            .arg(\"bike:1\")\n            .arg(\"$.price\")\n            .arg(-500)\n            .query(&mut r)\n            .expect(\"Failed to run JSON.NUMINCRBY\");\n        println!(\"{new_price}\"); // >>> [4472]\n\n        let updated_fields: String = r\n            .json_get(\"bike:1\", &[\"$.price\", \"$.inventory.in_stock\"])\n            .expect(\"Failed to read updated fields\");\n        println!(\"{updated_fields}\"); // >>> {\"$.price\":[4472],\"$.inventory.in_stock\":[8]}\n\n\n        let _: redis::Value = cmd(\"JSON.ARRAPPEND\")\n            .arg(\"bike:1\")\n            .arg(\"$.colors\")\n            .arg(\"\\\"red\\\"\")\n            .query(&mut r)\n            .expect(\"Failed to run JSON.ARRAPPEND\");\n\n        let updated_colors: String = r\n            .json_get(\"bike:1\", \"$.colors\")\n            .expect(\"Failed to read updated colors\");\n        println!(\"{updated_colors}\"); // >>> [[\"black\",\"silver\",\"red\"]]\n\n    }\n}\n```\n\nExample:\n```rust\nuse redis::{cmd, AsyncCommands, JsonAsyncCommands};\n    use serde_json::json;\n```\n\nExample:\n```rust\nmod tests {\n    use redis::{cmd, AsyncCommands, JsonAsyncCommands};\n    use serde_json::json;\n\n    async fn run() {\n        let bike = json!({\n            \"model\": \"Deimos\",\n            \"brand\": \"Ergonom\",\n            \"price\": 4972,\n            \"specs\": {\n                \"material\": \"carbon\",\n                \"weight\": 8.7\n            },\n            \"colors\": [\"black\", \"silver\"],\n            \"inventory\": {\n                \"in_stock\": 12,\n                \"warehouse\": \"w1\"\n            }\n        });\n\n        let client =\n            redis::Client::open(\"redis://127.0.0.1\").expect(\"Failed to create Redis client\");\n        let mut r = client\n            .get_multiplexed_async_connection()\n            .await\n            .expect(\"Failed to connect to Redis\");\n\n\n        let stored: bool = r\n            .json_set(\"bike:1\", \"$\", &bike)\n            .await\n            .expect(\"Failed to run JSON.SET\");\n        println!(\"{}\", if stored { \"OK\" } else { \"(nil)\" }); // >>> OK\n\n        let bike_json: String = r\n            .json_get(\"bike:1\", \"$\")\n            .await\n            .expect(\"Failed to run JSON.GET\");\n        println!(\"{bike_json}\");\n        // >>> [{\"model\":\"Deimos\",\"brand\":\"Ergonom\",\"price\":4972,\"specs\":{\"material\":\"carbon\",\"weight\":8.7},\"colors\":[\"black\",\"silver\"],\"inventory\":{\"in_stock\":12,\"warehouse\":\"w1\"}}]\n\n\n        let material: String = r\n            .json_get(\"bike:1\", \"$.specs.material\")\n            .await\n            .expect(\"Failed to run JSON.GET\");\n        println!(\"{material}\"); // >>> [\"carbon\"]\n\n        let colors: String = r\n            .json_get(\"bike:1\", \"$.colors\")\n            .await\n            .expect(\"Failed to run JSON.GET\");\n        println!(\"{colors}\"); // >>> [[\"black\",\"silver\"]]\n\n        let stock: String = r\n            .json_get(\"bike:1\", \"$.inventory.in_stock\")\n            .await\n            .expect(\"Failed to run JSON.GET\");\n        println!(\"{stock}\"); // >>> [12]\n\n\n        let stock_set: bool = r\n            .json_set(\"bike:1\", \"$.inventory.in_stock\", &json!(8))\n            .await\n            .expect(\"Failed to update stock\");\n        println!(\"{}\", if stock_set { \"OK\" } else { \"(nil)\" }); // >>> OK\n\n        let new_price: String = cmd(\"JSON.NUMINCRBY\")\n            .arg(\"bike:1\")\n            .arg(\"$.price\")\n            .arg(-500)\n            .query_async(&mut r)\n            .await\n            .expect(\"Failed to run JSON.NUMINCRBY\");\n        println!(\"{new_price}\"); // >>> [4472]\n\n        let updated_fields: String = r\n            .json_get(\"bike:1\", &[\"$.price\", \"$.inventory.in_stock\"])\n            .await\n            .expect(\"Failed to read updated fields\");\n        println!(\"{updated_fields}\"); // >>> {\"$.price\":[4472],\"$.inventory.in_stock\":[8]}\n\n\n        let _: redis::Value = cmd(\"JSON.ARRAPPEND\")\n            .arg(\"bike:1\")\n            .arg(\"$.colors\")\n            .arg(\"\\\"red\\\"\")\n            .query_async(&mut r)\n            .await\n            .expect(\"Failed to run JSON.ARRAPPEND\");\n\n        let updated_colors: String = r\n            .json_get(\"bike:1\", \"$.colors\")\n            .await\n            .expect(\"Failed to read updated colors\");\n        println!(\"{updated_colors}\"); // >>> [[\"black\",\"silver\",\"red\"]]\n\n    }\n}\n```\n\nExample:\n```rust\nlet bike = json!({\n            \"model\": \"Deimos\",\n            \"brand\": \"Ergonom\",\n            \"price\": 4972,\n            \"specs\": {\n                \"material\": \"carbon\",\n                \"weight\": 8.7\n            },\n            \"colors\": [\"black\", \"silver\"],\n            \"inventory\": {\n                \"in_stock\": 12,\n                \"warehouse\": \"w1\"\n            }\n        });\n```\n\nExample:\n```rust\nlet client =\n            redis::Client::open(\"redis://127.0.0.1\").expect(\"Failed to create Redis client\");\n        let mut r = client.get_connection().expect(\"Failed to connect to Redis\");\n```\n\nExample:\n```rust\nlet client =\n            redis::Client::open(\"redis://127.0.0.1\").expect(\"Failed to create Redis client\");\n        let mut r = client\n            .get_multiplexed_async_connection()\n            .await\n            .expect(\"Failed to connect to Redis\");\n```\n\nExample:\n```rust\nlet stored: bool = r\n            .json_set(\"bike:1\", \"$\", &bike)\n            .expect(\"Failed to run JSON.SET\");\n        println!(\"{}\", if stored { \"OK\" } else { \"(nil)\" }); // >>> OK\n\n        let bike_json: String = r.json_get(\"bike:1\", \"$\").expect(\"Failed to run JSON.GET\");\n        println!(\"{bike_json}\");\n        // >>> [{\"model\":\"Deimos\",\"brand\":\"Ergonom\",\"price\":4972,\"specs\":{\"material\":\"carbon\",\"weight\":8.7},\"colors\":[\"black\",\"silver\"],\"inventory\":{\"in_stock\":12,\"warehouse\":\"w1\"}}]\n```\n\nExample:\n```rust\nlet stored: bool = r\n            .json_set(\"bike:1\", \"$\", &bike)\n            .await\n            .expect(\"Failed to run JSON.SET\");\n        println!(\"{}\", if stored { \"OK\" } else { \"(nil)\" }); // >>> OK\n\n        let bike_json: String = r\n            .json_get(\"bike:1\", \"$\")\n            .await\n            .expect(\"Failed to run JSON.GET\");\n        println!(\"{bike_json}\");\n        // >>> [{\"model\":\"Deimos\",\"brand\":\"Ergonom\",\"price\":4972,\"specs\":{\"material\":\"carbon\",\"weight\":8.7},\"colors\":[\"black\",\"silver\"],\"inventory\":{\"in_stock\":12,\"warehouse\":\"w1\"}}]\n```\n\nExample:\n```rust\nlet material: String = r\n            .json_get(\"bike:1\", \"$.specs.material\")\n            .expect(\"Failed to run JSON.GET\");\n        println!(\"{material}\"); // >>> [\"carbon\"]\n\n        let colors: String = r\n            .json_get(\"bike:1\", \"$.colors\")\n            .expect(\"Failed to run JSON.GET\");\n        println!(\"{colors}\"); // >>> [[\"black\",\"silver\"]]\n\n        let stock: String = r\n            .json_get(\"bike:1\", \"$.inventory.in_stock\")\n            .expect(\"Failed to run JSON.GET\");\n        println!(\"{stock}\"); // >>> [12]\n```\n\nExample:\n```rust\nlet material: String = r\n            .json_get(\"bike:1\", \"$.specs.material\")\n            .await\n            .expect(\"Failed to run JSON.GET\");\n        println!(\"{material}\"); // >>> [\"carbon\"]\n\n        let colors: String = r\n            .json_get(\"bike:1\", \"$.colors\")\n            .await\n            .expect(\"Failed to run JSON.GET\");\n        println!(\"{colors}\"); // >>> [[\"black\",\"silver\"]]\n\n        let stock: String = r\n            .json_get(\"bike:1\", \"$.inventory.in_stock\")\n            .await\n            .expect(\"Failed to run JSON.GET\");\n        println!(\"{stock}\"); // >>> [12]\n```\n\nExample:\n```rust\nlet stock_set: bool = r\n            .json_set(\"bike:1\", \"$.inventory.in_stock\", &json!(8))\n            .expect(\"Failed to update stock\");\n        println!(\"{}\", if stock_set { \"OK\" } else { \"(nil)\" }); // >>> OK\n\n        let new_price: String = cmd(\"JSON.NUMINCRBY\")\n            .arg(\"bike:1\")\n            .arg(\"$.price\")\n            .arg(-500)\n            .query(&mut r)\n            .expect(\"Failed to run JSON.NUMINCRBY\");\n        println!(\"{new_price}\"); // >>> [4472]\n\n        let updated_fields: String = r\n            .json_get(\"bike:1\", &[\"$.price\", \"$.inventory.in_stock\"])\n            .expect(\"Failed to read updated fields\");\n        println!(\"{updated_fields}\"); // >>> {\"$.price\":[4472],\"$.inventory.in_stock\":[8]}\n```\n\nExample:\n```rust\nlet stock_set: bool = r\n            .json_set(\"bike:1\", \"$.inventory.in_stock\", &json!(8))\n            .await\n            .expect(\"Failed to update stock\");\n        println!(\"{}\", if stock_set { \"OK\" } else { \"(nil)\" }); // >>> OK\n\n        let new_price: String = cmd(\"JSON.NUMINCRBY\")\n            .arg(\"bike:1\")\n            .arg(\"$.price\")\n            .arg(-500)\n            .query_async(&mut r)\n            .await\n            .expect(\"Failed to run JSON.NUMINCRBY\");\n        println!(\"{new_price}\"); // >>> [4472]\n\n        let updated_fields: String = r\n            .json_get(\"bike:1\", &[\"$.price\", \"$.inventory.in_stock\"])\n            .await\n            .expect(\"Failed to read updated fields\");\n        println!(\"{updated_fields}\"); // >>> {\"$.price\":[4472],\"$.inventory.in_stock\":[8]}\n```\n\nExample:\n```rust\nlet _: redis::Value = cmd(\"JSON.ARRAPPEND\")\n            .arg(\"bike:1\")\n            .arg(\"$.colors\")\n            .arg(\"\\\"red\\\"\")\n            .query(&mut r)\n            .expect(\"Failed to run JSON.ARRAPPEND\");\n\n        let updated_colors: String = r\n            .json_get(\"bike:1\", \"$.colors\")\n            .expect(\"Failed to read updated colors\");\n        println!(\"{updated_colors}\"); // >>> [[\"black\",\"silver\",\"red\"]]\n```\n\nExample:\n```rust\nlet _: redis::Value = cmd(\"JSON.ARRAPPEND\")\n            .arg(\"bike:1\")\n            .arg(\"$.colors\")\n            .arg(\"\\\"red\\\"\")\n            .query_async(&mut r)\n            .await\n            .expect(\"Failed to run JSON.ARRAPPEND\");\n\n        let updated_colors: String = r\n            .json_get(\"bike:1\", \"$.colors\")\n            .await\n            .expect(\"Failed to read updated colors\");\n        println!(\"{updated_colors}\"); // >>> [[\"black\",\"silver\",\"red\"]]\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:41.217Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":16,"totalLines":400,"estimatedTokens":4191}}394{"id":"doc-rolling_sensor_graph_demo_with_redis_docs-dcb3f8bd","source":"documentation","title":"Rolling sensor graph demo with Redis | Docs","url":"https://redis.io/docs/latest/develop/use-cases/time-series-dashboard/","text":"{\"categories\":[\"docs\",\"develop\",\"stack\",\"oss\",\"rs\",\"rc\"],\"description\":\"Build a rolling sensor graph demo with Redis time series data\",\"duplicateOf\":\"head:data-ai-metadata\",\"location\":\"body\",\"title\":\"Rolling sensor graph demo with Redis\",\"tableOfContents\":{\"sections\":[{\"id\":\"when-to-use-redis-time-series\",\"title\":\"When to use Redis time series\"},{\"id\":\"why-the-problem-is-hard\",\"title\":\"Why the problem is hard\"},{\"id\":\"what-you-can-expect-from-a-redis-solution\",\"title\":\"What you can expect from a Redis solution\"},{\"id\":\"how-redis-supports-the-solution\",\"title\":\"How Redis supports the solution\"},{\"id\":\"ecosystem\",\"title\":\"Ecosystem\"},{\"id\":\"code-examples-to-build-your-own-redis-time-series-dashboard\",\"title\":\"Code examples to build your own Redis time series dashboard\"}]},\"codeExamples\":[]}\n\nAll products Redis Software Redis Cloud Redis Open Source Redis Insight Redis Enterprise for K8s Redis Data Integration Client Libraries ESC\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:41.257Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":0,"totalLines":5,"estimatedTokens":239}}395{"id":"doc-zrevrangebyscore_docs-16032755","source":"documentation","title":"ZREVRANGEBYSCORE | Docs","url":"https://redis.io/docs/latest/commands/zrevrangebyscore/","text":"{\"acl_categories\":[\"@read\",\"@sortedset\",\"@slow\"],\"arguments\":[{\"display_text\":\"key\",\"key_spec_index\":0,\"name\":\"key\",\"type\":\"key\"},{\"display_text\":\"max\",\"name\":\"max\",\"type\":\"double\"},{\"display_text\":\"min\",\"name\":\"min\",\"type\":\"double\"},{\"display_text\":\"withscores\",\"name\":\"withscores\",\"optional\":true,\"token\":\"WITHSCORES\",\"type\":\"pure-token\"},{\"arguments\":[{\"display_text\":\"offset\",\"name\":\"offset\",\"type\":\"integer\"},{\"display_text\":\"count\",\"name\":\"count\",\"type\":\"integer\"}],\"name\":\"limit\",\"optional\":true,\"token\":\"LIMIT\",\"type\":\"block\"}],\"arity\":-4,\"categories\":[\"docs\",\"develop\",\"stack\",\"oss\",\"rs\",\"rc\",\"oss\",\"kubernetes\",\"clients\"],\"command_flags\":[\"readonly\"],\"complexity\":\"O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements being returned. If M is constant (e.g. always asking for the first 10 elements with LIMIT), you can consider it O(log(N)).\",\"description\":\"Returns members in a sorted set within a range of scores in reverse order.\",\"duplicateOf\":\"head:data-ai-metadata\",\"group\":\"sorted-set\",\"key_specs\":[{\"RO\":true,\"access\":true,\"begin_search\":{\"spec\":{\"index\":1},\"type\":\"index\"},\"find_keys\":{\"spec\":{\"keystep\":1,\"lastkey\":0,\"limit\":0},\"type\":\"range\"}}],\"location\":\"body\",\"since\":\"2.2.0\",\"syntax_fmt\":\"ZREVRANGEBYSCORE key max min [WITHSCORES] [LIMIT offset count]\",\"title\":\"ZREVRANGEBYSCORE\",\"tableOfContents\":{\"sections\":[{\"id\":\"required-arguments\",\"title\":\"Required arguments\"},{\"id\":\"optional-arguments\",\"title\":\"Optional arguments\"},{\"id\":\"examples\",\"title\":\"Examples\"},{\"id\":\"redis-software-and-redis-cloud-compatibility\",\"title\":\"Redis Software and Redis Cloud compatibility\"},{\"id\":\"return-information\",\"title\":\"Return information\"}]},\"codeExamples\":[]}\n\nAll products Redis Software Redis Cloud Redis Open Source Redis Insight Redis Enterprise for K8s Redis Data Integration Client Libraries ESC\n\nExample:\n```text\nZREVRANGEBYSCORE key max min [WITHSCORES] [LIMIT offset count]\n```\n\nExample:\n```text\nzrevrangebyscore(\n    name: KeyT,\n    max: ZScoreBoundT,\n    min: ZScoreBoundT,\n    start: Optional[int] = None,\n    num: Optional[int] = None,\n    withscores: bool = False,\n    score_cast_func: Union[type, Callable] = float\n) → Any\n```\n\nExample:\n```text\nzrevrangeByScore(\n    key: byte[],\n    max: double,\n    offset: double min final int,\n    count: int\n) → List<byte[]>\n\nzrevrangeByScore(\n    key: byte[],\n    max: byte[],\n    offset: byte[] min final int,\n    count: int\n) → List<byte[]>\n\nzrevrangeByScore(\n    key: String,\n    max: double,\n    min: double\n) → List<String>\n\nzrevrangeByScore(\n    key: String,\n    max: String,\n    min: String\n) → List<String>\n\nzrevrangeByScore(\n    key: String,\n    max: double,\n    offset: double min final int,\n    count: int\n) → List<String>\n```\n\nExample:\n```text\nzrevrangebyscore(\n    key: K,  // the key.\n    max: double,\n    min: double\n) → List<V>  // Long count of elements in the specified range. @since 4.3\n\nzrevrangebyscore(\n    key: K,  // the key.\n    max: String,\n    min: String\n) → List<V>  // Long count of elements in the specified range. @since 4.3\n\nzrevrangebyscore(\n    key: K,  // the key.\n    range: Range<? extends Number>  // the range.\n) → List<V>  // Long count of elements in the specified range. @since 4.3\n\nzrevrangebyscore(\n    key: K,  // the key.\n    max: double,\n    min: double,\n    offset: long,\n    count: long\n) → List<V>  // Long count of elements in the specified range. @since 4.3\n\nzrevrangebyscore(\n    key: K,  // the key.\n    max: String,\n    min: String,\n    offset: long,\n    count: long\n) → List<V>  // Long count of elements in the specified range. @since 4.3\n```\n\nExample:\n```text\nzrevrangebyscore(\n    key: K,  // the key.\n    max: double,\n    min: double\n) → RedisFuture<List<V>>  // Long count of elements in the specified range. @since 4.3\n\nzrevrangebyscore(\n    key: K,  // the key.\n    max: String,\n    min: String\n) → RedisFuture<List<V>>  // Long count of elements in the specified range. @since 4.3\n\nzrevrangebyscore(\n    key: K,  // the key.\n    range: Range<? extends Number>  // the range.\n) → RedisFuture<List<V>>  // Long count of elements in the specified range. @since 4.3\n\nzrevrangebyscore(\n    key: K,  // the key.\n    max: double,\n    min: double,\n    offset: long,\n    count: long\n) → RedisFuture<List<V>>  // Long count of elements in the specified range. @since 4.3\n\nzrevrangebyscore(\n    key: K,  // the key.\n    max: String,\n    min: String,\n    offset: long,\n    count: long\n) → RedisFuture<List<V>>  // Long count of elements in the specified range. @since 4.3\n```\n\nExample:\n```text\nzrevrangebyscore(\n    key: K,  // the key.\n    max: double,\n    min: double\n) → Flux<V>  // Long count of elements in the specified range. @since 4.3 @deprecated since 6.0 in favor of consuming large results through the org.reactivestreams.Publisher returned by #zrevrangebyscore.\n\nzrevrangebyscore(\n    key: K,  // the key.\n    max: String,\n    min: String\n) → Flux<V>  // Long count of elements in the specified range. @since 4.3 @deprecated since 6.0 in favor of consuming large results through the org.reactivestreams.Publisher returned by #zrevrangebyscore.\n\nzrevrangebyscore(\n    key: K,  // the key.\n    range: Range<? extends Number>  // the range.\n) → Flux<V>  // Long count of elements in the specified range. @since 4.3 @deprecated since 6.0 in favor of consuming large results through the org.reactivestreams.Publisher returned by #zrevrangebyscore.\n\nzrevrangebyscore(\n    key: K,  // the key.\n    max: double,\n    min: double,\n    offset: long,\n    count: long\n) → Flux<V>  // Long count of elements in the specified range. @since 4.3 @deprecated since 6.0 in favor of consuming large results through the org.reactivestreams.Publisher returned by #zrevrangebyscore.\n\nzrevrangebyscore(\n    key: K,  // the key.\n    max: String,\n    min: String,\n    offset: long,\n    count: long\n) → Flux<V>  // Long count of elements in the specified range. @since 4.3 @deprecated since 6.0 in favor of consuming large results through the org.reactivestreams.Publisher returned by #zrevrangebyscore.\n```\n\nExample:\n```text\nZRevRangeByScore(\n    ctx: context.Context,\n    key: string,\n    opt: *ZRangeBy\n) → *StringSliceCmd\n```\n\nExample:\n```text\nSortedSetRangeByScore(\n    key: RedisKey,  // The key of the sorted set.\n    start: double,  // The minimum score to filter by.\n    stop: double,  // The maximum score to filter by.\n    exclude: Exclude,  // Which of start and stop to exclude (defaults to both inclusive).\n    order: Order,  // The order to sort by (defaults to ascending).\n    skip: long,  // How many items to skip.\n    take: long,  // How many items to take.\n    flags: CommandFlags  // The flags to use for this operation.\n) → RedisValue[]  // List of elements in the specified score range.\n```\n\nExample:\n```text\nzrevrangebyscore(\n    $key: string,\n    $max: int|string,\n    $min: int|string,\n    ?array $options = null: Any\n) → array\n```\n\nExample:\n```text\nzrevrangebyscore(\n    key: K,\n    max: MM,\n    min: M\n) → (Vec<String>)\n\nzrevrangebyscore_withscores(\n    key: K,\n    max: MM,\n    min: M\n) → (Vec<String>)\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:41.342Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":10,"totalLines":215,"estimatedTokens":1775}}396{"id":"doc-troubleshooting_redis_software_docs-b66ac5fa","source":"documentation","title":"Troubleshooting Redis Software | Docs","url":"https://redis.io/docs/latest/operate/rs/troubleshooting/","text":"{\"categories\":[\"docs\",\"operate\",\"rs\"],\"description\":\"Resources for troubleshooting Redis Software\",\"duplicateOf\":\"head:data-ai-metadata\",\"location\":\"body\",\"title\":\"Troubleshooting Redis Software\",\"tableOfContents\":{\"sections\":[{\"id\":\"general-troubleshooting\",\"title\":\"General troubleshooting\"},{\"id\":\"troubleshooting-by-topic\",\"title\":\"Troubleshooting by topic\"},{\"id\":\"knowledge-base\",\"title\":\"Knowledge base\"},{\"id\":\"contact-support\",\"title\":\"Contact support\"}]},\"codeExamples\":[]}\n\nAll products Redis Software Redis Cloud Redis Open Source Redis Insight Redis Enterprise for K8s Redis Data Integration Client Libraries ESC\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:41.343Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":0,"totalLines":5,"estimatedTokens":160}}397{"id":"doc-configure_clusters_docs-402fcf80","source":"documentation","title":"Configure clusters | Docs","url":"https://redis.io/docs/latest/operate/rs/clusters/configure/","text":"{\"categories\":[\"docs\",\"operate\",\"rs\"],\"description\":\"Configuration options for your Redis Software cluster.\",\"duplicateOf\":\"head:data-ai-metadata\",\"location\":\"body\",\"title\":\"Configure clusters\",\"tableOfContents\":{\"sections\":[]},\"codeExamples\":[]}\n\nAll products Redis Software Redis Cloud Redis Open Source Redis Insight Redis Enterprise for K8s Redis Data Integration Client Libraries ESC\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:41.346Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":0,"totalLines":5,"estimatedTokens":101}}398{"id":"doc-probabilistic_data_types_docs-cfc307f3","source":"documentation","title":"Probabilistic data types | Docs","url":"https://redis.io/docs/latest/develop/clients/php/prob/","text":"{\"categories\":[\"docs\",\"develop\",\"stack\",\"oss\",\"rs\",\"rc\",\"oss\",\"kubernetes\",\"clients\"],\"description\":\"Learn how to use approximate calculations with Redis.\",\"duplicateOf\":\"head:data-ai-metadata\",\"location\":\"body\",\"title\":\"Probabilistic data types\",\"tableOfContents\":{\"sections\":[]},\"codeExamples\":[{\"codetabsId\":\"home_prob_dts-stepbloom\",\"description\":\"Foundational: Use Bloom filters for memory-efficient set membership testing with false positive possibility\",\"difficulty\":\"beginner\",\"id\":\"bloom\",\"languages\":[{\"clientId\":\"predis\",\"clientName\":\"Predis\",\"id\":\"PHP\",\"langId\":\"php\",\"panelId\":\"panel_PHP_home_prob_dts-stepbloom\"}]},{\"codetabsId\":\"home_prob_dts-stepcuckoo\",\"description\":\"Foundational: Use Cuckoo filters for set membership testing with deletion support and faster lookups than Bloom filters\",\"difficulty\":\"beginner\",\"id\":\"cuckoo\",\"languages\":[{\"clientId\":\"predis\",\"clientName\":\"Predis\",\"id\":\"PHP\",\"langId\":\"php\",\"panelId\":\"panel_PHP_home_prob_dts-stepcuckoo\"}]},{\"codetabsId\":\"home_prob_dts-stephyperloglog\",\"description\":\"Foundational: Estimate set cardinality with HyperLogLog for memory-efficient counting of distinct items\",\"difficulty\":\"beginner\",\"id\":\"hyperloglog\",\"languages\":[{\"clientId\":\"predis\",\"clientName\":\"Predis\",\"id\":\"PHP\",\"langId\":\"php\",\"panelId\":\"panel_PHP_home_prob_dts-stephyperloglog\"}]},{\"codetabsId\":\"home_prob_dts-stepcms\",\"description\":\"Foundational: Track approximate item frequencies with Count-min sketch for memory-efficient statistics on data streams\",\"difficulty\":\"intermediate\",\"id\":\"cms\",\"languages\":[{\"clientId\":\"predis\",\"clientName\":\"Predis\",\"id\":\"PHP\",\"langId\":\"php\",\"panelId\":\"panel_PHP_home_prob_dts-stepcms\"}]},{\"codetabsId\":\"home_prob_dts-steptdigest\",\"description\":\"Foundational: Estimate quantiles and percentiles with t-digest for memory-efficient statistical analysis of large datasets\",\"difficulty\":\"intermediate\",\"id\":\"tdigest\",\"languages\":[{\"clientId\":\"predis\",\"clientName\":\"Predis\",\"id\":\"PHP\",\"langId\":\"php\",\"panelId\":\"panel_PHP_home_prob_dts-steptdigest\"}]},{\"codetabsId\":\"home_prob_dts-steptopk\",\"description\":\"Foundational: Track top K most frequent items in a data stream with Top-K for efficient ranking without storing all items\",\"difficulty\":\"intermediate\",\"id\":\"topk\",\"languages\":[{\"clientId\":\"predis\",\"clientName\":\"Predis\",\"id\":\"PHP\",\"langId\":\"php\",\"panelId\":\"panel_PHP_home_prob_dts-steptopk\"}]}]}\n\nAll products Redis Software Redis Cloud Redis Open Source Redis Insight Redis Enterprise for K8s Redis Data Integration Client Libraries ESC\n\nExample:\n```php\n$r->sadd('ip_tracker', $newIpAddress);\n```\n\nExample:\n```php\n$numDistinctIps = $r->scard('ip_tracker');\n```\n\nExample:\n```php\n$r->del('recorded_users');\n$r->bfreserve('recorded_users', 0.01, 1000);\n\n$added = $r->bfmadd('recorded_users', 'andy', 'cameron', 'david', 'michelle');\necho json_encode($added), PHP_EOL;\n// >>> [1,1,1,1]\n\n$known = $r->bfexists('recorded_users', 'cameron');\necho $known, PHP_EOL;\n// >>> 1\n\n$unknown = $r->bfexists('recorded_users', 'kaitlyn');\necho $unknown, PHP_EOL;\n// >>> 0\n```\n\nExample:\n```php\n<?php\n\nrequire 'vendor/autoload.php';\n\nuse Predis\\Client as PredisClient;\n\n$r = new PredisClient([\n    'scheme' => 'tcp',\n    'host' => '127.0.0.1',\n    'port' => 6379,\n    'password' => '',\n    'database' => 0,\n]);\n\n$r->del('recorded_users');\n$r->bfreserve('recorded_users', 0.01, 1000);\n\n$added = $r->bfmadd('recorded_users', 'andy', 'cameron', 'david', 'michelle');\necho json_encode($added), PHP_EOL;\n// >>> [1,1,1,1]\n\n$known = $r->bfexists('recorded_users', 'cameron');\necho $known, PHP_EOL;\n// >>> 1\n\n$unknown = $r->bfexists('recorded_users', 'kaitlyn');\necho $unknown, PHP_EOL;\n// >>> 0\n\n$r->del('other_users');\n$r->cfreserve('other_users', 1000);\n\n$r->cfadd('other_users', 'paolo');\n$r->cfadd('other_users', 'kaitlyn');\n$r->cfadd('other_users', 'rachel');\n\n$beforeDelete = [\n    $r->cfexists('other_users', 'paolo'),\n    $r->cfexists('other_users', 'kaitlyn'),\n    $r->cfexists('other_users', 'rachel'),\n    $r->cfexists('other_users', 'andy'),\n];\necho json_encode($beforeDelete), PHP_EOL;\n// >>> [1,1,1,0]\n\n$r->cfdel('other_users', 'paolo');\n$afterDelete = $r->cfexists('other_users', 'paolo');\necho $afterDelete, PHP_EOL;\n// >>> 0\n\n$r->del('group:1', 'group:2', 'both_groups');\n\n$r->pfadd('group:1', ['andy', 'cameron', 'david']);\n$group1 = $r->pfcount('group:1');\necho $group1, PHP_EOL;\n// >>> 3\n\n$r->pfadd('group:2', ['kaitlyn', 'michelle', 'paolo', 'rachel']);\n$group2 = $r->pfcount('group:2');\necho $group2, PHP_EOL;\n// >>> 4\n\n$r->pfmerge('both_groups', 'group:1', 'group:2');\n$bothGroups = $r->pfcount('both_groups');\necho $bothGroups, PHP_EOL;\n// >>> 7\n\n$r->del('items_sold');\n$r->cmsinitbyprob('items_sold', 0.01, 0.005);\n\n$firstCounts = $r->cmsincrby(\n    'items_sold',\n    'bread', 300,\n    'tea', 200,\n    'coffee', 200,\n    'beer', 100\n);\necho json_encode($firstCounts), PHP_EOL;\n// >>> [300,200,200,100]\n\n$secondCounts = $r->cmsincrby(\n    'items_sold',\n    'bread', 100,\n    'coffee', 150\n);\necho json_encode($secondCounts), PHP_EOL;\n// >>> [400,350]\n\n$queriedCounts = $r->cmsquery('items_sold', 'bread', 'tea', 'coffee', 'beer');\necho json_encode($queriedCounts), PHP_EOL;\n// >>> [400,200,350,100]\n\n$r->del('male_heights', 'female_heights', 'all_heights');\n\n$r->tdigestcreate('male_heights');\n$r->tdigestadd('male_heights', 175.5, 181, 160.8, 152, 177, 196, 164);\n\n$maleMin = $r->tdigestmin('male_heights');\necho $maleMin, PHP_EOL;\n// >>> 152\n\n$maleMax = $r->tdigestmax('male_heights');\necho $maleMax, PHP_EOL;\n// >>> 196\n\n$maleQuantile = $r->tdigestquantile('male_heights', 0.75);\necho json_encode($maleQuantile), PHP_EOL;\n// >>> [\"181\"]\n\n$maleCdf = $r->tdigestcdf('male_heights', 181);\necho json_encode($maleCdf), PHP_EOL;\n// >>> [\"0.7857142857142857\"]\n\n$r->tdigestcreate('female_heights');\n$r->tdigestadd('female_heights', 155.5, 161, 168.5, 170, 157.5, 163, 171);\n\n$femaleQuantile = $r->tdigestquantile('female_heights', 0.75);\necho json_encode($femaleQuantile), PHP_EOL;\n// >>> [\"170\"]\n\n$r->tdigestmerge('all_heights', ['male_heights', 'female_heights']);\n$allQuantile = $r->tdigestquantile('all_heights', 0.75);\necho json_encode($allQuantile), PHP_EOL;\n// >>> [\"175.5\"]\n\n$r->del('top_3_songs');\n$r->topkreserve('top_3_songs', 3, 7, 8, 0.9);\n\n$evicted = $r->topkadd(\n    'top_3_songs',\n    'Starfish Trooper',\n    'Only one more time',\n    'Rock me, Handel',\n    'How will anyone know?',\n    'Average lover',\n    'Road to everywhere'\n);\necho json_encode($evicted), PHP_EOL;\n// >>> [null,null,null,\"Rock me, Handel\",\"Only one more time\",null]\n\n$leaders = $r->topklist('top_3_songs');\necho json_encode($leaders), PHP_EOL;\n// >>> [\"Average lover\",\"How will anyone know?\",\"Starfish Trooper\"]\n\n$membership = $r->topkquery('top_3_songs', 'Starfish Trooper', 'Road to everywhere');\necho json_encode($membership), PHP_EOL;\n// >>> [1,0]\n```\n\nExample:\n```php\n$r->del('other_users');\n$r->cfreserve('other_users', 1000);\n\n$r->cfadd('other_users', 'paolo');\n$r->cfadd('other_users', 'kaitlyn');\n$r->cfadd('other_users', 'rachel');\n\n$beforeDelete = [\n    $r->cfexists('other_users', 'paolo'),\n    $r->cfexists('other_users', 'kaitlyn'),\n    $r->cfexists('other_users', 'rachel'),\n    $r->cfexists('other_users', 'andy'),\n];\necho json_encode($beforeDelete), PHP_EOL;\n// >>> [1,1,1,0]\n\n$r->cfdel('other_users', 'paolo');\n$afterDelete = $r->cfexists('other_users', 'paolo');\necho $afterDelete, PHP_EOL;\n// >>> 0\n```\n\nExample:\n```php\n$r->del('group:1', 'group:2', 'both_groups');\n\n$r->pfadd('group:1', ['andy', 'cameron', 'david']);\n$group1 = $r->pfcount('group:1');\necho $group1, PHP_EOL;\n// >>> 3\n\n$r->pfadd('group:2', ['kaitlyn', 'michelle', 'paolo', 'rachel']);\n$group2 = $r->pfcount('group:2');\necho $group2, PHP_EOL;\n// >>> 4\n\n$r->pfmerge('both_groups', 'group:1', 'group:2');\n$bothGroups = $r->pfcount('both_groups');\necho $bothGroups, PHP_EOL;\n// >>> 7\n```\n\nExample:\n```php\n$r->del('items_sold');\n$r->cmsinitbyprob('items_sold', 0.01, 0.005);\n\n$firstCounts = $r->cmsincrby(\n    'items_sold',\n    'bread', 300,\n    'tea', 200,\n    'coffee', 200,\n    'beer', 100\n);\necho json_encode($firstCounts), PHP_EOL;\n// >>> [300,200,200,100]\n\n$secondCounts = $r->cmsincrby(\n    'items_sold',\n    'bread', 100,\n    'coffee', 150\n);\necho json_encode($secondCounts), PHP_EOL;\n// >>> [400,350]\n\n$queriedCounts = $r->cmsquery('items_sold', 'bread', 'tea', 'coffee', 'beer');\necho json_encode($queriedCounts), PHP_EOL;\n// >>> [400,200,350,100]\n```\n\nExample:\n```php\n$r->del('male_heights', 'female_heights', 'all_heights');\n\n$r->tdigestcreate('male_heights');\n$r->tdigestadd('male_heights', 175.5, 181, 160.8, 152, 177, 196, 164);\n\n$maleMin = $r->tdigestmin('male_heights');\necho $maleMin, PHP_EOL;\n// >>> 152\n\n$maleMax = $r->tdigestmax('male_heights');\necho $maleMax, PHP_EOL;\n// >>> 196\n\n$maleQuantile = $r->tdigestquantile('male_heights', 0.75);\necho json_encode($maleQuantile), PHP_EOL;\n// >>> [\"181\"]\n\n$maleCdf = $r->tdigestcdf('male_heights', 181);\necho json_encode($maleCdf), PHP_EOL;\n// >>> [\"0.7857142857142857\"]\n\n$r->tdigestcreate('female_heights');\n$r->tdigestadd('female_heights', 155.5, 161, 168.5, 170, 157.5, 163, 171);\n\n$femaleQuantile = $r->tdigestquantile('female_heights', 0.75);\necho json_encode($femaleQuantile), PHP_EOL;\n// >>> [\"170\"]\n\n$r->tdigestmerge('all_heights', ['male_heights', 'female_heights']);\n$allQuantile = $r->tdigestquantile('all_heights', 0.75);\necho json_encode($allQuantile), PHP_EOL;\n// >>> [\"175.5\"]\n```\n\nExample:\n```php\n$r->del('top_3_songs');\n$r->topkreserve('top_3_songs', 3, 7, 8, 0.9);\n\n$evicted = $r->topkadd(\n    'top_3_songs',\n    'Starfish Trooper',\n    'Only one more time',\n    'Rock me, Handel',\n    'How will anyone know?',\n    'Average lover',\n    'Road to everywhere'\n);\necho json_encode($evicted), PHP_EOL;\n// >>> [null,null,null,\"Rock me, Handel\",\"Only one more time\",null]\n\n$leaders = $r->topklist('top_3_songs');\necho json_encode($leaders), PHP_EOL;\n// >>> [\"Average lover\",\"How will anyone know?\",\"Starfish Trooper\"]\n\n$membership = $r->topkquery('top_3_songs', 'Starfish Trooper', 'Road to everywhere');\necho json_encode($membership), PHP_EOL;\n// >>> [1,0]\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:41.357Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":9,"totalLines":318,"estimatedTokens":2522}}399{"id":"doc-redis_open_source_quick_start_docs-28758052","source":"documentation","title":"Redis Open Source quick start | Docs","url":"https://redis.io/docs/latest/operate/oss_and_stack/stack-with-enterprise/stack-quickstart/","text":"{\"categories\":[\"docs\",\"operate\",\"stack\"],\"description\":\"\",\"duplicateOf\":\"head:data-ai-metadata\",\"location\":\"body\",\"title\":\"Redis Open Source quick start\",\"tableOfContents\":{\"sections\":[]},\"codeExamples\":[]}\n\nAll products Redis Software Redis Cloud Redis Open Source Redis Insight Redis Enterprise for K8s Redis Data Integration Client Libraries ESC\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:41.374Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":0,"totalLines":5,"estimatedTokens":91}}400{"id":"doc-redis_client_handling_docs-e300b9e7","source":"documentation","title":"Redis client handling | Docs","url":"https://redis.io/docs/latest/develop/reference/clients/","text":"{\"categories\":[\"docs\",\"develop\",\"stack\",\"oss\",\"rs\",\"rc\",\"oss\",\"kubernetes\",\"clients\"],\"description\":\"How the Redis server manages client connections\\n\",\"duplicateOf\":\"head:data-ai-metadata\",\"location\":\"body\",\"title\":\"Redis client handling\",\"tableOfContents\":{\"sections\":[{\"id\":\"accepting-client-connections\",\"title\":\"Accepting Client Connections\"},{\"id\":\"what-order-are-client-requests-served-in\",\"title\":\"What Order are Client Requests Served In?\"},{\"id\":\"maximum-concurrent-connected-clients\",\"title\":\"Maximum Concurrent Connected Clients\"},{\"id\":\"output-buffer-limits\",\"title\":\"Output Buffer Limits\"},{\"id\":\"query-buffer-hard-limit\",\"title\":\"Query Buffer Hard Limit\"},{\"id\":\"client-eviction\",\"title\":\"Client Eviction\"},{\"id\":\"client-timeouts\",\"title\":\"Client Timeouts\"},{\"id\":\"the-client-command\",\"title\":\"The CLIENT Command\"},{\"id\":\"tcp-keepalive\",\"title\":\"TCP keepalive\"}]},\"codeExamples\":[]}\n\nAll products Redis Software Redis Cloud Redis Open Source Redis Insight Redis Enterprise for K8s Redis Data Integration Client Libraries ESC\n\nExample:\n```text\n$ ./redis-server --maxclients 100000\n[41422] 23 Jan 11:28:33.179 # Unable to set the max number of files limit to 100032 (Invalid argument), setting the max clients configuration to 10112.\n```\n\nExample:\n```text\nredis 127.0.0.1:6379> client list\naddr=127.0.0.1:52555 fd=5 name= age=855 idle=0 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=32768 obl=0 oll=0 omem=0 events=r cmd=client\naddr=127.0.0.1:52787 fd=6 name= age=6 idle=5 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=ping\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:41.386Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":2,"totalLines":18,"estimatedTokens":400}}401{"id":"doc-video_extension-fa4d3880","source":"documentation","title":"Video Extension","url":"https://vercel.com/docs/ai-gateway/modalities/video-generation/video-extension","text":"AI GatewayModalitiesVideo GenerationVideo Extension\n\nCross-link Extension (/docs/ai-gateway/modalities/video-generation/video-extension)From the Vercel docs graph (built :14.592Z), spanning vercel.com docs + KB, nextjs.org, ai-sdk.dev, and other Vercel documentation sites. Full graph as ://vercel.com/docs/graph.jsonSemantically closest pagesVideo Editing — Edit existing videos using text prompts with Grok Imagine Video through AI Gateway.Video / Async Video — Generate videos from text prompts, images, or video input using AI Gateway, either over a single request or as a backgroGenerate videos with AI SDK — Use experimental_generateVideo in the AI SDK to generate videos from a text prompt or an image, set aspect ratio, resoluText-to-Video — Generate videos from text prompts using Google Veo, KlingAI, Wan, Grok Imagine Video, or ByteDance Seedance through AI GVideo GenerationPrerequisitesAI Gateway — AI Gateway provides a unified API to access hundreds of AI models through a single endpoint, with text, image, and videoModalities — The inputs and outputs AI Gateway models work , image, and video generation, speech to text, text to speech, rThis page links to (1)Video Editing — Edit existing videos using text prompts with Grok Imagine Video through AI Gateway.Pages that link here (3)By (3)Video Generation — Generate videos from text prompts, images, or video input using AI models through Vercel AI Gateway.Image-to-Video — Animate static images into videos using Google Veo, KlingAI, Wan, Grok Imagine Video, or ByteDance Seedance through AI GReference-to-Video — Generate videos featuring characters from reference images or videos using Google Veo, KlingAI, Wan, Seedance, or Grok I\n\nExample:\n```text\nimport { experimental_generateVideo as generateVideo } from 'ai';\nimport fs from 'node:fs';\n \n// Step 1: Generate source video\nconst source = await generateVideo({\n  model: 'xai/grok-imagine-video',\n  prompt: 'A cat sitting on a sunlit windowsill, tail gently swishing.',\n  duration: 5,\n  aspectRatio: '16:9',\n  providerOptions: {\n    xai: { pollTimeoutMs: 600000 },\n  },\n});\n \nconst sourceUrl = source.providerMetadata?.xai?.videoUrl as string;\n \n// Step 2: Extend from last frame\nconst extended = await generateVideo({\n  model: 'xai/grok-imagine-video',\n  prompt: 'The cat turns its head, notices a butterfly, and leaps off.',\n  duration: 6,\n  providerOptions: {\n    xai: {\n      mode: 'extend-video',\n      videoUrl: sourceUrl,\n      pollTimeoutMs: 600000,\n    },\n  },\n});\n \nfs.writeFileSync('extended.mp4', extended.videos[0].uint8Array);\n```\n\nExample:\n```text\nimport { experimental_generateVideo as generateVideo } from 'ai';\nimport fs from 'node:fs';\n \nconst result = await generateVideo({\n  model: 'xai/grok-imagine-video',\n  prompt:\n    'The cat continues walking slowly through the dandelions as the breeze picks up.',\n  duration: 5,\n  providerOptions: {\n    xai: {\n      mode: 'extend-video',\n      videoUrl: 'https://example.com/source-video.mp4',\n      pollTimeoutMs: 600000,\n    },\n  },\n});\n \nfs.writeFileSync('output.mp4', result.videos[0].uint8Array);\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:53.658Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":2,"totalLines":62,"estimatedTokens":777}}402{"id":"doc-view_and_manage_redis_slow_log_docs-f9828b98","source":"documentation","title":"View and manage Redis slow log | Docs","url":"https://redis.io/docs/latest/operate/rs/clusters/logging/redis-slow-log/","text":"{\"categories\":[\"docs\",\"operate\",\"rs\"],\"description\":\"\",\"duplicateOf\":\"head:data-ai-metadata\",\"location\":\"body\",\"title\":\"View and manage Redis slow log\",\"tableOfContents\":{\"sections\":[{\"id\":\"redis-software-slow-log-enhancements\",\"title\":\"Redis Software slow log enhancements\"},{\"id\":\"view-slow-log\",\"title\":\"View slow log\"},{\"id\":\"change-slow-log-threshold\",\"title\":\"Change slow log threshold\"},{\"id\":\"change-maximum-entries\",\"title\":\"Change maximum entries\"}]},\"codeExamples\":[]}\n\nAll products Redis Software Redis Cloud Redis Open Source Redis Insight Redis Enterprise for K8s Redis Data Integration Client Libraries ESC\n\nExample:\n```sh\nredis-cli -h <endpoint> -p <port> SLOWLOG GET <count>\n```\n\nExample:\n```sh\nredis-cli -h <endpoint> -p <port> CONFIG GET slowlog-log-slower-than\n```\n\nExample:\n```sh\nredis-cli -h <endpoint> -p <port> CONFIG SET slowlog-log-slower-than <value_in_microseconds>\n```\n\nExample:\n```sh\nredis-cli -h <endpoint> -p <port> CONFIG GET slowlog-max-len\n```\n\nExample:\n```sh\nredis-cli -h <endpoint> -p <port> CONFIG SET slowlog-max-len <value>\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:42.343Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":5,"totalLines":30,"estimatedTokens":271}}403{"id":"doc-recover_a_failed_database_docs-669c7578","source":"documentation","title":"Recover a failed database | Docs","url":"https://redis.io/docs/latest/operate/rs/databases/recover/","text":"{\"categories\":[\"docs\",\"operate\",\"rs\",\"kubernetes\"],\"description\":\"Recover a database after the cluster fails or the database is corrupted.\",\"duplicateOf\":\"head:data-ai-metadata\",\"location\":\"body\",\"title\":\"Recover a failed database\",\"tableOfContents\":{\"sections\":[{\"id\":\"prerequisites\",\"title\":\"Prerequisites\"},{\"id\":\"recover-databases\",\"title\":\"Recover databases\"},{\"id\":\"configure-automatic-recovery\",\"title\":\"Configure automatic recovery\"}]},\"codeExamples\":[]}\n\nAll products Redis Software Redis Cloud Redis Open Source Redis Insight Redis Enterprise for K8s Redis Data Integration Client Libraries ESC\n\nExample:\n```sh\nrladmin recover list\n```\n\nExample:\n```sh\nrladmin recover all\n```\n\nExample:\n```sh\nrladmin recover db db:<id>\n```\n\nExample:\n```sh\nrladmin recover db <name>\n```\n\nExample:\n```sh\nrladmin recover db <name> only_configuration\n```\n\nExample:\n```sh\nrladmin status\n```\n\nExample:\n```sh\nrladmin tune cluster auto_recovery enabled\n```\n\nExample:\n```sh\nPUT /v1/cluster/policy\n{\n  \"auto_recovery\": true\n}\n```\n\nExample:\n```sh\nPUT /v1/bdbs/<bdb_uid>\n{\n  \"recovery_wait_time\": 3600\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:42.355Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":9,"totalLines":56,"estimatedTokens":276}}404{"id":"doc-redis_streaming_with_redis_py_docs-5513b43c","source":"documentation","title":"Redis streaming with redis-py | Docs","url":"https://redis.io/docs/latest/develop/use-cases/streaming/redis-py/","text":"{\"categories\":[\"docs\",\"develop\",\"stack\",\"oss\",\"rs\",\"rc\"],\"description\":\"Implement a Redis event-streaming pipeline in Python with redis-py\",\"duplicateOf\":\"head:data-ai-metadata\",\"location\":\"body\",\"title\":\"Redis streaming with redis-py\",\"tableOfContents\":{\"sections\":[]},\"codeExamples\":[]}\n\nAll products Redis Software Redis Cloud Redis Open Source Redis Insight Redis Enterprise for K8s Redis Data Integration Client Libraries ESC\n\nExample:\n```python\nimport redis\nfrom event_stream import RedisEventStream\n\nr = redis.Redis(host=\"localhost\", port=6379, decode_responses=True)\nstream = RedisEventStream(\n    redis_client=r,\n    stream_key=\"demo:events:orders\",\n    maxlen_approx=2000,        # retention guardrail\n    claim_min_idle_ms=5000,    # XAUTOCLAIM threshold\n)\n\n# Producer\nstream_id = stream.produce(\n    \"order.placed\",\n    {\"order_id\": \"o-1234\", \"customer\": \"alice\", \"amount\": \"49.50\"},\n)\n\n# Consumer group + one consumer\nstream.ensure_group(\"notifications\", start_id=\"0-0\")\nentries = stream.consume(\"notifications\", \"worker-a\", count=10, block_ms=500)\nfor entry_id, fields in entries:\n    handle(fields)                              # your processing\n    stream.ack(\"notifications\", [entry_id])     # XACK\n\n# Recover stuck PEL entries by reaping them into a healthy consumer.\n# The textbook pattern: each consumer periodically calls XAUTOCLAIM\n# with itself as the target and processes whatever it claimed.\n# `ConsumerWorker.reap_idle_pel` wraps that flow; the low-level helper\n# `stream.autoclaim(group, target_name)` is also available if you\n# want to drive XAUTOCLAIM directly.\nresult = worker_b.reap_idle_pel()\n# result == {\"claimed\": N, \"processed\": M, \"deleted_ids\": [...]}\n# deleted_ids are PEL entries whose payload was already trimmed.\n# Redis 7+ has already removed those slots from the PEL, so no XACK\n# is needed — log them and route to a dead-letter store for audit.\n\n# Replay history (independent of any group's cursor)\nfor entry_id, fields in stream.replay(\"-\", \"+\", count=50):\n    print(entry_id, fields)\n```\n\nExample:\n```text\ndemo:events:orders\n  1716998413541-0   type=order.placed     order_id=o-1234   customer=alice  amount=49.50  ts_ms=...\n  1716998413542-0   type=order.paid       order_id=o-1234   customer=alice  amount=49.50  ts_ms=...\n  1716998413542-1   type=order.shipped    order_id=o-1235   customer=bob    amount=12.00  ts_ms=...\n  ...\n```\n\nExample:\n```python\ndef produce_batch(self, events: Iterable[tuple[str, dict]]) -> list[str]:\n    pipe = self.redis.pipeline(transaction=False)\n    for event_type, payload in events:\n        fields = self._encode_fields(event_type, payload)\n        pipe.xadd(\n            self.stream_key,\n            fields,\n            maxlen=self.maxlen_approx,\n            approximate=True,\n        )\n    ids = pipe.execute()\n    ...\n    return list(ids)\n```\n\nExample:\n```python\ndef consume(\n    self,\n    group: str,\n    consumer: str,\n    count: int = 10,\n    block_ms: int = 500,\n) -> list[Entry]:\n    result = self.redis.xreadgroup(\n        group,\n        consumer,\n        {self.stream_key: \">\"},\n        count=count,\n        block=block_ms,\n    )\n    return _flatten_entries(result)\n```\n\nExample:\n```python\ndef ack(self, group: str, ids: Iterable[str]) -> int:\n    ids = list(ids)\n    if not ids:\n        return 0\n    return int(self.redis.xack(self.stream_key, group, *ids))\n```\n\nExample:\n```python\nstream.ensure_group(\"notifications\", start_id=\"0-0\")\nstream.ensure_group(\"analytics\",     start_id=\"0-0\")\n```\n\nExample:\n```python\ndef reap_idle_pel(self) -> dict:\n    claimed, deleted = self.stream.autoclaim(\n        self.group, self.name, page_count=100, max_pages=10,\n    )\n    processed = 0\n    for entry_id, fields in claimed:\n        try:\n            self._handle_entry(entry_id, fields)\n            processed += 1\n        except Exception as exc:\n            print(f\"reap failed on {entry_id}: {exc}\")\n    return {\n        \"claimed\": len(claimed),\n        \"deleted_ids\": deleted,\n        \"processed\": processed,\n    }\n```\n\nExample:\n```python\ndef autoclaim(\n    self,\n    group: str,\n    consumer: str,\n    page_count: int = 100,\n    start_id: str = \"0-0\",\n    max_pages: int = 10,\n) -> tuple[list[Entry], list[str]]:\n    claimed_all, deleted_all = [], []\n    cursor = start_id\n    for _ in range(max_pages):\n        next_id, claimed, deleted = self.redis.xautoclaim(\n            self.stream_key,\n            group,\n            consumer,\n            min_idle_time=self.claim_min_idle_ms,\n            start_id=cursor,\n            count=page_count,\n        )\n        claimed_all.extend(claimed)\n        deleted_all.extend(deleted or [])\n        if next_id == \"0-0\":\n            break\n        cursor = next_id\n    return claimed_all, deleted_all\n```\n\nExample:\n```python\ndef replay(\n    self,\n    start_id: str = \"-\",\n    end_id: str = \"+\",\n    count: int = 100,\n) -> list[Entry]:\n    return list(self.redis.xrange(\n        self.stream_key, min=start_id, max=end_id, count=count,\n    ))\n```\n\nExample:\n```python\ndef _run(self) -> None:\n    while not self._stop_event.is_set():\n        if self._paused.is_set():\n            time.sleep(0.05)\n            continue\n        try:\n            entries = self.stream.consume(\n                self.group, self.name, count=10, block_ms=500,\n            )\n        except Exception as exc:\n            print(f\"[{self.group}/{self.name}] read failed: {exc}\")\n            time.sleep(0.5)\n            continue\n\n        for entry_id, fields in entries:\n            if self.process_latency_ms:\n                time.sleep(self.process_latency_ms / 1000.0)\n            self._handle_entry(entry_id, fields)\n```\n\nExample:\n```bash\npip install \"redis>=5.0\"\n```\n\nExample:\n```bash\nmkdir streaming-demo && cd streaming-demo\nBASE=https://raw.githubusercontent.com/redis/docs/main/content/develop/use-cases/streaming/redis-py\ncurl -O $BASE/event_stream.py\ncurl -O $BASE/consumer_worker.py\ncurl -O $BASE/demo_server.py\n```\n\nExample:\n```bash\npython3 demo_server.py\n```\n\nExample:\n```text\nDeleting any existing data at key 'demo:events:orders' for a clean demo run (pass --no-reset to keep it).\nRedis streaming demo server listening on http://127.0.0.1:8083\nUsing Redis at localhost:6379 with stream key 'demo:events:orders' (MAXLEN ~ 2000)\nSeeded 3 consumer(s) across 2 group(s)\n```\n\nExample:\n```bash\n# Stream summary\nredis-cli XLEN demo:events:orders\nredis-cli XINFO STREAM demo:events:orders\n\n# Group cursors and pending counts\nredis-cli XINFO GROUPS demo:events:orders\n\n# Consumers within a group\nredis-cli XINFO CONSUMERS demo:events:orders notifications\n\n# Pending entries with idle time and delivery count\nredis-cli XPENDING demo:events:orders notifications - + 20\n\n# Tail the stream live (no consumer-group state — like tail -f)\nredis-cli XREAD BLOCK 0 STREAMS demo:events:orders '$'\n\n# Replay a range\nredis-cli XRANGE demo:events:orders - + COUNT 50\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:42.461Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":15,"totalLines":241,"estimatedTokens":1717}}405{"id":"doc-set_maintenance_windows_docs-120b2134","source":"documentation","title":"Set maintenance windows | Docs","url":"https://redis.io/docs/latest/operate/rc/subscriptions/maintenance/set-maintenance-windows/","text":"{\"categories\":[\"docs\",\"operate\",\"rc\"],\"description\":\"Shows how to set manual maintenance windows and skip maintenance.\",\"duplicateOf\":\"head:data-ai-metadata\",\"location\":\"body\",\"title\":\"Set maintenance windows\",\"tableOfContents\":{\"sections\":[{\"id\":\"set-manual-maintenance-windows\",\"title\":\"Set manual maintenance windows\"},{\"id\":\"skip-maintenance-temporarily\",\"title\":\"Skip maintenance temporarily\"}]},\"codeExamples\":[]}\n\nAll products Redis Software Redis Cloud Redis Open Source Redis Insight Redis Enterprise for K8s Redis Data Integration Client Libraries ESC\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:21:42.512Z","totalSectionsIncluded":2,"totalCodeBlocksIncluded":0,"totalLines":5,"estimatedTokens":144}}406