Skip to content

Commit

Permalink
add the profile call into the api doc
Browse files Browse the repository at this point in the history
  • Loading branch information
proditis committed Nov 10, 2024
1 parent 9be7e0e commit 3b025e9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,23 @@ curl -i -H "Accept:application/json" "https://echoctf.red/api/headshots?filter[p
## Bearer Operations
For the following endpoints you will need to have a bearer token to be able to access them

* `api/profile/me`: Get your profile details
* `api/target/claim`: Submit a flag for validation
* `api/target/instances`: List of instances (if any)
* `api/target/<id:\d+>`: Get details for a given target
* `api/target/<id:\d+>/spin`: spin a machine
* `api/target/<id:\d+>/spawn`: Spawn a private instance (if allowed)
* `api/target/<id:\d+>/shut`: Shutdown a private instance

### Get profile details
URL: `GET /api/profile/me`

```sh
curl "https://echoctf.red/api/target/me" \
-H "Authorization: Bearer YOURTOKEN" \
-H "Accept:application/json"
```

### Claim Flag
URL: `POST /api/target/claim` \
POST: `{ "hash":"flag" }`
Expand Down

0 comments on commit 3b025e9

Please sign in to comment.