Control Events REST API (1.0)

Download OpenAPI specification:Download

Control Events Public REST API.

Authentication

OAuth2

Control Events use the OAuth 2.0 protocol for authentication and authorization. Control Events supports common OAuth 2.0 scenarios such as those for web server, installed, and client-side applications.

If you want to make requests on behalf of other control.events users, you can register an OAuth application and have them grant permissions to your app.

Security scheme type: OAuth2
authorizationCode OAuth Flow
Authorization URL: https://account.corezoid.com/oauth2/authorize
Token URL: https://account.corezoid.com/oauth2/token
Scopes:
  • control.events:event.management -

    Create, update, and delete events

  • control.events:event.readonly -

    Read only events

  • control.events:users.readonly -

    Read only account users information

  • control.events:accounts.readonly -

    Read only all user accounts

  • control.events:reactions.readonly -

    Read only events reactions

  • control.events:reactions.management -

    Create, update, and delete events reactions

BearerAuth

You can generate API access_token for your own account from the Credentials page (Settings -> Credentials).

To use an API access_token to authenticate an API request, simply replace access_token in the following API endpoints with the string key, and pass the Authorization header:

Authorization: Bearer YOUR_ACCESS_TOKEN

Security scheme type: HTTP
HTTP Authorization Scheme bearer

users

Users API

Get all accounts users

Scopes [control.events:users.readonly]

Authorizations:
OAuth2 (control.events:users.readonly)
path Parameters
accId
required
string

Account Id

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Responses

200

Successful operation

400

Invalid input

401

Unauthorized

403

Access denied

500

Internal error

get /users/{accId}
https://api.control.events/v/1.0/users/{accId}

Request samples

Copy
curl --request GET \
  --url https://api.control.events/v/1.0/users/%7BaccId%7D \
  --header 'authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

application/json
Copy
Expand all Collapse all
{
  • "data":
    [
    ]
}

accounts

Accounts API

Get all users accounts

Scopes [control.events:accounts.readonly]

Authorizations:
OAuth2 (control.events:accounts.readonly)
header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Responses

200

Successful operation

400

Invalid input

401

Unauthorized

403

Access denied

500

Internal error

get /accounts
https://api.control.events/v/1.0/accounts

Request samples

Copy
curl --request GET \
  --url https://api.control.events/v/1.0/accounts \
  --header 'authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

application/json
Copy
Expand all Collapse all
{
  • "data":
    [
    ]
}

events

Events API

Get all user events

Scopes [control.events:event.readonly]

Authorizations:
OAuth2 (control.events:event.readonly)
query Parameters
accId
required
string

Account Id

orderBy
required
string
Enum:"created_at" "updated_at" "start_date" "reactions"

Events sorting mode

orderValue
required
string
Enum:"ASC" "DESC"

Sorting vector

status
required
string
Enum:"new" "deleted"

Events status

people
required
string

user id whose events we want to receive. Example: 54,32

limit
integer
Default: 15

Events limit list

offest
integer
Default: 0

offest says to skip that many rows before beginning to return rows

starred
boolean

Get favorite events

to
integer

Unixtime to which to receive all events

from
integer

Unixtime from which to receive all events

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Responses

200

Successful operation

400

Invalid input

401

Unauthorized

403

Access denied

500

Internal error

get /events
https://api.control.events/v/1.0/events

Request samples

Copy
curl --request GET \
  --url 'https://api.control.events/v/1.0/events?accId=SOME_STRING_VALUE&orderBy=SOME_STRING_VALUE&orderValue=SOME_STRING_VALUE&status=SOME_STRING_VALUE&people=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&offest=SOME_INTEGER_VALUE&starred=SOME_BOOLEAN_VALUE&to=SOME_INTEGER_VALUE&from=SOME_INTEGER_VALUE' \
  --header 'authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

application/json
Copy
Expand all Collapse all
{
  • "data":
    [
    ]
}

Create, update, delete events

Scopes [control.events:event.management]

Authorizations:
OAuth2 (control.events:event.management)
path Parameters
accId
required
string

Account ID

rootId
integer

Root ID. Parameter REQUIRED when editing an existing event tree

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Request Body schema: application/json

Events object

Array
action
string
Enum:"create" "update" "delete"
data
object

Responses

200

Successful operation

400

Invalid input

401

Unauthorized

403

Access denied

500

Internal error

post /events/{accId}
https://api.control.events/v/1.0/events/{accId}

Request samples

application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Response samples

application/json
Copy
Expand all Collapse all
{
  • "data":
    [
    ]
}

Get event by ID

Scopes [control.events:event.readonly]

Authorizations:
OAuth2 (control.events:event.readonly)
path Parameters
eventId
required
integer

Events ID

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Responses

200

Successful operation

400

Invalid input

401

Unauthorized

403

Access denied

500

Internal error

get /events/{eventId}
https://api.control.events/v/1.0/events/{eventId}

Request samples

Copy
curl --request GET \
  --url https://api.control.events/v/1.0/events/%7BeventId%7D \
  --header 'authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

application/json
Copy
Expand all Collapse all
{
  • "data":
    {
    }
}

reactions

Reactions API

Create reaction

Scopes [control.events:reactions.management]

Authorizations:
OAuth2 (control.events:reactions.management)
path Parameters
type
required
string
Enum:"comment" "reject" "workLog" "sign"

Events type

eventId
required
integer

Event Id

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Request Body schema: application/json
extra
object
parentId
integer

Responses

200

Successful operation

400

Invalid input

401

Unauthorized

403

Access denied

500

Internal error

post /reactions/{type}/{eventId}
https://api.control.events/v/1.0/reactions/{type}/{eventId}

Request samples

application/json
Copy
Expand all Collapse all
{
  • "extra":
    {
    },
  • "parentId": 0
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "data":
    {
    }
}

Get all events reactions

Scopes [control.events:reactions.readonly]

Authorizations:
OAuth2 (control.events:reactions.readonly)
path Parameters
eventId
required
integer

Event Id

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Responses

200

Successful operation

400

Invalid input

401

Unauthorized

403

Access denied

500

Internal error

get /reactions/list/{eventId}
https://api.control.events/v/1.0/reactions/list/{eventId}

Request samples

Copy
curl --request GET \
  --url https://api.control.events/v/1.0/reactions/list/%7BeventId%7D \
  --header 'authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

application/json
Copy
Expand all Collapse all
{
  • "data":
    [
    ]
}

Update reaction text

Scopes [control.events:reactions.management]

Authorizations:
OAuth2 (control.events:reactions.management)
path Parameters
reactionId
required
integer

Reaction Id

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Request Body schema: application/json
extra
object

Responses

200

Successful operation

400

Invalid input

401

Unauthorized

403

Access denied

500

Internal error

put /reactions/{reactionId}
https://api.control.events/v/1.0/reactions/{reactionId}

Request samples

application/json
Copy
Expand all Collapse all
{
  • "extra":
    {
    }
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "data":
    {
    }
}

Remove reaction

Scopes [control.events:reactions.management]

Authorizations:
OAuth2 (control.events:reactions.management)
path Parameters
reactionId
required
integer

Reaction Id

Responses

200

Successful operation

400

Invalid input

401

Unauthorized

403

Access denied

500

Internal error

delete /reactions/{reactionId}
https://api.control.events/v/1.0/reactions/{reactionId}

Request samples

Copy
curl --request DELETE \
  --url https://api.control.events/v/1.0/reactions/%7BreactionId%7D \
  --header 'authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

application/json
Copy
Expand all Collapse all
{
  • "data":
    [
    ]
}

tags

Tags API

Create, delete tags

Scopes [control.events:event.management]

Authorizations:
OAuth2 (control.events:event.readonly)
path Parameters
accId
required
string

Account ID

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Request Body schema: application/json

Tag object

Array
action
string
Enum:"create" "delete"
data
object

Responses

200

Successful operation

400

Invalid input

401

Unauthorized

403

Access denied

500

Internal error

post /tags/{accId}
https://api.control.events/v/1.0/tags/{accId}

Request samples

application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Response samples

application/json
Copy
Expand all Collapse all
{
  • "data":
    {
    }
}