# File Groups in Xpansiv Data ## Overview File groups in Xpansiv Data are collections of files organized under a common structure. They allow users to: - Manage access levels (Read, Write, Share). - Define metadata fields for files. - Organize files by project, asset type, or workflow. Groups ensure secure and efficient collaboration by providing logical grouping and permission control. ## 1. List File Groups Retrieve all groups you are entitled to, or search for specific groups using query parameters. ### HTTP Request `GET https://api.data.xpansiv.com/file/group` ### Examples ```shell curl -X GET "https://api.data.xpansiv.com/file/group?from=0&size=10&query=value1&writeOnly=false" ``` > List all groups you are entitled to. ```shell curl -X GET "https://api.data.xpansiv.com/file/group?from=0&size=10&query=&writeOnly=false" ``` > List all groups containing the 'searchString' that you can read/write. ```shell curl -X GET "https://api.data.xpansiv.com/file/group?query=name=*&withSymbol=true" ``` > List file groups which have symbols. ### Response ```json { "from": 0, "totalSize": 1, "items": [ { "access": "group access level [R|W|S], sample: RW", "shared": false, "name": "group name", "description": "group description", "fields": [ { "name": "field name", "type": "field type [string|int|float|date|array]", "defaultValue": "field value" },{ "name": "field name 2", "type": "field type 2 [string|int|float|date|array]" } ] } ] } ``` ### URL Parameters | Parameter | Description | | --- | --- | | from | Optional. Index where list starts, used to load data in chunks. Default value is 0. | | size | Optional. Number of records to return. Max size is 1000. Default size is 100. | | query | Value of the description, name or fields to look for. | | writeOnly | If true, only groups to which user has write access are returned. | | withSymbol | If true, only groups which have some symbols are returned. | | sortBy | Field by which the results will be sorted. Either createdOn or name. Default is createdOn. | | sortOrder | Order in which items will be returned. Available values: asc or desc. Default is desc. | ## 2. Group Details Retrieve details about a specific file group. ### HTTP Request `GET https://api.data.xpansiv.com/file/group/{name}` ### Example ```shell curl "https://api.data.xpansiv.com/file/group/{name}" -H "Authorization: Bearer yourNgToken" ``` ### Response ```json { "name": "group name", "description": "group description", "fields": [ { "name": "field name", "type": "field type [string|int|float|date|array]" },{ "name": "field name 2", "type": "field type 2 [string|int|float|date|array]", "defaultValue": "field value" } ] } ``` ### URL Parameter | Parameter | Description | | --- | --- | | name | Name of the group to retrieve |