Users Group
  • 31 May 2022
  • 10 Minutes to read
  • Contributors
  • Dark
    Light
  • PDF

Users Group

  • Dark
    Light
  • PDF

Create Users Group

Method for creating new Users Group.

postman Download our collection of Postman queries to see more examples of Corezoid API v2.

URL

https://api.corezoid.com/api/2/json/{API_LOGIN}/{TIMESTAMP}/{SIGNATURE}

Request Body

{
    "ops": [
         {
            "type": "create",
            "obj": "group",
            "obj_type": "admins",
            "title": {{TITLE}},
            "company_id": {{COMPANY_ID}}
            }
        ]
    }
Parameter Type Required Description Possible value
ops JSON Object + The list of operations to proceed via Corezoid API. A parameter keeping JSON objects with operations * The number is user-limited by RPS limit
type string + A request type for creating Users Group create
obj string + An object of the request group
obj_type string + An creating User Group type admins, supers, company
title string + A Name for creating Users Group Any valid string
company_id string + An ID of a Company, where Users Group will be created An ID of an existing Company

Response Body

{
    "request_proc": "ok",
    "ops": [
        {
            "id": "",
            "proc": "ok",
            "obj": "group",
            "obj_id": 127993
        }
    ]
}
Parameter Type Description Possible value
request_proc string The overall processing status of all transactions from the request ok, error
ops array The list of request results
id string Request ID empty
proc string The processing status of a specific operation ok, error
obj string An object of request group
obj_id number An ID of created Users Group

Show Users Groups of Company

Method for showing list of Users Groups of Company.

URL

https://api.corezoid.com/api/2/json/{API_LOGIN}/{TIMESTAMP}/{SIGNATURE}

Request Body

{
  "ops": [
    {
      "type": "list",
      "obj": "company_users",
      "filter": "group",
      "sort": "title",
      "order": "desc",
      "company_id": {{COMPANY_ID}}
    }
  ]
}
Parameter Type Required Description Possible value
ops JSON Object + The list of operations to proceed via Corezoid API. A parameter keeping JSON objects with operations * The number is user-limited by RPS limit
type string + A request type for create API Key list
obj string + An object of request company_users
filter string + A filtering criterion api_key, user, group, shared
sort array - Name of field to sort result title
order string - Sort the result in ascending or descending order asc, desc
company_id string + An ID of an Company, where API Keys stored An ID of an existing Company

Respons body

{
    "request_proc": "ok",
    "ops": [
        {
            "id": "",
            "proc": "ok",
            "obj": "company_users",
            "list": [
                {
                    "obj_id": 128047,
                    "size": 3,
                    "title": "Nice Guys",
                    "type": "admins",
                    "create_time": 1596448311,
                    "owner_id": 76370,
                    "owner_name": "New API v2",
                    "is_owner": true
                },
                ....
            ]
        }
    ]
}
Parameter Type Description Possible value
request_proc string The overall processing status of all transactions from the request ok, error
ops array The list of request results
id string Request ID empty
proc string The processing status of a specific operation ok, error
obj string An object of request group
list array An array witt list of Users Group
list[].obj_id number An ID of Users Group
list[].size number A number of users in Users Group
list[].title string A name of Users Group
list[].type string A type of Users Group supers, admins, company
list[].create_time number Timestamp of Group creation 1596448311
list[].owner_id number An ID of Users Group owner ---
list[].owner_name string A displaying name of Users Group owner ---
list[].is_owner boolean Flag of ownership over Users Group by current User true, false

Delete Users Group

Method for deleting Users Group.

URL

https://api.corezoid.com/api/2/json/{API_LOGIN}/{TIMESTAMP}/{SIGNATURE}

Request Body

{
  "ops": [
    {
      "type": "delete",
      "obj": "group",
      "obj_id": {{USERS_GROUP_ID}},
      "company_id": {{COMPANY_ID}}
    }
  ]
}
Parameter Type Required Description Possible value
ops JSON Object + The list of operations to proceed via Corezoid API. A parameter keeping JSON objects with operations * The number is user-limited by RPS limit
type string + A request type for deleting Users Group delete
obj string + An object of the request group
obj_id number / number as string + An ID of an Users Group that you want to delete An ID of an existing Users Group
company_id string + An ID of a Company, where Users Group stored An ID of an existing Company

Response Body

{
    "request_proc": "ok",
    "ops": [
        {
            "id": "",
            "proc": "ok",
            "obj": "group",
            "obj_id": 127993
        }
    ]
}
Parameter Type Description Possible value
request_proc string The overall processing status of all transactions from the request ok, error
ops array The list of request results
id string Request ID empty
proc string The processing status of a specific operation ok, error
obj string An object of request group
obj_id number An ID of deleted Users Group

Add an Existing User to Existing User Group

Method for adding an existing User to an existing User Group.

URL

https://api.corezoid.com/api/2/json/{API_LOGIN}/{TIMESTAMP}/{SIGNATURE}

Request Body

{
  "ops": [
    {
      "type": "link",
      "obj": "user",
      "obj_id": {{USER_ID}},
      "group_id": {{USERS_GROUP_ID}},
      "level": 1,
      "company_id": {{COMPANY_ID}}
    }
  ]
}
Parameter Type Required Description Possible value
ops JSON Object + The list of operations to proceed via Corezoid API. A parameter keeping JSON objects with operations * The number is user-limited by RPS limit
type string + A request type for adding User to Users Group link
obj string + An object of request user
obj_id number / number as string + An ID of an User that you want to add to Users Group An ID of an existing User
group_id number / number as string + An ID of an Users Group that you want to add User An ID of an existing Users Group
company_id string + An ID of a Company, where Users Group stored An ID of an existing Company
level number + 1

Response Body

{
    "request_proc": "ok",
    "ops": [
        {
            "id": "",
            "proc": "ok",
            "obj": "user",
            "logins": [
                {
                    "type": "api",
                    "login": "5f23e2db82ba96377a0f20ff",
                    "key": "xen9EVG0vLUXVKnYIRMKMkMEaG8o0Kl8Z6xTMbiU9SBMjlRdN8",
                    "obj_id": 113139
                }
            ],
            "obj_id": 76335
        }
    ]
}
Parameter Type Description Possible value
request_proc string The overall processing status of all transactions from the request ok, error
ops array The list of request results
id string Request ID empty
proc string The processing status of a specific operation ok, error
obj string An object of request user
obj_id number An ID of Users Group
logins array An array with added user logins ---
type string A type of login corezoid, google, phone, api, fb, git
login string A desctibing login
key string (ONLY FOR API KEYS) A Secret of API Key
obj_id number An ID of login

Show Users of the User Group

Method for showing list of User of Users Group.

URL

https://api.corezoid.com/api/2/json/{API_LOGIN}/{TIMESTAMP}/{SIGNATURE}

Request Body

{
  "ops": [
    {
      "type": "list",
      "obj": "group",
      "obj_id": {{USERS_GROUP_ID}},,
      "list_obj": "user",
      "sort": "title",
      "order": "asc",
      "company_id": {{COMPANY_ID}}
    }
  ]
}
Parameter Type Required Description Possible value
ops JSON Object + The list of operations to proceed via Corezoid API. A parameter keeping JSON objects with operations * The number is user-limited by RPS limit
type string + A request type for getting list of Users of Users Group list
obj string + An object of request group
obj_id number / number as string + An ID of an User that you want to add to Users Group An ID of an existing User
list_obj number / number as string + An ID of an Users Group that you want to add User An ID of an existing Users Group
sort array - Name of field to sort result title
order string - Sort the result in ascending or descending order asc, desc
company_id string + An ID of a Company, where Users Group stored An ID of an existing Company

Response Body

{
    "request_proc": "ok",
    "ops": [
        {
            "id": "",
            "obj": "group",
            "obj_id": 127994,
            "owner_id": 76281,
            "owner_name": "API v2",
            "proc": "ok",
            "list": [
                {
                    "obj": "user",
                    "obj_id": 76335,
                    "title": "Google app",
                    "logins": [
                        {
                            "type": "api",
                            "login": "5f23e2db82ba96377a0f20ff",
                            "key": "h4GSNZKvkyi7L1IyyzMT8O0Pj56xPX2rxNrbvaO6y20205ZPX",
                            "obj_id": 113139
                        }
                    ]
                },
                {
                    "obj": "user",
                    "obj_id": 76322,
                    "title": "API v1",
                    "logins": [
                        {
                            "type": "api",
                            "login": "5f22db9f513aa01f9a02c0eb",
                            "key": "jjHzTzSc9Hr8EwaKvrsdGoyLOAtNm4rAarGydEiMGNtZjpUhfg",
                            "obj_id": 113125
                        }
                    ]
                }
            ]
        }
    ]
}
Parameter Type Description Possible value
request_proc srting The overall processing status of all transactions from the request ok, error
ops array The list of request results
id string Request ID empty
proc string The processing status of a specific operation ok, error
obj string An object of request user
obj_id number An ID of Users Group
owner_id number An ID of Users Group owner
owner_name string A displayed name of Users Group owne
list array An array of Users of Users Group
list[].obj string A User type user
list[].obj_id number An ID of User
list[].title string A displayed name of User
list[].logins array An arrau of User logins
list[].logins[].type string A type of login corezoid, google, phone, api, fb, git
list[].logins[].login string A displaying user login
list[].logins[].key string (ONLY FOR API KEYS) A Secret of API Key
list[].logins[].obj_id number An ID of login

Show User his Shared Users Group

Method for showing list of Shared Users Groups of Company.

URL

https://api.corezoid.com/api/2/json/{API_LOGIN}/{TIMESTAMP}/{SIGNATURE}

Request Body

{
  "ops": [
    {
      "type": "list",
      "obj": "company_users",
      "filter": "shared",
      "sort": "title",
      "order": "desc",
      "company_id": {{COMPANY_ID}}
    }
  ]
}
Parameter Type Required Description Possible value
ops JSON Object + The list of operations to proceed via Corezoid API. A parameter keeping JSON objects with operations * The number is user-limited by RPS limit
type string + A request type for deleting User to Users Group link
obj string + An object of request user
filter sring + A filtering criterion
sort array - Name of field to sort result title
order string - Sort the result in ascending or descending order asc, desc
company_id string + An ID of an Company, where Users Group stored An ID of an existing Company

Response Body

{
    "request_proc": "ok",
    "ops": [
        {
            "id": "",
            "proc": "ok",
            "obj": "company_users",
            "list": [
                {
                    "obj_id": 128047,
                    "size": 3,
                    "title": "Nice Guys",
                    "type": "admins",
                    "create_time": 1596448311,
                    "owner_id": 76370,
                    "owner_name": "New API v2",
                    "is_owner": true
                },
                ....
            ]
        }
    ]
}
Parameter Type Description Possible value
request_proc string The overall processing status of all transactions from the request ok, error
ops array The list of request results
id string Request ID empty
proc string The processing status of a specific operation
obj string An object of request
list array An array witt list of Users Group
list[].obj_id number An ID of Users Group
list[].size number A number of users in Users Group
list[].title string A name of Users Group
list[].type string A type of Users Group supers, admins, company
list[].create_time number Timestamp of Group creation 1596448311
list[].owner_id number An ID of Users Group owner ---
list[].owner_name string A displaying name of Users Group owner ---
list[].is_owner boolean Flag of ownership over Users Group by current User true, false

Delete User from Users Group

Method for deleting User from Users Group.

URL

https://api.corezoid.com/api/2/json/{API_LOGIN}/{TIMESTAMP}/{SIGNATURE}

Request Body

{
  "ops": [
    {
      "type": "link",
      "obj": "user",
      "obj_id": {{API_KEY_ID}},
      "group_id": {{USERS_GROUP_ID}},
      "level": "", 
      "company_id": {{COMPANY_ID}}
    }
  ]
}
Parameter Type Required Description Possible value
ops JSON Object + The list of operations to proceed via Corezoid API. A parameter keeping JSON objects with operations * The number is user-limited by RPS limit
type string + A request type for deleting User from Users Group link
obj_id number / number as string + An ID of an User that you want to delete from Users Group An ID of an existing User
obj string + An object of the request user
group_id number / number as string + An ID of an Users Group that you want to delete User from An ID of an existing Users Group
level number / number as string - ""
company_id string + An ID of an Company, where Users Group stored An ID of a existing Company

Response Body

  {
    "request_proc": "ok",
    "ops": [
                 {
                    "id": "",
                    "proc": "ok",
                    "obj": "user",
                    "obj_id": 76335,
                    "logins": [
                  {
                    "type": "api",
                    "login": "5f23e2db82ba96377a0f20ff",
                     "key": "h4GSNZKvkyi7L1IyyzMT8O0Pj56xPX2rxNrbvaO6y20205ZPX",
                     "obj_id": 113139
                   }
                               ]
                }
          ]
   }
Parameter Type Description Possible value
request_proc string The overall processing status of all transactions from the request ok, error
ops array The list of request results
id string Request ID empty
proc string The processing status of a specific operation ok, error
obj string An object of request user
obj_id number An ID of Users Group
logins array An array of User logins
logins[].type string A type of login corezoid, google, phone, api, fb, git
logins[].login string A displaying user login
logins[].key string (ONLY FOR API KEYS) A Secret of API Key
logins[].obj_id number An ID of login

Was this article helpful?