Skip to main content

Services

GETapi/services

List all Services

This endpoint allows you to retrieve a list of all services.

Response Body

[
{
"id": "2d4bb3da-a3c2-4bb5-a2da-75482ad962d0",
"createdAt": "2023-03-24T14:24:36.043Z",
"updatedAt": "2023-03-24T14:24:36.043Z",
"name": "My Service",
"lastRunAt": "2023-03-25T14:00:00.000Z",
"awsEcsService": "My-ECS-Service-B2D131F4-Q4Nyej21pXj3",
"awsEcsServiceStaging": "My-ECS-Staging-B2D131F4-Q4Nyej21pXj3",
"triggerOnMain": true,
"triggerOnPrOpen": true,
"triggerOnPrSync": true,
"useStaging": false,
"autoDeploy": false,
"githubRepoUrl": "https://github.com/my-repo",
"unitTestCommand": "npm run test",
"integrationTestCommand": "npm run integration",
"codeQualityCommand": "npm run lint",
"dockerfilePath": "./dockerPath",
"dockerComposeFilePath": "./dockerComposePath",
"pipelineId": "d8583d1c-ce63-4e0c-bd55-2088409bc7e1"
}
]

GETapi/services/:serviceId

List a Service

This endpoint allows you to retrieve a single service using its id.

Response Body

{
"id": "2d4bb3da-a3c2-4bb5-a2da-75482ad962d0",
"createdAt": "2023-03-24T14:24:36.043Z",
"updatedAt": "2023-03-24T14:24:36.043Z",
"name": "My Service",
"lastRunAt": "2023-03-25T14:00:00.000Z",
"awsEcsService": "My-ECS-Service-B2D131F4-Q4Nyej21pXj3",
"awsEcsServiceStaging": "My-ECS-Staging-B2D131F4-Q4Nyej21pXj3",
"triggerOnMain": true,
"triggerOnPrOpen": true,
"triggerOnPrSync": true,
"useStaging": false,
"autoDeploy": false,
"githubRepoUrl": "https://github.com/my-repo",
"unitTestCommand": "npm run test",
"integrationTestCommand": "npm run integration",
"codeQualityCommand": "npm run lint",
"dockerfilePath": "./dockerPath",
"dockerComposeFilePath": "./dockerComposePath",
"pipelineId": "d8583d1c-ce63-4e0c-bd55-2088409bc7e1"
}

POSTapi/services

Create a Service

This endpoint allows you to add a new service. Properties shown in the request body are required.

Request Headers

  • Content-Type: application/json

Request Body

{
"name": "Another Service",
"awsEcsService": "Another-Service-B2D131F4-Q4Nyej21pXj3",
"awsEcsServiceStaging": "Another-Service-Staging-B2D131F4-Q4Nyej21pXj3",
"triggerOnMain": true,
"triggerOnPrOpen": true,
"triggerOnPrSync": true,
"useStaging": false,
"autoDeploy": false,
"githubRepoUrl": "https://github.com/another-repo",
"unitTestCommand": "npm run test",
"integrationTestCommand": "npm run integration",
"codeQualityCommand": "npm run lint",
"dockerfilePath": "./dockerPath",
"dockerComposeFilePath": "./dockerComposePath",
"pipelineId": "d8583d1c-ce63-4e0c-bd55-2088409bc7e1"
}

Response Body

{
"id": "b4db2074-a6d7-469c-8279-3eaa2bbd6f6d",
"createdAt": "2023-03-28T00:35:29.096Z",
"updatedAt": "2023-03-28T00:35:29.096Z",
"name": "Another Service",
"lastRunAt": null,
"awsEcsService": "Another-Service-B2D131F4-Q4Nyej21pXj3",
"awsEcsServiceStaging": "Another-Service-Staging-B2D131F4-Q4Nyej21pXj3",
"triggerOnMain": true,
"triggerOnPrOpen": true,
"triggerOnPrSync": true,
"useStaging": false,
"autoDeploy": false,
"githubRepoUrl": "https://github.com/another-repo",
"unitTestCommand": "npm run test",
"integrationTestCommand": "npm run integration",
"codeQualityCommand": "npm run lint",
"dockerfilePath": "./dockerPath",
"dockerComposeFilePath": "./dockerComposePath",
"pipelineId": "d8583d1c-ce63-4e0c-bd55-2088409bc7e1"
}

PATCHapi/services/:serviceId

Update a Service

This endpoint allows you to update a service. Add the properties to be updated in the request body.

Request Headers

  • Content-Type: application/json

Request Body

{
"name": "My Special Service"
}

Response Body

{}

DELETEapi/services/:serviceId

Delete a Service

This endpoint allows you to delete a service using its id.

Response Body

{
"id": "b4db2074-a6d7-469c-8279-3eaa2bbd6f6d",
"createdAt": "2023-03-28T00:35:29.096Z",
"updatedAt": "2023-03-28T00:35:29.096Z",
"name": "Another Service",
"lastRunAt": null,
"awsEcsService": "Another-Service-B2D131F4-Q4Nyej21pXj3",
"awsEcsServiceStaging": "Another-Service-Staging-B2D131F4-Q4Nyej21pXj3",
"triggerOnMain": true,
"triggerOnPrOpen": true,
"triggerOnPrSync": true,
"useStaging": false,
"autoDeploy": false,
"githubRepoUrl": "https://github.com/another-repo",
"unitTestCommand": "npm run test",
"integrationTestCommand": "npm run integration",
"codeQualityCommand": "npm run lint",
"dockerfilePath": "./dockerPath",
"dockerComposeFilePath": "./dockerComposePath",
"pipelineId": "d8583d1c-ce63-4e0c-bd55-2088409bc7e1"
}