Skip to content

Commit cc61890

Browse files
committed
Adding endpoint info
1 parent fc976a2 commit cc61890

1 file changed

Lines changed: 120 additions & 0 deletions

File tree

README.md

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,123 @@ Documentation on use of the RCAMP test framework can be found in the RCAMP Wiki
5353
```
5454
$ docker-compose run --rm --entrypoint "python3" rcamp-uwsgi manage.py test
5555
```
56+
57+
## API
58+
59+
If your user has superuser permissions, the endpoints can be used for queries. Here are examples of hitting the account requests endpoint
60+
61+
```bash
62+
$ curl -u <username>:<password> "http://rcamp2.rc.int.colorado.edu/api/accountrequests/?min_approve_date=2025-03-15&max_approve_date=2025-03-16"
63+
```
64+
```json
65+
[
66+
{
67+
"username": "rmaccuser23",
68+
"first_name": "rmacc",
69+
"last_name": "user",
70+
"email": "rmacc23@user.com",
71+
"organization": "xsede",
72+
"discipline": "Visual & Performing Arts",
73+
"course_number": null,
74+
"sponsor_email": null,
75+
"resources_requested": null,
76+
"status": "a",
77+
"approved_on": "2025-03-15T18:14:14Z",
78+
"request_date": "2025-03-15T18:14:14Z",
79+
"notes": ""
80+
}
81+
]
82+
```
83+
84+
If I want to request all account requests on 2025-03-14
85+
```bash
86+
$ curl -u <user>:<pass> "http://rcamp2.rc.int.colorado.edu/api/accountrequests/?min_approve_date=2025-03-14&max_approve_date=2025-03-15"
87+
```
88+
```json
89+
[
90+
{
91+
"username": "rmaccuser14",
92+
"first_name": "rmacc",
93+
"last_name": "user",
94+
"email": "rmaccuser14@cool.com",
95+
"organization": "xsede",
96+
"discipline": "Hum",
97+
"course_number": null,
98+
"sponsor_email": null,
99+
"resources_requested": null,
100+
"status": "a",
101+
"approved_on": "2025-03-14T11:13:15Z",
102+
"request_date": "2025-03-14T11:13:15Z",
103+
"notes": ""
104+
},
105+
{
106+
"username": "dahdahdah",
107+
"first_name": "rmacc",
108+
"last_name": "user",
109+
"email": "rmacc255@user.com",
110+
"organization": "xsede",
111+
"discipline": "Law",
112+
"course_number": null,
113+
"sponsor_email": null,
114+
"resources_requested": null,
115+
"status": "a",
116+
"approved_on": "2025-03-14T12:27:11Z",
117+
"request_date": "2025-03-14T12:27:19Z",
118+
"notes": ""
119+
},
120+
{
121+
"username": "kyre6371",
122+
"first_name": "Kyle",
123+
"last_name": "Reinholt",
124+
"email": "kyle@Colorado.EDU",
125+
"organization": "ucb",
126+
"discipline": "Physical Sciences",
127+
"course_number": null,
128+
"sponsor_email": null,
129+
"resources_requested": null,
130+
"status": "a",
131+
"approved_on": "2025-03-14T12:29:28Z",
132+
"request_date": "2025-03-14T12:29:29Z",
133+
"notes": null
134+
}
135+
]
136+
```
137+
138+
If you interested in a specific discipline you can use a substring to get results:
139+
```bash
140+
curl -u <user>:<pass> "http://rcamp2.rc.int.colorado.edu/api/accountrequests/?discipline=Visual"
141+
```
142+
```json
143+
[
144+
{
145+
"username": "rmaccuser23",
146+
"first_name": "rmacc",
147+
"last_name": "user",
148+
"email": "rmacc23@user.com",
149+
"organization": "xsede",
150+
"discipline": "Visual & Performing Arts",
151+
"course_number": null,
152+
"sponsor_email": null,
153+
"resources_requested": null,
154+
"status": "a",
155+
"approved_on": "2025-03-15T18:14:14Z",
156+
"request_date": "2025-03-15T18:14:14Z",
157+
"notes": ""
158+
},
159+
{
160+
"username": "rmacc-user67",
161+
"first_name": "rmacc67",
162+
"last_name": "user67",
163+
"email": "rmacc67@user.com",
164+
"organization": "xsede",
165+
"discipline": "Visual & Performing Arts",
166+
"course_number": null,
167+
"sponsor_email": null,
168+
"resources_requested": null,
169+
"status": "a",
170+
"approved_on": "2025-03-16T16:36:00Z",
171+
"request_date": "2025-03-16T16:36:00Z",
172+
"notes": ""
173+
}
174+
]
175+
```

0 commit comments

Comments
 (0)