---
title: Fetch a single network by source id
slug: fetch-a-single-network-by-source-id
docTags: 
createdAt: 2024-08-13T18:19:32.495Z
---

{
  "id": "4fLXrjUr1M85WonpKlor0",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://data.onxecta.com/api/production/network/{sourceId}",
    "servers": [
      {
        "url": "https://data.onxecta.com/api/production/network/{sourceId}",
        "description": "AWS Cloud API Endpoint"
      },
      {
        "url": "http://localhost/api/production/network/{sourceId}",
        "description": "Local Testing API Endpoint"
      }
    ],
    "name": "Fetch a single network by source id",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "sourceId",
          "type": "string",
          "description": ""
        }
      ],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "bearerAuth",
          "name": "bearerAuth",
          "kind": "optional",
          "type": "http",
          "scheme": "bearer"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "OK",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "Network",
            "schema": [
              {
                "name": "xid",
                "kind": "required",
                "type": "string<uuid>",
                "description": "xecta unique identifier",
                "format": "uuid"
              },
              {
                "name": "sourceId",
                "kind": "required",
                "type": "string",
                "description": "Source ID for the network header. This sourceID enables upsert functionality from client source systems of record"
              },
              {
                "name": "type",
                "kind": "required",
                "type": "string",
                "description": "<p>Network type: PRODUCTION or INJECTION</p>",
                "modelRef": "#/components/schemas/NetworkType",
                "customType": "NetworkType",
                "schema": []
              },
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": "<p>Network name. Since the network can vary over time, the name is not required to be unique, but should be descriptive for end users</p>"
              },
              {
                "name": "date",
                "kind": "required",
                "type": "string<date-time>",
                "description": "Date at which the network name becomes valid. A given network name can have multiple versions over time",
                "format": "date-time"
              },
              {
                "name": "description",
                "kind": "required",
                "type": "string",
                "description": "Description to contextualize the network name"
              }
            ],
            "modelRef": "#/components/schemas/Network",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "o6Cl6gHupmPyfhlXk26Z9",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url https://data.onxecta.com/api/production/network/{sourceId} \\\n     --header 'accept: application/json'"
        },
        {
          "id": "wCGuSnHDlP5SAYT1myxvH",
          "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: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://data.onxecta.com/api/production/network/{sourceId}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "dLooBeY3C-wdDqpTlOJJ3",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://data.onxecta.com/api/production/network/{sourceId}\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        },
        {
          "id": "xvPDjSN0gTCkjH8hKZeHZ",
          "language": "csharp",
          "label": "C#",
          "code": "var options = new RestClientOptions(\"https://data.onxecta.com\")\n{\n   MaxTimeout = -1,\n};\nvar client = new RestClient(options);\nvar request = new RestRequest(\"/api/production/network/{sourceId}\", Method.Get);\nrequest.AddHeader(\"accept\", \"application/json\");\nrequest.AddHeader(\"content-type\", \"application/json\");\nRestResponse response = await client.ExecuteAsync(request);\nConsole.WriteLine(response.Content);"
        },
        {
          "id": "GNUJCkW6SqTLlEXLB6VdD",
          "language": "java",
          "label": "Java",
          "code": "OkHttpClient client = new OkHttpClient().newBuilder()\n   .build();\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"\");\nRequest request = new Request.Builder()\n   .url(\"https://data.onxecta.com/api/production/network/{sourceId}\")\n   .method(\"GET\", body)\n   .addHeader(\"accept\", \"application/json\")\n   .addHeader(\"content-type\", \"application/json\")\n   .build();\nResponse response = client.newCall(request).execute();"
        }
      ],
      "selectedLanguageId": "o6Cl6gHupmPyfhlXk26Z9"
    },
    "results": {
      "languages": [
        {
          "id": "x1nhwr3CYDCoqCQAol5db",
          "language": "200",
          "code": "// OK\n{\n  \"xid\": \"\",\n  \"sourceId\": \"\",\n  \"type\": \"\",\n  \"name\": \"\",\n  \"date\": \"\",\n  \"description\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "x1nhwr3CYDCoqCQAol5db"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}