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

# Get Datasource

> This endpoint retrieves the details of a specific Datasource by its ID.

### Auth Headers

<ParamField required header="x-metal-api-key" type="string">
  An API key for your org.
</ParamField>

<ParamField required header="x-metal-client-id" type="string">
  A Client ID for your org.
</ParamField>

### Params

<ParamField required path="id" type="string">
  The unique identifier of the Datasource you wish to retrieve.
</ParamField>

### Response

<ResponseField name="data" type="Datasource Object">
  <Expandable title="properties">
    <ResponseField name="id" type="string">
      The unique identifier of the Datasource.
    </ResponseField>

    <ResponseField name="name" type="string">
      Name of the Datasource.
    </ResponseField>

    <ResponseField name="metadataFields" type="array">
      An array of metadata fields, each with a name, type, and description.
    </ResponseField>

    <ResponseField name="sourcetype" type="string">
      Type of the Datasource.
    </ResponseField>

    <ResponseField name="autoExtract" type="boolean">
      Flag indicating whether auto-extraction is enabled or not.
    </ResponseField>

    <ResponseField name="createdAt" type="string">
      Timestamp indicating when the Datasource was created.
    </ResponseField>

    <ResponseField name="createdBy" type="string">
      ID of the user or key that created the Datasource.
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash theme={null}
  # Example Request
  curl -X GET "https://api.getmetal.io/v1/datasources/{id}" \
  --header 'Content-Type: application/json' \
  --header 'x-metal-api-key: <api-key>' \
  --header 'x-metal-client-id: <client-id>'
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "data": {
      "id": "datasourceID",
      "createdAt": "2023-08-29T11:22:26.172Z",
  		"createdBy": "userID",
      "name": "my_datasource",
      "metadataFields": [
        {
          "name": "band",
          "type": "string",
          "description": "Which heavy metal band is represented by the iconic mascot Eddie?"
        }
      ],
      "sourcetype": "Text",
      "autoExtract": false,
      "createdAt": "2023-08-29T10:51:04.246Z",
      "createdBy": "userId",
    }
  }
  ```
</ResponseExample>
