Get triples extracted from a document (project-scoped)
GET
/api/v1/projects/{projectId}/documents/{id}/triples
const url = 'https://api.yggy.tech/api/v1/projects/example/documents/example/triples';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.yggy.tech/api/v1/projects/example/documents/example/triples \ --header 'Authorization: Bearer <token>'Retrieve all triples that have been extracted from the specified document.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” projectId
required
string
id
required
string
Header Parameters
Section titled “Header Parameters ” host
string | null
x-yggy-organization-id
string | null
Responses
Section titled “ Responses ”Extracted triples
Media type application/json
object
triples
required
Array<object>
object
id
string
subject
required
string
predicate
required
string
object
required
string
subjectIdentity
object
field
required
string
value
required
string
identityUri
string
approved
boolean
subjectId
string
subjectType
string
subjectIdentityUri
string
objectId
string
objectType
string
objectIdentityUri
string
qualifiers
object
amount
string
currency
string
unit
string
location
string
confidence
number
source
string
extractionMethod
string
evidence
Array<string>
evidenceRegionId
string
note
string
created_at
string
status
string
count
required
number
Example
{ "triples": [ { "extractionMethod": "UNSTRUCTURED", "status": "ACTIVE" } ]}Document not found
Media type application/json
object
success
required
boolean
error
required
object
message
required
string
code
required
string
details
Example
{ "success": false, "error": { "code": "INTERNAL_ERROR" }}