Control Events REST API (1.0)

Download OpenAPI specification:Download

Control Events Public REST API.

In All api need add header Authoriztion: Bearer [AccessToken]

Authentication

OAuth2

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

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

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 [AccessTolen]

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 [AccessTolen]

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 [AccessTolen]

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)
header Parameters
Authorization
required
string

Authorization header. Bearer [AccessTolen]

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
https://api.control.events/v/1.0/events

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 [AccessTolen]

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 [AccessTolen]

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 [AccessTolen]

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 [AccessTolen]

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":
    [
    ]
}