# API Endpoints

{% hint style="info" %}
Default nameservice prefix is `/api/guardian`
{% endhint %}

## List Of Configurations Endpoints

| Endpoints                                                                                            | Description                                 | Type |
| ---------------------------------------------------------------------------------------------------- | ------------------------------------------- | ---- |
| [/configurations](https://docs.protokol.com/developers/sdk/nameservice/api-endpoints/configurations) | Returns configurations for Guardian plugins | GET  |

## List Of Groups Endpoints

| Endpoints                                                                                           | Description                      | Type |
| --------------------------------------------------------------------------------------------------- | -------------------------------- | ---- |
| [/groups](https://docs.protokol.com/developers/sdk/guardian/groups#groups-1)                        | Returns all Groups               | GET  |
| [/groups/:name](https://docs.protokol.com/developers/sdk/guardian/groups#groups-name)               | Returns Group by its name        | GET  |
| [/groups/:name/users](https://docs.protokol.com/developers/sdk/guardian/groups#users-by-group-name) | Returns Users of a Group by name | GET  |

## List Of Users Endpoints

| Endpoints                                                                                    | Description                             | Type |
| -------------------------------------------------------------------------------------------- | --------------------------------------- | ---- |
| [/users](https://docs.protokol.com/developers/sdk/guardian/users#users-1)                    | Returns all Users                       | GET  |
| [/users/:id](https://docs.protokol.com/developers/sdk/guardian/users#users-id)               | Returns User by Publickey               | GET  |
| [/users/:id/groups](https://docs.protokol.com/developers/sdk/guardian/users#users-id-groups) | Returns All Groups of User by Publickey | GET  |

## Guardian Client

{% hint style="info" %}
A Light Typescript Client Supporting Guardian REST API
{% endhint %}

### Installation

#### [yarn](https://classic.yarnpkg.com/lang/en/)

```
yarn add @protokol/client
```

#### [pnpm](https://pnpm.js.org/)

```
pnpm add @protokol/client
```

#### [npm](https://www.npmjs.com/)

```
npm install @protokol/client
```

### Initialization

```typescript
import { ProtokolConnection } from "@protokol/client";

const connection = new ProtokolConnection("https://explorer.protokol.sh/api");
```

##
