openapi: 3.0.2
info:
  title: Ingestion API
  description: >
    The Ingestion API lets you connect third-party services and platforms with
    Algolia and schedule tasks to ingest your data.

    The Ingestion API powers the no-code [data
    connectors](https://dashboard.algolia.com/connectors).


    ## Base URLs


    The base URLs for requests to the Ingestion API are:


    - `https://data.us.algolia.com`

    - `https://data.eu.algolia.com`


    Use the URL that matches your [analytics
    region](https://dashboard.algolia.com/account/infrastructure/analytics).


    **All requests must use HTTPS.**


    ## Authentication


    To authenticate your API requests, add these headers:


    - `x-algolia-application-id`. Your Algolia application ID.

    - `x-algolia-api-key`. An API key with the necessary permissions to make the
    request.
      The required access control list (ACL) to make a request is listed in each endpoint's reference.

    You can find your application ID and API key in the [Algolia
    dashboard](https://dashboard.algolia.com/account).


    ## Request format


    Request bodies must be JSON objects.


    ## Response status and errors


    Response bodies are JSON objects.

    Deleting a user token returns an empty response body with rate-limiting
    information as headers.


    Successful responses return a `2xx` status. Client errors return a `4xx`
    status. Server errors are indicated by a `5xx` status.

    Error responses have a `message` property with more information.


    The Insights API doesn't validate if the event parameters such as
    `indexName`, `objectIDs`, or `userToken`,

    correspond to anything in the Search API. It justs checks if they're
    formatted correctly.

    Check the [Events](https://dashboard.algolia.com/events/health) health
    section,

    whether your events can be used for Algolia features such as Analytics, or
    Dynamic Re-Ranking.


    ## Version


    The current version of the Insights API is version 1, as indicated by the
    `/1/` in each endpoint's URL.
  version: 1.0.0
servers:
  - url: https://data.{region}.algolia.com
    variables:
      region:
        enum:
          - eu
          - us
        default: us
security:
  - appId: []
    apiKey: []
tags:
  - name: authentications
    x-displayName: Authentications
    description: >-
      Authentication resources describe how to connect to a source or
      destination.
  - name: destinations
    x-displayName: Destinations
    description: >
      Destinations are Algolia products or features where your data should be
      used, such as a search index or events.

      Algolia destinations require authentication with the `algolia` type.

      You can reference authentications by their ID when creating destinations.
  - name: observability
    x-displayName: Observability
    description: >-
      Check the status and details of your task runs. A run is one instance of a
      configured task.
  - name: sources
    x-displayName: Sources
    description: >
      Sources are third-party platforms or services from where you want to
      ingest your data.

      Sources may require authentication. To interact with such sources, you can
      reference an authentication resource by its ID.
  - name: tasks
    x-displayName: Tasks
    description: >
      Tasks contain information how your data should be read from a source and
      stored in a destination.

      Tasks have _triggers_ which determine when the task should run.
paths:
  /{path}:
    get:
      operationId: customGet
      summary: Send requests to the Algolia REST API
      description: This method allow you to send requests to the Algolia REST API.
      parameters:
        - $ref: '#/components/parameters/PathInPath'
        - $ref: '#/components/parameters/Parameters'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: |
            // Initialize the client
            var client = new IngestionClient(
              new IngestionConfig("YOUR_APP_ID", "YOUR_API_KEY", "YOUR_APP_ID_REGION")
            );

            // Call the API
            var response = await client.CustomGetAsync("test/minimal");
        - lang: go
          label: Go
          source: >
            // Initialize the client with your application region, eg.
            ingestion.YOUR_APP_ID_REGION

            client, err := ingestion.NewClient("YOUR_APP_ID", "YOUR_API_KEY",
            ingestion.US)

            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }


            // Call the API

            resp, err := client.CustomGet(client.NewApiCustomGetRequest(
              "test/minimal",
            ))

            if err != nil {
              // handle the eventual error
              panic(err)
            }


            // use the model directly

            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            IngestionClient client = new IngestionClient("YOUR_APP_ID",
            "YOUR_API_KEY", "YOUR_APP_ID_REGION");


            // Call the API

            client.customGet("test/minimal");
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = ingestionClient(
              'YOUR_APP_ID',
              'YOUR_API_KEY',
              'YOUR_APP_ID_REGION'
            );

            // Call the API
            const response = await client.customGet({ path: 'test/minimal' });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            var response = client.customGet(
              path = "test/minimal",
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\IngestionClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>', 'YOUR_APP_ID_REGION');


            // Call the API

            $response = $client->customGet(
                'test/minimal',
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: >
            # Initialize the client

            _client = IngestionClient("YOUR_APP_ID", "YOUR_API_KEY",
            "YOUR_APP_ID_REGION")


            # Call the API

            resp = await _client.custom_get(
                path="test/minimal",
            )


            # use the class directly

            print(resp)


            # print the JSON response

            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: >
            # Initialize the client

            client = Algolia::IngestionClient.create('YOUR_APP_ID',
            'YOUR_API_KEY', 'YOUR_APP_ID_REGION')


            # Call the API

            resp = client.custom_get("test/minimal")


            # use the class directly

            puts resp


            # print the JSON response

            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            val res = client.customGet[JObject](
              path = "test/minimal"
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try IngestionClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY", region: .us)


            // Call the API

            _ = try await client.customGet(path: "test/minimal")
    post:
      operationId: customPost
      requestBody:
        description: Parameters to send with the custom request.
        content:
          application/json:
            schema:
              type: object
      summary: Send requests to the Algolia REST API
      description: This method allow you to send requests to the Algolia REST API.
      parameters:
        - $ref: '#/components/parameters/PathInPath'
        - $ref: '#/components/parameters/Parameters'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: |
            // Initialize the client
            var client = new IngestionClient(
              new IngestionConfig("YOUR_APP_ID", "YOUR_API_KEY", "YOUR_APP_ID_REGION")
            );

            // Call the API
            var response = await client.CustomPostAsync("test/minimal");
        - lang: go
          label: Go
          source: >
            // Initialize the client with your application region, eg.
            ingestion.YOUR_APP_ID_REGION

            client, err := ingestion.NewClient("YOUR_APP_ID", "YOUR_API_KEY",
            ingestion.US)

            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }


            // Call the API

            resp, err := client.CustomPost(client.NewApiCustomPostRequest(
              "test/minimal",
            ))

            if err != nil {
              // handle the eventual error
              panic(err)
            }


            // use the model directly

            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            IngestionClient client = new IngestionClient("YOUR_APP_ID",
            "YOUR_API_KEY", "YOUR_APP_ID_REGION");


            // Call the API

            client.customPost("test/minimal");
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = ingestionClient(
              'YOUR_APP_ID',
              'YOUR_API_KEY',
              'YOUR_APP_ID_REGION'
            );

            // Call the API
            const response = await client.customPost({ path: 'test/minimal' });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            var response = client.customPost(
              path = "test/minimal",
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\IngestionClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>', 'YOUR_APP_ID_REGION');


            // Call the API

            $response = $client->customPost(
                'test/minimal',
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: >
            # Initialize the client

            _client = IngestionClient("YOUR_APP_ID", "YOUR_API_KEY",
            "YOUR_APP_ID_REGION")


            # Call the API

            resp = await _client.custom_post(
                path="test/minimal",
            )


            # use the class directly

            print(resp)


            # print the JSON response

            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: >
            # Initialize the client

            client = Algolia::IngestionClient.create('YOUR_APP_ID',
            'YOUR_API_KEY', 'YOUR_APP_ID_REGION')


            # Call the API

            resp = client.custom_post("test/minimal")


            # use the class directly

            puts resp


            # print the JSON response

            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            val res = client.customPost[JObject](
              path = "test/minimal"
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try IngestionClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY", region: .us)


            // Call the API

            _ = try await client.customPost(path: "test/minimal")
    put:
      operationId: customPut
      requestBody:
        description: Parameters to send with the custom request.
        content:
          application/json:
            schema:
              type: object
      summary: Send requests to the Algolia REST API
      description: This method allow you to send requests to the Algolia REST API.
      parameters:
        - $ref: '#/components/parameters/PathInPath'
        - $ref: '#/components/parameters/Parameters'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: |
            // Initialize the client
            var client = new IngestionClient(
              new IngestionConfig("YOUR_APP_ID", "YOUR_API_KEY", "YOUR_APP_ID_REGION")
            );

            // Call the API
            var response = await client.CustomPutAsync("test/minimal");
        - lang: go
          label: Go
          source: >
            // Initialize the client with your application region, eg.
            ingestion.YOUR_APP_ID_REGION

            client, err := ingestion.NewClient("YOUR_APP_ID", "YOUR_API_KEY",
            ingestion.US)

            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }


            // Call the API

            resp, err := client.CustomPut(client.NewApiCustomPutRequest(
              "test/minimal",
            ))

            if err != nil {
              // handle the eventual error
              panic(err)
            }


            // use the model directly

            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            IngestionClient client = new IngestionClient("YOUR_APP_ID",
            "YOUR_API_KEY", "YOUR_APP_ID_REGION");


            // Call the API

            client.customPut("test/minimal");
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = ingestionClient(
              'YOUR_APP_ID',
              'YOUR_API_KEY',
              'YOUR_APP_ID_REGION'
            );

            // Call the API
            const response = await client.customPut({ path: 'test/minimal' });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            var response = client.customPut(
              path = "test/minimal",
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\IngestionClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>', 'YOUR_APP_ID_REGION');


            // Call the API

            $response = $client->customPut(
                'test/minimal',
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: >
            # Initialize the client

            _client = IngestionClient("YOUR_APP_ID", "YOUR_API_KEY",
            "YOUR_APP_ID_REGION")


            # Call the API

            resp = await _client.custom_put(
                path="test/minimal",
            )


            # use the class directly

            print(resp)


            # print the JSON response

            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: >
            # Initialize the client

            client = Algolia::IngestionClient.create('YOUR_APP_ID',
            'YOUR_API_KEY', 'YOUR_APP_ID_REGION')


            # Call the API

            resp = client.custom_put("test/minimal")


            # use the class directly

            puts resp


            # print the JSON response

            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            val res = client.customPut[JObject](
              path = "test/minimal"
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try IngestionClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY", region: .us)


            // Call the API

            _ = try await client.customPut(path: "test/minimal")
    delete:
      operationId: customDelete
      summary: Send requests to the Algolia REST API
      description: This method allow you to send requests to the Algolia REST API.
      parameters:
        - $ref: '#/components/parameters/PathInPath'
        - $ref: '#/components/parameters/Parameters'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: |
            // Initialize the client
            var client = new IngestionClient(
              new IngestionConfig("YOUR_APP_ID", "YOUR_API_KEY", "YOUR_APP_ID_REGION")
            );

            // Call the API
            var response = await client.CustomDeleteAsync("test/minimal");
        - lang: go
          label: Go
          source: >
            // Initialize the client with your application region, eg.
            ingestion.YOUR_APP_ID_REGION

            client, err := ingestion.NewClient("YOUR_APP_ID", "YOUR_API_KEY",
            ingestion.US)

            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }


            // Call the API

            resp, err := client.CustomDelete(client.NewApiCustomDeleteRequest(
              "test/minimal",
            ))

            if err != nil {
              // handle the eventual error
              panic(err)
            }


            // use the model directly

            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            IngestionClient client = new IngestionClient("YOUR_APP_ID",
            "YOUR_API_KEY", "YOUR_APP_ID_REGION");


            // Call the API

            client.customDelete("test/minimal");
        - lang: javascript
          label: JavaScript
          source: >
            // Initialize the client

            const client = ingestionClient(
              'YOUR_APP_ID',
              'YOUR_API_KEY',
              'YOUR_APP_ID_REGION'
            );


            // Call the API

            const response = await client.customDelete({ path: 'test/minimal'
            });


            // use typed response

            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            var response = client.customDelete(
              path = "test/minimal",
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\IngestionClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>', 'YOUR_APP_ID_REGION');


            // Call the API

            $response = $client->customDelete(
                'test/minimal',
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: >
            # Initialize the client

            _client = IngestionClient("YOUR_APP_ID", "YOUR_API_KEY",
            "YOUR_APP_ID_REGION")


            # Call the API

            resp = await _client.custom_delete(
                path="test/minimal",
            )


            # use the class directly

            print(resp)


            # print the JSON response

            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: >
            # Initialize the client

            client = Algolia::IngestionClient.create('YOUR_APP_ID',
            'YOUR_API_KEY', 'YOUR_APP_ID_REGION')


            # Call the API

            resp = client.custom_delete("test/minimal")


            # use the class directly

            puts resp


            # print the JSON response

            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            val res = client.customDelete[JObject](
              path = "test/minimal"
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try IngestionClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY", region: .us)


            // Call the API

            _ = try await client.customDelete(path: "test/minimal")
  /1/authentications:
    get:
      tags:
        - authentications
      summary: List authentication resources
      description: Retrieves a list of all authentication resources.
      operationId: getAuthentications
      x-acl:
        - addObject
        - deleteIndex
        - editSettings
      parameters:
        - $ref: '#/components/parameters/itemsPerPage'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/type'
        - $ref: '#/components/parameters/platform'
        - $ref: '#/components/parameters/sort'
        - $ref: '#/components/parameters/order'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                title: listAuthenticationsResponse
                type: object
                additionalProperties: false
                properties:
                  authentications:
                    type: array
                    items:
                      $ref: '#/components/schemas/Authentication'
                  pagination:
                    $ref: '#/components/schemas/Pagination'
                required:
                  - authentications
                  - pagination
        '400':
          $ref: '#/components/responses/BadRequest'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: |
            // Initialize the client
            var client = new IngestionClient(
              new IngestionConfig("YOUR_APP_ID", "YOUR_API_KEY", "YOUR_APP_ID_REGION")
            );

            // Call the API
            var response = await client.GetAuthenticationsAsync();
        - lang: go
          label: Go
          source: >
            // Initialize the client with your application region, eg.
            ingestion.YOUR_APP_ID_REGION

            client, err := ingestion.NewClient("YOUR_APP_ID", "YOUR_API_KEY",
            ingestion.US)

            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }


            // Call the API

            resp, err :=
            client.GetAuthentications(client.NewApiGetAuthenticationsRequest())

            if err != nil {
              // handle the eventual error
              panic(err)
            }


            // use the model directly

            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            IngestionClient client = new IngestionClient("YOUR_APP_ID",
            "YOUR_API_KEY", "YOUR_APP_ID_REGION");


            // Call the API

            client.getAuthentications();
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = ingestionClient(
              'YOUR_APP_ID',
              'YOUR_API_KEY',
              'YOUR_APP_ID_REGION'
            );

            // Call the API
            const response = await client.getAuthentications();

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            var response = client.getAuthentications()


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\IngestionClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>', 'YOUR_APP_ID_REGION');


            // Call the API

            $response = $client->getAuthentications();


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: >
            # Initialize the client

            _client = IngestionClient("YOUR_APP_ID", "YOUR_API_KEY",
            "YOUR_APP_ID_REGION")


            # Call the API

            resp = await _client.get_authentications()


            # use the class directly

            print(resp)


            # print the JSON response

            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: >
            # Initialize the client

            client = Algolia::IngestionClient.create('YOUR_APP_ID',
            'YOUR_API_KEY', 'YOUR_APP_ID_REGION')


            # Call the API

            resp = client.get_authentications


            # use the class directly

            puts resp


            # print the JSON response

            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            val res = client.getAuthentications(

            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try IngestionClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY", region: .us)


            // Call the API

            _ = try await client.getAuthentications()
    post:
      tags:
        - authentications
      summary: Create an authentication resource
      description: Creates a new authentication resource.
      operationId: createAuthentication
      x-acl:
        - addObject
        - deleteIndex
        - editSettings
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AuthenticationCreate'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthenticationCreateResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: |
            // Initialize the client
            var client = new IngestionClient(
              new IngestionConfig("YOUR_APP_ID", "YOUR_API_KEY", "YOUR_APP_ID_REGION")
            );

            // Call the API
            var response = await client.CreateAuthenticationAsync(
              new AuthenticationCreate
              {
                Type = Enum.Parse<AuthenticationType>("Oauth"),
                Name = "authName",
                Input = new AuthInput(
                  new AuthOAuth
                  {
                    Url = "http://test.oauth",
                    ClientId = "myID",
                    ClientSecret = "mySecret",
                  }
                ),
              }
            );
        - lang: go
          label: Go
          source: >
            // Initialize the client with your application region, eg.
            ingestion.YOUR_APP_ID_REGION

            client, err := ingestion.NewClient("YOUR_APP_ID", "YOUR_API_KEY",
            ingestion.US)

            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }


            // Call the API

            resp, err :=
            client.CreateAuthentication(client.NewApiCreateAuthenticationRequest(

              ingestion.NewEmptyAuthenticationCreate().SetType(ingestion.AuthenticationType("oauth")).SetName("authName").SetInput(ingestion.AuthOAuthAsAuthInput(
                ingestion.NewEmptyAuthOAuth().SetUrl("http://test.oauth").SetClientId("myID").SetClientSecret("mySecret"))),
            ))

            if err != nil {
              // handle the eventual error
              panic(err)
            }


            // use the model directly

            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            IngestionClient client = new IngestionClient("YOUR_APP_ID",
            "YOUR_API_KEY", "YOUR_APP_ID_REGION");


            // Call the API

            client.createAuthentication(
              new AuthenticationCreate()
                .setType(AuthenticationType.fromValue("oauth"))
                .setName("authName")
                .setInput(new AuthOAuth().setUrl("http://test.oauth").setClientId("myID").setClientSecret("mySecret"))
            );
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = ingestionClient(
              'YOUR_APP_ID',
              'YOUR_API_KEY',
              'YOUR_APP_ID_REGION'
            );

            // Call the API
            const response = await client.createAuthentication({
              type: 'oauth',
              name: 'authName',
              input: {
                url: 'http://test.oauth',
                client_id: 'myID',
                client_secret: 'mySecret',
              },
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            var response = client.createAuthentication(
              authenticationCreate = AuthenticationCreate(
                type = AuthenticationType.entries.first { it.value == "oauth" },
                name = "authName",
                input = AuthOAuth(
                  url = "http://test.oauth",
                  clientId = "myID",
                  clientSecret = "mySecret",
                ),
              ),
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\IngestionClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>', 'YOUR_APP_ID_REGION');


            // Call the API

            $response = $client->createAuthentication(
                ['type' => 'oauth',
                    'name' => 'authName',
                    'input' => ['url' => 'http://test.oauth',
                        'client_id' => 'myID',
                        'client_secret' => 'mySecret',
                    ],
                ],
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: >
            # Initialize the client

            _client = IngestionClient("YOUR_APP_ID", "YOUR_API_KEY",
            "YOUR_APP_ID_REGION")


            # Call the API

            resp = await _client.create_authentication(
                authentication_create={
                    "type": "oauth",
                    "name": "authName",
                    "input": {
                        "url": "http://test.oauth",
                        "client_id": "myID",
                        "client_secret": "mySecret",
                    },
                },
            )


            # use the class directly

            print(resp)


            # print the JSON response

            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: >
            # Initialize the client

            client = Algolia::IngestionClient.create('YOUR_APP_ID',
            'YOUR_API_KEY', 'YOUR_APP_ID_REGION')


            # Call the API

            resp = client.create_authentication(
              AuthenticationCreate.new(
                type: 'oauth',
                name: "authName",
                input: AuthOAuth.new(url: "http://test.oauth", client_id: "myID", client_secret: "mySecret")
              )
            )


            # use the class directly

            puts resp


            # print the JSON response

            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            val res = client.createAuthentication(
              authenticationCreate = AuthenticationCreate(
                `type` = AuthenticationType.withName("oauth"),
                name = "authName",
                input = AuthOAuth(
                  url = "http://test.oauth",
                  client_id = "myID",
                  client_secret = "mySecret"
                )
              )
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try IngestionClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY", region: .us)


            // Call the API

            _ = try await client.createAuthentication(authenticationCreate:
            AuthenticationCreate(
                type: AuthenticationType.oauth,
                name: "authName",
                input: AuthInput.authOAuth(AuthOAuth(url: "http://test.oauth", clientId: "myID", clientSecret: "mySecret"))
            ))
  /1/authentications/search:
    post:
      tags:
        - authentications
      summary: Search for authentication resources
      description: Searches for authentication resources.
      operationId: searchAuthentications
      x-acl:
        - addObject
        - deleteIndex
        - editSettings
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AuthenticationSearch'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                title: searchAuthenticationsResponse
                type: array
                items:
                  $ref: '#/components/schemas/Authentication'
        '400':
          $ref: '#/components/responses/BadRequest'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: |
            // Initialize the client
            var client = new IngestionClient(
              new IngestionConfig("YOUR_APP_ID", "YOUR_API_KEY", "YOUR_APP_ID_REGION")
            );

            // Call the API
            var response = await client.SearchAuthenticationsAsync(
              new AuthenticationSearch
              {
                AuthenticationIDs = new List<string>
                {
                  "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
                  "947ac9c4-7e58-4c87-b1e7-14a68e99699a"
                },
              }
            );
        - lang: go
          label: Go
          source: >
            // Initialize the client with your application region, eg.
            ingestion.YOUR_APP_ID_REGION

            client, err := ingestion.NewClient("YOUR_APP_ID", "YOUR_API_KEY",
            ingestion.US)

            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }


            // Call the API

            resp, err :=
            client.SearchAuthentications(client.NewApiSearchAuthenticationsRequest(

              ingestion.NewEmptyAuthenticationSearch().SetAuthenticationIDs(
                []string{"6c02aeb1-775e-418e-870b-1faccd4b2c0f", "947ac9c4-7e58-4c87-b1e7-14a68e99699a"}),
            ))

            if err != nil {
              // handle the eventual error
              panic(err)
            }


            // use the model directly

            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            IngestionClient client = new IngestionClient("YOUR_APP_ID",
            "YOUR_API_KEY", "YOUR_APP_ID_REGION");


            // Call the API

            client.searchAuthentications(
              new AuthenticationSearch()
                .setAuthenticationIDs(List.of("6c02aeb1-775e-418e-870b-1faccd4b2c0f", "947ac9c4-7e58-4c87-b1e7-14a68e99699a"))
            );
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = ingestionClient(
              'YOUR_APP_ID',
              'YOUR_API_KEY',
              'YOUR_APP_ID_REGION'
            );

            // Call the API
            const response = await client.searchAuthentications({
              authenticationIDs: [
                '6c02aeb1-775e-418e-870b-1faccd4b2c0f',
                '947ac9c4-7e58-4c87-b1e7-14a68e99699a',
              ],
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            var response = client.searchAuthentications(
              authenticationSearch = AuthenticationSearch(
                authenticationIDs = listOf("6c02aeb1-775e-418e-870b-1faccd4b2c0f", "947ac9c4-7e58-4c87-b1e7-14a68e99699a"),
              ),
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\IngestionClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>', 'YOUR_APP_ID_REGION');


            // Call the API

            $response = $client->searchAuthentications(
                ['authenticationIDs' => [
                    '6c02aeb1-775e-418e-870b-1faccd4b2c0f',

                    '947ac9c4-7e58-4c87-b1e7-14a68e99699a',
                ],
                ],
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: >
            # Initialize the client

            _client = IngestionClient("YOUR_APP_ID", "YOUR_API_KEY",
            "YOUR_APP_ID_REGION")


            # Call the API

            resp = await _client.search_authentications(
                authentication_search={
                    "authenticationIDs": [
                        "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
                        "947ac9c4-7e58-4c87-b1e7-14a68e99699a",
                    ],
                },
            )


            # use the class directly

            print(resp)


            # print the JSON response

            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: >
            # Initialize the client

            client = Algolia::IngestionClient.create('YOUR_APP_ID',
            'YOUR_API_KEY', 'YOUR_APP_ID_REGION')


            # Call the API

            resp = client.search_authentications(
              AuthenticationSearch.new(
                authentication_ids: [
                  "6c02aeb1-775e-418e-870b-1faccd4b2c0f", "947ac9c4-7e58-4c87-b1e7-14a68e99699a"
                ]
              )
            )


            # use the class directly

            puts resp


            # print the JSON response

            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            val res = client.searchAuthentications(
              authenticationSearch = AuthenticationSearch(
                authenticationIDs = Seq("6c02aeb1-775e-418e-870b-1faccd4b2c0f", "947ac9c4-7e58-4c87-b1e7-14a68e99699a")
              )
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try IngestionClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY", region: .us)


            // Call the API

            _ = try await client.searchAuthentications(authenticationSearch:
            AuthenticationSearch(authenticationIDs: [
                "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
                "947ac9c4-7e58-4c87-b1e7-14a68e99699a",
            ]))
  /1/authentications/{authenticationID}:
    get:
      tags:
        - authentications
      summary: Retrieve an authentication resource
      description: Retrieves an authentication resource by its ID.
      operationId: getAuthentication
      x-acl:
        - addObject
        - deleteIndex
        - editSettings
      parameters:
        - $ref: '#/components/parameters/pathAuthenticationID'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Authentication'
        '400':
          $ref: '#/components/responses/BadRequest'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new IngestionClient(
              new IngestionConfig("YOUR_APP_ID", "YOUR_API_KEY", "YOUR_APP_ID_REGION")
            );


            // Call the API

            var response = await
            client.GetAuthenticationAsync("6c02aeb1-775e-418e-870b-1faccd4b2c0f");
        - lang: go
          label: Go
          source: >
            // Initialize the client with your application region, eg.
            ingestion.YOUR_APP_ID_REGION

            client, err := ingestion.NewClient("YOUR_APP_ID", "YOUR_API_KEY",
            ingestion.US)

            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }


            // Call the API

            resp, err :=
            client.GetAuthentication(client.NewApiGetAuthenticationRequest(
              "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
            ))

            if err != nil {
              // handle the eventual error
              panic(err)
            }


            // use the model directly

            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            IngestionClient client = new IngestionClient("YOUR_APP_ID",
            "YOUR_API_KEY", "YOUR_APP_ID_REGION");


            // Call the API

            client.getAuthentication("6c02aeb1-775e-418e-870b-1faccd4b2c0f");
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = ingestionClient(
              'YOUR_APP_ID',
              'YOUR_API_KEY',
              'YOUR_APP_ID_REGION'
            );

            // Call the API
            const response = await client.getAuthentication({
              authenticationID: '6c02aeb1-775e-418e-870b-1faccd4b2c0f',
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            var response = client.getAuthentication(
              authenticationID = "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\IngestionClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>', 'YOUR_APP_ID_REGION');


            // Call the API

            $response = $client->getAuthentication(
                '6c02aeb1-775e-418e-870b-1faccd4b2c0f',
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: >
            # Initialize the client

            _client = IngestionClient("YOUR_APP_ID", "YOUR_API_KEY",
            "YOUR_APP_ID_REGION")


            # Call the API

            resp = await _client.get_authentication(
                authentication_id="6c02aeb1-775e-418e-870b-1faccd4b2c0f",
            )


            # use the class directly

            print(resp)


            # print the JSON response

            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: >
            # Initialize the client

            client = Algolia::IngestionClient.create('YOUR_APP_ID',
            'YOUR_API_KEY', 'YOUR_APP_ID_REGION')


            # Call the API

            resp =
            client.get_authentication("6c02aeb1-775e-418e-870b-1faccd4b2c0f")


            # use the class directly

            puts resp


            # print the JSON response

            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            val res = client.getAuthentication(
              authenticationID = "6c02aeb1-775e-418e-870b-1faccd4b2c0f"
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try IngestionClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY", region: .us)


            // Call the API

            _ = try await client.getAuthentication(authenticationID:
            "6c02aeb1-775e-418e-870b-1faccd4b2c0f")
    patch:
      tags:
        - authentications
      summary: Update an authentication resource
      description: Updates an authentication resource.
      operationId: updateAuthentication
      x-acl:
        - addObject
        - deleteIndex
        - editSettings
      parameters:
        - $ref: '#/components/parameters/pathAuthenticationID'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AuthenticationUpdate'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthenticationUpdateResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: |
            // Initialize the client
            var client = new IngestionClient(
              new IngestionConfig("YOUR_APP_ID", "YOUR_API_KEY", "YOUR_APP_ID_REGION")
            );

            // Call the API
            var response = await client.UpdateAuthenticationAsync(
              "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
              new AuthenticationUpdate { Name = "newName", }
            );
        - lang: go
          label: Go
          source: >
            // Initialize the client with your application region, eg.
            ingestion.YOUR_APP_ID_REGION

            client, err := ingestion.NewClient("YOUR_APP_ID", "YOUR_API_KEY",
            ingestion.US)

            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }


            // Call the API

            resp, err :=
            client.UpdateAuthentication(client.NewApiUpdateAuthenticationRequest(
              "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
              ingestion.NewEmptyAuthenticationUpdate().SetName("newName"),
            ))

            if err != nil {
              // handle the eventual error
              panic(err)
            }


            // use the model directly

            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            IngestionClient client = new IngestionClient("YOUR_APP_ID",
            "YOUR_API_KEY", "YOUR_APP_ID_REGION");


            // Call the API

            client.updateAuthentication("6c02aeb1-775e-418e-870b-1faccd4b2c0f",
            new AuthenticationUpdate().setName("newName"));
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = ingestionClient(
              'YOUR_APP_ID',
              'YOUR_API_KEY',
              'YOUR_APP_ID_REGION'
            );

            // Call the API
            const response = await client.updateAuthentication({
              authenticationID: '6c02aeb1-775e-418e-870b-1faccd4b2c0f',
              authenticationUpdate: { name: 'newName' },
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            var response = client.updateAuthentication(
              authenticationID = "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
              authenticationUpdate = AuthenticationUpdate(
                name = "newName",
              ),
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\IngestionClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>', 'YOUR_APP_ID_REGION');


            // Call the API

            $response = $client->updateAuthentication(
                '6c02aeb1-775e-418e-870b-1faccd4b2c0f',
                ['name' => 'newName',
                ],
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: >
            # Initialize the client

            _client = IngestionClient("YOUR_APP_ID", "YOUR_API_KEY",
            "YOUR_APP_ID_REGION")


            # Call the API

            resp = await _client.update_authentication(
                authentication_id="6c02aeb1-775e-418e-870b-1faccd4b2c0f",
                authentication_update={
                    "name": "newName",
                },
            )


            # use the class directly

            print(resp)


            # print the JSON response

            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: >
            # Initialize the client

            client = Algolia::IngestionClient.create('YOUR_APP_ID',
            'YOUR_API_KEY', 'YOUR_APP_ID_REGION')


            # Call the API

            resp = client.update_authentication(
              "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
              AuthenticationUpdate.new(name: "newName")
            )


            # use the class directly

            puts resp


            # print the JSON response

            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            val res = client.updateAuthentication(
              authenticationID = "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
              authenticationUpdate = AuthenticationUpdate(
                name = Some("newName")
              )
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try IngestionClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY", region: .us)


            // Call the API

            _ = try await client.updateAuthentication(
                authenticationID: "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
                authenticationUpdate: AuthenticationUpdate(name: "newName")
            )
    delete:
      tags:
        - authentications
      summary: Delete an authentication resource
      description: >-
        Deletes an authentication resource. You can't delete authentication
        resources that are used by a source or a destination.
      operationId: deleteAuthentication
      x-acl:
        - addObject
        - deleteIndex
        - editSettings
      parameters:
        - $ref: '#/components/parameters/pathAuthenticationID'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new IngestionClient(
              new IngestionConfig("YOUR_APP_ID", "YOUR_API_KEY", "YOUR_APP_ID_REGION")
            );


            // Call the API

            var response = await
            client.DeleteAuthenticationAsync("6c02aeb1-775e-418e-870b-1faccd4b2c0f");
        - lang: go
          label: Go
          source: >
            // Initialize the client with your application region, eg.
            ingestion.YOUR_APP_ID_REGION

            client, err := ingestion.NewClient("YOUR_APP_ID", "YOUR_API_KEY",
            ingestion.US)

            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }


            // Call the API

            resp, err :=
            client.DeleteAuthentication(client.NewApiDeleteAuthenticationRequest(
              "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
            ))

            if err != nil {
              // handle the eventual error
              panic(err)
            }


            // use the model directly

            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            IngestionClient client = new IngestionClient("YOUR_APP_ID",
            "YOUR_API_KEY", "YOUR_APP_ID_REGION");


            // Call the API

            client.deleteAuthentication("6c02aeb1-775e-418e-870b-1faccd4b2c0f");
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = ingestionClient(
              'YOUR_APP_ID',
              'YOUR_API_KEY',
              'YOUR_APP_ID_REGION'
            );

            // Call the API
            const response = await client.deleteAuthentication({
              authenticationID: '6c02aeb1-775e-418e-870b-1faccd4b2c0f',
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            var response = client.deleteAuthentication(
              authenticationID = "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\IngestionClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>', 'YOUR_APP_ID_REGION');


            // Call the API

            $response = $client->deleteAuthentication(
                '6c02aeb1-775e-418e-870b-1faccd4b2c0f',
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: >
            # Initialize the client

            _client = IngestionClient("YOUR_APP_ID", "YOUR_API_KEY",
            "YOUR_APP_ID_REGION")


            # Call the API

            resp = await _client.delete_authentication(
                authentication_id="6c02aeb1-775e-418e-870b-1faccd4b2c0f",
            )


            # use the class directly

            print(resp)


            # print the JSON response

            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: >
            # Initialize the client

            client = Algolia::IngestionClient.create('YOUR_APP_ID',
            'YOUR_API_KEY', 'YOUR_APP_ID_REGION')


            # Call the API

            resp =
            client.delete_authentication("6c02aeb1-775e-418e-870b-1faccd4b2c0f")


            # use the class directly

            puts resp


            # print the JSON response

            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            val res = client.deleteAuthentication(
              authenticationID = "6c02aeb1-775e-418e-870b-1faccd4b2c0f"
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try IngestionClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY", region: .us)


            // Call the API

            _ = try await client.deleteAuthentication(authenticationID:
            "6c02aeb1-775e-418e-870b-1faccd4b2c0f")
  /1/destinations:
    get:
      tags:
        - destinations
      summary: List destinations
      description: Retrieves a list of destinations.
      operationId: getDestinations
      x-acl:
        - addObject
        - deleteIndex
        - editSettings
      parameters:
        - $ref: '#/components/parameters/itemsPerPage'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/destinationParameters_type'
        - $ref: '#/components/parameters/authenticationID'
        - $ref: '#/components/parameters/destinationParameters_sort'
        - $ref: '#/components/parameters/order'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                title: listDestinationsResponse
                type: object
                additionalProperties: false
                properties:
                  destinations:
                    type: array
                    items:
                      $ref: '#/components/schemas/Destination'
                  pagination:
                    $ref: '#/components/schemas/Pagination'
                required:
                  - destinations
                  - pagination
        '400':
          $ref: '#/components/responses/BadRequest'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: |
            // Initialize the client
            var client = new IngestionClient(
              new IngestionConfig("YOUR_APP_ID", "YOUR_API_KEY", "YOUR_APP_ID_REGION")
            );

            // Call the API
            var response = await client.GetDestinationsAsync();
        - lang: go
          label: Go
          source: >
            // Initialize the client with your application region, eg.
            ingestion.YOUR_APP_ID_REGION

            client, err := ingestion.NewClient("YOUR_APP_ID", "YOUR_API_KEY",
            ingestion.US)

            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }


            // Call the API

            resp, err :=
            client.GetDestinations(client.NewApiGetDestinationsRequest())

            if err != nil {
              // handle the eventual error
              panic(err)
            }


            // use the model directly

            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            IngestionClient client = new IngestionClient("YOUR_APP_ID",
            "YOUR_API_KEY", "YOUR_APP_ID_REGION");


            // Call the API

            client.getDestinations();
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = ingestionClient(
              'YOUR_APP_ID',
              'YOUR_API_KEY',
              'YOUR_APP_ID_REGION'
            );

            // Call the API
            const response = await client.getDestinations();

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            var response = client.getDestinations()


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\IngestionClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>', 'YOUR_APP_ID_REGION');


            // Call the API

            $response = $client->getDestinations();


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: >
            # Initialize the client

            _client = IngestionClient("YOUR_APP_ID", "YOUR_API_KEY",
            "YOUR_APP_ID_REGION")


            # Call the API

            resp = await _client.get_destinations()


            # use the class directly

            print(resp)


            # print the JSON response

            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: >
            # Initialize the client

            client = Algolia::IngestionClient.create('YOUR_APP_ID',
            'YOUR_API_KEY', 'YOUR_APP_ID_REGION')


            # Call the API

            resp = client.get_destinations


            # use the class directly

            puts resp


            # print the JSON response

            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            val res = client.getDestinations(

            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try IngestionClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY", region: .us)


            // Call the API

            _ = try await client.getDestinations()
    post:
      tags:
        - destinations
      summary: Create a destination
      description: Creates a new destination.
      operationId: createDestination
      x-acl:
        - addObject
        - deleteIndex
        - editSettings
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DestinationCreate'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DestinationCreateResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: |
            // Initialize the client
            var client = new IngestionClient(
              new IngestionConfig("YOUR_APP_ID", "YOUR_API_KEY", "YOUR_APP_ID_REGION")
            );

            // Call the API
            var response = await client.CreateDestinationAsync(
              new DestinationCreate
              {
                Type = Enum.Parse<DestinationType>("Search"),
                Name = "destinationName",
                Input = new DestinationInput(new DestinationIndexPrefix { IndexPrefix = "prefix_", }),
                AuthenticationID = "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
              }
            );
        - lang: go
          label: Go
          source: >
            // Initialize the client with your application region, eg.
            ingestion.YOUR_APP_ID_REGION

            client, err := ingestion.NewClient("YOUR_APP_ID", "YOUR_API_KEY",
            ingestion.US)

            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }


            // Call the API

            resp, err :=
            client.CreateDestination(client.NewApiCreateDestinationRequest(

              ingestion.NewEmptyDestinationCreate().SetType(ingestion.DestinationType("search")).SetName("destinationName").SetInput(ingestion.DestinationIndexPrefixAsDestinationInput(
                ingestion.NewEmptyDestinationIndexPrefix().SetIndexPrefix("prefix_"))).SetAuthenticationID("6c02aeb1-775e-418e-870b-1faccd4b2c0f"),
            ))

            if err != nil {
              // handle the eventual error
              panic(err)
            }


            // use the model directly

            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            IngestionClient client = new IngestionClient("YOUR_APP_ID",
            "YOUR_API_KEY", "YOUR_APP_ID_REGION");


            // Call the API

            client.createDestination(
              new DestinationCreate()
                .setType(DestinationType.fromValue("search"))
                .setName("destinationName")
                .setInput(new DestinationIndexPrefix().setIndexPrefix("prefix_"))
                .setAuthenticationID("6c02aeb1-775e-418e-870b-1faccd4b2c0f")
            );
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = ingestionClient(
              'YOUR_APP_ID',
              'YOUR_API_KEY',
              'YOUR_APP_ID_REGION'
            );

            // Call the API
            const response = await client.createDestination({
              type: 'search',
              name: 'destinationName',
              input: { indexPrefix: 'prefix_' },
              authenticationID: '6c02aeb1-775e-418e-870b-1faccd4b2c0f',
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            var response = client.createDestination(
              destinationCreate = DestinationCreate(
                type = DestinationType.entries.first { it.value == "search" },
                name = "destinationName",
                input = DestinationIndexPrefix(
                  indexPrefix = "prefix_",
                ),
                authenticationID = "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
              ),
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\IngestionClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>', 'YOUR_APP_ID_REGION');


            // Call the API

            $response = $client->createDestination(
                ['type' => 'search',
                    'name' => 'destinationName',
                    'input' => ['indexPrefix' => 'prefix_',
                    ],
                    'authenticationID' => '6c02aeb1-775e-418e-870b-1faccd4b2c0f',
                ],
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: >
            # Initialize the client

            _client = IngestionClient("YOUR_APP_ID", "YOUR_API_KEY",
            "YOUR_APP_ID_REGION")


            # Call the API

            resp = await _client.create_destination(
                destination_create={
                    "type": "search",
                    "name": "destinationName",
                    "input": {
                        "indexPrefix": "prefix_",
                    },
                    "authenticationID": "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
                },
            )


            # use the class directly

            print(resp)


            # print the JSON response

            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: >
            # Initialize the client

            client = Algolia::IngestionClient.create('YOUR_APP_ID',
            'YOUR_API_KEY', 'YOUR_APP_ID_REGION')


            # Call the API

            resp = client.create_destination(
              DestinationCreate.new(
                type: 'search',
                name: "destinationName",
                input: DestinationIndexPrefix.new(index_prefix: "prefix_"),
                authentication_id: "6c02aeb1-775e-418e-870b-1faccd4b2c0f"
              )
            )


            # use the class directly

            puts resp


            # print the JSON response

            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            val res = client.createDestination(
              destinationCreate = DestinationCreate(
                `type` = DestinationType.withName("search"),
                name = "destinationName",
                input = DestinationIndexPrefix(
                  indexPrefix = "prefix_"
                ),
                authenticationID = Some("6c02aeb1-775e-418e-870b-1faccd4b2c0f")
              )
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try IngestionClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY", region: .us)


            // Call the API

            _ = try await client.createDestination(destinationCreate:
            DestinationCreate(
                type: DestinationType.search,
                name: "destinationName",
                input: DestinationInput.destinationIndexPrefix(DestinationIndexPrefix(indexPrefix: "prefix_")),
                authenticationID: "6c02aeb1-775e-418e-870b-1faccd4b2c0f"
            ))
  /1/destinations/search:
    post:
      tags:
        - destinations
      summary: Search for destinations
      description: Searches for destinations.
      operationId: searchDestinations
      x-acl:
        - addObject
        - deleteIndex
        - editSettings
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DestinationSearch'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                title: searchDestinationsResponse
                type: array
                items:
                  $ref: '#/components/schemas/Destination'
        '400':
          $ref: '#/components/responses/BadRequest'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: |
            // Initialize the client
            var client = new IngestionClient(
              new IngestionConfig("YOUR_APP_ID", "YOUR_API_KEY", "YOUR_APP_ID_REGION")
            );

            // Call the API
            var response = await client.SearchDestinationsAsync(
              new DestinationSearch
              {
                DestinationIDs = new List<string>
                {
                  "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
                  "947ac9c4-7e58-4c87-b1e7-14a68e99699a"
                },
              }
            );
        - lang: go
          label: Go
          source: >
            // Initialize the client with your application region, eg.
            ingestion.YOUR_APP_ID_REGION

            client, err := ingestion.NewClient("YOUR_APP_ID", "YOUR_API_KEY",
            ingestion.US)

            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }


            // Call the API

            resp, err :=
            client.SearchDestinations(client.NewApiSearchDestinationsRequest(

              ingestion.NewEmptyDestinationSearch().SetDestinationIDs(
                []string{"6c02aeb1-775e-418e-870b-1faccd4b2c0f", "947ac9c4-7e58-4c87-b1e7-14a68e99699a"}),
            ))

            if err != nil {
              // handle the eventual error
              panic(err)
            }


            // use the model directly

            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            IngestionClient client = new IngestionClient("YOUR_APP_ID",
            "YOUR_API_KEY", "YOUR_APP_ID_REGION");


            // Call the API

            client.searchDestinations(
              new DestinationSearch().setDestinationIDs(List.of("6c02aeb1-775e-418e-870b-1faccd4b2c0f", "947ac9c4-7e58-4c87-b1e7-14a68e99699a"))
            );
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = ingestionClient(
              'YOUR_APP_ID',
              'YOUR_API_KEY',
              'YOUR_APP_ID_REGION'
            );

            // Call the API
            const response = await client.searchDestinations({
              destinationIDs: [
                '6c02aeb1-775e-418e-870b-1faccd4b2c0f',
                '947ac9c4-7e58-4c87-b1e7-14a68e99699a',
              ],
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            var response = client.searchDestinations(
              destinationSearch = DestinationSearch(
                destinationIDs = listOf("6c02aeb1-775e-418e-870b-1faccd4b2c0f", "947ac9c4-7e58-4c87-b1e7-14a68e99699a"),
              ),
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\IngestionClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>', 'YOUR_APP_ID_REGION');


            // Call the API

            $response = $client->searchDestinations(
                ['destinationIDs' => [
                    '6c02aeb1-775e-418e-870b-1faccd4b2c0f',

                    '947ac9c4-7e58-4c87-b1e7-14a68e99699a',
                ],
                ],
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: >
            # Initialize the client

            _client = IngestionClient("YOUR_APP_ID", "YOUR_API_KEY",
            "YOUR_APP_ID_REGION")


            # Call the API

            resp = await _client.search_destinations(
                destination_search={
                    "destinationIDs": [
                        "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
                        "947ac9c4-7e58-4c87-b1e7-14a68e99699a",
                    ],
                },
            )


            # use the class directly

            print(resp)


            # print the JSON response

            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: >
            # Initialize the client

            client = Algolia::IngestionClient.create('YOUR_APP_ID',
            'YOUR_API_KEY', 'YOUR_APP_ID_REGION')


            # Call the API

            resp = client.search_destinations(
              DestinationSearch.new(
                destination_ids: [
                  "6c02aeb1-775e-418e-870b-1faccd4b2c0f", "947ac9c4-7e58-4c87-b1e7-14a68e99699a"
                ]
              )
            )


            # use the class directly

            puts resp


            # print the JSON response

            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            val res = client.searchDestinations(
              destinationSearch = DestinationSearch(
                destinationIDs = Seq("6c02aeb1-775e-418e-870b-1faccd4b2c0f", "947ac9c4-7e58-4c87-b1e7-14a68e99699a")
              )
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try IngestionClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY", region: .us)


            // Call the API

            _ = try await client.searchDestinations(destinationSearch:
            DestinationSearch(destinationIDs: [
                "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
                "947ac9c4-7e58-4c87-b1e7-14a68e99699a",
            ]))
  /1/destinations/{destinationID}:
    get:
      tags:
        - destinations
      summary: Retrieve a destination
      description: Retrieves a destination by its ID.
      operationId: getDestination
      x-acl:
        - addObject
        - deleteIndex
        - editSettings
      parameters:
        - $ref: '#/components/parameters/pathDestinationID'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Destination'
        '400':
          $ref: '#/components/responses/BadRequest'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new IngestionClient(
              new IngestionConfig("YOUR_APP_ID", "YOUR_API_KEY", "YOUR_APP_ID_REGION")
            );


            // Call the API

            var response = await
            client.GetDestinationAsync("6c02aeb1-775e-418e-870b-1faccd4b2c0f");
        - lang: go
          label: Go
          source: >
            // Initialize the client with your application region, eg.
            ingestion.YOUR_APP_ID_REGION

            client, err := ingestion.NewClient("YOUR_APP_ID", "YOUR_API_KEY",
            ingestion.US)

            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }


            // Call the API

            resp, err :=
            client.GetDestination(client.NewApiGetDestinationRequest(
              "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
            ))

            if err != nil {
              // handle the eventual error
              panic(err)
            }


            // use the model directly

            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            IngestionClient client = new IngestionClient("YOUR_APP_ID",
            "YOUR_API_KEY", "YOUR_APP_ID_REGION");


            // Call the API

            client.getDestination("6c02aeb1-775e-418e-870b-1faccd4b2c0f");
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = ingestionClient(
              'YOUR_APP_ID',
              'YOUR_API_KEY',
              'YOUR_APP_ID_REGION'
            );

            // Call the API
            const response = await client.getDestination({
              destinationID: '6c02aeb1-775e-418e-870b-1faccd4b2c0f',
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            var response = client.getDestination(
              destinationID = "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\IngestionClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>', 'YOUR_APP_ID_REGION');


            // Call the API

            $response = $client->getDestination(
                '6c02aeb1-775e-418e-870b-1faccd4b2c0f',
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: >
            # Initialize the client

            _client = IngestionClient("YOUR_APP_ID", "YOUR_API_KEY",
            "YOUR_APP_ID_REGION")


            # Call the API

            resp = await _client.get_destination(
                destination_id="6c02aeb1-775e-418e-870b-1faccd4b2c0f",
            )


            # use the class directly

            print(resp)


            # print the JSON response

            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: >
            # Initialize the client

            client = Algolia::IngestionClient.create('YOUR_APP_ID',
            'YOUR_API_KEY', 'YOUR_APP_ID_REGION')


            # Call the API

            resp =
            client.get_destination("6c02aeb1-775e-418e-870b-1faccd4b2c0f")


            # use the class directly

            puts resp


            # print the JSON response

            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            val res = client.getDestination(
              destinationID = "6c02aeb1-775e-418e-870b-1faccd4b2c0f"
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try IngestionClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY", region: .us)


            // Call the API

            _ = try await client.getDestination(destinationID:
            "6c02aeb1-775e-418e-870b-1faccd4b2c0f")
    patch:
      tags:
        - destinations
      summary: Update a destination
      description: Updates the destination by its ID.
      operationId: updateDestination
      x-acl:
        - addObject
        - deleteIndex
        - editSettings
      parameters:
        - $ref: '#/components/parameters/pathDestinationID'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DestinationUpdate'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DestinationUpdateResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: |
            // Initialize the client
            var client = new IngestionClient(
              new IngestionConfig("YOUR_APP_ID", "YOUR_API_KEY", "YOUR_APP_ID_REGION")
            );

            // Call the API
            var response = await client.UpdateDestinationAsync(
              "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
              new DestinationUpdate { Name = "newName", }
            );
        - lang: go
          label: Go
          source: >
            // Initialize the client with your application region, eg.
            ingestion.YOUR_APP_ID_REGION

            client, err := ingestion.NewClient("YOUR_APP_ID", "YOUR_API_KEY",
            ingestion.US)

            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }


            // Call the API

            resp, err :=
            client.UpdateDestination(client.NewApiUpdateDestinationRequest(
              "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
              ingestion.NewEmptyDestinationUpdate().SetName("newName"),
            ))

            if err != nil {
              // handle the eventual error
              panic(err)
            }


            // use the model directly

            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            IngestionClient client = new IngestionClient("YOUR_APP_ID",
            "YOUR_API_KEY", "YOUR_APP_ID_REGION");


            // Call the API

            client.updateDestination("6c02aeb1-775e-418e-870b-1faccd4b2c0f", new
            DestinationUpdate().setName("newName"));
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = ingestionClient(
              'YOUR_APP_ID',
              'YOUR_API_KEY',
              'YOUR_APP_ID_REGION'
            );

            // Call the API
            const response = await client.updateDestination({
              destinationID: '6c02aeb1-775e-418e-870b-1faccd4b2c0f',
              destinationUpdate: { name: 'newName' },
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            var response = client.updateDestination(
              destinationID = "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
              destinationUpdate = DestinationUpdate(
                name = "newName",
              ),
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\IngestionClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>', 'YOUR_APP_ID_REGION');


            // Call the API

            $response = $client->updateDestination(
                '6c02aeb1-775e-418e-870b-1faccd4b2c0f',
                ['name' => 'newName',
                ],
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: >
            # Initialize the client

            _client = IngestionClient("YOUR_APP_ID", "YOUR_API_KEY",
            "YOUR_APP_ID_REGION")


            # Call the API

            resp = await _client.update_destination(
                destination_id="6c02aeb1-775e-418e-870b-1faccd4b2c0f",
                destination_update={
                    "name": "newName",
                },
            )


            # use the class directly

            print(resp)


            # print the JSON response

            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: >
            # Initialize the client

            client = Algolia::IngestionClient.create('YOUR_APP_ID',
            'YOUR_API_KEY', 'YOUR_APP_ID_REGION')


            # Call the API

            resp = client.update_destination(
              "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
              DestinationUpdate.new(name: "newName")
            )


            # use the class directly

            puts resp


            # print the JSON response

            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            val res = client.updateDestination(
              destinationID = "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
              destinationUpdate = DestinationUpdate(
                name = Some("newName")
              )
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try IngestionClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY", region: .us)


            // Call the API

            _ = try await client.updateDestination(
                destinationID: "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
                destinationUpdate: DestinationUpdate(name: "newName")
            )
    delete:
      tags:
        - destinations
      summary: Delete a destination
      description: >-
        Deletes a destination by its ID. You can't delete destinations that are
        referenced in tasks.
      operationId: deleteDestination
      x-acl:
        - addObject
        - deleteIndex
        - editSettings
      parameters:
        - $ref: '#/components/parameters/pathDestinationID'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new IngestionClient(
              new IngestionConfig("YOUR_APP_ID", "YOUR_API_KEY", "YOUR_APP_ID_REGION")
            );


            // Call the API

            var response = await
            client.DeleteDestinationAsync("6c02aeb1-775e-418e-870b-1faccd4b2c0f");
        - lang: go
          label: Go
          source: >
            // Initialize the client with your application region, eg.
            ingestion.YOUR_APP_ID_REGION

            client, err := ingestion.NewClient("YOUR_APP_ID", "YOUR_API_KEY",
            ingestion.US)

            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }


            // Call the API

            resp, err :=
            client.DeleteDestination(client.NewApiDeleteDestinationRequest(
              "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
            ))

            if err != nil {
              // handle the eventual error
              panic(err)
            }


            // use the model directly

            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            IngestionClient client = new IngestionClient("YOUR_APP_ID",
            "YOUR_API_KEY", "YOUR_APP_ID_REGION");


            // Call the API

            client.deleteDestination("6c02aeb1-775e-418e-870b-1faccd4b2c0f");
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = ingestionClient(
              'YOUR_APP_ID',
              'YOUR_API_KEY',
              'YOUR_APP_ID_REGION'
            );

            // Call the API
            const response = await client.deleteDestination({
              destinationID: '6c02aeb1-775e-418e-870b-1faccd4b2c0f',
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            var response = client.deleteDestination(
              destinationID = "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\IngestionClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>', 'YOUR_APP_ID_REGION');


            // Call the API

            $response = $client->deleteDestination(
                '6c02aeb1-775e-418e-870b-1faccd4b2c0f',
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: >
            # Initialize the client

            _client = IngestionClient("YOUR_APP_ID", "YOUR_API_KEY",
            "YOUR_APP_ID_REGION")


            # Call the API

            resp = await _client.delete_destination(
                destination_id="6c02aeb1-775e-418e-870b-1faccd4b2c0f",
            )


            # use the class directly

            print(resp)


            # print the JSON response

            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: >
            # Initialize the client

            client = Algolia::IngestionClient.create('YOUR_APP_ID',
            'YOUR_API_KEY', 'YOUR_APP_ID_REGION')


            # Call the API

            resp =
            client.delete_destination("6c02aeb1-775e-418e-870b-1faccd4b2c0f")


            # use the class directly

            puts resp


            # print the JSON response

            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            val res = client.deleteDestination(
              destinationID = "6c02aeb1-775e-418e-870b-1faccd4b2c0f"
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try IngestionClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY", region: .us)


            // Call the API

            _ = try await client.deleteDestination(destinationID:
            "6c02aeb1-775e-418e-870b-1faccd4b2c0f")
  /1/sources:
    get:
      tags:
        - sources
      summary: List sources
      description: Retrieves a list of sources.
      operationId: getSources
      x-acl:
        - addObject
        - deleteIndex
        - editSettings
      parameters:
        - $ref: '#/components/parameters/itemsPerPage'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/sourceParameters_type'
        - $ref: '#/components/parameters/sourceParameters_authenticationID'
        - $ref: '#/components/parameters/sourceParameters_sort'
        - $ref: '#/components/parameters/order'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                title: listSourcesResponse
                type: object
                additionalProperties: false
                properties:
                  sources:
                    type: array
                    items:
                      $ref: '#/components/schemas/Source'
                  pagination:
                    $ref: '#/components/schemas/Pagination'
                required:
                  - sources
                  - pagination
        '400':
          $ref: '#/components/responses/BadRequest'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: |
            // Initialize the client
            var client = new IngestionClient(
              new IngestionConfig("YOUR_APP_ID", "YOUR_API_KEY", "YOUR_APP_ID_REGION")
            );

            // Call the API
            var response = await client.GetSourcesAsync();
        - lang: go
          label: Go
          source: >
            // Initialize the client with your application region, eg.
            ingestion.YOUR_APP_ID_REGION

            client, err := ingestion.NewClient("YOUR_APP_ID", "YOUR_API_KEY",
            ingestion.US)

            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }


            // Call the API

            resp, err := client.GetSources(client.NewApiGetSourcesRequest())

            if err != nil {
              // handle the eventual error
              panic(err)
            }


            // use the model directly

            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            IngestionClient client = new IngestionClient("YOUR_APP_ID",
            "YOUR_API_KEY", "YOUR_APP_ID_REGION");


            // Call the API

            client.getSources();
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = ingestionClient(
              'YOUR_APP_ID',
              'YOUR_API_KEY',
              'YOUR_APP_ID_REGION'
            );

            // Call the API
            const response = await client.getSources();

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            var response = client.getSources()


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\IngestionClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>', 'YOUR_APP_ID_REGION');


            // Call the API

            $response = $client->getSources();


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: >
            # Initialize the client

            _client = IngestionClient("YOUR_APP_ID", "YOUR_API_KEY",
            "YOUR_APP_ID_REGION")


            # Call the API

            resp = await _client.get_sources()


            # use the class directly

            print(resp)


            # print the JSON response

            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: >
            # Initialize the client

            client = Algolia::IngestionClient.create('YOUR_APP_ID',
            'YOUR_API_KEY', 'YOUR_APP_ID_REGION')


            # Call the API

            resp = client.get_sources


            # use the class directly

            puts resp


            # print the JSON response

            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            val res = client.getSources(

            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try IngestionClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY", region: .us)


            // Call the API

            _ = try await client.getSources()
    post:
      tags:
        - sources
      summary: Create a source
      description: Creates a new source.
      operationId: createSource
      x-acl:
        - addObject
        - deleteIndex
        - editSettings
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SourceCreate'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SourceCreateResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: |
            // Initialize the client
            var client = new IngestionClient(
              new IngestionConfig("YOUR_APP_ID", "YOUR_API_KEY", "YOUR_APP_ID_REGION")
            );

            // Call the API
            var response = await client.CreateSourceAsync(
              new SourceCreate
              {
                Type = Enum.Parse<SourceType>("Commercetools"),
                Name = "sourceName",
                Input = new SourceInput(
                  new SourceCommercetools
                  {
                    StoreKeys = new List<string> { "myStore" },
                    Locales = new List<string> { "de" },
                    Url = "http://commercetools.com",
                    ProjectKey = "keyID",
                  }
                ),
                AuthenticationID = "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
              }
            );
        - lang: go
          label: Go
          source: >
            // Initialize the client with your application region, eg.
            ingestion.YOUR_APP_ID_REGION

            client, err := ingestion.NewClient("YOUR_APP_ID", "YOUR_API_KEY",
            ingestion.US)

            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }


            // Call the API

            resp, err := client.CreateSource(client.NewApiCreateSourceRequest(

              ingestion.NewEmptySourceCreate().SetType(ingestion.SourceType("commercetools")).SetName("sourceName").SetInput(ingestion.SourceCommercetoolsAsSourceInput(
                ingestion.NewEmptySourceCommercetools().SetStoreKeys(
                  []string{"myStore"}).SetLocales(
                  []string{"de"}).SetUrl("http://commercetools.com").SetProjectKey("keyID"))).SetAuthenticationID("6c02aeb1-775e-418e-870b-1faccd4b2c0f"),
            ))

            if err != nil {
              // handle the eventual error
              panic(err)
            }


            // use the model directly

            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            IngestionClient client = new IngestionClient("YOUR_APP_ID",
            "YOUR_API_KEY", "YOUR_APP_ID_REGION");


            // Call the API

            client.createSource(
              new SourceCreate()
                .setType(SourceType.fromValue("commercetools"))
                .setName("sourceName")
                .setInput(
                  new SourceCommercetools()
                    .setStoreKeys(List.of("myStore"))
                    .setLocales(List.of("de"))
                    .setUrl("http://commercetools.com")
                    .setProjectKey("keyID")
                )
                .setAuthenticationID("6c02aeb1-775e-418e-870b-1faccd4b2c0f")
            );
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = ingestionClient(
              'YOUR_APP_ID',
              'YOUR_API_KEY',
              'YOUR_APP_ID_REGION'
            );

            // Call the API
            const response = await client.createSource({
              type: 'commercetools',
              name: 'sourceName',
              input: {
                storeKeys: ['myStore'],
                locales: ['de'],
                url: 'http://commercetools.com',
                projectKey: 'keyID',
              },
              authenticationID: '6c02aeb1-775e-418e-870b-1faccd4b2c0f',
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            var response = client.createSource(
              sourceCreate = SourceCreate(
                type = SourceType.entries.first { it.value == "commercetools" },
                name = "sourceName",
                input = SourceCommercetools(
                  storeKeys = listOf("myStore"),
                  locales = listOf("de"),
                  url = "http://commercetools.com",
                  projectKey = "keyID",
                ),
                authenticationID = "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
              ),
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\IngestionClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>', 'YOUR_APP_ID_REGION');


            // Call the API

            $response = $client->createSource(
                ['type' => 'commercetools',
                    'name' => 'sourceName',
                    'input' => ['storeKeys' => [
                        'myStore',
                    ],
                        'locales' => [
                            'de',
                        ],
                        'url' => 'http://commercetools.com',
                        'projectKey' => 'keyID',
                    ],
                    'authenticationID' => '6c02aeb1-775e-418e-870b-1faccd4b2c0f',
                ],
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: >
            # Initialize the client

            _client = IngestionClient("YOUR_APP_ID", "YOUR_API_KEY",
            "YOUR_APP_ID_REGION")


            # Call the API

            resp = await _client.create_source(
                source_create={
                    "type": "commercetools",
                    "name": "sourceName",
                    "input": {
                        "storeKeys": [
                            "myStore",
                        ],
                        "locales": [
                            "de",
                        ],
                        "url": "http://commercetools.com",
                        "projectKey": "keyID",
                    },
                    "authenticationID": "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
                },
            )


            # use the class directly

            print(resp)


            # print the JSON response

            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: >
            # Initialize the client

            client = Algolia::IngestionClient.create('YOUR_APP_ID',
            'YOUR_API_KEY', 'YOUR_APP_ID_REGION')


            # Call the API

            resp = client.create_source(
              SourceCreate.new(
                type: 'commercetools',
                name: "sourceName",
                input: SourceCommercetools.new(
                  store_keys: ["myStore"],
                  locales: ["de"],
                  url: "http://commercetools.com",
                  project_key: "keyID"
                ),
                authentication_id: "6c02aeb1-775e-418e-870b-1faccd4b2c0f"
              )
            )


            # use the class directly

            puts resp


            # print the JSON response

            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            val res = client.createSource(
              sourceCreate = SourceCreate(
                `type` = SourceType.withName("commercetools"),
                name = "sourceName",
                input = SourceCommercetools(
                  storeKeys = Some(Seq("myStore")),
                  locales = Some(Seq("de")),
                  url = "http://commercetools.com",
                  projectKey = "keyID"
                ),
                authenticationID = Some("6c02aeb1-775e-418e-870b-1faccd4b2c0f")
              )
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try IngestionClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY", region: .us)


            // Call the API

            _ = try await client.createSource(sourceCreate: SourceCreate(
                type: SourceType.commercetools,
                name: "sourceName",
                input: SourceInput.sourceCommercetools(SourceCommercetools(
                    storeKeys: ["myStore"],
                    locales: ["de"],
                    url: "http://commercetools.com",
                    projectKey: "keyID"
                )),
                authenticationID: "6c02aeb1-775e-418e-870b-1faccd4b2c0f"
            ))
  /1/sources/search:
    post:
      tags:
        - sources
      summary: Search for sources
      description: Searches for sources.
      operationId: searchSources
      x-acl:
        - addObject
        - deleteIndex
        - editSettings
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SourceSearch'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                title: searchSourcesResponse
                type: array
                items:
                  $ref: '#/components/schemas/Source'
        '400':
          $ref: '#/components/responses/BadRequest'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: |
            // Initialize the client
            var client = new IngestionClient(
              new IngestionConfig("YOUR_APP_ID", "YOUR_API_KEY", "YOUR_APP_ID_REGION")
            );

            // Call the API
            var response = await client.SearchSourcesAsync(
              new SourceSearch
              {
                SourceIDs = new List<string>
                {
                  "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
                  "947ac9c4-7e58-4c87-b1e7-14a68e99699a"
                },
              }
            );
        - lang: go
          label: Go
          source: >
            // Initialize the client with your application region, eg.
            ingestion.YOUR_APP_ID_REGION

            client, err := ingestion.NewClient("YOUR_APP_ID", "YOUR_API_KEY",
            ingestion.US)

            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }


            // Call the API

            resp, err := client.SearchSources(client.NewApiSearchSourcesRequest(

              ingestion.NewEmptySourceSearch().SetSourceIDs(
                []string{"6c02aeb1-775e-418e-870b-1faccd4b2c0f", "947ac9c4-7e58-4c87-b1e7-14a68e99699a"}),
            ))

            if err != nil {
              // handle the eventual error
              panic(err)
            }


            // use the model directly

            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            IngestionClient client = new IngestionClient("YOUR_APP_ID",
            "YOUR_API_KEY", "YOUR_APP_ID_REGION");


            // Call the API

            client.searchSources(
              new SourceSearch().setSourceIDs(List.of("6c02aeb1-775e-418e-870b-1faccd4b2c0f", "947ac9c4-7e58-4c87-b1e7-14a68e99699a"))
            );
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = ingestionClient(
              'YOUR_APP_ID',
              'YOUR_API_KEY',
              'YOUR_APP_ID_REGION'
            );

            // Call the API
            const response = await client.searchSources({
              sourceIDs: [
                '6c02aeb1-775e-418e-870b-1faccd4b2c0f',
                '947ac9c4-7e58-4c87-b1e7-14a68e99699a',
              ],
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            var response = client.searchSources(
              sourceSearch = SourceSearch(
                sourceIDs = listOf("6c02aeb1-775e-418e-870b-1faccd4b2c0f", "947ac9c4-7e58-4c87-b1e7-14a68e99699a"),
              ),
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\IngestionClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>', 'YOUR_APP_ID_REGION');


            // Call the API

            $response = $client->searchSources(
                ['sourceIDs' => [
                    '6c02aeb1-775e-418e-870b-1faccd4b2c0f',

                    '947ac9c4-7e58-4c87-b1e7-14a68e99699a',
                ],
                ],
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: >
            # Initialize the client

            _client = IngestionClient("YOUR_APP_ID", "YOUR_API_KEY",
            "YOUR_APP_ID_REGION")


            # Call the API

            resp = await _client.search_sources(
                source_search={
                    "sourceIDs": [
                        "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
                        "947ac9c4-7e58-4c87-b1e7-14a68e99699a",
                    ],
                },
            )


            # use the class directly

            print(resp)


            # print the JSON response

            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: >
            # Initialize the client

            client = Algolia::IngestionClient.create('YOUR_APP_ID',
            'YOUR_API_KEY', 'YOUR_APP_ID_REGION')


            # Call the API

            resp = client.search_sources(
              SourceSearch.new(
                source_ids: [
                  "6c02aeb1-775e-418e-870b-1faccd4b2c0f", "947ac9c4-7e58-4c87-b1e7-14a68e99699a"
                ]
              )
            )


            # use the class directly

            puts resp


            # print the JSON response

            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            val res = client.searchSources(
              sourceSearch = SourceSearch(
                sourceIDs = Seq("6c02aeb1-775e-418e-870b-1faccd4b2c0f", "947ac9c4-7e58-4c87-b1e7-14a68e99699a")
              )
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try IngestionClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY", region: .us)


            // Call the API

            _ = try await client.searchSources(sourceSearch:
            SourceSearch(sourceIDs: [
                "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
                "947ac9c4-7e58-4c87-b1e7-14a68e99699a",
            ]))
  /1/sources/{sourceID}:
    get:
      tags:
        - sources
      summary: Retrieve a source
      description: Retrieve a source by its ID.
      operationId: getSource
      x-acl:
        - addObject
        - deleteIndex
        - editSettings
      parameters:
        - $ref: '#/components/parameters/pathSourceID'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Source'
        '400':
          $ref: '#/components/responses/BadRequest'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new IngestionClient(
              new IngestionConfig("YOUR_APP_ID", "YOUR_API_KEY", "YOUR_APP_ID_REGION")
            );


            // Call the API

            var response = await
            client.GetSourceAsync("75eeb306-51d3-4e5e-a279-3c92bd8893ac");
        - lang: go
          label: Go
          source: >
            // Initialize the client with your application region, eg.
            ingestion.YOUR_APP_ID_REGION

            client, err := ingestion.NewClient("YOUR_APP_ID", "YOUR_API_KEY",
            ingestion.US)

            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }


            // Call the API

            resp, err := client.GetSource(client.NewApiGetSourceRequest(
              "75eeb306-51d3-4e5e-a279-3c92bd8893ac",
            ))

            if err != nil {
              // handle the eventual error
              panic(err)
            }


            // use the model directly

            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            IngestionClient client = new IngestionClient("YOUR_APP_ID",
            "YOUR_API_KEY", "YOUR_APP_ID_REGION");


            // Call the API

            client.getSource("75eeb306-51d3-4e5e-a279-3c92bd8893ac");
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = ingestionClient(
              'YOUR_APP_ID',
              'YOUR_API_KEY',
              'YOUR_APP_ID_REGION'
            );

            // Call the API
            const response = await client.getSource({
              sourceID: '75eeb306-51d3-4e5e-a279-3c92bd8893ac',
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            var response = client.getSource(
              sourceID = "75eeb306-51d3-4e5e-a279-3c92bd8893ac",
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\IngestionClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>', 'YOUR_APP_ID_REGION');


            // Call the API

            $response = $client->getSource(
                '75eeb306-51d3-4e5e-a279-3c92bd8893ac',
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: >
            # Initialize the client

            _client = IngestionClient("YOUR_APP_ID", "YOUR_API_KEY",
            "YOUR_APP_ID_REGION")


            # Call the API

            resp = await _client.get_source(
                source_id="75eeb306-51d3-4e5e-a279-3c92bd8893ac",
            )


            # use the class directly

            print(resp)


            # print the JSON response

            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: >
            # Initialize the client

            client = Algolia::IngestionClient.create('YOUR_APP_ID',
            'YOUR_API_KEY', 'YOUR_APP_ID_REGION')


            # Call the API

            resp = client.get_source("75eeb306-51d3-4e5e-a279-3c92bd8893ac")


            # use the class directly

            puts resp


            # print the JSON response

            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            val res = client.getSource(
              sourceID = "75eeb306-51d3-4e5e-a279-3c92bd8893ac"
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try IngestionClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY", region: .us)


            // Call the API

            _ = try await client.getSource(sourceID:
            "75eeb306-51d3-4e5e-a279-3c92bd8893ac")
    patch:
      tags:
        - sources
      summary: Update a source
      description: Updates a source by its ID.
      operationId: updateSource
      x-acl:
        - addObject
        - deleteIndex
        - editSettings
      parameters:
        - $ref: '#/components/parameters/pathSourceID'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SourceUpdate'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SourceUpdateResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: |
            // Initialize the client
            var client = new IngestionClient(
              new IngestionConfig("YOUR_APP_ID", "YOUR_API_KEY", "YOUR_APP_ID_REGION")
            );

            // Call the API
            var response = await client.UpdateSourceAsync(
              "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
              new SourceUpdate { Name = "newName", }
            );
        - lang: go
          label: Go
          source: >
            // Initialize the client with your application region, eg.
            ingestion.YOUR_APP_ID_REGION

            client, err := ingestion.NewClient("YOUR_APP_ID", "YOUR_API_KEY",
            ingestion.US)

            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }


            // Call the API

            resp, err := client.UpdateSource(client.NewApiUpdateSourceRequest(
              "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
              ingestion.NewEmptySourceUpdate().SetName("newName"),
            ))

            if err != nil {
              // handle the eventual error
              panic(err)
            }


            // use the model directly

            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            IngestionClient client = new IngestionClient("YOUR_APP_ID",
            "YOUR_API_KEY", "YOUR_APP_ID_REGION");


            // Call the API

            client.updateSource("6c02aeb1-775e-418e-870b-1faccd4b2c0f", new
            SourceUpdate().setName("newName"));
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = ingestionClient(
              'YOUR_APP_ID',
              'YOUR_API_KEY',
              'YOUR_APP_ID_REGION'
            );

            // Call the API
            const response = await client.updateSource({
              sourceID: '6c02aeb1-775e-418e-870b-1faccd4b2c0f',
              sourceUpdate: { name: 'newName' },
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            var response = client.updateSource(
              sourceID = "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
              sourceUpdate = SourceUpdate(
                name = "newName",
              ),
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\IngestionClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>', 'YOUR_APP_ID_REGION');


            // Call the API

            $response = $client->updateSource(
                '6c02aeb1-775e-418e-870b-1faccd4b2c0f',
                ['name' => 'newName',
                ],
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: >
            # Initialize the client

            _client = IngestionClient("YOUR_APP_ID", "YOUR_API_KEY",
            "YOUR_APP_ID_REGION")


            # Call the API

            resp = await _client.update_source(
                source_id="6c02aeb1-775e-418e-870b-1faccd4b2c0f",
                source_update={
                    "name": "newName",
                },
            )


            # use the class directly

            print(resp)


            # print the JSON response

            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: >
            # Initialize the client

            client = Algolia::IngestionClient.create('YOUR_APP_ID',
            'YOUR_API_KEY', 'YOUR_APP_ID_REGION')


            # Call the API

            resp = client.update_source(
              "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
              SourceUpdate.new(name: "newName")
            )


            # use the class directly

            puts resp


            # print the JSON response

            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            val res = client.updateSource(
              sourceID = "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
              sourceUpdate = SourceUpdate(
                name = Some("newName")
              )
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try IngestionClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY", region: .us)


            // Call the API

            _ = try await client.updateSource(
                sourceID: "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
                sourceUpdate: SourceUpdate(name: "newName")
            )
    delete:
      tags:
        - sources
      summary: Delete a source
      description: >-
        Deletes a source by its ID. You can't delete sources that are referenced
        in tasks.
      operationId: deleteSource
      x-acl:
        - addObject
        - deleteIndex
        - editSettings
      parameters:
        - $ref: '#/components/parameters/pathSourceID'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new IngestionClient(
              new IngestionConfig("YOUR_APP_ID", "YOUR_API_KEY", "YOUR_APP_ID_REGION")
            );


            // Call the API

            var response = await
            client.DeleteSourceAsync("6c02aeb1-775e-418e-870b-1faccd4b2c0f");
        - lang: go
          label: Go
          source: >
            // Initialize the client with your application region, eg.
            ingestion.YOUR_APP_ID_REGION

            client, err := ingestion.NewClient("YOUR_APP_ID", "YOUR_API_KEY",
            ingestion.US)

            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }


            // Call the API

            resp, err := client.DeleteSource(client.NewApiDeleteSourceRequest(
              "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
            ))

            if err != nil {
              // handle the eventual error
              panic(err)
            }


            // use the model directly

            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            IngestionClient client = new IngestionClient("YOUR_APP_ID",
            "YOUR_API_KEY", "YOUR_APP_ID_REGION");


            // Call the API

            client.deleteSource("6c02aeb1-775e-418e-870b-1faccd4b2c0f");
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = ingestionClient(
              'YOUR_APP_ID',
              'YOUR_API_KEY',
              'YOUR_APP_ID_REGION'
            );

            // Call the API
            const response = await client.deleteSource({
              sourceID: '6c02aeb1-775e-418e-870b-1faccd4b2c0f',
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            var response = client.deleteSource(
              sourceID = "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\IngestionClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>', 'YOUR_APP_ID_REGION');


            // Call the API

            $response = $client->deleteSource(
                '6c02aeb1-775e-418e-870b-1faccd4b2c0f',
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: >
            # Initialize the client

            _client = IngestionClient("YOUR_APP_ID", "YOUR_API_KEY",
            "YOUR_APP_ID_REGION")


            # Call the API

            resp = await _client.delete_source(
                source_id="6c02aeb1-775e-418e-870b-1faccd4b2c0f",
            )


            # use the class directly

            print(resp)


            # print the JSON response

            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: >
            # Initialize the client

            client = Algolia::IngestionClient.create('YOUR_APP_ID',
            'YOUR_API_KEY', 'YOUR_APP_ID_REGION')


            # Call the API

            resp = client.delete_source("6c02aeb1-775e-418e-870b-1faccd4b2c0f")


            # use the class directly

            puts resp


            # print the JSON response

            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            val res = client.deleteSource(
              sourceID = "6c02aeb1-775e-418e-870b-1faccd4b2c0f"
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try IngestionClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY", region: .us)


            // Call the API

            _ = try await client.deleteSource(sourceID:
            "6c02aeb1-775e-418e-870b-1faccd4b2c0f")
  /1/sources/{sourceID}/discover:
    get:
      tags:
        - sources
      summary: Retrieve a stream listing
      description: >
        Retrieves a stream listing for a source.


        Listing streams only works with sources with `type: docker` and
        `imageType: singer`.
      operationId: getDockerSourceStreams
      x-acl:
        - addObject
        - deleteIndex
        - editSettings
      parameters:
        - $ref: '#/components/parameters/pathSourceID'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                title: dockerSourceStreams
                type: object
                additionalProperties: false
                properties:
                  streams:
                    type: array
                    items:
                      $ref: '#/components/schemas/DockerSourceStream'
                required:
                  - streams
        '400':
          $ref: '#/components/responses/BadRequest'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new IngestionClient(
              new IngestionConfig("YOUR_APP_ID", "YOUR_API_KEY", "YOUR_APP_ID_REGION")
            );


            // Call the API

            var response = await
            client.GetDockerSourceStreamsAsync("6c02aeb1-775e-418e-870b-1faccd4b2c0f");
        - lang: go
          label: Go
          source: >
            // Initialize the client with your application region, eg.
            ingestion.YOUR_APP_ID_REGION

            client, err := ingestion.NewClient("YOUR_APP_ID", "YOUR_API_KEY",
            ingestion.US)

            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }


            // Call the API

            resp, err :=
            client.GetDockerSourceStreams(client.NewApiGetDockerSourceStreamsRequest(
              "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
            ))

            if err != nil {
              // handle the eventual error
              panic(err)
            }


            // use the model directly

            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            IngestionClient client = new IngestionClient("YOUR_APP_ID",
            "YOUR_API_KEY", "YOUR_APP_ID_REGION");


            // Call the API

            client.getDockerSourceStreams("6c02aeb1-775e-418e-870b-1faccd4b2c0f");
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = ingestionClient(
              'YOUR_APP_ID',
              'YOUR_API_KEY',
              'YOUR_APP_ID_REGION'
            );

            // Call the API
            const response = await client.getDockerSourceStreams({
              sourceID: '6c02aeb1-775e-418e-870b-1faccd4b2c0f',
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            var response = client.getDockerSourceStreams(
              sourceID = "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\IngestionClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>', 'YOUR_APP_ID_REGION');


            // Call the API

            $response = $client->getDockerSourceStreams(
                '6c02aeb1-775e-418e-870b-1faccd4b2c0f',
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: >
            # Initialize the client

            _client = IngestionClient("YOUR_APP_ID", "YOUR_API_KEY",
            "YOUR_APP_ID_REGION")


            # Call the API

            resp = await _client.get_docker_source_streams(
                source_id="6c02aeb1-775e-418e-870b-1faccd4b2c0f",
            )


            # use the class directly

            print(resp)


            # print the JSON response

            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: >
            # Initialize the client

            client = Algolia::IngestionClient.create('YOUR_APP_ID',
            'YOUR_API_KEY', 'YOUR_APP_ID_REGION')


            # Call the API

            resp =
            client.get_docker_source_streams("6c02aeb1-775e-418e-870b-1faccd4b2c0f")


            # use the class directly

            puts resp


            # print the JSON response

            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            val res = client.getDockerSourceStreams(
              sourceID = "6c02aeb1-775e-418e-870b-1faccd4b2c0f"
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try IngestionClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY", region: .us)


            // Call the API

            _ = try await client.getDockerSourceStreams(sourceID:
            "6c02aeb1-775e-418e-870b-1faccd4b2c0f")
    post:
      tags:
        - sources
      summary: Trigger a stream-listing request
      description: >
        Triggers a stream-listing request for a source.

        Triggering stream-listing requests only works with sources with `type:
        docker` and `imageType: singer`.
      operationId: triggerDockerSourceDiscover
      x-acl:
        - addObject
        - deleteIndex
        - editSettings
      parameters:
        - $ref: '#/components/parameters/pathSourceID'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                title: dockerSourceDiscover
                type: object
                additionalProperties: false
                properties:
                  runID:
                    $ref: '#/components/schemas/runID'
                  createdAt:
                    $ref: '#/components/schemas/createdAt'
                required:
                  - runID
                  - createdAt
        '400':
          $ref: '#/components/responses/BadRequest'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: |
            // Initialize the client
            var client = new IngestionClient(
              new IngestionConfig("YOUR_APP_ID", "YOUR_API_KEY", "YOUR_APP_ID_REGION")
            );

            // Call the API
            var response = await client.TriggerDockerSourceDiscoverAsync(
              "6c02aeb1-775e-418e-870b-1faccd4b2c0f"
            );
        - lang: go
          label: Go
          source: >
            // Initialize the client with your application region, eg.
            ingestion.YOUR_APP_ID_REGION

            client, err := ingestion.NewClient("YOUR_APP_ID", "YOUR_API_KEY",
            ingestion.US)

            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }


            // Call the API

            resp, err :=
            client.TriggerDockerSourceDiscover(client.NewApiTriggerDockerSourceDiscoverRequest(
              "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
            ))

            if err != nil {
              // handle the eventual error
              panic(err)
            }


            // use the model directly

            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            IngestionClient client = new IngestionClient("YOUR_APP_ID",
            "YOUR_API_KEY", "YOUR_APP_ID_REGION");


            // Call the API

            client.triggerDockerSourceDiscover("6c02aeb1-775e-418e-870b-1faccd4b2c0f");
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = ingestionClient(
              'YOUR_APP_ID',
              'YOUR_API_KEY',
              'YOUR_APP_ID_REGION'
            );

            // Call the API
            const response = await client.triggerDockerSourceDiscover({
              sourceID: '6c02aeb1-775e-418e-870b-1faccd4b2c0f',
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            var response = client.triggerDockerSourceDiscover(
              sourceID = "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\IngestionClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>', 'YOUR_APP_ID_REGION');


            // Call the API

            $response = $client->triggerDockerSourceDiscover(
                '6c02aeb1-775e-418e-870b-1faccd4b2c0f',
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: >
            # Initialize the client

            _client = IngestionClient("YOUR_APP_ID", "YOUR_API_KEY",
            "YOUR_APP_ID_REGION")


            # Call the API

            resp = await _client.trigger_docker_source_discover(
                source_id="6c02aeb1-775e-418e-870b-1faccd4b2c0f",
            )


            # use the class directly

            print(resp)


            # print the JSON response

            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: >
            # Initialize the client

            client = Algolia::IngestionClient.create('YOUR_APP_ID',
            'YOUR_API_KEY', 'YOUR_APP_ID_REGION')


            # Call the API

            resp =
            client.trigger_docker_source_discover("6c02aeb1-775e-418e-870b-1faccd4b2c0f")


            # use the class directly

            puts resp


            # print the JSON response

            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            val res = client.triggerDockerSourceDiscover(
              sourceID = "6c02aeb1-775e-418e-870b-1faccd4b2c0f"
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try IngestionClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY", region: .us)


            // Call the API

            _ = try await client.triggerDockerSourceDiscover(sourceID:
            "6c02aeb1-775e-418e-870b-1faccd4b2c0f")
  /1/tasks:
    get:
      tags:
        - tasks
      summary: List tasks
      description: Retrieves a list of tasks.
      operationId: getTasks
      x-acl:
        - addObject
        - deleteIndex
        - editSettings
      parameters:
        - $ref: '#/components/parameters/itemsPerPage'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/action'
        - $ref: '#/components/parameters/enabled'
        - $ref: '#/components/parameters/sourceID'
        - $ref: '#/components/parameters/destinationID'
        - $ref: '#/components/parameters/triggerType'
        - $ref: '#/components/parameters/taskParameters_sort'
        - $ref: '#/components/parameters/order'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                title: listTasksResponse
                type: object
                description: Configured tasks and pagination information.
                additionalProperties: false
                properties:
                  tasks:
                    type: array
                    items:
                      $ref: '#/components/schemas/Task'
                  pagination:
                    $ref: '#/components/schemas/Pagination'
                required:
                  - tasks
                  - pagination
        '400':
          $ref: '#/components/responses/BadRequest'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: |
            // Initialize the client
            var client = new IngestionClient(
              new IngestionConfig("YOUR_APP_ID", "YOUR_API_KEY", "YOUR_APP_ID_REGION")
            );

            // Call the API
            var response = await client.GetTasksAsync();
        - lang: go
          label: Go
          source: >
            // Initialize the client with your application region, eg.
            ingestion.YOUR_APP_ID_REGION

            client, err := ingestion.NewClient("YOUR_APP_ID", "YOUR_API_KEY",
            ingestion.US)

            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }


            // Call the API

            resp, err := client.GetTasks(client.NewApiGetTasksRequest())

            if err != nil {
              // handle the eventual error
              panic(err)
            }


            // use the model directly

            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            IngestionClient client = new IngestionClient("YOUR_APP_ID",
            "YOUR_API_KEY", "YOUR_APP_ID_REGION");


            // Call the API

            client.getTasks();
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = ingestionClient(
              'YOUR_APP_ID',
              'YOUR_API_KEY',
              'YOUR_APP_ID_REGION'
            );

            // Call the API
            const response = await client.getTasks();

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            var response = client.getTasks()


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\IngestionClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>', 'YOUR_APP_ID_REGION');


            // Call the API

            $response = $client->getTasks();


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: >
            # Initialize the client

            _client = IngestionClient("YOUR_APP_ID", "YOUR_API_KEY",
            "YOUR_APP_ID_REGION")


            # Call the API

            resp = await _client.get_tasks()


            # use the class directly

            print(resp)


            # print the JSON response

            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: >
            # Initialize the client

            client = Algolia::IngestionClient.create('YOUR_APP_ID',
            'YOUR_API_KEY', 'YOUR_APP_ID_REGION')


            # Call the API

            resp = client.get_tasks


            # use the class directly

            puts resp


            # print the JSON response

            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            val res = client.getTasks(

            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try IngestionClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY", region: .us)


            // Call the API

            _ = try await client.getTasks()
    post:
      tags:
        - tasks
      summary: Create a task
      description: Creates a new task.
      operationId: createTask
      requestBody:
        description: Request body for creating a task.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TaskCreate'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskCreateResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: |
            // Initialize the client
            var client = new IngestionClient(
              new IngestionConfig("YOUR_APP_ID", "YOUR_API_KEY", "YOUR_APP_ID_REGION")
            );

            // Call the API
            var response = await client.CreateTaskAsync(
              new TaskCreate
              {
                SourceID = "search",
                DestinationID = "destinationName",
                Trigger = new TaskCreateTrigger(
                  new OnDemandTriggerInput { Type = Enum.Parse<OnDemandTriggerType>("OnDemand"), }
                ),
                Action = Enum.Parse<ActionType>("Replace"),
              }
            );
        - lang: go
          label: Go
          source: >
            // Initialize the client with your application region, eg.
            ingestion.YOUR_APP_ID_REGION

            client, err := ingestion.NewClient("YOUR_APP_ID", "YOUR_API_KEY",
            ingestion.US)

            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }


            // Call the API

            resp, err := client.CreateTask(client.NewApiCreateTaskRequest(

              ingestion.NewEmptyTaskCreate().SetSourceID("search").SetDestinationID("destinationName").SetTrigger(ingestion.OnDemandTriggerInputAsTaskCreateTrigger(
                ingestion.NewEmptyOnDemandTriggerInput().SetType(ingestion.OnDemandTriggerType("onDemand")))).SetAction(ingestion.ActionType("replace")),
            ))

            if err != nil {
              // handle the eventual error
              panic(err)
            }


            // use the model directly

            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            IngestionClient client = new IngestionClient("YOUR_APP_ID",
            "YOUR_API_KEY", "YOUR_APP_ID_REGION");


            // Call the API

            client.createTask(
              new TaskCreate()
                .setSourceID("search")
                .setDestinationID("destinationName")
                .setTrigger(new OnDemandTriggerInput().setType(OnDemandTriggerType.fromValue("onDemand")))
                .setAction(ActionType.fromValue("replace"))
            );
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = ingestionClient(
              'YOUR_APP_ID',
              'YOUR_API_KEY',
              'YOUR_APP_ID_REGION'
            );

            // Call the API
            const response = await client.createTask({
              sourceID: 'search',
              destinationID: 'destinationName',
              trigger: { type: 'onDemand' },
              action: 'replace',
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            var response = client.createTask(
              taskCreate = TaskCreate(
                sourceID = "search",
                destinationID = "destinationName",
                trigger = OnDemandTriggerInput(
                  type = OnDemandTriggerType.entries.first { it.value == "onDemand" },
                ),
                action = ActionType.entries.first { it.value == "replace" },
              ),
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\IngestionClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>', 'YOUR_APP_ID_REGION');


            // Call the API

            $response = $client->createTask(
                ['sourceID' => 'search',
                    'destinationID' => 'destinationName',
                    'trigger' => ['type' => 'onDemand',
                    ],
                    'action' => 'replace',
                ],
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: >
            # Initialize the client

            _client = IngestionClient("YOUR_APP_ID", "YOUR_API_KEY",
            "YOUR_APP_ID_REGION")


            # Call the API

            resp = await _client.create_task(
                task_create={
                    "sourceID": "search",
                    "destinationID": "destinationName",
                    "trigger": {
                        "type": "onDemand",
                    },
                    "action": "replace",
                },
            )


            # use the class directly

            print(resp)


            # print the JSON response

            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: >
            # Initialize the client

            client = Algolia::IngestionClient.create('YOUR_APP_ID',
            'YOUR_API_KEY', 'YOUR_APP_ID_REGION')


            # Call the API

            resp = client.create_task(
              TaskCreate.new(
                source_id: "search",
                destination_id: "destinationName",
                trigger: OnDemandTriggerInput.new(type: 'onDemand'),
                action: 'replace'
              )
            )


            # use the class directly

            puts resp


            # print the JSON response

            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            val res = client.createTask(
              taskCreate = TaskCreate(
                sourceID = "search",
                destinationID = "destinationName",
                trigger = OnDemandTriggerInput(
                  `type` = OnDemandTriggerType.withName("onDemand")
                ),
                action = ActionType.withName("replace")
              )
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try IngestionClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY", region: .us)


            // Call the API

            _ = try await client.createTask(taskCreate: TaskCreate(
                sourceID: "search",
                destinationID: "destinationName",
                trigger: TaskCreateTrigger.onDemandTriggerInput(OnDemandTriggerInput(type: OnDemandTriggerType.onDemand)),
                action: ActionType.replace
            ))
  /1/tasks/search:
    post:
      tags:
        - tasks
      summary: Search for tasks
      description: Searches for tasks.
      operationId: searchTasks
      x-acl:
        - addObject
        - deleteIndex
        - editSettings
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TaskSearch'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                title: searchTasksResponse
                type: array
                items:
                  $ref: '#/components/schemas/Task'
        '400':
          $ref: '#/components/responses/BadRequest'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: |
            // Initialize the client
            var client = new IngestionClient(
              new IngestionConfig("YOUR_APP_ID", "YOUR_API_KEY", "YOUR_APP_ID_REGION")
            );

            // Call the API
            var response = await client.SearchTasksAsync(
              new TaskSearch
              {
                TaskIDs = new List<string>
                {
                  "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
                  "947ac9c4-7e58-4c87-b1e7-14a68e99699a",
                  "76ab4c2a-ce17-496f-b7a6-506dc59ee498"
                },
              }
            );
        - lang: go
          label: Go
          source: >
            // Initialize the client with your application region, eg.
            ingestion.YOUR_APP_ID_REGION

            client, err := ingestion.NewClient("YOUR_APP_ID", "YOUR_API_KEY",
            ingestion.US)

            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }


            // Call the API

            resp, err := client.SearchTasks(client.NewApiSearchTasksRequest(

              ingestion.NewEmptyTaskSearch().SetTaskIDs(
                []string{"6c02aeb1-775e-418e-870b-1faccd4b2c0f", "947ac9c4-7e58-4c87-b1e7-14a68e99699a", "76ab4c2a-ce17-496f-b7a6-506dc59ee498"}),
            ))

            if err != nil {
              // handle the eventual error
              panic(err)
            }


            // use the model directly

            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            IngestionClient client = new IngestionClient("YOUR_APP_ID",
            "YOUR_API_KEY", "YOUR_APP_ID_REGION");


            // Call the API

            client.searchTasks(
              new TaskSearch()
                .setTaskIDs(
                  List.of("6c02aeb1-775e-418e-870b-1faccd4b2c0f", "947ac9c4-7e58-4c87-b1e7-14a68e99699a", "76ab4c2a-ce17-496f-b7a6-506dc59ee498")
                )
            );
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = ingestionClient(
              'YOUR_APP_ID',
              'YOUR_API_KEY',
              'YOUR_APP_ID_REGION'
            );

            // Call the API
            const response = await client.searchTasks({
              taskIDs: [
                '6c02aeb1-775e-418e-870b-1faccd4b2c0f',
                '947ac9c4-7e58-4c87-b1e7-14a68e99699a',
                '76ab4c2a-ce17-496f-b7a6-506dc59ee498',
              ],
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            var response = client.searchTasks(
              taskSearch = TaskSearch(
                taskIDs = listOf("6c02aeb1-775e-418e-870b-1faccd4b2c0f", "947ac9c4-7e58-4c87-b1e7-14a68e99699a", "76ab4c2a-ce17-496f-b7a6-506dc59ee498"),
              ),
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\IngestionClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>', 'YOUR_APP_ID_REGION');


            // Call the API

            $response = $client->searchTasks(
                ['taskIDs' => [
                    '6c02aeb1-775e-418e-870b-1faccd4b2c0f',

                    '947ac9c4-7e58-4c87-b1e7-14a68e99699a',

                    '76ab4c2a-ce17-496f-b7a6-506dc59ee498',
                ],
                ],
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: >
            # Initialize the client

            _client = IngestionClient("YOUR_APP_ID", "YOUR_API_KEY",
            "YOUR_APP_ID_REGION")


            # Call the API

            resp = await _client.search_tasks(
                task_search={
                    "taskIDs": [
                        "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
                        "947ac9c4-7e58-4c87-b1e7-14a68e99699a",
                        "76ab4c2a-ce17-496f-b7a6-506dc59ee498",
                    ],
                },
            )


            # use the class directly

            print(resp)


            # print the JSON response

            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: >
            # Initialize the client

            client = Algolia::IngestionClient.create('YOUR_APP_ID',
            'YOUR_API_KEY', 'YOUR_APP_ID_REGION')


            # Call the API

            resp = client.search_tasks(
              TaskSearch.new(
                task_ids: [
                  "6c02aeb1-775e-418e-870b-1faccd4b2c0f", "947ac9c4-7e58-4c87-b1e7-14a68e99699a", "76ab4c2a-ce17-496f-b7a6-506dc59ee498"
                ]
              )
            )


            # use the class directly

            puts resp


            # print the JSON response

            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            val res = client.searchTasks(
              taskSearch = TaskSearch(
                taskIDs = Seq(
                  "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
                  "947ac9c4-7e58-4c87-b1e7-14a68e99699a",
                  "76ab4c2a-ce17-496f-b7a6-506dc59ee498"
                )
              )
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try IngestionClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY", region: .us)


            // Call the API

            _ = try await client.searchTasks(taskSearch: TaskSearch(taskIDs: [
                "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
                "947ac9c4-7e58-4c87-b1e7-14a68e99699a",
                "76ab4c2a-ce17-496f-b7a6-506dc59ee498",
            ]))
  /1/tasks/{taskID}:
    get:
      tags:
        - tasks
      summary: Retrieve a task
      description: Retrieves a task by its ID.
      operationId: getTask
      x-acl:
        - addObject
        - deleteIndex
        - editSettings
      parameters:
        - $ref: '#/components/parameters/pathTaskID'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Task'
        '400':
          $ref: '#/components/responses/BadRequest'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new IngestionClient(
              new IngestionConfig("YOUR_APP_ID", "YOUR_API_KEY", "YOUR_APP_ID_REGION")
            );


            // Call the API

            var response = await
            client.GetTaskAsync("6c02aeb1-775e-418e-870b-1faccd4b2c0f");
        - lang: go
          label: Go
          source: >
            // Initialize the client with your application region, eg.
            ingestion.YOUR_APP_ID_REGION

            client, err := ingestion.NewClient("YOUR_APP_ID", "YOUR_API_KEY",
            ingestion.US)

            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }


            // Call the API

            resp, err := client.GetTask(client.NewApiGetTaskRequest(
              "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
            ))

            if err != nil {
              // handle the eventual error
              panic(err)
            }


            // use the model directly

            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            IngestionClient client = new IngestionClient("YOUR_APP_ID",
            "YOUR_API_KEY", "YOUR_APP_ID_REGION");


            // Call the API

            client.getTask("6c02aeb1-775e-418e-870b-1faccd4b2c0f");
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = ingestionClient(
              'YOUR_APP_ID',
              'YOUR_API_KEY',
              'YOUR_APP_ID_REGION'
            );

            // Call the API
            const response = await client.getTask({
              taskID: '6c02aeb1-775e-418e-870b-1faccd4b2c0f',
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            var response = client.getTask(
              taskID = "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\IngestionClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>', 'YOUR_APP_ID_REGION');


            // Call the API

            $response = $client->getTask(
                '6c02aeb1-775e-418e-870b-1faccd4b2c0f',
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: >
            # Initialize the client

            _client = IngestionClient("YOUR_APP_ID", "YOUR_API_KEY",
            "YOUR_APP_ID_REGION")


            # Call the API

            resp = await _client.get_task(
                task_id="6c02aeb1-775e-418e-870b-1faccd4b2c0f",
            )


            # use the class directly

            print(resp)


            # print the JSON response

            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: >
            # Initialize the client

            client = Algolia::IngestionClient.create('YOUR_APP_ID',
            'YOUR_API_KEY', 'YOUR_APP_ID_REGION')


            # Call the API

            resp = client.get_task("6c02aeb1-775e-418e-870b-1faccd4b2c0f")


            # use the class directly

            puts resp


            # print the JSON response

            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            val res = client.getTask(
              taskID = "6c02aeb1-775e-418e-870b-1faccd4b2c0f"
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try IngestionClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY", region: .us)


            // Call the API

            _ = try await client.getTask(taskID:
            "6c02aeb1-775e-418e-870b-1faccd4b2c0f")
    patch:
      tags:
        - tasks
      summary: Update a task
      description: Updates a task by its ID.
      operationId: updateTask
      parameters:
        - $ref: '#/components/parameters/pathTaskID'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TaskUpdate'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskUpdateResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: |
            // Initialize the client
            var client = new IngestionClient(
              new IngestionConfig("YOUR_APP_ID", "YOUR_API_KEY", "YOUR_APP_ID_REGION")
            );

            // Call the API
            var response = await client.UpdateTaskAsync(
              "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
              new TaskUpdate { Enabled = false, }
            );
        - lang: go
          label: Go
          source: >
            // Initialize the client with your application region, eg.
            ingestion.YOUR_APP_ID_REGION

            client, err := ingestion.NewClient("YOUR_APP_ID", "YOUR_API_KEY",
            ingestion.US)

            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }


            // Call the API

            resp, err := client.UpdateTask(client.NewApiUpdateTaskRequest(
              "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
              ingestion.NewEmptyTaskUpdate().SetEnabled(false),
            ))

            if err != nil {
              // handle the eventual error
              panic(err)
            }


            // use the model directly

            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            IngestionClient client = new IngestionClient("YOUR_APP_ID",
            "YOUR_API_KEY", "YOUR_APP_ID_REGION");


            // Call the API

            client.updateTask("6c02aeb1-775e-418e-870b-1faccd4b2c0f", new
            TaskUpdate().setEnabled(false));
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = ingestionClient(
              'YOUR_APP_ID',
              'YOUR_API_KEY',
              'YOUR_APP_ID_REGION'
            );

            // Call the API
            const response = await client.updateTask({
              taskID: '6c02aeb1-775e-418e-870b-1faccd4b2c0f',
              taskUpdate: { enabled: false },
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            var response = client.updateTask(
              taskID = "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
              taskUpdate = TaskUpdate(
                enabled = false,
              ),
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\IngestionClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>', 'YOUR_APP_ID_REGION');


            // Call the API

            $response = $client->updateTask(
                '6c02aeb1-775e-418e-870b-1faccd4b2c0f',
                ['enabled' => false,
                ],
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: >
            # Initialize the client

            _client = IngestionClient("YOUR_APP_ID", "YOUR_API_KEY",
            "YOUR_APP_ID_REGION")


            # Call the API

            resp = await _client.update_task(
                task_id="6c02aeb1-775e-418e-870b-1faccd4b2c0f",
                task_update={
                    "enabled": False,
                },
            )


            # use the class directly

            print(resp)


            # print the JSON response

            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: >
            # Initialize the client

            client = Algolia::IngestionClient.create('YOUR_APP_ID',
            'YOUR_API_KEY', 'YOUR_APP_ID_REGION')


            # Call the API

            resp = client.update_task(
              "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
              TaskUpdate.new(enabled: false)
            )


            # use the class directly

            puts resp


            # print the JSON response

            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            val res = client.updateTask(
              taskID = "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
              taskUpdate = TaskUpdate(
                enabled = Some(false)
              )
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try IngestionClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY", region: .us)


            // Call the API

            _ = try await client.updateTask(
                taskID: "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
                taskUpdate: TaskUpdate(enabled: false)
            )
    delete:
      tags:
        - tasks
      summary: Delete a task
      description: Deletes a task by its ID.
      operationId: deleteTask
      parameters:
        - $ref: '#/components/parameters/pathTaskID'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new IngestionClient(
              new IngestionConfig("YOUR_APP_ID", "YOUR_API_KEY", "YOUR_APP_ID_REGION")
            );


            // Call the API

            var response = await
            client.DeleteTaskAsync("6c02aeb1-775e-418e-870b-1faccd4b2c0f");
        - lang: go
          label: Go
          source: >
            // Initialize the client with your application region, eg.
            ingestion.YOUR_APP_ID_REGION

            client, err := ingestion.NewClient("YOUR_APP_ID", "YOUR_API_KEY",
            ingestion.US)

            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }


            // Call the API

            resp, err := client.DeleteTask(client.NewApiDeleteTaskRequest(
              "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
            ))

            if err != nil {
              // handle the eventual error
              panic(err)
            }


            // use the model directly

            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            IngestionClient client = new IngestionClient("YOUR_APP_ID",
            "YOUR_API_KEY", "YOUR_APP_ID_REGION");


            // Call the API

            client.deleteTask("6c02aeb1-775e-418e-870b-1faccd4b2c0f");
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = ingestionClient(
              'YOUR_APP_ID',
              'YOUR_API_KEY',
              'YOUR_APP_ID_REGION'
            );

            // Call the API
            const response = await client.deleteTask({
              taskID: '6c02aeb1-775e-418e-870b-1faccd4b2c0f',
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            var response = client.deleteTask(
              taskID = "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\IngestionClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>', 'YOUR_APP_ID_REGION');


            // Call the API

            $response = $client->deleteTask(
                '6c02aeb1-775e-418e-870b-1faccd4b2c0f',
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: >
            # Initialize the client

            _client = IngestionClient("YOUR_APP_ID", "YOUR_API_KEY",
            "YOUR_APP_ID_REGION")


            # Call the API

            resp = await _client.delete_task(
                task_id="6c02aeb1-775e-418e-870b-1faccd4b2c0f",
            )


            # use the class directly

            print(resp)


            # print the JSON response

            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: >
            # Initialize the client

            client = Algolia::IngestionClient.create('YOUR_APP_ID',
            'YOUR_API_KEY', 'YOUR_APP_ID_REGION')


            # Call the API

            resp = client.delete_task("6c02aeb1-775e-418e-870b-1faccd4b2c0f")


            # use the class directly

            puts resp


            # print the JSON response

            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            val res = client.deleteTask(
              taskID = "6c02aeb1-775e-418e-870b-1faccd4b2c0f"
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try IngestionClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY", region: .us)


            // Call the API

            _ = try await client.deleteTask(taskID:
            "6c02aeb1-775e-418e-870b-1faccd4b2c0f")
  /1/tasks/{taskID}/run:
    post:
      tags:
        - tasks
      summary: Run a task
      description: >-
        Runs a task. You can check the status of task runs with the
        observability endpoints.
      operationId: runTask
      x-acl:
        - addObject
        - deleteIndex
        - editSettings
      parameters:
        - $ref: '#/components/parameters/pathTaskID'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new IngestionClient(
              new IngestionConfig("YOUR_APP_ID", "YOUR_API_KEY", "YOUR_APP_ID_REGION")
            );


            // Call the API

            var response = await
            client.RunTaskAsync("6c02aeb1-775e-418e-870b-1faccd4b2c0f");
        - lang: go
          label: Go
          source: >
            // Initialize the client with your application region, eg.
            ingestion.YOUR_APP_ID_REGION

            client, err := ingestion.NewClient("YOUR_APP_ID", "YOUR_API_KEY",
            ingestion.US)

            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }


            // Call the API

            resp, err := client.RunTask(client.NewApiRunTaskRequest(
              "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
            ))

            if err != nil {
              // handle the eventual error
              panic(err)
            }


            // use the model directly

            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            IngestionClient client = new IngestionClient("YOUR_APP_ID",
            "YOUR_API_KEY", "YOUR_APP_ID_REGION");


            // Call the API

            client.runTask("6c02aeb1-775e-418e-870b-1faccd4b2c0f");
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = ingestionClient(
              'YOUR_APP_ID',
              'YOUR_API_KEY',
              'YOUR_APP_ID_REGION'
            );

            // Call the API
            const response = await client.runTask({
              taskID: '6c02aeb1-775e-418e-870b-1faccd4b2c0f',
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            var response = client.runTask(
              taskID = "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\IngestionClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>', 'YOUR_APP_ID_REGION');


            // Call the API

            $response = $client->runTask(
                '6c02aeb1-775e-418e-870b-1faccd4b2c0f',
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: >
            # Initialize the client

            _client = IngestionClient("YOUR_APP_ID", "YOUR_API_KEY",
            "YOUR_APP_ID_REGION")


            # Call the API

            resp = await _client.run_task(
                task_id="6c02aeb1-775e-418e-870b-1faccd4b2c0f",
            )


            # use the class directly

            print(resp)


            # print the JSON response

            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: >
            # Initialize the client

            client = Algolia::IngestionClient.create('YOUR_APP_ID',
            'YOUR_API_KEY', 'YOUR_APP_ID_REGION')


            # Call the API

            resp = client.run_task("6c02aeb1-775e-418e-870b-1faccd4b2c0f")


            # use the class directly

            puts resp


            # print the JSON response

            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            val res = client.runTask(
              taskID = "6c02aeb1-775e-418e-870b-1faccd4b2c0f"
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try IngestionClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY", region: .us)


            // Call the API

            _ = try await client.runTask(taskID:
            "6c02aeb1-775e-418e-870b-1faccd4b2c0f")
  /1/tasks/{taskID}/enable:
    put:
      tags:
        - tasks
      summary: Enable a task
      description: Enables a task.
      operationId: enableTask
      x-acl:
        - addObject
        - deleteIndex
        - editSettings
      parameters:
        - $ref: '#/components/parameters/pathTaskID'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskUpdateResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new IngestionClient(
              new IngestionConfig("YOUR_APP_ID", "YOUR_API_KEY", "YOUR_APP_ID_REGION")
            );


            // Call the API

            var response = await
            client.EnableTaskAsync("76ab4c2a-ce17-496f-b7a6-506dc59ee498");
        - lang: go
          label: Go
          source: >
            // Initialize the client with your application region, eg.
            ingestion.YOUR_APP_ID_REGION

            client, err := ingestion.NewClient("YOUR_APP_ID", "YOUR_API_KEY",
            ingestion.US)

            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }


            // Call the API

            resp, err := client.EnableTask(client.NewApiEnableTaskRequest(
              "76ab4c2a-ce17-496f-b7a6-506dc59ee498",
            ))

            if err != nil {
              // handle the eventual error
              panic(err)
            }


            // use the model directly

            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            IngestionClient client = new IngestionClient("YOUR_APP_ID",
            "YOUR_API_KEY", "YOUR_APP_ID_REGION");


            // Call the API

            client.enableTask("76ab4c2a-ce17-496f-b7a6-506dc59ee498");
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = ingestionClient(
              'YOUR_APP_ID',
              'YOUR_API_KEY',
              'YOUR_APP_ID_REGION'
            );

            // Call the API
            const response = await client.enableTask({
              taskID: '76ab4c2a-ce17-496f-b7a6-506dc59ee498',
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            var response = client.enableTask(
              taskID = "76ab4c2a-ce17-496f-b7a6-506dc59ee498",
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\IngestionClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>', 'YOUR_APP_ID_REGION');


            // Call the API

            $response = $client->enableTask(
                '76ab4c2a-ce17-496f-b7a6-506dc59ee498',
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: >
            # Initialize the client

            _client = IngestionClient("YOUR_APP_ID", "YOUR_API_KEY",
            "YOUR_APP_ID_REGION")


            # Call the API

            resp = await _client.enable_task(
                task_id="76ab4c2a-ce17-496f-b7a6-506dc59ee498",
            )


            # use the class directly

            print(resp)


            # print the JSON response

            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: >
            # Initialize the client

            client = Algolia::IngestionClient.create('YOUR_APP_ID',
            'YOUR_API_KEY', 'YOUR_APP_ID_REGION')


            # Call the API

            resp = client.enable_task("76ab4c2a-ce17-496f-b7a6-506dc59ee498")


            # use the class directly

            puts resp


            # print the JSON response

            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            val res = client.enableTask(
              taskID = "76ab4c2a-ce17-496f-b7a6-506dc59ee498"
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try IngestionClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY", region: .us)


            // Call the API

            _ = try await client.enableTask(taskID:
            "76ab4c2a-ce17-496f-b7a6-506dc59ee498")
  /1/tasks/{taskID}/disable:
    put:
      tags:
        - tasks
      summary: Disable a task
      description: Disables a task.
      operationId: disableTask
      x-acl:
        - addObject
        - deleteIndex
        - editSettings
      parameters:
        - $ref: '#/components/parameters/pathTaskID'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskUpdateResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new IngestionClient(
              new IngestionConfig("YOUR_APP_ID", "YOUR_API_KEY", "YOUR_APP_ID_REGION")
            );


            // Call the API

            var response = await
            client.DisableTaskAsync("6c02aeb1-775e-418e-870b-1faccd4b2c0f");
        - lang: go
          label: Go
          source: >
            // Initialize the client with your application region, eg.
            ingestion.YOUR_APP_ID_REGION

            client, err := ingestion.NewClient("YOUR_APP_ID", "YOUR_API_KEY",
            ingestion.US)

            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }


            // Call the API

            resp, err := client.DisableTask(client.NewApiDisableTaskRequest(
              "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
            ))

            if err != nil {
              // handle the eventual error
              panic(err)
            }


            // use the model directly

            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            IngestionClient client = new IngestionClient("YOUR_APP_ID",
            "YOUR_API_KEY", "YOUR_APP_ID_REGION");


            // Call the API

            client.disableTask("6c02aeb1-775e-418e-870b-1faccd4b2c0f");
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = ingestionClient(
              'YOUR_APP_ID',
              'YOUR_API_KEY',
              'YOUR_APP_ID_REGION'
            );

            // Call the API
            const response = await client.disableTask({
              taskID: '6c02aeb1-775e-418e-870b-1faccd4b2c0f',
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            var response = client.disableTask(
              taskID = "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\IngestionClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>', 'YOUR_APP_ID_REGION');


            // Call the API

            $response = $client->disableTask(
                '6c02aeb1-775e-418e-870b-1faccd4b2c0f',
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: >
            # Initialize the client

            _client = IngestionClient("YOUR_APP_ID", "YOUR_API_KEY",
            "YOUR_APP_ID_REGION")


            # Call the API

            resp = await _client.disable_task(
                task_id="6c02aeb1-775e-418e-870b-1faccd4b2c0f",
            )


            # use the class directly

            print(resp)


            # print the JSON response

            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: >
            # Initialize the client

            client = Algolia::IngestionClient.create('YOUR_APP_ID',
            'YOUR_API_KEY', 'YOUR_APP_ID_REGION')


            # Call the API

            resp = client.disable_task("6c02aeb1-775e-418e-870b-1faccd4b2c0f")


            # use the class directly

            puts resp


            # print the JSON response

            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            val res = client.disableTask(
              taskID = "6c02aeb1-775e-418e-870b-1faccd4b2c0f"
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try IngestionClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY", region: .us)


            // Call the API

            _ = try await client.disableTask(taskID:
            "6c02aeb1-775e-418e-870b-1faccd4b2c0f")
  /1/runs:
    get:
      tags:
        - observability
      summary: List task runs
      description: Retrieve a list of task runs.
      operationId: getRuns
      x-acl:
        - addObject
        - deleteIndex
        - editSettings
      parameters:
        - $ref: '#/components/parameters/itemsPerPage'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/runStatus'
        - $ref: '#/components/parameters/taskID'
        - $ref: '#/components/parameters/runSort'
        - $ref: '#/components/parameters/order'
        - name: startDate
          in: query
          description: >-
            Date in RFC3339 format for the earliest run to retrieve. By default,
            the current day minus seven days is used.
          schema:
            type: string
        - name: endDate
          in: query
          description: >-
            Date in RFC3339 format for the latest run to retrieve. By default,
            the current day is used.
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunListResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: |
            // Initialize the client
            var client = new IngestionClient(
              new IngestionConfig("YOUR_APP_ID", "YOUR_API_KEY", "YOUR_APP_ID_REGION")
            );

            // Call the API
            var response = await client.GetRunsAsync();
        - lang: go
          label: Go
          source: >
            // Initialize the client with your application region, eg.
            ingestion.YOUR_APP_ID_REGION

            client, err := ingestion.NewClient("YOUR_APP_ID", "YOUR_API_KEY",
            ingestion.US)

            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }


            // Call the API

            resp, err := client.GetRuns(client.NewApiGetRunsRequest())

            if err != nil {
              // handle the eventual error
              panic(err)
            }


            // use the model directly

            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            IngestionClient client = new IngestionClient("YOUR_APP_ID",
            "YOUR_API_KEY", "YOUR_APP_ID_REGION");


            // Call the API

            client.getRuns();
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = ingestionClient(
              'YOUR_APP_ID',
              'YOUR_API_KEY',
              'YOUR_APP_ID_REGION'
            );

            // Call the API
            const response = await client.getRuns();

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            var response = client.getRuns()


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\IngestionClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>', 'YOUR_APP_ID_REGION');


            // Call the API

            $response = $client->getRuns();


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: >
            # Initialize the client

            _client = IngestionClient("YOUR_APP_ID", "YOUR_API_KEY",
            "YOUR_APP_ID_REGION")


            # Call the API

            resp = await _client.get_runs()


            # use the class directly

            print(resp)


            # print the JSON response

            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: >
            # Initialize the client

            client = Algolia::IngestionClient.create('YOUR_APP_ID',
            'YOUR_API_KEY', 'YOUR_APP_ID_REGION')


            # Call the API

            resp = client.get_runs


            # use the class directly

            puts resp


            # print the JSON response

            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            val res = client.getRuns(

            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try IngestionClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY", region: .us)


            // Call the API

            _ = try await client.getRuns()
  /1/runs/{runID}:
    get:
      tags:
        - observability
      summary: Retrieve a task run
      description: Retrieve a single task run by its ID.
      operationId: getRun
      x-acl:
        - addObject
        - deleteIndex
        - editSettings
      parameters:
        - $ref: '#/components/parameters/pathRunID'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Run'
        '400':
          $ref: '#/components/responses/BadRequest'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new IngestionClient(
              new IngestionConfig("YOUR_APP_ID", "YOUR_API_KEY", "YOUR_APP_ID_REGION")
            );


            // Call the API

            var response = await
            client.GetRunAsync("6c02aeb1-775e-418e-870b-1faccd4b2c0f");
        - lang: go
          label: Go
          source: >
            // Initialize the client with your application region, eg.
            ingestion.YOUR_APP_ID_REGION

            client, err := ingestion.NewClient("YOUR_APP_ID", "YOUR_API_KEY",
            ingestion.US)

            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }


            // Call the API

            resp, err := client.GetRun(client.NewApiGetRunRequest(
              "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
            ))

            if err != nil {
              // handle the eventual error
              panic(err)
            }


            // use the model directly

            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            IngestionClient client = new IngestionClient("YOUR_APP_ID",
            "YOUR_API_KEY", "YOUR_APP_ID_REGION");


            // Call the API

            client.getRun("6c02aeb1-775e-418e-870b-1faccd4b2c0f");
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = ingestionClient(
              'YOUR_APP_ID',
              'YOUR_API_KEY',
              'YOUR_APP_ID_REGION'
            );

            // Call the API
            const response = await client.getRun({
              runID: '6c02aeb1-775e-418e-870b-1faccd4b2c0f',
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            var response = client.getRun(
              runID = "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\IngestionClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>', 'YOUR_APP_ID_REGION');


            // Call the API

            $response = $client->getRun(
                '6c02aeb1-775e-418e-870b-1faccd4b2c0f',
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: >
            # Initialize the client

            _client = IngestionClient("YOUR_APP_ID", "YOUR_API_KEY",
            "YOUR_APP_ID_REGION")


            # Call the API

            resp = await _client.get_run(
                run_id="6c02aeb1-775e-418e-870b-1faccd4b2c0f",
            )


            # use the class directly

            print(resp)


            # print the JSON response

            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: >
            # Initialize the client

            client = Algolia::IngestionClient.create('YOUR_APP_ID',
            'YOUR_API_KEY', 'YOUR_APP_ID_REGION')


            # Call the API

            resp = client.get_run("6c02aeb1-775e-418e-870b-1faccd4b2c0f")


            # use the class directly

            puts resp


            # print the JSON response

            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            val res = client.getRun(
              runID = "6c02aeb1-775e-418e-870b-1faccd4b2c0f"
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try IngestionClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY", region: .us)


            // Call the API

            _ = try await client.getRun(runID:
            "6c02aeb1-775e-418e-870b-1faccd4b2c0f")
  /1/runs/{runID}/events:
    get:
      tags:
        - observability
      summary: List task run events
      description: Retrieves a list of events for a task run, identified by it's ID.
      operationId: getEvents
      x-acl:
        - addObject
        - deleteIndex
        - editSettings
      parameters:
        - $ref: '#/components/parameters/pathRunID'
        - $ref: '#/components/parameters/itemsPerPage'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/eventStatus'
        - $ref: '#/components/parameters/eventType'
        - $ref: '#/components/parameters/eventSort'
        - $ref: '#/components/parameters/order'
        - name: startDate
          in: query
          description: >-
            Date and time in RFC3339 format for the earliest events to retrieve.
            By default, the current time minus three hours is used.
          schema:
            type: string
        - name: endDate
          in: query
          description: >-
            Date and time in RFC3339 format for the latest events to retrieve.
            By default, the current time is used.
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                title: listEventsResponse
                type: object
                additionalProperties: false
                properties:
                  events:
                    type: array
                    items:
                      $ref: '#/components/schemas/Event'
                  pagination:
                    $ref: '#/components/schemas/Pagination'
                  window:
                    $ref: '#/components/schemas/Window'
                required:
                  - events
                  - pagination
                  - window
        '400':
          $ref: '#/components/responses/BadRequest'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new IngestionClient(
              new IngestionConfig("YOUR_APP_ID", "YOUR_API_KEY", "YOUR_APP_ID_REGION")
            );


            // Call the API

            var response = await
            client.GetEventsAsync("6c02aeb1-775e-418e-870b-1faccd4b2c0f");
        - lang: go
          label: Go
          source: >
            // Initialize the client with your application region, eg.
            ingestion.YOUR_APP_ID_REGION

            client, err := ingestion.NewClient("YOUR_APP_ID", "YOUR_API_KEY",
            ingestion.US)

            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }


            // Call the API

            resp, err := client.GetEvents(client.NewApiGetEventsRequest(
              "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
            ))

            if err != nil {
              // handle the eventual error
              panic(err)
            }


            // use the model directly

            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            IngestionClient client = new IngestionClient("YOUR_APP_ID",
            "YOUR_API_KEY", "YOUR_APP_ID_REGION");


            // Call the API

            client.getEvents("6c02aeb1-775e-418e-870b-1faccd4b2c0f");
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = ingestionClient(
              'YOUR_APP_ID',
              'YOUR_API_KEY',
              'YOUR_APP_ID_REGION'
            );

            // Call the API
            const response = await client.getEvents({
              runID: '6c02aeb1-775e-418e-870b-1faccd4b2c0f',
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            var response = client.getEvents(
              runID = "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\IngestionClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>', 'YOUR_APP_ID_REGION');


            // Call the API

            $response = $client->getEvents(
                '6c02aeb1-775e-418e-870b-1faccd4b2c0f',
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: >
            # Initialize the client

            _client = IngestionClient("YOUR_APP_ID", "YOUR_API_KEY",
            "YOUR_APP_ID_REGION")


            # Call the API

            resp = await _client.get_events(
                run_id="6c02aeb1-775e-418e-870b-1faccd4b2c0f",
            )


            # use the class directly

            print(resp)


            # print the JSON response

            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: >
            # Initialize the client

            client = Algolia::IngestionClient.create('YOUR_APP_ID',
            'YOUR_API_KEY', 'YOUR_APP_ID_REGION')


            # Call the API

            resp = client.get_events("6c02aeb1-775e-418e-870b-1faccd4b2c0f")


            # use the class directly

            puts resp


            # print the JSON response

            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            val res = client.getEvents(
              runID = "6c02aeb1-775e-418e-870b-1faccd4b2c0f"
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try IngestionClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY", region: .us)


            // Call the API

            _ = try await client.getEvents(runID:
            "6c02aeb1-775e-418e-870b-1faccd4b2c0f")
  /1/runs/{runID}/events/{eventID}:
    get:
      tags:
        - observability
      summary: Retrieve a task run event
      description: Retrieves a single task run event by its ID.
      operationId: getEvent
      x-acl:
        - addObject
        - deleteIndex
        - editSettings
      parameters:
        - $ref: '#/components/parameters/pathRunID'
        - $ref: '#/components/parameters/pathEventID'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Event'
        '400':
          $ref: '#/components/responses/BadRequest'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: |
            // Initialize the client
            var client = new IngestionClient(
              new IngestionConfig("YOUR_APP_ID", "YOUR_API_KEY", "YOUR_APP_ID_REGION")
            );

            // Call the API
            var response = await client.GetEventAsync(
              "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
              "6c02aeb1-775e-418e-870b-1faccd4b2c0c"
            );
        - lang: go
          label: Go
          source: >
            // Initialize the client with your application region, eg.
            ingestion.YOUR_APP_ID_REGION

            client, err := ingestion.NewClient("YOUR_APP_ID", "YOUR_API_KEY",
            ingestion.US)

            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }


            // Call the API

            resp, err := client.GetEvent(client.NewApiGetEventRequest(
              "6c02aeb1-775e-418e-870b-1faccd4b2c0f", "6c02aeb1-775e-418e-870b-1faccd4b2c0c",
            ))

            if err != nil {
              // handle the eventual error
              panic(err)
            }


            // use the model directly

            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            IngestionClient client = new IngestionClient("YOUR_APP_ID",
            "YOUR_API_KEY", "YOUR_APP_ID_REGION");


            // Call the API

            client.getEvent("6c02aeb1-775e-418e-870b-1faccd4b2c0f",
            "6c02aeb1-775e-418e-870b-1faccd4b2c0c");
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = ingestionClient(
              'YOUR_APP_ID',
              'YOUR_API_KEY',
              'YOUR_APP_ID_REGION'
            );

            // Call the API
            const response = await client.getEvent({
              runID: '6c02aeb1-775e-418e-870b-1faccd4b2c0f',
              eventID: '6c02aeb1-775e-418e-870b-1faccd4b2c0c',
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            var response = client.getEvent(
              runID = "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
              eventID = "6c02aeb1-775e-418e-870b-1faccd4b2c0c",
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\IngestionClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>', 'YOUR_APP_ID_REGION');


            // Call the API

            $response = $client->getEvent(
                '6c02aeb1-775e-418e-870b-1faccd4b2c0f',
                '6c02aeb1-775e-418e-870b-1faccd4b2c0c',
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: >
            # Initialize the client

            _client = IngestionClient("YOUR_APP_ID", "YOUR_API_KEY",
            "YOUR_APP_ID_REGION")


            # Call the API

            resp = await _client.get_event(
                run_id="6c02aeb1-775e-418e-870b-1faccd4b2c0f",
                event_id="6c02aeb1-775e-418e-870b-1faccd4b2c0c",
            )


            # use the class directly

            print(resp)


            # print the JSON response

            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: >
            # Initialize the client

            client = Algolia::IngestionClient.create('YOUR_APP_ID',
            'YOUR_API_KEY', 'YOUR_APP_ID_REGION')


            # Call the API

            resp = client.get_event(
              "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
              "6c02aeb1-775e-418e-870b-1faccd4b2c0c"
            )


            # use the class directly

            puts resp


            # print the JSON response

            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = IngestionClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY", region = "YOUR_APP_ID_REGION")


            // Call the API

            val res = client.getEvent(
              runID = "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
              eventID = "6c02aeb1-775e-418e-870b-1faccd4b2c0c"
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try IngestionClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY", region: .us)


            // Call the API

            _ = try await client.getEvent(
                runID: "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
                eventID: "6c02aeb1-775e-418e-870b-1faccd4b2c0c"
            )
components:
  securitySchemes:
    appId:
      type: apiKey
      in: header
      name: x-algolia-application-id
      description: Your Algolia application ID.
    apiKey:
      type: apiKey
      in: header
      name: x-algolia-api-key
      description: >
        Your Algolia API key with the necessary permissions to make the request.

        Permissions are controlled through access control lists (ACL) and access
        restrictions.

        The required ACL to make a request is listed in each endpoint's
        reference.
  parameters:
    PathInPath:
      name: path
      in: path
      description: Path of the endpoint, anything after "/1" must be specified.
      required: true
      schema:
        type: string
        example: /keys
    Parameters:
      name: parameters
      in: query
      description: Query parameters to apply to the current query.
      schema:
        type: object
        additionalProperties: true
    itemsPerPage:
      name: itemsPerPage
      in: query
      description: Number of items per page.
      required: false
      schema:
        $ref: '#/components/schemas/itemsPerPage'
    page:
      name: page
      in: query
      description: Page number of the paginated API response.
      required: false
      schema:
        $ref: '#/components/schemas/page'
    type:
      name: type
      in: query
      description: Type of authentication resource to retrieve.
      required: false
      style: form
      explode: false
      schema:
        type: array
        items:
          $ref: '#/components/schemas/AuthenticationType'
        example: basic,oauth
    platform:
      name: platform
      in: query
      description: Ecommerce platform for which to retrieve authentication resources.
      required: false
      style: form
      explode: false
      schema:
        type: array
        items:
          $ref: '#/components/schemas/platformWithNone'
        example: commercetools,none
    sort:
      name: sort
      in: query
      description: Property by which to sort the list of authentication resources.
      required: false
      schema:
        $ref: '#/components/schemas/authenticationSortKeys'
    order:
      name: order
      in: query
      description: Sort order of the response, ascending or descending.
      required: false
      schema:
        $ref: '#/components/schemas/orderKeys'
    pathAuthenticationID:
      name: authenticationID
      in: path
      required: true
      description: Unique identifier of an authentication resource.
      schema:
        $ref: '#/components/schemas/authenticationID'
    destinationParameters_type:
      name: type
      in: query
      description: Destination type.
      required: false
      style: form
      explode: false
      schema:
        type: array
        items:
          $ref: '#/components/schemas/DestinationType'
        example: search
    authenticationID:
      name: authenticationID
      in: query
      description: Authentication ID used by destinations.
      required: false
      style: form
      explode: false
      schema:
        type: array
        items:
          $ref: '#/components/schemas/authenticationID'
    destinationParameters_sort:
      name: sort
      in: query
      description: Property by which to sort the destinations.
      required: false
      example: type
      schema:
        $ref: '#/components/schemas/destinationSortKeys'
    pathDestinationID:
      name: destinationID
      in: path
      required: true
      description: Unique identifier of a destination.
      schema:
        $ref: '#/components/schemas/destinationID'
    sourceParameters_type:
      name: type
      in: query
      description: Source type. Some sources require authentication.
      required: false
      style: form
      explode: false
      schema:
        type: array
        items:
          $ref: '#/components/schemas/SourceType'
        example: commercetools,bigcommerce
    sourceParameters_authenticationID:
      name: authenticationID
      in: query
      description: |
        Authentication IDs of the sources to retrieve.
        'none' returns sources that doesn't have an authentication resource.
      required: false
      style: form
      explode: false
      schema:
        type: array
        items:
          $ref: '#/components/schemas/authenticationID'
        example:
          - 10000000-0a75-4000-a000-000000000001
          - none
    sourceParameters_sort:
      name: sort
      in: query
      description: Property by which to sort the list of sources.
      required: false
      schema:
        $ref: '#/components/schemas/sourceSortKeys'
    pathSourceID:
      name: sourceID
      in: path
      required: true
      description: Unique identifier of a source.
      schema:
        $ref: '#/components/schemas/sourceID'
    action:
      name: action
      in: query
      required: false
      description: Actions for filtering the list of tasks.
      style: form
      explode: false
      schema:
        type: array
        description: Actions to perform on the Algolia index.
        items:
          $ref: '#/components/schemas/ActionType'
        example: save,replace,partial,append
    enabled:
      name: enabled
      in: query
      description: Whether to filter the list of tasks by the `enabled` status.
      required: false
      schema:
        type: boolean
    sourceID:
      name: sourceID
      in: query
      description: Source IDs for filtering the list of tasks.
      required: false
      style: form
      explode: false
      schema:
        type: array
        items:
          $ref: '#/components/schemas/sourceID'
    destinationID:
      name: destinationID
      in: query
      description: Destination IDs for filtering the list of tasks.
      required: false
      style: form
      explode: false
      schema:
        type: array
        items:
          $ref: '#/components/schemas/destinationID'
    triggerType:
      name: triggerType
      in: query
      description: Type of task trigger for filtering the list of tasks.
      required: false
      style: form
      explode: false
      schema:
        type: array
        items:
          $ref: '#/components/schemas/TriggerType'
        example: onDemand,schedule,subscription,streaming
    taskParameters_sort:
      name: sort
      in: query
      description: Property by which to sort the list of tasks.
      required: false
      schema:
        $ref: '#/components/schemas/taskSortKeys'
    pathTaskID:
      name: taskID
      in: path
      required: true
      description: Unique identifier of a task.
      schema:
        $ref: '#/components/schemas/taskID'
    runStatus:
      name: status
      in: query
      description: Run status for filtering the list of task runs.
      schema:
        type: array
        items:
          $ref: '#/components/schemas/RunStatus'
    taskID:
      name: taskID
      in: query
      description: Task ID for filtering the list of task runs.
      schema:
        $ref: '#/components/schemas/taskID'
    runSort:
      name: sort
      in: query
      description: Property by which to sort the list of task runs.
      required: false
      schema:
        $ref: '#/components/schemas/runSortKeys'
    pathRunID:
      name: runID
      in: path
      required: true
      description: Unique identifier of a task run.
      schema:
        $ref: '#/components/schemas/runID'
    eventStatus:
      name: status
      in: query
      description: Event status for filtering the list of task runs.
      schema:
        type: array
        items:
          $ref: '#/components/schemas/EventStatus'
    eventType:
      name: type
      in: query
      description: Event type for filtering the list of task runs.
      schema:
        type: array
        items:
          $ref: '#/components/schemas/EventType'
    eventSort:
      name: sort
      in: query
      description: Property by which to sort the list of task run events.
      required: false
      schema:
        $ref: '#/components/schemas/eventSortKeys'
    pathEventID:
      name: eventID
      in: path
      required: true
      description: Unique identifier of an event.
      schema:
        $ref: '#/components/schemas/eventID'
  schemas:
    ErrorBase:
      description: Error.
      type: object
      additionalProperties: true
      properties:
        message:
          type: string
          example: Invalid Application-Id or API-Key
    itemsPerPage:
      type: integer
      description: Number of items per page.
      minimum: 1
      maximum: 100
      default: 10
    page:
      type: integer
      minimum: 1
      description: Page of the API response to retrieve.
    AuthenticationType:
      type: string
      description: >-
        Type of authentication. This determines the type of credentials required
        in the `input` object.
      enum:
        - googleServiceAccount
        - basic
        - apiKey
        - oauth
        - algolia
        - algoliaInsights
    Platform:
      default: null
      oneOf:
        - type: string
          description: |
            Name of an ecommerce platform with which to authenticate.
            This determines which authentication type you can select.
          enum:
            - bigcommerce
            - commercetools
            - shopify
        - type: 'null'
    platformNone:
      type: string
      description: >-
        Authentication resource not tied to any ecommerce platform, used for
        filtering.
      enum:
        - none
    platformWithNone:
      oneOf:
        - $ref: '#/components/schemas/Platform'
        - $ref: '#/components/schemas/platformNone'
    authenticationSortKeys:
      type: string
      description: Property by which to sort the list of authentication resources.
      default: createdAt
      enum:
        - name
        - auth_type
        - platform
        - updatedAt
        - createdAt
    orderKeys:
      type: string
      description: Ascending or descending sort order.
      default: desc
      enum:
        - asc
        - desc
    authenticationID:
      type: string
      description: Universally unique identifier (UUID) of an authentication resource.
      example: 6c02aeb1-775e-418e-870b-1faccd4b2c0f
    name:
      type: string
      description: Descriptive name for the resource.
    AuthGoogleServiceAccountPartial:
      title: Google service account
      type: object
      description: >-
        Credentials for authenticating with a Google service account, such as
        BigQuery.
      additionalProperties: false
      properties:
        clientEmail:
          type: string
          description: Email address of the Google service account.
          example: service-account-name@project-id.iam.gserviceaccount.com
        privateKey:
          type: string
          description: >-
            Private key of the Google service account. This field is `null` in
            the API response.
    AuthBasicPartial:
      title: Basic
      type: object
      description: Credentials for authenticating with user name and password.
      additionalProperties: false
      properties:
        username:
          type: string
          description: Username.
        password:
          type: string
          description: Password. This field is `null` in the API response.
    AuthAPIKeyPartial:
      title: API key
      type: object
      description: Credentials for authenticating with an API key.
      additionalProperties: false
      properties:
        key:
          type: string
          description: API key. This field is `null` in the API response.
    AuthOAuthPartial:
      title: OAuth
      type: object
      description: Credentials for authenticating with OAuth 2.0.
      additionalProperties: false
      properties:
        url:
          type: string
          description: URL for the OAuth endpoint.
        client_id:
          type: string
          description: Client ID.
        client_secret:
          type: string
          description: Client secret. This field is `null` in the API response.
        scope:
          type: string
          default: ''
          description: OAuth scope.
    AuthAlgoliaPartial:
      title: Algolia
      type: object
      description: Credentials for authenticating with Algolia.
      additionalProperties: false
      properties:
        appID:
          type: string
          description: Algolia application ID.
        apiKey:
          type: string
          description: >
            Algolia API key with the ACL: `addObject`, `deleteObject`,
            `settings`, `editSettings`, `listIndexes`, `deleteIndex`.

            This field is `null` in the API response.
    AuthAlgoliaInsightsPartial:
      title: Algolia Insights
      type: object
      additionalProperties: false
      description: Credentials for authenticating with the Algolia Insights API.
      properties:
        appID:
          type: string
          description: Algolia application ID.
        apiKey:
          type: string
          description: |
            Algolia API key with the ACL: `search`.
            This field is `null` in the API response.
    AuthInputPartial:
      oneOf:
        - $ref: '#/components/schemas/AuthGoogleServiceAccountPartial'
        - $ref: '#/components/schemas/AuthBasicPartial'
        - $ref: '#/components/schemas/AuthAPIKeyPartial'
        - $ref: '#/components/schemas/AuthOAuthPartial'
        - $ref: '#/components/schemas/AuthAlgoliaPartial'
        - $ref: '#/components/schemas/AuthAlgoliaInsightsPartial'
    createdAt:
      type: string
      description: Date of creation in RFC3339 format.
    updatedAt:
      type: string
      description: Date of last update in RFC3339 format.
    Authentication:
      type: object
      description: >-
        Resource representing the information required to authenticate with a
        source or a destination.
      additionalProperties: false
      properties:
        authenticationID:
          $ref: '#/components/schemas/authenticationID'
        type:
          $ref: '#/components/schemas/AuthenticationType'
        name:
          $ref: '#/components/schemas/name'
        platform:
          $ref: '#/components/schemas/Platform'
        input:
          $ref: '#/components/schemas/AuthInputPartial'
        createdAt:
          $ref: '#/components/schemas/createdAt'
        updatedAt:
          $ref: '#/components/schemas/updatedAt'
      required:
        - authenticationID
        - type
        - name
        - input
        - createdAt
    Pagination:
      type: object
      description: Paginated API response.
      additionalProperties: false
      properties:
        nbPages:
          type: integer
          minimum: 1
          description: Number of pages in the API response.
        page:
          $ref: '#/components/schemas/page'
        nbItems:
          type: integer
          minimum: 0
          description: Number of items in the API response.
        itemsPerPage:
          $ref: '#/components/schemas/itemsPerPage'
      required:
        - nbPages
        - page
        - nbItems
        - itemsPerPage
    AuthGoogleServiceAccount:
      title: Google service account
      type: object
      description: >-
        Credentials for authenticating with a Google service account, such as
        BigQuery.
      additionalProperties: false
      properties:
        clientEmail:
          type: string
          description: Email address of the Google service account.
          example: service-account-name@project-id.iam.gserviceaccount.com
        privateKey:
          type: string
          description: >-
            Private key of the Google service account. This field is `null` in
            the API response.
      required:
        - clientEmail
        - privateKey
    AuthBasic:
      title: Basic
      type: object
      description: Credentials for authenticating with user name and password.
      additionalProperties: false
      properties:
        username:
          type: string
          description: Username.
        password:
          type: string
          description: Password. This field is `null` in the API response.
      required:
        - username
        - password
    AuthAPIKey:
      title: API key
      type: object
      description: Credentials for authenticating with an API key.
      additionalProperties: false
      properties:
        key:
          type: string
          description: API key. This field is `null` in the API response.
      required:
        - key
    AuthOAuth:
      title: OAuth
      type: object
      description: Credentials for authenticating with OAuth 2.0.
      additionalProperties: false
      properties:
        url:
          type: string
          description: URL for the OAuth endpoint.
        client_id:
          type: string
          description: Client ID.
        client_secret:
          type: string
          description: Client secret. This field is `null` in the API response.
        scope:
          type: string
          default: ''
          description: OAuth scope.
      required:
        - url
        - client_id
        - client_secret
    AuthAlgolia:
      title: Algolia
      type: object
      additionalProperties: false
      description: Credentials for authenticating with Algolia.
      properties:
        appID:
          type: string
          description: Algolia application ID.
        apiKey:
          type: string
          description: >
            Algolia API key with the ACL: `addObject`, `deleteObject`,
            `settings`, `editSettings`, `listIndexes`, `deleteIndex`.

            This field is `null` in the API response.
      required:
        - appID
        - apiKey
    AuthAlgoliaInsights:
      title: Algolia Insights
      type: object
      additionalProperties: false
      description: Credentials for authenticating with the Algolia Insights API.
      properties:
        appID:
          type: string
          description: Algolia application ID.
        apiKey:
          type: string
          description: |
            Algolia API key with the ACL: `search`.
            This field is `null` in the API response.
      required:
        - appID
        - apiKey
    AuthInput:
      oneOf:
        - $ref: '#/components/schemas/AuthGoogleServiceAccount'
        - $ref: '#/components/schemas/AuthBasic'
        - $ref: '#/components/schemas/AuthAPIKey'
        - $ref: '#/components/schemas/AuthOAuth'
        - $ref: '#/components/schemas/AuthAlgolia'
        - $ref: '#/components/schemas/AuthAlgoliaInsights'
    AuthenticationCreate:
      type: object
      description: Request body for creating a new authentication resource.
      additionalProperties: false
      properties:
        type:
          $ref: '#/components/schemas/AuthenticationType'
        name:
          $ref: '#/components/schemas/name'
        platform:
          $ref: '#/components/schemas/Platform'
        input:
          $ref: '#/components/schemas/AuthInput'
      required:
        - type
        - name
        - input
    AuthenticationCreateResponse:
      type: object
      description: API response for the successful creation of an authentication resource.
      additionalProperties: false
      properties:
        authenticationID:
          $ref: '#/components/schemas/authenticationID'
        name:
          $ref: '#/components/schemas/name'
        createdAt:
          $ref: '#/components/schemas/createdAt'
      required:
        - authenticationID
        - name
        - createdAt
    AuthenticationSearch:
      type: object
      additionalProperties: false
      description: Request body for searching for authentication resources.
      properties:
        authenticationIDs:
          type: array
          items:
            $ref: '#/components/schemas/authenticationID'
      required:
        - authenticationIDs
    DeleteResponse:
      type: object
      properties:
        deletedAt:
          type: string
          description: Date of deletion in RFC3339 format.
      required:
        - deletedAt
    AuthenticationUpdate:
      type: object
      description: Request body for updating an authentication resource.
      additionalProperties: false
      properties:
        type:
          $ref: '#/components/schemas/AuthenticationType'
        name:
          $ref: '#/components/schemas/name'
        platform:
          $ref: '#/components/schemas/Platform'
        input:
          $ref: '#/components/schemas/AuthInputPartial'
    AuthenticationUpdateResponse:
      type: object
      additionalProperties: false
      description: API response for a successful update of an authentication resource.
      properties:
        authenticationID:
          $ref: '#/components/schemas/authenticationID'
        name:
          $ref: '#/components/schemas/name'
        updatedAt:
          $ref: '#/components/schemas/updatedAt'
      required:
        - authenticationID
        - name
        - updatedAt
    DestinationType:
      type: string
      description: |
        Destination type.

        - `search`.
          Data is stored in an Algolia index.

        - `insights`.
          Data is recorded as user events in the Insights API.
      enum:
        - search
        - insights
    destinationSortKeys:
      type: string
      description: Property by which to sort the destinations.
      default: createdAt
      enum:
        - name
        - type
        - updatedAt
        - createdAt
    destinationID:
      type: string
      description: Universally unique identifier (UUID) of a destination resource.
      example: 6c02aeb1-775e-418e-870b-1faccd4b2c0f
    DestinationIndexPrefix:
      type: object
      additionalProperties: false
      properties:
        indexPrefix:
          type: string
          description: >-
            String added to the beginning of all indices created by this
            destination.
      required:
        - indexPrefix
    RecordType:
      type: string
      description: Record type for ecommerce sources.
      enum:
        - product
        - variant
    AttributesToExclude:
      type: array
      description: >
        Attributes from your source to exclude from Algolia records.


        Not all your data attributes will be useful for searching.

        Keeping your Algolia records small increases indexing and search
        performance.


        - Exclude nested attributes with `.` notation. For example, `foo.bar`
        indexes the `foo` attribute and all its children **except** the `bar`
        attribute.

        - Exclude attributes from arrays with `[i]`, where `i` is the index of
        the array element.
          For example, `foo.[0].bar` only excludes the `bar` attribute from the first element of the `foo` array, but indexes the complete `foo` attribute for all other elements.
          Use `*` as wildcard: `foo.[*].bar` excludes `bar` from all elements of the `foo` array.
      items:
        type: string
    DestinationIndexName:
      type: object
      additionalProperties: false
      properties:
        indexName:
          type: string
          description: Algolia index name (case-sensitive).
        recordType:
          $ref: '#/components/schemas/RecordType'
        attributesToExclude:
          $ref: '#/components/schemas/AttributesToExclude'
      required:
        - indexName
    DestinationInput:
      oneOf:
        - $ref: '#/components/schemas/DestinationIndexPrefix'
        - $ref: '#/components/schemas/DestinationIndexName'
    Destination:
      type: object
      description: Destinations are Algolia resources like indices or event streams.
      additionalProperties: false
      properties:
        destinationID:
          $ref: '#/components/schemas/destinationID'
        type:
          $ref: '#/components/schemas/DestinationType'
        name:
          $ref: '#/components/schemas/name'
        input:
          $ref: '#/components/schemas/DestinationInput'
        createdAt:
          $ref: '#/components/schemas/createdAt'
        updatedAt:
          $ref: '#/components/schemas/updatedAt'
        authenticationID:
          $ref: '#/components/schemas/authenticationID'
      required:
        - destinationID
        - type
        - name
        - input
        - createdAt
    DestinationCreate:
      type: object
      additionalProperties: false
      description: API request body for creating a new destination.
      properties:
        type:
          $ref: '#/components/schemas/DestinationType'
        name:
          $ref: '#/components/schemas/name'
        input:
          $ref: '#/components/schemas/DestinationInput'
        authenticationID:
          $ref: '#/components/schemas/authenticationID'
      required:
        - type
        - name
        - input
    DestinationCreateResponse:
      type: object
      additionalProperties: false
      description: API response for creating a new destination.
      properties:
        destinationID:
          $ref: '#/components/schemas/destinationID'
        name:
          $ref: '#/components/schemas/name'
        createdAt:
          $ref: '#/components/schemas/createdAt'
      required:
        - destinationID
        - name
        - createdAt
    DestinationSearch:
      type: object
      additionalProperties: false
      description: API request body for searching destinations.
      properties:
        destinationIDs:
          type: array
          items:
            $ref: '#/components/schemas/destinationID'
      required:
        - destinationIDs
    DestinationUpdate:
      type: object
      additionalProperties: false
      description: API request body for updating a destination.
      properties:
        type:
          $ref: '#/components/schemas/DestinationType'
        name:
          $ref: '#/components/schemas/name'
        input:
          $ref: '#/components/schemas/DestinationInput'
        authenticationID:
          $ref: '#/components/schemas/authenticationID'
    DestinationUpdateResponse:
      type: object
      additionalProperties: false
      description: API response for updating a destination.
      properties:
        destinationID:
          $ref: '#/components/schemas/destinationID'
        name:
          $ref: '#/components/schemas/name'
        updatedAt:
          $ref: '#/components/schemas/updatedAt'
      required:
        - destinationID
        - name
        - updatedAt
    SourceType:
      type: string
      enum:
        - bigcommerce
        - bigquery
        - commercetools
        - csv
        - docker
        - ga4BigqueryExport
        - json
        - shopify
        - sfcc
    sourceSortKeys:
      type: string
      description: Property by which to sort the list of sources.
      default: createdAt
      enum:
        - name
        - type
        - updatedAt
        - createdAt
    sourceID:
      type: string
      description: Universally uniqud identifier (UUID) of a source.
      example: 6c02aeb1-775e-418e-870b-1faccd4b2c0f
    CommercetoolsCustomFields:
      type: object
      additionalProperties: false
      description: >
        Custom fields from commercetools to add to the records.


        For more information, see [Using Custom Types and Custom
        Fields](https://docs.commercetools.com/tutorials/custom-types).
      properties:
        inventory:
          oneOf:
            - type: array
              description: Inventory custom fields.
              items:
                type: string
            - type: 'null'
        price:
          oneOf:
            - type: array
              description: Price custom fields.
              items:
                type: string
            - type: 'null'
        category:
          oneOf:
            - type: array
              description: Category custom fields.
              items:
                type: string
            - type: 'null'
    SourceCommercetools:
      title: Commercetools
      type: object
      additionalProperties: false
      properties:
        storeKeys:
          type: array
          items:
            description: Unique and immutable key of the referenced store.
            type: string
        locales:
          type: array
          description: Locales for your commercetools stores.
          items:
            type: string
            pattern: ^[a-z]{2}(-[A-Z]{2})?$
            description: >-
              Locale specfied as combination of a two-letter language code and
              an optional two-letter country code.
            example: fr-FR
        url:
          type: string
        projectKey:
          type: string
        fallbackIsInStockValue:
          type: boolean
          default: true
          description: >
            Whether a fallback value is stored in the Algolia record if there's
            no inventory information about the product.
        customFields:
          $ref: '#/components/schemas/CommercetoolsCustomFields'
      required:
        - url
        - projectKey
      x-discriminator-fields:
        - projectKey
    BigCommerceChannel:
      type: object
      additionalProperties: false
      properties:
        id:
          type: integer
          description: ID of the BigCommerce channel.
        currencies:
          type: array
          description: Currencies for the given channel.
          example:
            - usd
            - eur
          items:
            type: string
            description: Three-letter code for the currency.
            example: usd
      required:
        - id
    BigCommerceMetafield:
      type: object
      additionalProperties: false
      properties:
        namespace:
          type: string
          description: Namespace of the metafield.
        key:
          type: string
          description: Key identifier of the metafield.
      required:
        - namespace
        - key
    SourceBigCommerce:
      title: BigCommerce
      type: object
      additionalProperties: false
      properties:
        storeHash:
          type: string
          description: Store hash identifying your BigCommerce store.
        channel:
          $ref: '#/components/schemas/BigCommerceChannel'
        customFields:
          type: array
          items:
            type: string
        productMetafields:
          type: array
          items:
            $ref: '#/components/schemas/BigCommerceMetafield'
        variantMetafields:
          type: array
          items:
            $ref: '#/components/schemas/BigCommerceMetafield'
      required:
        - storeHash
      x-discriminator-fields:
        - storeHash
    UniqueIDColumn:
      type: string
      description: >-
        Name of a column that contains a unique ID which will be used as
        `objectID` in Algolia.
    MethodType:
      type: string
      description: HTTP method to be used for retrieving your data.
      enum:
        - GET
        - POST
    SourceJSON:
      title: JSON
      type: object
      additionalProperties: false
      properties:
        url:
          type: string
          description: URL of the file.
        uniqueIDColumn:
          $ref: '#/components/schemas/UniqueIDColumn'
        method:
          $ref: '#/components/schemas/MethodType'
      required:
        - url
    MappingTypeCSV:
      type: string
      enum:
        - string
        - integer
        - float
        - boolean
        - json
    SourceCSV:
      title: CSV
      type: object
      additionalProperties: false
      properties:
        url:
          type: string
          description: URL of the file.
        uniqueIDColumn:
          $ref: '#/components/schemas/UniqueIDColumn'
        mapping:
          type: object
          description: |
            Key-value pairs of column names and their expected types.
          x-additionalPropertyName: column name
          additionalProperties:
            $ref: '#/components/schemas/MappingTypeCSV'
        method:
          $ref: '#/components/schemas/MethodType'
        delimiter:
          type: string
          minLength: 1
          maxLength: 1
          default: ','
          description: >-
            The character used to split the value on each line, default to a
            comma (\r, \n, 0xFFFD, and space are forbidden).
      required:
        - url
    BigQueryDataType:
      type: string
      enum:
        - ga4
        - ga360
    SourceBigQuery:
      title: BigQuery
      type: object
      additionalProperties: false
      properties:
        projectID:
          type: string
          description: Project ID of the BigQuery source.
        datasetID:
          type: string
          description: Dataset ID of the BigQuery source.
        dataType:
          $ref: '#/components/schemas/BigQueryDataType'
        table:
          type: string
          description: Table name for the BigQuery export.
        tablePrefix:
          type: string
          description: Table prefix for a Google Analytics 4 data export to BigQuery.
        customSQLRequest:
          type: string
          description: Custom SQL request to extract data from the BigQuery table.
        uniqueIDColumn:
          $ref: '#/components/schemas/UniqueIDColumn'
      required:
        - projectID
        - datasetID
      x-discriminator-fields:
        - projectID
    SourceGA4BigQueryExport:
      title: GA4 BigQuery export
      type: object
      additionalProperties: false
      properties:
        projectID:
          type: string
          description: GCP project ID that the BigQuery export writes to.
        datasetID:
          type: string
          description: BigQuery dataset ID that the BigQuery export writes to.
        tablePrefix:
          type: string
          description: Prefix of the tables that the BigQuery Export writes to.
          example: events_intraday_
      required:
        - projectID
        - datasetID
        - tablePrefix
      x-discriminator-fields:
        - projectID
        - datasetID
        - tablePrefix
    DockerImageType:
      type: string
      enum:
        - singer
        - custom
        - airbyte
      description: Image type.
    DockerRegistry:
      type: string
      description: Container registry name from where to pull the image.
      enum:
        - dockerhub
        - ghcr
    SourceDocker:
      title: Docker
      type: object
      additionalProperties: false
      properties:
        imageType:
          $ref: '#/components/schemas/DockerImageType'
        registry:
          $ref: '#/components/schemas/DockerRegistry'
        image:
          type: string
          description: Docker image name.
          example: algolia/zendesk
        version:
          type: string
          description: Docker image version.
          default: latest
          example: v2.1.0
        configuration:
          type: object
          description: Configuration of the spec.
      required:
        - registry
        - image
        - imageType
        - configuration
    SourceUpdateShopify:
      title: Shopify
      type: object
      additionalProperties: false
      properties:
        collectionIDIndexing:
          type: boolean
          default: false
          description: >
            Whether to index collection IDs. 


            If your store has `has_collection_search_page` set to true,

            collection IDs will be indexed even if `collectionIDIndexing` is
            false. 
        increaseProductCollectionLimit:
          type: boolean
          default: false
          description: |
            Whether to increase the number of indexed collections per product.
            If true, Algolia indexes 200 collections per product.
            If false, 100 collections per product are indexed.
        defaultPriceRatioAsOne:
          type: boolean
          default: true
          description: >
            Whether to set the default price ratio to 1 if no sale price is
            present.


            The price ratio is determined by the ratio: `sale_price` /
            `regular_price`.

            If no sale price is present, the price ratio would be 0.

            If `defaultPriceRatioAsOne` is true, the price ratio is indexed as 1
            instead.
        excludeOOSVariantsForPriceAtTRS:
          type: boolean
          default: true
          description: >
            Whether to exclude out-of-stock variants when determining the
            `max_variant_price` and `min_variant_price` attributes.
        includeVariantsInventory:
          type: boolean
          default: true
          description: >
            Whether to include an inventory with every variant for every product
            record.
        hasCollectionSearchPage:
          type: boolean
          default: false
          description: >
            Whether to include collection IDs and handles in the product
            records.
        productNamedTags:
          type: boolean
          default: false
          description: >
            Whether to convert tags on products to named tags.


            To learn more, see [Named
            tags](https://www.algolia.com/doc/integration/shopify/sending-and-managing-data/named-tags).
    sourceShopifyBase:
      type: object
      additionalProperties: false
      properties:
        shopURL:
          type: string
          description: URL of the Shopify store.
      required:
        - shopURL
      x-discriminator-fields:
        - shopURL
    SourceShopify:
      allOf:
        - $ref: '#/components/schemas/SourceUpdateShopify'
        - $ref: '#/components/schemas/sourceShopifyBase'
    SourceInput:
      oneOf:
        - $ref: '#/components/schemas/SourceCommercetools'
        - $ref: '#/components/schemas/SourceBigCommerce'
        - $ref: '#/components/schemas/SourceJSON'
        - $ref: '#/components/schemas/SourceCSV'
        - $ref: '#/components/schemas/SourceBigQuery'
        - $ref: '#/components/schemas/SourceGA4BigQueryExport'
        - $ref: '#/components/schemas/SourceDocker'
        - $ref: '#/components/schemas/SourceShopify'
    Source:
      type: object
      additionalProperties: false
      properties:
        sourceID:
          $ref: '#/components/schemas/sourceID'
        type:
          $ref: '#/components/schemas/SourceType'
        name:
          type: string
        input:
          $ref: '#/components/schemas/SourceInput'
        authenticationID:
          $ref: '#/components/schemas/authenticationID'
        createdAt:
          $ref: '#/components/schemas/createdAt'
        updatedAt:
          $ref: '#/components/schemas/updatedAt'
      required:
        - sourceID
        - type
        - name
        - input
        - createdAt
    SourceCreate:
      type: object
      additionalProperties: false
      properties:
        type:
          $ref: '#/components/schemas/SourceType'
        name:
          type: string
          description: Descriptive name of the source.
        input:
          $ref: '#/components/schemas/SourceInput'
        authenticationID:
          $ref: '#/components/schemas/authenticationID'
      required:
        - type
        - name
        - input
    SourceCreateResponse:
      type: object
      additionalProperties: false
      properties:
        sourceID:
          $ref: '#/components/schemas/sourceID'
        name:
          type: string
          description: Descriptive name of the source.
        createdAt:
          $ref: '#/components/schemas/createdAt'
      required:
        - sourceID
        - name
        - createdAt
    SourceSearch:
      type: object
      additionalProperties: false
      properties:
        sourceIDs:
          type: array
          items:
            type: string
      required:
        - sourceIDs
    SourceUpdateCommercetools:
      type: object
      additionalProperties: false
      properties:
        storeKeys:
          type: array
          items:
            description: Unique and immutable key of the referenced store.
            type: string
        locales:
          type: array
          description: Locales for your commercetools stores.
          items:
            type: string
            pattern: ^[a-z]{2}(-[A-Z]{2})?$
            description: >-
              Locale specfied as combination of a two-letter language code and
              an optional two-letter country code.
            example: fr-FR
        url:
          type: string
        fallbackIsInStockValue:
          type: boolean
          description: >
            Whether a fallback value is stored in the Algolia record if there's
            no inventory information about the product.
        customFields:
          $ref: '#/components/schemas/CommercetoolsCustomFields'
    SourceUpdateDocker:
      type: object
      additionalProperties: false
      properties:
        registry:
          $ref: '#/components/schemas/DockerRegistry'
        image:
          type: string
          description: Docker image name.
          example: algolia/zendesk
        version:
          type: string
          description: Docker image version.
          default: latest
          example: v2.1.0
        configuration:
          type: object
          description: Configuration of the spec.
      required:
        - configuration
    SourceUpdateInput:
      oneOf:
        - $ref: '#/components/schemas/SourceUpdateCommercetools'
        - $ref: '#/components/schemas/SourceJSON'
        - $ref: '#/components/schemas/SourceCSV'
        - $ref: '#/components/schemas/SourceBigQuery'
        - $ref: '#/components/schemas/SourceGA4BigQueryExport'
        - $ref: '#/components/schemas/SourceUpdateDocker'
        - $ref: '#/components/schemas/SourceUpdateShopify'
    SourceUpdate:
      type: object
      additionalProperties: false
      properties:
        name:
          type: string
          description: Descriptive name of the source.
        input:
          $ref: '#/components/schemas/SourceUpdateInput'
        authenticationID:
          $ref: '#/components/schemas/authenticationID'
    SourceUpdateResponse:
      type: object
      additionalProperties: false
      properties:
        sourceID:
          $ref: '#/components/schemas/sourceID'
        name:
          type: string
          description: Descriptive name of the source.
        updatedAt:
          $ref: '#/components/schemas/updatedAt'
      required:
        - sourceID
        - name
        - updatedAt
    DockerSourceStream:
      type: object
      description: Stream definition (see the Singer specification for details).
    runID:
      type: string
      description: Universally unique identifier (UUID) of a task run.
      example: 6c02aeb1-775e-418e-870b-1faccd4b2c0f
    ActionType:
      type: string
      description: Action to perform on the Algolia index.
      enum:
        - replace
        - save
        - partial
        - append
    TriggerType:
      type: string
      description: |
        Task trigger, describing when a task should run.

        - `onDemand`.
          Manually trigger the task with the `/run` endpoint.

        - `schedule`.
          Regularly trigger the task on a `cron` schedule.

        - `subscription`.
          Trigger the task after an event is received, such as, a webhook.

        - `streaming`.
          Run the task continuously.
      enum:
        - onDemand
        - schedule
        - subscription
        - streaming
    taskSortKeys:
      type: string
      description: Property by which to sort the list of tasks.
      default: createdAt
      enum:
        - enabled
        - triggerType
        - action
        - updatedAt
        - createdAt
    taskID:
      type: string
      description: Universally unique identifier (UUID) of a task.
      example: 6c02aeb1-775e-418e-870b-1faccd4b2c0f
    OnDemandTriggerType:
      type: string
      description: Task is run manually, with the `/run` endpoint.
      enum:
        - onDemand
    LastRun:
      description: The last time the scheduled task ran in RFC3339 format.
      type: string
    OnDemandTrigger:
      type: object
      additionalProperties: false
      description: Trigger information for manually-triggered tasks.
      properties:
        type:
          $ref: '#/components/schemas/OnDemandTriggerType'
        lastRun:
          $ref: '#/components/schemas/LastRun'
      required:
        - type
    ScheduleTriggerType:
      type: string
      description: Task runs on a schedule.
      enum:
        - schedule
    Cron:
      type: string
      description: Cron expression for the task's schedule.
      example: '* * 1 * *'
    ScheduleTrigger:
      type: object
      additionalProperties: false
      description: Trigger information for scheduled tasks.
      properties:
        type:
          $ref: '#/components/schemas/ScheduleTriggerType'
        cron:
          $ref: '#/components/schemas/Cron'
        lastRun:
          $ref: '#/components/schemas/LastRun'
        nextRun:
          description: The next scheduled run of the task in RFC3339 format.
          type: string
      required:
        - type
        - cron
        - nextRun
    SubscriptionTriggerType:
      type: string
      description: Task runs after receiving subscribed event.
      enum:
        - subscription
    SubscriptionTrigger:
      title: Subscription
      type: object
      additionalProperties: false
      description: Trigger input for subscription tasks.
      properties:
        type:
          $ref: '#/components/schemas/SubscriptionTriggerType'
      required:
        - type
    StreamingTriggerType:
      type: string
      description: Task runs continuously.
      enum:
        - streaming
    StreamingTrigger:
      title: Streaming
      type: object
      additionalProperties: false
      description: Trigger input for continuously running tasks.
      properties:
        type:
          $ref: '#/components/schemas/StreamingTriggerType'
      required:
        - type
    Trigger:
      description: Trigger that runs the task.
      oneOf:
        - $ref: '#/components/schemas/OnDemandTrigger'
        - $ref: '#/components/schemas/ScheduleTrigger'
        - $ref: '#/components/schemas/SubscriptionTrigger'
        - $ref: '#/components/schemas/StreamingTrigger'
    MappingFormatSchema:
      type: string
      description: Mapping format schema.
      enum:
        - mappingkit/v1
    MappingFieldDirective:
      type: object
      additionalProperties: false
      description: >-
        Describes how a field should be resolved by applying a set of
        directives.
      properties:
        fieldKey:
          description: Destination field key.
          type: string
        value:
          type: object
          additionalProperties: true
          description: How the destination field should be resolved from the source.
      required:
        - fieldKey
        - value
    MappingKitAction:
      type: object
      additionalProperties: false
      description: >-
        Describes how a destination object should be resolved by means of
        applying a set of directives.
      properties:
        id:
          description: ID to uniquely identify this action.
          type: string
        enabled:
          description: Whether this action has any effect.
          type: boolean
        trigger:
          description: >-
            Condition which must be satisfied to apply the action. If this
            evaluates to false, the action is not applied, and the process
            attempts to apply the next action, if any.
          type: string
        fieldDirectives:
          type: array
          items:
            $ref: '#/components/schemas/MappingFieldDirective'
      required:
        - enabled
        - trigger
        - fieldDirectives
    MappingInput:
      type: object
      additionalProperties: false
      description: Transformations to apply to the source, serialized as a JSON string.
      properties:
        format:
          $ref: '#/components/schemas/MappingFormatSchema'
        actions:
          type: array
          items:
            $ref: '#/components/schemas/MappingKitAction'
      required:
        - format
        - actions
    OnDemandDateUtilsInput:
      title: On demand date range
      type: object
      additionalProperties: false
      description: >-
        Input for a manually-triggered task whose source is of type `bigquery`
        and for which extracted data spans a given time range.
      properties:
        startDate:
          description: >-
            Earliest date in RFC3339 format of the extracted data from Big
            Query.
          type: string
        endDate:
          description: Latest date in RFC3339 format of the extracted data from Big Query.
          type: string
        mapping:
          $ref: '#/components/schemas/MappingInput'
      required:
        - startDate
        - endDate
    ScheduleDateUtilsInput:
      title: Schedule dates
      type: object
      additionalProperties: false
      description: >-
        Input for scheduled tasks whose source is of type `bigquery` and for
        which extracted data spans a fixed number of days.
      properties:
        timeframe:
          description: >-
            Number of days in the past until the current day for which to
            extract Big Query data.
          type: integer
          minimum: 1
          maximum: 30
        mapping:
          $ref: '#/components/schemas/MappingInput'
      required:
        - timeframe
    StreamingUtilsInput:
      title: Streaming input
      type: object
      additionalProperties: false
      description: >-
        Input for a `streaming` task whose source is of type `ga4BigqueryExport`
        and for which extracted data is continuously streamed.
      properties:
        mapping:
          $ref: '#/components/schemas/MappingInput'
      required:
        - mapping
    ShopifyMetafield:
      type: object
      additionalProperties: false
      description: Represents a metafield in Shopify.
      properties:
        namespace:
          type: string
        key:
          type: string
        value:
          type: string
      required:
        - namespace
        - key
        - value
    ShopifyMarket:
      type: object
      additionalProperties: false
      description: Represents a market in Shopify.
      properties:
        countries:
          type: array
          items:
            type: string
        currencies:
          type: array
          items:
            type: string
        locales:
          type: array
          items:
            type: string
      required:
        - countries
        - currencies
        - locales
    ShopifyInput:
      title: Shopify input
      type: object
      additionalProperties: false
      description: >-
        Represents the required elements of the task input when using a
        `shopify` source.
      properties:
        metafields:
          type: array
          items:
            $ref: '#/components/schemas/ShopifyMetafield'
        market:
          $ref: '#/components/schemas/ShopifyMarket'
      required:
        - metafields
        - market
    TaskInput:
      description: Configuration of the task, depending on its type.
      oneOf:
        - $ref: '#/components/schemas/OnDemandDateUtilsInput'
        - $ref: '#/components/schemas/ScheduleDateUtilsInput'
        - $ref: '#/components/schemas/StreamingUtilsInput'
        - $ref: '#/components/schemas/ShopifyInput'
    failureThreshold:
      type: integer
      minimum: 0
      maximum: 100
      description: >-
        Maximum accepted percentage of failures for a task run to finish
        successfully.
    Task:
      type: object
      additionalProperties: false
      properties:
        taskID:
          $ref: '#/components/schemas/taskID'
        sourceID:
          $ref: '#/components/schemas/sourceID'
        destinationID:
          $ref: '#/components/schemas/destinationID'
        trigger:
          $ref: '#/components/schemas/Trigger'
        input:
          $ref: '#/components/schemas/TaskInput'
        enabled:
          type: boolean
          default: true
          description: Whether the task is enabled.
        failureThreshold:
          $ref: '#/components/schemas/failureThreshold'
        action:
          $ref: '#/components/schemas/ActionType'
        createdAt:
          $ref: '#/components/schemas/createdAt'
        updatedAt:
          $ref: '#/components/schemas/updatedAt'
      required:
        - taskID
        - sourceID
        - destinationID
        - trigger
        - enabled
        - action
        - createdAt
    OnDemandTriggerInput:
      title: On demand
      type: object
      additionalProperties: false
      description: Trigger information for manually-triggered tasks.
      properties:
        type:
          $ref: '#/components/schemas/OnDemandTriggerType'
      required:
        - type
    ScheduleTriggerInput:
      title: Schedule
      type: object
      additionalProperties: false
      description: Trigger input for scheduled tasks.
      properties:
        type:
          $ref: '#/components/schemas/ScheduleTriggerType'
        cron:
          $ref: '#/components/schemas/Cron'
      required:
        - type
        - cron
    TaskCreateTrigger:
      oneOf:
        - $ref: '#/components/schemas/OnDemandTriggerInput'
        - $ref: '#/components/schemas/ScheduleTriggerInput'
        - $ref: '#/components/schemas/SubscriptionTrigger'
        - $ref: '#/components/schemas/StreamingTrigger'
    TaskCreate:
      type: object
      additionalProperties: false
      description: API request body for creating a task.
      properties:
        sourceID:
          $ref: '#/components/schemas/sourceID'
        destinationID:
          $ref: '#/components/schemas/destinationID'
        trigger:
          $ref: '#/components/schemas/TaskCreateTrigger'
        action:
          $ref: '#/components/schemas/ActionType'
        enabled:
          type: boolean
          description: Whether the task is enabled.
        failureThreshold:
          $ref: '#/components/schemas/failureThreshold'
        input:
          $ref: '#/components/schemas/TaskInput'
      required:
        - sourceID
        - destinationID
        - trigger
        - action
    TaskCreateResponse:
      type: object
      additionalProperties: false
      description: API response for creating a task.
      properties:
        taskID:
          $ref: '#/components/schemas/taskID'
        createdAt:
          $ref: '#/components/schemas/createdAt'
      required:
        - taskID
        - createdAt
    TaskSearch:
      type: object
      additionalProperties: false
      properties:
        taskIDs:
          type: array
          items:
            $ref: '#/components/schemas/taskID'
      required:
        - taskIDs
    TriggerUpdateInput:
      type: object
      additionalProperties: false
      description: Trigger for a task update.
      properties:
        cron:
          $ref: '#/components/schemas/Cron'
      required:
        - cron
    TaskUpdate:
      type: object
      additionalProperties: false
      description: API request body for updating a task.
      properties:
        destinationID:
          $ref: '#/components/schemas/destinationID'
        trigger:
          $ref: '#/components/schemas/TriggerUpdateInput'
        input:
          $ref: '#/components/schemas/TaskInput'
        enabled:
          type: boolean
          description: Whether the task is enabled.
        failureThreshold:
          $ref: '#/components/schemas/failureThreshold'
    TaskUpdateResponse:
      type: object
      description: API response for updating a task.
      additionalProperties: false
      properties:
        taskID:
          $ref: '#/components/schemas/taskID'
        updatedAt:
          $ref: '#/components/schemas/updatedAt'
      required:
        - taskID
        - updatedAt
    RunResponse:
      type: object
      additionalProperties: false
      description: API response for running a task.
      properties:
        runID:
          $ref: '#/components/schemas/runID'
        createdAt:
          $ref: '#/components/schemas/createdAt'
      required:
        - runID
        - createdAt
    RunStatus:
      type: string
      description: Task run status.
      enum:
        - created
        - started
        - idled
        - finished
        - skipped
    runSortKeys:
      type: string
      description: Property by which to sort the list of task runs.
      default: createdAt
      enum:
        - status
        - updatedAt
        - createdAt
    RunOutcome:
      type: string
      description: Task run outcome.
      enum:
        - success
        - failure
        - processing
    RunReasonCode:
      type: string
      description: >-
        A code for the task run's outcome. A readable description of the code is
        included in the `reason` response property.
      enum:
        - internal
        - critical
        - no_events
        - too_many_errors
        - ok
        - discarded
        - blocking
    RunType:
      type: string
      description: Task run type.
      enum:
        - reindex
        - update
        - discover
    startedAt:
      type: string
      description: Date of start in RFC3339 format.
    finishedAt:
      type: string
      description: Date of finish in RFC3339 format.
    Run:
      type: object
      additionalProperties: false
      properties:
        runID:
          $ref: '#/components/schemas/runID'
        appID:
          type: string
        taskID:
          $ref: '#/components/schemas/taskID'
        status:
          $ref: '#/components/schemas/RunStatus'
        progress:
          type: object
          additionalProperties: false
          properties:
            expectedNbOfEvents:
              type: integer
            receivedNbOfEvents:
              type: integer
        outcome:
          $ref: '#/components/schemas/RunOutcome'
        failureThreshold:
          $ref: '#/components/schemas/failureThreshold'
        reason:
          type: string
          description: More information about the task run's outcome.
        reasonCode:
          $ref: '#/components/schemas/RunReasonCode'
        type:
          $ref: '#/components/schemas/RunType'
        createdAt:
          $ref: '#/components/schemas/createdAt'
        startedAt:
          $ref: '#/components/schemas/startedAt'
        finishedAt:
          $ref: '#/components/schemas/finishedAt'
      required:
        - runID
        - appID
        - taskID
        - status
        - type
        - createdAt
    Window:
      type: object
      additionalProperties: false
      description: Time window by which to filter the observability data.
      properties:
        startDate:
          type: string
          description: >-
            Date in RFC3339 format representing the oldest data in the time
            window.
        endDate:
          type: string
          description: >-
            Date in RFC3339 format representing the newest data in the time
            window.
      required:
        - startDate
        - endDate
    RunListResponse:
      type: object
      additionalProperties: false
      properties:
        runs:
          type: array
          items:
            $ref: '#/components/schemas/Run'
        pagination:
          $ref: '#/components/schemas/Pagination'
        window:
          $ref: '#/components/schemas/Window'
      required:
        - runs
        - pagination
        - window
    EventStatus:
      type: string
      enum:
        - created
        - started
        - retried
        - failed
        - succeeded
        - critical
    EventType:
      type: string
      enum:
        - fetch
        - record
        - log
        - transform
    eventSortKeys:
      type: string
      description: Property by which to sort the list of task run events.
      enum:
        - status
        - type
        - publishedAt
    eventID:
      type: string
      description: Universally unique identifier (UUID) of an event.
      example: 6c02aeb1-775e-418e-870b-1faccd4b2c0f
    publishedAt:
      type: string
      description: Date of publish RFC3339 format.
    Event:
      type: object
      description: An event describe a step of the task execution flow..
      additionalProperties: false
      properties:
        eventID:
          $ref: '#/components/schemas/eventID'
        runID:
          $ref: '#/components/schemas/runID'
        parentID:
          type: string
          description: The parent event, the cause of this event.
          example: 6c02aeb1-775e-418e-870b-1faccd4b2c0f
        status:
          $ref: '#/components/schemas/EventStatus'
        type:
          $ref: '#/components/schemas/EventType'
        batchSize:
          type: integer
          description: The extracted record batch size.
          example: 10
          minimum: 0
          multipleOf: 1
        data:
          type: object
          additionalProperties: true
        publishedAt:
          $ref: '#/components/schemas/publishedAt'
      required:
        - eventID
        - runID
        - status
        - type
        - batchSize
        - publishedAt
  responses:
    BadRequest:
      description: Bad request or request arguments.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorBase'
    FeatureNotEnabled:
      description: This feature is not enabled on your Algolia account.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorBase'
    MethodNotAllowed:
      description: Method not allowed with this API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorBase'
    IndexNotFound:
      description: Index not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorBase'
x-tagGroups:
  - name: Resources
    tags:
      - authentications
      - sources
      - destinations
      - tasks
      - observability
