Skip to content

Commit a0b38c0

Browse files
authored
Initial commit
0 parents  commit a0b38c0

22 files changed

+1620
-0
lines changed

README.md

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Mintlify Starter Kit
2+
3+
Click on `Use this template` to copy the Mintlify starter kit. The starter kit contains examples including
4+
5+
- Guide pages
6+
- Navigation
7+
- Customizations
8+
- API Reference pages
9+
- Use of popular components
10+
11+
### 👩‍💻 Development
12+
13+
Install the [Mintlify CLI](https://www.npmjs.com/package/mintlify) to preview the documentation changes locally. To install, use the following command
14+
15+
```
16+
npm i -g mintlify
17+
```
18+
19+
Run the following command at the root of your documentation (where mint.json is)
20+
21+
```
22+
mintlify dev
23+
```
24+
25+
### 😎 Publishing Changes
26+
27+
Changes will be deployed to production automatically after pushing to the default branch.
28+
29+
You can also preview changes using PRs, which generates a preview link of the docs.
30+
31+
#### Troubleshooting
32+
33+
- Mintlify dev isn't running - Run `mintlify install` it'll re-install dependencies.
34+
- Page loads as a 404 - Make sure you are running in a folder with `mint.json`

_snippets/snippet-example.mdx

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## My Snippet
2+
3+
<Info>This is an example of a reusable snippet</Info>

api-reference/authentication.mdx

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
title: "Authentication"
3+
description: "Example overview page before API endpoints"
4+
---
5+
6+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas et eros iaculis tortor dapibus cursus. Curabitur quis sapien nec tortor dictum gravida.
7+
8+
```bash
9+
'Authorization': 'Token <team_token>'
10+
```
11+
12+
## API Tokens
13+
14+
Nullam convallis mauris at nunc consectetur, ac imperdiet leo rutrum. Maecenas cursus purus a pellentesque blandit. Pellentesque vitae lacinia libero, non mollis metus.
15+
16+
Nam id ullamcorper urna, at rutrum enim. [Maecenas vulputate](/introduction) vehicula libero, vitae sodales augue pretium nec. Quisque a magna tempor, semper risus vel, fermentum nunc. Pellentesque fermentum interdum ex, eu convallis massa blandit sed. Aliquam bibendum ipsum vel laoreet auctor.
17+
18+
### Permissions
19+
20+
Etiam lobortis ut odio ut fermentum. Nunc odio velit, sollicitudin at consectetur id, tristique eget turpis. Aliquam at risus vitae dolor sodales venenatis. In hac habitasse platea dictumst.
21+
22+
Aenean consequat diam eget mollis fermentum. [Quisque eu malesuada](/introduction) felis, non dignissim libero.

api-reference/endpoint/create.mdx

+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
---
2+
title: "Create User"
3+
api: "POST https://api.mintlify.com/api/user"
4+
description: "This endpoint creates a new user"
5+
---
6+
7+
### Body
8+
9+
<ParamField body="current_token" type="string">
10+
This is the current user group token you have for the user group that you want
11+
to rotate.
12+
</ParamField>
13+
14+
### Response
15+
16+
<ResponseField name="success" type="number">
17+
Indicates whether the call was successful. 1 if successful, 0 if not.
18+
</ResponseField>
19+
20+
<ResponseField name="user_group" type="object">
21+
22+
The contents of the user group
23+
24+
<Expandable title="Toggle object">
25+
26+
<ResponseField name="team_id" type="number">
27+
This is the internal ID for this user group. You don't need to record this
28+
information, since you will not need to use it.
29+
</ResponseField>
30+
31+
<ResponseField name="token" type="string">
32+
This is the user group token (userGroupToken or USER_GROUP_TOKEN) that will be
33+
used to identify which user group is viewing the dashboard. You should save
34+
this on your end to use when rendering an embedded dashboard.
35+
</ResponseField>
36+
37+
<ResponseField name="name" type="string">
38+
This is the name of the user group provided in the request body.
39+
</ResponseField>
40+
41+
<ResponseField name="provided_id" type="string">
42+
This is the user_group_id provided in the request body.
43+
</ResponseField>
44+
45+
<ResponseField name="api_environment_tag" type="JSON or null">
46+
This is the environment tag of the user group. Possible values are 'Customer'
47+
and 'Testing'. User group id's must be unique to each environment, so you can
48+
not create multiple user groups with with same id. If you have a production
49+
customer and a test user group with the same id, you will be required to label
50+
one as 'Customer' and another as 'Testing'
51+
</ResponseField>
52+
53+
</Expandable>
54+
55+
</ResponseField>
56+
57+
<RequestExample>
58+
59+
```bash Example Request
60+
curl --location --request POST 'https://api.mintlify.com/api/user' \
61+
--header 'Content-Type: application/json' \
62+
--header 'Authorization: Token <token>' \
63+
--data-raw '{
64+
"current_token": ""
65+
}'
66+
```
67+
68+
</RequestExample>
69+
70+
<ResponseExample>
71+
72+
```json Response
73+
{
74+
"success": 1,
75+
"user_group": {
76+
"team_id": 3,
77+
"token": "<user_group_token_to_auth_dashboard>",
78+
"name": "Example 1",
79+
"provided_id": "example_1"
80+
}
81+
}
82+
```
83+
84+
</ResponseExample>

api-reference/endpoint/delete.mdx

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
title: "Delete User"
3+
api: "DELETE https://api.mintlify.com/api/user"
4+
description: "This endpoint deletes an existing user."
5+
---
6+
7+
### Body
8+
9+
<ParamField body="data_source_provided_id" type="string">
10+
The data source ID provided in the data tab may be used to identify the data
11+
source for the user group
12+
</ParamField>
13+
14+
<ParamField body="current_token" type="string">
15+
This is the current user group token you have for the user group you want to
16+
delete
17+
</ParamField>
18+
19+
### Response
20+
21+
<ResponseField name="success" type="number">
22+
Indicates whether the call was successful. 1 if successful, 0 if not.
23+
</ResponseField>
24+
25+
<RequestExample>
26+
27+
```bash Example Request
28+
curl --location --request DELETE 'https://api.mintlify.com/api/user' \
29+
--header 'Content-Type: application/json' \
30+
--header 'Authorization: Token <token>' \
31+
--data-raw '{
32+
"user_group_id": "example_1"
33+
"current_token": "abcdef"
34+
}'
35+
```
36+
37+
</RequestExample>
38+
39+
<ResponseExample>
40+
41+
```json Response
42+
{
43+
"success": 1
44+
}
45+
```
46+
47+
</ResponseExample>

api-reference/endpoint/get.mdx

+101
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
---
2+
title: "Get User"
3+
api: "GET https://api.mintlify.com/api/user"
4+
description: "This endpoint gets or creates a new user."
5+
---
6+
7+
### Body
8+
9+
<ParamField body="name" type="string">
10+
This is the name of the user group.
11+
</ParamField>
12+
13+
<ParamField body="user_group_id" type="string">
14+
This is the ID you use to identify this user group in your database.
15+
</ParamField>
16+
17+
<ParamField body="mapping" type="object">
18+
This is a JSON mapping of schema id to either the data source that this user group should be
19+
associated with or id of the datasource you provided when creating it.
20+
</ParamField>
21+
22+
<ParamField body="properties" type="object">
23+
This is a JSON object for properties assigned to this user group. These will be accessible through
24+
variables in the dashboards and SQL editor
25+
</ParamField>
26+
27+
### Response
28+
29+
<ResponseField name="success" type="number">
30+
Indicates whether the call was successful. 1 if successful, 0 if not.
31+
</ResponseField>
32+
33+
<ResponseField name="new_user_group" type="boolean">
34+
Indicates whether a new user group was created.
35+
</ResponseField>
36+
37+
<ResponseField name="user_group" type="object">
38+
39+
The contents of the user group
40+
41+
<Expandable title="Toggle object">
42+
43+
<ResponseField name="team_id" type="number">
44+
This is the internal ID for this user group. You don't need to record this information, since
45+
you will not need to use it.
46+
</ResponseField>
47+
48+
<ResponseField name="token" type="string">
49+
This is the user group token (userGroupToken or USER_GROUP_TOKEN) that will be used to identify
50+
which user group is viewing the dashboard. You should save this on your end to use when rendering
51+
an embedded dashboard.
52+
</ResponseField>
53+
54+
<ResponseField name="name" type="string">
55+
This is the name of the user group provided in the request body.
56+
</ResponseField>
57+
58+
<ResponseField name="provided_id" type="string">
59+
This is the user_group_id provided in the request body.
60+
</ResponseField>
61+
62+
<ResponseField name="properties" type="JSON or null">
63+
This is the properties object if it was provided in the request body
64+
</ResponseField>
65+
66+
</Expandable>
67+
68+
</ResponseField>
69+
70+
<RequestExample>
71+
72+
```bash Example Request
73+
curl --location --request GET 'https://api.mintlify.com/api/user' \
74+
--header 'Content-Type: application/json' \
75+
--header 'Authorization: Token <token>' \
76+
--data-raw '{
77+
"user_group_id": "example_1",
78+
"name": "Example 1",
79+
"mapping": {"40": "213", "134": "386"},
80+
"properties": {"filterValue": "value"}
81+
}'
82+
```
83+
84+
</RequestExample>
85+
86+
<ResponseExample>
87+
88+
```json Response
89+
{
90+
"success": 1,
91+
"new_user_group": true,
92+
"user_group": {
93+
"team_id": 3,
94+
"token": "<user_group_token_to_auth_dashboard>",
95+
"name": "Example 1",
96+
"provided_id": "example_1"
97+
}
98+
}
99+
```
100+
101+
</ResponseExample>

api-reference/endpoint/update.mdx

+101
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
---
2+
title: "Update User"
3+
api: "PUT https://api.mintlify.com/api/user"
4+
description: "This endpoint updates an existing user."
5+
---
6+
7+
### Body
8+
9+
<ParamField body="name" type="string">
10+
This is the name of the user group.
11+
</ParamField>
12+
13+
<ParamField body="user_group_id" type="string">
14+
This is the ID you use to identify this user group in your database.
15+
</ParamField>
16+
17+
<ParamField body="mapping" type="object">
18+
This is a JSON mapping of schema id to either the data source that this user
19+
group should be associated with or id of the datasource you provided when
20+
creating it.
21+
</ParamField>
22+
23+
<ParamField body="properties" type="object">
24+
This is a JSON object for properties assigned to this user group. These will
25+
be accessible through variables in the dashboards and SQL editor
26+
</ParamField>
27+
28+
### Response
29+
30+
<ResponseField name="success" type="number">
31+
Indicates whether the call was successful. 1 if successful, 0 if not.
32+
</ResponseField>
33+
34+
<ResponseField name="user_group" type="object">
35+
36+
The contents of the user group
37+
38+
<Expandable title="Toggle object">
39+
40+
<ResponseField name="team_id" type="number">
41+
Indicates whether a new user group was created.
42+
</ResponseField>
43+
44+
<ResponseField name="token" type="string">
45+
This is the user group token (userGroupToken or USER_GROUP_TOKEN) that will be
46+
used to identify which user group is viewing the dashboard. You should save
47+
this on your end to use when rendering an embedded dashboard.
48+
</ResponseField>
49+
50+
<ResponseField name="name" type="string">
51+
This is the name of the user group provided in the request body.
52+
</ResponseField>
53+
54+
<ResponseField name="provided_id" type="string">
55+
This is the user_group_id provided in the request body.
56+
</ResponseField>
57+
58+
<ResponseField name="properties" type="JSON | Null">
59+
This is the properties object if it was provided in the request body
60+
</ResponseField>
61+
62+
<ResponseField name="api_environment_tag" type="JSON or null">
63+
This is the environment tag of the user group. Possible values are 'Customer'
64+
and 'Testing'
65+
</ResponseField>
66+
67+
</Expandable>
68+
69+
</ResponseField>
70+
71+
<RequestExample>
72+
73+
```bash Example Request
74+
curl --location --request PUT 'https://api.mintlify.com/api/user' \
75+
--header 'Content-Type: application/json' \
76+
--header 'Authorization: Token <token>' \
77+
--data-raw '{
78+
"user_group_id": "example_1",
79+
"name": "Example 1",
80+
"mapping": {"40": "213", "134": "386"},
81+
"properties": {"filterValue": "value"}
82+
}'
83+
```
84+
85+
</RequestExample>
86+
87+
<ResponseExample>
88+
89+
```json Response
90+
{
91+
"success": 1,
92+
"user_group": {
93+
"team_id": 113,
94+
"token": "<user_group_token_to_auth_dashboard>",
95+
"name": "ok",
96+
"provided_id": "6"
97+
}
98+
}
99+
```
100+
101+
</ResponseExample>

0 commit comments

Comments
 (0)