---
title: Create Pipeline Via Config File
slug: tp-api/create-pipeline-via-config-file
docTags: 
createdAt: 2023-12-26T14:37:58.070Z
---

{
  "id": "ev2ZI1k0w2UwMUjjNnqKW",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "{{url}}/api/portal/external/pipeline/via-config",
    "servers": [
      {
        "url": "{{url}}/api/portal/external/pipeline/via-config",
        "description": "Development environment"
      }
    ],
    "name": "Create Pipeline Via Config File",
    "description": "<p>With this API, a new pipeline can be created by uploading a configuration file to the system.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "schema": [
            {
              "name": "file",
              "kind": "required",
              "type": "string<binary>",
              "example": ""
            }
          ],
          "isExpanded": true
        }
      ],
      "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": "dhM4MUvpOAgI31UllOL9x",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url {{url}}/api/portal/external/pipeline/via-config \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"file\": \"\"\n     }'"
        },
        {
          "id": "NlbyUhF1Fb0xU4HxECMBI",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"file\": \"\"\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"{{url}}/api/portal/external/pipeline/via-config\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "5T1-NTCxsl7OZqNp9_wlC",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/api/portal/external/pipeline/via-config\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"file\": \"\"\n})\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "XjYQH_4V_rMxj-BTK33-y",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"{{url}}/api/portal/external/pipeline/via-config\"\n\npayload = json.dumps({\n   \"file\": \"\"\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "dhM4MUvpOAgI31UllOL9x"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// OK\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "id": "YjuuWcvXoAlCTCCleSIsd",
      "type": "paragraph",
      "children": [
        {
          "text": "With this API, a new pipeline can be created by uploading a configuration file to the system.",
          "id": "3WW0nRNEVaYX7NxjnPYdW"
        }
      ]
    }
  ]
}