Console Events
Events allow users to be notified when certain operations are performed in the Console.
Event types
All the events triggered by the Console share some common properties:
Property | Value | Description |
---|---|---|
eventName | string | The name of the event, usually in the form of subject_action |
eventTimestamp | number | The timestamp of the event emission |
payload | object | Contains the event-specific payload |
Project Created
This event will be triggered when a project is created successfully.
Event payload
Property | Value | Description |
---|---|---|
tenantId | string | The identifier of the Company the Project belongs to |
projectId | string | The identifier of the newly created Project |
- Example
- JSON Schema
{
"eventName": "project_created",
"eventTimestamp": 123456,
"payload": {
"tenantId": "my-company-id",
"projectId": "0000000000000001"
}
}
{
"additionalProperties": false,
"properties": {
"eventName": {
"const": "project_created",
"type": "string"
},
"eventTimestamp": {
"type": "number"
},
"payload": {
"additionalProperties": false,
"properties": {
"projectId": {
"type": "string",
"description": "The identifier of the Project that was created"
},
"tenantId": {
"type": "string",
"description": "The identifier of the Company the Project belongs to"
}
},
"required": ["tenantId", "projectId"],
"type": "object"
}
},
"required": ["eventName", "eventTimestamp", "payload"],
"type": "object"
}
Service Created
This event will be triggered when a microservice is successfully generated from a marketplace template or example.
note
The event is triggered as soon as the service's repository is successfully created, hence there is no guarantee that the service will be found in the project configuration, yet.
Event payload
Property | Value | Description |
---|---|---|
tenantId | string | The identifier of the tenant to which the project belongs |
projectId | string | The identifier of the tenant to which the project belongs |
repositoryURL | string | The URL of the repository that hosts the service code |
serviceName | string | The name of the service inside the project configuration |
templateId | string | The identifier of the template in the Console marketplace from which the service was created |
- Example
- JSON Schema
{
"eventName": "service_created",
"eventTimestamp": 123456,
"payload": {
"tenantId": "my-company-id",
"projectId": "0000000000000001",
"repositoryURL": "http://gihub.com/my-repository",
"serviceName": "my-service",
"templateId": "0000000000000002"
}
}
{
"additionalProperties": false,
"properties": {
"eventName": {
"const": "service_created",
"type": "string"
},
"eventTimestamp": {
"type": "number"
},
"payload": {
"additionalProperties": false,
"properties": {
"tenantId": {
"type": "string",
"description": "The identifier of the Company the service belongs to"
},
"projectId": {
"type": "string",
"description": "The identifier of the Project the service belongs to"
},
"repositoryURL": {
"type": "string",
"description": "The URL of the repository that hosts the service code"
},
"serviceName": {
"type": "string",
"description": "The name of the service inside the project configuration"
},
"templateId": {
"type": "string",
"description": "The identifier of the template in the Console marketplace from which the service was created"
}
},
"required": ["projectId", "serviceName", "repositoryURL", "templateId"],
"type": "object"
}
},
"required": ["eventName", "eventTimestamp", "payload"],
"type": "object"
}