Actions with Users in Company
  • 08 Jun 2022
  • 2 Minutes to read
  • Contributors
  • Dark
    Light
  • PDF

Actions with Users in Company

  • Dark
    Light
  • PDF

Create a new user and share an object with this user

Method for creating a new user in company and sharing an object with that user.

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": "invite",
      "login": {{USER_EMAIL}},
      "login_type": "google",
      "company_id": {{COMPANY_ID}}      
    }
  ]
}
Parameter Type Description Required 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 Company create
obj string + An object of request invite
login string + An Email address of User that you want to add to the Company Valid email string
login_type string - A type of User login corezoid (recommended), google
link_to_obj string - Type of the object that is shared with a created user group, project, stage, conv, folder, dashboard, instance
link_to_obj_id number - Shared object ID
company_id string + Company ID An ID of an existing Company

Response Body


    {
    "request_proc": "ok",
    "ops": [
        {
            "id": "",
            "obj": "invite",
            "url": "https://admin.corezoid.com/api/2/plugins/invite/fe509a6e212f324a5a9be0030av5100ecfde6e45b",
            "proc": "ok"
        }
    ]
}

Show Users of Company

Method for showing all users of company.

URL

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

Request body

{
  "ops": [
    {
      "type": "list",
      "obj": "company_users",
      "filter": "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 list
obj string + An object of request company_users
filter string + A filtering criterion user, api_key, 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 an Company An ID of an existing Company

Response body

{
    "request_proc": "ok",
    "ops": [
        {
            "id": "",
            "proc": "ok",
            "obj": "company_users",
            "list": [
                {
                    "obj_id": 51531,
                    "title": "Sofiya Dovarskaya",
                    "logins": [
                        {
                            "obj_id": 106777,
                            "type": "google",
                            "login": "sonya.dovarskaya@klickklack.com"
                        },
                        ...
                    ],
                    "status": "actived",
                    "is_superadmin": false,
                    "groups": [
                        {
                            "id": 198047,
                            "name": "TableT8"
                        },
                        ....
                    ]
                },
                ....
            ]
        }
    ]
}
Parameter Type Description Possible value
requst_proc string The overall processing of all transaction 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 company_users
list array An invite link for joining company
list.obj_id number An ID of an User ---
list.title string A described name of User ---
list.logins array An array of User Logins
list.logins.obj_id number An ID of an Login ---
list.logins.type string A type of an Login google, phone
list.logins.login string A described name of Login ---
list.status string The User status actived, blocked
list.is_superadmin boolean Flag of user Superadmin role true, false
list.groups array The list of Groups to which user belongs
list.groups.id number An ID of the Group
list.groups.name string A Name of the Group

Was this article helpful?

What's Next