:doc:`NeptuneData <../../neptunedata>` / Client / list_open_cypher_queries

************************
list_open_cypher_queries
************************



.. py:method:: NeptuneData.Client.list_open_cypher_queries(**kwargs)

  

  Lists active openCypher queries. See `Neptune openCypher status endpoint <https://docs.aws.amazon.com/neptune/latest/userguide/access-graph-opencypher-status.html>`__ for more information.

   

  When invoking this operation in a Neptune cluster that has IAM authentication enabled, the IAM user or role making the request must have a policy attached that allows the `neptune-db\:GetQueryStatus <https://docs.aws.amazon.com/neptune/latest/userguide/iam-dp-actions.html#getquerystatus>`__ IAM action in that cluster.

   

  Note that the `neptune-db\:QueryLanguage\:OpenCypher <https://docs.aws.amazon.com/neptune/latest/userguide/iam-data-condition-keys.html#iam-neptune-condition-keys>`__ IAM condition key can be used in the policy document to restrict the use of openCypher queries (see `Condition keys available in Neptune IAM data-access policy statements <https://docs.aws.amazon.com/neptune/latest/userguide/iam-data-condition-keys.html>`__).

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptunedata-2023-08-01/ListOpenCypherQueries>`_  


  **Request Syntax**
  ::

    response = client.list_open_cypher_queries(
        includeWaiting=True|False
    )
    
  :type includeWaiting: boolean
  :param includeWaiting: 

    When set to ``TRUE`` and other parameters are not present, causes status information to be returned for waiting queries as well as for running queries.

    

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

    
    ::

      {
          'acceptedQueryCount': 123,
          'runningQueryCount': 123,
          'queries': [
              {
                  'queryId': 'string',
                  'queryString': 'string',
                  'queryEvalStats': {
                      'waited': 123,
                      'elapsed': 123,
                      'cancelled': True|False,
                      'subqueries': {...}|[...]|123|123.4|'string'|True|None
                  }
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **acceptedQueryCount** *(integer) --* 

        The number of queries that have been accepted but not yet completed, including queries in the queue.

        
      

      - **runningQueryCount** *(integer) --* 

        The number of currently running openCypher queries.

        
      

      - **queries** *(list) --* 

        A list of current openCypher queries.

        
        

        - *(dict) --* 

          Captures the status of a Gremlin query (see the `Gremlin query status API <https://docs.aws.amazon.com/neptune/latest/userguide/gremlin-api-status.html>`__ page).

          
          

          - **queryId** *(string) --* 

            The ID of the Gremlin query.

            
          

          - **queryString** *(string) --* 

            The query string of the Gremlin query.

            
          

          - **queryEvalStats** *(dict) --* 

            The query statistics of the Gremlin query.

            
            

            - **waited** *(integer) --* 

              Indicates how long the query waited, in milliseconds.

              
            

            - **elapsed** *(integer) --* 

              The number of milliseconds the query has been running so far.

              
            

            - **cancelled** *(boolean) --* 

              Set to ``TRUE`` if the query was cancelled, or FALSE otherwise.

              
            

            - **subqueries** (:ref:`document<document>`) -- 

              The number of subqueries in this query.

              
        
      
    
  
  **Exceptions**
  
  *   :py:class:`NeptuneData.Client.exceptions.InvalidNumericDataException`

  
  *   :py:class:`NeptuneData.Client.exceptions.BadRequestException`

  
  *   :py:class:`NeptuneData.Client.exceptions.InvalidParameterException`

  
  *   :py:class:`NeptuneData.Client.exceptions.ClientTimeoutException`

  
  *   :py:class:`NeptuneData.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`NeptuneData.Client.exceptions.IllegalArgumentException`

  
  *   :py:class:`NeptuneData.Client.exceptions.TooManyRequestsException`

  
  *   :py:class:`NeptuneData.Client.exceptions.UnsupportedOperationException`

  
  *   :py:class:`NeptuneData.Client.exceptions.FailureByQueryException`

  
  *   :py:class:`NeptuneData.Client.exceptions.PreconditionsFailedException`

  
  *   :py:class:`NeptuneData.Client.exceptions.ParsingException`

  
  *   :py:class:`NeptuneData.Client.exceptions.ReadOnlyViolationException`

  
  *   :py:class:`NeptuneData.Client.exceptions.ConstraintViolationException`

  
  *   :py:class:`NeptuneData.Client.exceptions.TimeLimitExceededException`

  
  *   :py:class:`NeptuneData.Client.exceptions.InvalidArgumentException`

  
  *   :py:class:`NeptuneData.Client.exceptions.ConcurrentModificationException`

  
  *   :py:class:`NeptuneData.Client.exceptions.MissingParameterException`

  