Skip to content

Commit e27f37d

Browse files
feat: Document name uniqueness and query match semantics
1 parent 1d38266 commit e27f37d

20 files changed

Lines changed: 83 additions & 33 deletions

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 127
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel/kernel-bc33d13e669972493e9ab0da82a71999822dc049eb14b113f446753c917ffcdb.yml
3-
openapi_spec_hash: 133a2e0d0cdc4023f98b3c2e589cf5d8
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel/kernel-6c7cbaefd8a84ec26a1677681f37041323290080dac3fd1a409bb7cd01dd2ae3.yml
3+
openapi_spec_hash: 75085a25c8a5cdb5417f0dbfad0ed6b6
44
config_hash: 77ee715aa17061166f9a02b264a21b8d

src/kernel/resources/api_keys.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def create(
7171
Create a new API key within the authenticated organization.
7272
7373
Args:
74-
name: API key name (1-255 characters)
74+
name: Label for the API key (1-255 characters). API keys are not addressable by name.
7575
7676
days_to_expire: Number of days until expiry, up to 3650. Use null for never.
7777
@@ -382,7 +382,7 @@ async def create(
382382
Create a new API key within the authenticated organization.
383383
384384
Args:
385-
name: API key name (1-255 characters)
385+
name: Label for the API key (1-255 characters). API keys are not addressable by name.
386386
387387
days_to_expire: Number of days until expiry, up to 3650. Use null for never.
388388

src/kernel/resources/auth/connections.py

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,9 @@ def create(
140140
login_url: Optional login page URL to skip discovery
141141
142142
proxy: Proxy selection. Provide either id or name. The proxy must be in the same
143-
project as the resource referencing it.
143+
project as the resource referencing it. When selecting by name, the name must
144+
match exactly one active proxy in the project. Ambiguous names return a 400; use
145+
id for stable references.
144146
145147
record_session: Whether to record browser sessions for this connection by default. Useful for
146148
debugging. Can be overridden per-login. Defaults to false.
@@ -268,7 +270,9 @@ def update(
268270
login_url: Login page URL. Set to empty string to clear.
269271
270272
proxy: Proxy selection. Provide either id or name. The proxy must be in the same
271-
project as the resource referencing it.
273+
project as the resource referencing it. When selecting by name, the name must
274+
match exactly one active proxy in the project. Ambiguous names return a 400; use
275+
id for stable references.
272276
273277
record_session: Whether to record browser sessions for this connection by default
274278
@@ -465,7 +469,9 @@ def login(
465469
466470
Args:
467471
proxy: Proxy selection. Provide either id or name. The proxy must be in the same
468-
project as the resource referencing it.
472+
project as the resource referencing it. When selecting by name, the name must
473+
match exactly one active proxy in the project. Ambiguous names return a 400; use
474+
id for stable references.
469475
470476
record_session: Override the connection's default for recording this login's browser session.
471477
When omitted, the connection's record_session default is used.
@@ -717,7 +723,9 @@ async def create(
717723
login_url: Optional login page URL to skip discovery
718724
719725
proxy: Proxy selection. Provide either id or name. The proxy must be in the same
720-
project as the resource referencing it.
726+
project as the resource referencing it. When selecting by name, the name must
727+
match exactly one active proxy in the project. Ambiguous names return a 400; use
728+
id for stable references.
721729
722730
record_session: Whether to record browser sessions for this connection by default. Useful for
723731
debugging. Can be overridden per-login. Defaults to false.
@@ -845,7 +853,9 @@ async def update(
845853
login_url: Login page URL. Set to empty string to clear.
846854
847855
proxy: Proxy selection. Provide either id or name. The proxy must be in the same
848-
project as the resource referencing it.
856+
project as the resource referencing it. When selecting by name, the name must
857+
match exactly one active proxy in the project. Ambiguous names return a 400; use
858+
id for stable references.
849859
850860
record_session: Whether to record browser sessions for this connection by default
851861
@@ -1042,7 +1052,9 @@ async def login(
10421052
10431053
Args:
10441054
proxy: Proxy selection. Provide either id or name. The proxy must be in the same
1045-
project as the resource referencing it.
1055+
project as the resource referencing it. When selecting by name, the name must
1056+
match exactly one active proxy in the project. Ambiguous names return a 400; use
1057+
id for stable references.
10461058
10471059
record_session: Override the connection's default for recording this login's browser session.
10481060
When omitted, the connection's record_session default is used.

src/kernel/resources/browser_pools.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,8 @@ def list(
378378
379379
offset: Offset the number of browser pools to return.
380380
381-
query: Search browser pools by name or ID.
381+
query: Case-insensitive substring match against browser pool name. IDs match by exact
382+
value.
382383
383384
extra_headers: Send extra headers
384385
@@ -945,7 +946,8 @@ def list(
945946
946947
offset: Offset the number of browser pools to return.
947948
948-
query: Search browser pools by name or ID.
949+
query: Case-insensitive substring match against browser pool name. IDs match by exact
950+
value.
949951
950952
extra_headers: Send extra headers
951953

src/kernel/resources/credential_providers.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,8 @@ def list(
216216
217217
offset: Offset the number of credential providers to return.
218218
219-
query: Search credential providers by name or ID.
219+
query: Case-insensitive substring match against credential provider name. IDs match by
220+
exact value.
220221
221222
extra_headers: Send extra headers
222223
@@ -534,7 +535,8 @@ def list(
534535
535536
offset: Offset the number of credential providers to return.
536537
537-
query: Search credential providers by name or ID.
538+
query: Case-insensitive substring match against credential provider name. IDs match by
539+
exact value.
538540
539541
extra_headers: Send extra headers
540542

src/kernel/resources/credentials.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,8 @@ def list(
229229
230230
offset: Number of results to skip
231231
232-
query: Search credentials by name, domain, or ID.
232+
query: Case-insensitive substring match against credential name or domain. IDs match by
233+
exact value.
233234
234235
extra_headers: Send extra headers
235236
@@ -534,7 +535,8 @@ def list(
534535
535536
offset: Number of results to skip
536537
537-
query: Search credentials by name, domain, or ID.
538+
query: Case-insensitive substring match against credential name or domain. IDs match by
539+
exact value.
538540
539541
extra_headers: Send extra headers
540542

src/kernel/resources/extensions.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ def list(
7979
8080
offset: Offset the number of extensions to return.
8181
82-
query: Search extensions by name or ID.
82+
query: Case-insensitive substring match against extension name. IDs match by exact
83+
value.
8384
8485
extra_headers: Send extra headers
8586
@@ -355,7 +356,8 @@ def list(
355356
356357
offset: Offset the number of extensions to return.
357358
358-
query: Search extensions by name or ID.
359+
query: Case-insensitive substring match against extension name. IDs match by exact
360+
value.
359361
360362
extra_headers: Send extra headers
361363

src/kernel/resources/profiles.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def list(
189189
190190
offset: Offset the number of profiles to return.
191191
192-
query: Search profiles by name or ID.
192+
query: Case-insensitive substring match against profile name or ID.
193193
194194
extra_headers: Send extra headers
195195
@@ -447,7 +447,7 @@ def list(
447447
448448
offset: Offset the number of profiles to return.
449449
450-
query: Search profiles by name or ID.
450+
query: Case-insensitive substring match against profile name or ID.
451451
452452
extra_headers: Send extra headers
453453

src/kernel/resources/proxies.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,8 @@ def list(
202202
203203
offset: Offset the number of proxies to return.
204204
205-
query: Search proxies by name, host, IP address, or ID.
205+
query: Case-insensitive substring match against proxy name, host, or IP address. IDs
206+
match by exact value.
206207
207208
extra_headers: Send extra headers
208209
@@ -496,7 +497,8 @@ def list(
496497
497498
offset: Offset the number of proxies to return.
498499
499-
query: Search proxies by name, host, IP address, or ID.
500+
query: Case-insensitive substring match against proxy name, host, or IP address. IDs
501+
match by exact value.
500502
501503
extra_headers: Send extra headers
502504

src/kernel/types/api_key.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,11 @@ class APIKey(BaseModel):
4141
"""Masked version of the API key"""
4242

4343
name: str
44-
"""API key name"""
44+
"""Label for the API key.
45+
46+
API keys are not addressable by name; use the ID or key identifier for stable
47+
references.
48+
"""
4549

4650
project_id: Optional[str] = None
4751
"""Project identifier for project-scoped API keys. Null means org-wide."""

0 commit comments

Comments
 (0)