Skip to main content
Version: 2.0

GraphGrid Publish

Platform Version 2.0

API Version 1.0

Introduction

GraphGrid Publish's main capability is taking a "snapshot" of a defined subset of graph data for the purpose of replaying into another database. It can be uploaded and stored on S3 and/or played on any bolt-enabled ONgDB environment. All endpoints that read from the graph return and/or store Geequel statement/parameter pairs and do not play the resulting CQL. Resulting CQL is order independent. Writes are performed using the single write endpoint only. Packets will divide as necessary into multi-parts of 5,000 statement/parameter pairs, appending "Part#of#" to the provided file name.

API

This Publish API version is 1.0 and as such all endpoints are rooted at /1.0/. For example, http://localhost/1.0/publish
(requires auth) would be the base context for this Publish API under the GraphGrid API deployed at http://localhost.

Environment

Publish requires the following integrations:

  • ONgDB 1.0+
  • Data set assumption: See Below

Data Set Requirements

The examples used in this documentation are from ONgDB's example "Movie Graph" dataset. If you would like to test Publish endpoints yourself, you can run :play movie graph and use the Geequel provided to create your own movie data set to follow along with.

It is important to ensure your source data is formatted correctly. Publish is designed to handle the following three cases:

1. All potentially published nodes have a single index in common. Nodes not targeted by Publish need not share a common index. Since this case requires a common index, all targeted nodes must have the same property and node label. Within mappedIndices, DEFAULT_INDEX should be set to the shared node label, and DEFAULT_ID_FIELD should be set to the shared node property name.

Click to expand example
curl --location --request POST "${API_BASE}/1.0/publish/" \
--header 'Content-Type: application/json' \
--header "Authorization: Bearer ${BEARER_TOKEN}" \
--data-raw '{
"dbUrl": "bolt://ongdb:7687",
"credentials": "Basic xxxxxxxxxxxxxxx=",
"originIds": [
"James Thompson"
],
"index": "Person",
"relationships": [
"FOLLOWS"
],
"metadata": true,
"mappedIndices": {
"Person": "name",
"DEFAULT_INDEX": "Person",
"DEFAULT_ID_FIELD": "name"
},
"protectedNodeProperties": [
"released"
],
"protectedRelationshipProperties": [
"rating"
],
"searchIdField": "Movie",
"searchFilter": "title",
"orgName": "MovieDeck",
"fileName": "test5.json",
"returnOnly": false,
"timestampProperty": "uploadedOn",
"timestampRelationships": true,
"postbackTimestamp": false,
"relationshipDeleteOnly": false,
"deleteRelationshipById": false
}'

2. All potentially published nodes have an "index" property. This node "index" property value must match a key name in mappedIndices. Besides the required defaults, each (key: value)pair inmappedIndicesshould be (<node_label>: <indexed_property>)

Click to expand example

If you're following along using ONgDB's "Movie Graph" dataset, run this Geequel to creates two indexes, and set an index property on Person nodes.

CREATE INDEX ON :Person(name)
CREATE INDEX ON :Movie(title)
MATCH (n:Person) SET n.index = "Person" RETURN n
curl --location --request POST "${API_BASE}/1.0/publish/" \
--header 'Content-Type: application/json' \
--header "Authorization: Bearer ${BEARER_TOKEN}" \
--data-raw '{
"dbUrl": "bolt://ongdb:7687",
"credentials": "Basic xxxxxxxxxxxxxxx=",
"originIds": [
"The Matrix",
"The Matrix Reloaded",
"The Matrix Revolutions",
"The Devil'\''s Advocate"
],
"index": "Movie",
"relationships": [
"PRODUCED"
],
"metadata": true,
"mappedIndices": {
"Movie": "title",
"DEFAULT_INDEX": "Movie",
"DEFAULT_ID_FIELD": "title",
"Person": "name"
},
"protectedNodeProperties": [
"released"
],
"protectedRelationshipProperties": [
"rating"
],
"searchIdField": "title",
"searchFilter": "Movie",
"orgName": "MovieDeck",
"fileName": "test.json",
"returnOnly": false,
"timestampProperty": "uploadedOn",
"timestampRelationships": true,
"postbackTimestamp": false,
"relationshipDeleteOnly": false,
"deleteRelationshipById": false
}'

3. All potentially published nodes have an "index" property except one node type that has an id property that can be assumed using DEFAULT_INDEX and DEFAULT_ID_FIELD.

Click to expand example

If you're using the ONgDB's "Movie Graph" dataset, run these Geequel commands to create a relationship between a User and Movie node. The second command sets an index on the Movie node, and the User node will rely on its id property being assumed.

MATCH (a:User), (b:Movie)
WHERE a.name = 'Graph Master' AND b.title= 'The Matrix'
CREATE (a)-[r:LIKE]->(b)
RETURN type(r)

followed by:

MATCH (m:Movie) SET m.index = "Movie" RETURN *
curl --location --request POST "${API_BASE}/1.0/publish/" \
--header 'Content-Type: application/json' \
--header "Authorization: Bearer ${BEARER_TOKEN}" \
--data-raw '{
"dbUrl": "bolt://ongdb:7687",
"credentials": "Basic xxxxxxxxxxxxxxx=",
"originIds": [
"graphgrid"
],
"index": "User",
"relationships": [
"LIKE"
],
"metadata": true,
"mappedIndices": {
"Movie": "title",
"DEFAULT_INDEX": "User",
"DEFAULT_ID_FIELD": "username",
"User": "username"
},
"protectedNodeProperties": [
"released"
],
"protectedRelationshipProperties": [
"rating"
],
"searchIdField": "User",
"searchFilter": "username",
"orgName": "MovieDeck",
"returnOnly": true,
"timestampProperty": "uploadedOn",
"timestampRelationships": true,
"postbackTimestamp": false,
"relationshipDeleteOnly": false,
"deleteRelationshipById": false
}'

Get Status

Check the status of GraphGrid Publish. Will return a 200 OK response if healthy.

Base URL: /1.0/publish/status
Method: GET

Request

curl --location --request GET -i "${API_BASE}/1.0/publish/status" \
--header "Authorization: Bearer ${BEARER_TOKEN}"

Response

200 OK

Publish Packet Generation and Management

All endpoints that read from the graph return and/or store Geequel statement/parameter pairs and do not play the resulting CQL. Resulting CQL is order independent. Packets will divide as necessary into multi-parts of 5,000 statement/parameter pairs, appending "Part#of#" to the provided file name.

Publish Request Elements

A JSON document that defines the starting nodes and options for generating statement/parameter Geequel pairs.

Database Definition - Database information required to generate a publish packet

Information defining the origin database to be read from and the index structure of the data. All database definition fields are required.

ParameterDescription
dbURL stringThe bolt endpoint for the origin database from which the data is to be read.
credentials stringThe credentials for the origin database read in the same format as the instance's REST API ("Basic [base 64 encoded [username]:[password]]")
mappedIndices Map < string, string >Where key is the Label and value is the id property (e.g. "User":"userId"). If relevent, Key is stored in the "index" property on the node. DEFAULT_INDEX and DEFAULT_ID_FIELD are required in this map. These are the label and idField pair that can be assumed if no "index" property exists. (e.g. "DEFAULT_INDEX":"Resource","DEFAULT_ID_FIELD":"grn")

Publish Options - Optional further definition to refine packet results

Defines the nodes and/or edges to be published, which properties to publish, etc.

ParameterDescription
index stringThe main index of the target nodes (must correspond with the property key for the originIds and the related entry/entries in the mappedIndices map).
originIds *List< string >Required if relationshipIds is empty or null or if hardFilterRelationships is true A list of the IDs of the starting set of nodes.
relationshipIds *List< string >Required if originIds is empty or null Required if metadata is false or null and relationships are empty or null
hardFilterRelationships booleanIf true, every node on either side of every relationship indicated by the relationshipIds must have its id included in originIds, otherwise the request will be rejected. (Prevents unintentional publish of nodes) Default: false
toLayer List< string >May not be provided with relationshipIds The relationship types to follow from the originIds to get to the target set of nodes and/or relationships. E.g., To publish all Movies liked by a given user (without the User or the edge between the user and the movies), the User's ID would be indicated in originIds and toLayer would be: ["LIKES"]. To publish all users that like any collections that contain a given movie, the Movie's id would be indicated in originIds and toLayer would be: ["CONTAINS", "LIKES"].
relationships *List< string >May not be provided with relationshipIds Required if metadata is false or null and relationshipIds is empty or null Required if relationshipDeleteOnly is true The type of relationships to be published.
preventCleanup booleanMay not be false with relationshipIds If true, edge cleanup statements will not be included. If false (default) a statement for each originId/relationship type pair will be generated that will remove any relationship whose type matches the relationship and whose relationship ID is not included in the set of relationship IDs from the origin database. (Note: preventCleanup and relationshipDeleteOnly cannot both be true) Default: false
relationshipIdField stringRequired if relationshipIds are included or deleteByRelationshipId is true The name of the identifying property on relationships.
metadata booleanRequired if relationshipIds AND relationships are both null/empty If true, includes statements to publish the properties from the nodes. Default: false
deleteProperties *List< string >An optional list of properties that, if they exist on a node included in publish, will have a delete statement generated for that node and will be deleted upon replay of the packet.
timestampRelationships booleanIf true, will timestamp a relationship with the property name indicated by timestampProperty. Default: false
timestampProperty stringRequired if timestampRelationships is true or postbackTimestamp is true, ignored otherwise The desired property key for timestamping a relationship, if indicated by timestampRelationships. E.g. "publishedToProd"
relationshipDeleteOnlyIf true, the packet will only contain statements to delete edges (by relationshipId) that no longer exist on the origin db. If no relationshipId will be provided, only edge types that no longer exist at all for the given originIds will be included in delete statements. (Note: preventCleanup and relationshipDeleteOnly cannot both be true Default: false
deleteRelationshipById booleanIf true, generates the delete statements by using the defined relationshipIdField property key. Otherwise, will delete by properties on the end node. Default: false
targetFilter stringA label that, if provided, will filter any nodes targeted for publish to only include those with the provided label.
protectedNodeProperties List < string >Properties on nodes that are not to be included in the metadata publish (e.g., any sort of internal-only data or environment-specific timestamps).
protectedRelationshipProperties List < string >Properties on relationships that are not to be included in the relationship publish (e.g., any sort of internal-only data or environment-specific timestamps).
dynamicLabels Map< string, list< string >>Any labels that could potentially need to be removed (i.e. temporary labels or labels that change often). The map structure follows the pattern: "MainLabel":["DynamicLabel1","TemporaryLabel2"] where MainLabel will never be removed. E.g., A data set has an ever-changing list of "Featured" movies (identified by a :Featured label). This label could be removed at any point during a weekly update. dynamicLabels would appear as follows: {"Movie":["Featured"]}. If the data maintains the previous week's featured labels with the label PreviouslyFeatured and the next week's featured with UpcomingFeatured, all 3 labels may be added or removed at any point by publish. dynamicLabels would appear as follows: {"Movie":["Featured","PreviouslyFeatured","UpcomingFeatured"]}. If the same data set had a temporary probationary period for new users identified by the label "WithinProbation" dynamicLabels would appear as follows: {"Movie":["Featured","PreviouslyFeatured","UpcomingFeatured"],"User":["WithinProbation"]}. Note: All labels are considered purely additive unless mapped within this property.

Postback Options

Optional fields for defining a sub-packet containing postback statements.

An optional postback packet can be nested within the main publish packet. This packet is a list of statement/parameter pairs that will mark nodes and (if indicated) relationships with a specified timestamp key. This postback packet is match only (introduces no non-existent nodes, relationships, or node/relationship properties other than the timestamp property itself) and will be included in the "metadata" portion of the return with the key "postback".

ParameterDescription
postbackTimestamp booleanIf true, a postback packet will be included in the result's metadata that will mark nodes and relationships (if indicated) with a timestamp with the property name indicated by timestampProperty Default: false

Storage Options

These options define whether or not and where the resulting packet (s) should be uploaded to S3.

ParameterDescription
returnOnly booleanIf true, the resulting packet will not be stored in s3. Default: false
orgName stringRequired if returnOnly is not true The name of the relevant org (or, alternately, sub directory within the publish bucket. The directory must already exist). Must not include starting or trailing slash.
fileName stringRequired if returnOnly is not true The desired name of the file. File name must not already exist in the provided directory unless forceOverwrite query param is available, included and true. Must not include starting slash.
orgName stringRequired if returnOnly is not true The name of the relevant org (or, alternately, sub directory within the publish bucket. The directory must already exist). Must not include starting or trailing slash.
fileName stringRequired if returnOnly is not true The desired name of the file. File name must not already exist in the provided directory unless forceOverwrite query param is available, included and true. Must not include starting slash.

Search Options

Options for refining what IDs are included in the metadata for future use with search integrations

If desired, additional information will be included in the metadata portion of the resulting data packet. Node ids for search indexing will be included in the "updatedIds" field while node ids for removal from search indexing will be included in the "deletedIds" field.

ParameterDescription
searchIdField stringRequired if search integration is desired The property on nodes that identifies them to search Note: missing this property will not fail validation or return errors, but will prevent search integration properties from being included in the packet.
searchFilter stringA label that, if provided, narrows down the included nodes for search integration to those bearing the indicated label.
preventSearch List< string >A list of labels that would prohibit nodes from being included in search if they contain any of the indicated labels. E.g., a graph keeps History nodes for changes and does not want these included in search indexing integration when they are published, so the History label is included in preventSearch

Response Objects

ParameterDescription
transactionRequest transactionRequestIf the endpoint generates a single TransactionRequest object, it will be returned here.
transactionRequests List < string >If the endpoint generates multiple TransactionRequest objects, they will be returned here.
fileLocation stringIf the endpoint generates and uploads a single file, it will return a URI for the uploaded file here; expiration is based on the default expiration. Default expiration (gg-prod): 86400
fileLocations List < string >If the endpoint generates and uploads more than one file, it will return a URI for each uploaded file here; expiration is based on the default expiration. Default expiration (gg-prod): 86400
fileNames List < string >If the endpoint returns file names (e.g. Get publish file names), they return here.
error stringAn error code (e.g. 400 - Bad Request) will be accompanied by a descriptive error message here.

Publish API

Create Org

Creates an organziation.

Base URL: /1.0/publish/{{orgName}}
Method: POST

Request
curl --location --request POST "${API_BASE}/1.0/publish/MovieDeck" \
--header 'Content-Type: application/json' \
--header "Authorization: Bearer ${BEARER_TOKEN}"

Create Publish Packet(s)

Generates statement/parameter CQL pairs representing the data requested by the PublishRequest definition

Base URL: /1.0/publish/
Method: POST

Request
curl --location --request POST "${API_BASE}/1.0/publish/" \
--header 'Content-Type: application/json' \
--header "Authorization: Bearer ${BEARER_TOKEN}" \
--data-raw '{
"dbUrl": "bolt://ongdb:7687",
"credentials": "Basic xxxxxxxxxxxxxxx=",
"originIds": [
"The Matrix",
"The Matrix Reloaded",
"The Matrix Revolutions",
"The Devil'\''s Advocate"
],
"index": "Movie",
"relationships": [
"PRODUCED"
],
"metadata": true,
"mappedIndices": {
"Movie": "title",
"DEFAULT_INDEX": "Movie",
"DEFAULT_ID_FIELD": "title",
"Person": "name"
},
"protectedNodeProperties": [
"released"
],
"protectedRelationshipProperties": [
"rating"
],
"searchIdField": "title",
"searchFilter": "Movie",
"orgName": "MovieDeck",
"fileName": "test.json",
"returnOnly": false,
"timestampProperty": "uploadedOn",
"timestampRelationships": true,
"postbackTimestamp": false,
"relationshipDeleteOnly": false,
"deleteRelationshipById": false
}'

Response
{
"transactionRequest": {
"statements": [{
"statement": "MATCH (n:Movie) USING INDEX n:Movie(title) WHERE n.title = {baseId} WITH n MATCH (n)-[r:PRODUCED]-(o) WHERE (NOT EXISTS (o.name) OR NOT o.name IN {ids_0}) DELETE r;",
"parameters": {
"baseId": "The Matrix Revolutions",
"ids_0": [
"Joel Silver"
]
},
"metadata": null
},
{
"statement": "MATCH (n:Movie) USING INDEX n:Movie(title) WHERE n.title = {baseId} WITH n MATCH (n)-[r:PRODUCED]-(o) DELETE r;",
"parameters": {
"baseId": "The Devil's Advocate"
},
"metadata": null
},
{
"statement": "MATCH (n:Movie) USING INDEX n:Movie(title) WHERE n.title = {baseId} WITH n MATCH (n)-[r:PRODUCED]-(o) WHERE (NOT EXISTS (o.name) OR NOT o.name IN {ids_0}) DELETE r;",
"parameters": {
"baseId": "The Matrix",
"ids_0": [
"Joel Silver"
]
},
"metadata": null
},
{
"statement": "MATCH (n:Movie) USING INDEX n:Movie(title) WHERE n.title = {baseId} WITH n MATCH (n)-[r:PRODUCED]-(o) WHERE (NOT EXISTS (o.name) OR NOT o.name IN {ids_0}) DELETE r;",
"parameters": {
"baseId": "The Matrix Reloaded",
"ids_0": [
"Joel Silver"
]
},
"metadata": null
},
{
"statement": "MERGE (a:Person {name: {a_id}}) WITH a MERGE (b:Movie {title: {b_id}}) WITH a, b MERGE (a)-[r:PRODUCED]->(b) SET r = {uploadedOn: {uploadedOn}, createdAt: {createdAt}, grn: {grn}, updatedAt: {updatedAt}};",
"parameters": {
"createdAt": "2021-02-11T16:21:22+00:00",
"grn": "grn:gg:produced:pV2lbwEi02Y5DBsZmmPMubB8eHF0y5rRudPXbHTrjKZO",
"a_id": "Joel Silver",
"b_id": "The Matrix Revolutions",
"uploadedOn": 1613070716261,
"updatedAt": "2021-02-11T16:21:22+00:00"
},
"metadata": null
},
{
"statement": "MERGE (a:Person {name: {a_id}}) WITH a MERGE (b:Movie {title: {b_id}}) WITH a, b MERGE (a)-[r:PRODUCED]->(b) SET r = {uploadedOn: {uploadedOn}, createdAt: {createdAt}, grn: {grn}, updatedAt: {updatedAt}};",
"parameters": {
"createdAt": "2021-02-11T16:21:22+00:00",
"grn": "grn:gg:produced:nSUBGvDJFxSlcAe9Y55mnG6ce99EaMbJ9wTZtHm6gQrP",
"a_id": "Joel Silver",
"b_id": "The Matrix Reloaded",
"uploadedOn": 1613070716261,
"updatedAt": "2021-02-11T16:21:22+00:00"
},
"metadata": null
},
{
"statement": "MERGE (a:Person {name: {a_id}}) WITH a MERGE (b:Movie {title: {b_id}}) WITH a, b MERGE (a)-[r:PRODUCED]->(b) SET r = {uploadedOn: {uploadedOn}, createdAt: {createdAt}, grn: {grn}, updatedAt: {updatedAt}};",
"parameters": {
"createdAt": "2021-02-11T16:21:22+00:00",
"grn": "grn:gg:produced:AaL0o9WRAdufUX2pMjiYGVHdd5DL0GRzNXjO1VCqSlJk",
"a_id": "Joel Silver",
"b_id": "The Matrix",
"uploadedOn": 1613070716261,
"updatedAt": "2021-02-11T16:21:22+00:00"
},
"metadata": null
},
{
"statement": "MERGE (n:Person {name:{id}}) SET n:Person, n = {uploadedOn: {uploadedOn}, createdAt:{createdAt}, grn:{grn}, lastSearchIndexedAt:{lastSearchIndexedAt}, born:{born}, name:{name}, index:{index}, updatedAt:{updatedAt}};",
"parameters": {
"createdAt": "2021-02-11T16:21:22+00:00",
"grn": "grn:gg:person:ZKk2qpIJg5e6wn78eIalCd8G23IAt3TYt1LcanhHiIag",
"uploadedOn": 1613070716261,
"lastSearchIndexedAt": "0",
"born": 1952,
"name": "Joel Silver",
"index": "Person",
"id": "Joel Silver",
"updatedAt": "2021-02-11T16:21:22+00:00"
},
"metadata": null
},
{
"statement": "MERGE (n:Movie {title:{id}}) SET n:Movie, n = {uploadedOn: {uploadedOn}, createdAt:{createdAt}, grn:{grn}, lastSearchIndexedAt:{lastSearchIndexedAt}, tagline:{tagline}, title:{title}, updatedAt:{updatedAt}};",
"parameters": {
"createdAt": "2021-02-11T16:21:22+00:00",
"grn": "grn:gg:movie:KExxncNzLH9kcaUJm3MtWmVULzPwcPUVfjJp9vyM7v4U",
"uploadedOn": 1613070716261,
"lastSearchIndexedAt": "0",
"tagline": "Free your mind",
"id": "The Matrix Reloaded",
"title": "The Matrix Reloaded",
"updatedAt": "2021-02-11T16:21:22+00:00"
},
"metadata": null
},
{
"statement": "MERGE (n:Movie {title:{id}}) SET n:Movie, n = {uploadedOn: {uploadedOn}, createdAt:{createdAt}, grn:{grn}, lastSearchIndexedAt:{lastSearchIndexedAt}, tagline:{tagline}, title:{title}, updatedAt:{updatedAt}};",
"parameters": {
"createdAt": "2021-02-11T16:21:22+00:00",
"grn": "grn:gg:movie:94T7mRUQ4lYWfyUTypJ2hOjerhOwBD9S9c63baYXi9DW",
"uploadedOn": 1613070716261,
"lastSearchIndexedAt": "0",
"tagline": "Evil has its winning ways",
"id": "The Devil's Advocate",
"title": "The Devil's Advocate",
"updatedAt": "2021-02-11T16:21:22+00:00"
},
"metadata": null
},
{
"statement": "MERGE (n:Movie {title:{id}}) SET n:Movie, n = {uploadedOn: {uploadedOn}, createdAt:{createdAt}, grn:{grn}, lastSearchIndexedAt:{lastSearchIndexedAt}, tagline:{tagline}, title:{title}, updatedAt:{updatedAt}};",
"parameters": {
"createdAt": "2021-02-11T16:21:22+00:00",
"grn": "grn:gg:movie:T2u04XXRkNnJXHLDqjYTkdyWgwx1C8HW04ERgHD1gQW5",
"uploadedOn": 1613070716261,
"lastSearchIndexedAt": "0",
"tagline": "Welcome to the Real World",
"id": "The Matrix",
"title": "The Matrix",
"updatedAt": "2021-02-11T16:21:22+00:00"
},
"metadata": null
},
{
"statement": "MERGE (n:Movie {title:{id}}) SET n:Movie, n = {uploadedOn: {uploadedOn}, createdAt:{createdAt}, grn:{grn}, lastSearchIndexedAt:{lastSearchIndexedAt}, tagline:{tagline}, title:{title}, updatedAt:{updatedAt}};",
"parameters": {
"createdAt": "2021-02-11T16:21:22+00:00",
"grn": "grn:gg:movie:w1CEgSjlX2qdvUUB175aBYYIOQ7lJVwiK64qWXNtCDRN",
"uploadedOn": 1613070716261,
"lastSearchIndexedAt": "0",
"tagline": "Everything that has a beginning has an end",
"id": "The Matrix Revolutions",
"title": "The Matrix Revolutions",
"updatedAt": "2021-02-11T16:21:22+00:00"
},
"metadata": {
"qa": {
"mappedIndices": {
"Movie": "title",
"DEFAULT_INDEX": "Movie",
"DEFAULT_ID_FIELD": "title",
"Person": "name"
},
"relationshipIdField": null,
"relationships": null,
"nodes": {
"name": {
"Joel Silver": [
"createdAt",
"grn",
"uploadedOn",
"lastSearchIndexedAt",
"born",
"name",
"index",
"updatedAt"
]
},
"title": {
"The Matrix": [
...
],
"The Matrix Revolutions": [
...
],
"The Matrix Reloaded": [
...
],
"The Devil's Advocate": [
...
]
}
}
},
"updatedIds": [
"The Matrix",
"The Matrix Revolutions",
"The Matrix Reloaded",
"The Devil's Advocate"
]
}
}
]
},
"transactionRequests": null,
"fileLocation": "http://minio:9000/graphgrid-test-ingest/MovieDeck/test.json?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=minio%2F20210211%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20210211T191156Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=0a217b35b89f0bb0dc96316482f199f892f696e31e575996ccdbec1117b5f19f",
"fileLocations": null,
"fileNames": null,
"error": null,
"usePrefixes": null
}

Create Publish Packet(s) via Multi Request

If you need to include more than 500 IDs in a publish, it will be rejected from the single endpoint. It should be sent here, with sub-requests of 500 IDs or less. This endpoint can also be used to send multiple different requests at the same time (e.g., one request for Movie metadata, one for Person metadata, and one for the PRODUCER relationships between them).

Base URL: /1.0/publish/multi?batchsize={{batchSize}}&forceOverwrite={{forceOverwrite}}
Method: POST

ParameterDescription
batchSizeThe number of statement/parameter pairs to include in each packet. Default: 5000
forceOverwriteWhether or not to block uploading file names that already exist. If true, will upload and overwrite any existing packet with the same filename. Default: false
Request
curl --location --request POST "${API_BASE}/1.0/publish/multi" \
--header 'Content-Type: application/json' \
--header "Authorization: Bearer ${BEARER_TOKEN}" \
--data-raw '[{
"dbUrl": "bolt://ongdb:7687",
"credentials": "Basic xxxxxxxxxxxxxxx=",
"originIds": [
"James Thompson"
],
"index": "Person",
"relationships": [
"FOLLOWS"
],
"metadata": true,
"mappedIndices": {
"Person": "name",
"DEFAULT_INDEX": "Person",
"DEFAULT_ID_FIELD": "name"
},
"protectedNodeProperties": [
"released"
],
"protectedRelationshipProperties": [
"rating"
],
"searchIdField": "Movie",
"searchFilter": "title",
"orgName": "MovieDeck",
"fileName": "test5.json",
"returnOnly": false,
"timestampProperty": "uploadedOn",
"timestampRelationships": true,
"postbackTimestamp": false,
"relationshipDeleteOnly": false,
"deleteRelationshipById": false
},
{
"dbUrl": "bolt://ongdb:7687",
"credentials": "Basic xxxxxxxxxxxxxxx=",
"originIds": [
"The Matrix",
"The Matrix Reloaded",
"The Matrix Revolutions",
"The Devil'\''s Advocate"
],
"index": "Movie",
"relationships": [
"PRODUCED"
],
"metadata": true,
"mappedIndices": {
"Movie": "title",
"DEFAULT_INDEX": "Movie",
"DEFAULT_ID_FIELD": "title",
"Person": "name"
},
"protectedNodeProperties": [
"released"
],
"protectedRelationshipProperties": [
"rating"
],
"searchIdField": "title",
"searchFilter": "Movie",
"orgName": "MovieDeck",
"fileName": "test.json",
"returnOnly": false,
"timestampProperty": "uploadedOn",
"timestampRelationships": true,
"postbackTimestamp": false,
"relationshipDeleteOnly": false,
"deleteRelationshipById": false
},
{
"dbUrl": "bolt://ongdb:7687",
"credentials": "Basic xxxxxxxxxxxxxxx=",
"originIds": [
"graphgrid"
],
"index": "User",
"relationships": [
"LIKE"
],
"metadata": true,
"mappedIndices": {
"Movie": "title",
"DEFAULT_INDEX": "User",
"DEFAULT_ID_FIELD": "username",
"User": "username"
},
"protectedNodeProperties": [
"released"
],
"protectedRelationshipProperties": [
"rating"
],
"searchIdField": "User",
"searchFilter": "username",
"orgName": "MovieDeck",
"returnOnly": true,
"timestampProperty": "uploadedOn",
"timestampRelationships": true,
"postbackTimestamp": false,
"relationshipDeleteOnly": false,
"deleteRelationshipById": false
}
]'
Response
{{
"transactionRequest": {
"statements": [
{
"statement": "MATCH (n:Movie) USING INDEX n:Movie(title) WHERE n.title = {baseId} WITH n MATCH (n)-[r:PRODUCED]-(o) WHERE (NOT EXISTS (o.name) OR NOT o.name IN {ids_0}) DELETE r;",
"parameters": {
"baseId": "The Matrix",
"ids_0": [
"Joel Silver"
]
},
"metadata": null
},
{
"statement": "MERGE (n:Person {name:{id}}) SET n:Person, n = {uploadedOn: {uploadedOn}, createdAt:{createdAt}, grn:{grn}, lastSearchIndexedAt:{lastSearchIndexedAt}, name:{name}, index:{index}, updatedAt:{updatedAt}};",
"parameters": {
"createdAt": "2021-02-11T16:21:22+00:00",
"grn": "grn:gg:person:gY6H5PonUCQKwxfiebS6cpD8NK1X7gmvTF8IPF7YJdo5",
"uploadedOn": 1613160834145,
"lastSearchIndexedAt": "0",
"name": "Jessica Thompson",
"index": "Person",
"id": "Jessica Thompson",
"updatedAt": "2021-02-11T16:21:22+00:00"
},
"metadata": null
},
{
"statement": "MERGE (a:Person {name: {a_id}}) WITH a MERGE (b:Movie {title: {b_id}}) WITH a, b MERGE (a)-[r:PRODUCED]->(b) SET r = {uploadedOn: {uploadedOn}, createdAt: {createdAt}, grn: {grn}, updatedAt: {updatedAt}};",
"parameters": {
"createdAt": "2021-02-11T16:21:22+00:00",
"grn": "grn:gg:produced:nSUBGvDJFxSlcAe9Y55mnG6ce99EaMbJ9wTZtHm6gQrP",
"a_id": "Joel Silver",
"b_id": "The Matrix Reloaded",
"uploadedOn": 1613160834156,
"updatedAt": "2021-02-11T16:21:22+00:00"
},
"metadata": null
},
{
"statement": "MERGE (n:Movie {title:{id}}) SET n:Movie, n = {uploadedOn: {uploadedOn}, createdAt:{createdAt}, grn:{grn}, lastSearchIndexedAt:{lastSearchIndexedAt}, tagline:{tagline}, index:{index}, title:{title}, updatedAt:{updatedAt}};",
"parameters": {
"createdAt": "2021-02-11T16:21:22+00:00",
"grn": "grn:gg:movie:KExxncNzLH9kcaUJm3MtWmVULzPwcPUVfjJp9vyM7v4U",
"uploadedOn": 1613160834156,
"lastSearchIndexedAt": "0",
"tagline": "Free your mind",
"index": "Movie",
"id": "The Matrix Reloaded",
"title": "The Matrix Reloaded",
"updatedAt": "2021-02-11T16:21:22+00:00"
},
"metadata": null
},
{
"statement": "MATCH (n:Movie) USING INDEX n:Movie(title) WHERE n.title = {baseId} WITH n MATCH (n)-[r:PRODUCED]-(o) DELETE r;",
"parameters": {
"baseId": "The Devil's Advocate"
},
"metadata": null
},
{
"statement": "MERGE (n:Movie {title:{id}}) SET n:Movie, n = {uploadedOn: {uploadedOn}, createdAt:{createdAt}, grn:{grn}, lastSearchIndexedAt:{lastSearchIndexedAt}, tagline:{tagline}, index:{index}, title:{title}, updatedAt:{updatedAt}};",
"parameters": {
"createdAt": "2021-02-11T16:21:22+00:00",
"grn": "grn:gg:movie:94T7mRUQ4lYWfyUTypJ2hOjerhOwBD9S9c63baYXi9DW",
"uploadedOn": 1613160834156,
"lastSearchIndexedAt": "0",
"tagline": "Evil has its winning ways",
"index": "Movie",
"id": "The Devil's Advocate",
"title": "The Devil's Advocate",
"updatedAt": "2021-02-11T16:21:22+00:00"
},
"metadata": null
},
{
"statement": "MERGE (n:Person {name:{id}}) SET n:Person, n = {uploadedOn: {uploadedOn}, createdAt:{createdAt}, grn:{grn}, lastSearchIndexedAt:{lastSearchIndexedAt}, born:{born}, name:{name}, index:{index}, updatedAt:{updatedAt}};",
"parameters": {
"createdAt": "2021-02-11T16:21:22+00:00",
"grn": "grn:gg:person:ZKk2qpIJg5e6wn78eIalCd8G23IAt3TYt1LcanhHiIag",
"uploadedOn": 1613160834156,
"lastSearchIndexedAt": "0",
"born": 1952,
"name": "Joel Silver",
"index": "Person",
"id": "Joel Silver",
"updatedAt": "2021-02-11T16:21:22+00:00"
},
"metadata": null
},
{
"statement": "MERGE (a:User {username: {a_id}}) WITH a MERGE (b:Movie {title: {b_id}}) WITH a, b MERGE (a)-[r:LIKE]->(b) SET r = {uploadedOn: {uploadedOn}, createdAt: {createdAt}, grn: {grn}, updatedAt: {updatedAt}};",
"parameters": {
"createdAt": "2021-02-12T17:54:06+00:00",
"grn": "grn:gg:like:XfWFDlMTmbpjTXKMflw9Rojisg7mVmlc9kQ2PzlMwvyt",
"a_id": "graphgrid",
"b_id": "The Matrix",
"uploadedOn": 1613160834175,
"updatedAt": "2021-02-12T17:54:06+00:00"
},
"metadata": null
},
{
"statement": "MERGE (a:User {username: {a_id}}) WITH a MERGE (b:Movie {title: {b_id}}) WITH a, b MERGE (a)-[r:LIKE]->(b) SET r = {uploadedOn: {uploadedOn}, createdAt: {createdAt}, grn: {grn}, updatedAt: {updatedAt}};",
"parameters": {
"createdAt": "2021-02-12T18:47:56+00:00",
"grn": "grn:gg:like:fJeCejgNzi9IZNoVmMoC3J6xGmUSGdR6NDDyi6XWjZJW",
"a_id": "graphgrid",
"b_id": "The Matrix",
"uploadedOn": 1613160834175,
"updatedAt": "2021-02-12T18:47:56+00:00"
},
"metadata": null
},
{
"statement": "MATCH (n:Person) USING INDEX n:Person(name) WHERE n.name = {baseId} WITH n MATCH (n)-[r:FOLLOWS]-(o) WHERE (NOT EXISTS (o.name) OR NOT o.name IN {ids_0}) DELETE r;",
"parameters": {
"baseId": "James Thompson",
"ids_0": [
"Jessica Thompson"
]
},
"metadata": null
},
{
"statement": "MERGE (a:Person {name: {a_id}}) WITH a MERGE (b:Movie {title: {b_id}}) WITH a, b MERGE (a)-[r:PRODUCED]->(b) SET r = {uploadedOn: {uploadedOn}, createdAt: {createdAt}, grn: {grn}, updatedAt: {updatedAt}};",
"parameters": {
"createdAt": "2021-02-11T16:21:22+00:00",
"grn": "grn:gg:produced:AaL0o9WRAdufUX2pMjiYGVHdd5DL0GRzNXjO1VCqSlJk",
"a_id": "Joel Silver",
"b_id": "The Matrix",
"uploadedOn": 1613160834156,
"updatedAt": "2021-02-11T16:21:22+00:00"
},
"metadata": null
},
{
"statement": "MERGE (a:Person {name: {a_id}}) WITH a MERGE (b:Movie {title: {b_id}}) WITH a, b MERGE (a)-[r:PRODUCED]->(b) SET r = {uploadedOn: {uploadedOn}, createdAt: {createdAt}, grn: {grn}, updatedAt: {updatedAt}};",
"parameters": {
"createdAt": "2021-02-11T16:21:22+00:00",
"grn": "grn:gg:produced:pV2lbwEi02Y5DBsZmmPMubB8eHF0y5rRudPXbHTrjKZO",
"a_id": "Joel Silver",
"b_id": "The Matrix Revolutions",
"uploadedOn": 1613160834156,
"updatedAt": "2021-02-11T16:21:22+00:00"
},
"metadata": null
},
{
"statement": "MERGE (n:Movie {title:{id}}) SET n:Movie, n = {uploadedOn: {uploadedOn}, createdAt:{createdAt}, grn:{grn}, lastSearchIndexedAt:{lastSearchIndexedAt}, tagline:{tagline}, index:{index}, title:{title}, updatedAt:{updatedAt}};",
"parameters": {
"createdAt": "2021-02-11T16:21:22+00:00",
"grn": "grn:gg:movie:T2u04XXRkNnJXHLDqjYTkdyWgwx1C8HW04ERgHD1gQW5",
"uploadedOn": 1613160834156,
"lastSearchIndexedAt": "0",
"tagline": "Welcome to the Real World",
"index": "Movie",
"id": "The Matrix",
"title": "The Matrix",
"updatedAt": "2021-02-11T16:21:22+00:00"
},
"metadata": null
},
{
"statement": "MERGE (a:User {username: {a_id}}) WITH a MERGE (b:Movie {title: {b_id}}) WITH a, b MERGE (a)-[r:LIKE]->(b) SET r = {uploadedOn: {uploadedOn}, createdAt: {createdAt}, grn: {grn}, updatedAt: {updatedAt}};",
"parameters": {
"createdAt": "2021-02-12T18:03:20+00:00",
"grn": "grn:gg:like:VXEhMpH7mqa9T0CtrrZDkhEGB19X06BfQCskKc0qtrcJ",
"a_id": "graphgrid",
"b_id": "The Matrix",
"uploadedOn": 1613160834175,
"updatedAt": "2021-02-12T18:03:20+00:00"
},
"metadata": null
},
{
"statement": "MATCH (n:User) USING INDEX n:User(username) WHERE n.username = {baseId} WITH n MATCH (n)-[r:LIKE]-(o) WHERE (NOT EXISTS (o.title) OR NOT o.title IN {ids_0}) DELETE r;",
"parameters": {
"baseId": "graphgrid",
"ids_0": [
"The Matrix Revolutions",
"The Matrix",
"The Matrix",
"The Matrix"
]
},
"metadata": null
},
{
"statement": "MERGE (a:User {username: {a_id}}) WITH a MERGE (b:Movie {title: {b_id}}) WITH a, b MERGE (a)-[r:LIKE]->(b) SET r = {uploadedOn: {uploadedOn}, createdAt: {createdAt}, grn: {grn}, updatedAt: {updatedAt}};",
"parameters": {
"createdAt": "2021-02-12T18:23:23+00:00",
"grn": "grn:gg:like:9esTKVc14w22MEvqDrtvwLGsNhQvWtVLseqEUldoqQ2q",
"a_id": "graphgrid",
"b_id": "The Matrix Revolutions",
"uploadedOn": 1613160834175,
"updatedAt": "2021-02-12T18:23:23+00:00"
},
"metadata": null
},
{
"statement": "MERGE (n:Movie {title:{id}}) SET n:Movie, n = {uploadedOn: {uploadedOn}, createdAt:{createdAt}, grn:{grn}, lastSearchIndexedAt:{lastSearchIndexedAt}, index:{index}, tagline:{tagline}, title:{title}, updatedAt:{updatedAt}};",
"parameters": {
"createdAt": "2021-02-11T16:21:22+00:00",
"grn": "grn:gg:movie:w1CEgSjlX2qdvUUB175aBYYIOQ7lJVwiK64qWXNtCDRN",
"uploadedOn": 1613160834175,
"lastSearchIndexedAt": "0",
"index": "Movie",
"tagline": "Everything that has a beginning has an end",
"id": "The Matrix Revolutions",
"title": "The Matrix Revolutions",
"updatedAt": "2021-02-11T16:21:22+00:00"
},
"metadata": null
},
{
"statement": "MATCH (n:Movie) USING INDEX n:Movie(title) WHERE n.title = {baseId} WITH n MATCH (n)-[r:PRODUCED]-(o) WHERE (NOT EXISTS (o.name) OR NOT o.name IN {ids_0}) DELETE r;",
"parameters": {
"baseId": "The Matrix Reloaded",
"ids_0": [
"Joel Silver"
]
},
"metadata": null
},
{
"statement": "MERGE (a:Person {name: {a_id}}) WITH a MERGE (b:Person {name: {b_id}}) WITH a, b MERGE (a)-[r:FOLLOWS]->(b) SET r = {uploadedOn: {uploadedOn}, createdAt: {createdAt}, grn: {grn}, updatedAt: {updatedAt}};",
"parameters": {
"createdAt": "2021-02-11T16:21:22+00:00",
"grn": "grn:gg:follows:WtSMlSBmfMn0LC1IGEbyu9caIauqv2fviixc9I67kPeK",
"a_id": "James Thompson",
"b_id": "Jessica Thompson",
"uploadedOn": 1613160834145,
"updatedAt": "2021-02-11T16:21:22+00:00"
},
"metadata": null
},
{
"statement": "MATCH (n:Movie) USING INDEX n:Movie(title) WHERE n.title = {baseId} WITH n MATCH (n)-[r:PRODUCED]-(o) WHERE (NOT EXISTS (o.name) OR NOT o.name IN {ids_0}) DELETE r;",
"parameters": {
"baseId": "The Matrix Revolutions",
"ids_0": [
"Joel Silver"
]
},
"metadata": null
},
{
"statement": "MERGE (n:User {username:{id}}) SET n:Resource:User, n = {uploadedOn: {uploadedOn}, lastLogin:{lastLogin}, lastName:{lastName}, grn:{grn}, lastModifiedBy:{lastModifiedBy}, version:{version}, displayEmail:{displayEmail}, firstName:{firstName}, phoneNumber:{phoneNumber}, createdBy:{createdBy}, displayUsername:{displayUsername}, name:{name}, enver:{enver}, email:{email}, username:{username}};",
"parameters": {
"lastLogin": 1613072311990,
"lastName": "Master",
"grn": "grn:gg:user:EeTO5wqULpuk1Xr8T8JQ2VcT5075cTvAWdmpjEDXnl9W",
"lastModifiedBy": "anonymousUser",
"version": 1,
"displayEmail": "webmaster@graphgrid.com",
"firstName": "Graph",
"phoneNumber": "",
"uploadedOn": 1613160834175,
"createdBy": "anonymousUser",
"displayUsername": "graphgrid",
"name": "Graph Master",
"enver": 0,
"id": "graphgrid",
"email": "webmaster@graphgrid.com",
"username": "graphgrid"
},
"metadata": null
},
{
"statement": "MERGE (n:Movie {title:{id}}) SET n:Movie, n = {uploadedOn: {uploadedOn}, createdAt:{createdAt}, grn:{grn}, lastSearchIndexedAt:{lastSearchIndexedAt}, index:{index}, tagline:{tagline}, title:{title}, updatedAt:{updatedAt}};",
"parameters": {
"createdAt": "2021-02-11T16:21:22+00:00",
"grn": "grn:gg:movie:T2u04XXRkNnJXHLDqjYTkdyWgwx1C8HW04ERgHD1gQW5",
"uploadedOn": 1613160834175,
"lastSearchIndexedAt": "0",
"index": "Movie",
"tagline": "Welcome to the Real World",
"id": "The Matrix",
"title": "The Matrix",
"updatedAt": "2021-02-11T16:21:22+00:00"
},
"metadata": null
},
{
"statement": "MERGE (n:Person {name:{id}}) SET n:Person, n = {uploadedOn: {uploadedOn}, createdAt:{createdAt}, grn:{grn}, lastSearchIndexedAt:{lastSearchIndexedAt}, name:{name}, index:{index}, updatedAt:{updatedAt}};",
"parameters": {
"createdAt": "2021-02-11T16:21:22+00:00",
"grn": "grn:gg:person:j0dXFbEhoypi5G6yHgGUshBXdbhrz5QXXKgzwcnVw1IS",
"uploadedOn": 1613160834145,
"lastSearchIndexedAt": "0",
"name": "James Thompson",
"index": "Person",
"id": "James Thompson",
"updatedAt": "2021-02-11T16:21:22+00:00"
},
"metadata": null
},
{
"statement": "MERGE (n:Movie {title:{id}}) SET n:Movie, n = {uploadedOn: {uploadedOn}, createdAt:{createdAt}, grn:{grn}, lastSearchIndexedAt:{lastSearchIndexedAt}, tagline:{tagline}, index:{index}, title:{title}, updatedAt:{updatedAt}};",
"parameters": {
"createdAt": "2021-02-11T16:21:22+00:00",
"grn": "grn:gg:movie:w1CEgSjlX2qdvUUB175aBYYIOQ7lJVwiK64qWXNtCDRN",
"uploadedOn": 1613160834156,
"lastSearchIndexedAt": "0",
"tagline": "Everything that has a beginning has an end",
"index": "Movie",
"id": "The Matrix Revolutions",
"title": "The Matrix Revolutions",
"updatedAt": "2021-02-11T16:21:22+00:00"
},
"metadata": {
"qa": {
"mappedIndices": {
"Movie": "title",
"DEFAULT_INDEX": "User",
"DEFAULT_ID_FIELD": "username",
"User": "username"
},
"relationshipIdField": null,
"relationships": null,
"nodes": {
"name": {
"James Thompson": [
"createdAt",
"grn",
"uploadedOn",
"lastSearchIndexedAt",
"name",
"index",
"updatedAt"
],
"Joel Silver": [
"createdAt",
"grn",
"uploadedOn",
"lastSearchIndexedAt",
"born",
"name",
"index",
"updatedAt"
],
"Jessica Thompson": [
"createdAt",
"grn",
"uploadedOn",
"lastSearchIndexedAt",
"name",
"index",
"updatedAt"
]
},
"title": {
"The Matrix": [
"createdAt",
"grn",
"uploadedOn",
"lastSearchIndexedAt",
"tagline",
"index",
"title",
"updatedAt"
],
"The Matrix Revolutions": [
"createdAt",
"grn",
"uploadedOn",
"lastSearchIndexedAt",
"tagline",
"index",
"title",
"updatedAt"
],
"The Matrix Reloaded": [
"createdAt",
"grn",
"uploadedOn",
"lastSearchIndexedAt",
"tagline",
"index",
"title",
"updatedAt"
],
"The Devil's Advocate": [
"createdAt",
"grn",
"uploadedOn",
"lastSearchIndexedAt",
"tagline",
"index",
"title",
"updatedAt"
]
},
"username": {
"graphgrid": [
"lastLogin",
"lastName",
"grn",
"lastModifiedBy",
"version",
"displayEmail",
"firstName",
"phoneNumber",
"uploadedOn",
"createdBy",
"displayUsername",
"name",
"enver",
"email",
"username"
]
}
}
},
"postback": {
"statements": []
},
"deletedIds": [],
"updatedIds": [
"The Matrix",
"The Matrix Revolutions",
"The Matrix Reloaded",
"The Devil's Advocate"
]
}
}
]
},
"transactionRequests": null,
"fileLocation": "http://minio:9000/graphgrid-test-ingest/MovieDeck/test5.json?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=minio%2F20210212%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20210212T201354Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=7b9ef7fc9dd2c9df1842f6bdbab7c4d35ad20f50d93bd3cae2d6a9c6eb378ff9",
"fileLocations": null,
"fileNames": null,
"error": null,
"usePrefixes": null
}

Get File Content

Returns the statement/parameter CQL pairs stored within the packet with the given fileName.

Base URL: /1.0/publish/{{orgName}}/{{fileName}}
Method: GET

ParameterDescription
orgNameName of the org/directory of the file storage location
fileNameName of the file
Request
curl --location --request GET "${API_BASE}/1.0/publish/MovieDeck/test.json" \
--header 'Content-Type: application/json' \
--header "Authorization: Bearer ${BEARER_TOKEN}"
Response
{
"transactionRequest": {
"statements": [
{
"statement": "MATCH (n:Movie) USING INDEX n:Movie(title) WHERE n.title = {baseId} WITH n MATCH (n)-[r:PRODUCED]-(o) WHERE (NOT EXISTS (o.name) OR NOT o.name IN {ids_0}) DELETE r;",
"parameters": {
"baseId": "The Matrix Revolutions",
"ids_0": [
"Joel Silver"
]
},
"metadata": null
},
{
"statement": "MATCH (n:Movie) USING INDEX n:Movie(title) WHERE n.title = {baseId} WITH n MATCH (n)-[r:PRODUCED]-(o) DELETE r;",
"parameters": {
"baseId": "The Devil's Advocate"
},
"metadata": null
},
{
"statement": "MATCH (n:Movie) USING INDEX n:Movie(title) WHERE n.title = {baseId} WITH n MATCH (n)-[r:PRODUCED]-(o) WHERE (NOT EXISTS (o.name) OR NOT o.name IN {ids_0}) DELETE r;",
"parameters": {
"baseId": "The Matrix",
"ids_0": [
"Joel Silver"
]
},
"metadata": null
},
{
"statement": "MATCH (n:Movie) USING INDEX n:Movie(title) WHERE n.title = {baseId} WITH n MATCH (n)-[r:PRODUCED]-(o) WHERE (NOT EXISTS (o.name) OR NOT o.name IN {ids_0}) DELETE r;",
"parameters": {
"baseId": "The Matrix Reloaded",
"ids_0": [
"Joel Silver"
]
},
"metadata": null
},
{
"statement": "MERGE (a:Person {name: {a_id}}) WITH a MERGE (b:Movie {title: {b_id}}) WITH a, b MERGE (a)-[r:PRODUCED]->(b) SET r = {uploadedOn: {uploadedOn}, createdAt: {createdAt}, grn: {grn}, updatedAt: {updatedAt}};",
"parameters": {
"createdAt": "2021-02-11T16:21:22+00:00",
"grn": "grn:gg:produced:pV2lbwEi02Y5DBsZmmPMubB8eHF0y5rRudPXbHTrjKZO",
"a_id": "Joel Silver",
"b_id": "The Matrix Revolutions",
"uploadedOn": 1613077449581,
"updatedAt": "2021-02-11T16:21:22+00:00"
},
"metadata": null
},
{
"statement": "MERGE (a:Person {name: {a_id}}) WITH a MERGE (b:Movie {title: {b_id}}) WITH a, b MERGE (a)-[r:PRODUCED]->(b) SET r = {uploadedOn: {uploadedOn}, createdAt: {createdAt}, grn: {grn}, updatedAt: {updatedAt}};",
"parameters": {
"createdAt": "2021-02-11T16:21:22+00:00",
"grn": "grn:gg:produced:nSUBGvDJFxSlcAe9Y55mnG6ce99EaMbJ9wTZtHm6gQrP",
"a_id": "Joel Silver",
"b_id": "The Matrix Reloaded",
"uploadedOn": 1613077449581,
"updatedAt": "2021-02-11T16:21:22+00:00"
},
"metadata": null
},
{
"statement": "MERGE (a:Person {name: {a_id}}) WITH a MERGE (b:Movie {title: {b_id}}) WITH a, b MERGE (a)-[r:PRODUCED]->(b) SET r = {uploadedOn: {uploadedOn}, createdAt: {createdAt}, grn: {grn}, updatedAt: {updatedAt}};",
"parameters": {
"createdAt": "2021-02-11T16:21:22+00:00",
"grn": "grn:gg:produced:AaL0o9WRAdufUX2pMjiYGVHdd5DL0GRzNXjO1VCqSlJk",
"a_id": "Joel Silver",
"b_id": "The Matrix",
"uploadedOn": 1613077449581,
"updatedAt": "2021-02-11T16:21:22+00:00"
},
"metadata": null
},
{
"statement": "MERGE (n:Person {name:{id}}) SET n:Person, n = {uploadedOn: {uploadedOn}, createdAt:{createdAt}, grn:{grn}, lastSearchIndexedAt:{lastSearchIndexedAt}, born:{born}, name:{name}, index:{index}, updatedAt:{updatedAt}};",
"parameters": {
"createdAt": "2021-02-11T16:21:22+00:00",
"grn": "grn:gg:person:ZKk2qpIJg5e6wn78eIalCd8G23IAt3TYt1LcanhHiIag",
"uploadedOn": 1613077449581,
"lastSearchIndexedAt": "0",
"born": 1952,
"name": "Joel Silver",
"index": "Person",
"id": "Joel Silver",
"updatedAt": "2021-02-11T16:21:22+00:00"
},
"metadata": null
},
{
"statement": "MERGE (n:Movie {title:{id}}) SET n:Movie, n = {uploadedOn: {uploadedOn}, createdAt:{createdAt}, grn:{grn}, lastSearchIndexedAt:{lastSearchIndexedAt}, tagline:{tagline}, title:{title}, updatedAt:{updatedAt}};",
"parameters": {
"createdAt": "2021-02-11T16:21:22+00:00",
"grn": "grn:gg:movie:KExxncNzLH9kcaUJm3MtWmVULzPwcPUVfjJp9vyM7v4U",
"uploadedOn": 1613077449581,
"lastSearchIndexedAt": "0",
"tagline": "Free your mind",
"id": "The Matrix Reloaded",
"title": "The Matrix Reloaded",
"updatedAt": "2021-02-11T16:21:22+00:00"
},
"metadata": null
},
{
"statement": "MERGE (n:Movie {title:{id}}) SET n:Movie, n = {uploadedOn: {uploadedOn}, createdAt:{createdAt}, grn:{grn}, lastSearchIndexedAt:{lastSearchIndexedAt}, tagline:{tagline}, title:{title}, updatedAt:{updatedAt}};",
"parameters": {
"createdAt": "2021-02-11T16:21:22+00:00",
"grn": "grn:gg:movie:94T7mRUQ4lYWfyUTypJ2hOjerhOwBD9S9c63baYXi9DW",
"uploadedOn": 1613077449581,
"lastSearchIndexedAt": "0",
"tagline": "Evil has its winning ways",
"id": "The Devil's Advocate",
"title": "The Devil's Advocate",
"updatedAt": "2021-02-11T16:21:22+00:00"
},
"metadata": null
},
{
"statement": "MERGE (n:Movie {title:{id}}) SET n:Movie, n = {uploadedOn: {uploadedOn}, createdAt:{createdAt}, grn:{grn}, lastSearchIndexedAt:{lastSearchIndexedAt}, tagline:{tagline}, title:{title}, updatedAt:{updatedAt}};",
"parameters": {
"createdAt": "2021-02-11T16:21:22+00:00",
"grn": "grn:gg:movie:T2u04XXRkNnJXHLDqjYTkdyWgwx1C8HW04ERgHD1gQW5",
"uploadedOn": 1613077449581,
"lastSearchIndexedAt": "0",
"tagline": "Welcome to the Real World",
"id": "The Matrix",
"title": "The Matrix",
"updatedAt": "2021-02-11T16:21:22+00:00"
},
"metadata": null
},
{
"statement": "MERGE (n:Movie {title:{id}}) SET n:Movie, n = {uploadedOn: {uploadedOn}, createdAt:{createdAt}, grn:{grn}, lastSearchIndexedAt:{lastSearchIndexedAt}, tagline:{tagline}, title:{title}, updatedAt:{updatedAt}};",
"parameters": {
"createdAt": "2021-02-11T16:21:22+00:00",
"grn": "grn:gg:movie:w1CEgSjlX2qdvUUB175aBYYIOQ7lJVwiK64qWXNtCDRN",
"uploadedOn": 1613077449581,
"lastSearchIndexedAt": "0",
"tagline": "Everything that has a beginning has an end",
"id": "The Matrix Revolutions",
"title": "The Matrix Revolutions",
"updatedAt": "2021-02-11T16:21:22+00:00"
},
"metadata": {
"qa": {
"mappedIndices": {
"Movie": "title",
"DEFAULT_INDEX": "Movie",
"DEFAULT_ID_FIELD": "title",
"Person": "name"
},
"relationshipIdField": null,
"relationships": null,
"nodes": {
"name": {
"Joel Silver": [
"createdAt",
"grn",
"uploadedOn",
"lastSearchIndexedAt",
"born",
"name",
"index",
"updatedAt"
]
},
"title": {
"The Matrix": [
...
],
"The Matrix Revolutions": [
...
],
"The Matrix Reloaded": [
...
],
"The Devil's Advocate": [
...
]
}
}
},
"updatedIds": [
"The Matrix",
"The Matrix Revolutions",
"The Matrix Reloaded",
"The Devil's Advocate"
]
}
}
]
},
"transactionRequests": null,
"fileLocation": null,
"fileLocations": null,
"fileNames": null,
"error": null,
"usePrefixes": null
}

URL for Publish Packet

Generates a URL for downloading the contents of a packet with a configurable timeout.

Base URL: /1.0/publish/{{orgName}}/{{fileName}}/url?lifetime={lifetime}}
Method: GET

ParameterDescription
orgNameName of the org/directory of the file storage location
fileNameName of the file
lifetimeThe keep-alive time for the generated URL in seconds. Default: 86400 (24 hours)
Request
curl --location --request GET "${API_BASE}/1.0/publish/MovieDeck/test.json/url?lifetime=90000" \
--header "Authorization: Bearer ${BEARER_TOKEN}"
Response
{
"transactionRequest": null,
"transactionRequests": null,
"fileLocation": "http://minio:9000/graphgrid-test-ingest/MovieDeck/test.json?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=minio%2F20210212%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20210212T202830Z&X-Amz-Expires=90000&X-Amz-SignedHeaders=host&X-Amz-Signature=5c04a943c7f196249ee2fc6432be46bcbc03bdacd9a143c30a003515abdcdb14",
"fileLocations": null,
"fileNames": null,
"error": null,
"usePrefixes": null
}

Get Publish File Names

Returns the file names for the specified orgName/directory. Note: this version of get files is non-performant for larger directories; the POST version that makes use of asynchronous calls using AWS prefixes is preferable.

Base URL: /1.0/publish/{{orgName}}?filter={{filter1}}&filter={{filter2}}
Method: GET

ParameterDescription
orgNameName of the org/directory
filterAn optional inclusive filter by filename(s): any file matching any of the provided filenames in the filter will be returned.
Request
curl --location --request GET "${API_BASE}/1.0/publish/MovieDeck/?filter=1" \
--header 'Content-Type: application/json' \
--header "Authorization: Bearer ${BEARER_TOKEN}"
Response
{
"transactionRequest": null,
"transactionRequests": null,
"fileLocation": null,
"fileLocations": null,
"fileNames": [
"2019-03-20-1742-produced-with-metadata-movies1-4.json",
"test01.json",
"test1.json"
],
"error": null,
"usePrefixes": null
}

Get Publish File Names - Async

Returns the file names for the specified orgName/directory.

Base URL: /1.0/publish/{{orgName}}/files
Method: POST

ParameterDescription
orgNameName of the org/directory
fileNames List< string >One or more file names or prefixes to use for filtering existing files.
usePrefixes booleanWhether or not to use provided file names as prefixes for filtering files (e.g., if searching "March03" within files named "2019March03","2019February01", etc., provided file names cannot be used as prefixes. Note: if false, will be non-performant for larger directories Default: false
Request Examples
curl --location --request POST "${API_BASE}/1.0/publish/MovieDeck/files" \
--header 'Content-Type: application/json' \
--header "Authorization: Bearer ${BEARER_TOKEN}" \
--data-raw '{
"fileNames":["test01"],
"usePrefixes": true
}'
Response
{
"transactionRequest": null,
"transactionRequests": null,
"fileLocation": null,
"fileLocations": null,
"fileNames": ["test01.json"],
"error": null,
"usePrefixes": null
}

Delete Node Packet by ID

Generates a packet that deletes nodes by indexed id. It does not require a read from any db and simply generates straightforward statements to delete the indicated nodes.

Base URL: /1.0/publish/{{orgName}}/delete
Method: POST

ParameterDescription
orgNameName of the org/directory
Request
note

Limited Publish Request (requires mappedIndices, originIds, and index; accepts storage options)

curl --location --request POST "${API_BASE}/1.0/publish/MovieDeck/delete" \
--header "Authorization: Bearer ${BEARER_TOKEN}" \
--header 'Content-Type: application/json' \
--data-raw '{
"originIds": ["Keanu Reeves","Hugo Weaving"],
"index": "Person",
"mappedIndices": {
"Movie": "title",
"DEFAULT_INDEX": "Movie",
"DEFAULT_ID_FIELD": "title",
"Person": "name"
},
"fileName": "test01.json",
"returnOnly": false
}'
Response
{
"transactionRequest": {
"statements": [
{
"statement": "MATCH (n:Person) USING INDEX n:Person(name) WHERE n.name IN {ids} WITH n OPTIONAL MATCH (n)-[r]-() DELETE r, n;",
"parameters": {
"ids": ["Keanu Reeves", "Hugo Weaving"]
},
"metadata": {
"deletedIds": ["Keanu Reeves", "Hugo Weaving"]
}
}
]
},
"transactionRequests": null,
"fileLocation": "http://minio:9000/graphgrid-test-ingest/MovieDeck/test01.json?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=minio%2F20210212%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20210212T205505Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=16acfd9a630216d98b0bf7f9563c87d8bdb6b9d4feca73150b9bf1b3788f37cd",
"fileLocations": null,
"fileNames": null,
"error": null,
"usePrefixes": null
}

Create Relationship Packet

Generates a packet that creates relationships for existing nodes. It does not require a read from any db and simply generates straight statements to create relationships with the assumption that the nodes already exist. Note: Currently does not support properties on newly created relationships.

Base URL: /1.0/publish/{{orgName}}/createrelationships
Method: POST

ParameterDescription
orgNameName of org/directory
startIndex stringThe indexed label of starting nodes
startIdField stringThe indexed property key of the starting nodes.
endIndex stringThe indexed label of the ending nodes.
endIdField stringThe indexed property key of the ending nodes.
fileName stringThe name of the file.
type string>The relationship type to be drawn.
idPairs List< idPair >At least one pair of startId/endId for the nodes between which to draw the relationship.
startId stringThe property value for key startIdField for the starting node of each pair.
endId stringThe property value for key endIdField for the ending node of each pair.
Request
curl --location --request POST "${API_BASE}/1.0/publish/MovieDeck/createrelationships" \
--header "Authorization: Bearer ${BEARER_TOKEN}" \
--header 'Content-Type: application/json' \
--data-raw '{
"startIndex": "Movie",
"startIdField": "title",
"endIndex": "Person",
"endIdField": "name",
"fileName": "test.json",
"type": "FEATURES",
"idPairs": [
{
"startId": "The Matrix",
"endId": "Keanu Reeves"
},
{
"startId": "A Few Good Men",
"endId": "Jack Nicholson"
}
]
}'
Response
{
"transactionRequest": {
"statements": [
{
"statement": "MATCH (s:Movie {title:{startId}}), (e:Person {name:{endId}}) WITH s, e MERGE (s)-[:FEATURES]->(e);",
"parameters": {
"endId": "Keanu Reeves",
"startId": "The Matrix"
},
"metadata": null
},
{
"statement": "MATCH (s:Movie {title:{startId}}), (e:Person {name:{endId}}) WITH s, e MERGE (s)-[:FEATURES]->(e);",
"parameters": {
"endId": "Jack Nicholson",
"startId": "A Few Good Men"
},
"metadata": null
}
]
},
"transactionRequests": null,
"fileLocation": "http://minio:9000/graphgrid-test-ingest/MovieDeck/test.json?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=minio%2F20210212%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20210212T210723Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=aff07a84c4fc56f1ac5b20eddc8bb7b02f3e5aae1fb8242a44cc0db5bc3df02d",
"fileLocations": null,
"fileNames": null,
"error": null,
"usePrefixes": null
}

Write Packet to Target DB

Writes the indicated statement/parameter CQL pairs to the indicated target database. Must identify a TransactionRequest, a list of TransactionRequests, a file name, or a list of file names. At least one of the above is required; any combination is supported.

Base URL: /1.0/publish/{{orgName}}/write?bucket={{bucket}}&region={{region}}
Method: POST

ParameterDescription
orgNameName of org/directory
bucketName of the S3 bucket where the specified files are located *Required only if passing file names Default: graphgrid-publish
regionAWS region of the S3 bucket where the specified files are located. Configured per deployment *Required only if passing file names Default (gg-prod): us-east-1
boltEndpoint stringThe bolt endpoint for the target database to which the data is to be written.
credentials stringThe credentials for the target database from which the data is to be read in the same format as would be provided to the instance's REST API ("Basic [base 64 encoded [username]:[password]]")
transactionRequest TransactionRequestA ONgDB TransactionRequest object containing pairs of statement/parameter CQL.
transactionRequests List< TransationRequest >A list of one or more ONgDB TransactionRequest objects containing pairs of statement/parameter CQL.
fileName stringThe name of a single file whose contents are to be retrieved from S3 and played on the target db.
fileNames List< string >At least one file name whose contents are to be retrieved from S3 and played on the target db.
Request Examples
curl --location --request POST "${API_BASE}/1.0/publish/MovieDeck/write?bucket=graphgrid-test-ingest&region=us-east-1" \
--header "Authorization: Bearer ${BEARER_TOKEN}" \
--header 'Content-Type: application/json' \
--data-raw '{ "boltEndpoint": "bolt://ongdb-db:7687",
"credentials": "Basic xxxxxxxxxxxxxxx=",
"transactionRequest": {
"statements": [
{
"statement": "MATCH (n:Movie) USING INDEX n:Movie(title) WHERE n.title = {baseId} WITH n MATCH (n)-[r:PRODUCED]-(o) WHERE (NOT EXISTS (o.name) OR NOT o.name IN {ids_0}) DELETE r;",
"parameters": {
"baseId": "The Matrix Revolutions",
"ids_0": [
"Joel Silver"
]
},
"metadata": null
},
{
"statement": "MATCH (n:Movie) USING INDEX n:Movie(title) WHERE n.title = {baseId} WITH n MATCH (n)-[r:PRODUCED]-(o) DELETE r;",
"parameters": {
"baseId": "The Devil'\''s Advocate"
},
"metadata": null
},
{
"statement": "MATCH (n:Movie) USING INDEX n:Movie(title) WHERE n.title = {baseId} WITH n MATCH (n)-[r:PRODUCED]-(o) WHERE (NOT EXISTS (o.name) OR NOT o.name IN {ids_0}) DELETE r;",
"parameters": {
"baseId": "The Matrix",
"ids_0": [
"Joel Silver"
]
},
"metadata": null
},
{
"statement": "MATCH (n:Movie) USING INDEX n:Movie(title) WHERE n.title = {baseId} WITH n MATCH (n)-[r:PRODUCED]-(o) WHERE (NOT EXISTS (o.name) OR NOT o.name IN {ids_0}) DELETE r;",
"parameters": {
"baseId": "The Matrix Reloaded",
"ids_0": [
"Joel Silver"
]
},
"metadata": null
},
{
"statement": "MERGE (a:Person {name: {a_id}}) WITH a MERGE (b:Movie {title: {b_id}}) WITH a, b MERGE (a)-[r:PRODUCED]->(b) SET r = {uploadedOn: {uploadedOn}, createdAt: {createdAt}, grn: {grn}, updatedAt: {updatedAt}};",
"parameters": {
"createdAt": "2021-02-11T16:21:22+00:00",
"grn": "grn:gg:produced:AaL0o9WRAdufUX2pMjiYGVHdd5DL0GRzNXjO1VCqSlJk",
"a_id": "Joel Silver",
"b_id": "The Matrix",
"uploadedOn": 1613164927627,
"updatedAt": "2021-02-11T16:21:22+00:00"
},
"metadata": null
},
{
"statement": "MERGE (a:Person {name: {a_id}}) WITH a MERGE (b:Movie {title: {b_id}}) WITH a, b MERGE (a)-[r:PRODUCED]->(b) SET r = {uploadedOn: {uploadedOn}, createdAt: {createdAt}, grn: {grn}, updatedAt: {updatedAt}};",
"parameters": {
"createdAt": "2021-02-11T16:21:22+00:00",
"grn": "grn:gg:produced:pV2lbwEi02Y5DBsZmmPMubB8eHF0y5rRudPXbHTrjKZO",
"a_id": "Joel Silver",
"b_id": "The Matrix Revolutions",
"uploadedOn": 1613164927627,
"updatedAt": "2021-02-11T16:21:22+00:00"
},
"metadata": null
},
{
"statement": "MERGE (a:Person {name: {a_id}}) WITH a MERGE (b:Movie {title: {b_id}}) WITH a, b MERGE (a)-[r:PRODUCED]->(b) SET r = {uploadedOn: {uploadedOn}, createdAt: {createdAt}, grn: {grn}, updatedAt: {updatedAt}};",
"parameters": {
"createdAt": "2021-02-11T16:21:22+00:00",
"grn": "grn:gg:produced:nSUBGvDJFxSlcAe9Y55mnG6ce99EaMbJ9wTZtHm6gQrP",
"a_id": "Joel Silver",
"b_id": "The Matrix Reloaded",
"uploadedOn": 1613164927627,
"updatedAt": "2021-02-11T16:21:22+00:00"
},
"metadata": null
},
{
"statement": "MERGE (n:Movie {title:{id}}) SET n:Movie, n = {uploadedOn: {uploadedOn}, createdAt:{createdAt}, grn:{grn}, lastSearchIndexedAt:{lastSearchIndexedAt}, tagline:{tagline}, index:{index}, title:{title}, updatedAt:{updatedAt}};",
"parameters": {
"createdAt": "2021-02-11T16:21:22+00:00",
"grn": "grn:gg:movie:94T7mRUQ4lYWfyUTypJ2hOjerhOwBD9S9c63baYXi9DW",
"uploadedOn": 1613164927627,
"lastSearchIndexedAt": "0",
"tagline": "Evil has its winning ways",
"index": "Movie",
"id": "The Devil'\''s Advocate",
"title": "The Devil'\''s Advocate",
"updatedAt": "2021-02-11T16:21:22+00:00"
},
"metadata": null
},
{
"statement": "MERGE (n:Person {name:{id}}) SET n:Person, n = {uploadedOn: {uploadedOn}, createdAt:{createdAt}, grn:{grn}, lastSearchIndexedAt:{lastSearchIndexedAt}, born:{born}, name:{name}, index:{index}, updatedAt:{updatedAt}};",
"parameters": {
"createdAt": "2021-02-11T16:21:22+00:00",
"grn": "grn:gg:person:ZKk2qpIJg5e6wn78eIalCd8G23IAt3TYt1LcanhHiIag",
"uploadedOn": 1613164927627,
"lastSearchIndexedAt": "0",
"born": 1952,
"name": "Joel Silver",
"index": "Person",
"id": "Joel Silver",
"updatedAt": "2021-02-11T16:21:22+00:00"
},
"metadata": null
},
{
"statement": "MERGE (n:Movie {title:{id}}) SET n:Movie, n = {uploadedOn: {uploadedOn}, createdAt:{createdAt}, grn:{grn}, lastSearchIndexedAt:{lastSearchIndexedAt}, tagline:{tagline}, index:{index}, title:{title}, updatedAt:{updatedAt}};",
"parameters": {
"createdAt": "2021-02-11T16:21:22+00:00",
"grn": "grn:gg:movie:w1CEgSjlX2qdvUUB175aBYYIOQ7lJVwiK64qWXNtCDRN",
"uploadedOn": 1613164927627,
"lastSearchIndexedAt": "0",
"tagline": "Everything that has a beginning has an end",
"index": "Movie",
"id": "The Matrix Revolutions",
"title": "The Matrix Revolutions",
"updatedAt": "2021-02-11T16:21:22+00:00"
},
"metadata": null
},
{
"statement": "MERGE (n:Movie {title:{id}}) SET n:Movie, n = {uploadedOn: {uploadedOn}, createdAt:{createdAt}, grn:{grn}, lastSearchIndexedAt:{lastSearchIndexedAt}, tagline:{tagline}, index:{index}, title:{title}, updatedAt:{updatedAt}};",
"parameters": {
"createdAt": "2021-02-11T16:21:22+00:00",
"grn": "grn:gg:movie:KExxncNzLH9kcaUJm3MtWmVULzPwcPUVfjJp9vyM7v4U",
"uploadedOn": 1613164927627,
"lastSearchIndexedAt": "0",
"tagline": "Free your mind",
"index": "Movie",
"id": "The Matrix Reloaded",
"title": "The Matrix Reloaded",
"updatedAt": "2021-02-11T16:21:22+00:00"
},
"metadata": null
},
{
"statement": "MERGE (n:Movie {title:{id}}) SET n:Movie, n = {uploadedOn: {uploadedOn}, createdAt:{createdAt}, grn:{grn}, lastSearchIndexedAt:{lastSearchIndexedAt}, tagline:{tagline}, index:{index}, title:{title}, updatedAt:{updatedAt}};",
"parameters": {
"createdAt": "2021-02-11T16:21:22+00:00",
"grn": "grn:gg:movie:T2u04XXRkNnJXHLDqjYTkdyWgwx1C8HW04ERgHD1gQW5",
"uploadedOn": 1613164927627,
"lastSearchIndexedAt": "0",
"tagline": "Welcome to the Real World",
"index": "Movie",
"id": "The Matrix",
"title": "The Matrix",
"updatedAt": "2021-02-11T16:21:22+00:00"
},
"metadata": {
"qa": {
"mappedIndices": {
"Movie": "title",
"DEFAULT_INDEX": "Movie",
"DEFAULT_ID_FIELD": "title",
"Person": "name"
},
"relationshipIdField": null,
"relationships": null,
"nodes": {
"name": {
"Joel Silver": [
"createdAt",
"grn",
"uploadedOn",
"lastSearchIndexedAt",
"born",
"name",
"index",
"updatedAt"
]
},
"title": {
"The Matrix": [
...
],
"The Matrix Revolutions": [
...
],
"The Matrix Reloaded": [
...
],
"The Devil'\''s Advocate": [
...
]
}
}
},
"updatedIds": [
"The Matrix",
"The Matrix Revolutions",
"The Matrix Reloaded",
"The Devil'\''s Advocate"
]
}
}
]
},
"transactionRequests": null,
"fileLocation": "http://minio:9000/graphgrid-test-ingest/MovieDeck/test99.json?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=minio%2F20210212%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20210212T212207Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=376c40340a230ee1b7e67f4462365ce74e4934a844b589fc0529020fc7dc0b4e",
"fileLocations": null,
"fileNames": null,
"error": null,
"usePrefixes": null
}'
Response
{
"transactionRequest": null,
"transactionRequests": null,
"fileLocation": null,
"fileLocations": null,
"fileNames": null,
"error": null,
"usePrefixes": null
}

User Inbox Endpoints

It is possible to set up notifications to be sent to a user inbox via a Fuze trigger policy. Publish is responsible for reading from the com.graphgrid.ingest queue and returning data specific to the user inbox.

Get User Inbox for User

Returns the user inbox for a specific user.

Base URL: /1.0/publish/userinbox?{{userGrn}}
Method: GET

ParameterDescription
userGrnThe grn of the user of whose user inbox data will be retrieved
curl --location --request GET "${API_BASE}/1.0/publish/userinbox?userGrn=grn:gg:user:EeTO5wqULpuk1Xr8T8JQ2VcT5075cTvAWdmpjEDXnl9W" \
--header "Authorization: ${BEARER_TOKEN}"
Response
{
"id": 10751,
"labels": ["GraphGridResource"],
"enver": 0,
"createdAt": "2022-05-11T17:30:37.486Z",
"updatedAt": "2022-05-11T17:30:37.486Z",
"createdBy": "ongdb",
"lastModifiedBy": "ongdb",
"grn": "grn:gg:userinbox:Njfjvla0velwTLCJPC4kItq5nDFsblWsbzBur6dLf4to",
"name": "default-inbox",
"active": true,
"user": null,
"received": null,
"grnType": "userinbox",
"label": "UserInbox"
}

Get All Notifications in a User's Inbox

Returns the notifications for a specific user's inbox.

Base URL: /1.0/publish/userinbox?{{userGrn}}
Method: GET

ParameterDescription
userGrnThe grn of the user of whose inbox data will be retrieved
curl --location --request GET "${API_BASE}/1.0/publish/userinbox?userGrn=grn:gg:user:EeTO5wqULpuk1Xr8T8JQ2VcT5075cTvAWdmpjEDXnl9W" \
--header "Authorization: Bearer ${BEARER_TOKEN}"
Response
{
"id": 10751,
"labels": ["GraphGridResource"],
"enver": 0,
"createdAt": "2022-05-11T17:30:37.486Z",
"updatedAt": "2022-05-11T17:30:37.486Z",
"createdBy": "ongdb",
"lastModifiedBy": "ongdb",
"grn": "grn:gg:userinbox:Njfjvla0velwTLCJPC4kItq5nDFsblWsbzBur6dLf4to",
"name": "default-inbox",
"active": true,
"user": null,
"received": null,
"grnType": "userinbox",
"label": "UserInbox"
}

Delete Notification

Delete a notification

Base URL: /1.0/publish/{{notificationGrn}}
Method: DELETE

ParameterDescription
notificationGrnThe grn of the notification to be deleted.
Request
curl --location -g --request DELETE "${API_BASE}/1.0/publish/grn:gg:notification:s8p7ANqNnPONUImZM5NFtVZvBiI2VesKc63imCbmh2ZU" \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header "Authorization: Bearer ${BEARER_TOKEN}" \
Response

200 OK

Use Cases

All samples are using the sample Movie Deck with the addition of the following queries:

MATCH (p:Person) SET p.index = "Person";
CREATE CONSTRAINT ON (m:Movie) ASSERT m.title IS UNIQUE;
CREATE CONSTRAINT ON (p:Person) ASSERT p.name IS UNIQUE;

To create a Movie Deck example, run :play movie graph in your Neo/ONgDB environment. Before trying out any requests, you must create an organization. To do so, see this request that creates a Movie Deck organization.

Important Notes

  • Currently, all publish-generated packets are stored in the com-graphgrid-publish bucket and this is not configurable.

  • Currently, all uploaded publish-generated packets generate and return with a URL with a default expiration of 24 hours and this is not currently configurable.