API Key
  • 30 Mar 2022
  • 3 Minutes to read
  • Contributors
  • Dark
    Light
  • PDF

API Key

  • Dark
    Light
  • PDF

Create new API Key

Method for creating API Keys.

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": "user",
      "title": {{API_KEY_NAME}},
      "logins": [
        {
          "type": "api"
        }
      ],
      "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 create
obj string + An object of request user
title string + A Name for creating API Key Any valid string
logins array + The list of login types
logins[].type string + Type of created API Key api
company_id string + An ID of an Company, where API Key will be created An ID of an existing Company

Response Body

{
    "request_proc": "ok",
    "ops": [
        {
            "id": "",
            "obj": "user",
            "proc": "ok",
            "users": [
                {
                    "obj_id": 76332,
                    "title": "Here we go again",
                    "logins": [
                        {
                            "type": "api",
                            "key": "h4GSZNqPvkyi7L1IyyzMe8OtPj56xPX2rxNrbvaO6y20075ZPX",
                            "obj_id": 113135
                        }
                    ]
                }
            ]
        }
    ]
}
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
user array The list request result
users.obj_id number An ID of API Key
users.title string A name of API Key
users.logins array The list logins of API Key
users.logins.type string --- api
users.logins.key string A secret of API Key
users.logins.obj_id number An ID of API Key Login

Show API Keys

Method for getting list of API Keys of Company.

URL

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

Request Body

{
  "ops": [
    {
      "type": "list",
      "obj": "company_users",
      "filter": "api_key",
      "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 a Company, where API Keys stored An ID of an existing Company

Response Body

{
    "request_proc": "ok",
    "ops": [
        {
            "id": "",
            "proc": "ok",
            "obj": "company_users",
            "list": [
                {
                    "obj_id": 76322,
                    "title": "API v1",
                    "logins": [
                        {
                            "key": "jjHzTzSc9Hr8EwaKvrsdGoyLOAtNm4rAarGydEiMGNtZjpUhfg",
                            "obj_id": 141433,
                            "type": "api",
                            "login": "5f22db9f513aa01f9a02c0eb"
                        }
                    ]
                },
                ....
                    ]
                }
            ]
        }
    ]
}
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 company_users
list array The list request result
list.obj_id number An ID of API Key
list.title string A name of API Key
list.logins array The list logins of API Key
list.logins.key string A secret of API Key
list.logins.obj_id number An ID of API Key Login
list.logins.type string --- api
list.logins.login string An login of API Key

Delete API Key

Method for deleting API Key of Company.

URL

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

Request Body

{
  "ops": [
    {
      "type": "delete",
      "obj": "user",
      "obj_id": {{API_KEY_ID}},
      "group_id": {{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 delete API Key delete
obj number / number as sting + An object of request user
obj_id string + An ID of API Key
group_id string + The Users Group ID, from wich you want to delete API Key 0 or an ID of an existing Users Group
level string -
company_id string + An ID of an Company, where API Key stored An ID of an existing Company

Response Body

{
    "request_proc": "ok",
    "ops": [
        {
            "id": "",
            "proc": "ok",
            "obj_id": 76334,
            "company_id": "i666182908"
        }
    ]
}
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_id string An of deleted API Key
company_id string An ID of an Company, where API Key stored

What's Next