{"openapi":"3.2.0","info":{"title":"Skywake API","version":"1.0.0","description":"Branches of whole filesystems, and search indexes, for agents. Namespace, index and branch names may hold `/`; encode it as `%2F` in paths. Send `Authorization: Bearer <API key or token>`. Public namespaces can be read without one."},"servers":[{"url":"/v1"}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}},"schemas":{"CreatedOrg":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":["string","null"],"description":"The first admin key, shown only this once."}},"required":["id","key"]},"ErrorBody":{"type":"object","properties":{"error":{"type":"string","description":"What went wrong, for people to read."},"code":{"$ref":"#/components/schemas/ErrorCode"},"request_id":{"type":["string","null"],"description":"The request's id, also in the `X-Request-Id` header. Quote it in bug reports."},"path":{"type":"string","description":"For an invalid request, the JSON path of the field that is wrong.","example":"filter.and[1].price.lt"}},"required":["error","code","request_id"],"description":"The body of every error response."},"ErrorCode":{"type":"string","enum":["invalid","unauthorized","forbidden","not_found","conflict","too_large","rate_limited","internal","not_implemented","unavailable","method_not_allowed","unsupported_media_type","ip_not_allowed","payment_required"],"description":"What kind of error it is, for programs to check."},"NewOrg":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","description":"The id, when the console made the organization. Then no key is made: its people sign in."}},"required":["name"],"additionalProperties":false},"NamedOrg":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"OrgName":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100}},"required":["name"],"additionalProperties":false},"IpAllowlist":{"type":"object","properties":{"cidrs":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":100,"description":"Addresses the organization's keys and console sessions may call from, as CIDRs such as `203.0.113.0/24` or `2001:db8::/32`; a lone address means only itself. Empty: any.","example":["203.0.113.0/24"]}},"required":["cidrs"]},"InvoiceSummary":{"type":"object","properties":{"month":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","example":"2026-11"},"status":{"type":"string","enum":["open","closed"],"description":"`open` for the month under way, which still grows."},"currency":{"type":"string","enum":["usd"]},"total_cents":{"type":"integer","description":"The sum of the lines."}},"required":["month","status","currency","total_cents"]},"Invoice":{"allOf":[{"$ref":"#/components/schemas/InvoiceSummary"},{"type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceLine"},"description":"Per index and item; none for zero use."}},"required":["lines"]}]},"InvoiceLine":{"type":"object","properties":{"index":{"type":"string"},"item":{"$ref":"#/components/schemas/InvoiceItem"},"quantity":{"type":"number","description":"Units used: GB-months of storage, GB written, TB scanned, texts, documents, GB-hours."},"unit_price":{"type":"number","description":"Dollars per unit."},"amount_cents":{"type":"integer","description":"The quantity times the unit price, in cents, rounded."}},"required":["index","item","quantity","unit_price","amount_cents"]},"InvoiceItem":{"type":"string","enum":["storage","writes","queries","embeddings","reranks","pinned"],"description":"What a line charges for. Storage is in GB-months: the size of `main` each day, over the days of the month. Writes are GB written. Queries are TB scanned: each query counts the size of the index it searched. Pinned is in GB-hours: the size of `main` for each hour of each replica; a pinned index's queries are not charged."},"Billing":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether this server bills at all."},"plan":{"$ref":"#/components/schemas/Plan"},"name":{"type":"string"},"status":{"type":["string","null"],"description":"The subscription's status in Stripe."},"period_start":{"type":["string","null"],"description":"An ISO 8601 time."},"period_end":{"type":["string","null"],"description":"An ISO 8601 time."},"next_plan":{"$ref":"#/components/schemas/PaidPlan"},"cancel_at_period_end":{"type":"boolean"},"past_due_since":{"type":["string","null"],"description":"An ISO 8601 time."},"minimum_cents":{"type":["integer","null"]},"usage_cents":{"type":"integer","description":"The usage of the period so far."},"estimate_cents":{"type":"integer","description":"The usage or the minimum, whichever is more."},"meters":{"type":"array","items":{"$ref":"#/components/schemas/MeterUsage"}},"stored":{"type":"object","properties":{"gb":{"type":"number"},"limit_gb":{"type":["number","null"]}},"required":["gb","limit_gb"]},"indexes":{"type":"object","properties":{"count":{"type":"integer"},"limit":{"type":["integer","null"]}},"required":["count","limit"]},"files":{"type":"object","properties":{"gb":{"type":"number"},"limit_gb":{"type":["number","null"]}},"required":["gb","limit_gb"],"description":"Bytes stored by the organization's filesystems."},"filesystems":{"type":"object","properties":{"count":{"type":"integer"},"limit":{"type":["integer","null"]}},"required":["count","limit"]},"features":{"type":"array","items":{"$ref":"#/components/schemas/PlanFeature"}},"plans":{"type":"array","items":{"$ref":"#/components/schemas/PlanOffer"}},"customer":{"type":"boolean","description":"Whether the portal can be opened."}},"required":["enabled","plan","name","status","period_start","period_end","next_plan","cancel_at_period_end","past_due_since","minimum_cents","usage_cents","estimate_cents","meters","stored","indexes","files","filesystems","features","plans","customer"]},"Plan":{"type":"string","enum":["free","launch","scale","enterprise","unlimited"],"description":"`unlimited` when the server does not bill, as when self-hosted."},"PaidPlan":{"type":["string","null"],"enum":["launch","scale",null],"description":"The plan the subscription moves to when the period ends."},"MeterUsage":{"type":"object","properties":{"meter":{"$ref":"#/components/schemas/Meter"},"name":{"type":"string"},"quantity":{"type":"number"},"unit":{"type":"string","example":"GB written"},"price":{"type":"string","example":"$1.50 per GB written"},"amount_cents":{"type":"integer","description":"What the quantity costs, before the minimum."},"limit":{"type":["number","null"],"description":"The plan's monthly limit, if it has one."}},"required":["meter","name","quantity","unit","price","amount_cents","limit"]},"Meter":{"type":"string","enum":["storage","writes","queries","embeddings","reranks","pinned","files_storage","files_egress"]},"PlanFeature":{"type":"string","enum":["pinning","sso","audit_log","ip_allowlist","customer_keys"]},"PlanOffer":{"type":"object","properties":{"plan":{"$ref":"#/components/schemas/Plan"},"name":{"type":"string"},"minimum_cents":{"type":["integer","null"]},"storage_gb":{"type":["number","null"],"description":"The storage the plan includes, or null for no limit."},"features":{"type":"array","items":{"$ref":"#/components/schemas/PlanFeature"}}},"required":["plan","name","minimum_cents","storage_gb","features"]},"CheckoutStart":{"anyOf":[{"$ref":"#/components/schemas/Redirect"},{"$ref":"#/components/schemas/CheckoutSession"}],"description":"A Stripe Checkout page to send the person to, or, with SKYWAKE_API_CHECKOUT=custom, a session the console confirms itself."},"Redirect":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"]},"CheckoutSession":{"type":"object","properties":{"client_secret":{"type":"string","description":"Opens the session with Stripe.js."},"publishable_key":{"type":"string","description":"The Stripe key Stripe.js loads with."}},"required":["client_secret","publishable_key"]},"NewCheckout":{"type":"object","properties":{"plan":{"$ref":"#/components/schemas/PaidPlan"},"return_url":{"type":"string","format":"uri"}},"required":["plan"],"additionalProperties":false},"NewPortal":{"type":"object","properties":{"return_url":{"type":"string","format":"uri"}},"additionalProperties":false},"PlanChange":{"type":"object","properties":{"plan":{"$ref":"#/components/schemas/PaidPlan"}},"required":["plan"],"additionalProperties":false},"PlanOverride":{"type":"object","properties":{"plan":{"type":"string","enum":["enterprise","default"]}},"required":["plan"],"additionalProperties":false},"SsoPolicy":{"type":"object","properties":{"required_domains":{"type":"array","items":{"type":"string","maxLength":253,"pattern":"^(?=.{1,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$","example":"example.com"},"maxItems":100,"description":"People with an email at these domains must sign in through the organization's single sign-on. Console tokens of theirs that did not come from it are refused."}},"required":["required_domains"]},"SsoDomainOrgs":{"type":"object","properties":{"orgs":{"type":"array","items":{"type":"string"},"description":"The organizations whose people at this domain must use single sign-on."}},"required":["orgs"]},"Whoami":{"type":"object","properties":{"organization":{"type":"string"},"environment":{"type":["string","null"],"description":"The environment requests work in: the key's own, or the `Skywake-Environment` header for a key or person that may use every environment. Null when neither says."},"role":{"$ref":"#/components/schemas/Role"},"only":{"type":"array","items":{"type":"string"}},"key":{"type":["string","null"],"description":"The key's id, when a key is used."},"user":{"type":["string","null"],"description":"The person, when the console calls."},"email":{"type":["string","null"]},"expires":{"type":["string","null"],"format":"date-time"}},"required":["organization","environment","role","only","key","user","email","expires"]},"Role":{"type":"string","enum":["read","write","admin"],"description":"What a caller may do. `read`: files and history. `write`: also fork, commit and merge. `admin`: also keys, namespaces, protected branches and the audit log."},"Key":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"role":{"$ref":"#/components/schemas/Role"},"environment":{"type":["string","null"],"description":"The environment the key works in. Null for a key that works in every one."},"only":{"type":"array","items":{"type":"string"},"description":"Which disks in its environment it reaches: names, prefixes ending in `*`, or `*` for all."},"namespaces":{"type":"string","description":"Deprecated: the same reach as one pattern of full names. Use `environment` and `only`."},"expires":{"type":["string","null"],"format":"date-time"},"last_used":{"type":["string","null"],"format":"date-time"},"created":{"type":"string","format":"date-time"},"created_by":{"type":["string","null"],"description":"Who made the key: `user:<id>` for a person in the console, `key:<id>` for another key. Null for keys made before this was kept."},"created_by_email":{"type":["string","null"],"description":"The email of the person who made it, when a person did."}},"required":["id","name","role","environment","only","namespaces","expires","last_used","created","created_by","created_by_email"]},"CreatedKey":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string","description":"The key. It is shown only this once."}},"required":["id","key"]},"NewKey":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"role":{"$ref":"#/components/schemas/Role"},"environment":{"type":["string","null"],"pattern":"^[A-Za-z0-9_-][A-Za-z0-9._-]{0,99}$","example":"prod","description":"The environment it works in. A key made by a key of one environment gets that one. Null makes a key for every environment, which only an organization admin may make."},"only":{"type":"array","items":{"type":"string","maxLength":200,"example":"docs-*"},"minItems":1,"maxItems":50,"description":"Which disks in its environment it reaches: names, prefixes ending in `*`, or `*` for all, the default."},"namespaces":{"type":"string","maxLength":200,"description":"Deprecated: one pattern of full names, such as `prod/*`. Use `environment` and `only`."},"expires_in_days":{"type":"integer","minimum":1,"maximum":3650,"description":"Whole days, 1 to 3650. Without it, the key does not expire. A key never outlives the key that makes it: it expires then at the latest."}},"required":["name","role"],"additionalProperties":false},"RevokedKeys":{"type":"object","properties":{"revoked":{"type":"integer"}},"required":["revoked"]},"Login":{"type":"object","properties":{"code":{"type":"string"},"device":{"type":"string"},"expires":{"type":"string","format":"date-time"},"role":{"allOf":[{"$ref":"#/components/schemas/Role"},{"description":"The most the person approving may give the key."}]},"every_environment":{"type":"boolean","description":"Whether the person may give a key for every environment."}},"required":["code","device","expires","role","every_environment"]},"ApprovedLogin":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"role":{"$ref":"#/components/schemas/Role"},"environment":{"type":["string","null"]}},"required":["id","name","role","environment"]},"Approval":{"type":"object","properties":{"environment":{"type":["string","null"],"pattern":"^[A-Za-z0-9_-][A-Za-z0-9._-]{0,99}$","example":"prod","description":"The environment the key works in. Null for every one: organization admins only."},"role":{"$ref":"#/components/schemas/Role"}},"required":["environment","role"],"additionalProperties":false},"IssuedOAuthCode":{"type":"object","properties":{"code":{"type":"string"},"expires":{"type":"string","format":"date-time"}},"required":["code","expires"]},"NewOAuthCode":{"type":"object","properties":{"client_id":{"type":"string","enum":["skywake-desktop"]},"redirect_uri":{"type":"string","pattern":"^http:\\/\\/127\\.0\\.0\\.1:(\\d{2,5})\\/callback$"},"code_challenge":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$","description":"BASE64URL(SHA-256(code_verifier)), without padding."},"code_challenge_method":{"type":"string","enum":["S256"]},"device":{"type":"string","minLength":1,"maxLength":64},"environment":{"type":["string","null"],"pattern":"^[A-Za-z0-9_-][A-Za-z0-9._-]{0,99}$","example":"prod","description":"The environment the app works in. Null for every one: organization admins only."},"role":{"$ref":"#/components/schemas/Role"}},"required":["client_id","redirect_uri","code_challenge","code_challenge_method","device","environment","role"],"additionalProperties":false},"OAuthTokens":{"type":"object","properties":{"access_token":{"type":"string","description":"An API key that works for `expires_in` seconds."},"token_type":{"type":"string","enum":["Bearer"]},"expires_in":{"type":"integer"},"refresh_token":{"type":"string","description":"Makes the next pair, once. Using it twice ends the sign-in."},"organization":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"organizations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"description":"Every organization of the person, to switch to by signing in again."},"environment":{"type":["string","null"]},"role":{"$ref":"#/components/schemas/Role"},"email":{"type":["string","null"]}},"required":["access_token","token_type","expires_in","refresh_token","organization","organizations","environment","role","email"]},"OAuthTokenRequest":{"oneOf":[{"type":"object","properties":{"grant_type":{"type":"string","enum":["authorization_code"]},"client_id":{"type":"string","enum":["skywake-desktop"]},"code":{"type":"string","minLength":1,"maxLength":200},"code_verifier":{"type":"string","pattern":"^[A-Za-z0-9._~-]{43,128}$"},"redirect_uri":{"type":"string","pattern":"^http:\\/\\/127\\.0\\.0\\.1:(\\d{2,5})\\/callback$"}},"required":["grant_type","client_id","code","code_verifier","redirect_uri"]},{"type":"object","properties":{"grant_type":{"type":"string","enum":["refresh_token"]},"client_id":{"type":"string","enum":["skywake-desktop"]},"refresh_token":{"type":"string","minLength":1,"maxLength":200}},"required":["grant_type","client_id","refresh_token"]}]},"OAuthRevocation":{"type":"object","properties":{"client_id":{"type":"string","enum":["skywake-desktop"]},"token":{"type":"string","minLength":1,"maxLength":200}},"required":["client_id","token"],"additionalProperties":false},"AuditLog":{"type":"object","properties":{"events":{"type":"array","items":{"$ref":"#/components/schemas/AuditEvent"}},"next":{"type":["string","null"]}},"required":["events","next"]},"AuditEvent":{"type":"object","properties":{"id":{"type":"string","description":"Pass the last one as `after` for the next page."},"at":{"type":"string","format":"date-time"},"org":{"type":["string","null"],"description":"The caller's organization; null before sign-in."},"owner":{"type":["string","null"],"description":"The organization that owns what was used, when it is not the caller's."},"actor":{"type":["string","null"],"description":"`key:ID` for an API key, the person's id for the console, or `admin` for the operator."},"actorKind":{"type":"string","enum":["key","person","operator","anonymous"]},"action":{"type":"string","description":"The operation, as in this document, such as `createBranch`."},"outcome":{"$ref":"#/components/schemas/AuditOutcome"},"status":{"type":"integer"},"method":{"type":"string"},"route":{"type":"string"},"resource":{"type":"object","additionalProperties":{"type":"string"},"description":"The route's parameters: the namespace, branch, index, path and so on."},"details":{"type":["object","null"],"additionalProperties":{}},"requestId":{"type":"string"},"clientRequestId":{"type":["string","null"]},"ip":{"type":["string","null"]},"userAgent":{"type":["string","null"]},"durationMs":{"type":"number"},"bytesIn":{"type":["integer","null"]},"bytesOut":{"type":["integer","null"]},"chain":{"type":"string","description":"The API server that recorded it."},"seq":{"type":"integer"},"prev":{"type":["string","null"]},"hash":{"type":"string","description":"sha256 of the event and `prev`, the hash of the event before it on `chain`: a changed or missing event breaks every hash after it."}},"required":["id","at","org","owner","actor","actorKind","action","outcome","status","method","route","resource","details","requestId","clientRequestId","ip","userAgent","durationMs","bytesIn","bytesOut","chain","seq","prev","hash"]},"AuditOutcome":{"type":"string","enum":["ok","denied","rejected","error"],"description":"`ok`; `denied` for lack of access (401, 403); `rejected` as a bad request (other 4xx); `error` on our side (5xx)."},"ConsoleEvent":{"type":"object","properties":{"at":{"type":"string","format":"date-time"},"org":{"type":["string","null"],"maxLength":200},"actor":{"type":["string","null"],"maxLength":200},"action":{"type":"string","minLength":1,"maxLength":200},"outcome":{"$ref":"#/components/schemas/AuditOutcome"},"status":{"type":"integer"},"method":{"type":"string","maxLength":10},"route":{"type":"string","maxLength":500},"requestId":{"type":"string","maxLength":200},"ip":{"type":["string","null"],"maxLength":100},"userAgent":{"type":["string","null"],"maxLength":500},"details":{"type":["object","null"],"additionalProperties":{}}},"required":["at","org","actor","action","outcome","status","method","route","requestId","ip","userAgent","details"]},"Region":{"type":"object","properties":{"name":{"type":"string","example":"eu-central-1"},"default":{"type":"boolean","description":"Used when no region is asked for."}},"required":["name","default"]},"Environment":{"type":"object","properties":{"name":{"type":"string"},"created":{"type":"string","format":"date-time"},"store":{"$ref":"#/components/schemas/EnvironmentStore"}},"required":["name","created","store"]},"EnvironmentStore":{"type":["object","null"],"properties":{"store":{"type":"string"},"access":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["aws_role"]},"roleArn":{"type":"string"},"externalId":{"type":"string"},"region":{"type":"string"}},"required":["type","roleArn","externalId","region"]},{"type":"object","properties":{"type":{"type":"string","enum":["keys"]},"accessKeyId":{"type":"string"},"endpoint":{"type":["string","null"]},"region":{"type":"string"}},"required":["type","accessKeyId","endpoint","region"]}]},"verified":{"type":["string","null"],"format":"date-time"}},"required":["store","access","verified"],"description":"Your bucket, when the environment keeps its data there. Null: the server's."},"NewEnvironment":{"type":"object","properties":{"name":{"type":"string","pattern":"^[A-Za-z0-9_-][A-Za-z0-9._-]{0,99}$"}},"required":["name"],"additionalProperties":false},"StoreTrust":{"type":"object","properties":{"principal":{"type":["string","null"],"description":"The AWS principal to trust in the role's trust policy."},"externalId":{"type":"string","description":"The external ID the trust policy must require."}},"required":["principal","externalId"]},"NewEnvironmentStore":{"type":"object","properties":{"store":{"type":"string","pattern":"^s3:\\/\\/[a-z0-9][a-z0-9.-]{1,61}[a-z0-9](\\/[^?]*)?$","example":"s3://acme-data/skywake"},"access":{"$ref":"#/components/schemas/StoreAccess"}},"required":["store","access"],"additionalProperties":false},"StoreAccess":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["aws_role"]},"roleArn":{"type":"string","pattern":"^arn:aws[\\w-]*:iam::\\d{12}:role\\/.+$"},"region":{"type":"string","minLength":1,"example":"us-east-1"}},"required":["type","roleArn","region"]},{"type":"object","properties":{"type":{"type":"string","enum":["keys"]},"accessKeyId":{"type":"string","minLength":1},"secretAccessKey":{"type":"string","minLength":1,"description":"Kept sealed; never shown again."},"endpoint":{"type":"string","format":"uri","description":"An S3 compatible endpoint, such as R2's or MinIO's. AWS when not given."},"region":{"type":"string","minLength":1,"default":"auto"}},"required":["type","accessKeyId","secretAccessKey"]}]},"Namespace":{"type":"object","properties":{"name":{"type":"string"},"region":{"type":"string"},"visibility":{"$ref":"#/components/schemas/Visibility"},"created":{"type":"string","format":"date-time"}},"required":["name","region","visibility","created"]},"Visibility":{"type":"string","enum":["private","public"],"description":"`private`: only the organization's keys and members. `public`: anyone may also read it, without a key, by naming it `<org>:<namespace>`."},"NewNamespace":{"type":"object","properties":{"name":{"type":"string","maxLength":200,"pattern":"^[A-Za-z0-9_-][A-Za-z0-9._-]*(\\/[A-Za-z0-9_-][A-Za-z0-9._-]*)*$","example":"prod/app"},"region":{"type":"string","description":"Where its data lives. It can't change later. The default region if not given."},"visibility":{"allOf":[{"$ref":"#/components/schemas/Visibility"},{"default":"private"}]}},"required":["name"],"additionalProperties":false},"NamespaceUpdate":{"type":"object","properties":{"visibility":{"$ref":"#/components/schemas/Visibility"}},"required":["visibility"],"additionalProperties":false},"IndexLink":{"type":"object","properties":{"namespace":{"type":"string"},"index":{"type":"string"},"include":{"type":"array","items":{"type":"string"}},"exclude":{"type":"array","items":{"type":"string"}},"maxBytes":{"type":"integer"},"embed":{"$ref":"#/components/schemas/LinkEmbed"},"made":{"type":"boolean","description":"Whether the link made its index."},"created":{"type":"string","format":"date-time"},"branches":{"type":"array","items":{"$ref":"#/components/schemas/LinkedBranch"}}},"required":["namespace","index","include","exclude","maxBytes","embed","made","created","branches"]},"LinkEmbed":{"type":["object","null"],"properties":{"model":{"type":"string"},"dims":{"type":"integer"},"images":{"type":"boolean","description":"Whether image files are embedded too."}},"required":["model","dims","images"],"description":"How files are embedded; null for words only."},"LinkedBranch":{"type":"object","properties":{"branch":{"type":"string"},"synced":{"type":["string","null"],"description":"The commit the index matches."},"behind":{"type":"boolean","description":"Whether newer files wait to be indexed."},"syncedAt":{"type":["string","null"],"format":"date-time"},"error":{"type":["string","null"],"description":"Why the last try failed, if it did."},"files":{"type":["integer","null"],"description":"Files indexed, once synced."},"chunks":{"type":["integer","null"],"description":"Rows those files became: one per chunk embedded."},"skipped":{"type":"array","items":{"$ref":"#/components/schemas/SkippedFile"},"description":"Files left out of the last syncs and why; the first 50."}},"required":["branch","synced","behind","syncedAt","error","files","chunks","skipped"]},"SkippedFile":{"type":"object","properties":{"path":{"type":"string"},"reason":{"type":"string","example":"larger than 1024 KiB"}},"required":["path","reason"]},"NewIndexLink":{"type":"object","properties":{"index":{"type":"string","maxLength":200,"pattern":"^[A-Za-z0-9_-][A-Za-z0-9._-]*(\\/[A-Za-z0-9_-][A-Za-z0-9._-]*)*$","example":"prod/app-files","description":"The index to keep up with the files. Made when missing, with `path` and `text` attributes; an existing one must have both."},"include":{"type":"array","items":{"type":"string","minLength":1,"maxLength":256},"maxItems":64,"default":[],"description":"Globs of paths to index, such as `src/**`. All when empty."},"exclude":{"type":"array","items":{"type":"string","minLength":1,"maxLength":256},"maxItems":64,"default":[],"description":"Globs of paths never to index, such as `node_modules/**`."},"maxBytes":{"type":"integer","minimum":1,"maximum":67108864,"default":16777216,"description":"Larger files are left out, at most 64 MiB. 16 MiB when not given. All of a file's text is searchable, and documents are measured by the text taken from them."},"embed":{"anyOf":[{"type":"object","properties":{"model":{"type":"string","minLength":1},"dims":{"type":"integer","minimum":1,"maximum":4096}},"additionalProperties":false},{"type":"boolean","enum":[false]}],"description":"Search by meaning: each file is split into overlapping chunks and every chunk is embedded; images are embedded too when the model takes them. On by default with the server's model; `false` keeps the index to words. Turning it on for an index the link made rebuilds it. Billed as embeddings."}},"required":["index"],"additionalProperties":false},"LinkDefaults":{"type":"object","properties":{"embed":{"type":["object","null"],"properties":{"model":{"type":"string"},"images":{"type":"boolean"}},"required":["model","images"],"description":"The model a new link embeds with; null when none is set up."}},"required":["embed"]},"BranchIndex":{"allOf":[{"$ref":"#/components/schemas/LinkedBranch"},{"type":"object","properties":{"head":{"type":"string","description":"The branch's head now."},"version":{"type":["string","null"],"description":"The index version that matches `synced`."}},"required":["head","version"]}]},"StoreCredentials":{"type":"object","properties":{"store":{"type":"string","description":"The namespace's folder in the bucket, as `s3://<bucket>/<prefix>`.","example":"s3://skywake/org_1/ns_2"},"region":{"type":"string"},"endpoint":{"type":["string","null"],"description":"The S3 endpoint, for S3-compatible stores. Null for AWS."},"accessKeyId":{"type":"string"},"secretAccessKey":{"type":"string"},"sessionToken":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","description":"Ask again before then. At least 15 minutes ahead."},"access":{"$ref":"#/components/schemas/Access"},"heads":{"type":["object","null"],"properties":{"nodes":{"type":"array","items":{"type":"string"},"description":"The cache servers that own branch heads."},"folder":{"type":"string","description":"The namespace's folder, as the cache servers name it."},"pass":{"type":"string","description":"Sent as the bearer token. Good until `expiresAt`, for this folder and access only."}},"required":["nodes","folder","pass"],"description":"When the cache servers own this namespace's branch heads: change heads through them. These credentials then cannot write `refs/`."}},"required":["store","region","endpoint","accessKeyId","secretAccessKey","sessionToken","expiresAt","access","heads"]},"Access":{"type":"string","enum":["read","write"]},"CredentialsRequest":{"type":"object","properties":{"access":{"allOf":[{"$ref":"#/components/schemas/Access"},{"description":"`write` needs a key with the `write` role."}]}},"required":["access"],"additionalProperties":false},"Branch":{"type":"object","properties":{"name":{"type":"string"},"forked_from":{"type":["string","null"]},"protected":{"type":"boolean","description":"A protected branch changes only by merge."},"created":{"type":"string","format":"date-time"}},"required":["name","forked_from","protected","created"]},"Head":{"type":"object","properties":{"head":{"type":"string"}},"required":["head"]},"NewBranch":{"type":"object","properties":{"name":{"type":"string","maxLength":200,"pattern":"^[A-Za-z0-9_-][A-Za-z0-9._-]*(\\/[A-Za-z0-9_-][A-Za-z0-9._-]*)*$","example":"agents/fix-1"},"from":{"type":"string","maxLength":200,"pattern":"^[A-Za-z0-9_-][A-Za-z0-9._-]*(\\/[A-Za-z0-9_-][A-Za-z0-9._-]*)*$","description":"The branch to fork. Without it, the new branch is empty."},"at":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"Fork this older commit of `from` instead of its head."},"withIndex":{"type":"boolean","description":"Also fork the linked index, from its version that matches the fork's commit, and keep it up with this branch. Needs `from` and a namespace with a linked index."}},"required":["name"],"additionalProperties":false},"BranchInfo":{"allOf":[{"$ref":"#/components/schemas/Branch"},{"type":"object","properties":{"head":{"type":"string","description":"The commit the branch points to."},"base":{"type":["string","null"],"description":"The newest commit this branch shares with `forked_from`: where it forked, or where the two last merged. What the branch changed since is `diff?from=<forked_from>&against=base`. Null for an empty branch, or once `forked_from` is deleted."}},"required":["head","base"]}]},"BranchUpdate":{"type":"object","properties":{"protected":{"type":"boolean","description":"A protected branch changes only by merge, and cannot be deleted."}},"required":["protected"],"additionalProperties":false},"Listing":{"allOf":[{"$ref":"#/components/schemas/FileInfo"},{"type":"object","properties":{"entries":{"type":"array","items":{"$ref":"#/components/schemas/FileInfo"},"description":"What a folder holds, in name order. Empty for anything else."}},"required":["entries"]}]},"FileInfo":{"type":"object","properties":{"name":{"type":"string"},"kind":{"type":"string","enum":["file","folder","symlink"]},"size":{"type":"integer","description":"Bytes, for a file."},"executable":{"type":"boolean"},"target":{"type":"string","description":"Where a symlink points."},"modified":{"type":"integer","description":"When a file last changed, in milliseconds since 1970. 0 otherwise."}},"required":["name","kind","size","executable","modified"]},"Match":{"type":"object","properties":{"path":{"type":"string"},"line":{"type":"integer","description":"Starts at 1."},"text":{"type":"string"}},"required":["path","line","text"]},"FoundPath":{"type":"object","properties":{"path":{"type":"string","description":"From the root of the branch."},"kind":{"type":"string","enum":["file","folder","symlink"]},"size":{"type":"integer","description":"In bytes, for a file. 0 otherwise."}},"required":["path","kind","size"]},"Committed":{"type":"object","properties":{"head":{"type":"string","description":"The branch's head after the call."},"changed":{"type":"boolean","description":"False when every change matched what was already there. Then no commit is made and `head` is the current one."}},"required":["head","changed"]},"NewCommit":{"type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":10000},"changes":{"type":"array","items":{"$ref":"#/components/schemas/FileChange"},"maxItems":10000}},"required":["message","changes"],"additionalProperties":false},"FileChange":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":4096},"text":{"type":"string","description":"The new content, as text."},"base64":{"type":"string","description":"The new content, as base64."},"parts":{"type":"array","items":{"type":"string","pattern":"^[0-9a-f]{64}$"},"minItems":1,"maxItems":10000,"description":"The new content: uploaded parts, in order."},"from":{"type":"object","properties":{"path":{"type":"string","maxLength":4096},"at":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"Copy from this commit. By default, from the branch before this commit."}},"required":["path"],"description":"Copies the file, folder or symlink at `path`, without copying data. With a delete of `path` in the same commit, this is a move."},"folder":{"type":"boolean","default":false,"description":"Makes an empty folder, unless a folder is already there."},"delete":{"type":"boolean","default":false,"description":"Removes the file or folder."},"executable":{"type":"boolean","default":false}},"required":["path"],"description":"One change. Give exactly one of `text`, `base64`, `parts`, `from`, `folder` or `delete`."},"UploadedPart":{"type":"object","properties":{"part":{"type":"string","description":"The BLAKE3 hash of the bytes, in hex."},"size":{"type":"integer","description":"Bytes."}},"required":["part","size"]},"CommitInfo":{"type":"object","properties":{"hash":{"type":"string"},"message":{"type":"string"},"time":{"type":"integer","description":"Seconds since the Unix epoch."},"merged":{"type":["string","null"],"description":"For a merge: the commit that was merged in."}},"required":["hash","message","time","merged"]},"FeedItem":{"allOf":[{"$ref":"#/components/schemas/CommitInfo"},{"type":"object","properties":{"changes":{"type":"array","items":{"$ref":"#/components/schemas/Changed"}}},"required":["changes"]}]},"Changed":{"type":"object","properties":{"kind":{"type":"string","enum":["added","removed","modified"]},"path":{"type":"string","description":"A new or removed folder is one change, not one per file."}},"required":["kind","path"]},"FileVersion":{"allOf":[{"$ref":"#/components/schemas/CommitInfo"},{"type":"object","properties":{"size":{"type":["integer","null"],"description":"The file's size after this commit. Null if the commit deleted it."}},"required":["size"]}]},"MergeResult":{"type":"object","properties":{"head":{"type":["string","null"],"description":"The new head of `into`, when the merge landed."},"conflicts":{"type":"array","items":{"type":"string"},"description":"Paths changed on both sides in ways that do not combine."}},"required":["head","conflicts"]},"MergeConflict":{"allOf":[{"$ref":"#/components/schemas/MergeResult"},{"type":"object","properties":{"error":{"type":"string","description":"What went wrong, for people to read."},"code":{"$ref":"#/components/schemas/ErrorCode"},"request_id":{"type":["string","null"],"description":"The request's id, also in the `X-Request-Id` header. Quote it in bug reports."}},"required":["error","code","request_id"]}]},"NewMerge":{"type":"object","properties":{"from":{"type":"string","maxLength":200,"pattern":"^[A-Za-z0-9_-][A-Za-z0-9._-]*(\\/[A-Za-z0-9_-][A-Za-z0-9._-]*)*$","description":"The branch to merge in."},"into":{"type":"string","maxLength":200,"pattern":"^[A-Za-z0-9_-][A-Za-z0-9._-]*(\\/[A-Za-z0-9_-][A-Za-z0-9._-]*)*$","description":"The branch that receives the merge. It may be protected."},"message":{"type":"string","minLength":1,"maxLength":10000},"dry_run":{"type":"boolean","default":false,"description":"Only report the conflicts a merge would have now, less those `resolve` covers."},"resolve":{"type":"array","items":{"$ref":"#/components/schemas/Resolution"},"maxItems":10000,"description":"How to settle conflicts, by path. A path's resolution also settles the conflicts inside it. With every conflict covered, the merge lands as one merge commit with both parents."}},"required":["from","into"],"additionalProperties":false},"Resolution":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":4096},"take":{"type":"string","enum":["ours","theirs"],"description":"`ours`: the path as it is on `into`. `theirs`: as it is on `from`."},"text":{"type":"string","description":"New content, as text."},"base64":{"type":"string","description":"New content, as base64."},"parts":{"type":"array","items":{"type":"string","pattern":"^[0-9a-f]{64}$"},"minItems":1,"maxItems":10000,"description":"New content: uploaded parts, in order."},"delete":{"type":"boolean","default":false,"description":"Leaves the path out."},"executable":{"type":"boolean","default":false}},"required":["path"],"description":"What one conflicting path becomes. Give exactly one of `take`, `text`, `base64`, `parts` or `delete`."},"RevertConflict":{"type":"object","properties":{"conflicts":{"type":"array","items":{"type":"string"},"description":"Paths the commit changed that later commits changed again."},"error":{"type":"string","description":"What went wrong, for people to read."},"code":{"$ref":"#/components/schemas/ErrorCode"},"request_id":{"type":["string","null"],"description":"The request's id, also in the `X-Request-Id` header. Quote it in bug reports."}},"required":["conflicts","error","code","request_id"]},"NewRevert":{"type":"object","properties":{"commit":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"The commit to undo."},"message":{"type":"string","minLength":1,"maxLength":10000}},"required":["commit"],"additionalProperties":false},"NewReset":{"type":"object","properties":{"to":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"The commit whose files the branch should have."},"message":{"type":"string","minLength":1,"maxLength":10000}},"required":["to"],"additionalProperties":false},"Index":{"type":"object","properties":{"name":{"type":"string"},"region":{"type":"string"},"schema":{"$ref":"#/components/schemas/IndexSchema"},"shards":{"type":"integer"},"encryption":{"$ref":"#/components/schemas/IndexEncryption"},"read_only":{"type":"boolean","description":"Writes are refused while it is true."},"retention_days":{"type":["integer","null"],"description":"How long a branch's older versions stay to go back to, in days after they were replaced. Null keeps every one."},"pinned":{"$ref":"#/components/schemas/IndexPinned"},"created":{"type":"string","format":"date-time"}},"required":["name","region","schema","shards","encryption","read_only","retention_days","pinned","created"]},"IndexSchema":{"type":"object","properties":{"vectors":{"type":"array","items":{"$ref":"#/components/schemas/VectorColumn"},"maxItems":8,"default":[]},"attributes":{"type":"array","items":{"$ref":"#/components/schemas/AttributeColumn"},"maxItems":64,"default":[]},"id":{"type":"string","enum":["uuid"],"description":"`uuid` makes every id a UUID, stored in 16 bytes: written as text with or without dashes in any case, and returned lowercase with dashes. Unset, an id is a string or a whole number. It can't change."}},"description":"The columns of an index. Attributes can be added later; vector columns can't change."},"VectorColumn":{"type":"object","properties":{"name":{"type":"string","maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*(?:\\.[A-Za-z_][A-Za-z0-9_]*)*$","example":"embedding"},"dims":{"type":"integer","minimum":1,"maximum":4096,"example":768},"metric":{"$ref":"#/components/schemas/Metric"},"element":{"$ref":"#/components/schemas/VectorElement"},"embed":{"type":"object","properties":{"model":{"type":"string","minLength":1,"maxLength":256,"example":"text-embedding-3-small"},"from":{"type":"string","maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*(?:\\.[A-Za-z_][A-Za-z0-9_]*)*$","description":"A string or text attribute. A document that gives no vector for this column gets its vector by embedding that attribute's text.","example":"content"}},"required":["model"],"description":"Lets documents and queries give text for this vector: the server embeds it with `model` on its embedding provider. The model must give `dims` numbers."}},"required":["name","dims"]},"Metric":{"type":"string","enum":["cosine","euclidean","dot"],"default":"cosine","description":"How vectors are compared. Each is a distance, so smaller is closer: `1 - cos` for `cosine`, the squared distance for `euclidean`, the negative dot product for `dot`."},"VectorElement":{"type":"string","enum":["f32","f16","i8"],"description":"`f32` by default."},"AttributeColumn":{"type":"object","properties":{"name":{"type":"string","maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*(?:\\.[A-Za-z_][A-Za-z0-9_]*)*$","example":"tag"},"type":{"$ref":"#/components/schemas/AttributeType"},"k1":{"type":"number","minimum":0,"maximum":10,"description":"BM25's term saturation for a `text` attribute. 1.2 by default."},"b":{"type":"number","minimum":0,"maximum":1,"description":"BM25's length normalization for a `text` attribute. 0.75 by default."},"language":{"$ref":"#/components/schemas/TextLanguage"},"stopwords":{"type":"boolean","description":"Whether a `text` attribute drops its language's stopwords, such as `the` and `of`. False by default, so phrases like `to be or not to be` work."},"stemming":{"type":"boolean","description":"Whether a `text` attribute matches words by their stem, so `running` finds `run`. True by default."},"filterable":{"type":"boolean","description":"Whether a `text` attribute also filters, orders and groups by its whole value, like a string. False by default."},"case_sensitive":{"type":"boolean","description":"Whether a `text` attribute tells `Apple` from `apple`. False by default."},"ascii_folding":{"type":"boolean","description":"Whether `café` in a `text` attribute matches `cafe`. False by default."},"max_token_length":{"type":"integer","minimum":1,"maximum":1024,"description":"Longer words in a `text` attribute are left out. 39 by default."},"pre_tokenized":{"type":"boolean","description":"Whether a `text` attribute is a list of strings, each one word as it is, not split or changed."},"filter_index":{"type":"boolean","description":"Also keeps the documents sorted by this attribute, so a vector query whose filter passes few documents reads just those. For one value, not a list, `sparse` or `vectors`. It can be turned on later and is built by the next build."}},"required":["name","type"]},"AttributeType":{"type":"string","enum":["string","number","int","bool","uuid","datetime","strings","ints","numbers","sparse","vectors","text"],"description":"`int` is a whole number. `uuid` and `datetime` are written and read as strings; a `datetime` is RFC 3339 (or a date, or milliseconds since 1970) and comes back in UTC. `strings`, `ints` and `numbers` are lists; a filter holds if it holds for any item. `text` is a string searched by BM25: split into words, lowercased and stemmed in its `language`. `sparse` is `{indices, values}`, as SPLADE writes, and `vectors` a list of vectors of one length, as ColBERT writes; both are scored by `rank`, never filtered or ordered by."},"TextLanguage":{"type":"string","enum":["english","arabic","danish","dutch","finnish","french","german","greek","hungarian","italian","norwegian","portuguese","romanian","russian","spanish","swedish","tamil","turkish","none"],"description":"The stemming language of a `text` attribute. `english` by default."},"IndexEncryption":{"type":["object","null"],"properties":{"kms_key_id":{"type":"string","minLength":1,"maxLength":2048,"description":"A key id or ARN in your cloud's key service. Every object of the index is encrypted with it; revoking the key there makes the data unreadable."}},"required":["kms_key_id"]},"IndexPinned":{"type":["object","null"],"properties":{"replicas":{"type":"integer","minimum":1,"maximum":8,"description":"Servers that keep the index open and on their disks."}},"required":["replicas"],"description":"Reserved servers for the index, billed per GB-hour for each replica instead of per query. Queries go to the least busy replica. A copy is not pinned."},"NewIndex":{"type":"object","properties":{"name":{"type":"string","maxLength":200,"pattern":"^[A-Za-z0-9_-][A-Za-z0-9._-]*(\\/[A-Za-z0-9_-][A-Za-z0-9._-]*)*$","example":"prod/products"},"region":{"type":"string","description":"Where its data lives. It can't change later. The default region if not given."},"schema":{"$ref":"#/components/schemas/IndexSchema"},"shards":{"type":"integer","minimum":1,"maximum":256,"default":1,"description":"The parts documents are split over by id, each written and searched in parallel. More suits more data and writes; it can't change later."},"encryption":{"$ref":"#/components/schemas/IndexEncryption"},"pinned":{"$ref":"#/components/schemas/IndexPinned"}},"required":["name","schema"],"additionalProperties":false},"IndexInfo":{"allOf":[{"$ref":"#/components/schemas/Index"},{"type":"object","properties":{"stats":{"$ref":"#/components/schemas/IndexStats"},"pinning":{"$ref":"#/components/schemas/IndexPinning"}},"required":["stats","pinning"]}]},"IndexStats":{"type":["object","null"],"properties":{"rows":{"type":"integer","description":"Live documents."},"deleted_rows":{"type":"integer"},"segments":{"type":"integer","description":"Write batches stored."},"indexed_rows":{"type":"integer","description":"Rows inside the clusters."},"unindexed_rows":{"type":"integer","description":"Rows written since the last build, scanned exactly."},"clusters":{"type":"integer"},"bytes":{"type":"integer"}},"required":["rows","deleted_rows","segments","indexed_rows","unindexed_rows","clusters","bytes"],"description":"Of the `main` branch. Null while the server cannot count them."},"IndexPinning":{"type":["object","null"],"properties":{"replicas":{"type":"array","items":{"$ref":"#/components/schemas/PinnedReplica"},"description":"The replicas placed; fewer than asked while fewer servers run."}},"required":["replicas"],"description":"Where it is pinned; null if it is not."},"PinnedReplica":{"type":"object","properties":{"server":{"type":"string","description":"The API server holding the replica."},"warm":{"type":"boolean","description":"Whether every object of the current version is on the server's disk."},"in_flight":{"type":"integer","description":"Queries it is answering now."}},"required":["server","warm","in_flight"]},"UpdateIndex":{"type":"object","properties":{"read_only":{"type":"boolean"},"pinned":{"type":["object","null"],"properties":{"replicas":{"type":"integer","minimum":1,"maximum":8,"description":"Servers that keep the index open and on their disks."}},"required":["replicas"],"description":"Null unpins the index."},"retention_days":{"type":["integer","null"],"minimum":0,"maximum":36500,"description":"Days a version stays after it was replaced; `collect` deletes older ones. Null keeps every version."},"attributes":{"type":"array","items":{"$ref":"#/components/schemas/AttributeColumn"},"maxItems":64,"description":"Attributes to add. One the index has must keep its type, but can turn on `filter_index`. Documents written before lack the new ones."},"drop_attributes":{"type":"array","items":{"type":"string","maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*(?:\\.[A-Za-z_][A-Za-z0-9_]*)*$"},"maxItems":64,"description":"Attributes to take out, with their values. One may come back later only as it was. Refused while the index has more than one branch, as they share its data."}},"additionalProperties":false},"CopyIndex":{"type":"object","properties":{"name":{"type":"string","maxLength":200,"pattern":"^[A-Za-z0-9_-][A-Za-z0-9._-]*(\\/[A-Za-z0-9_-][A-Za-z0-9._-]*)*$","example":"prod/products-copy"},"branch":{"type":"string","maxLength":200,"pattern":"^[A-Za-z0-9_-][A-Za-z0-9._-]*(\\/[A-Za-z0-9_-][A-Za-z0-9._-]*)*$","default":"main","description":"The branch to copy."},"region":{"type":"string","description":"Where the copy's data lives. The source index's region if not given."},"encryption":{"allOf":[{"$ref":"#/components/schemas/IndexEncryption"},{"description":"The new index's key; none by default."}]},"target_org":{"type":"string","description":"Another organization to make the new index in. Needs a console token of someone with write access in both; an API key belongs to one organization."}},"required":["name"],"additionalProperties":false},"IndexBranch":{"type":"object","properties":{"name":{"type":"string"},"forked_from":{"type":["string","null"]},"created":{"type":"string","format":"date-time"}},"required":["name","forked_from","created"]},"NewIndexBranch":{"type":"object","properties":{"name":{"type":"string","maxLength":200,"pattern":"^[A-Za-z0-9_-][A-Za-z0-9._-]*(\\/[A-Za-z0-9_-][A-Za-z0-9._-]*)*$","example":"agents/try-1"},"from":{"type":"string","maxLength":200,"pattern":"^[A-Za-z0-9_-][A-Za-z0-9._-]*(\\/[A-Za-z0-9_-][A-Za-z0-9._-]*)*$","default":"main","description":"The branch to fork."},"at":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"Fork this older version of `from` instead of its head."}},"required":["name"],"additionalProperties":false},"IndexVersion":{"type":"object","properties":{"version":{"type":"string"},"time":{"type":"string","format":"date-time","description":"When the branch came to be like this."},"rows":{"type":"integer","description":"Documents a query found then."}},"required":["version","time","rows"],"description":"A branch at one moment of its history."},"RestoreIndexBranch":{"type":"object","properties":{"version":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"The version to go back to."}},"required":["version"],"additionalProperties":false},"IndexBranchInfo":{"allOf":[{"$ref":"#/components/schemas/IndexBranch"},{"type":"object","properties":{"stats":{"$ref":"#/components/schemas/IndexStats"}},"required":["stats"]}]},"Merged":{"type":"object","properties":{"rows":{"type":"integer","description":"Documents and deletes added."}},"required":["rows"]},"MergeIndexBranch":{"type":"object","properties":{"from":{"type":"string","maxLength":200,"pattern":"^[A-Za-z0-9_-][A-Za-z0-9._-]*(\\/[A-Za-z0-9_-][A-Za-z0-9._-]*)*$","description":"The branch whose writes are added."}},"required":["from"],"additionalProperties":false},"Written":{"type":"object","properties":{"count":{"type":"integer","description":"Documents written or deleted."},"upserted_ids":{"type":"array","items":{"$ref":"#/components/schemas/DocId"},"description":"With `returnAffectedIds`: the ids written, by an upsert."},"deleted_ids":{"type":"array","items":{"$ref":"#/components/schemas/DocId"},"description":"With `returnAffectedIds`: the ids deleted, by a delete."},"billing":{"allOf":[{"$ref":"#/components/schemas/Billing"},{"description":"What this request counted toward the bill."}]}},"required":["count","billing"]},"DocId":{"anyOf":[{"type":"string","minLength":1,"maxLength":256},{"type":"integer","minimum":0,"maximum":9007199254740991}],"description":"A string, or a whole number from 0; a UUID when the schema's `id` is `uuid`."},"Upsert":{"type":"object","properties":{"documents":{"type":"array","items":{"$ref":"#/components/schemas/Document"},"minItems":1,"maxItems":1000},"returnAffectedIds":{"type":"boolean","description":"Also return the ids the write changed, one for each count. Off by default."}},"required":["documents"],"additionalProperties":false},"Document":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/DocId"},"vectors":{"type":"object","additionalProperties":{"anyOf":[{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":4096},{"type":"string","minLength":1,"maxLength":32768},{"$ref":"#/components/schemas/Image"}]},"default":{},"description":"A vector for every vector column of the schema. A column with `embed` also takes text, or an image, which the server embeds.","example":{"embedding":[0.1,0.2,0.3]}},"attributes":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AttributeValue"},"example":{"tag":"billing","price":9}}},"required":["id"]},"Image":{"type":"object","properties":{"image":{"type":"string","minLength":1,"maxLength":8388608,"pattern":"^(?:https:\\/\\/|data:image\\/)"}},"required":["image"],"additionalProperties":false,"description":"An image for a column with `embed`, as an https URL or a base64 `data:image/...` URL. Its model must take images."},"AttributeValue":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}},{"type":"array","items":{"type":"array","items":{"type":"number"}}},{"type":"object","additionalProperties":{}}],"description":"An object's fields are attributes of their own: `{author: {name}}` is `author.name`."},"DocumentPage":{"type":"object","properties":{"documents":{"type":"array","items":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/DocId"},"vectors":{"type":"object","additionalProperties":{"anyOf":[{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":4096},{"type":"string","minLength":1,"maxLength":32768},{"$ref":"#/components/schemas/Image"}]},"default":{},"description":"A vector for every vector column of the schema. A column with `embed` also takes text, or an image, which the server embeds.","example":{"embedding":[0.1,0.2,0.3]}},"attributes":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AttributeValue"},"example":{"tag":"billing","price":9}}},"required":["id","attributes"]}},"next":{"type":["string","null"],"description":"Pass as `cursor` for the next page. Null on the last page."}},"required":["documents","next"]},"DeleteDocuments":{"type":"object","properties":{"ids":{"type":"array","items":{"$ref":"#/components/schemas/DocId"},"minItems":1,"maxItems":1000},"returnAffectedIds":{"type":"boolean","description":"Also return the ids the write changed, one for each count. Off by default."}},"required":["ids"],"additionalProperties":false},"WriteCounts":{"type":"object","properties":{"upserted":{"type":"integer"},"patched":{"type":"integer"},"deleted":{"type":"integer","description":"Only ids that were there count."},"upserted_ids":{"type":"array","items":{"$ref":"#/components/schemas/DocId"},"description":"With `returnAffectedIds`: the ids upserted."},"patched_ids":{"type":"array","items":{"$ref":"#/components/schemas/DocId"},"description":"With `returnAffectedIds`: the ids patched."},"deleted_ids":{"type":"array","items":{"$ref":"#/components/schemas/DocId"},"description":"With `returnAffectedIds`: the ids deleted, as `deleted` counts them."},"billing":{"allOf":[{"$ref":"#/components/schemas/Billing"},{"description":"What this request counted toward the bill."}]}},"required":["upserted","patched","deleted","billing"]},"Write":{"type":"object","properties":{"upserts":{"type":"array","items":{"$ref":"#/components/schemas/Document"},"maxItems":1000},"patches":{"type":"array","items":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/DocId"},"attributes":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AttributeValue"},"description":"Attributes to set; `null` removes one.","example":{"stock":3}}},"required":["id","attributes"]},"maxItems":1000,"description":"A patch of a missing document does nothing."},"deletes":{"type":"array","items":{"$ref":"#/components/schemas/DocId"},"maxItems":1000},"upsertIf":{"$ref":"#/components/schemas/Condition"},"patchIf":{"$ref":"#/components/schemas/Condition"},"deleteIf":{"$ref":"#/components/schemas/Condition"},"deleteBy":{"$ref":"#/components/schemas/Filter"},"patchBy":{"type":"object","properties":{"filter":{"allOf":[{"$ref":"#/components/schemas/Filter"},{"description":"Keyword objects: `{and: [..]}`, `{or: [..]}`, `{not: ..}`, or `{<attribute>: {<op>: value}}` with op `eq`, `ne`, `in`, `not_in`, `lt`, `lte`, `gt` or `gte`; on a list, `contains_all` and `contains_any`; on a string, `glob`, `iglob` (any case), `regex` and `fuzzy` (`{\"text\": \"..\", \"edits\": 0 to 2, \"ignoreCase\": false}`, a whole value within that many edits, a swap of two letters counting as one). `exists: true` holds when a document has the attribute and `exists: false` when it does not. `{id: {..}}` filters by document id with `eq`, `ne`, `in`, `not_in`, or `lt`, `lte`, `gt` and `gte` in id order, which pages through every document. Many keys in one object must all hold. A document without the attribute fails every comparison. On a list, an op holds if it holds for any item. In `search`, a `text` attribute takes `phrase` (these words, in order), `prefix` (the same, the last word a prefix), `contains_all_tokens` (every word, anywhere) or `contains_any_token` (at least one word), at the top or inside `and`. Words are analyzed as the attribute is: lowercased, stemmed, without stopwords if it drops them. A `filterable` text attribute also takes the ops of a string, on its whole value."}]},"attributes":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AttributeValue"},"description":"Attributes to set; `null` removes one.","example":{"stock":3}}},"required":["filter","attributes"],"description":"Patches every document that passes."},"returnAffectedIds":{"type":"boolean","description":"Also return the ids the write changed, one for each count. Off by default."}},"additionalProperties":false,"description":"One change, in this order: `deleteBy`, `patchBy`, `upserts`, `patches`, `deletes`. Its conditions see exactly the documents it replaces: if another write lands first, it is worked out again."},"Condition":{"type":"object","additionalProperties":{},"description":"A filter checked against each document as it was before the write; a missing one has no attributes. A value may be `{\"$ref_new\": \"<attribute>\"}`, that attribute of the document being written.","example":{"version":{"lt":{"$ref_new":"version"}}}},"Filter":{"type":"object","additionalProperties":{},"description":"Deletes every document that passes.","example":{"and":[{"tag":{"eq":"billing"}},{"price":{"lt":10}}]}},"Hits":{"type":"object","properties":{"hits":{"type":"array","items":{"$ref":"#/components/schemas/Hit"}},"performance":{"$ref":"#/components/schemas/Performance"},"billing":{"allOf":[{"$ref":"#/components/schemas/Billing"},{"description":"What this request counted toward the bill."}]}},"required":["hits","performance","billing"]},"Hit":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/DocId"},"distance":{"type":"number","description":"Smaller is closer, for every metric."},"attributes":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AttributeValue"}},"rerank_score":{"type":"number","description":"With `rerank`, the model's score: larger is better."}},"required":["id","distance","attributes"]},"Performance":{"type":"object","properties":{"server_ms":{"type":"integer","description":"Time spent on the server."},"cache_temperature":{"type":"string","enum":["hot","warm","cold"],"description":"`hot`: everything came from memory; `warm`: some from the disk cache; `cold`: some from object storage."},"cache_hit_ratio":{"type":"number","description":"The share of reads a cache served, from 0 to 1."}},"required":["server_ms","cache_temperature","cache_hit_ratio"]},"Query":{"type":"object","properties":{"vector":{"type":"object","properties":{"column":{"type":"string","maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*(?:\\.[A-Za-z_][A-Za-z0-9_]*)*$"},"value":{"anyOf":[{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":4096},{"type":"string","minLength":1,"maxLength":32768},{"$ref":"#/components/schemas/Image"}]}},"required":["column","value"],"description":"`value` may be text when the column has `embed`.","example":{"column":"embedding","value":[0.1,0.2,0.3]}},"topK":{"type":"integer","minimum":1,"maximum":1000,"default":10},"recall":{"type":"number","exclusiveMinimum":0,"maximum":1,"description":"The share of the true nearest `topK` to find, from 0 to 1. The index reads as much as its last build measured that takes. 0.95 by default. 1 is an exact search: it reads every cluster and returns exactly the true nearest `topK` by the column's metric, filtered or not, at the cost of reading the whole index.","example":0.95},"probe":{"type":"integer","minimum":1,"description":"Clusters to read, instead of what `recall` needs. More is slower and finds more of the true nearest."},"filter":{"allOf":[{"$ref":"#/components/schemas/Filter"},{"description":"Keyword objects: `{and: [..]}`, `{or: [..]}`, `{not: ..}`, or `{<attribute>: {<op>: value}}` with op `eq`, `ne`, `in`, `not_in`, `lt`, `lte`, `gt` or `gte`; on a list, `contains_all` and `contains_any`; on a string, `glob`, `iglob` (any case), `regex` and `fuzzy` (`{\"text\": \"..\", \"edits\": 0 to 2, \"ignoreCase\": false}`, a whole value within that many edits, a swap of two letters counting as one). `exists: true` holds when a document has the attribute and `exists: false` when it does not. `{id: {..}}` filters by document id with `eq`, `ne`, `in`, `not_in`, or `lt`, `lte`, `gt` and `gte` in id order, which pages through every document. Many keys in one object must all hold. A document without the attribute fails every comparison. On a list, an op holds if it holds for any item. In `search`, a `text` attribute takes `phrase` (these words, in order), `prefix` (the same, the last word a prefix), `contains_all_tokens` (every word, anywhere) or `contains_any_token` (at least one word), at the top or inside `and`. Words are analyzed as the attribute is: lowercased, stemmed, without stopwords if it drops them. A `filterable` text attribute also takes the ops of a string, on its whole value."}]},"include":{"type":"array","items":{"type":"string"},"maxItems":64,"description":"Attributes to return with each hit. None by default."},"exclude":{"type":"array","items":{"type":"string"},"maxItems":64,"description":"Attributes to leave out: every other one is returned. Not with `include`."},"offset":{"type":"integer","minimum":0,"maximum":10000,"description":"Hits to skip before the first returned, for pages. 0 by default."},"per":{"$ref":"#/components/schemas/Per"},"consistency":{"$ref":"#/components/schemas/Consistency"},"rerank":{"$ref":"#/components/schemas/Rerank"}},"required":["vector"],"additionalProperties":false},"Per":{"type":"object","properties":{"attributes":{"type":"array","items":{"type":"string","maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*(?:\\.[A-Za-z_][A-Za-z0-9_]*)*$"},"minItems":1,"maxItems":8},"limit":{"type":"integer","minimum":1,"maximum":1000}},"required":["attributes","limit"],"description":"At most `limit` hits for each set of values of `attributes`, such as 3 chunks per file. Hits without one of them count together.","example":{"attributes":["file"],"limit":3}},"Consistency":{"type":"string","enum":["strong","eventual"],"description":"`strong` (the default) sees every write that finished before the request. `eventual` may use what this server read up to a minute ago, which skips a round trip to object storage."},"Rerank":{"type":"object","properties":{"model":{"type":"string","minLength":1,"maxLength":256,"example":"rerank-v3.5"},"field":{"type":"string","maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*(?:\\.[A-Za-z_][A-Za-z0-9_]*)*$","description":"The `string` or `text` attribute whose value is ranked against `query`.","example":"body"},"query":{"type":"string","minLength":1,"maxLength":4096,"description":"What to rank by. The search's text by default; a vector query needs it unless its vector is text."},"topN":{"type":"integer","minimum":1,"maximum":1000,"description":"The most hits to return after reranking. Every hit by default."}},"required":["model","field"],"description":"Orders the hits again with a rerank model on the server's rerank provider, best first, and gives each a `rerank_score`."},"SearchHits":{"type":"object","properties":{"hits":{"type":"array","items":{"$ref":"#/components/schemas/SearchHit"}},"performance":{"$ref":"#/components/schemas/Performance"},"billing":{"allOf":[{"$ref":"#/components/schemas/Billing"},{"description":"What this request counted toward the bill."}]}},"required":["hits","performance","billing"]},"SearchHit":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/DocId"},"score":{"type":"number","description":"BM25: larger is better."},"attributes":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AttributeValue"}},"highlights":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Highlight"}},"rerank_score":{"type":"number","description":"With `rerank`, the model's score: larger is better."}},"required":["id","score","attributes","highlights"]},"Highlight":{"type":"object","properties":{"text":{"type":"string","description":"About 200 characters around the best match."},"marks":{"type":"array","items":{"type":"array","prefixItems":[{"type":"integer"},{"type":"integer"}]},"description":"`[start, end)` of each matched word, in UTF-16 code units of `text`."}},"required":["text","marks"]},"Search":{"type":"object","properties":{"query":{"type":"string","minLength":1,"maxLength":4096,"example":"reset password"},"fields":{"type":"array","items":{"type":"string","maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*(?:\\.[A-Za-z_][A-Za-z0-9_]*)*$"},"minItems":1,"maxItems":64,"description":"The text attributes to search. Every one by default."},"boosts":{"type":"object","additionalProperties":{"type":"number","minimum":0,"maximum":1000},"description":"A weight per field; 1 when missing.","example":{"title":2}},"topK":{"type":"integer","minimum":1,"maximum":1000,"default":10},"k1":{"type":"number","minimum":0,"maximum":10,"description":"BM25's term saturation for this query. The first field's by default."},"b":{"type":"number","minimum":0,"maximum":1,"description":"BM25's length normalization for this query. The first field's by default."},"filter":{"allOf":[{"$ref":"#/components/schemas/Filter"},{"description":"Keyword objects: `{and: [..]}`, `{or: [..]}`, `{not: ..}`, or `{<attribute>: {<op>: value}}` with op `eq`, `ne`, `in`, `not_in`, `lt`, `lte`, `gt` or `gte`; on a list, `contains_all` and `contains_any`; on a string, `glob`, `iglob` (any case), `regex` and `fuzzy` (`{\"text\": \"..\", \"edits\": 0 to 2, \"ignoreCase\": false}`, a whole value within that many edits, a swap of two letters counting as one). `exists: true` holds when a document has the attribute and `exists: false` when it does not. `{id: {..}}` filters by document id with `eq`, `ne`, `in`, `not_in`, or `lt`, `lte`, `gt` and `gte` in id order, which pages through every document. Many keys in one object must all hold. A document without the attribute fails every comparison. On a list, an op holds if it holds for any item. In `search`, a `text` attribute takes `phrase` (these words, in order), `prefix` (the same, the last word a prefix), `contains_all_tokens` (every word, anywhere) or `contains_any_token` (at least one word), at the top or inside `and`. Words are analyzed as the attribute is: lowercased, stemmed, without stopwords if it drops them. A `filterable` text attribute also takes the ops of a string, on its whole value."}]},"include":{"type":"array","items":{"type":"string"},"maxItems":64,"description":"Attributes to return with each hit. None by default."},"exclude":{"type":"array","items":{"type":"string"},"maxItems":64,"description":"Attributes to leave out: every other one is returned. Not with `include`."},"highlight":{"type":"array","items":{"type":"string"},"maxItems":8,"description":"Text attributes to return the best fragment of, with the matched words marked."},"fuzzy":{"type":"integer","minimum":0,"maximum":2,"description":"Also match words within this many edits of each word searched for: a letter added, removed or changed, or two swapped. 0 by default."},"lastAsPrefix":{"type":"boolean","description":"Also match the longer words the query's last word starts, for search as you type."},"offset":{"type":"integer","minimum":0,"maximum":10000,"description":"Hits to skip before the first returned, for pages. 0 by default."},"per":{"$ref":"#/components/schemas/Per"},"consistency":{"$ref":"#/components/schemas/Consistency"},"rerank":{"$ref":"#/components/schemas/Rerank"}},"required":["query"],"additionalProperties":false},"FusedHits":{"type":"object","properties":{"hits":{"type":"array","items":{"$ref":"#/components/schemas/FusedHit"}},"performance":{"$ref":"#/components/schemas/Performance"},"billing":{"allOf":[{"$ref":"#/components/schemas/Billing"},{"description":"What this request counted toward the bill."}]}},"required":["hits","performance","billing"]},"FusedHit":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/DocId"},"score":{"type":"number","description":"The fused score: larger is better."},"ranks":{"type":"object","additionalProperties":{"type":"integer"},"description":"Its rank in each search that found it, from 1."},"scores":{"type":"object","additionalProperties":{"type":"number"},"description":"Its distance in each vector search and BM25 score in each text search."},"attributes":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AttributeValue"}},"highlights":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Highlight"}},"rerank_score":{"type":"number","description":"With `rerank`, the model's score: larger is better."}},"required":["id","score","ranks","scores","attributes","highlights"]},"Hybrid":{"type":"object","properties":{"searches":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/Query"},{"$ref":"#/components/schemas/Search"}]},"description":"Named searches, each a vector query (with `vector`) or a text search (with `query`). Each one's `topK` is how deep it looks.","example":{"meaning":{"vector":{"column":"embedding","value":[0.1,0.2,0.3]},"topK":50},"words":{"query":"reset password","topK":50}}},"topK":{"type":"integer","minimum":1,"maximum":1000,"default":10},"fuse":{"type":"object","properties":{"k":{"type":"number","minimum":0,"maximum":1000,"default":60},"weights":{"type":"object","additionalProperties":{"type":"number","minimum":0,"maximum":1000}}},"default":{"k":60},"description":"Reciprocal rank fusion: a hit scores the sum of `weight / (k + rank)` over the searches that found it, ranks from 1. Weights are 1 when missing."},"offset":{"type":"integer","minimum":0,"maximum":10000,"description":"Hits to skip before the first returned, for pages. 0 by default."},"per":{"$ref":"#/components/schemas/Per"},"consistency":{"$ref":"#/components/schemas/Consistency"},"rank":{"$ref":"#/components/schemas/Score"},"rerank":{"allOf":[{"$ref":"#/components/schemas/Rerank"},{"description":"Reranks the fused hits. `query` is the first text search's by default, then the first vector given as text."}]}},"required":["searches"],"additionalProperties":false,"description":"`rank` scores the hits the searches found instead of `fuse`; each search's `topK` is still how deep it looks."},"Score":{"anyOf":[{"type":"number"},{"type":"object","additionalProperties":{}}],"description":"An expression that scores each hit, larger is better: a number; `{search: <name>}`, that search's score (BM25, or the distance of a vector search; 0 when it missed the hit); `{attribute: <name>}`, a number, int, datetime (ms) or bool attribute (0 when missing); `{sum | product | max | min: [..]}`; `{decay: {of, origin, scale}}`, 1 at `origin` and halving every `scale` away; or `{saturate: {of, k}}`, `x / (x + k)`; `{dist: {of, origin}}`, how far `of` is from `origin`; `{pow: {of, exponent}}`; `{filter: <filter>}`, 1 when the document passes, else 0; `{dot: {attribute, indices, values}}`, the dot product with a `sparse` attribute; or `{max_sim: {attribute, vectors}}`, for each vector its best dot product with one of a `vectors` attribute, summed.","example":{"sum":[{"search":"title"},{"search":"body"},{"saturate":{"of":{"attribute":"stars"},"k":3}}]}},"Rows":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/components/schemas/Row"}},"performance":{"$ref":"#/components/schemas/Performance"},"billing":{"allOf":[{"$ref":"#/components/schemas/Billing"},{"description":"What this request counted toward the bill."}]}},"required":["rows","performance","billing"]},"Row":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/DocId"},"attributes":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AttributeValue"}}},"required":["id","attributes"]},"Order":{"type":"object","properties":{"by":{"type":"string","description":"An attribute, or `id`.","example":"price"},"descending":{"type":"boolean","default":false},"thenBy":{"type":"array","items":{"type":"object","properties":{"by":{"type":"string"},"descending":{"type":"boolean","default":false}},"required":["by"]},"maxItems":7,"description":"More keys, for ties on the ones before. Up to 8 keys in all."},"missingLowest":{"type":"boolean","default":false,"description":"Documents without the attribute sort below every value: first going up, last going down. Otherwise they come last either way."},"topK":{"type":"integer","minimum":1,"maximum":1000,"default":10},"offset":{"type":"integer","minimum":0,"maximum":10000,"description":"Hits to skip before the first returned, for pages. 0 by default."},"filter":{"allOf":[{"$ref":"#/components/schemas/Filter"},{"description":"Keyword objects: `{and: [..]}`, `{or: [..]}`, `{not: ..}`, or `{<attribute>: {<op>: value}}` with op `eq`, `ne`, `in`, `not_in`, `lt`, `lte`, `gt` or `gte`; on a list, `contains_all` and `contains_any`; on a string, `glob`, `iglob` (any case), `regex` and `fuzzy` (`{\"text\": \"..\", \"edits\": 0 to 2, \"ignoreCase\": false}`, a whole value within that many edits, a swap of two letters counting as one). `exists: true` holds when a document has the attribute and `exists: false` when it does not. `{id: {..}}` filters by document id with `eq`, `ne`, `in`, `not_in`, or `lt`, `lte`, `gt` and `gte` in id order, which pages through every document. Many keys in one object must all hold. A document without the attribute fails every comparison. On a list, an op holds if it holds for any item. In `search`, a `text` attribute takes `phrase` (these words, in order), `prefix` (the same, the last word a prefix), `contains_all_tokens` (every word, anywhere) or `contains_any_token` (at least one word), at the top or inside `and`. Words are analyzed as the attribute is: lowercased, stemmed, without stopwords if it drops them. A `filterable` text attribute also takes the ops of a string, on its whole value."}]},"include":{"type":"array","items":{"type":"string"},"maxItems":64,"description":"Attributes to return with each hit. None by default."},"exclude":{"type":"array","items":{"type":"string"},"maxItems":64,"description":"Attributes to leave out: every other one is returned. Not with `include`."},"consistency":{"$ref":"#/components/schemas/Consistency"}},"required":["by"],"additionalProperties":false,"description":"Documents in the order of one or more attributes; those without one come last."},"RankedHits":{"type":"object","properties":{"hits":{"type":"array","items":{"$ref":"#/components/schemas/Ranked"}},"performance":{"$ref":"#/components/schemas/Performance"},"billing":{"allOf":[{"$ref":"#/components/schemas/Billing"},{"description":"What this request counted toward the bill."}]}},"required":["hits","performance","billing"]},"Ranked":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/DocId"},"score":{"type":"number"},"attributes":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AttributeValue"}}},"required":["id","score","attributes"]},"Rank":{"type":"object","properties":{"score":{"$ref":"#/components/schemas/Score"},"topK":{"type":"integer","minimum":1,"maximum":1000,"default":10},"offset":{"type":"integer","minimum":0,"maximum":10000,"description":"Hits to skip before the first returned, for pages. 0 by default."},"filter":{"allOf":[{"$ref":"#/components/schemas/Filter"},{"description":"Keyword objects: `{and: [..]}`, `{or: [..]}`, `{not: ..}`, or `{<attribute>: {<op>: value}}` with op `eq`, `ne`, `in`, `not_in`, `lt`, `lte`, `gt` or `gte`; on a list, `contains_all` and `contains_any`; on a string, `glob`, `iglob` (any case), `regex` and `fuzzy` (`{\"text\": \"..\", \"edits\": 0 to 2, \"ignoreCase\": false}`, a whole value within that many edits, a swap of two letters counting as one). `exists: true` holds when a document has the attribute and `exists: false` when it does not. `{id: {..}}` filters by document id with `eq`, `ne`, `in`, `not_in`, or `lt`, `lte`, `gt` and `gte` in id order, which pages through every document. Many keys in one object must all hold. A document without the attribute fails every comparison. On a list, an op holds if it holds for any item. In `search`, a `text` attribute takes `phrase` (these words, in order), `prefix` (the same, the last word a prefix), `contains_all_tokens` (every word, anywhere) or `contains_any_token` (at least one word), at the top or inside `and`. Words are analyzed as the attribute is: lowercased, stemmed, without stopwords if it drops them. A `filterable` text attribute also takes the ops of a string, on its whole value."}]},"include":{"type":"array","items":{"type":"string"},"maxItems":64,"description":"Attributes to return with each hit. None by default."},"exclude":{"type":"array","items":{"type":"string"},"maxItems":64,"description":"Attributes to leave out: every other one is returned. Not with `include`."},"consistency":{"$ref":"#/components/schemas/Consistency"}},"required":["score"],"additionalProperties":false,"description":"Every document that passes the filter, scored exactly, best first. Those scoring 0 are left out. Search scores are 0 here.","example":{"score":{"dot":{"attribute":"terms","indices":[12,4071],"values":[0.8,1.3]}}}},"Groups":{"type":"object","properties":{"groups":{"type":"array","items":{"$ref":"#/components/schemas/Group"},"description":"In key order, at most 1000."},"performance":{"$ref":"#/components/schemas/Performance"},"billing":{"allOf":[{"$ref":"#/components/schemas/Billing"},{"description":"What this request counted toward the bill."}]}},"required":["groups","performance","billing"]},"Group":{"type":"object","properties":{"key":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AttributeValue"},"description":"The values of `groupBy` its documents share; one they lack is left out."},"values":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AttributeValue"}}},"required":["key","values"]},"Aggregate":{"type":"object","properties":{"filter":{"allOf":[{"$ref":"#/components/schemas/Filter"},{"description":"Keyword objects: `{and: [..]}`, `{or: [..]}`, `{not: ..}`, or `{<attribute>: {<op>: value}}` with op `eq`, `ne`, `in`, `not_in`, `lt`, `lte`, `gt` or `gte`; on a list, `contains_all` and `contains_any`; on a string, `glob`, `iglob` (any case), `regex` and `fuzzy` (`{\"text\": \"..\", \"edits\": 0 to 2, \"ignoreCase\": false}`, a whole value within that many edits, a swap of two letters counting as one). `exists: true` holds when a document has the attribute and `exists: false` when it does not. `{id: {..}}` filters by document id with `eq`, `ne`, `in`, `not_in`, or `lt`, `lte`, `gt` and `gte` in id order, which pages through every document. Many keys in one object must all hold. A document without the attribute fails every comparison. On a list, an op holds if it holds for any item. In `search`, a `text` attribute takes `phrase` (these words, in order), `prefix` (the same, the last word a prefix), `contains_all_tokens` (every word, anywhere) or `contains_any_token` (at least one word), at the top or inside `and`. Words are analyzed as the attribute is: lowercased, stemmed, without stopwords if it drops them. A `filterable` text attribute also takes the ops of a string, on its whole value."}]},"groupBy":{"type":"array","items":{"type":"string"},"maxItems":8,"description":"A group per set of values of these attributes. One group by default."},"each":{"type":"array","items":{"type":"string"},"maxItems":8,"description":"Lists in `groupBy` that group by each of their items: a document is in one group per distinct item, and in none when the list is empty."},"measures":{"type":"object","additionalProperties":{"anyOf":[{"type":"array","prefixItems":[{"type":"string","enum":["count"]}]},{"type":"array","prefixItems":[{"type":"string","enum":["count","sum","avg","min","max"]},{"type":"string"}]}]},"description":"Each by the name it comes back under: `[\"count\"]`, or `[\"count\" | \"sum\" | \"avg\" | \"min\" | \"max\", attribute]`.","example":{"total":["count"],"revenue":["sum","price"]}},"consistency":{"$ref":"#/components/schemas/Consistency"}},"required":["measures"],"additionalProperties":false},"MultiResults":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"query":{"type":"array","items":{"$ref":"#/components/schemas/Hit"}},"search":{"type":"array","items":{"$ref":"#/components/schemas/SearchHit"}},"hybrid":{"type":"array","items":{"$ref":"#/components/schemas/FusedHit"}},"order":{"type":"array","items":{"$ref":"#/components/schemas/Row"}},"rank":{"type":"array","items":{"$ref":"#/components/schemas/Ranked"}},"aggregate":{"type":"array","items":{"$ref":"#/components/schemas/Group"}}},"description":"The answer, in the field the request was asked in."}},"performance":{"$ref":"#/components/schemas/Performance"},"billing":{"allOf":[{"$ref":"#/components/schemas/Billing"},{"description":"What this request counted toward the bill."}]}},"required":["results","performance","billing"]},"Multi":{"type":"object","properties":{"requests":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"query":{"$ref":"#/components/schemas/Query"}},"required":["query"],"additionalProperties":false},{"type":"object","properties":{"search":{"$ref":"#/components/schemas/Search"}},"required":["search"],"additionalProperties":false},{"type":"object","properties":{"hybrid":{"$ref":"#/components/schemas/Hybrid"}},"required":["hybrid"],"additionalProperties":false},{"type":"object","properties":{"order":{"$ref":"#/components/schemas/Order"}},"required":["order"],"additionalProperties":false},{"type":"object","properties":{"rank":{"$ref":"#/components/schemas/Rank"}},"required":["rank"],"additionalProperties":false},{"type":"object","properties":{"aggregate":{"$ref":"#/components/schemas/Aggregate"}},"required":["aggregate"],"additionalProperties":false}]},"minItems":1,"maxItems":16},"consistency":{"allOf":[{"$ref":"#/components/schemas/Consistency"},{"description":"For every request, which may not set their own."}]}},"required":["requests"],"additionalProperties":false,"description":"Requests that all see the same snapshot of the branch."},"Operation":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"string"},"branch":{"type":["string","null"],"description":"Null for work on the whole index."},"kind":{"$ref":"#/components/schemas/OperationKind"},"status":{"$ref":"#/components/schemas/OperationStatus"},"error":{"type":["string","null"],"description":"Why it failed."},"started":{"type":"string","format":"date-time"},"finished":{"type":["string","null"],"format":"date-time"}},"required":["id","index","branch","kind","status","error","started","finished"],"description":"Work that goes on after its request answered. Ask for it by id to follow it."},"OperationKind":{"type":"string","enum":["build","warm","collect","copy"]},"OperationStatus":{"type":"string","enum":["running","done","failed"]},"Recall":{"type":"object","properties":{"recall":{"type":"number","description":"The share of the exact nearest documents the index found, on average."},"queries":{"type":"integer","description":"Queries run; fewer with few documents."},"found":{"type":"number","description":"Hits per query, on average."},"exact":{"type":"number","description":"Exact hits per query, on average."}},"required":["recall","queries","found","exact"]},"RecallCheck":{"type":"object","properties":{"column":{"type":"string","maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*(?:\\.[A-Za-z_][A-Za-z0-9_]*)*$","description":"The first vector column by default."},"queries":{"type":"integer","minimum":1,"maximum":100,"default":10,"description":"How many documents' vectors to query with, picked at random."},"topK":{"type":"integer","minimum":1,"maximum":100,"default":10},"recall":{"type":"number","exclusiveMinimum":0,"maximum":1,"description":"The recall target the queries use, as in `query`."},"filter":{"allOf":[{"$ref":"#/components/schemas/Filter"},{"description":"Keyword objects: `{and: [..]}`, `{or: [..]}`, `{not: ..}`, or `{<attribute>: {<op>: value}}` with op `eq`, `ne`, `in`, `not_in`, `lt`, `lte`, `gt` or `gte`; on a list, `contains_all` and `contains_any`; on a string, `glob`, `iglob` (any case), `regex` and `fuzzy` (`{\"text\": \"..\", \"edits\": 0 to 2, \"ignoreCase\": false}`, a whole value within that many edits, a swap of two letters counting as one). `exists: true` holds when a document has the attribute and `exists: false` when it does not. `{id: {..}}` filters by document id with `eq`, `ne`, `in`, `not_in`, or `lt`, `lte`, `gt` and `gte` in id order, which pages through every document. Many keys in one object must all hold. A document without the attribute fails every comparison. On a list, an op holds if it holds for any item. In `search`, a `text` attribute takes `phrase` (these words, in order), `prefix` (the same, the last word a prefix), `contains_all_tokens` (every word, anywhere) or `contains_any_token` (at least one word), at the top or inside `and`. Words are analyzed as the attribute is: lowercased, stemmed, without stopwords if it drops them. A `filterable` text attribute also takes the ops of a string, on its whole value."}]}},"additionalProperties":false},"IndexUsage":{"type":"object","properties":{"days":{"type":"array","items":{"$ref":"#/components/schemas/IndexUsageDay"},"description":"Oldest first, one per day."}},"required":["days"]},"IndexUsageDay":{"type":"object","properties":{"day":{"type":"string","description":"The day in UTC, such as `2026-11-08`."},"queries":{"type":"integer"},"writes":{"type":"integer","description":"Documents written."},"deletes":{"type":"integer","description":"Ids deleted."},"embeddings":{"type":"integer","description":"Texts embedded."},"reranks":{"type":"integer","description":"Queries reranked."},"rows":{"type":["integer","null"],"description":"Live documents of `main` when last counted that day; null if not counted."},"bytes":{"type":["integer","null"]}},"required":["day","queries","writes","deletes","embeddings","reranks","rows","bytes"]}},"parameters":{}},"paths":{"/orgs":{"post":{"operationId":"createOrg","tags":["orgs"],"summary":"Creates an organization. Needs the server's admin token.","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewOrg"}}}},"responses":{"201":{"description":"The organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedOrg"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"It conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/orgs/{org}/name":{"put":{"operationId":"renameOrg","tags":["orgs"],"summary":"Sets an organization's name, unique whatever the case. The console calls it to keep names the same on both sides. Needs the server's admin token.","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","description":"Your organization."},"required":true,"description":"Your organization.","name":"org","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgName"}}}},"responses":{"200":{"description":"The organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NamedOrg"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"It does not exist, or the caller cannot see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"It conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/orgs/{org}/ip-allowlist":{"get":{"operationId":"getIpAllowlist","tags":["orgs"],"summary":"Where the organization's keys and people may call from. Needs an org admin.","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","description":"Your organization."},"required":true,"description":"Your organization.","name":"org","in":"path"}],"responses":{"200":{"description":"The list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IpAllowlist"}}}},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The caller may not do this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"It does not exist, or the caller cannot see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}},"put":{"operationId":"setIpAllowlist","tags":["orgs"],"summary":"Sets where the organization's keys and people may call from. Needs an org admin.","description":"Calls from anywhere else answer 403 `ip_not_allowed`. A list that leaves out the address of the call that sets it is refused, so an admin never locks themselves out.","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","description":"Your organization."},"required":true,"description":"Your organization.","name":"org","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IpAllowlist"}}}},"responses":{"200":{"description":"The new list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IpAllowlist"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The caller may not do this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"It does not exist, or the caller cannot see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"It conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/orgs/{org}/invoices":{"get":{"operationId":"listInvoices","tags":["orgs"],"summary":"The organization's invoices, newest first, made from its indexes' usage.","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","description":"Your organization."},"required":true,"description":"Your organization.","name":"org","in":"path"}],"responses":{"200":{"description":"The invoices.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceSummary"}}}}},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The caller may not do this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"It does not exist, or the caller cannot see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/orgs/{org}/invoices/{month}":{"get":{"operationId":"getInvoice","tags":["orgs"],"summary":"One month's invoice, with a line per index and item.","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","description":"Your organization."},"required":true,"description":"Your organization.","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","example":"2026-11"},"required":true,"name":"month","in":"path"}],"responses":{"200":{"description":"The invoice.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The caller may not do this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"It does not exist, or the caller cannot see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/orgs/{org}/billing":{"get":{"operationId":"getBilling","tags":["billing"],"summary":"The organization's plan and its usage this period.","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","example":"org_123"},"required":true,"name":"org","in":"path"}],"responses":{"200":{"description":"The plan and usage.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Billing"}}}},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The caller may not do this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"It does not exist, or the caller cannot see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/orgs/{org}/billing/checkout":{"post":{"operationId":"startCheckout","tags":["billing"],"summary":"Starts a Stripe Checkout that subscribes the organization to a plan.","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","example":"org_123"},"required":true,"name":"org","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewCheckout"}}}},"responses":{"200":{"description":"Where to pay.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutStart"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The caller may not do this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"It does not exist, or the caller cannot see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"It conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"501":{"description":"This server cannot do this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/orgs/{org}/billing/portal":{"post":{"operationId":"openPortal","tags":["billing"],"summary":"A Stripe customer portal page, to change the card or plan, or cancel.","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","example":"org_123"},"required":true,"name":"org","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewPortal"}}}},"responses":{"200":{"description":"Where to send the person.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Redirect"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The caller may not do this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"It does not exist, or the caller cannot see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"It conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"501":{"description":"This server cannot do this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/orgs/{org}/billing/subscription":{"put":{"operationId":"changePlan","tags":["billing"],"summary":"Moves the subscription to another plan: at once for a larger plan, charging the difference for the rest of the period; at the period's end for a smaller one.","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","example":"org_123"},"required":true,"name":"org","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanChange"}}}},"responses":{"200":{"description":"The plan and usage.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Billing"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The caller may not do this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"It does not exist, or the caller cannot see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"It conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"501":{"description":"This server cannot do this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}},"delete":{"operationId":"cancelSubscription","tags":["billing"],"summary":"Ends the subscription when the period ends; the organization then moves to Free.","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","example":"org_123"},"required":true,"name":"org","in":"path"}],"responses":{"200":{"description":"The plan and usage.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Billing"}}}},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The caller may not do this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"It does not exist, or the caller cannot see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"It conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"501":{"description":"This server cannot do this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/orgs/{org}/billing/subscription/resume":{"post":{"operationId":"resumeSubscription","tags":["billing"],"summary":"Keeps a subscription that was set to end.","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","example":"org_123"},"required":true,"name":"org","in":"path"}],"responses":{"200":{"description":"The plan and usage.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Billing"}}}},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The caller may not do this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"It does not exist, or the caller cannot see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"It conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"501":{"description":"This server cannot do this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/orgs/{org}/billing/plan":{"put":{"operationId":"setPlan","tags":["billing"],"summary":"Puts the organization on Enterprise, or takes it off. Needs the server's admin token.","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","example":"org_123"},"required":true,"name":"org","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanOverride"}}}},"responses":{"200":{"description":"The plan and usage.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Billing"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"It does not exist, or the caller cannot see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"501":{"description":"This server cannot do this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/orgs/{org}/sso":{"get":{"operationId":"getSsoPolicy","tags":["orgs"],"summary":"Which email domains must sign in through single sign-on. Needs the admin token.","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"org","in":"path"}],"responses":{"200":{"description":"The policy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoPolicy"}}}},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"It does not exist, or the caller cannot see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}},"put":{"operationId":"setSsoPolicy","tags":["orgs"],"summary":"Sets which email domains must sign in through single sign-on. Needs the admin token: the console checks each domain is verified first.","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"org","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoPolicy"}}}},"responses":{"200":{"description":"The new policy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoPolicy"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"It does not exist, or the caller cannot see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/sso/domains/{domain}":{"get":{"operationId":"ssoDomainOrgs","tags":["orgs"],"summary":"Which organizations require single sign-on for an email domain. Needs the admin token: the console asks before it lets anyone sign in another way.","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"domain","in":"path"}],"responses":{"200":{"description":"The organizations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoDomainOrgs"}}}},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/whoami":{"get":{"operationId":"whoami","tags":["keys"],"summary":"Who is calling: the organization, environment and role the key or person has.","security":[{"bearer":[]}],"responses":{"200":{"description":"The caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Whoami"}}}},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The caller may not do this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/keys":{"get":{"operationId":"listKeys","tags":["keys"],"summary":"The organization's API keys. Never the keys themselves.","security":[{"bearer":[]}],"responses":{"200":{"description":"The keys.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Key"}}}}},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The caller may not do this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}},"post":{"operationId":"createKey","tags":["keys"],"summary":"Creates an API key. It can reach only namespaces the caller can reach.","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewKey"}}}},"responses":{"201":{"description":"The new key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedKey"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The caller may not do this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/keys/{id}":{"delete":{"operationId":"deleteKey","tags":["keys"],"summary":"Revokes an API key at once.","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Done."},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The caller may not do this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"It does not exist, or the caller cannot see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/orgs/{org}/members/{user}/keys":{"delete":{"operationId":"revokeMemberKeys","tags":["keys"],"summary":"Revokes every key a person made in the organization, and the keys those keys made. The console calls it when someone leaves or is removed. Needs the server's admin token.","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"org","in":"path"},{"schema":{"type":"string"},"required":true,"name":"user","in":"path"}],"responses":{"200":{"description":"How many keys.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokedKeys"}}}},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/logins/{code}":{"get":{"operationId":"getLogin","tags":["keys"],"summary":"A sign-in the CLI started, for the person approving it.","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","pattern":"^[A-HJ-NP-Z2-9]{4}-[A-HJ-NP-Z2-9]{4}$/i","example":"ABCD-2345"},"required":true,"name":"code","in":"path"}],"responses":{"200":{"description":"The sign-in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Login"}}}},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"It does not exist, or the caller cannot see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}},"post":{"operationId":"approveLogin","tags":["keys"],"summary":"Approves a sign-in the CLI started: its key starts to work, with this scope.","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","pattern":"^[A-HJ-NP-Z2-9]{4}-[A-HJ-NP-Z2-9]{4}$/i","example":"ABCD-2345"},"required":true,"name":"code","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Approval"}}}},"responses":{"200":{"description":"The key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovedLogin"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The caller may not do this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"It does not exist, or the caller cannot see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/oauth/codes":{"post":{"operationId":"createOAuthCode","tags":["keys"],"summary":"Approves a desktop app's sign-in for the person in the console: a code, good once for a minute, that only the app's PKCE verifier redeems.","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewOAuthCode"}}}},"responses":{"201":{"description":"The code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssuedOAuthCode"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The caller may not do this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/oauth/token":{"post":{"operationId":"oauthToken","tags":["keys"],"security":[],"summary":"Redeems a code with its verifier, or a refresh token, for a new pair of tokens.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthTokenRequest"}}}},"responses":{"200":{"description":"The tokens.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthTokens"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/oauth/revoke":{"post":{"operationId":"oauthRevoke","tags":["keys"],"security":[],"summary":"Ends a desktop app's sign-in, given its refresh or access token. Unknown tokens are no error.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthRevocation"}}}},"responses":{"204":{"description":"Ended, or never known."},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/audit":{"get":{"operationId":"auditLog","tags":["audit"],"summary":"Every call to the API in the organization, newest first: reads, writes and refusals.","security":[{"bearer":[]}],"parameters":[{"schema":{"type":["integer","null"],"description":"The most events to return, at most 1000. 1000 by default."},"required":false,"description":"The most events to return, at most 1000. 1000 by default.","name":"limit","in":"query"},{"schema":{"type":"string","maxLength":4096,"description":"The next page: the id of the last one of the page before."},"required":false,"description":"The next page: the id of the last one of the page before.","name":"after","in":"query"},{"schema":{"type":"string","format":"date-time","description":"Only events at or after this time."},"required":false,"description":"Only events at or after this time.","name":"since","in":"query"},{"schema":{"type":"string","format":"date-time","description":"Only events before this time."},"required":false,"description":"Only events before this time.","name":"until","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"actor","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"action","in":"query"},{"schema":{"$ref":"#/components/schemas/AuditOutcome"},"required":false,"description":"`ok`; `denied` for lack of access (401, 403); `rejected` as a bad request (other 4xx); `error` on our side (5xx).","name":"outcome","in":"query"}],"responses":{"200":{"description":"A page of events.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditLog"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The caller may not do this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/audit/events":{"post":{"operationId":"recordAuditEvents","tags":["audit"],"summary":"Adds what the console saw itself, such as sign-ins, to the audit log. Admin token only.","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"events":{"type":"array","items":{"$ref":"#/components/schemas/ConsoleEvent"},"minItems":1,"maxItems":1000}},"required":["events"],"additionalProperties":false}}}},"responses":{"204":{"description":"Done."},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/regions":{"get":{"operationId":"listRegions","tags":["environments"],"summary":"The regions this server can keep data in.","security":[{"bearer":[]}],"responses":{"200":{"description":"The regions.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Region"}}}}},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/environments":{"get":{"operationId":"listEnvironments","tags":["environments"],"summary":"The environments the caller can reach.","security":[{"bearer":[]}],"responses":{"200":{"description":"The environments.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Environment"}}}}},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}},"post":{"operationId":"createEnvironment","tags":["environments"],"summary":"Makes an environment. It has no region; each namespace and index picks its own.","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewEnvironment"}}}},"responses":{"201":{"description":"The environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Environment"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The caller may not do this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"It conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/environments/{environment}/store/trust":{"get":{"operationId":"getStoreTrust","tags":["environments"],"summary":"What a role must trust before an environment can keep its data in your bucket.","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","example":"prod"},"required":true,"name":"environment","in":"path"}],"responses":{"200":{"description":"The trust to grant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreTrust"}}}},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The caller may not do this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/environments/{environment}/store":{"put":{"operationId":"setEnvironmentStore","tags":["environments"],"summary":"Keeps the environment's data in your own bucket. The API checks it can write, list and delete there first. Only while the environment holds no namespaces or indexes.","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","example":"prod"},"required":true,"name":"environment","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewEnvironmentStore"}}}},"responses":{"200":{"description":"The bucket, checked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentStore"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The caller may not do this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"It does not exist, or the caller cannot see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"It conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"501":{"description":"This server cannot do this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}},"delete":{"operationId":"removeEnvironmentStore","tags":["environments"],"summary":"Goes back to the server's regions. Only while the environment holds no data.","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","example":"prod"},"required":true,"name":"environment","in":"path"}],"responses":{"204":{"description":"Done."},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The caller may not do this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"It does not exist, or the caller cannot see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"It conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/namespaces":{"get":{"operationId":"listNamespaces","tags":["namespaces"],"summary":"The namespaces the caller can reach.","security":[{"bearer":[]}],"responses":{"200":{"description":"The namespaces.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Namespace"}}}}},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}},"post":{"operationId":"createNamespace","tags":["namespaces"],"summary":"Makes a namespace: its own folder of the store, private unless asked.","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewNamespace"}}}},"responses":{"201":{"description":"The namespace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Namespace"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The caller may not do this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"It conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/namespaces/{namespace}":{"get":{"operationId":"getNamespace","tags":["namespaces"],"security":[{"bearer":[]},{}],"parameters":[{"schema":{"type":"string","description":"A namespace of your organization, such as `prod/app`, or `<org>:<namespace>` for a public namespace of another one. Encode `/` as `%2F`.","example":"prod%2Fapp"},"required":true,"description":"A namespace of your organization, such as `prod/app`, or `<org>:<namespace>` for a public namespace of another one. Encode `/` as `%2F`.","name":"namespace","in":"path"}],"responses":{"200":{"description":"The namespace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Namespace"}}}},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The caller may not do this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"It does not exist, or the caller cannot see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}},"patch":{"operationId":"updateNamespace","tags":["namespaces"],"summary":"Makes a namespace public or private.","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","description":"A namespace of your organization, such as `prod/app`, or `<org>:<namespace>` for a public namespace of another one. Encode `/` as `%2F`.","example":"prod%2Fapp"},"required":true,"description":"A namespace of your organization, such as `prod/app`, or `<org>:<namespace>` for a public namespace of another one. Encode `/` as `%2F`.","name":"namespace","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NamespaceUpdate"}}}},"responses":{"204":{"description":"Done."},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The caller may not do this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"It does not exist, or the caller cannot see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}},"delete":{"operationId":"deleteNamespace","tags":["namespaces"],"summary":"Deletes a namespace: its branches and history at once, and its files from the bucket soon after. It can't be undone.","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","description":"A namespace of your organization, such as `prod/app`, or `<org>:<namespace>` for a public namespace of another one. Encode `/` as `%2F`.","example":"prod%2Fapp"},"required":true,"description":"A namespace of your organization, such as `prod/app`, or `<org>:<namespace>` for a public namespace of another one. Encode `/` as `%2F`.","name":"namespace","in":"path"}],"responses":{"204":{"description":"Done."},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The caller may not do this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"It does not exist, or the caller cannot see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/namespaces/{namespace}/credentials":{"post":{"operationId":"createCredentials","tags":["namespaces"],"summary":"Short-lived S3 credentials that reach only this namespace's folder, so a daemon or CLI can use the store directly without a key for the whole bucket.","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","description":"A namespace of your organization, such as `prod/app`, or `<org>:<namespace>` for a public namespace of another one. Encode `/` as `%2F`.","example":"prod%2Fapp"},"required":true,"description":"A namespace of your organization, such as `prod/app`, or `<org>:<namespace>` for a public namespace of another one. Encode `/` as `%2F`.","name":"namespace","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialsRequest"}}}},"responses":{"200":{"description":"The credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreCredentials"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The caller may not do this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"It does not exist, or the caller cannot see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"501":{"description":"This server cannot do this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/namespaces/{namespace}/branches":{"get":{"operationId":"listBranches","tags":["branches"],"summary":"The branches, in name order.","security":[{"bearer":[]},{}],"parameters":[{"schema":{"type":"string","description":"A namespace of your organization, such as `prod/app`, or `<org>:<namespace>` for a public namespace of another one. Encode `/` as `%2F`.","example":"prod%2Fapp"},"required":true,"description":"A namespace of your organization, such as `prod/app`, or `<org>:<namespace>` for a public namespace of another one. Encode `/` as `%2F`.","name":"namespace","in":"path"},{"schema":{"type":["integer","null"],"description":"The most branches to return, at most 1000. 1000 by default."},"required":false,"description":"The most branches to return, at most 1000. 1000 by default.","name":"limit","in":"query"},{"schema":{"type":"string","maxLength":4096,"description":"The next page: the name of the last one of the page before."},"required":false,"description":"The next page: the name of the last one of the page before.","name":"after","in":"query"}],"responses":{"200":{"description":"The branches.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Branch"}}}}},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The caller may not do this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"It does not exist, or the caller cannot see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}},"post":{"operationId":"createBranch","tags":["branches"],"summary":"Forks a branch, or makes an empty one. A fork copies no data.","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","description":"A namespace of your organization, such as `prod/app`, or `<org>:<namespace>` for a public namespace of another one. Encode `/` as `%2F`.","example":"prod%2Fapp"},"required":true,"description":"A namespace of your organization, such as `prod/app`, or `<org>:<namespace>` for a public namespace of another one. Encode `/` as `%2F`.","name":"namespace","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewBranch"}}}},"responses":{"201":{"description":"The new branch's head.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Head"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The caller may not do this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"It does not exist, or the caller cannot see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"It conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/namespaces/{namespace}/branches/{branch}":{"get":{"operationId":"getBranch","tags":["branches"],"security":[{"bearer":[]},{}],"parameters":[{"schema":{"type":"string","description":"A namespace of your organization, such as `prod/app`, or `<org>:<namespace>` for a public namespace of another one. Encode `/` as `%2F`.","example":"prod%2Fapp"},"required":true,"description":"A namespace of your organization, such as `prod/app`, or `<org>:<namespace>` for a public namespace of another one. Encode `/` as `%2F`.","name":"namespace","in":"path"},{"schema":{"type":"string","description":"A branch, such as `main` or `agents/fix-1`. Encode `/` as `%2F`.","example":"main"},"required":true,"description":"A branch, such as `main` or `agents/fix-1`. Encode `/` as `%2F`.","name":"branch","in":"path"}],"responses":{"200":{"description":"The branch.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchInfo"}}}},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The caller may not do this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"It does not exist, or the caller cannot see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}},"patch":{"operationId":"updateBranch","tags":["branches"],"summary":"Protects a branch, or stops protecting it.","description":"Protecting answers once the API writes allowed before have ended; if they run for over two minutes it answers 503, and the branch stays protected. Store credentials minted before keep their access until they expire (900 seconds by default), so protection reaches them only then.","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","description":"A namespace of your organization, such as `prod/app`, or `<org>:<namespace>` for a public namespace of another one. Encode `/` as `%2F`.","example":"prod%2Fapp"},"required":true,"description":"A namespace of your organization, such as `prod/app`, or `<org>:<namespace>` for a public namespace of another one. Encode `/` as `%2F`.","name":"namespace","in":"path"},{"schema":{"type":"string","description":"A branch, such as `main` or `agents/fix-1`. Encode `/` as `%2F`.","example":"main"},"required":true,"description":"A branch, such as `main` or `agents/fix-1`. Encode `/` as `%2F`.","name":"branch","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchUpdate"}}}},"responses":{"204":{"description":"Done."},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The caller may not do this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"It does not exist, or the caller cannot see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"503":{"description":"It cannot be done now. Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}},"delete":{"operationId":"deleteBranch","tags":["branches"],"summary":"Deletes a branch. Its data stays until garbage collection.","description":"Fails with 409 if the branch moves while it is being deleted, as when a mount is saving to it.","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","description":"A namespace of your organization, such as `prod/app`, or `<org>:<namespace>` for a public namespace of another one. Encode `/` as `%2F`.","example":"prod%2Fapp"},"required":true,"description":"A namespace of your organization, such as `prod/app`, or `<org>:<namespace>` for a public namespace of another one. Encode `/` as `%2F`.","name":"namespace","in":"path"},{"schema":{"type":"string","description":"A branch, such as `main` or `agents/fix-1`. Encode `/` as `%2F`.","example":"main"},"required":true,"description":"A branch, such as `main` or `agents/fix-1`. Encode `/` as `%2F`.","name":"branch","in":"path"}],"responses":{"204":{"description":"Done."},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The caller may not do this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"It does not exist, or the caller cannot see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"It conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/namespaces/{namespace}/branches/{branch}/files":{"get":{"operationId":"listFiles","tags":["files"],"summary":"Describes a path. For a folder, also lists what it holds.","security":[{"bearer":[]},{}],"parameters":[{"schema":{"type":"string","description":"A namespace of your organization, such as `prod/app`, or `<org>:<namespace>` for a public namespace of another one. Encode `/` as `%2F`.","example":"prod%2Fapp"},"required":true,"description":"A namespace of your organization, such as `prod/app`, or `<org>:<namespace>` for a public namespace of another one. Encode `/` as `%2F`.","name":"namespace","in":"path"},{"schema":{"type":"string","description":"A branch, such as `main` or `agents/fix-1`. Encode `/` as `%2F`.","example":"main"},"required":true,"description":"A branch, such as `main` or `agents/fix-1`. Encode `/` as `%2F`.","name":"branch","in":"path"},{"schema":{"type":"string","maxLength":4096,"default":"","description":"Such as `src/main.rs`. The root by default."},"required":false,"description":"Such as `src/main.rs`. The root by default.","name":"path","in":"query"},{"schema":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"Read an older commit of the branch instead of its head."},"required":false,"description":"Read an older commit of the branch instead of its head.","name":"at","in":"query"},{"schema":{"type":["integer","null"],"description":"The most entries of a folder to return, at most 1000. 1000 by default."},"required":false,"description":"The most entries of a folder to return, at most 1000. 1000 by default.","name":"limit","in":"query"},{"schema":{"type":"string","maxLength":4096,"description":"The next page: the name of the last one of the page before."},"required":false,"description":"The next page: the name of the last one of the page before.","name":"after","in":"query"}],"responses":{"200":{"description":"The path.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Listing"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The caller may not do this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"It does not exist, or the caller cannot see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/namespaces/{namespace}/branches/{branch}/files/content":{"get":{"operationId":"readFile","tags":["files"],"summary":"Reads a file, or a byte range of it. Only the chunks in the range are fetched.","security":[{"bearer":[]},{}],"parameters":[{"schema":{"type":"string","description":"A namespace of your organization, such as `prod/app`, or `<org>:<namespace>` for a public namespace of another one. Encode `/` as `%2F`.","example":"prod%2Fapp"},"required":true,"description":"A namespace of your organization, such as `prod/app`, or `<org>:<namespace>` for a public namespace of another one. Encode `/` as `%2F`.","name":"namespace","in":"path"},{"schema":{"type":"string","description":"A branch, such as `main` or `agents/fix-1`. Encode `/` as `%2F`.","example":"main"},"required":true,"description":"A branch, such as `main` or `agents/fix-1`. Encode `/` as `%2F`.","name":"branch","in":"path"},{"schema":{"type":"string","maxLength":4096},"required":true,"name":"path","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"default":0,"description":"The first byte to read."},"required":false,"description":"The first byte to read.","name":"offset","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"description":"The most bytes to read. The rest by default."},"required":false,"description":"The most bytes to read. The rest by default.","name":"length","in":"query"},{"schema":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"Read an older commit of the branch instead of its head."},"required":false,"description":"Read an older commit of the branch instead of its head.","name":"at","in":"query"}],"responses":{"200":{"description":"The bytes.","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The caller may not do this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"It does not exist, or the caller cannot see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/namespaces/{namespace}/branches/{branch}/search":{"get":{"operationId":"searchFiles","tags":["files"],"summary":"Finds lines that match a regular expression, like `grep -rn`. Skips binary files and files over 1 MiB.","description":"On a branch whose namespace has a linked index, only the files that hold every trigram the pattern needs are read, and files changed since the index last caught up are read too, so a search over a huge tree takes about as long as one over the files that can match. Such a search covers the files the link indexes; the `skywake-searched` header says `index` or `scan`.","security":[{"bearer":[]},{}],"parameters":[{"schema":{"type":"string","description":"A namespace of your organization, such as `prod/app`, or `<org>:<namespace>` for a public namespace of another one. Encode `/` as `%2F`.","example":"prod%2Fapp"},"required":true,"description":"A namespace of your organization, such as `prod/app`, or `<org>:<namespace>` for a public namespace of another one. Encode `/` as `%2F`.","name":"namespace","in":"path"},{"schema":{"type":"string","description":"A branch, such as `main` or `agents/fix-1`. Encode `/` as `%2F`.","example":"main"},"required":true,"description":"A branch, such as `main` or `agents/fix-1`. Encode `/` as `%2F`.","name":"branch","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":1000},"required":true,"name":"pattern","in":"query"},{"schema":{"type":"string","maxLength":4096,"default":"","description":"Search only under this folder."},"required":false,"description":"Search only under this folder.","name":"path","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":1000,"description":"Search only paths this glob matches. Without `/` it matches a name at any depth.","example":"*.ts"},"required":false,"description":"Search only paths this glob matches. Without `/` it matches a name at any depth.","name":"glob","in":"query"},{"schema":{"type":"string","enum":["true","false"],"description":"Match letters of either case. False by default."},"required":false,"description":"Match letters of either case. False by default.","name":"ignoreCase","in":"query"},{"schema":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"Read an older commit of the branch instead of its head."},"required":false,"description":"Read an older commit of the branch instead of its head.","name":"at","in":"query"},{"schema":{"type":["integer","null"],"description":"The most matches to return. 100 by default."},"required":false,"description":"The most matches to return. 100 by default.","name":"limit","in":"query"}],"responses":{"200":{"description":"The matches.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Match"}}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The caller may not do this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"It does not exist, or the caller cannot see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/namespaces/{namespace}/branches/{branch}/find":{"get":{"operationId":"findFiles","tags":["files"],"summary":"Finds paths by name or glob, like `find` or `fd`, without reading any file.","description":"A glob without `/` matches a name at any depth (`*.ts`); with one it matches the whole path (`src/**/*.test.ts`). `*` and `?` stay within one folder, `**` crosses any number.","security":[{"bearer":[]},{}],"parameters":[{"schema":{"type":"string","description":"A namespace of your organization, such as `prod/app`, or `<org>:<namespace>` for a public namespace of another one. Encode `/` as `%2F`.","example":"prod%2Fapp"},"required":true,"description":"A namespace of your organization, such as `prod/app`, or `<org>:<namespace>` for a public namespace of another one. Encode `/` as `%2F`.","name":"namespace","in":"path"},{"schema":{"type":"string","description":"A branch, such as `main` or `agents/fix-1`. Encode `/` as `%2F`.","example":"main"},"required":true,"description":"A branch, such as `main` or `agents/fix-1`. Encode `/` as `%2F`.","name":"branch","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":1000,"example":"**/*.md"},"required":true,"name":"glob","in":"query"},{"schema":{"type":"string","maxLength":4096,"default":"","description":"Find only under this folder."},"required":false,"description":"Find only under this folder.","name":"path","in":"query"},{"schema":{"type":"string","enum":["any","files","folders"],"description":"`files` (with symlinks), `folders`, or `any` by default."},"required":false,"description":"`files` (with symlinks), `folders`, or `any` by default.","name":"kind","in":"query"},{"schema":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"Read an older commit of the branch instead of its head."},"required":false,"description":"Read an older commit of the branch instead of its head.","name":"at","in":"query"},{"schema":{"type":["integer","null"],"description":"The most paths to return. 1,000 by default, at most 100,000."},"required":false,"description":"The most paths to return. 1,000 by default, at most 100,000.","name":"limit","in":"query"}],"responses":{"200":{"description":"The paths, in name order.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FoundPath"}}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The caller may not do this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"It does not exist, or the caller cannot see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/namespaces/{namespace}/branches/{branch}/commits":{"post":{"operationId":"commitFiles","tags":["files"],"summary":"Writes and deletes files, as one commit. All changes land, or none. Changes that match what is already there are skipped.","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","description":"A namespace of your organization, such as `prod/app`, or `<org>:<namespace>` for a public namespace of another one. Encode `/` as `%2F`.","example":"prod%2Fapp"},"required":true,"description":"A namespace of your organization, such as `prod/app`, or `<org>:<namespace>` for a public namespace of another one. Encode `/` as `%2F`.","name":"namespace","in":"path"},{"schema":{"type":"string","description":"A branch, such as `main` or `agents/fix-1`. Encode `/` as `%2F`.","example":"main"},"required":true,"description":"A branch, such as `main` or `agents/fix-1`. Encode `/` as `%2F`.","name":"branch","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewCommit"}}}},"responses":{"200":{"description":"Nothing changed, so no commit was made.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Committed"}}}},"201":{"description":"The commit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Committed"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The caller may not do this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"It does not exist, or the caller cannot see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"It conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}},"get":{"operationId":"listCommits","tags":["history"],"summary":"Commits on the branch, newest first.","security":[{"bearer":[]},{}],"parameters":[{"schema":{"type":"string","description":"A namespace of your organization, such as `prod/app`, or `<org>:<namespace>` for a public namespace of another one. Encode `/` as `%2F`.","example":"prod%2Fapp"},"required":true,"description":"A namespace of your organization, such as `prod/app`, or `<org>:<namespace>` for a public namespace of another one. Encode `/` as `%2F`.","name":"namespace","in":"path"},{"schema":{"type":"string","description":"A branch, such as `main` or `agents/fix-1`. Encode `/` as `%2F`.","example":"main"},"required":true,"description":"A branch, such as `main` or `agents/fix-1`. Encode `/` as `%2F`.","name":"branch","in":"path"},{"schema":{"type":["integer","null"],"description":"The most commits to return. 50 by default."},"required":false,"description":"The most commits to return. 50 by default.","name":"limit","in":"query"}],"responses":{"200":{"description":"The commits.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CommitInfo"}}}}},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The caller may not do this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"It does not exist, or the caller cannot see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/namespaces/{namespace}/uploads":{"post":{"operationId":"uploadPart","tags":["files"],"summary":"Uploads up to 16 MiB of a large file. Uploading the same bytes again is harmless, so a part can be retried. A commit's `parts` joins parts into a file within 7 days.","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","description":"A namespace of your organization, such as `prod/app`, or `<org>:<namespace>` for a public namespace of another one. Encode `/` as `%2F`.","example":"prod%2Fapp"},"required":true,"description":"A namespace of your organization, such as `prod/app`, or `<org>:<namespace>` for a public namespace of another one. Encode `/` as `%2F`.","name":"namespace","in":"path"}],"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"responses":{"201":{"description":"The part.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadedPart"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The caller may not do this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"It does not exist, or the caller cannot see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"413":{"description":"The part is over 16 MiB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/namespaces/{namespace}/branches/{branch}/changes":{"get":{"operationId":"listChanges","tags":["history"],"summary":"What each commit since `since` changed, oldest first. Poll it with the last hash seen.","security":[{"bearer":[]},{}],"parameters":[{"schema":{"type":"string","description":"A namespace of your organization, such as `prod/app`, or `<org>:<namespace>` for a public namespace of another one. Encode `/` as `%2F`.","example":"prod%2Fapp"},"required":true,"description":"A namespace of your organization, such as `prod/app`, or `<org>:<namespace>` for a public namespace of another one. Encode `/` as `%2F`.","name":"namespace","in":"path"},{"schema":{"type":"string","description":"A branch, such as `main` or `agents/fix-1`. Encode `/` as `%2F`.","example":"main"},"required":true,"description":"A branch, such as `main` or `agents/fix-1`. Encode `/` as `%2F`.","name":"branch","in":"path"},{"schema":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"The last commit seen. Without it, the newest commits."},"required":false,"description":"The last commit seen. Without it, the newest commits.","name":"since","in":"query"},{"schema":{"type":["integer","null"],"description":"The most commits to return. 50 by default."},"required":false,"description":"The most commits to return. 50 by default.","name":"limit","in":"query"}],"responses":{"200":{"description":"The commits and their changes.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FeedItem"}}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The caller may not do this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"It does not exist, or the caller cannot see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/namespaces/{namespace}/branches/{branch}/files/history":{"get":{"operationId":"fileHistory","tags":["history"],"summary":"The versions of one file, newest first. Read one with `files/content?at=<hash>`.","security":[{"bearer":[]},{}],"parameters":[{"schema":{"type":"string","description":"A namespace of your organization, such as `prod/app`, or `<org>:<namespace>` for a public namespace of another one. Encode `/` as `%2F`.","example":"prod%2Fapp"},"required":true,"description":"A namespace of your organization, such as `prod/app`, or `<org>:<namespace>` for a public namespace of another one. Encode `/` as `%2F`.","name":"namespace","in":"path"},{"schema":{"type":"string","description":"A branch, such as `main` or `agents/fix-1`. Encode `/` as `%2F`.","example":"main"},"required":true,"description":"A branch, such as `main` or `agents/fix-1`. Encode `/` as `%2F`.","name":"branch","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":4096},"required":true,"name":"path","in":"query"},{"schema":{"type":["integer","null"],"description":"The most versions to return, at most 1000. 1000 by default."},"required":false,"description":"The most versions to return, at most 1000. 1000 by default.","name":"limit","in":"query"},{"schema":{"type":"string","maxLength":4096,"description":"The next page: the hash of the last one of the page before."},"required":false,"description":"The next page: the hash of the last one of the page before.","name":"after","in":"query"}],"responses":{"200":{"description":"The versions.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FileVersion"}}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The caller may not do this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"It does not exist, or the caller cannot see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/namespaces/{namespace}/branches/{branch}/diff":{"get":{"operationId":"diffBranches","tags":["history"],"summary":"What changed from the branch `from` to this one, in path order.","security":[{"bearer":[]},{}],"parameters":[{"schema":{"type":"string","description":"A namespace of your organization, such as `prod/app`, or `<org>:<namespace>` for a public namespace of another one. Encode `/` as `%2F`.","example":"prod%2Fapp"},"required":true,"description":"A namespace of your organization, such as `prod/app`, or `<org>:<namespace>` for a public namespace of another one. Encode `/` as `%2F`.","name":"namespace","in":"path"},{"schema":{"type":"string","description":"A branch, such as `main` or `agents/fix-1`. Encode `/` as `%2F`.","example":"main"},"required":true,"description":"A branch, such as `main` or `agents/fix-1`. Encode `/` as `%2F`.","name":"branch","in":"path"},{"schema":{"type":"string","maxLength":200,"pattern":"^[A-Za-z0-9_-][A-Za-z0-9._-]*(\\/[A-Za-z0-9_-][A-Za-z0-9._-]*)*$"},"required":true,"name":"from","in":"query"},{"schema":{"type":"string","enum":["head","base"],"default":"head","description":"`head` compares with `from` as it is now. `base` compares with the newest commit both branches share, so only what this branch changed shows, as in `git diff from...branch`."},"required":false,"description":"`head` compares with `from` as it is now. `base` compares with the newest commit both branches share, so only what this branch changed shows, as in `git diff from...branch`.","name":"against","in":"query"},{"schema":{"type":["integer","null"],"description":"The most changes to return, at most 1000. 1000 by default."},"required":false,"description":"The most changes to return, at most 1000. 1000 by default.","name":"limit","in":"query"},{"schema":{"type":"string","maxLength":4096,"description":"The next page: the path of the last one of the page before."},"required":false,"description":"The next page: the path of the last one of the page before.","name":"after","in":"query"}],"responses":{"200":{"description":"The changes.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Changed"}}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The caller may not do this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"It does not exist, or the caller cannot see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/namespaces/{namespace}/merges":{"post":{"operationId":"mergeBranches","tags":["history"],"summary":"Merges one branch into another. Merges into the same branch run one at a time.","description":"A merge with conflicts saves nothing and answers 409 with the paths. To finish it, send the merge again with `resolve` covering them.","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","description":"A namespace of your organization, such as `prod/app`, or `<org>:<namespace>` for a public namespace of another one. Encode `/` as `%2F`.","example":"prod%2Fapp"},"required":true,"description":"A namespace of your organization, such as `prod/app`, or `<org>:<namespace>` for a public namespace of another one. Encode `/` as `%2F`.","name":"namespace","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewMerge"}}}},"responses":{"200":{"description":"The merge landed, or the dry run's conflicts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MergeResult"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The caller may not do this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"It does not exist, or the caller cannot see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"The merge conflicts. Nothing was saved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MergeConflict"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/namespaces/{namespace}/branches/{branch}/revert":{"post":{"operationId":"revertCommit","tags":["history"],"summary":"Undoes one commit with a new commit that puts back what it changed.","description":"The commit's paths return to how they were in its parent; for a merge, its first parent. If the branch changed any of those paths since, nothing is saved and the answer is 409.","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","description":"A namespace of your organization, such as `prod/app`, or `<org>:<namespace>` for a public namespace of another one. Encode `/` as `%2F`.","example":"prod%2Fapp"},"required":true,"description":"A namespace of your organization, such as `prod/app`, or `<org>:<namespace>` for a public namespace of another one. Encode `/` as `%2F`.","name":"namespace","in":"path"},{"schema":{"type":"string","description":"A branch, such as `main` or `agents/fix-1`. Encode `/` as `%2F`.","example":"main"},"required":true,"description":"A branch, such as `main` or `agents/fix-1`. Encode `/` as `%2F`.","name":"branch","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewRevert"}}}},"responses":{"200":{"description":"The commit changed nothing, so no commit was made.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Committed"}}}},"201":{"description":"The new commit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Committed"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The caller may not do this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"It does not exist, or the caller cannot see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"The branch changed the same paths since. Nothing was saved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevertConflict"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/namespaces/{namespace}/branches/{branch}/reset":{"post":{"operationId":"resetBranch","tags":["history"],"summary":"Makes the branch's files what they were at a commit, as one new commit.","description":"The history stays: the new commit is on top of the head. The commit may be from any branch of the namespace.","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","description":"A namespace of your organization, such as `prod/app`, or `<org>:<namespace>` for a public namespace of another one. Encode `/` as `%2F`.","example":"prod%2Fapp"},"required":true,"description":"A namespace of your organization, such as `prod/app`, or `<org>:<namespace>` for a public namespace of another one. Encode `/` as `%2F`.","name":"namespace","in":"path"},{"schema":{"type":"string","description":"A branch, such as `main` or `agents/fix-1`. Encode `/` as `%2F`.","example":"main"},"required":true,"description":"A branch, such as `main` or `agents/fix-1`. Encode `/` as `%2F`.","name":"branch","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewReset"}}}},"responses":{"200":{"description":"The files already match, so no commit was made.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Committed"}}}},"201":{"description":"The new commit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Committed"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"A valid API key or token is needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The caller may not do this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"It does not exist, or the caller cannot see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"It conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many requests. Wait for `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}}},"webhooks":{}}