POST
/
graphs
/
{owner}
/
{name}
/
tuples
JavaScript
import Tractorbeam from 'tractorbeam';

const client = new Tractorbeam({
  apiToken: process.env['TRACTORBEAM_API_TOKEN'], // This is the default and can be omitted
});

async function main() {
  const response = await client.graphs.addTuples('graph-owner', 'graph-name', {
    tuples: [{ object: 'Company1', predicate: 'worksAt', subject: 'Person1' }],
  });

  console.log(response.inserted);
}

main();
{
  "inserted": 10
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

owner
string
required

Graph owner

name
string
required

Graph name

Body

application/json

Response

201 - application/json

Tuples inserted successfully

The response is of type object.