def get(slug, timeout: nil)def get: (String slug, ?timeout: seconds?) -> product_resourceReads a single product. Resolution is not a fallback chain: a value shaped like a UUID is looked up as an id only, anything else as a slug only, so a slug that happens to look like a UUID cannot be fetched this way.
A private product the key owner holds no grant on answers a not-found error instead of a permission error, which means a 404 here does not tell you whether the product exists. The response includes locked, computed against the workspace plan, and that is the flag the write methods refuse on.
Example
require "envless/sdk"
product = Envless.products.get("billing")
puts "beyond the plan allowance, read only" if product[:locked]Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
slug | String | Yes | Product slug, or the product uniqueId when the value is UUID shaped. |
timeout: | Integer | Float | Rational | No | Seconds each attempt of this call may take, redirects and the response body included, before it raises Envless::NetworkError with timeout? set. Overrides the client's timeout for this call, and 0 turns the limit off. |
Returns
product_resource with slug, isPrivate, locked and timestamps.
Worth knowing
updatedAtisnilon a product that has never been patched.- Icons are upload-only from the dashboard, so
iconisnilfor anything created through the API.
Required scopes
products:read
Underlying endpoint
GET /products/{slug}
Request and response schema, every error code, and a live playground.
In TypeScript
envless.products.get()
The same method in @goenvless/sdk, with the same request, retries and errors.