Configure webhook
SEI supports custom CI/CD integrations through webhooks. Use this for CI/CD tools that don't have a dedicated SEI integration, such as Jenkins and GitHub Actions.
Configure the webhook API call according to the following webhook specifications.
Webhook specification
Method:
POST
Base URL:
https://api.levelops.io/v1/custom-cicd
(Relative to the environment that you are using)Header: Requires Bearer token key authorization. The content type is
application/json
Body: Contains a data object with
request_type
andpayload
.
Post CI/CD data to SEI
POST
https://api.levelops.io/v1/custom-cicd
Headers
Name | Type | Description |
---|---|---|
Authorization* | Bearer <BEARER_TOKEN>' | |
Content-Type* | application/json |
Request Body
Name | Type | Description |
---|---|---|
Data* | "{"pipeline":"Node.js CI","user_id":"SCMTrigger","repo_url":"https://api.github.com/users/rajpropelo","start_time":1679467494000,"result":"success","duration":77000,"build_number":4487150517,"instance_guid":"89d2491c-764a-4f77-93d9-18e8e372b795","instance_name":"Jenkins Instance","instance_url":"https://jenkins.dev.levelops.io/","job_run":{"stages":[{"displayName":"Build_Stage","displayDescription":"Build_Stage","result":"succeeded","state":"completed","durationInMillis":5000,"steps":[{"displayName":"BUILD_STEP","displayDescription":"BUILD_STEP","result":"succeeded","state":"completed","durationInMillis":5000}]}]},"job_full_name":"Node.js CI--readme updated","qualified_name":"Node.js CI--readme updated","branch_name":"master","module_name":null,"scm_commit_ids":["64be72b2c1f7d2a33082f98a40a848880fcdcd5e"],"job_run_params":[{"type":"StringParameterValue","name":"version","value":1},{"type":"StringParameterValue","name":"revision","value":1}],"ci":true,"cd":false,"artifacts":[{"input":false,"output":true,"type":"container","location":"http://generated/image/location","name":"image1","qualifier":"1"}],"trigger_chain":[{"id":"SCMTrigger","type":"SCMTriggerCause"}]}" |
Here is an example of a request:
Please note that the API endpoint URL mentioned in the webhook specifications is relative to the environment you are using. You will need to replace it with the actual URL that are specific to your environment.
Payload fields
Payload is an object with required and optional fields.
Required Fields
Field | Data Type | Description |
---|---|---|
| string | The name of the CI/CD job. |
| string | A human-readable identifier for the job, often the same as the pipeline name. |
| string | A qualified name for the job, typically the same as the pipeline name. |
| string | The identifier for the CI/CD instance (not the UUID). |
| string | UUID (Universally Unique Identifier) for the CI/CD instance. To generate a UUID for the integration you can use the API https://api.levelops.io/v1/custom-cicd |
| integer | Job start time in epoch milliseconds. |
| integer | Job duration in milliseconds. |
| string | The result of the job, either SUCCESS or FAILURE |
Optional Fields
Field | Data Type | Description |
---|---|---|
| string | |
| array | An array of parameters associated with the job run. |
| array of strings | An array of commit ids related to the deployment |
| string | The URL of the repository related to the job. |
| integer | The build number associated with the job. |
| string | URL of the CI/CD instance. |
| object | Information about the job run, including stages, steps, and their results. |
| string | The name of the module related to the job |
| boolean | One is true and the other is false, depending on whether this is for a CI job or a CD job. |
| array of objects | An array of information about the job run, including input, output, type, location, name, qualifier, hash, and metadata. |
| array of objects | Information about the chain of triggers. |
| string | The name of the branch related to the job. |
| string | The name of the project related to the job. |
| string | Unique identifier for the specific job execution |
| boolean | Status of the CFR stage |
| List<String> | List of the theme names |
Here is an example payload:
Last updated