Group API Endpoint

0

Groups are used to organize access to content (categories and articles) based on assigning categories and users to groups, or excluding them from groups.

A group is a logical association that categories and users can be assigned to. For example, if a category is assigned to a group named "top-secret", then only users also assigned to that group (via user_groups) can access any articles within that category. Readers are typically unaware of which groups they are members of, only content editors and other staff are able to see and edit groups.

Groups that are assigned the special public_access flag will be visible to anonymous readers visiting your knowledge base, so you can decide which content anonymous or registered users can access.

Using the Group API, you can programmatically create and edit group objects to organize these from your own applications and scripts. Possible uses include controlling access to content, importing data from external sources, or exporting content for backup or any other purpose.


The group object


Attributes


group_id

This is the unique numeric reference for the group object. This can be used to identity an group in a number of API calls

This value is immutable and cannot be changed.


name

A helpful title that is associated with the group that can be helpful when assigning categories or users to certain groups.

You should limit the length of this to be as short as practical.


description

A lengthier description of the group. This may be helpful for documenting things like criteria for assignment, etc. without making the name value too complex.

This field can be as verbose as needed.


public_access

A boolean value of true or false indicating whether the group's associated categories (and articles they contain) can be seen by anonymous readers or visitors to your knowledge base site.

Only assign a true value to public_access for groups that you are comfortable exposing to anonymous or non-logged-in users.

 Language: json
{
	"group_id": 42,
	"name": "Public Access",
	"description": "Articles and categories that can be viewed without requiring user registration",
	"public_access": true
}




Retrieve a groupGET /group

Returns one or more groups matching the specified criteria

Required parameters


None. If no parameters are specified, all groups for the current account will be returned.


Optional parameters


group_id

Unique numeric identifier for a specific group object to be returned.


public_access

A value of "true" or "false" to filter the returned group result matching the public_access flag set to the specified value.

For example, if this parameters is "true", only groups will be returned that have their public_access flag set to true.


limit

Optional limit on the number of objects to be returned, between 1 and 100

If this parameter is not provided, a default limit of 100 will be applied, returning the maximum of 100 items.


fetch_offset

A cursor to use for pagination. Defines the numeric offset from where results should begin being fetched.

For example, if you were working with a large number of records, and wanted to fetch them in pages of 10 at a time, you might set the limit value to 10 (indicating only 10 records at a time should be returned) and for the first page, fetch_offset would be 0 to indicate no offset (returning records 1-10).

For the second page, fetch_offset would be set to 10, allowing records 11-20 to be returned.

If this parameter is not provided, a default fetch_offset of 0 will be applied, returning records from the start of the result set.

 Language: bash [ Line Numbers Enabled ]
curl -X GET https://api.gogoworx.com/group \
    -H "x-api-key: qI9CSNml2mwL7zPVpwLW4WBJPCmTcIkBKeCQL1t7" \
    -H "x-account-uuid: sitename/02fccd86-18e8-4816-a52c-bd3bf9f8446e" \
    -d '{"public_access": "true", "limit": 20}'

Response (containing specified articles):

 Language: json
[{
	"group_id": 42,
	"name": "Public Access",
	"description": "Articles and categories that can be viewed without requiring user registration",
	"public_access": true
},
{
	"group_id": 43,
	"name": "Public Access 2",
	"description": "Another public group",
	"public_access": true
}]




Create a groupPOST /group

Creates a new group based on the specified criteria.

Note that the group_id value will be automatically assigned

Required parameters


name

A helpful title that is associated with the group that can be helpful when assigning categories or users to certain groups.

You should limit the length of this to be as short as practical, while being descriptive.


description

A lengthier description of the group. This may be helpful for documenting things like criteria for assignment, etc. without making the name value too complex.

This field can be as verbose as needed.


Optional parameters


public_access

A boolean value of "true" or "false" indicating whether the group's associated categories (and articles they contain) can be seen by anonymous readers or visitors to your knowledge base site.

 Language: bash [ Line Numbers Enabled ]
curl -X POST https://api.gogoworx.com/group \
    -H "x-api-key: qI9CSNml2mwL7zPVpwLW4WBJPCmTcIkBKeCQL1t7" \
    -H "x-account-uuid: sitename/02fccd86-18e8-4816-a52c-bd3bf9f8446e" \
    -d '{"name": "New Group", "description": "new group description", \
        "public_access": "false"}'

Response (containing newly created group object):

 Language: json
[{
	"group_id": 44,
	"name": "New Group",
	"description": "new group description",
	"public_access": false
}]




Update a groupPUT /group

Updates a single, specified group based on the parameters provided

Required parameters


group_id

Unique numeric identifier for a specific group object to be updated.

This value is immutable and cannot be changed.


Optional parameters


name

A  helpful title that is associated with the group that can be helpful when assigning categories or users to certain groups.

You should limit the length of this to be as short as practical, while being descriptive.


description

A lengthier description of the group. This may be helpful for documenting things like criteria for assignment, etc. without making the name value too complex.

This field can be as verbose as needed.


public_access

A boolean value of "true" or "false" indicating whether the group's associated categories (and articles they contain) can be seen by anonymous readers or visitors to your knowledge base site.

 Language: bash [ Line Numbers Enabled ]
curl -X PUT https://api.gogoworx.com/group \
    -H "x-api-key: qI9CSNml2mwL7zPVpwLW4WBJPCmTcIkBKeCQL1t7" \
    -H "x-account-uuid: sitename/02fccd86-18e8-4816-a52c-bd3bf9f8446e" \
    -d '{"group_id": 44, "name": "Modified Group Name"}'

Response (containing the updated object):

 Language: json
[{
	"group_id": 44,
	"name": "Modified Group Name",
	"description": "new group description",
	"public_access": false
}]




Delete a groupDELETE /group

Deletes a single, specified group based on the specified group_id.

Note that once deleted, a group can no longer be accessed. All associated user_groups and category_groups referencing the deleted group will be removed.

Required parameters


The group_id parameter must be specified to uniquely identify the group to be deleted


Optional parameters


None
 Language: bash [ Line Numbers Enabled ]
curl -X DELETE https://api.gogoworx.com/group \
    -H "x-api-key: qI9CSNml2mwL7zPVpwLW4WBJPCmTcIkBKeCQL1t7" \
    -H "x-account-uuid: sitename/02fccd86-18e8-4816-a52c-bd3bf9f8446e" \
    -d '{"group_id": 44}'

Response (containing empty array):

 Language: json
[]