Skip to content

Batch execution using HTTP REST API #10547

@qomhmd

Description

@qomhmd

I am using OrientDB v3.2.44 (Docker) on a host machine with CentOS 9.

I am trying to create vertices in a batch comment, using this code (with transaction false/true which I don't know how they differ):

{ "transaction" : true,
  "operations" : [...]
}

I tried both SQL script blocks,

{
  "type": "script",
  "language": "sql",
  "script": 
    'CREATE VERTEX Country CONTENT {
    "name": "Afghanistan",
    "codes": [
      {
        "@class": "Coding",
        "code": "AFG",
        "system": "#33:0"
      }
    ]
  }'
    ,
  "type": "script",
  "language": "sql",
  "script": 
    'CREATE VERTEX Country CONTENT {
    "name": "Albania",
    "codes": [
      {
        "@class": "Coding",
        "code": "ALB",
        "system": "#33:0"
      }
    ]
  }'
}

and "c"-record blocks:

{
  "type": "c",
  "record": {
    "@class": "Country",
    "name": "Afghanistan",
    "codes": [
      {
        "@class": "Coding",
        "code": "AFG",
        "system": "#33:0"
      }
    ]
  }
},
{
  "type": "c",
  "record": {
    "@class": "Country",
    "name": "Albania",
    "codes": [
      {
        "@class": "Coding",
        "code": "ALB",
        "system": "#33:0"
      }
    ]
  }
},

Either way, it was not successful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions