... | @@ -52,7 +52,7 @@ Example: |
... | @@ -52,7 +52,7 @@ Example: |
|
}
|
|
}
|
|
```
|
|
```
|
|
|
|
|
|
If a valid combination of username, password, and the domain is given, a **bearer token** is returned which can be used to authorize the public API requests.
|
|
If a valid combination of username, password, and the domain is given; a **bearer token** is returned which can be used to authorize the public API requests.
|
|
|
|
|
|
### 2.5 Items
|
|
### 2.5 Items
|
|
The logic of the API is divided into a number of items. Each item described a group on which we can perform certain actions. For example, with the item App we can create new apps in [portal.robotsindeklas.nl](https://portal.robotsindeklas.nl) or copy and/or share existing apps with your users.
|
|
The logic of the API is divided into a number of items. Each item described a group on which we can perform certain actions. For example, with the item App we can create new apps in [portal.robotsindeklas.nl](https://portal.robotsindeklas.nl) or copy and/or share existing apps with your users.
|
... | @@ -80,11 +80,14 @@ The API can return a few different status codes depending on if the call was suc |
... | @@ -80,11 +80,14 @@ The API can return a few different status codes depending on if the call was suc |
|
### Examples
|
|
### Examples
|
|
The most common library in Python to make API requests is the library [`requests`](https://docs.python-requests.org/en/latest/). The requests library isn’t part of the standard Python library, so you’ll need to install it to get started.
|
|
The most common library in Python to make API requests is the library [`requests`](https://docs.python-requests.org/en/latest/). The requests library isn’t part of the standard Python library, so you’ll need to install it to get started.
|
|
|
|
|
|
If you use pip to manage your Python packages, you can install requests using the following command:
|
|
If you use pip to manage your Python packages, you can install `requests` using the following command:
|
|
|
|
|
|
```
|
|
```
|
|
pip install requests
|
|
pip install requests
|
|
```
|
|
```
|
|
|
|
|
|
|
|
The following code will make a request to obtain a valid Bearer token and then create a new app with the name 'Demo app':
|
|
|
|
|
|
```python
|
|
```python
|
|
import requests
|
|
import requests
|
|
|
|
|
... | | ... | |