Skip to content

Commit 63769e8

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent e627871 commit 63769e8

File tree

2 files changed

+26
-26
lines changed

2 files changed

+26
-26
lines changed

cl/api/templates/rest-docs-v3.html

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
{% load static %}
33
{% load extras %}
44

5-
{% comment %}
5+
{% comment %}
66
╔═════════════════════════════════════════════════════════════════════════╗
7-
║ ATTENTION! ║
8-
║ This template has a new version behind the use_new_design waffle flag. ║
9-
║ ║
10-
║ When modifying this template, please also update the new version at: ║
11-
║ cl/simple_pages/templates/v2_help/rest-docs-vlatest.html ║
12-
║ ║
13-
║ Once the new design is fully implemented, all legacy templates ║
14-
║ (including this one) and the waffle flag will be removed. ║
15-
╚═════════════════════════════════════════════════════════════════════════╝
7+
║ ATTENTION! ║
8+
║ This template has a new version behind the use_new_design waffle flag. ║
9+
║ ║
10+
║ When modifying this template, please also update the new version at: ║
11+
║ cl/simple_pages/templates/v2_help/rest-docs-vlatest.html ║
12+
║ ║
13+
║ Once the new design is fully implemented, all legacy templates ║
14+
║ (including this one) and the waffle flag will be removed. ║
15+
╚═════════════════════════════════════════════════════════════════════════╝
1616
{% endcomment %}
1717

1818
{% block title %}[Deprecated] REST API, v3.15 – CourtListener.com{% endblock %}

cl/api/templates/v2_rest-docs-vlatest.html

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ <h1>REST API &ndash; v4</h1>
6262
<p>Note that when you press the button in your browser, you get an HTML result, but when you run <code>curl</code> you get a JSON object. This is <a class="underline" href="#formats">discussed in more depth below</a>.</p>
6363
<div class="alert-warning alert">
6464
<strong >Listen Up!</strong> Something else that's curious just happened. You didn't authenticate to the API. To encourage experimentation, many of our APIs are open by default. The biggest gotcha people have is that they forget to enable authentication before deploying their code. Don't make this mistake! Remember to add <a href="#authentication" class="underline">authentication</a>.
65-
</div>
65+
</div>
6666
<p>The APIs listed in this response can be used to make queries against our database or search engine.</p>
6767
<p>To learn more about an API, you can send an <a class="underline" href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/OPTIONS">HTTP OPTIONS</a> request, like so:</p>
6868
<c-code disable_copy>curl -X OPTIONS "{% get_full_host %}{% url "api-root" version="v4" %}"</c-code>
@@ -98,7 +98,7 @@ <h3>Permissions</h3>
9898
<p>Some of our APIs are only available to select users. If you need greater access to these APIs, <a class="underline" href="{% url "contact" %}">please get in touch</a>.</p>
9999
<p>All other endpoints are available according to the <a class="underline" href="#rates">throttling</a> and <a class="underline" href="#authentication">authentication</a> limitations listed below.</p>
100100
</c-layout-with-navigation.section>
101-
101+
102102
<div class="p-6 border rounded-lg banner w-full">
103103
<h4>Your Authorization Token</h4>
104104
{% if user.is_authenticated %}
@@ -112,9 +112,9 @@ <h4>Your Authorization Token</h4>
112112
</div>
113113

114114
<c-layout-with-navigation.section id="authentication">
115-
115+
116116
<h3>Authentication</h3>
117-
117+
118118
<p>Authentication is necessary to monitor and throttle the system, and so we can assist with any errors that may occur.</p>
119119
<p>Per our <a class="underline" href="{% url "terms" %}#privacy">privacy policy</a>, we do not track your queries in the API, though we do collect statistical information for system monitoring.</p>
120120
<p>There are currently three types of authentication available on the API:</p>
@@ -249,7 +249,7 @@ <h3>Filtering</h3>
249249
<c-code disable_copy>curl "{% get_full_host %}{% url "docket-list" version="v4" %}?court__jurisdiction!=F"</c-code>
250250
<p>You can see more examples of filters in <a href="https://github.com/freelawproject/courtlistener/blob/main/cl/api/tests.py" target="_blank" class="underline">our automated tests</a>.</p>
251251
</c-layout-with-navigation.section>
252-
252+
253253
<c-layout-with-navigation.section id="ordering">
254254
<h3>Ordering</h3>
255255
<p>With the exception of the search API, you can see which fields can be used for ordering, by looking at the <code>ordering</code> key in an <code>OPTIONS</code> request. For example, the <code>Position</code> endpoint contains this:
@@ -278,13 +278,13 @@ <h3>Ordering</h3>
278278
<p>Ordering by fields with duplicate values is non-deterministic. If you wish to order by such a field, you should provide a second field as a tie-breaker to consistently order results. For example, ordering by <code>date_filed</code> will not return consistent ordering for items that have the same date, but this can be fixed by ordering by <code>date_filed,id</code>. In that case, if two items have the same <code>date_filed</code> value, the tie will be broken by the <code>id</code> field.
279279
</p>
280280
</c-layout-with-navigation.section>
281-
281+
282282
<c-layout-with-navigation.section id="counting">
283283
<h3>Counting</h3>
284284
<p>To retrieve the total number of items matching your query without fetching all the data, you can use the <code>count=on</code> parameter. This is useful for verifying filters and understanding the scope of your query results without incurring the overhead of retrieving full datasets.</p>
285285
<c-code disable_copy>
286286
curl "{% get_full_host %}{% url "opinion-list" version="v4" %}?cited_opinion=32239&count=on"
287-
287+
288288
{"count": 3302}
289289
</c-code>
290290
<p>When <code>count=on</code> is specified:</p>
@@ -296,7 +296,7 @@ <h3>Counting</h3>
296296
<p>In standard paginated responses, a <code>count</code> key is included with the URL to obtain the total count for your query:</p>
297297
<c-code disable_copy>
298298
curl "{% get_full_host %}{% url "opinion-list" version="v4" %}?cited_opinion=32239"
299-
299+
300300
{
301301
"count": "https://www.courtlistener.com/api/rest/v4/opinions/?cited_opinion=32239&count=on",
302302
"next": "https://www.courtlistener.com/api/rest/v4/opinions/?cited_opinion=32239&cursor=2",
@@ -308,7 +308,7 @@ <h3>Counting</h3>
308308
</c-code>
309309
<p>You can follow this URL to get the total count of items matching your query.</p>
310310
</c-layout-with-navigation.section>
311-
311+
312312
<c-layout-with-navigation.section id="field-selection">
313313
<h3>Field Selection</h3>
314314
<p>To save bandwidth and increase serialization performance, fields can be limited by using the <code>fields</code> parameter with a comma-separated list of fields.</p>
@@ -343,7 +343,7 @@ <h3>Field Selection</h3>
343343
</c-code>
344344
<p>You can also exclude fields using <code>omit=educations,date_modified</code>. Unfortunately, this cannot currently be used for nested resources.</p>
345345
</c-layout-with-navigation.section>
346-
346+
347347
<c-layout-with-navigation.section id="pagination">
348348
<h3>Pagination</h3>
349349
<p>Most APIs can be paginated by using the <code>page</code> GET parameter, but that will be limited to 100 pages of results.</p>
@@ -408,7 +408,7 @@ <h3>PACER Data APIs</h3>
408408
<p>We have almost half a billion PACER-related objects in the RECAP Archive including dockets, entries, documents, parties, and attorneys. Use these APIs to access and understand this data.</p>
409409
<a href="{% url "pacer_api_help" %}" class="btn-outline">Learn More</a>
410410
</c-layout-with-navigation.section>
411-
411+
412412
<c-layout-with-navigation.section id="recap-apis">
413413
<h3>RECAP APIs</h3>
414414
<p>Use these APIs to gather data from PACER and to share your PACER data with the public.</p>
@@ -426,33 +426,33 @@ <h3>Judge APIs</h3>
426426
<p>Use these APIs to query and analyze thousands of federal and state court judges, including their biographical information, political affiliations, education and employment histories, and more.</p>
427427
<a href="{% url "judge_api_help" %}" class="btn-outline">Learn More</a>
428428
</c-layout-with-navigation.section>
429-
429+
430430
<c-layout-with-navigation.section id="disclosure-apis">
431431
<h3>Financial Disclosure APIs</h3>
432432
<p>All federal judges and many state judges must file financial disclosure documents to indicate any real or perceived biases they may have.</p>
433433
<p>Use these APIs to work with this information.</p>
434434
<a href="{% url "financial_disclosures_api_help" %}" class="btn-outline">Learn More</a>
435435
</c-layout-with-navigation.section>
436-
436+
437437
<c-layout-with-navigation.section id="oral-argument-apis">
438438
<h3>Oral Argument APIs</h3>
439439
<p>CourtListener is home to the largest collection of oral argument recordings on the Internet. Use these APIs to gather and analyze our collection.</p>
440440
<a href="{% url "oral_argument_api_help" %}" class="btn btn-outline">Learn More</a>
441441
</c-layout-with-navigation.section>
442-
442+
443443
<c-layout-with-navigation.section id="citation-lookup">
444444
<h3>Citation Lookup &amp; Verification API</h3>
445445
<p>Use this API to look up citations in CourtListener's database of millions of citations.</p>
446446
<p>This API can look up either an individual citation or can parse and look up every citation in a block of text. This can be useful as a guardrail to help prevent hallucinated citations.</p>
447447
<a href="{% url "citation_lookup_api" %}" class="btn-outline">Learn More</a>
448448
</c-layout-with-navigation.section>
449-
449+
450450
<c-layout-with-navigation.section id="citation-network-apis">
451451
<h3>Citation Network APIs</h3>
452452
<p>Use these APIs to traverse and analyze our network of citations between legal decisions.</p>
453453
<a href="{% url "citation_api_help" %}" class="btn-outline">Learn More</a>
454454
</c-layout-with-navigation.section>
455-
455+
456456
<c-layout-with-navigation.section id="alerts">
457457
<h3>Alert APIs</h3>
458458
<p>CourtListener is a scalable system for sending alerts by email or <a href="{% url "webhooks_getting_started" %}" class="underline">webhook</a> based on search queries or for particular cases. Use these APIs to create, modify, list, and delete alerts.</p>

0 commit comments

Comments
 (0)