SynapSynapDocs
Hub REST API

Import

The Import operations of the Hub REST API (4 operations).

For BuildersOpen-source podSynap CloudGenerated from Synap-core/backend@c31e261ab (main)
POST
/import/analyze

Authorization

bearerAuth
headerAuthorizationBearer <API key>

Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.

Request Body

application/json
  1. body
userId*string
Length1 <= length
workspaceId?string
Formatuuid
source*string
Value in"obsidian""markdown""csv""bookmark"
relationType?string
Length1 <= length <= 64
aiStructure?boolean
Defaultfalse
items*array<>
Items1 <= items <= 2000
sessionId?string
Formatuuid
projectId?|
Formatuuid
forceSession?boolean
previewOnly?boolean

Response Body

Operations + proposalId for preview-before-apply

application/json
  1. response
[key: string]?unknown
Example Request
curl -X POST 'https://pod.example.com/api/hub/import/analyze' \  -H 'Content-Type: application/json' \  -d '{  "userId": "string",  "source": "obsidian",  "items": [    {      "path": "string",      "content": "string"    }  ]}'
Example Response
{  "property1": null,  "property2": null}
POST
/import/apply

Authorization

bearerAuth
headerAuthorizationBearer <API key>

Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.

Request Body

application/json
  1. body
userId*string
Length1 <= length
workspaceId?string
Formatuuid
source*string
Value in"obsidian""markdown""csv""bookmark"
operations?array<>
Itemsitems <= 8000
sessionId?string
Formatuuid
projectId?|
Formatuuid
idempotencyKey?string
Lengthlength <= 200
proposalId?string
Formatuuid

Response Body

Created + linked counts

application/json
  1. response
[key: string]?unknown
Example Request
curl -X POST 'https://pod.example.com/api/hub/import/apply' \  -H 'Content-Type: application/json' \  -d '{  "userId": "string",  "source": "obsidian"}'
Example Response
{  "property1": null,  "property2": null}
POST
/import/enqueue-corpus

Authorization

bearerAuth
headerAuthorizationBearer <API key>

Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.

Request Body

application/json
  1. body
workspaceId?string
Formatuuid
source*string
Value in"obsidian""markdown""csv""bookmark"
items*array<>
Items1 <= items <= 4000
relationType?string
Length1 <= length <= 64
aiStructure?boolean
Defaultfalse
sessionId?string
Formatuuid
projectId?|
Formatuuid
forceSession?boolean
playbookId?string
Formatuuid
playbookParams?
previewOnly?boolean
userId?string
Length1 <= length

Response Body

Corpus queued

application/json
  1. response
queued*true
Value intrue
jobId*string|null
itemCount*number
workspaceId*string|null
Example Request
curl -X POST 'https://pod.example.com/api/hub/import/enqueue-corpus' \  -H 'Content-Type: application/json' \  -d '{  "source": "obsidian",  "items": [    {      "path": "string",      "content": "string"    }  ]}'
Example Response
{  "queued": true,  "jobId": "string",  "itemCount": 0,  "workspaceId": "string"}
GET
/import/corpus-job/{jobId}

Authorization

bearerAuth
headerAuthorizationBearer <API key>

Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.

Path Parameters

jobId*string
Match^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i
Formatuuid

Response Body

Job state

application/json
  1. response
jobId*string
state*string
createdOn*string||null
completedOn*string||null
output*|null
Example Request
curl -X GET 'https://pod.example.com/api/hub/import/corpus-job/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
{  "jobId": "string",  "state": "string",  "createdOn": "string",  "completedOn": "string",  "output": {    "proposalId": "string",    "workspaceId": "string",    "filesProcessed": 0,    "filesFailed": 0,    "qualityScore": 0,    "findings": [      {        "id": "string",        "severity": "string",        "message": "string"      }    ]  }}