For clean Markdown of any page, append .md to the page URL. For a complete documentation index, see https://help.moveworks.com/api-reference/data-api/llms.txt. For full documentation content, see https://help.moveworks.com/api-reference/data-api/llms-full.txt.

# List interactions

GET https://api.moveworks.ai/export/v1/records/interactions

Retrieve all interactions occurring with the Moveworks AI Assistant.

Reference: https://help.moveworks.com/api-reference/data-api/list-interactions

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: data-api
  version: 1.0.0
paths:
  /interactions:
    get:
      operationId: list-interactions
      summary: List interactions
      description: Retrieve all interactions occurring with the Moveworks AI Assistant.
      tags:
        - ''
      parameters:
        - name: $filter
          in: query
          description: >-
            This option allows the client to filter the resource that is address
            by request URL
          required: false
          schema:
            type: string
        - name: $select
          in: query
          description: >-
            This option allow the client to request a limited set of properties
            of an entity
          required: false
          schema:
            type: string
        - name: $orderby
          in: query
          description: >-
            This option allow the client to request resources in either
            ascending or descending order
          required: false
          schema:
            type: string
        - name: $top
          in: query
          description: This option request the number of items to be included in the result
          required: false
          schema:
            type: integer
        - name: $skip
          in: query
          description: >-
            This query option requests the number of items in the queried
            collection that are to be skipped and not included in the result.
          required: false
          schema:
            type: integer
        - name: $count
          in: query
          description: >-
            This option allows clients to request a count of the matching
            resources included with the resources in the result
          required: false
          schema:
            type: boolean
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successfully retrieved list of interactions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/interactions'
        '400':
          description: Bad request error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/400ErrorResponse'
        '403':
          description: Forbidden error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/403ErrorResponse'
        '404':
          description: URL not found error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/404ErrorResponse'
        '429':
          description: Rate limiting exceeding error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/429ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/500ErrorResponse'
servers:
  - url: https://api.moveworks.ai/export/v1/records
  - url: https://api.am-eu-central.moveworks.ai/export/v1/records
  - url: https://api.am-ca-central.moveworks.ai/export/v1/records
  - url: https://api.moveworksgov.ai/export/v1/records
components:
  schemas:
    InteractionsobjectDetail:
      type: object
      properties:
        content:
          type: string
          description: >-
            This field contains the free form text, link URL, Button name
            according to interaction type.
        domain:
          type: string
          description: >-
            This the interaction level detected domain. Domain is only predicted
            for free form text interaction type. In some cases, domain of
            individual utterances may differ from the primary domain detected
            per conversation.
        entity:
          type: string
          description: >-
            This field contains the topic as detected per each interaction.
            Topic is only predicted for free form text interaction type.
        type:
          type: string
          description: >-
            This field indicates which type of resource were accessed during an
            link click interaction.
        detail:
          type: string
          description: This field indicates the form name which was submitted
        resource_id:
          type: string
          description: >-
            This field provides the resource ID that was accessed by the end
            user during an link click interaction, or when a user submits a
            ticket via UI form

            INTERACTION_TYPE_LINK_CLICK

            INTERACTION_TYPE_UIFORM_SUBMISSION
        file_types:
          type: array
          items:
            type: string
          description: >-
            This field provides list of types of files that were uploaded during
            a file upload interaction (INTERACTION_TYPE_CONTENT_UPLOAD). We do
            not record the file names as user can also upload a private file
      description: This is a JSON object which contains metadata per interaction type.
      title: InteractionsobjectDetail
    interactionsobject:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: >-
            UUID assigned by a system to a interaction. An interaction is either
            an input from a user to the system, or a response from the system
            the the user.
        conversation_id:
          type: string
          format: uuid
          description: ID of the parent conversation.
        user_id:
          type: string
          format: uuid
          description: User record ID assigned by the system to a user.
        actor:
          type: string
          description: This field differentiates user v/s bot interactions.
        platform:
          type: string
          description: >-
            This field denotes the platform where the interaction took place.
            For example: slack, msteams.
        type:
          type: string
          description: This field defines the type of the interaction.
        label:
          type: string
          description: >-
            This field defines the label for UI form submission interaction
            type.
        parent_interaction_id:
          type: string
          format: uuid
          description: >-
            Parent interaction ID for bot messages and user actions such as form
            submissions/button clicks/link clicks
        detail:
          $ref: '#/components/schemas/InteractionsobjectDetail'
          description: This is a JSON object which contains metadata per interaction type.
        created_time:
          type: string
          format: date-time
          description: Timestamp when the interaction was initiated.
        last_updated_time:
          type: string
          format: date-time
          description: Timestamp when the interaction entry is last updated in this table.
      title: interactionsobject
    interactions:
      type: object
      properties:
        '@odata.context':
          type: string
          description: URL to the metadata of the response.
        '@odata.nextLink':
          type: string
          description: URL to fetch the next set of results.
        value:
          type: array
          items:
            $ref: '#/components/schemas/interactionsobject'
      title: interactions
    400ErrorResponse:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
      title: 400ErrorResponse
    403ErrorResponse:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
      title: 403ErrorResponse
    404ErrorResponse:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
      title: 404ErrorResponse
    429ErrorResponse:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
      title: 429ErrorResponse
    500ErrorResponse:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
      title: 500ErrorResponse
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
    OAuth2:
      type: http
      scheme: bearer

```

## SDK Code Examples

```python
import requests

url = "https://api.moveworks.ai/export/v1/records/interactions"

querystring = {"$filter":"user_id eq '123456'","$select":"id,created_time","$orderby":"user_id desc","$top":"10","$skip":"10","$count":"true"}

headers = {"Authorization": "<apiKey>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript
const url = 'https://api.moveworks.ai/export/v1/records/interactions?%24filter=user_id+eq+%27123456%27&%24select=id%2Ccreated_time&%24orderby=user_id+desc&%24top=10&%24skip=10&%24count=true';
const options = {method: 'GET', headers: {Authorization: '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.moveworks.ai/export/v1/records/interactions?%24filter=user_id+eq+%27123456%27&%24select=id%2Ccreated_time&%24orderby=user_id+desc&%24top=10&%24skip=10&%24count=true"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.moveworks.ai/export/v1/records/interactions?%24filter=user_id+eq+%27123456%27&%24select=id%2Ccreated_time&%24orderby=user_id+desc&%24top=10&%24skip=10&%24count=true")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.moveworks.ai/export/v1/records/interactions?%24filter=user_id+eq+%27123456%27&%24select=id%2Ccreated_time&%24orderby=user_id+desc&%24top=10&%24skip=10&%24count=true")
  .header("Authorization", "<apiKey>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.moveworks.ai/export/v1/records/interactions?%24filter=user_id+eq+%27123456%27&%24select=id%2Ccreated_time&%24orderby=user_id+desc&%24top=10&%24skip=10&%24count=true', [
  'headers' => [
    'Authorization' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.moveworks.ai/export/v1/records/interactions?%24filter=user_id+eq+%27123456%27&%24select=id%2Ccreated_time&%24orderby=user_id+desc&%24top=10&%24skip=10&%24count=true");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.moveworks.ai/export/v1/records/interactions?%24filter=user_id+eq+%27123456%27&%24select=id%2Ccreated_time&%24orderby=user_id+desc&%24top=10&%24skip=10&%24count=true")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```