@@ -69,7 +69,7 @@ Invite a new user (and return the token/link in the response for CLI usage):
6969
7070```
7171$ curl -X 'POST' \
72- 'http ://localhost:8001 /latest/user/invite' \
72+ 'https ://api.kernelci.org /latest/user/invite' \
7373 -H 'accept: application/json' \
7474 -H 'Content-Type: application/json' \
7575 -H 'Authorization: Bearer <ADMIN-AUTHORIZATION-TOKEN>' \
@@ -96,7 +96,7 @@ To preview which public URL will be used in invite links (admin-only):
9696
9797```
9898$ curl -X 'GET' \
99- 'http ://localhost:8001 /latest/user/invite/url' \
99+ 'https ://api.kernelci.org /latest/user/invite/url' \
100100 -H 'accept: application/json' \
101101 -H 'Authorization: Bearer <ADMIN-AUTHORIZATION-TOKEN>'
102102```
@@ -107,7 +107,7 @@ To accept an invite and set the password (no authentication required):
107107
108108```
109109$ curl -X 'POST' \
110- 'http ://localhost:8001 /latest/user/accept-invite' \
110+ 'https ://api.kernelci.org /latest/user/accept-invite' \
111111 -H 'accept: application/json' \
112112 -H 'Content-Type: application/json' \
113113 -d '{
@@ -140,11 +140,11 @@ Example config:
140140default_instance = "local"
141141
142142[instances.local]
143- url = "http ://localhost:8001 /latest"
143+ url = "https ://api.kernelci.org /latest"
144144token = "<admin-or-user-token>"
145145
146146[instances.staging]
147- url = "https://staging.kernelci.org/latest"
147+ url = "https://staging.kernelci.org:9000 /latest"
148148token = "<admin-or-user-token>"
149149```
150150
@@ -190,7 +190,7 @@ Invite a user and return the token/link:
190190
191191```
192192$ curl -X 'POST' \
193- 'http ://localhost:8001 /latest/user/invite' \
193+ 'https ://api.kernelci.org /latest/user/invite' \
194194 -H 'accept: application/json' \
195195 -H 'Content-Type: application/json' \
196196 -H 'Authorization: Bearer <ADMIN-AUTHORIZATION-TOKEN>' \
@@ -219,9 +219,9 @@ Sample response:
219219 "groups": [{"id":"648ff894bd39930355ed16ad","name":"kernelci"}]
220220 },
221221 "email_sent": false,
222- "public_base_url": "http ://localhost:8001 ",
223- "accept_invite_url": "http ://localhost:8001 /user/accept-invite",
224- "invite_url": "http ://localhost:8001 /user/accept-invite?token=<INVITE-TOKEN>",
222+ "public_base_url": "https ://api.kernelci.org ",
223+ "accept_invite_url": "https ://api.kernelci.org /user/accept-invite",
224+ "invite_url": "https ://api.kernelci.org /user/accept-invite?token=<INVITE-TOKEN>",
225225 "token": "<INVITE-TOKEN>"
226226}
227227```
@@ -230,7 +230,7 @@ Accept an invite:
230230
231231```
232232$ curl -X 'POST' \
233- 'http ://localhost:8001 /latest/user/accept-invite' \
233+ 'https ://api.kernelci.org /latest/user/accept-invite' \
234234 -H 'accept: application/json' \
235235 -H 'Content-Type: application/json' \
236236 -d '{
@@ -243,7 +243,7 @@ Get an auth token:
243243
244244```
245245$ curl -X 'POST' \
246- 'http ://localhost:8001 /latest/user/login' \
246+ 'https ://api.kernelci.org /latest/user/login' \
247247 -H 'accept: application/json' \
248248 -H 'Content-Type: application/x-www-form-urlencoded' \
249249 -d 'username=alice&password=<new-password>'
@@ -257,7 +257,7 @@ authorization token to use certain API endpoints requiring user authorization.
257257
258258```
259259$ curl -X 'POST' \
260- 'http ://localhost:8001 /latest/user/login' \
260+ 'https ://api.kernelci.org /latest/user/login' \
261261-H 'accept: application/json' \
262262-H 'Content-Type: application/x-www-form-urlencoded' \
263263-d 'username=test&password=test'
@@ -272,7 +272,7 @@ the `GET /whoami` endpoint:
272272
273273```
274274$ curl -X 'GET' \
275- 'http ://localhost:8001 /latest/whoami' \
275+ 'https ://api.kernelci.org /latest/whoami' \
276276-H 'accept: application/json' \
277277-H 'Authorization: Bearer <USER-AUTHORIZATION-TOKEN>'
278278```
@@ -300,7 +300,7 @@ To get information of all added user accounts, user `GET /users` request.
300300
301301```
302302$ curl -X 'GET' \
303- 'http ://localhost:8001 /latest/users' \
303+ 'https ://api.kernelci.org /latest/users' \
304304-H 'accept: application/json' \
305305-H 'Authorization: <USER-AUTHORIZATION-TOKEN>'
306306{"items":[{"id":"6526448e7d140ee220971a0e","email":"admin@gmail.com","is_active":true,"is_superuser":true,"is_verified":true,"username":"admin","groups":[]},{"id":"615f30020eb7c3c6616e5ac3","email":"test-user@kernelci.org","is_active":true,"is_superuser":true,"is_verified":false,"username":"test-user","groups":[{"id":"648ff894bd39930355ed16ad","name":"kernelci"}]}],"total":2,"limit":50,"offset":0}
@@ -312,7 +312,7 @@ $ curl -X 'GET' \
312312To get user by ID, use ` /user ` endpoint with user ID as a path parameter:
313313```
314314$ curl -X 'GET' \
315- 'http ://localhost:8001 /latest/user/6526448e7d140ee220971a0e' \
315+ 'https ://api.kernelci.org /latest/user/6526448e7d140ee220971a0e' \
316316-H 'accept: application/json' \
317317-H 'Content-Type: application/json' \
318318-H 'Authorization: Bearer <USER-AUTHORIZATION-TOKEN>'
@@ -328,7 +328,7 @@ First, send request to `POST /user/forgot-password` endpoint with the
328328user email address:
329329```
330330$ curl -X 'POST' \
331- 'http ://localhost:8001 /latest/user/forgot-password' \
331+ 'https ://api.kernelci.org /latest/user/forgot-password' \
332332 -H 'accept: application/json' \
333333 -H 'Content-Type: application/json' \
334334 -d '{
@@ -340,7 +340,7 @@ The user will receive password reset token via email. The token should
340340be sent to ` POST /user/reset-password ` request along with the new password to be set for the account:
341341```
342342$ curl -X 'POST' \T' \
343- 'http ://localhost:8001 /latest/user/reset-password' \
343+ 'https ://api.kernelci.org /latest/user/reset-password' \
344344 -H 'accept: application/json' \
345345 -H 'Content-Type: application/json' \
346346 -d '{
@@ -359,7 +359,7 @@ password along with the username for the account:
359359
360360```
361361$ curl -X 'POST' \
362- 'http ://localhost:8001 /latest/user/update-password' \
362+ 'https ://api.kernelci.org /latest/user/update-password' \
363363-H 'accept: application/json' \
364364-H 'Content-Type: application/x-www-form-urlencoded' \
365365-d 'username=test&password=<current-password>&new_password=<new-password>'
@@ -373,7 +373,7 @@ A user can update certain information for its own account, such as
373373For example,
374374```
375375$ curl -X 'PATCH' \
376- 'http ://localhost:8001 /latest/user/me' \
376+ 'https ://api.kernelci.org /latest/user/me' \
377377-H 'accept: application/json' \
378378-H 'Content-Type: application/json' \
379379-H 'Authorization: Bearer <USER-AUTHORIZATION-TOKEN>' \
@@ -395,7 +395,7 @@ For example, the below command will update an existing `test` user with a new em
395395
396396```
397397$ curl -X 'PATCH' \
398- 'http ://localhost:8001 /latest/user/615f30020eb7c3c6616e5ac3' \
398+ 'https ://api.kernelci.org /latest/user/615f30020eb7c3c6616e5ac3' \
399399-H 'accept: application/json' \
400400-H 'Content-Type: application/json' \
401401-H 'Authorization: Bearer <ADMIN-USER-AUTHORIZATION-TOKEN>' \
@@ -571,7 +571,7 @@ Only admin users can delete existing user account by providing user ID to
571571` DELETE /user/<user-id> ` endpoint:
572572```
573573$ curl -X 'DELETE' \
574- 'http ://localhost:8001 /latest/user/658d1edecf0bce203d594f1c' \
574+ 'https ://api.kernelci.org /latest/user/658d1edecf0bce203d594f1c' \
575575-H 'Authorization: Bearer <ADMIN-USER-AUTHORIZATION-TOKEN>'
576576```
577577
@@ -592,7 +592,7 @@ attributes. This requires an authentication token:
592592
593593```
594594$ curl -X 'POST' \
595- 'http ://localhost:8001 /latest/node' \
595+ 'https ://api.kernelci.org /latest/node' \
596596 -H 'accept: application/json' \
597597 -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJib2IifQ.ci1smeJeuX779PptTkuaG1SEdkp5M1S1AgYvX8VdB20' \
598598 -H 'Content-Type: application/json' \
@@ -648,7 +648,7 @@ Reading Node doesn't require authentication, so plain URLs can be used.
648648To get node by ID, use ` /node ` endpoint with node ID as a path parameter:
649649
650650```
651- $ curl http ://localhost:8001 /latest/node/61bda8f2eb1a63d2b7152418 | jq
651+ $ curl https ://api.kernelci.org /latest/node/61bda8f2eb1a63d2b7152418 | jq
652652
653653{
654654 "id": "61bda8f2eb1a63d2b7152418",
@@ -683,7 +683,7 @@ $ curl http://localhost:8001/latest/node/61bda8f2eb1a63d2b7152418 | jq
683683To get all the nodes as a list, use the ` /nodes ` API endpoint:
684684
685685```
686- $ curl http ://localhost:8001 /latest/nodes
686+ $ curl https ://api.kernelci.org /latest/nodes
687687{
688688 "items": [
689689 {
@@ -767,7 +767,7 @@ parameters. All the attributes except node ID can be passed to this endpoint.
767767In case of ID, please use ` /node ` endpoint with node ID as described above.
768768
769769```
770- $ curl 'http ://localhost:8001 /latest/nodes?kind=checkout&data.kernel_revision.tree=mainline' | jq
770+ $ curl 'https ://api.kernelci.org /latest/nodes?kind=checkout&data.kernel_revision.tree=mainline' | jq
771771
772772{
773773 "items": [
@@ -851,7 +851,7 @@ than), `gt`(greater than), `lte`(less than or equal to), `gte`(greater
851851than or equal to) and ` re ` (regular expression matching).
852852
853853```
854- $ curl 'http ://localhost:8001 /latest/nodes?kind=checkout&created__gt=2022-12-06T04:59:08.102000'
854+ $ curl 'https ://api.kernelci.org /latest/nodes?kind=checkout&created__gt=2022-12-06T04:59:08.102000'
855855```
856856
857857> ** Note** In order to support comparison operators in URL request parameters, models can not contain ` __ ` in the field name.
@@ -860,7 +860,7 @@ Additionally, the `re` operator offers some basic regular expression
860860matching capabilities for query parameters. For instance:
861861
862862```
863- $ curl 'http ://localhost:8001 /latest/nodes?kind=kbuild&name__re=x86'
863+ $ curl 'https ://api.kernelci.org /latest/nodes?kind=kbuild&name__re=x86'
864864```
865865
866866returns all Kbuild nodes with the string "x86" in the node name.
@@ -869,7 +869,7 @@ API also supports multiple operator queries for the same field name.
869869For example, date range queries can be triggered as below:
870870
871871```
872- $ curl 'https://localhost:8001 /nodes?created__gt=2024-02-26T13:21:55.301000&created__lt=2024-11-01&kind=checkout'
872+ $ curl 'https://api.kernelci.org /nodes?created__gt=2024-02-26T13:21:55.301000&created__lt=2024-11-01&kind=checkout'
873873```
874874The above query will return all the checkout nodes in the specific
875875date range provided, i.e., nodes created between ` 2024-02-26T13:21:55.301000 ` and ` 2024-11-01 ` date-time range.
@@ -879,8 +879,8 @@ Nodes with `null` fields can also be retrieved using the endpoint.
879879For example, the below command will get all the nodes with ` parent ` field set to ` null ` :
880880
881881```
882- $ curl 'http ://localhost:8001 /latest/nodes?parent=null'
883- "items":[{"_id":"63c549319fb3b62c7626e7f9","kind":"node","name":"checkout","path":["checkout"],"group":null,"data":{"kernel_revision":{"tree":"kernelci","url":"https://github.com/kernelci/linux.git","branch":"staging-mainline","commit":"1385303d0d85c68473d8901d69c7153b03a3150b","describe":"staging-mainline-20230115.1","version":{"version":6,"patchlevel":2,"sublevel":null,"extra":"-rc4-2-g1385303d0d85","name":null}}},"parent":null,"state":"available","result":null,"artifacts":{"tarball":"http://172.17.0.1:8002/linux-kernelci-staging-mainline-staging-mainline-20230115.1.tar.gz"},"created":"2023-01-16T12:55:13.879000","updated":"2023-01-16T12:55:51.780000","timeout":"2023-01-16T13:55:13.877000","holdoff":"2023-01-16T13:05:51.776000"},{"_id":"63c549329fb3b62c7626e7fa","kind":"node","name":"checkout","path":["checkout"],"group":null,"data":{"kernel_revision":{"tree":"kernelci","url":"https://github.com/kernelci/linux.git","branch":"staging-next","commit":"39384a5d7e2eb2f28039a92c022aed886a675fbf","describe":"staging-next-20230116.0","version":{"version":6,"patchlevel":2,"sublevel":null,"extra":"-rc4-5011-g39384a5d7e2e","name":null}}},"parent":null,"state":"available","result":null,"artifacts":{"tarball":"http://172.17.0.1:8002/linux-kernelci-staging-next-staging-next-20230116.0.tar.gz"},"created":"2023-01-16T12:55:14.706000","updated":"2023-01-16T12:56:30.886000","timeout":"2023-01-16T13:55:14.703000","holdoff":"2023-01-16T13:06:30.882000"}],"total":2,"limit":50,"offset":0}
882+ $ curl 'https ://api.kernelci.org /latest/nodes?parent=null'
883+ "items":[{"_id":"63c549319fb3b62c7626e7f9","kind":"node","name":"checkout","path":["checkout"],"group":null,"data":{"kernel_revision":{"tree":"kernelci","url":"https://github.com/kernelci/linux.git","branch":"staging-mainline","commit":"1385303d0d85c68473d8901d69c7153b03a3150b","describe":"staging-mainline-20230115.1","version":{"version":6,"patchlevel":2,"sublevel":null,"extra":"-rc4-2-g1385303d0d85","name":null}}},"parent":null,"state":"available","result":null,"artifacts":{"tarball":"https://172.17.0.1:8002/linux-kernelci-staging-mainline-staging-mainline-20230115.1.tar.gz"},"created":"2023-01-16T12:55:13.879000","updated":"2023-01-16T12:55:51.780000","timeout":"2023-01-16T13:55:13.877000","holdoff":"2023-01-16T13:05:51.776000"},{"_id":"63c549329fb3b62c7626e7fa","kind":"node","name":"checkout","path":["checkout"],"group":null,"data":{"kernel_revision":{"tree":"kernelci","url":"https://github.com/kernelci/linux.git","branch":"staging-next","commit":"39384a5d7e2eb2f28039a92c022aed886a675fbf","describe":"staging-next-20230116.0","version":{"version":6,"patchlevel":2,"sublevel":null,"extra":"-rc4-5011-g39384a5d7e2e","name":null}}},"parent":null,"state":"available","result":null,"artifacts":{"tarball":"https://172.17.0.1:8002/linux-kernelci-staging-next-staging-next-20230116.0.tar.gz"},"created":"2023-01-16T12:55:14.706000","updated":"2023-01-16T12:56:30.886000","timeout":"2023-01-16T13:55:14.703000","holdoff":"2023-01-16T13:06:30.882000"}],"total":2,"limit":50,"offset":0}
884884```
885885
886886Please make sure that the query parameter provided with the ` null ` value in the request exists in the ` Node ` schema. Otherwise, the API will behave unexpectedly and return all the nodes.
@@ -892,7 +892,7 @@ To update an existing node, use PUT request to `node/{node_id}` endpoint.
892892
893893```
894894$ curl -X 'PUT' \
895- 'http ://localhost:8001 /latest/node/61bda8f2eb1a63d2b7152418' \
895+ 'https ://api.kernelci.org /latest/node/61bda8f2eb1a63d2b7152418' \
896896 -H 'accept: application/json' \
897897 -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJib2IifQ.ci1smeJeuX779PptTkuaG1SEdkp5M1S1AgYvX8VdB20' \
898898 -H 'Content-Type: application/json' \
@@ -917,34 +917,34 @@ $ curl -X 'PUT' \
917917To get a count of all the nodes, use GET request to ` /count ` endpoint.
918918
919919```
920- $ curl http ://localhost:8001 /latest/count
920+ $ curl https ://api.kernelci.org /latest/count
9219214
922922```
923923
924924To get count of nodes matching provided attributes, use ` /count ` endpoint with query parameters. All the Node attributes except ID and timestamps(created, updated, timeout, and holdoff) can be passed to this endpoint.
925925```
926- $ curl http ://localhost:8001 /latest/count?name=checkout
926+ $ curl https ://api.kernelci.org /latest/count?name=checkout
9279273
928- $ curl http ://localhost:8001 /latest/count?data.kernel_revision.branch=staging-mainline
928+ $ curl https ://api.kernelci.org /latest/count?data.kernel_revision.branch=staging-mainline
9299291
930930```
931931
932932In case of providing multiple attributes, it will return count of nodes matching all the attributes.
933933```
934- $ curl 'http ://localhost:8001 /latest/count?name=checkout&artifacts.tarball=http ://172.17.0.1:8002/linux-kernelci-staging-mainline-staging-mainline-20220927.0.tar.gz'
934+ $ curl 'https ://api.kernelci.org /latest/count?name=checkout&artifacts.tarball=https ://172.17.0.1:8002/linux-kernelci-staging-mainline-staging-mainline-20220927.0.tar.gz'
9359351
936936```
937937
938938Same as ` /nodes ` , the ` /count ` endpoint also supports comparison operators for request query parameters.
939939```
940- $ curl 'http ://localhost:8001 /latest/count?name=checkout&created__lt=2022-12-06T04:59:08.102000'
940+ $ curl 'https ://api.kernelci.org /latest/count?name=checkout&created__lt=2022-12-06T04:59:08.102000'
9419413
942942```
943943
944944To query the count of nodes with ` null ` attributes, use the endpoint with
945945query parameters set to ` null ` .
946946```
947- $ curl 'http ://localhost:8001 /latest/count?result=null'
947+ $ curl 'https ://api.kernelci.org /latest/count?result=null'
9489482
949949```
950950
@@ -1069,32 +1069,32 @@ The API provides different endpoints for publishing and listening to events.
10691069
10701070For example, subscribe to a channel first:
10711071```
1072- curl -X 'POST' 'http ://localhost:8001 /latest/subscribe/abc' -H 'Authorization: Bearer TOKEN'
1072+ curl -X 'POST' 'https ://api.kernelci.org /latest/subscribe/abc' -H 'Authorization: Bearer TOKEN'
10731073{"id":800,"channel":"abc","user":"bob"}
10741074```
10751075
10761076Use the subscription ID from the response to listen to the events:
10771077```
1078- $ curl -X 'GET' 'http ://localhost:8001 /latest/listen/800' -H 'Authorization: Bearer TOKEN'
1078+ $ curl -X 'GET' 'https ://api.kernelci.org /latest/listen/800' -H 'Authorization: Bearer TOKEN'
10791079```
10801080
10811081Then in a second terminal publish ` CloudEvent ` message:
10821082```
1083- $ curl -X 'POST' 'http ://localhost:8001 /latest/publish/abc' -H 'Authorization: Bearer TOKEN' -H 'Content-Type: application/json' \
1083+ $ curl -X 'POST' 'https ://api.kernelci.org /latest/publish/abc' -H 'Authorization: Bearer TOKEN' -H 'Content-Type: application/json' \
10841084-d '{"data": {"sample_key":"sample_value"}}'
10851085```
10861086Other ` CloudEvent ` fields such as "type", "source", and "attributes" can also
10871087be sent to the request dictionary above.
10881088
10891089You should see the message appear in the first terminal inside "data" dictionary:
10901090```
1091- $ curl -X 'GET' 'http ://localhost:8001 /latest/listen/800' -H 'Authorization: Bearer TOKEN'
1091+ $ curl -X 'GET' 'https ://api.kernelci.org /latest/listen/800' -H 'Authorization: Bearer TOKEN'
10921092{"type":"message","pattern":null,"channel":"abc","data":"{\"specversion\": \"1.0\", \"id\": \"9e67036c-650e-4688-b4dd-5b2eafd21f5f\", \"source\": \"https://api.kernelci.org/\", \"type\": \"api.kernelci.org\", \"time\": \"2024-01-04T10:48:39.974782+00:00\", \"data\": {\"sample_key\": \"sample_value\"}, \"owner\": \"bob\"}"}
10931093```
10941094
10951095Now, unsubscribe from the channel:
10961096```
1097- $ curl -X 'GET' 'http ://localhost:8001 /latest/unsubscribe/800' -H 'Authorization: Bearer TOKEN'
1097+ $ curl -X 'GET' 'https ://api.kernelci.org /latest/unsubscribe/800' -H 'Authorization: Bearer TOKEN'
10981098```
10991099
11001100Meanwhile, something like this should be seen in the API logs:
@@ -1171,47 +1171,47 @@ The `/events` endpoint supports the following query parameters:
11711171
11721172** Get all events (limited to default pagination):**
11731173```
1174- $ curl http ://localhost:8001 /latest/events
1174+ $ curl https ://api.kernelci.org /latest/events
11751175```
11761176
11771177** Get events for completed jobs with passing results:**
11781178```
1179- $ curl 'http ://localhost:8001 /latest/events?kind=job&state=done&result=pass'
1179+ $ curl 'https ://api.kernelci.org /latest/events?kind=job&state=done&result=pass'
11801180```
11811181
11821182** Get recently created events (last hour):**
11831183```
1184- $ curl 'http ://localhost:8001 /latest/events?op=created&from=2025-01-10T12:00:00'
1184+ $ curl 'https ://api.kernelci.org /latest/events?op=created&from=2025-01-10T12:00:00'
11851185```
11861186
11871187** Get events for a specific node path pattern (regex):**
11881188```
1189- $ curl 'http ://localhost:8001 /latest/events?path=.*linux-next.*&limit=50'
1189+ $ curl 'https ://api.kernelci.org /latest/events?path=.*linux-next.*&limit=50'
11901190```
11911191
11921192** Get events for a specific group:**
11931193```
1194- $ curl 'http ://localhost:8001 /latest/events?group=kunit-x86_64&state=done'
1194+ $ curl 'https ://api.kernelci.org /latest/events?group=kunit-x86_64&state=done'
11951195```
11961196
11971197** Get events by owner:**
11981198```
1199- $ curl 'http ://localhost:8001 /latest/events?owner=admin&kind=checkout'
1199+ $ curl 'https ://api.kernelci.org /latest/events?owner=admin&kind=checkout'
12001200```
12011201
12021202** Get events with full node data:**
12031203```
1204- $ curl 'http ://localhost:8001 /latest/events?state=done&result=fail&recursive=true&limit=10'
1204+ $ curl 'https ://api.kernelci.org /latest/events?state=done&result=fail&recursive=true&limit=10'
12051205```
12061206
12071207** Get events for a specific node ID:**
12081208```
1209- $ curl 'http ://localhost:8001 /latest/events?node_id=65a1355ee98651d0fe81e412'
1209+ $ curl 'https ://api.kernelci.org /latest/events?node_id=65a1355ee98651d0fe81e412'
12101210```
12111211
12121212** Combine multiple filters:**
12131213```
1214- $ curl 'http ://localhost:8001 /latest/events?kind=test&state=done&result=fail&group=kselftest&from=2025-01-01&limit=100'
1214+ $ curl 'https ://api.kernelci.org /latest/events?kind=test&state=done&result=fail&group=kselftest&from=2025-01-01&limit=100'
12151215```
12161216
12171217### Sample Response
0 commit comments