From 1657d6a0b86ccdbf655f38b997ea327fcba0739e Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Thu, 5 Mar 2020 15:16:15 -0500 Subject: [PATCH] Add missing docs page for tags --- docs/additional-features/context-data.md | 2 +- docs/additional-features/tags.md | 25 +----------------------- docs/models/extras/tag.md | 24 +++++++++++++++++++++++ 3 files changed, 26 insertions(+), 25 deletions(-) create mode 100644 docs/models/extras/tag.md diff --git a/docs/additional-features/context-data.md b/docs/additional-features/context-data.md index 62d5d63f1..f80203898 100644 --- a/docs/additional-features/context-data.md +++ b/docs/additional-features/context-data.md @@ -1 +1 @@ -{!docs/models/extras/configcontext.md!} \ No newline at end of file +{!docs/models/extras/configcontext.md!} diff --git a/docs/additional-features/tags.md b/docs/additional-features/tags.md index f94957616..84f0f5573 100644 --- a/docs/additional-features/tags.md +++ b/docs/additional-features/tags.md @@ -1,24 +1 @@ -# Tags - -Tags are free-form text labels which can be applied to a variety of objects within NetBox. Tags are created on-demand as they are assigned to objects. Use commas to separate tags when adding multiple tags to an object (for example: `Inventoried, Monitored`). Use double quotes around a multi-word tag when adding only one tag, e.g. `"Core Switch"`. - -Each tag has a label and a URL-friendly slug. For example, the slug for a tag named "Dunder Mifflin, Inc." would be `dunder-mifflin-inc`. The slug is generated automatically and makes tags easier to work with as URL parameters. - -Objects can be filtered by the tags they have applied. For example, the following API request will retrieve all devices tagged as "monitored": - -``` -GET /api/dcim/devices/?tag=monitored -``` - -Tags are included in the API representation of an object as a list of plain strings: - -``` -{ - ... - "tags": [ - "Core Switch", - "Monitored" - ], - ... -} -``` +{!docs/models/extras/tag.md!} diff --git a/docs/models/extras/tag.md b/docs/models/extras/tag.md new file mode 100644 index 000000000..f94957616 --- /dev/null +++ b/docs/models/extras/tag.md @@ -0,0 +1,24 @@ +# Tags + +Tags are free-form text labels which can be applied to a variety of objects within NetBox. Tags are created on-demand as they are assigned to objects. Use commas to separate tags when adding multiple tags to an object (for example: `Inventoried, Monitored`). Use double quotes around a multi-word tag when adding only one tag, e.g. `"Core Switch"`. + +Each tag has a label and a URL-friendly slug. For example, the slug for a tag named "Dunder Mifflin, Inc." would be `dunder-mifflin-inc`. The slug is generated automatically and makes tags easier to work with as URL parameters. + +Objects can be filtered by the tags they have applied. For example, the following API request will retrieve all devices tagged as "monitored": + +``` +GET /api/dcim/devices/?tag=monitored +``` + +Tags are included in the API representation of an object as a list of plain strings: + +``` +{ + ... + "tags": [ + "Core Switch", + "Monitored" + ], + ... +} +```