{% extends 'generic/object.html' %} {% load helpers %} {% load static %} {% block javascript %} {{ block.super }} {% endblock %} {% block breadcrumbs %} {{ block.super }} {% endblock %} {% block content %}
Credential Set
{% if object.last_used %} {% endif %}
Name {{ object.name }}
Description {% if object.description %}{{ object.description }}{% else %}{% endif %}
Owner {{ object.owner }}
Username {{ object.username }}
Password •••••••• (encrypted)
Created {{ object.created|date:"SHORT_DATETIME_FORMAT" }}
Last Modified {{ object.last_updated|date:"SHORT_DATETIME_FORMAT" }}
Last Used {{ object.last_used|date:"SHORT_DATETIME_FORMAT" }}
Credential Token

Credential Token:

{% if object.platforms.exists %}
Associated Platforms
    {% for platform in object.platforms.all %}
  • {{ platform.name }}
  • {% endfor %}
{% endif %}
API Usage Example

Execute commands using both NetBox API token (for authentication) and credential token (for device access):

curl command example
curl -X POST "https://netbox.example.com/api/plugins/netbox-toolkit-plugin/commands/1/execute/" \
-H "Authorization: Token <your-netbox-api-token>" \
-H "Content-Type: application/json" \
-d '{
"device_id": 1,
"credential_token": "{% if object.raw_token %}{{ object.raw_token|slice:':8' }}{% else %}{{ object.access_token|slice:':8' }}{% endif %}..."
}'
Note: You need both tokens - your NetBox API token for authentication and this credential token to access the stored device credentials.
{% endblock %}