---
title: Create Components
slug: telemetry-pipeline/create-components
docTags: 
createdAt: 2023-12-26T14:37:58.070Z
---

{
  "id": "hEFMhgrO4VqcNA3l6RaIY",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "{{url}}/api/portal/external/components",
    "servers": [
      {
        "url": "{{url}}/api/portal/external/components",
        "description": "Development environment"
      }
    ],
    "name": "Create Components",
    "description": "This API empowers users to create source and destination components on the Kron DSP platform.",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "array",
          "customType": "ComponentDTO[]",
          "schema": [
            {
              "name": "id",
              "kind": "optional",
              "type": "string",
              "example": ""
            },
            {
              "name": "name",
              "kind": "optional",
              "type": "string",
              "example": ""
            },
            {
              "name": "componentType",
              "kind": "optional",
              "type": "object",
              "modelRef": "#/components/schemas/ComponentTypeDTO",
              "customType": "ComponentTypeDTO",
              "schema": [
                {
                  "name": "categoryName",
                  "kind": "optional",
                  "type": "string",
                  "example": ""
                },
                {
                  "name": "vendorName",
                  "kind": "optional",
                  "type": "string",
                  "example": ""
                },
                {
                  "name": "elementTypeId",
                  "kind": "optional",
                  "type": "string",
                  "example": ""
                },
                {
                  "name": "elementTypeName",
                  "kind": "optional",
                  "type": "string",
                  "example": ""
                },
                {
                  "name": "properties",
                  "kind": "optional",
                  "type": "object",
                  "example": "",
                  "schema": [
                    {
                      "name": "empty",
                      "kind": "optional",
                      "type": "boolean",
                      "example": ""
                    }
                  ]
                },
                {
                  "name": "totalCount",
                  "kind": "optional",
                  "type": "integer<int32>",
                  "example": 0
                },
                {
                  "name": "activeCount",
                  "kind": "optional",
                  "type": "integer<int32>",
                  "example": 0
                }
              ]
            },
            {
              "name": "isActive",
              "kind": "optional",
              "type": "boolean",
              "example": ""
            },
            {
              "name": "properties",
              "kind": "optional",
              "type": "object",
              "example": "",
              "schema": []
            },
            {
              "name": "active",
              "kind": "optional",
              "type": "boolean",
              "example": ""
            }
          ],
          "modelRef": "#/components/schemas/ComponentDTO",
          "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": "0xuLy_WW5cLTgtSKp2uah",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url {{url}}/api/portal/external/components \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '[\n     {}\n     ]'"
        },
        {
          "id": "w_AxvSUaIny2RJJhW_t9H",
          "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   {}\n]);\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"{{url}}/api/portal/external/components\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "i9RxQrNamqREmcrXPmgKy",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/api/portal/external/components\")\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   {}\n])\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "IT5pyZK31Kbz0OxG7Kdoh",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"{{url}}/api/portal/external/components\"\n\npayload = json.dumps([\n   {}\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": "0xuLy_WW5cLTgtSKp2uah"
    },
    "results": {
      "languages": [
        {
          "id": "Hr7f0tPWTvoV_RoSZXNAj",
          "language": "200",
          "code": "// OK\n"
        }
      ],
      "selectedLanguageId": "Hr7f0tPWTvoV_RoSZXNAj"
    }
  },
  "children": [
    {
      "id": "DKcC16NuBy-XoTHb2ueDp",
      "type": "paragraph",
      "children": [
        {
          "text": "This API empowers users to create source and destination components on the Kron DSP platform."
        }
      ]
    }
  ]
}