import requests
url = "https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/imported-object-extractors/"
payload = {
"name": "CRM contacts",
"brief": "Contacts imported nightly from Salesforce.",
"extractable_pydantic_class": "from pydantic import BaseModel
class ImportedRecord(BaseModel):
external_id: str
payload: dict
"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'CRM contacts',
brief: 'Contacts imported nightly from Salesforce.',
extractable_pydantic_class: 'from pydantic import BaseModel\n\nclass ImportedRecord(BaseModel):\n external_id: str\n payload: dict\n'
})
};
fetch('https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/imported-object-extractors/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/imported-object-extractors/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "CRM contacts",
"brief": "Contacts imported nightly from Salesforce.",
"extractable_pydantic_class": "from pydantic import BaseModel\n\nclass ImportedRecord(BaseModel):\n external_id: str\n payload: dict\n"
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "CRM contacts",
"brief": "Contacts imported nightly from Salesforce.",
"extractable_pydantic_class": "from pydantic import BaseModel\n\nclass ImportedRecord(BaseModel):\n external_id: str\n payload: dict\n",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"imported_objects_table": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"versions": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"is_default": true,
"extractable_pydantic_class": "from pydantic import BaseModel\n\nclass ImportedRecord(BaseModel):\n external_id: str\n payload: dict\n",
"last_import_status": "<string>"
}
],
"default_version": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"is_default": true,
"extractable_pydantic_class": "from pydantic import BaseModel\n\nclass ImportedRecord(BaseModel):\n external_id: str\n payload: dict\n",
"last_import_status": "<string>"
},
"latest_version": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"is_default": true,
"extractable_pydantic_class": "from pydantic import BaseModel\n\nclass ImportedRecord(BaseModel):\n external_id: str\n payload: dict\n",
"last_import_status": "<string>"
}
}{
"error": "User not found"
}{
"error": "Authentication credentials were not provided."
}{
"error": "You do not have permission to perform this action."
}Create imported object extractor
Create an ImportedObjectExtractor — holds objects imported from an
external system (rather than extracted by an LLM).
import requests
url = "https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/imported-object-extractors/"
payload = {
"name": "CRM contacts",
"brief": "Contacts imported nightly from Salesforce.",
"extractable_pydantic_class": "from pydantic import BaseModel
class ImportedRecord(BaseModel):
external_id: str
payload: dict
"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'CRM contacts',
brief: 'Contacts imported nightly from Salesforce.',
extractable_pydantic_class: 'from pydantic import BaseModel\n\nclass ImportedRecord(BaseModel):\n external_id: str\n payload: dict\n'
})
};
fetch('https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/imported-object-extractors/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/imported-object-extractors/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "CRM contacts",
"brief": "Contacts imported nightly from Salesforce.",
"extractable_pydantic_class": "from pydantic import BaseModel\n\nclass ImportedRecord(BaseModel):\n external_id: str\n payload: dict\n"
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "CRM contacts",
"brief": "Contacts imported nightly from Salesforce.",
"extractable_pydantic_class": "from pydantic import BaseModel\n\nclass ImportedRecord(BaseModel):\n external_id: str\n payload: dict\n",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"imported_objects_table": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"versions": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"is_default": true,
"extractable_pydantic_class": "from pydantic import BaseModel\n\nclass ImportedRecord(BaseModel):\n external_id: str\n payload: dict\n",
"last_import_status": "<string>"
}
],
"default_version": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"is_default": true,
"extractable_pydantic_class": "from pydantic import BaseModel\n\nclass ImportedRecord(BaseModel):\n external_id: str\n payload: dict\n",
"last_import_status": "<string>"
},
"latest_version": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"is_default": true,
"extractable_pydantic_class": "from pydantic import BaseModel\n\nclass ImportedRecord(BaseModel):\n external_id: str\n payload: dict\n",
"last_import_status": "<string>"
}
}{
"error": "User not found"
}{
"error": "Authentication credentials were not provided."
}{
"error": "You do not have permission to perform this action."
}Authorizations
Use Authorization: Bearer
Path Parameters
UUID of the project
Body
Holds objects imported from an external system (rather than extracted by an LLM). Useful for hydrating the warehouse with data produced outside the platform.
Response
Created
Holds objects imported from an external system (rather than extracted by an LLM). Useful for hydrating the warehouse with data produced outside the platform.
"CRM contacts"
"Contacts imported nightly from Salesforce."
"from pydantic import BaseModel\n\nclass ImportedRecord(BaseModel):\n external_id: str\n payload: dict\n"
Show child attributes
Show child attributes
Immutable snapshot of an ImportedObjectExtractor's version-bearing configuration.
Show child attributes
Show child attributes
Immutable snapshot of an ImportedObjectExtractor's version-bearing configuration.
Show child attributes
Show child attributes