Deployment Tracking With HTTP Request

This endpoint allows you to create a deployment for an organization with specified parameters.

This endpoint enables the creation of a deployment for a specific organization. It accepts various parameters to define the deployment details such as title, branch, commit ID, etc.

POST https://api.iftrue.co/v1/organization/deployment

Request Body

title

string

Yes

Title of the deployment.

changelog

string

No

Changelog content for the deployment.

url

string

No

The link to reach details of the deployment, eg: Github Releases

branch

string

Yes

Name of the branch that merged to production branch

commit_id

string

Yes

last commit id of the commits pushed for that deployment.

deployment_duration

number

No

Time takes to create the deployment, in minutes.

is_fix

boolean

No

If the deployment contains bug fixes that are not urgent (will affect mean time to recover and change failure rate.)

false

is_hotfix

boolean

No

If the deployment solely made to fix immediate bug in production (will affect mean time to recover and change failure rate.)

false

is_forced

boolean

No

if the deployment has been forced by someone.

false

commits_count

number

No

Number of commits included in the deployment.

0

repository_url

string

Yes

URL of the repository.

member_id

string

Yes

ID of the external member initiating the deployment.

pull_request_number

number

Yes

Number of the associated pull request.

deployment_node_id

string

No (Required for GitHub)

The deployment id that git provider of choice assigned.

status

enum

No

Status of the deployment. Possible values: succes, in_progress, fail.

succes

Response

Upon successful creation of the deployment, the response will contain the details of the created deployment.

FieldTypeDescription

id

uuid

Unique identifier for the deployment.

triggered_by

enum

Trigger type of the deployment.

title

string

Title of the deployment.

changelog

string

Changelog for the deployment.

is_hotfix

boolean

Indicates whether it is a hotfix.

is_forced

boolean

Indicates whether it is a forced deployment.

commits_count

number

Number of commits included in the deployment.

organization_id

uuid

ID of the organization associated with the deployment.

repository_id

uuid

ID of the repository associated with the deployment.

pusher_id

uuid

ID of the member initiating the deployment.

created_at

timestamp

Date and time when the deployment was created.

updated_at

timestamp

Date and time when the deployment was last updated.

status

enum

Status of the deployment. Possible values: succes, in_progress, fail.

url

string

URL related to the deployment.

branch

string

Branch name for the deployment.

commit_id

string

ID of the commit.

deployment_duration

number

Duration of the deployment in seconds.

node_id

string

ID of the deployment node.

is_fix

boolean

Indicates whether it is a fix.

Default Values

FieldDefault Value

is_fix

false

is_hotfix

false

is_forced

false

commits_count

0

status

succes

Response

Upon successful creation of the deployment, the endpoint returns a deployment record.

Authorization

This endpoint requires JWT authorization. The JWT token should be included in the request header. You can get token from the iftrue team.

Example Request

POST /v1/organization/deployment HTTP/1.1
Host: API_URL
Authorization: Bearer <JWT_TOKEN>
Content-Type: application/json

{
	"title": "New Deployment",
	"changelog": "#241 PR Merged",
	"url": "<https://github.com/example>",
	"branch": "master",
	"commit_id": "fa9bce58bac99d1186f00d90881dd7b1e7a3acfd",
	"deployment_duration": 1220,
	"is_fix": true,
	"is_hotfix": false,
	"is_forced": true,
	"commits_count": 5,
	"member_id": "aef23f76-9e33-679d-a92c-ff7321f61bb8",
	"pull_request_number": 241,
	"repository_url": "<https://github.com/example/repo>",
	"deployment_node_id": "sw52f5ff5ddf66=",
	"status": "succes"
}

Example Response

{
  "id": "......",
  "triggered_by": "webhook",
  "title": "New Deploy",
  "changelog": "#222 PR Merged",
  "is_hotfix": false,
  "is_forced": false,
  "is_fix": false,
  "commits_count": 5,
  "organization_id": "......",
  "repository_id": "......",
  "pusher_id": "......",
  "url": "......",
  "branch": "master",
  "commit_id": "..sha..",
  "deployment_duration": 10,
  "node_id": "...",
  "status": "fail"
}

This documentation provides detailed information on how to use the API along with an example request and response. If you encounter any issues or need further assistance, please feel free to email us at:

hackers@iftrue.co

Last updated