:doc:`DeviceFarm <../../devicefarm>` / Client / list_artifacts

**************
list_artifacts
**************



.. py:method:: DeviceFarm.Client.list_artifacts(**kwargs)

  

  Gets information about artifacts.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListArtifacts>`_  


  **Request Syntax**
  ::

    response = client.list_artifacts(
        arn='string',
        type='SCREENSHOT'|'FILE'|'LOG',
        nextToken='string'
    )
    
  :type arn: string
  :param arn: **[REQUIRED]** 

    The run, job, suite, or test ARN.

    

  
  :type type: string
  :param type: **[REQUIRED]** 

    The artifacts' type.

     

    Allowed values include:

     

    
    * FILE
     
    * LOG
     
    * SCREENSHOT
    

    

  
  :type nextToken: string
  :param nextToken: 

    An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'artifacts': [
              {
                  'arn': 'string',
                  'name': 'string',
                  'type': 'UNKNOWN'|'SCREENSHOT'|'DEVICE_LOG'|'MESSAGE_LOG'|'VIDEO_LOG'|'RESULT_LOG'|'SERVICE_LOG'|'WEBKIT_LOG'|'INSTRUMENTATION_OUTPUT'|'EXERCISER_MONKEY_OUTPUT'|'CALABASH_JSON_OUTPUT'|'CALABASH_PRETTY_OUTPUT'|'CALABASH_STANDARD_OUTPUT'|'CALABASH_JAVA_XML_OUTPUT'|'AUTOMATION_OUTPUT'|'APPIUM_SERVER_OUTPUT'|'APPIUM_JAVA_OUTPUT'|'APPIUM_JAVA_XML_OUTPUT'|'APPIUM_PYTHON_OUTPUT'|'APPIUM_PYTHON_XML_OUTPUT'|'EXPLORER_EVENT_LOG'|'EXPLORER_SUMMARY_LOG'|'APPLICATION_CRASH_REPORT'|'XCTEST_LOG'|'VIDEO'|'CUSTOMER_ARTIFACT'|'CUSTOMER_ARTIFACT_LOG'|'TESTSPEC_OUTPUT',
                  'extension': 'string',
                  'url': 'string'
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 

      Represents the result of a list artifacts operation.

      
      

      - **artifacts** *(list) --* 

        Information about the artifacts.

        
        

        - *(dict) --* 

          Represents the output of a test. Examples of artifacts include logs and screenshots.

          
          

          - **arn** *(string) --* 

            The artifact's ARN.

            
          

          - **name** *(string) --* 

            The artifact's name.

            
          

          - **type** *(string) --* 

            The artifact's type.

             

            Allowed values include the following:

             

            
            * UNKNOWN
             
            * SCREENSHOT
             
            * DEVICE_LOG
             
            * MESSAGE_LOG
             
            * VIDEO_LOG
             
            * RESULT_LOG
             
            * SERVICE_LOG
             
            * WEBKIT_LOG
             
            * INSTRUMENTATION_OUTPUT
             
            * EXERCISER_MONKEY_OUTPUT: the artifact (log) generated by an Android fuzz test.
             
            * APPIUM_SERVER_OUTPUT
             
            * APPIUM_JAVA_OUTPUT
             
            * APPIUM_JAVA_XML_OUTPUT
             
            * APPIUM_PYTHON_OUTPUT
             
            * APPIUM_PYTHON_XML_OUTPUT
             
            * APPLICATION_CRASH_REPORT
             
            * XCTEST_LOG
             
            * VIDEO
             
            * CUSTOMER_ARTIFACT
             
            * CUSTOMER_ARTIFACT_LOG
             
            * TESTSPEC_OUTPUT
            

            
          

          - **extension** *(string) --* 

            The artifact's file extension.

            
          

          - **url** *(string) --* 

            The presigned Amazon S3 URL that can be used with a GET request to download the artifact's file.

            
      
    
      

      - **nextToken** *(string) --* 

        If the number of items that are returned is significantly large, this is an identifier that is also returned. It can be used in a subsequent call to this operation to return the next set of items in the list.

        
  
  **Exceptions**
  
  *   :py:class:`DeviceFarm.Client.exceptions.ArgumentException`

  
  *   :py:class:`DeviceFarm.Client.exceptions.NotFoundException`

  
  *   :py:class:`DeviceFarm.Client.exceptions.LimitExceededException`

  
  *   :py:class:`DeviceFarm.Client.exceptions.ServiceAccountException`

  

  **Examples**

  The following example lists screenshot artifacts for a specific run.
  ::

    response = client.list_artifacts(
        type='SCREENSHOT',
        # Can also be used to list artifacts for a Job, Suite, or Test ARN.
        arn='arn:aws:devicefarm:us-west-2:123456789101:run:EXAMPLE-GUID-123-456',
    )
    
    print(response)

  
  Expected Output:
  ::

    {
        'ResponseMetadata': {
            '...': '...',
        },
    }

  