import axios from 'axios';

// 公共路径
const urlPrefix = '/api/v1/bpms-workbench';

// 容器注册/容器配置
export function containerRegister(params) {
  return axios.post(`${urlPrefix}/userContainer/register`, params);
}

// 根据组件实例ID启动容器
export function startContainer(deployEnvId) {
  return axios.get(`${urlPrefix}/userContainer/${deployEnvId}/start`);
}

// 根据组件实例ID停止容器
export function stopContainer(deployEnvId) {
  return axios.get(`${urlPrefix}/userContainer/${deployEnvId}/stop`);
}

// 根据组件实例ID获取容器数据
export function getContainer(deployEnvId) {
  return axios.get(`${urlPrefix}/userContainer/${deployEnvId}/get`);
}