> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dqlabs.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Source

> Source endpoints: Create Source, Get Source By Id, Get Sources, Update Source, Delete Source

<script type="application/ld+json">
  {`{
            "@context": "https://schema.org",
            "@type": "TechArticle",
            "headline": "Source",
            "description": "Source endpoints: Create Source, Get Source By Id, Get Sources, Update Source, Delete Source",
            "url": "https://docs.dqlabs.ai/api-reference/core/source",
            "publisher": {
              "@type": "Organization",
              "name": "DQLabs Inc",
              "logo": "https://media.brand.dev/332adc35-5bc4-4d2b-bf78-256aa4a5e414.svg"
            }
            }`}
</script>

<Tabs>
  <Tab title="Create Source">
    `POST /api/v1/core/source`

    Create a new source in the database.

    **Response**

    <ResponseField name="success" type="boolean">Whether the request completed successfully</ResponseField>

    <ResponseField name="message" type="string">Human-readable result message</ResponseField>

    <ResponseField name="timestamp" type="string">ISO 8601 server timestamp</ResponseField>

    <ResponseField name="correlation_id" type="string">Unique ID for this request</ResponseField>

    <ResponseField name="data" type="object">The endpoint's response payload.</ResponseField>

    **Example**

    <CodeGroup>
      ```bash cURL theme={null}
      curl -X POST "https://<your-workspace>.prizmdata.ai/api/v1/core/source" \
        -H "Authorization: Bearer <YOUR_API_TOKEN>" \
        -H "Content-Type: application/json" \
        -d '{}'
      ```
    </CodeGroup>

    ```json Response theme={null}
    {
      "success": true,
      "message": "Create a new source in the database.",
      "timestamp": "2026-09-21T09:43:50.316067+00:00",
      "correlation_id": "1bff0823-3db2-4b12-bf56-22ea8d38bba2",
      "data": {}
    }
    ```
  </Tab>

  <Tab title="Get Source By Id">
    `GET /api/v1/core/source/{sourceId}`

    Get a source by its ID.

    **Path Parameters**

    <ParamField path="sourceId" type="string" required={true}>
      Example: `3fa85f64-5717-4562-b3fc-2c963f66afa6`
    </ParamField>

    **Response**

    <ResponseField name="success" type="boolean">Whether the request completed successfully</ResponseField>

    <ResponseField name="message" type="string">Human-readable result message</ResponseField>

    <ResponseField name="timestamp" type="string">ISO 8601 server timestamp</ResponseField>

    <ResponseField name="correlation_id" type="string">Unique ID for this request</ResponseField>

    <ResponseField name="data" type="object">
      <ResponseField name="id" type="string">
        Example: `"1b2a2e97-f53c-4972-a7b1-a6252e38caa8"`.
      </ResponseField>

      <ResponseField name="name" type="string">
        Example: `"TEST_1789976065"`.
      </ResponseField>

      <ResponseField name="description" type="string" />

      <ResponseField name="type" type="string">
        Example: `"MSSQL"`.
      </ResponseField>

      <ResponseField name="credentials" type="object">
        <ResponseField name="port" type="string">
          Example: `"1433"`.
        </ResponseField>

        <ResponseField name="server" type="string">
          Example: `"jtK6xqqWK/C4pjEmR5XI+Q=="`.
        </ResponseField>

        <ResponseField name="database" type="string">
          Example: `"dqlabs"`.
        </ResponseField>

        <ResponseField name="password" type="string">
          Example: `"rWLRhftdEoNtHKqXE0NOdQ=="`.
        </ResponseField>

        <ResponseField name="username" type="string">
          Example: `"99DtYuGe6pwOr4zg4Ln/zA=="`.
        </ResponseField>

        <ResponseField name="auth_type" type="string">
          Example: `"username_password"`.
        </ResponseField>

        <ResponseField name="included_databases" type="string[]" />
      </ResponseField>

      <ResponseField name="config" type="object" />

      <ResponseField name="is_valid" type="boolean">
        Example: `true`.
      </ResponseField>

      <ResponseField name="is_active" type="boolean">
        Example: `true`.
      </ResponseField>

      <ResponseField name="is_api_connection" type="boolean">
        Example: `false`.
      </ResponseField>

      <ResponseField name="source_type_id" type="string">
        Example: `"e4a807dd-5d8d-431a-b292-73c47244fbea"`.
      </ResponseField>

      <ResponseField name="source_type" type="object">
        <ResponseField name="id" type="string">
          Example: `"e4a807dd-5d8d-431a-b292-73c47244fbea"`.
        </ResponseField>

        <ResponseField name="name" type="string">
          Example: `"MSSQL"`.
        </ResponseField>

        <ResponseField name="short_description" type="string">
          Example: `"It is nothing but SQL Server, use Relational Database"`.
        </ResponseField>

        <ResponseField name="long_description" type="string">
          Example: `"It is nothing but SQL Server, use Relational Database"`.
        </ResponseField>

        <ResponseField name="type" type="string">
          Example: `"MSSQL"`.
        </ResponseField>

        <ResponseField name="tag" type="string">
          Example: `"Datawarehouse"`.
        </ResponseField>

        <ResponseField name="is_active" type="boolean">
          Example: `true`.
        </ResponseField>

        <ResponseField name="is_delete" type="boolean">
          Example: `false`.
        </ResponseField>
      </ResponseField>

      <ResponseField name="created_by" type="string">
        Example: `"85b88faf-5037-4de7-8a6e-ab61baed84a5"`.
      </ResponseField>

      <ResponseField name="created_at" type="string">
        Example: `"2026-09-21T07:34:27.996322Z"`.
      </ResponseField>

      <ResponseField name="modified_at" type="string">
        Example: `"2026-09-21T07:34:28.043702Z"`.
      </ResponseField>
    </ResponseField>

    **Example**

    <CodeGroup>
      ```bash cURL theme={null}
      curl -X GET "https://<your-workspace>.prizmdata.ai/api/v1/core/source/{sourceId}" \
        -H "Authorization: Bearer <YOUR_API_TOKEN>"
      ```
    </CodeGroup>

    ```json Response theme={null}
    {
      "success": true,
      "message": "Get a source by its ID.",
      "timestamp": "2026-09-21T09:43:50.316067+00:00",
      "correlation_id": "1bff0823-3db2-4b12-bf56-22ea8d38bba2",
      "data": {
        "id": "1b2a2e97-f53c-4972-a7b1-a6252e38caa8",
        "name": "TEST_1789976065",
        "description": null,
        "type": "MSSQL",
        "credentials": {
          "port": "1433",
          "server": "jtK6xqqWK/C4pjEmR5XI+Q==",
          "database": "dqlabs",
          "password": "rWLRhftdEoNtHKqXE0NOdQ==",
          "username": "99DtYuGe6pwOr4zg4Ln/zA==",
          "auth_type": "username_password",
          "included_databases": []
        },
        "config": {},
        "is_valid": true,
        "is_active": true,
        "is_api_connection": false,
        "source_type_id": "e4a807dd-5d8d-431a-b292-73c47244fbea",
        "source_type": {
          "id": "e4a807dd-5d8d-431a-b292-73c47244fbea",
          "name": "MSSQL",
          "short_description": "It is nothing but SQL Server, use Relational Database",
          "long_description": "It is nothing but SQL Server, use Relational Database",
          "type": "MSSQL",
          "tag": "Datawarehouse",
          "is_active": true,
          "is_delete": false
        },
        "created_by": "85b88faf-5037-4de7-8a6e-ab61baed84a5",
        "created_at": "2026-09-21T07:34:27.996322Z",
        "modified_at": "2026-09-21T07:34:28.043702Z"
      }
    }
    ```
  </Tab>

  <Tab title="Get Sources">
    `POST /api/v1/core/source/list`

    Get all sources with optional filtering and pagination.

    **Request Body**

    <ParamField body="pagination" type="object">
      <ParamField body="page" type="integer">
        Example: `1`.
      </ParamField>

      <ParamField body="pageSize" type="integer">
        Example: `10`.
      </ParamField>
    </ParamField>

    <ParamField body="sorting" type="object[]" />

    <ParamField body="filters" type="object[]" />

    <ParamField body="search" type="string">
      Example: `""`.
    </ParamField>

    <ParamField body="export" type="boolean">
      Example: `false`.
    </ParamField>

    **Response**

    <ResponseField name="success" type="boolean">Whether the request completed successfully</ResponseField>

    <ResponseField name="message" type="string">Human-readable result message</ResponseField>

    <ResponseField name="timestamp" type="string">ISO 8601 server timestamp</ResponseField>

    <ResponseField name="correlation_id" type="string">Unique ID for this request</ResponseField>

    <ResponseField name="data" type="object">
      <ResponseField name="data" type="object[]">
        <ResponseField name="id" type="string">
          Example: `"1b2a2e97-f53c-4972-a7b1-a6252e38caa8"`.
        </ResponseField>

        <ResponseField name="name" type="string">
          Example: `"TEST_1789976065"`.
        </ResponseField>

        <ResponseField name="description" type="string" />

        <ResponseField name="type" type="string">
          Example: `"MSSQL"`.
        </ResponseField>

        <ResponseField name="config" type="object" />

        <ResponseField name="is_valid" type="boolean">
          Example: `true`.
        </ResponseField>

        <ResponseField name="is_active" type="boolean">
          Example: `true`.
        </ResponseField>

        <ResponseField name="is_api_connection" type="boolean">
          Example: `false`.
        </ResponseField>

        <ResponseField name="created_by" type="string">
          Example: `"85b88faf-5037-4de7-8a6e-ab61baed84a5"`.
        </ResponseField>

        <ResponseField name="created_at" type="string">
          Example: `"2026-09-21T07:34:27.996322Z"`.
        </ResponseField>

        <ResponseField name="modified_at" type="string">
          Example: `"2026-09-21T07:34:28.043702Z"`.
        </ResponseField>

        <ResponseField name="audiences" type="object[]" />

        <ResponseField name="source_type_tag" type="string">
          Example: `"Datawarehouse"`.
        </ResponseField>
      </ResponseField>

      <ResponseField name="total_count" type="integer">
        Example: `50`.
      </ResponseField>

      <ResponseField name="metrics" type="object[]" />
    </ResponseField>

    **Example**

    <CodeGroup>
      ```bash cURL theme={null}
      curl -X POST "https://<your-workspace>.prizmdata.ai/api/v1/core/source/list" \
        -H "Authorization: Bearer <YOUR_API_TOKEN>" \
        -H "Content-Type: application/json" \
        -d '{
        "pagination": {
          "page": 1,
          "pageSize": 10
        },
        "sorting": [],
        "filters": [],
        "search": "",
        "export": false
      }'
      ```
    </CodeGroup>

    ```json Response theme={null}
    {
      "success": true,
      "message": "Get all sources with optional filtering and pagination.",
      "timestamp": "2026-09-21T09:43:50.316067+00:00",
      "correlation_id": "1bff0823-3db2-4b12-bf56-22ea8d38bba2",
      "data": {
        "data": [
          {
            "id": "1b2a2e97-f53c-4972-a7b1-a6252e38caa8",
            "name": "TEST_1789976065",
            "description": null,
            "type": "MSSQL",
            "config": {},
            "is_valid": true,
            "is_active": true,
            "is_api_connection": false,
            "created_by": "85b88faf-5037-4de7-8a6e-ab61baed84a5",
            "created_at": "2026-09-21T07:34:27.996322Z",
            "modified_at": "2026-09-21T07:34:28.043702Z",
            "audiences": [],
            "source_type_tag": "Datawarehouse"
          }
        ],
        "total_count": 50,
        "metrics": []
      }
    }
    ```
  </Tab>

  <Tab title="Update Source">
    `PUT /api/v1/core/source/{sourceId}`

    Update Source

    **Path Parameters**

    <ParamField path="sourceId" type="string" required={true}>
      Example: `3fa85f64-5717-4562-b3fc-2c963f66afa6`
    </ParamField>

    **Response**

    <ResponseField name="success" type="boolean">Whether the request completed successfully</ResponseField>

    <ResponseField name="message" type="string">Human-readable result message</ResponseField>

    <ResponseField name="timestamp" type="string">ISO 8601 server timestamp</ResponseField>

    <ResponseField name="correlation_id" type="string">Unique ID for this request</ResponseField>

    <ResponseField name="data" type="object">The endpoint's response payload.</ResponseField>

    **Example**

    <CodeGroup>
      ```bash cURL theme={null}
      curl -X PUT "https://<your-workspace>.prizmdata.ai/api/v1/core/source/{sourceId}" \
        -H "Authorization: Bearer <YOUR_API_TOKEN>" \
        -H "Content-Type: application/json" \
        -d '{}'
      ```
    </CodeGroup>

    ```json Response theme={null}
    {
      "success": true,
      "message": "Update Source",
      "timestamp": "2026-09-21T09:43:50.316067+00:00",
      "correlation_id": "1bff0823-3db2-4b12-bf56-22ea8d38bba2",
      "data": {}
    }
    ```
  </Tab>

  <Tab title="Delete Source">
    `DELETE /api/v1/core/source/{sourceId}`

    Delete a source by its ID.

    **Path Parameters**

    <ParamField path="sourceId" type="string" required={true}>
      Example: `3fa85f64-5717-4562-b3fc-2c963f66afa6`
    </ParamField>

    **Response**

    <ResponseField name="success" type="boolean">Whether the request completed successfully</ResponseField>

    <ResponseField name="message" type="string">Human-readable result message</ResponseField>

    <ResponseField name="timestamp" type="string">ISO 8601 server timestamp</ResponseField>

    <ResponseField name="correlation_id" type="string">Unique ID for this request</ResponseField>

    <ResponseField name="data" type="object">The endpoint's response payload.</ResponseField>

    **Example**

    <CodeGroup>
      ```bash cURL theme={null}
      curl -X DELETE "https://<your-workspace>.prizmdata.ai/api/v1/core/source/{sourceId}" \
        -H "Authorization: Bearer <YOUR_API_TOKEN>"
      ```
    </CodeGroup>

    ```json Response theme={null}
    {
      "success": true,
      "message": "Delete a source by its ID.",
      "timestamp": "2026-09-21T09:43:50.316067+00:00",
      "correlation_id": "1bff0823-3db2-4b12-bf56-22ea8d38bba2",
      "data": {}
    }
    ```
  </Tab>
</Tabs>
