# List external sources

- Operation ID: `listExternalSource`
- HTTP method: `GET`
- Path: `/brickworks/v1/external-sources`
- [Human-readable API reference](https://hub.synerise.com/api-reference/brickworks#tag/Brickworks:-External-sources/operation/listExternalSource)

## Self-contained OpenAPI method

The fenced document below contains this method's documentation and all of its local references. It is self-contained; no category or master specification fetch is required.

```yaml
openapi: 3.0.0
info:
  title: Synerise Public API
  version: 1.9.1
paths:
  /brickworks/v1/external-sources:
    get:
      tags:
        - "Brickworks: External sources"
      summary: List external sources
      description: |
        Retrieve a list of external data sources. You can sort and paginate the results.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `BRICKWORKS_EXTERNALSOURCES_READ`

        **User role permission required:** `assets_brickworks: read`
      operationId: listExternalSource
      parameters:
        - name: limit
          in: query
          required: false
          description: Limit of items per page
          schema:
            type: integer
            format: int32
            default: 50
        - name: page
          in: query
          required: false
          description: The number of the page to retrieve
          schema:
            type: integer
            format: int32
            minimum: 1
            default: 1
        - name: search
          in: query
          required: false
          description: |
            A string to search for in:
            - `id`
            - `appId`
            - `displayName`
            - `description`
          schema:
            type: string
        - in: query
          name: sortBy
          required: false
          description: |
            You can sort by:
            - `createdAt`
            - `updatedAt`
            - `name`
          schema:
            type: string
            example: createdAt:asc|desc
        - name: method
          description: |
            You can filter the results by source http method.
          in: query
          required: false
          style: form
          explode: true
          schema:
            type: string
            enum:
              - get
              - post
      security:
        - JWT: []
      responses:
        "200":
          description: A page of external data sources
          content:
            application/json:
              schema:
                type: object
                x-class-name: ExternalSourcePagingResult
                x-interface-name-ts: ExternalSourcePagingResult
                required:
                  - meta
                  - data
                properties:
                  meta:
                    type: object
                    description: Pagination metadata
                    x-class-name: Meta
                    x-interface-name-ts: Meta
                    properties:
                      links:
                        type: array
                        description: Links to the neighboring pages and the first page
                        items:
                          type: object
                          x-class-name: Link
                          x-interface-name-ts: Link
                          required:
                            - url
                            - rel
                          properties:
                            url:
                              type: string
                              description: URL of the page, used for navigation
                            rel:
                              type: string
                              description: The type of relation to the current page. `first` is always the first page.
                              enum:
                                - first
                                - prev
                                - next
                      limit:
                        type: integer
                        format: int32
                        description: Limit of items per page
                      count:
                        type: integer
                        nullable: true
                        description: Currently unused
                  data:
                    type: array
                    description: Array of external sources
                    items:
                      type: object
                      x-class-name: ExternalSourceSimplifiedView
                      x-interface-name-ts: ExternalSourceSimplifiedView
                      properties:
                        id:
                          type: string
                          description: Unique ID of the external source definition
                          format: uuid
                        name:
                          type: string
                          description: Human-readable name of the external resource
                          maxLength: 255
                        method:
                          type: string
                          description: The HTTP method used in the external request. The `body` and `bodySchema` properties can only be used in POST requests.
                          enum:
                            - post
                            - get
                        description:
                          type: string
                          maxLength: 255
                          description: Description of the external source
                        sourceType:
                          type: string
                          x-class-name: ExternalSourceType
                          x-interface-name-ts: ExternalSourceType
                          enum:
                            - http_source
                        createdBy:
                          type: integer
                          format: int64
                          description: ID of the user who created the resource. If created by a workspace, the value is `0`.
                        createdAt:
                          type: string
                          format: date-time
                          description: Time when the resource was created
                        updatedBy:
                          type: integer
                          format: int64
                          description: ID of the user who last updated the resource. If last updated by a workspace, the value is `0`.
                        updatedAt:
                          type: string
                          format: date-time
                          description: Time when the resource was last updated
                      required:
                        - id
                        - name
                        - createdBy
                        - createdAt
                        - updatedAt
        "400":
          description: Incorrect request (malformed JSON, wrong parameters, etc.). See error message for details.
          content:
            application/json:
              schema:
                type: object
                x-class-name: ObjectsError
                x-interface-name-ts: ObjectsError
                required:
                  - httpStatus
                  - errorCode
                  - timestamp
                  - message
                properties:
                  timestamp:
                    type: string
                    format: date-time
                    description: Time when the error occurred
                  errorCode:
                    type: string
                    description: |
                      Code of the error, needed for troubleshooting

                      See error reference: [https://developers.synerise.com/errors.html](https://developers.synerise.com/errors.html)
                  httpStatus:
                    type: integer
                    description: Error's HTTP status code
                  message:
                    type: string
                    description: Description of the problem
                  traceId:
                    type: string
                    description: Unique identifier of the request, useful for tracing logs
                  errors:
                    type: array
                    items:
                      $ref: "#/components/schemas/brickworks-service-ObjectsError"
                  source:
                    type: object
                    x-class-name: ObjectErrorSource
                    x-interface-name-ts: ObjectErrorSource
                    required:
                      - pointer
                    properties:
                      pointer:
                        type: string
                        description: JSON Pointer for invalid body path
                      value:
                        type: string
                        description: Value that caused the validation error
                  details:
                    type: object
                    x-class-name: ObjectsErrorDetails
                    x-interface-name-ts: ObjectsErrorDetails
                    additionalProperties:
                      type: object
                    description: Additional structured error information
                  field:
                    type: string
                    description: Name of the field that caused the error
        "401":
          description: "Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details."
          content:
            application/json:
              schema:
                type: object
                x-class-name: GatewayError
                x-interface-name-ts: GatewayError
                properties:
                  error:
                    type: string
                    description: Summary of the error
                  status:
                    type: integer
                    format: int32
                    description: Status code
                  timestamp:
                    type: string
                    description: Time when the message was sent
                  message:
                    type: string
                    description: Description of the problem
        "403":
          description: Forbidden; insufficient permissions. See error message for details.
          content:
            application/json:
              schema:
                type: object
                x-class-name: GatewayError
                x-interface-name-ts: GatewayError
                properties:
                  error:
                    type: string
                    description: Summary of the error
                  status:
                    type: integer
                    format: int32
                    description: Status code
                  timestamp:
                    type: string
                    description: Time when the message was sent
                  message:
                    type: string
                    description: Description of the problem
        "404":
          description: Resource not found. See error message for details.
          content:
            application/json:
              schema:
                type: object
                x-class-name: ObjectsError
                x-interface-name-ts: ObjectsError
                required:
                  - httpStatus
                  - errorCode
                  - timestamp
                  - message
                properties:
                  timestamp:
                    type: string
                    format: date-time
                    description: Time when the error occurred
                  errorCode:
                    type: string
                    description: |
                      Code of the error, needed for troubleshooting

                      See error reference: [https://developers.synerise.com/errors.html](https://developers.synerise.com/errors.html)
                  httpStatus:
                    type: integer
                    description: Error's HTTP status code
                  message:
                    type: string
                    description: Description of the problem
                  traceId:
                    type: string
                    description: Unique identifier of the request, useful for tracing logs
                  errors:
                    type: array
                    items:
                      $ref: "#/components/schemas/brickworks-service-ObjectsError"
                  source:
                    type: object
                    x-class-name: ObjectErrorSource
                    x-interface-name-ts: ObjectErrorSource
                    required:
                      - pointer
                    properties:
                      pointer:
                        type: string
                        description: JSON Pointer for invalid body path
                      value:
                        type: string
                        description: Value that caused the validation error
                  details:
                    type: object
                    x-class-name: ObjectsErrorDetails
                    x-interface-name-ts: ObjectsErrorDetails
                    additionalProperties:
                      type: object
                    description: Additional structured error information
                  field:
                    type: string
                    description: Name of the field that caused the error
        "409":
          description: The request could not be completed due to a conflict with the current state of the resource. See error message for details.
          content:
            application/json:
              schema:
                type: object
                x-class-name: ObjectsError
                x-interface-name-ts: ObjectsError
                required:
                  - httpStatus
                  - errorCode
                  - timestamp
                  - message
                properties:
                  timestamp:
                    type: string
                    format: date-time
                    description: Time when the error occurred
                  errorCode:
                    type: string
                    description: |
                      Code of the error, needed for troubleshooting

                      See error reference: [https://developers.synerise.com/errors.html](https://developers.synerise.com/errors.html)
                  httpStatus:
                    type: integer
                    description: Error's HTTP status code
                  message:
                    type: string
                    description: Description of the problem
                  traceId:
                    type: string
                    description: Unique identifier of the request, useful for tracing logs
                  errors:
                    type: array
                    items:
                      $ref: "#/components/schemas/brickworks-service-ObjectsError"
                  source:
                    type: object
                    x-class-name: ObjectErrorSource
                    x-interface-name-ts: ObjectErrorSource
                    required:
                      - pointer
                    properties:
                      pointer:
                        type: string
                        description: JSON Pointer for invalid body path
                      value:
                        type: string
                        description: Value that caused the validation error
                  details:
                    type: object
                    x-class-name: ObjectsErrorDetails
                    x-interface-name-ts: ObjectsErrorDetails
                    additionalProperties:
                      type: object
                    description: Additional structured error information
                  field:
                    type: string
                    description: Name of the field that caused the error
        "422":
          description: The request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details.
          content:
            application/json:
              schema:
                type: object
                x-class-name: ObjectsError
                x-interface-name-ts: ObjectsError
                required:
                  - httpStatus
                  - errorCode
                  - timestamp
                  - message
                properties:
                  timestamp:
                    type: string
                    format: date-time
                    description: Time when the error occurred
                  errorCode:
                    type: string
                    description: |
                      Code of the error, needed for troubleshooting

                      See error reference: [https://developers.synerise.com/errors.html](https://developers.synerise.com/errors.html)
                  httpStatus:
                    type: integer
                    description: Error's HTTP status code
                  message:
                    type: string
                    description: Description of the problem
                  traceId:
                    type: string
                    description: Unique identifier of the request, useful for tracing logs
                  errors:
                    type: array
                    items:
                      $ref: "#/components/schemas/brickworks-service-ObjectsError"
                  source:
                    type: object
                    x-class-name: ObjectErrorSource
                    x-interface-name-ts: ObjectErrorSource
                    required:
                      - pointer
                    properties:
                      pointer:
                        type: string
                        description: JSON Pointer for invalid body path
                      value:
                        type: string
                        description: Value that caused the validation error
                  details:
                    type: object
                    x-class-name: ObjectsErrorDetails
                    x-interface-name-ts: ObjectsErrorDetails
                    additionalProperties:
                      type: object
                    description: Additional structured error information
                  field:
                    type: string
                    description: Name of the field that caused the error
        "500":
          description: See error message for details.
          content:
            application/json:
              schema:
                type: object
                x-class-name: ObjectsError
                x-interface-name-ts: ObjectsError
                required:
                  - httpStatus
                  - errorCode
                  - timestamp
                  - message
                properties:
                  timestamp:
                    type: string
                    format: date-time
                    description: Time when the error occurred
                  errorCode:
                    type: string
                    description: |
                      Code of the error, needed for troubleshooting

                      See error reference: [https://developers.synerise.com/errors.html](https://developers.synerise.com/errors.html)
                  httpStatus:
                    type: integer
                    description: Error's HTTP status code
                  message:
                    type: string
                    description: Description of the problem
                  traceId:
                    type: string
                    description: Unique identifier of the request, useful for tracing logs
                  errors:
                    type: array
                    items:
                      $ref: "#/components/schemas/brickworks-service-ObjectsError"
                  source:
                    type: object
                    x-class-name: ObjectErrorSource
                    x-interface-name-ts: ObjectErrorSource
                    required:
                      - pointer
                    properties:
                      pointer:
                        type: string
                        description: JSON Pointer for invalid body path
                      value:
                        type: string
                        description: Value that caused the validation error
                  details:
                    type: object
                    x-class-name: ObjectsErrorDetails
                    x-interface-name-ts: ObjectsErrorDetails
                    additionalProperties:
                      type: object
                    description: Additional structured error information
                  field:
                    type: string
                    description: Name of the field that caused the error
      x-snr-doc-urls:
        - /api-reference/brickworks#tag/Brickworks:-External-sources/operation/listExternalSource
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/brickworks/v1/external-sources?limit=SOME_INTEGER_VALUE&page=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=createdAt%3Aasc%7Cdesc&method=SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/brickworks/v1/external-sources?limit=SOME_INTEGER_VALUE&page=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=createdAt%3Aasc%7Cdesc&method=SOME_STRING_VALUE", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/brickworks/v1/external-sources?limit=SOME_INTEGER_VALUE&page=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=createdAt%3Aasc%7Cdesc&method=SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/brickworks/v1/external-sources?limit=SOME_INTEGER_VALUE&page=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=createdAt%3Aasc%7Cdesc&method=SOME_STRING_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/brickworks/v1/external-sources');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'limit' => 'SOME_INTEGER_VALUE',
              'page' => 'SOME_INTEGER_VALUE',
              'search' => 'SOME_STRING_VALUE',
              'sortBy' => 'createdAt:asc|desc',
              'method' => 'SOME_STRING_VALUE'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/brickworks/v1/external-sources?limit=SOME_INTEGER_VALUE&page=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=createdAt%3Aasc%7Cdesc&method=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
servers:
  - description: Microsoft Azure EU
    url: https://api.synerise.com
  - description: Microsoft Azure USA
    url: https://api.azu.synerise.com
  - description: Google Cloud Platform
    url: https://api.geb.synerise.com
tags:
  - name: "Brickworks: External sources"
components:
  schemas:
    brickworks-service-ObjectsError:
      type: object
      x-class-name: ObjectsError
      x-interface-name-ts: ObjectsError
      required:
        - httpStatus
        - errorCode
        - timestamp
        - message
      properties:
        timestamp:
          type: string
          format: date-time
          description: Time when the error occurred
        errorCode:
          type: string
          description: |
            Code of the error, needed for troubleshooting

            See error reference: [https://developers.synerise.com/errors.html](https://developers.synerise.com/errors.html)
        httpStatus:
          type: integer
          description: Error's HTTP status code
        message:
          type: string
          description: Description of the problem
        traceId:
          type: string
          description: Unique identifier of the request, useful for tracing logs
        errors:
          type: array
          items:
            $ref: "#/components/schemas/brickworks-service-ObjectsError"
        source:
          type: object
          x-class-name: ObjectErrorSource
          x-interface-name-ts: ObjectErrorSource
          required:
            - pointer
          properties:
            pointer:
              type: string
              description: JSON Pointer for invalid body path
            value:
              type: string
              description: Value that caused the validation error
        details:
          type: object
          x-class-name: ObjectsErrorDetails
          x-interface-name-ts: ObjectsErrorDetails
          additionalProperties:
            type: object
          description: Additional structured error information
        field:
          type: string
          description: Name of the field that caused the error
  securitySchemes:
    JWT:
      type: http
      scheme: bearer
      description: |-
        JWT Bearer token. The header looks like this: `Bearer {JWT}`

        Remember to include the space between 'Bearer' and the token.

        Generate a token via the **Authorization** endpoints.
```
