Skip to content

Commit

Permalink
Merge pull request #422 from alan-turing-institute/kallewesterling/is…
Browse files Browse the repository at this point in the history
…sue411

Remove `$` from code blocks in documentation
  • Loading branch information
kallewesterling committed May 17, 2024
2 parents 603c56b + e50d615 commit 7dc8b16
Show file tree
Hide file tree
Showing 12 changed files with 61 additions and 61 deletions.
42 changes: 21 additions & 21 deletions site/docs/platform-details/backend/api/assurance-cases.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The `curl` examples in the following serve as a quick way to test and interact w
#### Request

```bash
$ curl -X GET http://localhost:8000/api/cases/ \
curl -X GET http://localhost:8000/api/cases/ \
-H "Authorization: Token your_access_token_here"
```

Expand All @@ -26,7 +26,7 @@ A JSON array of assurance cases, each with its details.
#### Request

```bash
$ curl -X POST http://localhost:8000/api/cases/ \
curl -X POST http://localhost:8000/api/cases/ \
-H "Content-Type: application/json" \
-H "Authorization: Token your_access_token_here" \
-d '{"name": "Case Name", "description": "Case Description", "lock_uuid": "", "color_profile": "default"}'
Expand All @@ -41,7 +41,7 @@ JSON object of the created assurance case.
#### Request

```bash
$ curl -X GET http://localhost:8000/api/cases/<int:pk>/ \
curl -X GET http://localhost:8000/api/cases/<int:pk>/ \
-H "Authorization: Token your_access_token_here"
```

Expand All @@ -54,7 +54,7 @@ JSON object of the specified assurance case.
#### Request

```bash
$ curl -X PUT http://localhost:8000/api/cases/<int:pk>/ \
curl -X PUT http://localhost:8000/api/cases/<int:pk>/ \
-H "Content-Type: application/json" \
-H "Authorization: Token your_access_token_here" \
-d '{"name": "Updated Case Name", "description": "Updated Case Description"}'
Expand All @@ -69,7 +69,7 @@ JSON object of the updated assurance case.
#### Request

```bash
$ curl -X DELETE http://localhost:8000/api/cases/<int:pk>/ \
curl -X DELETE http://localhost:8000/api/cases/<int:pk>/ \
-H "Authorization: Token your_access_token_here"
```

Expand All @@ -84,14 +84,14 @@ HTTP 204 No Content on successful deletion.
#### List All Goals

```bash
$ curl -X GET http://localhost:8000/api/goals/ \
curl -X GET http://localhost:8000/api/goals/ \
-H "Authorization: Token your_access_token_here"
```

#### Create a New Goal

```bash
$ curl -X POST http://localhost:8000/api/goals/ \
curl -X POST http://localhost:8000/api/goals/ \
-H "Content-Type: application/json" \
-H "Authorization: Token your_access_token_here" \
-d '{"name": "Goal Name", "description": "Goal Description", "assurance_case": <case_id>}'
Expand All @@ -104,7 +104,7 @@ To update an existing goal element in an assurance case, use the PUT method at t
##### Request

```bash
$ curl -X PUT http://localhost:8000/api/goals/<int:pk>/ \
curl -X PUT http://localhost:8000/api/goals/<int:pk>/ \
-H "Content-Type: application/json" \
-H "Authorization: Token your_access_token_here" \
-d '{"name": "Updated Goal Name", "description": "Updated Goal Description"}'
Expand All @@ -121,7 +121,7 @@ To delete a specific goal element from an assurance case, send a DELETE request
##### Request

```bash
$ curl -X DELETE http://localhost:8000/api/goals/<int:pk>/ \
curl -X DELETE http://localhost:8000/api/goals/<int:pk>/ \
-H "Authorization: Token your_access_token_here"
```

Expand All @@ -134,14 +134,14 @@ HTTP 204 No Content on successful deletion, indicating the goal has been removed
#### List All Contexts

```bash
$ curl -X GET http://localhost:8000/api/contexts/ \
curl -X GET http://localhost:8000/api/contexts/ \
-H "Authorization: Token your_access_token_here"
```

#### Create a New Context

```bash
$ curl -X POST http://localhost:8000/api/contexts/ \
curl -X POST http://localhost:8000/api/contexts/ \
-H "Content-Type: application/json" \
-H "Authorization: Token your_access_token_here" \
-d '{"name": "Context Name", "description": "Context Description", "goal": <goal_id>}'
Expand All @@ -154,7 +154,7 @@ To update details of a context element linked to a goal, utilize the PUT method
##### Request

```bash
$ curl -X PUT http://localhost:8000/api/contexts/<int:pk>/ \
curl -X PUT http://localhost:8000/api/contexts/<int:pk>/ \
-H "Content-Type: application/json" \
-H "Authorization: Token your_access_token_here" \
-d '{"name": "Updated Context Name", "description": "Updated Context Description"}'
Expand All @@ -171,7 +171,7 @@ Remove a context element by sending a DELETE request to `/contexts/<int:pk>/`.
##### Request

```bash
$ curl -X DELETE http://localhost:8000/api/contexts/<int:pk>/ \
curl -X DELETE http://localhost:8000/api/contexts/<int:pk>/ \
-H "Authorization: Token your_access_token_here"
```

Expand All @@ -184,14 +184,14 @@ HTTP 204 No Content, confirming the context has been successfully deleted.
#### List All Property Claims

```bash
$ curl -X GET http://localhost:8000/api/propertyclaims/ \
curl -X GET http://localhost:8000/api/propertyclaims/ \
-H "Authorization: Token your_access_token_here"
```

#### Create a New Property Claim

```bash
$ curl -X POST http://localhost:8000/api/propertyclaims/ \
curl -X POST http://localhost:8000/api/propertyclaims/ \
-H "Content-Type: application/json" \
-H "Authorization: Token your_access_token_here" \
-d '{"name": "Property Claim Name", "description": "Property Claim Description", "goal": <goal_id>}'
Expand All @@ -204,7 +204,7 @@ Property claims can be updated by sending a PUT request to `/propertyclaims/<int
##### Request

```bash
$ curl -X PUT http://localhost:8000/api/propertyclaims//<int:pk>/ \
curl -X PUT http://localhost:8000/api/propertyclaims//<int:pk>/ \
-H "Content-Type: application/json" \
-H "Authorization: Token your_access_token_here" \
-d '{"name": "Updated Claim Name", "description": "Updated Claim Description"}'
Expand All @@ -221,7 +221,7 @@ To delete a property claim, issue a DELETE command to `/propertyclaims/<int:pk>/
##### Request

```bash
$ curl -X DELETE http://localhost:8000/api/propertyclaims//<int:pk>/ \
curl -X DELETE http://localhost:8000/api/propertyclaims//<int:pk>/ \
-H "Authorization: Token your_access_token_here"
```

Expand All @@ -234,14 +234,14 @@ HTTP 204 No Content upon successful removal of the property claim.
#### List All Strategies

```bash
$ curl -X GET http://localhost:8000/api/strategies/ \
curl -X GET http://localhost:8000/api/strategies/ \
-H "Authorization: Token your_access_token_here"
```

#### Create a New Strategy

```bash
$ curl -X POST http://localhost:8000/api/strategies/ \
curl -X POST http://localhost:8000/api/strategies/ \
-H "Content-Type: application/json" \
-H "Authorization: Token your_access_token_here" \
-d '{"name": "Strategy Name", "description": "Strategy Description", "goal": <goal_id>}'
Expand All @@ -254,7 +254,7 @@ Modify an existing strategy by using the PUT method on `/strategies/<int:pk>/`.
##### Request

```bash
$ curl -X PUT http://localhost:8000/api/strategies//<int:pk>/ \
curl -X PUT http://localhost:8000/api/strategies//<int:pk>/ \
-H "Content-Type: application/json" \
-H "Authorization: Token your_access_token_here" \
-d '{"name": "Updated Strategy Name", "description": "Updated Strategy Description"}'
Expand All @@ -271,7 +271,7 @@ Remove a strategy from an assurance case by sending a DELETE request to `/strate
##### Request

```bash
$ curl -X DELETE http://localhost:8000/api/strategies//<int:pk>/ \
curl -X DELETE http://localhost:8000/api/strategies//<int:pk>/ \
-H "Authorization: Token your_access_token_here"
```

Expand Down
6 changes: 3 additions & 3 deletions site/docs/platform-details/backend/api/authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ To authenticate a user and receive an access token for subsequent requests, use
### Request

```bash
$ curl -X POST http://localhost:8000/api/auth/login/ \
curl -X POST http://localhost:8000/api/auth/login/ \
-H "Content-Type: application/json" \
-d '{"username": "your_username", "password": "your_password"}'
```
Expand All @@ -29,7 +29,7 @@ To log out a user and invalidate the current token, use the `/api/auth/logout/`
### Request

```bash
$ curl -X POST http://localhost:8000/api/auth/logout/ \
curl -X POST http://localhost:8000/api/auth/logout/ \
-H "Authorization: Token your_access_token_here"
```

Expand All @@ -44,7 +44,7 @@ To create a new user account, submit a request to `/api/auth/register/` with the
### Request

```bash
$ curl -X POST http://localhost:8000/api/auth/register/ \
curl -X POST http://localhost:8000/api/auth/register/ \
-H "Content-Type: application/json" \
-d '{
"username": "new_user",
Expand Down
10 changes: 5 additions & 5 deletions site/docs/platform-details/backend/api/comment.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Retrieve a list of all comments associated with a specific assurance case by mak
### Request

```bash
$ curl -X GET http://localhost:8000/api/comments/<int:assurance_case_id>/ \
curl -X GET http://localhost:8000/api/comments/<int:assurance_case_id>/ \
-H "Authorization: Token your_access_token_here"
```

Expand All @@ -28,7 +28,7 @@ To add a new comment to an assurance case, use the POST method with the assuranc
### Request

```bash
$ curl -X POST http://localhost:8000/api/comments/<int:assurance_case_id>/ \
curl -X POST http://localhost:8000/api/comments/<int:assurance_case_id>/ \
-H "Content-Type: application/json" \
-H "Authorization: Token your_access_token_here" \
-d '{"content": "Your insightful comment here."}'
Expand All @@ -45,7 +45,7 @@ Access the details of a specific comment by its ID using a GET request.
### Request

```bash
$ curl -X GET http://localhost:8000/api/comments/<int:pk>/ \
curl -X GET http://localhost:8000/api/comments/<int:pk>/ \
-H "Authorization: Token your_access_token_here"
```

Expand All @@ -60,7 +60,7 @@ Update the content of an existing comment by sending a PUT request to the commen
### Request

```bash
$ curl -X PUT http://localhost:8000/api/comments/<int:pk>/ \
curl -X PUT http://localhost:8000/api/comments/<int:pk>/ \
-H "Content-Type: application/json" \
-H "Authorization: Token your_access_token_here" \
-d '{"content": "Updated content of the comment."}'
Expand All @@ -77,7 +77,7 @@ To remove a comment from an assurance case, issue a DELETE request to the specif
### Request

```bash
$ curl -X DELETE http://localhost:8000/api/comments/<int:pk>/ \
curl -X DELETE http://localhost:8000/api/comments/<int:pk>/ \
-H "Authorization: Token your_access_token_here"
```

Expand Down
6 changes: 3 additions & 3 deletions site/docs/platform-details/backend/api/github.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Retrieve a list of all GitHub repositories associated with a specific user by th
### Request

```bash
$ curl -X GET http://localhost:8000/api/users//<int:pk>/github_repositories/ \
curl -X GET http://localhost:8000/api/users//<int:pk>/github_repositories/ \
-H "Authorization: Token your_access_token_here"
```

Expand All @@ -30,7 +30,7 @@ To view all GitHub repositories linked within the TEA Platform, irrespective of
### Request

```bash
$ curl -X GET http://localhost:8000/api/github_repositories/ \
curl -X GET http://localhost:8000/api/github_repositories/ \
-H "Authorization: Token your_access_token_here"
```

Expand All @@ -45,7 +45,7 @@ Link a new GitHub repository to the TEA Platform by providing the repository's d
### Request

```bash
$ curl -X POST http://localhost:8000/api/github_repositories/ \
curl -X POST http://localhost:8000/api/github_repositories/ \
-H "Content-Type: application/json" \
-H "Authorization: Token your_access_token_here" \
-d '{
Expand Down
10 changes: 5 additions & 5 deletions site/docs/platform-details/backend/api/group.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Retrieve a comprehensive list of all groups on the TEA Platform. This is useful
### Request

```bash
$ curl -X GET http://localhost:8000/api/groups/ \
curl -X GET http://localhost:8000/api/groups/ \
-H "Authorization: Token your_access_token_here"
```

Expand All @@ -28,7 +28,7 @@ Establish a new group on the platform by specifying its name. This endpoint can
### Request

```bash
$ curl -X POST http://localhost:8000/api/groups/ \
curl -X POST http://localhost:8000/api/groups/ \
-H "Content-Type: application/json" \
-H "Authorization: Token your_access_token_here" \
-d '{"name": "New Group Name"}'
Expand All @@ -45,7 +45,7 @@ Access detailed information about a specific group by its ID. This endpoint prov
### Request

```bash
$ curl -X GET http://localhost:8000/api/groups/<int:pk>/ \
curl -X GET http://localhost:8000/api/groups/<int:pk>/ \
-H "Authorization: Token your_access_token_here"
```

Expand All @@ -60,7 +60,7 @@ Modify the details of an existing group, such as its name or members. This endpo
### Request

```bash
$ curl -X PUT http://localhost:8000/api/groups/<int:pk>/ \
curl -X PUT http://localhost:8000/api/groups/<int:pk>/ \
-H "Content-Type: application/json" \
-H "Authorization: Token your_access_token_here" \
-d '{"name": "Updated Group Name"}'
Expand All @@ -77,7 +77,7 @@ Remove a group from the platform. This action should be used with caution, as it
### Request

```bash
$ curl -X DELETE http://localhost:8000/api/groups/<int:pk>/ \
curl -X DELETE http://localhost:8000/api/groups/<int:pk>/ \
-H "Authorization: Token your_access_token_here"
```

Expand Down
6 changes: 3 additions & 3 deletions site/docs/platform-details/backend/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ To get you started with the TEA Platform API, we'll walk you through a few basic
To interact with the TEA Platform API, you'll first need to authenticate. If you're logging in, you'll typically post your credentials to receive an authentication token.

```bash
$ curl -X POST http://localhost:8000/auth/login/ \
curl -X POST http://localhost:8000/auth/login/ \
-H 'Content-Type: application/json' \
-d '{"username": "yourusername", "password": "yourpassword"}'
```
Expand All @@ -21,15 +21,15 @@ $ curl -X POST http://localhost:8000/auth/login/ \
You can list assurance cases available to you.

```bash
$ curl -X GET http://localhost:8000/api/cases/
curl -X GET http://localhost:8000/api/cases/
```

### Add a New Case

To create a new assurance case, you'll need to POST the required data.

```bash
$ curl -X POST http://localhost:8000/api/cases/ \
curl -X POST http://localhost:8000/api/cases/ \
-H 'Authorization: Bearer your_token_here' \
-H 'Content-Type: application/json' \
-d '{"name": "New Assurance Case", "description": "Detailed description of the case", "user_id": "1", "lock_uuid": "", "color_profile": "default"}'
Expand Down
Loading

0 comments on commit 7dc8b16

Please sign in to comment.