You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: documentation/README.md
+45-28Lines changed: 45 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,34 +4,50 @@ You can access Dotkernel API documentation by importing the provided collection
4
4
5
5
## Requirements
6
6
7
-
*[Postman](https://www.postman.com/downloads/)
8
-
*[Bruno](https://www.usebruno.com/)
7
+
-[Postman](https://www.postman.com/downloads/)
8
+
-[Bruno](https://www.usebruno.com/)
9
9
10
10
## Setup
11
11
12
12
At this point, we assume you already have an API client installed (Postman or Bruno).
13
13
The following steps will be performed in the API client.
14
14
15
-
### Import project files
15
+
### Import the Collection and Environment
16
16
17
-
For Postman:
17
+
#### For Postman
18
18
19
-
* click**File** -> **Import** -> **Upload Files**
20
-
* navigate to the [documentation](/documentation) directory
21
-
* select both [Dotkernel_API.postman_collection.json](/documentation/Dotkernel_API.postman_collection.json) and [Dotkernel_API.postman_environment.json](/documentation/Dotkernel_API.postman_environment.json)
- Navigate to the [documentation](/documentation) directory.
21
+
- Select **both**[Dotkernel_API.postman_collection.json](/documentation/Dotkernel_API.postman_collection.json) and [Dotkernel_API.postman_environment.json](/documentation/Dotkernel_API.postman_environment.json).
22
+
- Click**Import**.
23
23
24
-
For Bruno:
24
+
#### For Bruno using the Bruno Export Zip
25
25
26
26
- Open the `My Workspace` dropdown and select `Import workspace`.
27
-
- Either click-and-drag the `Dotkernel_API.zip` over the form or navigate to it via the `choose a file` link.
27
+
- Either click-and-drag the [Dotkernel_API_Bruno.zip](/documentation/Dotkernel_API_Bruno.zip) file over the form or navigate to it via the `choose a file` link.
28
28
- Click the `Import` button.
29
29
30
-
You should see a new collection (`Dotkernel_API`) added to your collection list, containing the documentation of all Dotkernel API endpoints.
30
+
#### For Bruno using Postman Files
31
31
32
-
Also, you should see a new environment (`Dotkernel_API`) added to your environments.
33
-
This contains a variable, called `APPLICATION_URL` set to `http://api.dotkernel.localhost` by default.
34
-
If your application runs on a different URL/port (virtualhost), modify this variable accordingly.
32
+
> Bruno also supports the Postman files we used for the Postman import.
33
+
> If you have already imported the collection using the `.zip` file, you can skip this step.
34
+
35
+
**Alternatively** import the collection by following these steps:
36
+
37
+
- Click on `+` next to `Collection` and select `Import Collection`.
38
+
- Import [Dotkernel_API.postman_collection.json](/documentation/Dotkernel_API.postman_collection.json) to save the endpoints.
39
+
- Select the new collection, then click on `0 collection environments`.
40
+
- Either click-and-drag the [Dotkernel_API.postman_environment.json](/documentation/Dotkernel_API.postman_environment.json) file over the form or navigate to it via the `Import your environments` link to save it to the collection.
41
+
42
+
### Collection Contents
43
+
44
+
If the import process completed successfully, you should have:
45
+
46
+
- A new collection (`Dotkernel_API`) containing the documentation of all Dotkernel API endpoints.
47
+
- A new environment (`Dotkernel_API`) with the Application URL and OAuth2 tokens (empty by default, then overwritten by the API client).
48
+
49
+
> The environment contains a variable, called `APPLICATION_URL` set to `http://api.dotkernel.localhost` by default.
50
+
> If your application runs on a different URL/port (virtualhost), modify this variable accordingly.
35
51
36
52
## Usage
37
53
@@ -40,20 +56,21 @@ Calling an endpoint must include an access token sent via the `Authorization` he
40
56
41
57
### Add a new request (endpoint)
42
58
43
-
* Right-click on the parent directory you want to create the request inside, then click **Add Request**.
44
-
* Enter the request name and description.
45
-
* Select the proper request method:
46
-
***DELETE**: if you are deleting an item.
47
-
***GET**: if you are viewing an item or a list of items.
48
-
***PATCH**: if you are (partially) updating an item.
49
-
***PUT**: depending on if it exists or not, update or create an item.
50
-
***POST**: if you are creating an item.
51
-
* If needed, add query parameters (`Params` tab).
52
-
* Enter request URL (eg: `{{APPLICATION_URL}}/example`): you can use the existing `APPLICATION_URL` environment variable by placing it between double curly braces.
53
-
* Select body (`Body` tab) format based on the data your endpoint expects:
54
-
* Use **none** if no data will be sent to this endpoint.
55
-
* Use **form-data** if besides form data, this endpoint accepts file attachments as well.
56
-
* Use **raw** (also, set Content-Type to **JSON**) for creating/updating items.
59
+
- Right-click on the parent directory you want to create the request inside, then click `Add Request` (or `New Request`).
60
+
- Enter the request name and the description, if available.
61
+
- Select the request method:
62
+
-`DELETE` if you are deleting an item.
63
+
-`GET` if you are viewing an item or a list of items.
64
+
-`PATCH` if you are (partially) updating an item.
65
+
-`PUT` depending on if it exists or not, update or create an item.
66
+
-`POST` if you are creating an item.
67
+
- Enter request URL (eg: `{{APPLICATION_URL}}/example`): you can use the existing `APPLICATION_URL` environment variable by placing it between double curly braces.
68
+
- If needed, add query parameters (`Params` tab).
69
+
- Select body (`Body` tab) format based on the data your endpoint expects:
70
+
- Use `none` or `no body` if no data will be sent to this endpoint.
71
+
- Use `form-data` or `Multipart Form` if besides form data, this endpoint accepts file attachments as well.
72
+
- Use `raw`, then `JSON` for creating/updating items in a JSON format.
73
+
- Click `Send` to send the request.
57
74
58
75
The `Authorization` header will be included automatically for new requests (under `Authorization` tab: `Type` is set to `Inherit auth from parent`).
59
76
If your request needs to be public (accessible by guest users), you need to set `Type` to `No Auth`.
0 commit comments