curl --request POST \
--url https://api.stackone.com/actions/search \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "send a message",
"connector": "slack",
"connector_versions": {
"slack": [
"1.2.0",
"1.3.1"
],
"hubspot": [
"*"
]
},
"top_k": 100,
"min_similarity": 0.2
}
'import requests
url = "https://api.stackone.com/actions/search"
payload = {
"query": "send a message",
"connector": "slack",
"connector_versions": {
"slack": ["1.2.0", "1.3.1"],
"hubspot": ["*"]
},
"top_k": 100,
"min_similarity": 0.2
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
query: 'send a message',
connector: 'slack',
connector_versions: {slack: ['1.2.0', '1.3.1'], hubspot: ['*']},
top_k: 100,
min_similarity: 0.2
})
};
fetch('https://api.stackone.com/actions/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.stackone.com/actions/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'query' => 'send a message',
'connector' => 'slack',
'connector_versions' => [
'slack' => [
'1.2.0',
'1.3.1'
],
'hubspot' => [
'*'
]
],
'top_k' => 100,
'min_similarity' => 0.2
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.stackone.com/actions/search"
payload := strings.NewReader("{\n \"query\": \"send a message\",\n \"connector\": \"slack\",\n \"connector_versions\": {\n \"slack\": [\n \"1.2.0\",\n \"1.3.1\"\n ],\n \"hubspot\": [\n \"*\"\n ]\n },\n \"top_k\": 100,\n \"min_similarity\": 0.2\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.stackone.com/actions/search")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"send a message\",\n \"connector\": \"slack\",\n \"connector_versions\": {\n \"slack\": [\n \"1.2.0\",\n \"1.3.1\"\n ],\n \"hubspot\": [\n \"*\"\n ]\n },\n \"top_k\": 100,\n \"min_similarity\": 0.2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stackone.com/actions/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"send a message\",\n \"connector\": \"slack\",\n \"connector_versions\": {\n \"slack\": [\n \"1.2.0\",\n \"1.3.1\"\n ],\n \"hubspot\": [\n \"*\"\n ]\n },\n \"top_k\": 100,\n \"min_similarity\": 0.2\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"id": "slack_1.0.0_slack_send_message_global",
"similarity_score": 123,
"prerequisite_actions": [
"<string>"
]
}
],
"total_count": 123,
"query": "<string>",
"connector_filter": "<string>",
"project_filter": "<string>",
"returned_by_connector": {
"slack": 7,
"hubspot": 0
},
"truncated": false
}{
"statusCode": 400,
"message": "Bad Request",
"timestamp": "2023-05-30T00:00:00.000Z",
"data": {
"statusCode": 400,
"message": "Bad Request",
"headers": {
"content-type": "application/json",
"x-request-id": "5678c28b211dace4e0a0f9171e6b88c5"
}
},
"provider_errors": [
{
"status": 400,
"url": "https://api.provider.com/v1/resource",
"raw": {
"message": "Invalid input parameters"
},
"headers": {
"content-type": "application/json",
"x-request-id": "5678c28b211dace4e0a0f9171e6b88c5"
}
}
]
}{
"statusCode": 401,
"message": "Unauthorized",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 403,
"message": "Forbidden resource",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 404,
"message": "Not Found",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 408,
"message": "Request timed out",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 409,
"message": "Conflict",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 422,
"message": "Unprocessable Entity",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 429,
"message": "Too many requests",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 500,
"message": "Internal server error",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 501,
"message": "Not Implemented",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 502,
"message": "Bad Gateway",
"timestamp": "2023-05-30T00:00:00.000Z"
}Search connector actions by semantic similarity
Ranks the project’s connector actions by how closely they match a natural-language query, so an agent can find the right action without reading the whole catalog.
curl --request POST \
--url https://api.stackone.com/actions/search \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "send a message",
"connector": "slack",
"connector_versions": {
"slack": [
"1.2.0",
"1.3.1"
],
"hubspot": [
"*"
]
},
"top_k": 100,
"min_similarity": 0.2
}
'import requests
url = "https://api.stackone.com/actions/search"
payload = {
"query": "send a message",
"connector": "slack",
"connector_versions": {
"slack": ["1.2.0", "1.3.1"],
"hubspot": ["*"]
},
"top_k": 100,
"min_similarity": 0.2
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
query: 'send a message',
connector: 'slack',
connector_versions: {slack: ['1.2.0', '1.3.1'], hubspot: ['*']},
top_k: 100,
min_similarity: 0.2
})
};
fetch('https://api.stackone.com/actions/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.stackone.com/actions/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'query' => 'send a message',
'connector' => 'slack',
'connector_versions' => [
'slack' => [
'1.2.0',
'1.3.1'
],
'hubspot' => [
'*'
]
],
'top_k' => 100,
'min_similarity' => 0.2
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.stackone.com/actions/search"
payload := strings.NewReader("{\n \"query\": \"send a message\",\n \"connector\": \"slack\",\n \"connector_versions\": {\n \"slack\": [\n \"1.2.0\",\n \"1.3.1\"\n ],\n \"hubspot\": [\n \"*\"\n ]\n },\n \"top_k\": 100,\n \"min_similarity\": 0.2\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.stackone.com/actions/search")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"send a message\",\n \"connector\": \"slack\",\n \"connector_versions\": {\n \"slack\": [\n \"1.2.0\",\n \"1.3.1\"\n ],\n \"hubspot\": [\n \"*\"\n ]\n },\n \"top_k\": 100,\n \"min_similarity\": 0.2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stackone.com/actions/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"send a message\",\n \"connector\": \"slack\",\n \"connector_versions\": {\n \"slack\": [\n \"1.2.0\",\n \"1.3.1\"\n ],\n \"hubspot\": [\n \"*\"\n ]\n },\n \"top_k\": 100,\n \"min_similarity\": 0.2\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"id": "slack_1.0.0_slack_send_message_global",
"similarity_score": 123,
"prerequisite_actions": [
"<string>"
]
}
],
"total_count": 123,
"query": "<string>",
"connector_filter": "<string>",
"project_filter": "<string>",
"returned_by_connector": {
"slack": 7,
"hubspot": 0
},
"truncated": false
}{
"statusCode": 400,
"message": "Bad Request",
"timestamp": "2023-05-30T00:00:00.000Z",
"data": {
"statusCode": 400,
"message": "Bad Request",
"headers": {
"content-type": "application/json",
"x-request-id": "5678c28b211dace4e0a0f9171e6b88c5"
}
},
"provider_errors": [
{
"status": 400,
"url": "https://api.provider.com/v1/resource",
"raw": {
"message": "Invalid input parameters"
},
"headers": {
"content-type": "application/json",
"x-request-id": "5678c28b211dace4e0a0f9171e6b88c5"
}
}
]
}{
"statusCode": 401,
"message": "Unauthorized",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 403,
"message": "Forbidden resource",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 404,
"message": "Not Found",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 408,
"message": "Request timed out",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 409,
"message": "Conflict",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 422,
"message": "Unprocessable Entity",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 429,
"message": "Too many requests",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 500,
"message": "Internal server error",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 501,
"message": "Not Implemented",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 502,
"message": "Bad Gateway",
"timestamp": "2023-05-30T00:00:00.000Z"
}Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Body
Search query for finding connector actions
"send a message"
Filter by connector key, at any version. Shorthand for connector_versions: { "<key>": ["*"] }, which takes priority when both are sent.
"slack"
Connector versions to search, keyed by connector key. Takes priority over connector. At most 100 connector keys and 500 versions in total. latest is not accepted — pass resolved versions such as 1.2.0, or * for any version of that connector. * cannot be mixed with explicit versions in the same list. Explicit versions are returned as-is; * is deduplicated to the highest semver per action, and one map may mix the two forms across connectors.
Show child attributes
Show child attributes
{
"slack": ["1.2.0", "1.3.1"],
"hubspot": ["*"]
}
Number of results to return
1 <= x <= 500Minimum similarity score threshold (0-1). Results below this score are filtered out.
0 <= x <= 10.2
Response
Search results
Show child attributes
Show child attributes
Total number of results returned
Original search query
Connector filter applied
Project filter applied
Per connector key, the number of rows returned in this result window, seeded to 0 for every connector key the caller asked for. This is a window count, not a match count: read 0 as "not indexed yet" only when truncated is false, since a full window can crowd out a connector that is fully indexed.
Show child attributes
Show child attributes
{ "slack": 7, "hubspot": 0 }
Whether the vector store filled the entire top_k budget, so results were cut off.
false
Was this page helpful?