You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* docs: ๐๏ธ [api] api is maintained by a specifc arm of ICSSC
* docs: ๐๏ธ [api] redo "what is ICSSC"
defer to club events page about event times, make some mildly opinionated tweaks
* docs: ๐๏ธ [api] link attribution from about
* docs: ๐๏ธ [api] tighten language about research data
* docs: ๐๏ธ [api] historical data info out of accordions, reword
* docs: ๐๏ธ [api] reword inviting non-projects people
* docs: ๐๏ธ [api] link to contributor docs
will fill out said contributor docs
* docs: ๐๏ธ [api] import anteater-api/CONTRIBUTING.md
* docs: ๐๏ธ [api] mention docker compose is not strictly needed
* docs: ๐๏ธ [api] contrib guide clarity
* docs: ๐๏ธ [api] reorder contrib landing, language tweak
* docs: ๐๏ธ [api] about api at index.md
* docs: ๐๏ธ [api] move attribution to about section
this requires chair approval
* docs: ๐๏ธ [api] fix 404 on dev landing
* docs: ๐๏ธ [api] add one linebreak
* docs: ๐๏ธ [api] link dev docs to about
* docs: ๐๏ธ [api] clarify anteater offers both rest and gql
* docs: ๐๏ธ [api] example of REST resource, whitespace
* docs: ๐๏ธ [api] clarify what gql is, whitespace
* docs: ๐๏ธ [api] new getting started page, move some content onto it
* docs: ๐๏ธ [api] finish dev getting started
* docs: ๐๏ธ [api] best practices -> "keys and limits"
* docs: ๐๏ธ [api] keys page whitespace
* docs: ๐๏ธ [api] grammar
* docs: ๐๏ธ [api] per-key ratelimit clarification
* docs: ๐๏ธ [api] how to use api keys
also whitespace
* docs: ๐๏ธ [api] clarify requests is a python lib
* docs: ๐๏ธ [api] clarify in snippets any endpoint is ok
* docs: ๐๏ธ [api] as of node 18 importing fetch is unnecessary everywhere
* docs: ๐๏ธ [api] attribution policy back in dev docs sidebar
* docs: ๐๏ธ [api] state graphql url
* docs: ๐๏ธ [api] tighter language
* docs: ๐๏ธ [api] link to gh when we say FOSS
how did we never do this before
* docs: ๐๏ธ [api] shorten contrib setup title
* docs: ๐๏ธ [api] use <Step> for contrib setup steps
* docs: ๐๏ธ [api] wording tweak
* docs: ๐๏ธ [api] page descriptions
* docs: ๐๏ธ [api] move attribution to developer category
#33 (comment)
* docs: ๐๏ธ [api] title case in title
* docs: ๐๏ธ [api] description tweak
Anteater API provides various data from the University of California, Irvine, in a structured format that can be used by other software.
9
+
10
+
Anteater API is maintained by its team within the Projects Committee of the ICS Student Council (ICSSC).
11
+
12
+
## What is ICSSC?
13
+
14
+
ICS Student Council is a far-reaching organization that aims to improve student life within and beyond the Donald Bren School of Information and Computer Sciences.
15
+
16
+
Feel free to join us at our [events](https://icssc.club/events). All UCI affiliates are welcome.
17
+
18
+
Learn more about how you can get involved with us [here](https://icssc.club/get-involved).
19
+
20
+
## Using Anteater API in Your Software
21
+
22
+
If you're building an application that manipulates public data provided by the school, the Anteater API likely has you covered.
23
+
24
+
You can learn about the capabilities of Anteater API, and how to use it, [here](/docs/developer/anteaterapi).
25
+
26
+
Any use of Anteater API for any purpose is bound by the [attribution policy](/docs/developer/anteaterapi/attribution-policy).
27
+
28
+
## Using Anteater API for Research
29
+
30
+
Anteater API contains a wealth of historical data of potential research interest. The following is a non-exhaustive list of historical data we serve:
31
+
32
+
-**Schedule of Classes** for terms not earlier than fall 1990.
33
+
-**Letter grade distributions** for course offerings not earlier than summer 2014.
34
+
-**Course enrollment trends** for course sections held not earlier than winter 2022.
35
+
36
+
If there's more publicly available data that you'd like to see us provide for research, please don't hesitate to reach out.
37
+
38
+
## Contributing to Anteater API
39
+
40
+
Anteater API is free and open-source software (FOSS). The word "free" in this context is as in free speech, though there is also no monetary cost to use Anteater API. This means that everyone can view its [source code](https://github.com/icssc/anteater-api) to see how it works, and everyone is allowed to contribute to Anteater API and/or redistribute its source code.
41
+
42
+
For more information on contributing to Anteater API, see the [contributor section](/docs/contributor/anteaterapi) of the Anteater API documentation.
Download the latest version of the database dump [here](https://anteater-api-dump.s3.us-west-1.amazonaws.com/db.sql.gz), and move it into the `packages/db` directory.
52
+
53
+
_Optional_: Verify the integrity of the database dump.
54
+
55
+
To do this, download the checksum [here](https://anteater-api-dump.s3.us-west-1.amazonaws.com/db.sql.gz.sha256sum), move it into the `packages/db` directory, then run the following command:
56
+
57
+
```shell
58
+
sha256sum -c db.sql.gz.sha256sum
59
+
```
60
+
61
+
If the checksum does not match, the database dump may be corrupt or have been tampered with. You should delete it immediately and try downloading it again.
62
+
</Step>
63
+
64
+
<Step>
65
+
Start the local Postgres database. If you are using Docker Compose, as we recommend above, this is simple:
66
+
67
+
```shell
68
+
docker-compose up -d
69
+
```
70
+
</Step>
71
+
72
+
<Step>
73
+
Start the development server.
74
+
75
+
```shell
76
+
pnpm dev
77
+
```
78
+
79
+
The process of database seeding (importing data from the database dump) can take a while. If at first this fails, wait a few minutes before trying again.
80
+
81
+
The development server will automatically reload upon any changes to the codebase. This will aid in your testing.
description: What you need to do in order to start using Anteater API
4
+
---
5
+
6
+
**This page is for Anteater API users. Potential contributors refer to the [Contributor Docs](/docs/contributor/anteaterapi).**
7
+
8
+
## REST or GraphQL?
9
+
10
+
The first choice you need to make when using Anteater API is between our REST API and our GraphQL API.
11
+
The correct choice is dependent on your use case and, to some degree, on personal preference.
12
+
It is akin to the choice of which programming language to use.
13
+
14
+
## Authorization
15
+
16
+
Unlike some other Web APIs, Anteater API does not require API keys or authentication, so you can start using this API immediately.
17
+
However, there are still advantages to seeking an API key; learn how to obtain and use one [here](./keys-limits).
18
+
19
+
## Choosing your stack
20
+
21
+
If your application is not already fully set up to handle REST or GraphQL, you will need to add to your stack, the list of technologies powering your application.
22
+
Examples of parts of your stack include your language (e.g. JavaScript), frameworks (e.g. React), and, most relevantly to Anteater API, your HTTP client.
23
+
If using GraphQL, you may also want to select a specialized GraphQL client.
24
+
25
+
We have a guide on integrating our REST API with TypeScript [here](/docs/developer/anteaterapi/rest-api/guides/typescript-integration).
26
+
27
+
## Attribution
28
+
29
+
If you use Anteater API, you **must** follow the [Attribution Policy](./attribution-policy).
30
+
31
+
## Reading documentation
32
+
33
+
Finally, read the API reference for [REST](https://anteaterapi.com/reference) or try the [GraphQL Sandbox](https://studio.apollographql.com/sandbox/explorer?endpoint=https://anteaterapi.com/v2/graphql).
34
+
Both provide exhaustive documentation of what Anteater API offers.
Copy file name to clipboardExpand all lines: content/docs/developer/anteaterapi/graphql-api/index.mdx
+1
Original file line number
Diff line number
Diff line change
@@ -3,5 +3,6 @@ title: GraphQL API
3
3
---
4
4
5
5
The GraphQL API allows for access to the same resources that can be accessed through the REST API.
6
+
The current URL is https://anteaterapi.com/v2/graphql.
6
7
7
8
You can try using the GraphQL API through [Apollo Sandbox](https://studio.apollographql.com/sandbox/explorer?endpoint=https://anteaterapi.com/v2/graphql) (also available through the navbar), which is a lightweight web-based IDE for GraphQL queries. The Sandbox also contains up-to-date documentation on the different queries available, so you can develop and test all of your queries from within a single page.
Anteater API is an API maintained by ICSSC Projects that provides various UCI related data. All the data served through Anteater API is publicly accessible, or derived from historically publicly accessible data. If you use data obtained though Anteater API in your project, please give us credit in accordance with our [Attribution Policy](/docs/developer/anteaterapi/attribution-policy).
8
8
9
-
You are currently reading the **Developer Docs** for Anteater API. This part of the documentation covers how to properly integrate Anteater API into your own projects. If you're a developer who's interested in helping to improve Anteater API, please refer to the Anteater API [Contributor Docs](/docs/contributor/anteaterapi/getting-started-contributor).
9
+
You are currently reading the **Developer Docs** for Anteater API. This part of the documentation covers how to properly integrate Anteater API into your own projects.
10
+
If you're a developer who's interested in helping to improve Anteater API, please refer to the Anteater API [Contributor Docs](/docs/contributor/anteaterapi/).
11
+
For general introductory information about Anteater API, see the [About Docs](/docs/about/anteaterapi).
10
12
11
13
## FAQ
12
14
@@ -18,15 +20,21 @@ You are currently reading the **Developer Docs** for Anteater API. This part of
18
20
19
21
</Accordion>
20
22
<Accordiontitle="What is the difference between REST and GraphQL?">
21
-
REST stands for **RE**presentational **S**tate **T**ransfer. A REST API has endpoints, each of which represents a resource. When a request is made to an endpoint, the server responds with a representation of the state of the resource, hence the name. Each HTTP verb (`GET`, `POST`, etc.) represents a different action on the resource being requested.
23
+
Anteater API offers both a REST API and a GraphQL API.
22
24
23
-
GraphQL is a query language for APIs. It is more flexible than REST, since you can query multiple endpoints in the same request, and also include only fields from the endpoint(s) that are relevant. However, it does have a slightly higher learning curve, and may require additional work to integrate into your application.
25
+
REST stands for **RE**presentational **S**tate **T**ransfer. A REST API has endpoints, each of which represents a resource (e.g. which week of school a certain date is in).
26
+
When a request is made to an endpoint, the server responds with a representation of the state of the resource (e.g. week 4 of winter), hence the name.
27
+
Each HTTP verb (`GET`, `POST`, etc.) represents a different action on the resource being requested.
28
+
29
+
GraphQL is a query language for APIs. It is more flexible than REST, since you can query multiple endpoints in the same request and/or selected parts of the data (e.g. when the schedule of classes is posted for a quarter instead of all the important dates).
30
+
However, it does have a slightly higher learning curve, and may require additional work to integrate into your application.
24
31
25
32
The correct API to use will almost always depend on your use case; there is no single correct answer.
26
33
27
34
</Accordion>
28
35
<Accordiontitle="How do I start using Anteater API?">
29
-
Unlike some other Web APIs, Anteater API does not require API keys or authentication, so you can start using this API immediately. However, in order to ensure a good experience for all users of the API, we ask that you read and abide by the [Attribution Policy](attribution-policy).
36
+
Take a look at the [Getting Started](./anteaterapi/getting-started) page.
37
+
In order to ensure a good experience for all users of the API, we ask that you read and abide by the [Attribution Policy](/docs/developer/anteaterapi/attribution-policy).
You may use most features of Anteater API without requesting an API key. Requests made without keys are subject to a per-IP basis and also draws from a global quota that is replenished on an hourly basis. If the global quota is exhausted, only requests with valid API keys will be accepted, so we recommend that you request an API key [here](https://dashboard.anteaterapi.com).
10
+
You may use most features of Anteater API without requesting an API key.
11
+
Requests made without keys are ratelimited on a per-IP basis and also draw from a global quota that is replenished on an hourly basis.
12
+
If the global quota is exhausted, only requests with valid API keys will be accepted, so we recommend that you request an API key [here](https://dashboard.anteaterapi.com).
10
13
11
-
Rate limits for Anteater API are enforced on a per-key basis otherwise. However, our goal with these rate limits is to support almost all applications while preventing abuse. We understand that student projects, especially those made for a hackathon, may experience sudden traffic spikes, and have ensured our rate limits are much higher than what is necessary for almost all applications. If your application requires a higher rate limit, we will evaluate your use case and may choose to increase your rate limit.
14
+
When using a key to access Anteater API, you are bound by your own key-specific ratelimit instead of the global quota.
15
+
Our goal with these rate limits is to support almost all applications while preventing abuse.
16
+
We understand that student projects, especially those made for a hackathon, may experience sudden traffic spikes, and have ensured our rate limits are much higher than what is necessary for almost all applications.
17
+
If your application requires a higher rate limit, we will evaluate your use case and may choose to increase your rate limit.
12
18
13
19
With that being said, we ask that all developers refrain from purposefully sending large amounts of requests in a short interval, or making malicious requests with the intent to exploit vulnerabilities in the API. We reserve the right to blacklist IP addresses making such requests.
14
20
@@ -22,15 +28,17 @@ Publishable keys are intended to be used in client-side code and as such can be
22
28
23
29
Secret keys are intended to be used in server-side code, and should not be exposed since no additional verification is performed.
24
30
25
-
Regardless of the type of key, you'll have to send the key to the API in order to take advantage of its benefits. The following is a non-exhaustive list of code snippets for doing so using various HTTP libraries. If the library you're using isn't present below, please don't hesitate to open a pull request!
31
+
Regardless of the type of key, you'll have to send the key to the API in order to take advantage of its benefits.
32
+
You must provide your API key as a bearer token in your requests.
33
+
If you don't know what that means, that's okay.
34
+
The following is a non-exhaustive list of code snippets for doing so using common HTTP libraries.
35
+
If the library you're using isn't present below, please don't hesitate to open a pull request!
Copy file name to clipboardExpand all lines: content/docs/developer/anteaterapi/migrating.mdx
+1-1
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ We believe that sunsetting PeterPortal API in favor of Anteater API will allow u
25
25
Change the base URL used in your API calls to https://anteaterapi.com/v2/rest (for the REST API) or https://anteaterapi.com/v2/graphql (for the GraphQL API).
26
26
</Step>
27
27
<Step>
28
-
Optional, but highly recommended: Request an API key at https://dashboard.anteaterapi.com, and use that API key in all of your API calls. More details can be found [here](/docs/developer/anteaterapi/best-practices#using-your-api-key).
28
+
Optional, but highly recommended: Request an API key at https://dashboard.anteaterapi.com, and use that API key in all of your API calls. More details can be found [here](/docs/developer/anteaterapi/keys-limits#using-your-api-key).
29
29
</Step>
30
30
<Step>
31
31
Read the section below that corresponds to your current usecase, and apply any modifications to your code.
0 commit comments