Retrieve an index stage
import requests
url = "https://{FUSION HOST}/api/index-stages/schema/{type}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)HttpResponse<String> response = Unirest.get("https://{FUSION HOST}/api/index-stages/schema/{type}")
.header("Authorization", "Basic <encoded-value>")
.asString();const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://{FUSION HOST}/api/index-stages/schema/{type}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));require 'uri'
require 'net/http'
url = URI("https://{FUSION HOST}/api/index-stages/schema/{type}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_bodypackage main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{FUSION HOST}/api/index-stages/schema/{type}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{FUSION HOST}/api/index-stages/schema/{type}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}curl --request GET \
--url https://{FUSION HOST}/api/index-stages/schema/{type} \
--header 'Authorization: Basic <encoded-value>'{
"type": "object",
"title": "Regex Field Extraction",
"description": "This stage allows you to extract entities using regular expressions",
"properties": {
"rules": {
"type": "array",
"title": "Regex Rules",
"items": {
"type": "object",
"required": [
"pattern"
],
"properties": {
"source": {
"type": "array",
"title": "Source Fields",
"items": {
"type": "string"
}
},
"target": {
"type": "string",
"title": "Target Field"
},
"pattern": {
"type": "string",
"title": "Regex Pattern",
"format": "regex"
},
"annotateAs": {
"type": "string",
"title": "Annotation Name"
}
}
}
}
}
}Retrieve an index stage
Fetch an index stage by type. The response is the index stage schema in JSON format.
GET
/
index-stages
/
schema
/
{type}
Retrieve an index stage
import requests
url = "https://{FUSION HOST}/api/index-stages/schema/{type}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)HttpResponse<String> response = Unirest.get("https://{FUSION HOST}/api/index-stages/schema/{type}")
.header("Authorization", "Basic <encoded-value>")
.asString();const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://{FUSION HOST}/api/index-stages/schema/{type}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));require 'uri'
require 'net/http'
url = URI("https://{FUSION HOST}/api/index-stages/schema/{type}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_bodypackage main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{FUSION HOST}/api/index-stages/schema/{type}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{FUSION HOST}/api/index-stages/schema/{type}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}curl --request GET \
--url https://{FUSION HOST}/api/index-stages/schema/{type} \
--header 'Authorization: Basic <encoded-value>'{
"type": "object",
"title": "Regex Field Extraction",
"description": "This stage allows you to extract entities using regular expressions",
"properties": {
"rules": {
"type": "array",
"title": "Regex Rules",
"items": {
"type": "object",
"required": [
"pattern"
],
"properties": {
"source": {
"type": "array",
"title": "Source Fields",
"items": {
"type": "string"
}
},
"target": {
"type": "string",
"title": "Target Field"
},
"pattern": {
"type": "string",
"title": "Regex Pattern",
"format": "regex"
},
"annotateAs": {
"type": "string",
"title": "Annotation Name"
}
}
}
}
}
}Authorizations
Basic authAPI key
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Path Parameters
The name of the index stage.
Response
200 - application/json
OK
Configuration properties.
Available options:
string, number, integer, boolean, object, array, null, ref Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?
⌘I