Skip to content

Commit 0dd43b1

Browse files
committed
docs: add prelim draft of payload schemas
1 parent d536319 commit 0dd43b1

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

SERVICES.md

+28
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,34 @@ target_port=8080 # the target port for your service
1313

1414
**PR's that do not include documentation of the service will not be merged**
1515

16+
- your service will receive any payload/query params from the initial client request as well as a JWT containing a basic user object with the following schema:
17+
```json
18+
{
19+
"user":{
20+
"username":"github_username",
21+
"metadata": {
22+
//General User Data TBD
23+
"services": {
24+
"your-service-name": {
25+
//User metadata for your service - 500B max
26+
}
27+
}
28+
}
29+
}
30+
}
31+
```
32+
- To update user metadata, make a POST request to `https://tulsawebdevs.org/api/userdata` with a JSON payload in the following schema:
33+
```json
34+
{
35+
"username":"github_username",
36+
"metadata": {
37+
// User metadata for your service - 500B max
38+
}
39+
}
40+
```
41+
- The API will validate your request, attempt to write the user data if valid, and return a success or failure status.
42+
*TBD: Auth/Validation/Rate Limit rules for this - will likely have a token endpoint and require a bearer token or similar for requests*
43+
1644
## Registered Services
1745
*Use the following basic format `[repo link](https://myservicelocation)` - Service Name / short description
1846

0 commit comments

Comments
 (0)