---
title: Remove Pipeline
slug: tp-api/remove-pipeline
docTags: 
createdAt: 2023-12-26T14:37:58.070Z
---

{
  "id": "JiFtBRupi1nL8PTZppIIM",
  "type": "api-oas-v2",
  "data": {
    "method": "DELETE",
    "url": "{{url}}/api/portal/external/worker/{workerId}/remove-pipeline/{pipelineId}",
    "servers": [
      {
        "url": "{{url}}/api/portal/external/worker/{workerId}/remove-pipeline/{pipelineId}",
        "description": "Development environment"
      }
    ],
    "name": "Remove Pipeline",
    "description": "This API is used to unmatch a pipeline that is assigned to a worker.",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "workerId",
          "type": "string"
        },
        {
          "kind": "required",
          "name": "pipelineId",
          "type": "string"
        }
      ],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "cookieAuth",
          "name": "SESSION",
          "kind": "optional",
          "type": "apiKey",
          "in": "cookie"
        },
        {
          "id": "tokenAuth",
          "name": "X-XSRF-TOKEN",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "OK",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "DmjS9-qEzSrN01ELXeM6v",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request DELETE \\\n     --url {{url}}/api/portal/external/worker/{workerId}/remove-pipeline/{pipelineId} \\\n     --header 'accept: application/json'"
        },
        {
          "id": "N2PtxoHIoM-xVlm_8QPuT",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'DELETE',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"{{url}}/api/portal/external/worker/{workerId}/remove-pipeline/{pipelineId}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "YsSn_wEJvRb6lnulHMQK5",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/api/portal/external/worker/{workerId}/remove-pipeline/{pipelineId}\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "tmQMlhpd-K1w_uD7EtQs5",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"{{url}}/api/portal/external/worker/{workerId}/remove-pipeline/{pipelineId}\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"DELETE\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "DmjS9-qEzSrN01ELXeM6v"
    },
    "results": {
      "languages": [
        {
          "id": "4Tq6IdjLdnhv0R8GnTuif",
          "language": "200",
          "code": "// OK\n"
        }
      ],
      "selectedLanguageId": "4Tq6IdjLdnhv0R8GnTuif"
    }
  },
  "children": [
    {
      "id": "IUxdZ3HoqCqEsJ8re7Pvh",
      "type": "paragraph",
      "children": [
        {
          "text": "This API is used to unmatch a pipeline that is assigned to a worker.",
          "id": "r6wNOpjMJ0rmV9SuQW4M2"
        }
      ]
    }
  ]
}