API Reference - Tag Groups

Link: https://support.brilliantdirectories.com/support/solutions/articles/12000108060

← Back to API Reference | Getting Started

Tag Groups

Tag Groups are containers that organize tags into named sets. Each tag belongs to a tag group, allowing administrators to create structured taxonomies for classifying members and other content.

Model name in URL: tag_groups — DB table: tag_groups

The Tag Group Object

FieldTypeDescription
idintegerUnique tag group ID (primary key, read-only)
group_tag_namestringThe name of the tag group
added_byintegerUser ID of the user who created this tag group
updated_byintegerUser ID of the user who last updated this tag group
created_atdatetimeTimestamp when this tag group was created
updated_atdatetimeTimestamp when this tag group was last updated

List Tag Group Records

GET /api/v2/tag_groups/get

Returns a paginated list of tag group records.

Example Request

Copy
curl -X GET "https://www.yourdomain.com/api/v2/tag_groups/get?limit=25" \
  -H "X-Api-Key: your-api-key-here"

Example Response

Copy
{
  "status": "success",
  "message": [
    {
      "id": "1",
      "group_tag_name": "Custom Tags",
      "added_by": "27",
      "updated_by": "27",
      "created_at": "2024-06-04 16:35:35",
      "updated_at": "2024-06-04 16:35:35"
    },
    {
      "id": "2",
      "group_tag_name": "Specializations",
      "added_by": "27",
      "updated_by": "27",
      "created_at": "2024-06-04 18:28:22",
      "updated_at": "2024-06-04 18:28:22"
    }
  ],
  "total": "2",
  "current_page": 1,
  "total_pages": 1
}

Retrieve a Tag Group Record

GET /api/v2/tag_groups/get/{id}

Example Request

Copy
curl -X GET "https://www.yourdomain.com/api/v2/tag_groups/get/1" \
  -H "X-Api-Key: your-api-key-here"

Example Response

Copy
{
  "status": "success",
  "message": [
    {
      "id": "1",
      "group_tag_name": "Custom Tags",
      "added_by": "27",
      "updated_by": "27",
      "created_at": "2024-06-04 16:35:35",
      "updated_at": "2024-06-04 16:35:35"
    }
  ],
  "total": "2",
  "current_page": 1,
  "total_pages": 1
}

Create a Tag Group Record

POST /api/v2/tag_groups/create

Example Request

Copy
curl -X POST "https://www.yourdomain.com/api/v2/tag_groups/create" \
  -H "X-Api-Key: your-api-key-here" \
  -d "group_tag_name=Certifications" \
  -d "added_by=1" \
  -d "updated_by=1"

Example Response

Copy
{
  "status": "success",
  "message": {
    "id": "3",
    "group_tag_name": "Certifications",
    "added_by": "1",
    "updated_by": "1",
    "created_at": null,
    "updated_at": null
  }
}

Update a Tag Group Record

PUT /api/v2/tag_groups/update

Example Request

Copy
curl -X PUT "https://www.yourdomain.com/api/v2/tag_groups/update" \
  -H "X-Api-Key: your-api-key-here" \
  -d "id=3" \
  -d "group_tag_name=Professional+Certifications"

Example Response

Copy
{
  "status": "success",
  "message": {
    "id": "3",
    "group_tag_name": "Professional Certifications",
    "added_by": "1",
    "updated_by": "1",
    "created_at": "0000-00-00 00:00:00",
    "updated_at": "0000-00-00 00:00:00"
  }
}

Delete a Tag Group Record

DELETE /api/v2/tag_groups/delete

Example Request

Copy
curl -X DELETE "https://www.yourdomain.com/api/v2/tag_groups/delete" \
  -H "X-Api-Key: your-api-key-here" \
  -d "id=3"

Example Response

Copy
{
  "status": "success",
  "message": "tag_groups record was deleted"
}