Skip to content

Commit 1bac9bc

Browse files
committed
added Bruno collection, updated readme
Signed-off-by: bidi <bidi@apidemia.com>
1 parent d3d7553 commit 1bac9bc

2 files changed

Lines changed: 35 additions & 25 deletions

File tree

documentation/Dotkernel_API.zip

18.5 KB
Binary file not shown.

documentation/README.md

Lines changed: 35 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,45 +5,55 @@ You can access Dotkernel API documentation by importing the provided collection
55
## Requirements
66

77
* [Postman](https://www.postman.com/downloads/)
8+
* [Bruno](https://www.usebruno.com/)
89

910
## Setup
1011

11-
At this point, we assume you already have Postman installed.
12-
The following steps will be performed in Postman.
12+
At this point, we assume you already have an API client installed (Postman or Bruno).
13+
The following steps will be performed in the API client.
1314

1415
### Import project files
1516

17+
For Postman:
18+
1619
* click **File** -> **Import** -> **Upload Files**
1720
* navigate to the [documentation](/documentation) directory
1821
* 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)
1922
* click **Import**
2023

24+
For Bruno:
25+
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.
28+
- Click the `Import` button.
29+
2130
You should see a new collection (`Dotkernel_API`) added to your collection list, containing the documentation of all Dotkernel API endpoints.
2231

2332
Also, you should see a new environment (`Dotkernel_API`) added to your environments.
24-
This contains a variable, called `APPLICATION_URL` set to `http://0.0.0.0:8080`.
25-
If your application runs on a different URL/port, modify this variable accordingly.
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.
2635

2736
## Usage
2837

29-
Dotkernel API Endpoints are secured with OAuth2, this means that calling an endpoint requires an access token being sent via the `Authorization` header (edit collection root directory and look under `Authorization` tab).
30-
31-
### Add a new request
32-
33-
* right-click on the parent directory you want to create the request inside, then click **Add Request**
34-
* enter name and description for your request
35-
* select the proper request method:
36-
* **DELETE**: if you are deleting an item
37-
* **GET**: if you are viewing an item or a list of items
38-
* **PATCH**: if you are (partially) updating an item
39-
* **PUT**: depending on if it exists or not, update or create an item
40-
* **POST**: if you are creating an item
41-
* if needed, add query parameters (`Params` tab)
42-
* enter request URL (eg: `{{APPLICATION_URL}}/example`): you can use the existing `APPLICATION_URL` environment variable by placing it between double curly braces
43-
* select body (`Body` tab) format based on the data your endpoint expects:
44-
* use **none** if no data will be sent to this endpoint
45-
* use **form-data** if besides form data, this endpoint accepts file attachments as well
46-
* use **raw** (also, set Content-Type to **JSON**) for creating/updating items
47-
48-
New requests added to the collection will not require adding the `Authorization` header because by default it is inherited from parent directories (under `Authorization` tab: `Type` is set to `Inherit auth from parent`).
49-
If your request should be accessible by guest users, you need to set `Type` to `No Auth`.
38+
Dotkernel API Endpoints are secured with OAuth2.
39+
Calling an endpoint must include an access token sent via the `Authorization` header (see the `Authorization` or `Auth` tab in the collection).
40+
41+
### Add a new request (endpoint)
42+
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.
57+
58+
The `Authorization` header will be included automatically for new requests (under `Authorization` tab: `Type` is set to `Inherit auth from parent`).
59+
If your request needs to be public (accessible by guest users), you need to set `Type` to `No Auth`.

0 commit comments

Comments
 (0)