Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
135
noc
Commits
f8692752
Commit
f8692752
authored
Aug 26, 2020
by
EKbfh
🐼
Browse files
Merge branch 'add-docs-for-api' into 'master'
Add more images for apikey docs See merge request
noc/noc!4229
parents
987c65c0
20109435
Changes
3
Hide whitespace changes
Inline
Side-by-side
docs/src/en/images/apikey_edit_api.png
0 → 100644
View file @
f8692752
28.9 KB
docs/src/en/images/apikey_edit_api_acl.png
0 → 100644
View file @
f8692752
8.22 KB
docs/src/en/reference/apikey.rst
View file @
f8692752
...
...
@@ -20,6 +20,9 @@ Usage
Client *MUST* set `Private-Token` HTTP Request header and set it
with proper *Key* in order to get access to protected API
Example: `curl -s -D - -k -H 'Private-Token: 12345' https://noc_url/api/datastream/managedobject` ,
where 12345 is an API token key.
Roles
-----
...
...
@@ -62,7 +65,7 @@ NBI API
+-----------------------+----------------------------------------------------------------+
| API:Role | Description |
+===========================
+
============================================================+
+=======================
+
================================================================+
| `nbi:config` | :ref:`NBI config API <api-nbi-config>` access |
+-----------------------+----------------------------------------------------------------+
| `nbi:configrevisions` | :ref:`NBI configrevisions API <api-nbi-configrevisions>` access|
...
...
@@ -78,6 +81,24 @@ NBI API
| `nbi:telemetry` | :ref:`NBI telemetry API <api-nbi-telemetry>` access |
+-----------------------+----------------------------------------------------------------+
.. _reference-apikey-web-interface:
Web interface example
---------------------
You should fill `Name` and `API key` as required fields.
Also in `API` rows should be `nbi` or `datastream`. In `Role` row should be a role from tables above or `*` (asterisk)
.. image:: /images/apikey_edit_api.png
You can fill the ACL section or may leave it empty.
Prefix field should be in a IP/net way.
.. image:: /images/apikey_edit_api_acl.png
Also there is an opportunity to allow requests to API only from whitelist IPs.
You can find this option in Tower, in `nbi`/`datastream` service respectively.
.. _reference-apikey-best-practices:
Best Practices
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment