Skip to content

Commit

Permalink
add beta api
Browse files Browse the repository at this point in the history
  • Loading branch information
wh1te909 committed Oct 2, 2023
1 parent 817a827 commit aadba35
Showing 1 changed file with 26 additions and 14 deletions.
40 changes: 26 additions & 14 deletions docs/functions/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,32 @@ Example curl request:
curl https://api.example.com/clients/ -H "X-API-KEY: Y57BXCFAA9WBCXH0XTEL6R5KAK69CNCZ"
```

## Enable Swagger

This will let you add a browser interface to see how you can use the API better.

Open `/rmm/api/tacticalrmm/tacticalrmm/local_settings.py` and add

```conf
SWAGGER_ENABLED = True
```

Restart Django: `sudo systemctl restart rmm.service`

Then visit `https://api.example.com/api/schema/swagger-ui/` to see it in action.

## Beta API
*Version added: Tactical RMM v0.16.5*

A beta API is now available at `/api/beta/v1` which supports filtering and pagination.

To activate it, first enable swagger (see above) and then add the following line to `/rmm/api/tacticalrmm/tacticalrmm/local_settings.py`:
```conf
BETA_API_ENABLED = True
```

Then restart Django with: `sudo systemctl restart rmm.service` and check Swagger for usage.

## Querying the API

Here are some examples:
Expand Down Expand Up @@ -133,20 +159,6 @@ Here are some examples:
}
```

## Enable Swagger

This will let you add a browser interface to see how you can use the API better.

Open `/rmm/api/tacticalrmm/tacticalrmm/local_settings.py` and add

```conf
SWAGGER_ENABLED = True
```

Restart Django: `sudo systemctl restart rmm.service`

Then visit `https://api.example.com/api/schema/swagger-ui/` to see it in action.

## API via CLI

<https://gitlab.com/NiceGuyIT/trmm-cli>
Expand Down

0 comments on commit aadba35

Please sign in to comment.