Skip to content

Commit 05e802d

Browse files
chore(api): update composite API spec
1 parent 3817b57 commit 05e802d

4 files changed

Lines changed: 83 additions & 6 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 2400
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare/cloudflare-dc45d49df27d76c4dac5f9050d933875dfd3c15e0c410ca91343d425d2ad7aeb.yml
3-
openapi_spec_hash: 5fd14ff0d2fe35b4cbc5b423d12e4f0b
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare/cloudflare-7deeb9a4fdf922c923fc5b0148e7ca74ee56b8e9845a654d1f7f98de0b942c12.yml
3+
openapi_spec_hash: fdb8c462be6b2a6354e8d4f9e2340110
44
config_hash: 2f529580a17438fc62cd0b47db41b6f1

src/cloudflare/resources/intel/domains/bulks.py

Lines changed: 60 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ def get(
4949
*,
5050
account_id: str,
5151
domain: SequenceNotStr[str] | Omit = omit,
52+
include_ranking: bool | Omit = omit,
53+
skip_ranking: bool | Omit = omit,
5254
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5355
# The extra values given here take precedence over values defined on the client or passed to this method.
5456
extra_headers: Headers | None = None,
@@ -57,13 +59,32 @@ def get(
5759
timeout: float | httpx.Timeout | None | NotGiven = not_given,
5860
) -> Optional[BulkGetResponse]:
5961
"""
60-
Same as summary.
62+
Returns security details and statistics about multiple domains in a single
63+
request.
64+
65+
**Behavior change — domain ranking is becoming opt-in.** This endpoint
66+
previously included domain ranking data in every response and accepted a
67+
`skip_ranking=true` query parameter to opt out. That parameter is being
68+
deprecated and ranking will no longer be returned by default. Callers that want
69+
ranking data must pass `include_ranking=true`. The `skip_ranking` parameter will
70+
be silently ignored once the change ships.
6171
6272
Args:
6373
account_id: Identifier.
6474
6575
domain: Accepts multiple values like `?domain=cloudflare.com&domain=example.com`.
6676
77+
include_ranking: Whether to include domain ranking data in the response. Defaults to `false` —
78+
ranking lookups are expensive at bulk scale and most callers do not need them.
79+
Set to `true` to opt in. This parameter replaces the deprecated `skip_ranking`
80+
(see below).
81+
82+
skip_ranking: **Deprecated.** Previously controlled whether the ranking lookup was skipped
83+
(defaulted to `false`, meaning ranking ran). The endpoint's default behavior is
84+
being flipped — ranking is now opt-in via `include_ranking=true` — and this
85+
parameter will be silently ignored. Remove it from your callers and use
86+
`include_ranking` instead.
87+
6788
extra_headers: Send extra headers
6889
6990
extra_query: Add additional query parameters to the request
@@ -81,7 +102,14 @@ def get(
81102
extra_query=extra_query,
82103
extra_body=extra_body,
83104
timeout=timeout,
84-
query=maybe_transform({"domain": domain}, bulk_get_params.BulkGetParams),
105+
query=maybe_transform(
106+
{
107+
"domain": domain,
108+
"include_ranking": include_ranking,
109+
"skip_ranking": skip_ranking,
110+
},
111+
bulk_get_params.BulkGetParams,
112+
),
85113
post_parser=ResultWrapper[Optional[BulkGetResponse]]._unwrapper,
86114
),
87115
cast_to=cast(Type[Optional[BulkGetResponse]], ResultWrapper[BulkGetResponse]),
@@ -113,6 +141,8 @@ async def get(
113141
*,
114142
account_id: str,
115143
domain: SequenceNotStr[str] | Omit = omit,
144+
include_ranking: bool | Omit = omit,
145+
skip_ranking: bool | Omit = omit,
116146
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
117147
# The extra values given here take precedence over values defined on the client or passed to this method.
118148
extra_headers: Headers | None = None,
@@ -121,13 +151,32 @@ async def get(
121151
timeout: float | httpx.Timeout | None | NotGiven = not_given,
122152
) -> Optional[BulkGetResponse]:
123153
"""
124-
Same as summary.
154+
Returns security details and statistics about multiple domains in a single
155+
request.
156+
157+
**Behavior change — domain ranking is becoming opt-in.** This endpoint
158+
previously included domain ranking data in every response and accepted a
159+
`skip_ranking=true` query parameter to opt out. That parameter is being
160+
deprecated and ranking will no longer be returned by default. Callers that want
161+
ranking data must pass `include_ranking=true`. The `skip_ranking` parameter will
162+
be silently ignored once the change ships.
125163
126164
Args:
127165
account_id: Identifier.
128166
129167
domain: Accepts multiple values like `?domain=cloudflare.com&domain=example.com`.
130168
169+
include_ranking: Whether to include domain ranking data in the response. Defaults to `false` —
170+
ranking lookups are expensive at bulk scale and most callers do not need them.
171+
Set to `true` to opt in. This parameter replaces the deprecated `skip_ranking`
172+
(see below).
173+
174+
skip_ranking: **Deprecated.** Previously controlled whether the ranking lookup was skipped
175+
(defaulted to `false`, meaning ranking ran). The endpoint's default behavior is
176+
being flipped — ranking is now opt-in via `include_ranking=true` — and this
177+
parameter will be silently ignored. Remove it from your callers and use
178+
`include_ranking` instead.
179+
131180
extra_headers: Send extra headers
132181
133182
extra_query: Add additional query parameters to the request
@@ -145,7 +194,14 @@ async def get(
145194
extra_query=extra_query,
146195
extra_body=extra_body,
147196
timeout=timeout,
148-
query=await async_maybe_transform({"domain": domain}, bulk_get_params.BulkGetParams),
197+
query=await async_maybe_transform(
198+
{
199+
"domain": domain,
200+
"include_ranking": include_ranking,
201+
"skip_ranking": skip_ranking,
202+
},
203+
bulk_get_params.BulkGetParams,
204+
),
149205
post_parser=ResultWrapper[Optional[BulkGetResponse]]._unwrapper,
150206
),
151207
cast_to=cast(Type[Optional[BulkGetResponse]], ResultWrapper[BulkGetResponse]),

src/cloudflare/types/intel/domains/bulk_get_params.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,20 @@ class BulkGetParams(TypedDict, total=False):
1515

1616
domain: SequenceNotStr[str]
1717
"""Accepts multiple values like `?domain=cloudflare.com&domain=example.com`."""
18+
19+
include_ranking: bool
20+
"""Whether to include domain ranking data in the response.
21+
22+
Defaults to `false` — ranking lookups are expensive at bulk scale and most
23+
callers do not need them. Set to `true` to opt in. This parameter replaces the
24+
deprecated `skip_ranking` (see below).
25+
"""
26+
27+
skip_ranking: bool
28+
"""
29+
**Deprecated.** Previously controlled whether the ranking lookup was skipped
30+
(defaulted to `false`, meaning ranking ran). The endpoint's default behavior is
31+
being flipped — ranking is now opt-in via `include_ranking=true` — and this
32+
parameter will be silently ignored. Remove it from your callers and use
33+
`include_ranking` instead.
34+
"""

tests/api_resources/intel/domains/test_bulks.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None:
2929
bulk = client.intel.domains.bulks.get(
3030
account_id="023e105f4ecef8ad9ca31a8372d0c353",
3131
domain=["string"],
32+
include_ranking=True,
33+
skip_ranking=True,
3234
)
3335
assert_matches_type(Optional[BulkGetResponse], bulk, path=["response"])
3436

@@ -81,6 +83,8 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -
8183
bulk = await async_client.intel.domains.bulks.get(
8284
account_id="023e105f4ecef8ad9ca31a8372d0c353",
8385
domain=["string"],
86+
include_ranking=True,
87+
skip_ranking=True,
8488
)
8589
assert_matches_type(Optional[BulkGetResponse], bulk, path=["response"])
8690

0 commit comments

Comments
 (0)