@@ -718,6 +718,65 @@ private Request getCurrentlyRunningQueriesRequest() {
718718 return new Request (name , RequestType .GET , ArangoDBConstants .PATH_API_QUERY_CURRENT );
719719 }
720720
721+ /**
722+ * Returns a list of slow running AQL queries
723+ *
724+ * @see <a href=
725+ * "https://docs.arangodb.com/current/HTTP/AqlQuery/index.html#returns-the-list-of-slow-aql-queries">API
726+ * Documentation</a>
727+ * @return a list of slow running AQL queries
728+ * @throws ArangoDBException
729+ */
730+ public Collection <QueryEntity > getSlowQueries () throws ArangoDBException {
731+ return executeSync (getSlowQueriesRequest (), new Type <Collection <QueryEntity >>() {
732+ }.getType ());
733+ }
734+
735+ /**
736+ * Returns a list of slow running AQL queries
737+ *
738+ * @see <a href=
739+ * "https://docs.arangodb.com/current/HTTP/AqlQuery/index.html#returns-the-list-of-slow-aql-queries">API
740+ * Documentation</a>
741+ * @return a list of slow running AQL queries
742+ */
743+ public CompletableFuture <Collection <QueryEntity >> getSlowQueriesAsync () {
744+ return executeAsync (getSlowQueriesRequest (), new Type <Collection <QueryEntity >>() {
745+ }.getType ());
746+ }
747+
748+ private Request getSlowQueriesRequest () {
749+ return new Request (name , RequestType .GET , ArangoDBConstants .PATH_API_QUERY_SLOW );
750+ }
751+
752+ /**
753+ * Clears the list of slow AQL queries
754+ *
755+ * @see <a href=
756+ * "https://docs.arangodb.com/current/HTTP/AqlQuery/index.html#clears-the-list-of-slow-aql-queries">API
757+ * Documentation</a>
758+ * @throws ArangoDBException
759+ */
760+ public void clearSlowQueries () throws ArangoDBException {
761+ executeSync (clearSlowQueriesRequest (), Void .class );
762+ }
763+
764+ /**
765+ * Clears the list of slow AQL queries
766+ *
767+ * @see <a href=
768+ * "https://docs.arangodb.com/current/HTTP/AqlQuery/index.html#clears-the-list-of-slow-aql-queries">API
769+ * Documentation</a>
770+ * @return void
771+ */
772+ public CompletableFuture <Void > clearSlowQueriesAsync () {
773+ return executeAsync (clearSlowQueriesRequest (), Void .class );
774+ }
775+
776+ private Request clearSlowQueriesRequest () {
777+ return new Request (name , RequestType .DELETE , ArangoDBConstants .PATH_API_QUERY_SLOW );
778+ }
779+
721780 /**
722781 * Create a new AQL user function
723782 *
0 commit comments