HTTP Reference | AllegroGraph 9.0.1
Author: Franz Incorporated

Copyright (c) 2005 - 2026 Franz, Incorporated
Last updated 27 May 2026 at 10:34

# AllegroGraph 9.0.1 HTTP Reference

- Documentation Index
  - Release Notes
  - Quick Start
  - SSL/TLS Quick Start
  - Introduction
  - Setup and Configuration
    - Download
    - Server Installation
    - Server Configuration and Control
    - WebView
    - Database Upgrading
    - Managing Users
  - Server Management
    - Performance Tuning
    - Deleting Duplicate Triples
    - Purging Deleted Triples
    - Auditing
    - Managing Users
    - Replication
    - Point-in-Time Recovery
    - Transaction Log Archiving
    - Security Overview
    - Security Implementation
  - Tools
    - agtool
    - Data Loading
    - Data Export
    - Backup and Restore
    - Querying
    - RDFS++
    - Materializer
    - Event Scheduler
    - SHACL
  - Details
    - Triple Indices
    - Freetext Indices
    - Encoded IDs
    - Connection Pooling
    - N-dimensional Geospatial Overview
    - 2-D Geospatial
    - Temporal
    - Social Network
    - JavaScript
    - Datatypes
    - Data Conversion (Rapper)
    - Stored Procedures
    - Triple Attributes
    - Lineparse Format
  - Querying
    - SPARQL documentation summary
    - SPARQL Reference
    - SPIN
    - SPARQL Magic Properties
    - Prolog
  - 3rd-party tools
    - Solr text Indices
    - MongoDB integration
    - TopBraid Composer Plugin
    - Cloudera
  - Client APIs
    - Gruff
    - GraphTalker
    - REST/HTTP interface
    - HTTP reference
    - Javadocs (Sesame and Jena)
    - Python API
    - Lisp Reference
    - JavaScript
  - Tutorials
    - N-dimensional Geospatial
    - SPARQL Tutorial
    - Java Sesame
    - Java Jena
    - Python Sesame
    - Lisp
    - Prolog
    - More...
  - Other
    - Conferences and Seminars
    - Source Code on Github
    - Amazon EC2
    - Copyrights
  - Franz, Inc.

- Introduction
- URL Summary
  - Server based HTTP services
  - Repository based HTTP services
- API Reference
  - Front end
  - Back end

Documentation Index

## Introduction

This document lists all HTTP services, along with some documentation. See REST/HTTP interface for further documentation.

## URL Summary

### Server based HTTP services

These services operate on the server itself. These include user and role management, general settings and starting sessions.

/catalogs GET
/[CATNAME] PUT DELETE
/protocol GET
/repositories GET
/[REPOSITORY] PUT DELETE
/auto/optimize/message GET
/start PUT
/status GET
/stop PUT
/backup POST
/ensureNotLingering POST
/exists GET
/namespaces GET DELETE
/[PREFIX] POST/PUT GET DELETE
/query-options GET DELETE
/[NAME] POST/PUT GET DELETE
/repl/controllingInstance PUT
/createCluster PUT
/get-config GET
/growCluster PUT
/priority POST
/quiesce PUT
/remove PUT
/set-config PUT
/settings GET POST
/start PUT
/status GET
/stop PUT
/retain PUT
/scripts GET
/[NAME] GET PUT DELETE
/session POST
/shutdown POST
/warmstandby GET PUT DELETE
/jobnames GET
/registerJobname POST
/startServer POST
/switchRole POST
/unregisterJobname POST
/config/fti-stop-words GET
/configfile GET
/configfiles GET
/databricks/available-tables GET
/clean DELETE
/download-csv PUT
/export-table/cancel DELETE
/exec PUT
/result GET
/list-files GET
/profiles GET
/statement/cancel DELETE
/exec PUT
/result GET
/warehouses GET
/fedshard/define GET PUT DELETE
/delete-metadata DELETE
/graphtalker/install PUT
/list/available GET
/installed GET
/set-active PUT
/uninstall DELETE
/gruff/install PUT
/list/available GET
/installed GET
/set-active PUT
/uninstall DELETE
/hostname GET
/initfile GET PUT DELETE
/job GET
/jobs GET DELETE
/jobsNumber GET
/largeOperationWarning GET PUT
/logfile GET
/lookup-llm GET
/namespaces GET
/nd/computeSubtype GET
/processes GET
/[NAME] DELETE
/pidName GET
/stacktrace GET
/telnet POST
/protocol GET
/queryPlanners GET
/reconfigure POST
/reopenLog POST
/repositories GET
/[REPOSITORY] PUT DELETE
/auto/optimize/message GET
/start PUT
/status GET
/stop PUT
/backup POST
/ensureNotLingering POST
/exists GET
/namespaces GET DELETE
/[PREFIX] POST/PUT GET DELETE
/query-options GET DELETE
/[NAME] POST/PUT GET DELETE
/repl/controllingInstance PUT
/createCluster PUT
/get-config GET
/growCluster PUT
/priority POST
/quiesce PUT
/remove PUT
/set-config PUT
/settings GET POST
/start PUT
/status GET
/stop PUT
/retain PUT
/scripts GET
/[NAME] GET PUT DELETE
/session POST
/shutdown POST
/warmstandby GET PUT DELETE
/jobnames GET
/registerJobname POST
/startServer POST
/switchRole POST
/unregisterJobname POST
/requests GET
/roles GET
/[NAME] PUT DELETE
/access GET PUT DELETE
/attributes GET PUT DELETE
/color GET PUT DELETE
/permissions GET
/[TYPE] GET PUT DELETE
/security-filters/[TYPE] GET POST DELETE
/scheduler/createEvent POST
/deleteEvents PUT
/events GET
/log GET PUT
/scripts GET
/[NAME] GET PUT DELETE
/serverWarnings GET POST DELETE
/session GET POST
/systemstat.json GET
/token GET DELETE
/list GET
/users GET PUT
/[NAME] PUT DELETE
/access GET PUT DELETE
/attributes GET PUT DELETE
/color GET PUT DELETE
/data GET DELETE
/[KEY] GET PUT DELETE
/effectiveAccess GET
/effectiveColors GET
/effectivePermissions GET
/gruff-queries GET
/[KEY] GET PUT DELETE
/loginTimeout GET
/password POST
/permissions GET
/[TYPE] GET PUT DELETE
/roles GET
/[ROLE] PUT DELETE
/security-filters/[TYPE] GET POST DELETE
/uuids GET
/version GET
/date GET
/full GET
/revision GET
/webview/version GET PUT
/versions GET

### Repository based HTTP services

These services operate against a particular store or session.

/catalogs/[CATNAME]/repositories/[REPONAME] GET/POST
/access GET
/add-object PUT
/add-objects PUT
/attributes/definitions GET POST DELETE
/staticFilter GET POST DELETE
/backup-stream POST
/begin POST
/blankNodes POST
/bulkMode GET PUT DELETE
/clusterings PUT
/commit POST
/contexts GET
/convert-to-vts PUT
/createSecondaryIndices GET PUT DELETE
/data-generator/patient POST
/phoneCall POST
/delete-objects PUT
/encodedIds POST
/prefixes GET POST DELETE
/hasAny GET
/isInUse GET
/isRegistered GET
/eval POST
/exec-nl-query GET
/expected-store-size GET
/freetext GET/POST
/indices GET
/[INDEXNAME] GET POST PUT DELETE
/borderChars GET
/graphs GET
/indexFields GET
/indexLiterals GET
/indexResources GET
/innerChars GET
/minimumWordSize GET
/predicates GET
/stopWords GET
/tokenizer GET
/types GET
/wordFilters GET
/functor POST
/geo/box GET
/circle GET
/haversine GET
/polygon GET PUT
/types GET POST
/cartesian POST
/id GET
/spherical POST
/geosparql/buildGeohashIndex POST
/rebuildGeohashIndex POST
/getPreparedTransactions GET
/graphql POST
/indices GET
/[TYPE] PUT DELETE
/chunks GET
/optimize POST
/jobs GET
/[JOB-ID] DELETE
/purge-deleted-triples POST DELETE
/llm-index PUT
/llm-list GET
/llm-split PUT
/load-csv PUT
/lock POST DELETE
/mapping GET DELETE
/all DELETE
/predicate POST/PUT GET DELETE
/cartesian POST
/spherical POST
/type POST/PUT GET DELETE
/cartesian POST
/spherical POST
/materializeEntailed PUT DELETE
/metadata GET POST
/mongoParameters GET POST
/namespaces GET DELETE
/[PREFIX] POST/PUT GET DELETE
/nd/geospatialDatatypeAutomation GET PUT DELETE
/nearest-neighbor GET
/needsCommit GET
/neighborMatrices/[NAME] PUT
/nl-queries GET POST DELETE
/missing-fields GET PUT
/total GET
/noCommit GET PUT DELETE
/object-embedding GET
/object-property-value GET
/object-text GET
/queries/[NAME] GET/POST DELETE
/query-options GET DELETE
/[NAME] POST/PUT GET DELETE
/queryResultsCache GET DELETE
/rdf-star GET PUT DELETE
/reports GET
/rollback POST
/session/autoCommit GET POST
/close POST
/description GET
/isActive GET
/ping GET
/set-api-key PUT
/settings/purge-rate-limit GET POST
/shacl-shapes GET PUT DELETE
/generate GET PUT
/shard-info GET
/shards GET
/size GET
/sna/paths GET
/snaGenerators/[NAME] PUT
/solrParameters GET POST
/sparql GET/POST
/spin/function GET
/[URI] GET PUT DELETE
/magicproperty GET
/[URI] GET PUT DELETE
/split-shard PUT
/statement PUT
/statements POST/PUT GET DELETE
/delete POST
/duplicates GET DELETE
/id GET
/query GET/POST
/transform POST/PUT
/storage-report GET
/storeID GET PUT
/string-table-size GET
/suppressDuplicates GET PUT DELETE
/tlog/locker GET
/tripleCache GET PUT DELETE
/unique/[COLUMN] GET/POST
/update-index PUT
/useSecondaryIndices GET PUT DELETE
/uuid GET
/validate/shacl GET
/vector-store-import PUT
/vector-store-p GET
/warmup PUT
/close POST

## API Reference

### Front end

GET /catalogs

Returns a set of catalogs that are available on this server. For each catalog, id and uri properties are returned, giving respectively the name of the catalog and the URL under which it is found. Properties named readable and writable indicate, for each catalog, whether the current user has read or write access to at least one repository in it. When `repoCount` is `true`, also include the number of repositories for each catalog.

### arguments

- repoCount, boolean

PUT /catalogs/[CATNAME]

If dynamic catalogs are enabled for the server (see the `DynamicCatalogs` directive), this can be used to create a new catalog.

### arguments

- expectedStoreSize, integer
  specify the default expected size for repositories in this catalog.

DELETE /catalogs/[CATNAME]

Deletes a catalog. Only dynamic catalogs (those created through HTTP) can be deleted in this way.

GET /catalogs/[CATNAME]/protocol

Returns the protocol version of the Sesame interface. The protocol described in this document is `4`.

GET /catalogs/[CATNAME]/repositories

Return a list of repositories available in the catalog.

### arguments

- all, boolean
  If `true`, then all of the repositories in all of the catalogs will be returned.
- checkMmrStatus, boolean (default: true)

PUT /catalogs/[CATNAME]/repositories/[REPOSITORY]

Creates a new, empty repository.

When a repository with the given name already exists, it is overwritten, unless a parameter override with value false is passed.

### arguments

- expectedSize, integer
  Specifies the expected number of triples in the repository
- stringTableSize, integer
  Specifies the expected number of strings in the repo
- index, list
  Can be specified multiple times. Must hold index names, and is used to configure the set of indices created for the store.
- stringTableCompression, string
  Specifies the type of string compression to use. The default is 'none'. See Server Configuration and Control for information on stringTableCompression
- override, string (default: true)
- restore, string
- nocommit, boolean

DELETE /catalogs/[CATNAME]/repositories/[REPOSITORY]

Delete the specified repository. This can fail if the repository is being accessed by another client.

GET /catalogs/[CATNAME]/repositories/[REPOSITORY]/auto/optimize/message

Return the last message written by the automatic optimizer

PUT /catalogs/[CATNAME]/repositories/[REPOSITORY]/auto/optimize/start

Start automatic optimization on this repository

### arguments

- workers, integer (default: 1)
  The number of simultaneous optimizations to run
- operate, integer (default: 0)
  The number of seconds to run. Zero means forever.
- interval, integer (default: 120)
  The number of seconds before checking if there is an optimization to perform
- idle, integer (default: 120)
  The number of seconds an index must be idle before an optimization is started.

GET /catalogs/[CATNAME]/repositories/[REPOSITORY]/auto/optimize/status

Return whether the auto optimizer is running or stopped

PUT /catalogs/[CATNAME]/repositories/[REPOSITORY]/auto/optimize/stop

Stop automatic optimization on this repository

POST /catalogs/[CATNAME]/repositories/[REPOSITORY]/backup

Create a backup of the repository.

### arguments

- target, string

POST /catalogs/[CATNAME]/repositories/[REPOSITORY]/ensureNotLingering

To conserve resources, makes the database instance and its child processes exit if the instance is unused. Takes no arguments, returns nothing.

Normally unused database instances linger for InstanceTimeout seconds to speed up subsequent open operations.

GET /catalogs/[CATNAME]/repositories/[REPOSITORY]/exists

Return true if the triple-store exists and is accessible to the current user.

Will return an HTTP 401 (Unauthorized) if the user is not authorized to read from the requested catalog and an HTTP 404 (Not Found) if the user is authorized but the store does not exist.

GET /catalogs/[CATNAME]/repositories/[REPOSITORY]/namespaces

Return the currently active namespaces for the current user in this repository.

The namespaces are returned as tuples with fields `prefix` and `namespace` (as well as `type` and `shadowed` if `effective` is `false`, where `type` is one of `default`, `repository` or `user` and `shadowed` indicates whether the option is shadowed by a higher priority definition.

### arguments

- type, string (default: user)
  Type of the declaration (possible values "user", "repository", "default"). Additionally, "any" can be specified to return all namespaces.
- effective, boolean (default: true)
  If `effective` is `false`, return all namespaces, including the shadowed ones.

DELETE /catalogs/[CATNAME]/repositories/[REPOSITORY]/namespaces

Deletes all namespaces of the specified type.

### arguments

- type, string (default: user)
  Type of the declaration (possible values "user", "repository", "default").
- reset, boolean
  If specified and true, all namespaces on the specified level are removed, unshadowing the definitions on the previous level. The definitions on the default level are reset to the default namespaces.

POST/PUT /catalogs/[CATNAME]/repositories/[REPOSITORY]/namespaces/[PREFIX]

Create or update a namespace definition.

The body of the request must contain the namespace for the prefix as plain text.

### arguments

- type, string (default: user)
  Type of the declaration (possible values "user", "repository", "default").

GET /catalogs/[CATNAME]/repositories/[REPOSITORY]/namespaces/[PREFIX]

Returns the namespace expansion for the given prefix.

### arguments

- type, string (default: user)
  Type of the declaration (possible values "user", "repository", "default").

DELETE /catalogs/[CATNAME]/repositories/[REPOSITORY]/namespaces/[PREFIX]

Delete a namespace definition.

### arguments

- type, string (default: user)
  Type of the declaration (possible values "user", "repository", "default").

GET /catalogs/[CATNAME]/repositories/[REPOSITORY]/query-options

Return the currently active query options for the current user in this repository.

The query options are returned as tuples with fields `name` and `value` (as well as `type` and `shadowed` if `effective` is `false`, where `type` is one of `default`, `repository` or `user` and `shadowed` indicates whether the option is shadowed by a higher priority definition.

### arguments

- type, string (default: user)
  Type of the declaration (possible values "user", "repository", "default"). Additionally, "any" can be specified to return all query options.
- effective, boolean (default: true)
  If `effective` is `false`, return all query options, including the shadowed ones.

DELETE /catalogs/[CATNAME]/repositories/[REPOSITORY]/query-options

Deletes all query options of the specified type.

### arguments

- type, string (default: user)
  Type of the declaration (possible values "user", "repository", "default").
- reset, boolean
  If specified and true, all query options on the specified level are removed, unshadowing the definitions on the previous level. The definitions on the default level are reset to the default query options.

POST/PUT /catalogs/[CATNAME]/repositories/[REPOSITORY]/query-options/[NAME]

Create or update a query option value.

The body of the request must contain the value for the name as plain text.

### arguments

- type, string (default: user)
  Type of the declaration (possible values "user", "repository", "default").

GET /catalogs/[CATNAME]/repositories/[REPOSITORY]/query-options/[NAME]

Returns the value of the given query option.

### arguments

- type, string (default: user)
  Type of the declaration (possible values "user", "repository", "default").

DELETE /catalogs/[CATNAME]/repositories/[REPOSITORY]/query-options/[NAME]

Delete a query option.

### arguments

- type, string (default: user)
  Type of the declaration (possible values "user", "repository", "default").

PUT /catalogs/[CATNAME]/repositories/[REPOSITORY]/repl/controllingInstance

Specify the name of the new controlling instance. This command must be sent to the current controlling instance. If the current controlling instance is down then it can be sent to any instance if 'force' is specified as 'true'

### arguments

- instanceName, string
  Name of the instance to become the controlling instance
- force, string (default: false)
  If true then allow any instance to set the controlling instance

PUT /catalogs/[CATNAME]/repositories/[REPOSITORY]/repl/createCluster

Create the first instance of a replication cluster.

### arguments

- host, string
  A hostname or IP address for this host that's reachable from all other instances in the cluster
- port, integer
  The port of the Agraph server for the specified scheme
- instanceName, string
  A unique name for this respository to be used in control commands
- group, string
  Group name used in the computation of commit request priorities
- user, string
  User name used by other instances to access the created repository
- password, string
  Password used by other instances to access the created repository
- scheme, string
  Method used to communicate with agraph server: can be http (the default) or https
- ifExists, string (default: supersede)
  Value is 'use' to open existing repo, 'supersede' or 'overwrite' to create fresh repo or 'error' to signal an error if the repo exists. Whichever is chosen the repo will be the lone member of the cluster when it's opened
- standalone, string (default: false)
  If specified as 'true' then this repo can be read and written but will never join a cluster as long as it remains open.
- shardInfo, string
  information about this shard and its place in the distributed db

GET /catalogs/[CATNAME]/repositories/[REPOSITORY]/repl/get-config

Return the MMR configuration in lineparse format

PUT /catalogs/[CATNAME]/repositories/[REPOSITORY]/repl/growCluster

add instance to cluster

### arguments

- host, string
  A hostname or IP address for this host that's reachable from all other instances in the cluster
- port, integer
  The port of the Agraph server to hold the new instance
- name, string
  The name of the repository for the new instance
- instanceName, string
  A unique name for this respository to be used in control commands
- user, string
  User name if needed to access the server
- password, string
  Password if needed to access the server
- catalog, string
  The catalog for the new repo (if other than the root catalog)
- group, string
  Group name used in the computation of commit request priorites
- scheme, string
  Method used to communicate with agraph server: can be http (the default) or https
- backupServerFilename, string
  The filename on the host of the new instance that holds a backup of the database to be restored to create the new instance
- shardInfo, string
  information about this shard and its place in the distributed db

POST /catalogs/[CATNAME]/repositories/[REPOSITORY]/repl/priority

Set the priorities between instances and groups.

### arguments

- expression, string
  json expression specifying priorites between instances or groups

PUT /catalogs/[CATNAME]/repositories/[REPOSITORY]/repl/quiesce

Control whether commits are permitted and whether to wait until the instance is up to date with commits

### arguments

- action, string
  Either "stop", "stopall", "start", "startall", "ready", "readyall", or "restartall"
- timeout, integer (default: 120)
  Number of seconds to wait for action to take effect before returning a timed out response

PUT /catalogs/[CATNAME]/repositories/[REPOSITORY]/repl/remove

Permanently remove an instance from the cluster. The command is sent to the controlling instance.

### arguments

- instanceName, string
  Name of the instance to be permanently removed from the cluster
- timeout, integer (default: 180)
  Number of seconds to wait for durability to be achieved before giving up on the remove operation. Maximum is 180 seconds
- force, string
  If true will remove instance after waiting no more than timeout seconds even if there are outstanding non-durable commits
- undo-repl, boolean
  If true will convert removed repo to a normal repo

PUT /catalogs/[CATNAME]/repositories/[REPOSITORY]/repl/set-config

Set the MMR configuration from a lineparse description

GET /catalogs/[CATNAME]/repositories/[REPOSITORY]/repl/settings

Return the current settings of repl parameters

POST /catalogs/[CATNAME]/repositories/[REPOSITORY]/repl/settings

Set the values of replication parameters and return all of the settings.

### arguments

- transactionLatencyCount, integer
  How many non-durable transactions are permitted (a non-negative value) before a commit will not be permitted
- distributedTransactionTimeout, integer
  Number of seconds to wait for a transaction to become durable until letting the commit finish
- durability, string
  The number of instances that must have a copy of a commit before it's considered durable. The value can be a positive integer or one of the three strings: min (meaning 1), max (meaning all instances) or quorum (meaning the next integer greater than half of the instances)
- transactionLatencyTimeout, integer
  Number of seconds to wait for the transactionLatencyCount to be satisified when committing before signalling an error

PUT /catalogs/[CATNAME]/repositories/[REPOSITORY]/repl/start

Restart a stopped instance in the cluster. If the instanceName argument is given then that instance is started. If instanceName is not given then the instance started is the one to which the command is sent.

### arguments

- instanceName, string
  Name of the instance to start. If not given then the instance to which this message is sent is started

GET /catalogs/[CATNAME]/repositories/[REPOSITORY]/repl/status

Return the status of the instance.

### arguments

- form, string (default: text)
  Can be 'text' (the default) or 'json' to specify how the results are returned
- if-after, integer (default: 0)
  Only return if the configuration is newer than this version

PUT /catalogs/[CATNAME]/repositories/[REPOSITORY]/repl/stop

Stops an instance. The instance will receive no commits from other instances and no commits can be done on this instance. This instance can be restarted unless undo-repl is true. The instance named by instanceName is stopped. If instanceName is not given the the instance to which the command is sent is stopped.

### arguments

- timeout, integer (default: 180)
  Number of seconds to wait for durability to be achieved before giving up on the stop operation. Maximum is 180 seconds
- force, string
  If true will stop instance after waiting no more than timeout seconds even if there are outstanding non-durable commits
- instanceName, string
  Name of the instance to stop. If not given then the instance to which this message is sent is stopped
- undo-repl, boolean
  If true then convert repo to non-repl repo before stopping it

PUT /catalogs/[CATNAME]/repositories/[REPOSITORY]/retain

Specify which transaction log files must be retained

### arguments

- mustRetain, integer
  The ID of the maximum transaction log that must be retained. A value of -1 will turn off this check.
- sinceTime, string
  All transactions since the given date must be retained. The data can be an ISO date, "now", or a universal time. A value of -1 will turn off this check
- timeInterval, integer
  Transaction log entries between now and timeInterval seconds ago will be retained. You can use this to retain, say, the last 24 hours of entries by specifying 86400 seconds. A value of -1 turns off this check

GET /catalogs/[CATNAME]/repositories/[REPOSITORY]/scripts

Return the list of scripts that have been added to this repository.

GET /catalogs/[CATNAME]/repositories/[REPOSITORY]/scripts/[NAME]

Return the contents of the script NAME in this repository.

PUT /catalogs/[CATNAME]/repositories/[REPOSITORY]/scripts/[NAME]

Add or replace the script NAME in this repository with the contents of the body.

### arguments

- warnings-are-errors, boolean
  If true then warnings are considered errors and will cancel the upload
- verbose, boolean
  If true then the compiler will write compilation messages to the agraph.log file

DELETE /catalogs/[CATNAME]/repositories/[REPOSITORY]/scripts/[NAME]

Delete the script NAME in this repository.

POST /catalogs/[CATNAME]/repositories/[REPOSITORY]/session

Starts a new session for the repository.

### arguments

- autoCommit, boolean (default: true)
  Specify whether or not the session should use transactions.
- lifetime, integer
  The number of seconds the session can be idle before being shutdown and reclaimed.
- loadInitFile, boolean
  If true, then the initfile will be loaded when the session starts.
- script, list
  The name of a script file to load; may be specified multiple times.

POST /catalogs/[CATNAME]/repositories/[REPOSITORY]/shutdown

Closes respository. Sends `close` to each shared backend, but does not attempt to close open sessions.

If `ensureNotLingering` is passed it will first turn on the respective option in service-daemon so that closing the repository causes repository and its child processes to exit instantly.

### arguments

- ensureNotLingering, boolean

GET /catalogs/[CATNAME]/repositories/[REPOSITORY]/warmstandby

Returns a representation of the current standby status for repository.

Only supports an `application/json` accept type.

PUT /catalogs/[CATNAME]/repositories/[REPOSITORY]/warmstandby

Set up warm-standby on this repository.

Requires `jobname`, `primary`, `primaryPort`, `user`, and `password` parameters. Makes this repository start replicating the source store on the server `primary`:`primaryPort`, using the given credentials to gain access.

### arguments

- jobname, string
- primary, string
- primaryPort, string
- user, string
- password, string

DELETE /catalogs/[CATNAME]/repositories/[REPOSITORY]/warmstandby

Stops a replication job.

This command is sent to the client.

GET /catalogs/[CATNAME]/repositories/[REPOSITORY]/warmstandby/jobnames

Get a list of replication jobnames

POST /catalogs/[CATNAME]/repositories/[REPOSITORY]/warmstandby/registerJobname

Register a replication jobname

### arguments

- jobname, string

POST /catalogs/[CATNAME]/repositories/[REPOSITORY]/warmstandby/startServer

Start a warm standby server.

POST /catalogs/[CATNAME]/repositories/[REPOSITORY]/warmstandby/switchRole

Sent to a repository that is currently functioning as a replication server (i.e., a primary). Causes a client (identified by the `jobname` parameter) to take over, making this repository a client of that new server.

The `becomeClient` boolean parameter, which defaults to true, determines whether the server will start replicating its old client. The `enableCommit` parameter, also defaulting to true, controls whether no-commit mode will be turned off in the client.

### arguments

- jobname, string
- becomeClient, boolean (default: true)
- enableCommit, boolean (default: true)
- user, string
- password, string

POST /catalogs/[CATNAME]/repositories/[REPOSITORY]/warmstandby/unregisterJobname

Unregister a replication jobname

### arguments

- jobname, string

GET /config/fti-stop-words

Returns list of default stop words for freetext indices

GET /configfile

Return the AllegroGraph configuration file.

### arguments

- type, string (default: main)
  Config file type (currently, only main

GET /configfiles

Return a JSON object with keys being known config types (main, cluster) and values indicating if they are present.

GET /databricks/available-tables

Returns a list of all available tables in the Databricks warehouse.

### arguments

- profile, string
  A profile from the .databrickscfg. If not passed, a first one from profiles list is used.
- warehouse-id, string
  Databricks Warehouse ID.

DELETE /databricks/clean

Clean up temporary files created by databricks/* services

### arguments

- file-name, string
  To remove a specific file. If not provded, cleans the whole folder.

PUT /databricks/download-csv

Download a CSV file from Databricks DBFS and returns the path to local CSV file and a sample data from it.

### arguments

- profile, string
  A profile from the .databrickscfg. If not passed, a first one from profiles list is used.
- path, string
  Path to CSV file in dbfs.
- sample-rows, integer (default: 10)
  Number of rows to sample from the CSV file.

DELETE /databricks/export-table/cancel

Cancels the job run.

### arguments

- profile, string
  A profile from the .databrickscfg. If not passed, a first one from profiles list is used.
- run-id, string
  Unique id of the run.

PUT /databricks/export-table/exec

Asynchronously executes a python notebook with 24h wait timeout. Returns run-id for further pulling the result of execution and status.

### arguments

- profile, string
  A profile from the .databrickscfg. If not passed, a first one from profiles list is used.
- table, string
  Name of the table to export.

GET /databricks/export-table/result

Returned structure depends on the status of the job run:

- on success, it's { "path": "path-name", "sample-rows": [<csv rows>] }.
- on error, it's { "notebook_output": "error message" }.
- in other cases, it's { "state": "<one of Databricks job run states>" }.

### arguments

- profile, string
  A profile from the .databrickscfg. If not passed, a first one from profiles list is used.
- sample-rows, integer (default: 10)
  Number of rows to sample from the CSV file.
- run-id, string
  Unique id of the run.

GET /databricks/list-files

Returns a list of paths to downloaded files from Databricks.

### arguments

- sample-rows, integer (default: 10)
  Number of rows to sample from the CSV file.

GET /databricks/profiles

Returns a list of profiles from the .databrickscfg.

DELETE /databricks/statement/cancel

Cancels the SQL statement execution.

### arguments

- profile, string
  A profile from the .databrickscfg. If not passed, a first one from profiles list is used.
- statement-id, string
  Unique id of the statement execution.

PUT /databricks/statement/exec

Asynchronously executes a SQL statement without a wait timeout. Returns statement-id for further pulling the result of execution and status.

### arguments

- profile, string
  A profile from the .databrickscfg. If not passed, a first one from profiles list is used.
- warehouse-id, string
  Databricks Warehouse ID.
- statement, string
  SQL statement to execute.

GET /databricks/statement/result

Returns an path to the downloaded CSV file with sample on success or the original Databricks response for the SQL statement's status in other cases.

### arguments

- profile, string
  A profile from the .databrickscfg. If not passed, a first one from profiles list is used.
- sample-rows, integer (default: 10)
  Number of rows to sample from the CSV file.
- statement-id, string
  Unique id of the statement execution.

GET /databricks/warehouses

Returns a list of all available Databricks warehouses.

### arguments

- profile, string
  A profile from the .databrickscfg. If not passed, a first one from profiles list is used.

GET /fedshard/define

Return the compiled definitions of the given fedshard repo or of all repos

### arguments

- repo, string-or-nil
  The name of the repo whose compiled definition is returned or all definitions if repo is nil
- outputFormat, string
  Format of the result; available options: application/json, application/lisp.

PUT /fedshard/define

Define one or more of fedshard repos

### arguments

- supersede, boolean
  true means overwriting existing definitions is permitted. (default is false)

DELETE /fedshard/define

Delete the definition but not the files of the named repo in the fedshard catalog

### arguments

- repo, string
  The name of the fedshard repo in the fedshard catalog whose definition will be deleted.

DELETE /fedshard/delete-metadata

Delete the metadata of the named repo in the fedshard catalog. The metadata are such things as query options and namespaces that are usually set using Webview.

### arguments

- repo, string
  The name of the fedshard repo in the fedshard catalog whose metadata will be deleted.

PUT /graphtalker/install

Download and install a given GraphTalker version from Franz Inc. website.

### arguments

- version, string
  Version to install.
- no-set-active, boolean
  Do not set new installed version as active.
- from-tarball, string-or-nil
  Tarball to use instead of downloading a new one. Supported for local installation only.

GET /graphtalker/list/available

List all GraphTalker versions available for installation. Contacts Franz Inc. website.

GET /graphtalker/list/installed

List all GraphTalker versions that are installed locally.

PUT /graphtalker/set-active

Set given installed GraphTalker version as active. It will be used to run GraphTalker when invoked from AGWebView.

### arguments

- version, string
  Version to use as active.

DELETE /graphtalker/uninstall

Uninstall a given GraphTalker version. Returns an error if given version is an active one.

### arguments

- version, string
  Version to uninstall.

PUT /gruff/install

Download and install a given Gruff version from Franz Inc. website.

### arguments

- version, string
  Version to install.
- no-set-active, boolean
  Do not set new installed version as active.
- from-tarball, string-or-nil
  Tarball to use instead of downloading a new one. Supported for local installation only.

GET /gruff/list/available

List all Gruff versions available for installation. Contacts Franz Inc. website.

GET /gruff/list/installed

List all Gruff versions that are installed locally.

PUT /gruff/set-active

Set given installed Gruff version as active. It will be used to run Gruff when invoked from AGWebView.

### arguments

- version, string
  Version to use as active.

DELETE /gruff/uninstall

Uninstall a given Gruff version. Returns an error if given version is an active one.

### arguments

- version, string
  Version to uninstall.

GET /hostname

Return the hostname or ip address of the server

### arguments

- timeout, integer (default: 15)
  The maximum number of seconds we'll wait to compute an answer.

GET /initfile

Retrieve the server's initialization file.

The initialization-file is a collection of Common Lisp code that is executed on every shared back-end when it starts (see [sessions] for more details).

PUT /initfile

Replace the current initialization file with the body of the request.

### arguments

- restart, boolean (default: true)
  If true, then any running shared backends will be restarted. This ensures that subsequent requests will use the new initialization file.
- warnings-are-errors, boolean
  If true then warnings are considered errors and will cancel the upload
- verbose, boolean
  If true then the compiler will write compilation messages to the agraph.log file

DELETE /initfile

Remove the server's initialization file.

GET /job

Returns the string, which represents a status of the job with JOB-ID.

### arguments

- jobId, string

GET /jobs

Returns lists of strings of the following form that describe all running jobs: ("kind" "port" "name" "catalog" "uuid" "description" "age" "status").

"kind" is a string, that's equal to either "session" or "backend"; "port" is either a session port or a backend port; "name" is a repo name of the job for backend jobs, nil otherwise; "catalog" is a catalog name of the job for backend jobs, nil otherwise; "uuid" is the job UUID; "description" is the query string; "ageInSeconds" is the time since the job was created, in seconds; "status" is the job's current status.

Only query jobs are returned.

DELETE /jobs

Cancels the specified job.

### arguments

- jobId, string

GET /jobsNumber

Returns the number of session jobs and backend jobs in JSON.

GET /largeOperationWarning

Return the text used for the large operation warnings.

PUT /largeOperationWarning

Set the text used for the large operation warnings.

GET /logfile

Return the AllegroGraph log file.

If specified, `startAt` and `length` override the `all` argument.

### arguments

- all, boolean
  If true, then the entire log file is returned. Otherwise, only the last 100 kilobytes are returned.
- startAt, integer
  If specified, return the log file starting at this position. If negative, start at this position bytes before the end of the file.
- length, integer
  If specified, return at most this many bytes.

GET /lookup-llm

Return the parameters of the llm matching the arguments. If no vendor is specified then all llms are returned

### arguments

- vendor, string-or-nil (default: )
  name of vendor
- outputFormat, string
  Format of the result; available options: application/json, application/lisp.

GET /namespaces

Retrieve the standard namespaces AllegroGraph uses

GET /nd/computeSubtype

Compute a geospatial nD-datatype specification given either a datatype or a list of ordinates.

The list of ordinates is described using $-prefixed names for each of the ordinates (in order). Each name must have a type, a minimum and maximum, a resolution and, optionally, a strip width. For example, these names must be included to describe the ordinate named `test`:

    $test-type
    $test-resolution
    $test-width
    $test-min
    $test-max

The REST command returns a description of the nD-geospatial subtype specified by the parameters to the query. Currently, this can either be in text/plain or application/json.

### arguments

- datatype, string
- all-vars, vars

GET /processes

Returns a list of tuples describing the server's currently running processes.

Each tuple has `pid` (the OS process ID), `name` (the process name), and displayName (a prettier name to use for display) properties.

DELETE /processes/[NAME]

Kills the specified process.

This should only be done if absolutely necessary as it can have adverse effects on the functioning of the server.

GET /processes/[NAME]/pidName

Returns name of the process with pid PID. If no such process can be found the error will be reported.

GET /processes/[NAME]/stacktrace

Returns stack traces for the threads in the given process.

POST /processes/[NAME]/telnet

Start a telnet server for the specified process.

An arbitrary port will be assigned to the server and returned as the response.

Security Note: any process on the same machine as the AllegroGraph server will be able to connect to the telnet server.

GET /protocol

Returns the protocol version of the Sesame interface. The protocol described in this document is `4`.

GET /queryPlanners

Return the planners that can be used to reorder Basic Graph patterns in a SPARQL query. These can be used in the clauseReorderer query plan option.

POST /reconfigure

Posting to this URL will cause the server to re-read its configuration file, and update itself to reflect the new configuration.

POST /reopenLog

Causes the server to re-open its log file. This is useful for log rotation.

GET /repositories

Return a list of repositories available in the catalog.

### arguments

- all, boolean
  If `true`, then all of the repositories in all of the catalogs will be returned.
- checkMmrStatus, boolean (default: true)

PUT /repositories/[REPOSITORY]

Creates a new, empty repository.

When a repository with the given name already exists, it is overwritten, unless a parameter override with value false is passed.

### arguments

- expectedSize, integer
  Specifies the expected number of triples in the repository
- stringTableSize, integer
  Specifies the expected number of strings in the repo
- index, list
  Can be specified multiple times. Must hold index names, and is used to configure the set of indices created for the store.
- stringTableCompression, string
  Specifies the type of string compression to use. The default is 'none'. See Server Configuration and Control for information on stringTableCompression
- override, string (default: true)
- restore, string
- nocommit, boolean

DELETE /repositories/[REPOSITORY]

Delete the specified repository. This can fail if the repository is being accessed by another client.

GET /repositories/[REPOSITORY]/auto/optimize/message

Return the last message written by the automatic optimizer

PUT /repositories/[REPOSITORY]/auto/optimize/start

Start automatic optimization on this repository

### arguments

- workers, integer (default: 1)
  The number of simultaneous optimizations to run
- operate, integer (default: 0)
  The number of seconds to run. Zero means forever.
- interval, integer (default: 120)
  The number of seconds before checking if there is an optimization to perform
- idle, integer (default: 120)
  The number of seconds an index must be idle before an optimization is started.

GET /repositories/[REPOSITORY]/auto/optimize/status

Return whether the auto optimizer is running or stopped

PUT /repositories/[REPOSITORY]/auto/optimize/stop

Stop automatic optimization on this repository

POST /repositories/[REPOSITORY]/backup

Create a backup of the repository.

### arguments

- target, string

POST /repositories/[REPOSITORY]/ensureNotLingering

To conserve resources, makes the database instance and its child processes exit if the instance is unused. Takes no arguments, returns nothing.

Normally unused database instances linger for InstanceTimeout seconds to speed up subsequent open operations.

GET /repositories/[REPOSITORY]/exists

Return true if the triple-store exists and is accessible to the current user.

Will return an HTTP 401 (Unauthorized) if the user is not authorized to read from the requested catalog and an HTTP 404 (Not Found) if the user is authorized but the store does not exist.

GET /repositories/[REPOSITORY]/namespaces

Return the currently active namespaces for the current user in this repository.

The namespaces are returned as tuples with fields `prefix` and `namespace` (as well as `type` and `shadowed` if `effective` is `false`, where `type` is one of `default`, `repository` or `user` and `shadowed` indicates whether the option is shadowed by a higher priority definition.

### arguments

- type, string (default: user)
  Type of the declaration (possible values "user", "repository", "default"). Additionally, "any" can be specified to return all namespaces.
- effective, boolean (default: true)
  If `effective` is `false`, return all namespaces, including the shadowed ones.

DELETE /repositories/[REPOSITORY]/namespaces

Deletes all namespaces of the specified type.

### arguments

- type, string (default: user)
  Type of the declaration (possible values "user", "repository", "default").
- reset, boolean
  If specified and true, all namespaces on the specified level are removed, unshadowing the definitions on the previous level. The definitions on the default level are reset to the default namespaces.

POST/PUT /repositories/[REPOSITORY]/namespaces/[PREFIX]

Create or update a namespace definition.

The body of the request must contain the namespace for the prefix as plain text.

### arguments

- type, string (default: user)
  Type of the declaration (possible values "user", "repository", "default").

GET /repositories/[REPOSITORY]/namespaces/[PREFIX]

Returns the namespace expansion for the given prefix.

### arguments

- type, string (default: user)
  Type of the declaration (possible values "user", "repository", "default").

DELETE /repositories/[REPOSITORY]/namespaces/[PREFIX]

Delete a namespace definition.

### arguments

- type, string (default: user)
  Type of the declaration (possible values "user", "repository", "default").

GET /repositories/[REPOSITORY]/query-options

Return the currently active query options for the current user in this repository.

The query options are returned as tuples with fields `name` and `value` (as well as `type` and `shadowed` if `effective` is `false`, where `type` is one of `default`, `repository` or `user` and `shadowed` indicates whether the option is shadowed by a higher priority definition.

### arguments

- type, string (default: user)
  Type of the declaration (possible values "user", "repository", "default"). Additionally, "any" can be specified to return all query options.
- effective, boolean (default: true)
  If `effective` is `false`, return all query options, including the shadowed ones.

DELETE /repositories/[REPOSITORY]/query-options

Deletes all query options of the specified type.

### arguments

- type, string (default: user)
  Type of the declaration (possible values "user", "repository", "default").
- reset, boolean
  If specified and true, all query options on the specified level are removed, unshadowing the definitions on the previous level. The definitions on the default level are reset to the default query options.

POST/PUT /repositories/[REPOSITORY]/query-options/[NAME]

Create or update a query option value.

The body of the request must contain the value for the name as plain text.

### arguments

- type, string (default: user)
  Type of the declaration (possible values "user", "repository", "default").

GET /repositories/[REPOSITORY]/query-options/[NAME]

Returns the value of the given query option.

### arguments

- type, string (default: user)
  Type of the declaration (possible values "user", "repository", "default").

DELETE /repositories/[REPOSITORY]/query-options/[NAME]

Delete a query option.

### arguments

- type, string (default: user)
  Type of the declaration (possible values "user", "repository", "default").

PUT /repositories/[REPOSITORY]/repl/controllingInstance

Specify the name of the new controlling instance. This command must be sent to the current controlling instance. If the current controlling instance is down then it can be sent to any instance if 'force' is specified as 'true'

### arguments

- instanceName, string
  Name of the instance to become the controlling instance
- force, string (default: false)
  If true then allow any instance to set the controlling instance

PUT /repositories/[REPOSITORY]/repl/createCluster

Create the first instance of a replication cluster.

### arguments

- host, string
  A hostname or IP address for this host that's reachable from all other instances in the cluster
- port, integer
  The port of the Agraph server for the specified scheme
- instanceName, string
  A unique name for this respository to be used in control commands
- group, string
  Group name used in the computation of commit request priorities
- user, string
  User name used by other instances to access the created repository
- password, string
  Password used by other instances to access the created repository
- scheme, string
  Method used to communicate with agraph server: can be http (the default) or https
- ifExists, string (default: supersede)
  Value is 'use' to open existing repo, 'supersede' or 'overwrite' to create fresh repo or 'error' to signal an error if the repo exists. Whichever is chosen the repo will be the lone member of the cluster when it's opened
- standalone, string (default: false)
  If specified as 'true' then this repo can be read and written but will never join a cluster as long as it remains open.
- shardInfo, string
  information about this shard and its place in the distributed db

GET /repositories/[REPOSITORY]/repl/get-config

Return the MMR configuration in lineparse format

PUT /repositories/[REPOSITORY]/repl/growCluster

add instance to cluster

### arguments

- host, string
  A hostname or IP address for this host that's reachable from all other instances in the cluster
- port, integer
  The port of the Agraph server to hold the new instance
- name, string
  The name of the repository for the new instance
- instanceName, string
  A unique name for this respository to be used in control commands
- user, string
  User name if needed to access the server
- password, string
  Password if needed to access the server
- catalog, string
  The catalog for the new repo (if other than the root catalog)
- group, string
  Group name used in the computation of commit request priorites
- scheme, string
  Method used to communicate with agraph server: can be http (the default) or https
- backupServerFilename, string
  The filename on the host of the new instance that holds a backup of the database to be restored to create the new instance
- shardInfo, string
  information about this shard and its place in the distributed db

POST /repositories/[REPOSITORY]/repl/priority

Set the priorities between instances and groups.

### arguments

- expression, string
  json expression specifying priorites between instances or groups

PUT /repositories/[REPOSITORY]/repl/quiesce

Control whether commits are permitted and whether to wait until the instance is up to date with commits

### arguments

- action, string
  Either "stop", "stopall", "start", "startall", "ready", "readyall", or "restartall"
- timeout, integer (default: 120)
  Number of seconds to wait for action to take effect before returning a timed out response

PUT /repositories/[REPOSITORY]/repl/remove

Permanently remove an instance from the cluster. The command is sent to the controlling instance.

### arguments

- instanceName, string
  Name of the instance to be permanently removed from the cluster
- timeout, integer (default: 180)
  Number of seconds to wait for durability to be achieved before giving up on the remove operation. Maximum is 180 seconds
- force, string
  If true will remove instance after waiting no more than timeout seconds even if there are outstanding non-durable commits
- undo-repl, boolean
  If true will convert removed repo to a normal repo

PUT /repositories/[REPOSITORY]/repl/set-config

Set the MMR configuration from a lineparse description

GET /repositories/[REPOSITORY]/repl/settings

Return the current settings of repl parameters

POST /repositories/[REPOSITORY]/repl/settings

Set the values of replication parameters and return all of the settings.

### arguments

- transactionLatencyCount, integer
  How many non-durable transactions are permitted (a non-negative value) before a commit will not be permitted
- distributedTransactionTimeout, integer
  Number of seconds to wait for a transaction to become durable until letting the commit finish
- durability, string
  The number of instances that must have a copy of a commit before it's considered durable. The value can be a positive integer or one of the three strings: min (meaning 1), max (meaning all instances) or quorum (meaning the next integer greater than half of the instances)
- transactionLatencyTimeout, integer
  Number of seconds to wait for the transactionLatencyCount to be satisified when committing before signalling an error

PUT /repositories/[REPOSITORY]/repl/start

Restart a stopped instance in the cluster. If the instanceName argument is given then that instance is started. If instanceName is not given then the instance started is the one to which the command is sent.

### arguments

- instanceName, string
  Name of the instance to start. If not given then the instance to which this message is sent is started

GET /repositories/[REPOSITORY]/repl/status

Return the status of the instance.

### arguments

- form, string (default: text)
  Can be 'text' (the default) or 'json' to specify how the results are returned
- if-after, integer (default: 0)
  Only return if the configuration is newer than this version

PUT /repositories/[REPOSITORY]/repl/stop

Stops an instance. The instance will receive no commits from other instances and no commits can be done on this instance. This instance can be restarted unless undo-repl is true. The instance named by instanceName is stopped. If instanceName is not given the the instance to which the command is sent is stopped.

### arguments

- timeout, integer (default: 180)
  Number of seconds to wait for durability to be achieved before giving up on the stop operation. Maximum is 180 seconds
- force, string
  If true will stop instance after waiting no more than timeout seconds even if there are outstanding non-durable commits
- instanceName, string
  Name of the instance to stop. If not given then the instance to which this message is sent is stopped
- undo-repl, boolean
  If true then convert repo to non-repl repo before stopping it

PUT /repositories/[REPOSITORY]/retain

Specify which transaction log files must be retained

### arguments

- mustRetain, integer
  The ID of the maximum transaction log that must be retained. A value of -1 will turn off this check.
- sinceTime, string
  All transactions since the given date must be retained. The data can be an ISO date, "now", or a universal time. A value of -1 will turn off this check
- timeInterval, integer
  Transaction log entries between now and timeInterval seconds ago will be retained. You can use this to retain, say, the last 24 hours of entries by specifying 86400 seconds. A value of -1 turns off this check

GET /repositories/[REPOSITORY]/scripts

Return the list of scripts that have been added to this repository.

GET /repositories/[REPOSITORY]/scripts/[NAME]

Return the contents of the script NAME in this repository.

PUT /repositories/[REPOSITORY]/scripts/[NAME]

Add or replace the script NAME in this repository with the contents of the body.

### arguments

- warnings-are-errors, boolean
  If true then warnings are considered errors and will cancel the upload
- verbose, boolean
  If true then the compiler will write compilation messages to the agraph.log file

DELETE /repositories/[REPOSITORY]/scripts/[NAME]

Delete the script NAME in this repository.

POST /repositories/[REPOSITORY]/session

Starts a new session for the repository.

### arguments

- autoCommit, boolean (default: true)
  Specify whether or not the session should use transactions.
- lifetime, integer
  The number of seconds the session can be idle before being shutdown and reclaimed.
- loadInitFile, boolean
  If true, then the initfile will be loaded when the session starts.
- script, list
  The name of a script file to load; may be specified multiple times.

POST /repositories/[REPOSITORY]/shutdown

Closes respository. Sends `close` to each shared backend, but does not attempt to close open sessions.

If `ensureNotLingering` is passed it will first turn on the respective option in service-daemon so that closing the repository causes repository and its child processes to exit instantly.

### arguments

- ensureNotLingering, boolean

GET /repositories/[REPOSITORY]/warmstandby

Returns a representation of the current standby status for repository.

Only supports an `application/json` accept type.

PUT /repositories/[REPOSITORY]/warmstandby

Set up warm-standby on this repository.

Requires `jobname`, `primary`, `primaryPort`, `user`, and `password` parameters. Makes this repository start replicating the source store on the server `primary`:`primaryPort`, using the given credentials to gain access.

### arguments

- jobname, string
- primary, string
- primaryPort, string
- user, string
- password, string

DELETE /repositories/[REPOSITORY]/warmstandby

Stops a replication job.

This command is sent to the client.

GET /repositories/[REPOSITORY]/warmstandby/jobnames

Get a list of replication jobnames

POST /repositories/[REPOSITORY]/warmstandby/registerJobname

Register a replication jobname

### arguments

- jobname, string

POST /repositories/[REPOSITORY]/warmstandby/startServer

Start a warm standby server.

POST /repositories/[REPOSITORY]/warmstandby/switchRole

Sent to a repository that is currently functioning as a replication server (i.e., a primary). Causes a client (identified by the `jobname` parameter) to take over, making this repository a client of that new server.

The `becomeClient` boolean parameter, which defaults to true, determines whether the server will start replicating its old client. The `enableCommit` parameter, also defaulting to true, controls whether no-commit mode will be turned off in the client.

### arguments

- jobname, string
- becomeClient, boolean (default: true)
- enableCommit, boolean (default: true)
- user, string
- password, string

POST /repositories/[REPOSITORY]/warmstandby/unregisterJobname

Unregister a replication jobname

### arguments

- jobname, string

GET /requests

Returns a JSON object containing information about all pending and a limited number of finished requests for all AllegroServe instances running. This includes requests to the main AllegroGraph URL, the backends and sessions.

Each request contains the following information: - uri - the URL of the request - method - one of HTTP methods like 'get', 'post', etc. - statusCode - response status or null (if request not finished yet) - source - IP and port of the requester - started - Unix timestamp (in nanoseconds) of the moment the request was received by the server - finished - Unix timestamp (in nanoseconds) of the moment the server finished answering the request, or null if the request not finished yet. - duration - Duration of the request in nanoseconds. For pending requests, this is the duration of the request until now.

Requires superuser privileges.

GET /roles

Return a list of the roles defined on the server.

PUT /roles/[NAME]

Add a new role to the server.

DELETE /roles/[NAME]

Remove the role named `name` from the server.

GET /roles/[NAME]/access

Retrieve the `read`/`write` access for a user.

This returns a result set, each element of which has a `read`, `write`, `catalog`, and `repository` component as well as additional flags (e.g. `query-results-limit`). The first two (`read` and `write`) are booleans, the following two (`catalog` and `repository`) are strings. Additional flags are boolean. For permissions granted globally, `catalog` and `repository` will have a value of `"*"`, for those granted per-catalog, only `repository` will be `"*"`. `catalog` normally contains the catalog name, but `"/"` is used for the root catalog.

For example, read access to all repositories in the `public` catalog is specified (in JSON format) by:

    {read: true, write: false, catalog: "public", repository: "*",
     query-results-limit: false}

Whereas read/write access to repository `scratch` in the root catalog would be:

    {read: true, write: true, catalog: "/", repository: "scratch",
     query-results-limit: false}

PUT /roles/[NAME]/access

Modify the `read`/`write` access of a user or role.

### arguments

- read, boolean
  Whether to grant `read` access.
- write, boolean
  Whether to grant `write` access.
- query-results-limit, boolean
  Whether to enable `query-results-limit`.
- catalog, string (default: *)
  Which catalog to grant the access on. Leave off or use `*` to grant access on all catalogs; use `/` for the root catalog.
- repository, string (default: *)
  Specifies the repository that access is granted on. Passing `*` or leaving the parameter off is used to change access for all of the repositories in a catalog.

DELETE /roles/[NAME]/access

Similar to PUT Access but this deletes the `read`/`write` access of a user or role.

### arguments

- read, boolean
  Whether to remove `read` access.
- write, boolean
  Whether to remove `write` access.
- query-results-limit, boolean
  Whether to disable `query-results-limit`.
- catalog, string (default: *)
  Which catalog to grant the access on. Leave off or use `*` to grant access on all catalogs; use `/` for the root catalog.
- repository, string (default: *)
  Specifies the repository that access is granted on. Passing `*` or leaving the parameter off is used to change access for all of the repositories in a catalog.

GET /roles/[NAME]/attributes

Return the attributes specified for a user or role

PUT /roles/[NAME]/attributes

Specify the attributes for a set of repos for a user or role

### arguments

- catrepo, string
- attributes, string

DELETE /roles/[NAME]/attributes

Delete the attributes for a set of repos for a user or role

### arguments

- catrepo, string
- attributes, string

GET /roles/[NAME]/color

Return the color that has been assigned to a user or role.

PUT /roles/[NAME]/color

Assigns the given color to this user or role.

DELETE /roles/[NAME]/color

Unset the color for this user or role.

GET /roles/[NAME]/permissions

Return a list of permissions flags that have been assigned to a user or role.

Example flags include `super`, `eval`, `session`.

GET /roles/[NAME]/permissions/[TYPE]

Return the value of the permission `type` for a user or role.

PUT /roles/[NAME]/permissions/[TYPE]

Assigns the given permission to this user. `type` should be `super`, `eval`, `session` or one of the other defined permission flags.

DELETE /roles/[NAME]/permissions/[TYPE]

Revokes the given permission for this user.

GET /roles/[NAME]/security-filters/[TYPE]

Get list of security filters for a user.

Type may be `allow` or `disallow`. The returned items have keys `s`, `p`, `o`, and `g` as per the parameters for POST security-filters.

POST /roles/[NAME]/security-filters/[TYPE]

Create security-filter for the user or role.

`type` should be allow or disallow. The `subject`, `predicate`, `object` and `graph` fields are all optional. See the Security filters Documentation for more details.

### arguments

- s, string
  The `subject` for the filter
- p, string
  The `predicate` for the filter
- o, string
  The `object` for the filter
- g, string
  The `graph` for the filter

DELETE /roles/[NAME]/security-filters/[TYPE]

Delete a security-filter for the user or role.

`type` should be allow or disallow. The `subject`, `predicate`, `object` and `graph` fields are all optional. See the Security filters Documentation for more details.

### arguments

- s, string
  The `subject` for the filter
- p, string
  The `predicate` for the filter
- o, string
  The `object` for the filter
- g, string
  The `graph` for the filter

POST /scheduler/createEvent

Add an Event to the calendar for the scheduler to process

### arguments

- dateTime, string
  The time the event is to occur in ISO 8601 format 2018-08-04T19:34:03+07:00 or the simple format 2/24/2018 12:34
- repeatEvery, string
  either 'day', 'month', or 'Monday' through 'Sunday'
- repeatUntil, string
  The time after which the event cannot repeat in ISO 8601 format 2018-08-04T19:34:03+07:00 or the simple format 2/24/2018 12:34
- action, string
  name of action or 'script' if an executable will be run
- script, string
  name of executable to run
- eventName, string
  name for this event
- emailSuccess, string
  list of email address for success notification
- emailFailure, string
  list of email address for failure notification
- tzOffset, integer
  The timezone to use for the dateTime and repeatUntil parameters (if they do not include a timezone), expressed in minutes west of GMT

PUT /scheduler/deleteEvents

Delete all scheduler events that match either ID, eventName or owner. If no arguments are given then no events are deleted.

### arguments

- id, string
  Event ID of the event to delete
- eventName, string
  Event name of the event(s) to delete
- owner, string
  Delete all events for this owner

GET /scheduler/events

Return a user's events as an array of json objects. If user is superuser show everyone's events

### arguments

- tzOffset, integer
  The time zone (expressed in minutes west of GMT) to use when displaying event times

GET /scheduler/log

Return user's log entries as an array of json objects. If user is a superuser then return everyone's log events

### arguments

- limit, integer
  Return no more than this number of recent events
- from, integer
  Return entries beginning with this log id
- tzOffset, integer
  The time zone (expressed in minutes west of GMT) to use when displaying log times

PUT /scheduler/log

Set the number of recent log entries to retain in the scheduler.

### arguments

- retain, integer
  Remember no more than this number of recent events

GET /scripts

Return a list of the names of the scripts stored on the server.

GET /scripts/[NAME]

Return the sitescript NAME.

PUT /scripts/[NAME]

Import a new sitescript NAME.

The body of the request should contain the new script. Scripts whose name ends in `.fasl` are assumed to be compiled Lisp code (you are responsible for ensuring that it is compatible with the server), scripts whose name ends on '.js' are assumed to be JavaScript (ECMAScript), anything else is assumed to be raw Common Lisp code, which the server will compile.

### arguments

- warnings-are-errors, boolean
  If true then warnings are considered errors and will cancel the upload
- verbose, boolean
  If true then the compiler will write compilation messages to the agraph.log file

DELETE /scripts/[NAME]

Delete the script at `path*`.

GET /serverWarnings

Retrieve any operational warnings from the AllegroGraph server as tuples consisting of a warning identifier tag and descriptive text.

POST /serverWarnings

Record a server warning.

Only a user with superuser access may record warnings.

### arguments

- tag, string
- text, string
- category, string (default: user)
- log, boolean

DELETE /serverWarnings

Dismiss the server warning identified by tag.

Only a user with superuser access may dismiss warnings.

### arguments

- tag, string

GET /session

Retrieve information about the currently running sessions.

POST /session

Starts a new session.

The minilanguage used by the `store` parameter works as follows:

`<store1>`
  Indicates the triple store named "store1" in the root catalog.
`<catalog1:store2>`
  The triple store "store2" in the "catalog1" catalog.
`<http://USER:PASSWORD@HOST:PORT/repositories/REPONAME>` `<http://USER:PASSWORD@HOST:PORT/catalog/CATNAME/repositories/REPONAME>`
  A remote store, by URL. If the URL points to the server itself, the store will be opened locally. USER and PASSWORD are not required if the remote server allows for anonymous access to the specified store.
`<a> + <b>`
  The federation of stores "a" and "b".
`<a>[rdfs++]`
  The store "a", with `rdfs++` reasoning applied (`restriction` is also supported as a reasoner type). You can specify the context that inferred triples get using this syntax: `<a>[rdfs++#<http://test.org/mycontext>]`
`<a>{null <http://example.com/graph1>}`
  Store "a", filtered to only contain the triples in the default graph (`null`) and the graph named `http://example.com/graph1`. Any number of graphs can be given between the braces.

This syntax can be composed to created federations of filtered and reasoning stores, for example `<http://somehost:10035/repositories/a>{null} + <b>[rdfs++]`.

The service returns the URL of the new session. Any sub-URLs that were valid under a repository's URL will also work under this session URL. For example, if `http://localhost:55555/sessions/7e8df8cd-26b8-26e4-4e83-0015588336ea` is returned, you can use `http://localhost:55555/sessions/7e8df8cd-26b8-26e4-4e83-0015588336ea/statements` to retrieve the statements in the session.

### arguments

- store, string
  A triple-store specification describing the store to open.
- autoCommit, boolean (default: true)
  Specify whether or not the session should use transactions.
- lifetime, integer
  The number of seconds the session can be idle before being shutdown and reclaimed.
- loadInitFile, boolean
  If true, then the initfile will be loaded when the session starts.
- script, list
  The name of a script file to load; may be specified multiple times.

GET /systemstat.json

Returns the current collected info history specified by the requestTree parameter in json.

### arguments

- startUt, integer (default: 0)
  If given, export only data after this timestamp. The value is a timestamp in milliseconds.
- id, integer
  Request id - will be echoed back to the client. This can be used to discard old responses arriving out of order due to the asynchronous nature of AJAX requests.
- requestTree, string
  The path to the data that the resulting json will contain. It can be either a certain fields, or a group of fields, if the information tree path is not specified all the way up to the end.

GET /token

Generate an access token for a given user to be used for token authentication.

### arguments

- user, string-or-nil
  User for whom the token is created
- expiresIn, integer-or-nil (default: 0)
  Seconds until token expiration (<= 0 if token should not expire).
- idleTimeout, integer-or-nil (default: 0)
  Number of seconds after which token is expired unless used (<= 0 if token should not expire if unused).
- type, string (default: login)
  Token type (login - regular login token, mmr - token for MMR inter-instance communication setup, agwv-password - token for AGWebView session management, gruff - token for Gruff authentication, graphtalker - token for GraphTalker authentication).

DELETE /token

Destroy token, effectively invalidating all future requests with it.

### arguments

- token, string
  Token to remove from active tokens.
- user, string-or-nil
  User for whom the token is created

GET /token/list

List all tokens registered for authenticated user.

### arguments

- user, string-or-nil
  User for whom the token is created
- outputFormat, string
  Format of the result; available options: application/json, text/plain.

GET /users

Returns either list of defined user names or the complete user and role definitions.

### arguments

- details, boolean
  If true will return complete user and role definitions

PUT /users

uploads a set of user and role descriptions

PUT /users/[NAME]

Create a new user.

### arguments

- password, string
  Specifies the user's password (can be left off when creating the anonymous user).

DELETE /users/[NAME]

Delete the user identified by `name`.

GET /users/[NAME]/access

Retrieve the `read`/`write` access for a user.

This returns a result set, each element of which has a `read`, `write`, `catalog`, and `repository` component as well as additional flags (e.g. `query-results-limit`). The first two (`read` and `write`) are booleans, the following two (`catalog` and `repository`) are strings. Additional flags are boolean. For permissions granted globally, `catalog` and `repository` will have a value of `"*"`, for those granted per-catalog, only `repository` will be `"*"`. `catalog` normally contains the catalog name, but `"/"` is used for the root catalog.

For example, read access to all repositories in the `public` catalog is specified (in JSON format) by:

    {read: true, write: false, catalog: "public", repository: "*",
     query-results-limit: false}

Whereas read/write access to repository `scratch` in the root catalog would be:

    {read: true, write: true, catalog: "/", repository: "scratch",
     query-results-limit: false}

PUT /users/[NAME]/access

Modify the `read`/`write` access of a user or role.

### arguments

- read, boolean
  Whether to grant `read` access.
- write, boolean
  Whether to grant `write` access.
- query-results-limit, boolean
  Whether to enable `query-results-limit`.
- catalog, string (default: *)
  Which catalog to grant the access on. Leave off or use `*` to grant access on all catalogs; use `/` for the root catalog.
- repository, string (default: *)
  Specifies the repository that access is granted on. Passing `*` or leaving the parameter off is used to change access for all of the repositories in a catalog.

DELETE /users/[NAME]/access

Similar to PUT Access but this deletes the `read`/`write` access of a user or role.

### arguments

- read, boolean
  Whether to remove `read` access.
- write, boolean
  Whether to remove `write` access.
- query-results-limit, boolean
  Whether to disable `query-results-limit`.
- catalog, string (default: *)
  Which catalog to grant the access on. Leave off or use `*` to grant access on all catalogs; use `/` for the root catalog.
- repository, string (default: *)
  Specifies the repository that access is granted on. Passing `*` or leaving the parameter off is used to change access for all of the repositories in a catalog.

GET /users/[NAME]/attributes

Return the attributes specified for a user or role

PUT /users/[NAME]/attributes

Specify the attributes for a set of repos for a user or role

### arguments

- catrepo, string
- attributes, string

DELETE /users/[NAME]/attributes

Delete the attributes for a set of repos for a user or role

### arguments

- catrepo, string
- attributes, string

GET /users/[NAME]/color

Return the color that has been assigned to a user or role.

PUT /users/[NAME]/color

Assigns the given color to this user or role.

DELETE /users/[NAME]/color

Unset the color for this user or role.

GET /users/[NAME]/data

Each user has a simple key-value store associated with it. This is mostly used by WebView to save settings, but can be useful in other applications.

This service returns a result set containing `id` and `uri` fields, listing the keys stored for this user, and the URL under which their data can be found (see below).

### arguments

- prefix, string

DELETE /users/[NAME]/data

Bulk delete user data. /USER/data?key=foo&key=bar - delete keys "foo" and "bar". /USER/data?prefix=wv - delete keys starting with "wv". /USER/data?prefix=wv&key=baz - delete the key "baz" AND all keys starting with "wv". /USER/data?prefix= - delete all keys.

### arguments

- prefix, string
- key, list

GET /users/[NAME]/data/[KEY]

Fetches the user-data under `key`. Returns a string.

PUT /users/[NAME]/data/[KEY]

Stores data in a user's key-value store. The request body should contain the data to store.

DELETE /users/[NAME]/data/[KEY]

Deletes data from a user's key-value store.

GET /users/[NAME]/effectiveAccess

Similar to access, but also includes the access granted to any of the user's roles.

GET /users/[NAME]/effectiveColors

Return a list of name/color tuples for the user and all of its roles that have a color.

GET /users/[NAME]/effectivePermissions

Return a list of permissions flags that have been assigned to a user or any of its roles.

Example flags include `super`, `eval`, `session`.

GET /users/[NAME]/gruff-queries

Provides the same API as /users/ /data but for queries created in Gruff.

### arguments

- prefix, string

GET /users/[NAME]/gruff-queries/[KEY]

Returns stringified JSON information about a query originally saved in Gruff.

PUT /users/[NAME]/gruff-queries/[KEY]

Updates a query originally saved in Gruff. The endpoint expects a stringified JSON in the body in the same format as the response of GET /users/ /data/ .

DELETE /users/[NAME]/gruff-queries/[KEY]

Removes a query originally saved in Gruff.

GET /users/[NAME]/loginTimeout

Get the login timeout for USER, in seconds.

If no there is no timeout -1 will be returned. Also note that timeouts are currently configured globally, not per-user.

POST /users/[NAME]/password

Update the password of the user `name`.

The new password must be included in the body of the HTTP request. The request must be authenticated with the actual password, not a token.

GET /users/[NAME]/permissions

Return a list of permissions flags that have been assigned to a user or role.

Example flags include `super`, `eval`, `session`.

GET /users/[NAME]/permissions/[TYPE]

Return the value of the permission `type` for a user or role.

PUT /users/[NAME]/permissions/[TYPE]

Assigns the given permission to this user. `type` should be `super`, `eval`, `session` or one of the other defined permission flags.

DELETE /users/[NAME]/permissions/[TYPE]

Revokes the given permission for this user.

GET /users/[NAME]/roles

Return a list of the user's roles

PUT /users/[NAME]/roles/[ROLE]

Add a role to a user.

DELETE /users/[NAME]/roles/[ROLE]

Remove a role from a user.

GET /users/[NAME]/security-filters/[TYPE]

Get list of security filters for a user.

Type may be `allow` or `disallow`. The returned items have keys `s`, `p`, `o`, and `g` as per the parameters for POST security-filters.

POST /users/[NAME]/security-filters/[TYPE]

Create security-filter for the user or role.

`type` should be allow or disallow. The `subject`, `predicate`, `object` and `graph` fields are all optional. See the Security filters Documentation for more details.

### arguments

- s, string
  The `subject` for the filter
- p, string
  The `predicate` for the filter
- o, string
  The `object` for the filter
- g, string
  The `graph` for the filter

DELETE /users/[NAME]/security-filters/[TYPE]

Delete a security-filter for the user or role.

`type` should be allow or disallow. The `subject`, `predicate`, `object` and `graph` fields are all optional. See the Security filters Documentation for more details.

### arguments

- s, string
  The `subject` for the filter
- p, string
  The `predicate` for the filter
- o, string
  The `object` for the filter
- g, string
  The `graph` for the filter

GET /uuids

Return all of the UUIDs of the repositories in all the catalogs

GET /version

docstring

GET /version/date

Return the date on which the server was built.

GET /version/full

docstring

GET /version/revision

Return the git hash of the revision that the server was built from.

GET /webview/version

Returns the current WebView version and its release date

PUT /webview/version

Set given AGWebView version as active. It will be downloaded if necessary.

### arguments

- version, string
  AGWebView version to use as active.

GET /webview/versions

List all AGWebView versions available for installation. Contacts Franz Inc. website.

### Back end

GET/POST /catalogs/[CATNAME]/repositories/[REPONAME]

Execute a SPARQL or Prolog select query.

Arguments of the form `$varname=value` specify variable bindings. Variables appearing in the query can be bound to a specific value outside the actual query using this mechanism. The value must be an N-Triples encoded RDF value. For example, if the value is an IRI, it must be wrapped in angle brackets.

### arguments

- query, string
  The query to evaluate
- update, string
  The update command to evaluate (POST requests only)
- queryLn, string (default: sparql)
  The query language to use (may be `sparql` or `prolog`)
- infer, string
  The inference mode to use if any
- limit, integer
  If `limit` is specifed and the query is a SPARQL query that also contains a LIMIT, then the minimum of the two will be used.
- offset, integer
  If `offset` is specifed and the query is a SPARQL query that also contains an OFFSET, then the sum of the two will be used.
- timeout, integer
- context, list
- namedContext, list
- defaultGraphName, list
- remove-graph-uri, list
- insert-graph-uri, string
- usingGraphURI, list
- usingNamedGraphURI, list
- default-graph-uri, list
- named-graph-uri, list
- uri, string
- baseURI, string
- checkVariables, string (default: default)
  If `yes`, then query warnings will cause the query to stop executing and fail.
- save, string
- analyzeIndicesUsed, boolean
- queryAnalysisTimeout, float
- queryAnalysisTechnique, string
- engine, string
- normalizeResult, boolean (default: true)
- logQuery, string
  If `log`, then query execution will be logged to agraph.log. If true, then the query will be processed, the results will be discarded, and the query log will be returned. Otherwise, no query logging will be performed unless the query itself enables it.
- returnPlan, boolean
- uuid, string
- accept, string
  Specify the content type that the request accepts. Note that this overrides any Accept-type value specified in the HTTP headers
- returnQueryMetadata, boolean
  If true, an additional HTTP header named `x-query-info` is returned. The header contains a URI encoded JSON encoding of query related metadata. If the client supports HTTP Trailers, then the x-query-final-info will contain the same information as x-query-info along with additional information collected during the execution of the query.

GET /catalogs/[CATNAME]/repositories/[REPONAME]/access

Return the access permissions the current user has for this repository.

PUT /catalogs/[CATNAME]/repositories/[REPONAME]/add-object

add an object to the vector store

### arguments

- text, string
- properties, s-expression
- embedding, single-float-vector
- api-key, string

PUT /catalogs/[CATNAME]/repositories/[REPONAME]/add-objects

add objects to the vector store

### arguments

- objects, s-expression
- api-key, string

GET /catalogs/[CATNAME]/repositories/[REPONAME]/attributes/definitions

Returns a JSON array containing JSON objects representing attribute definitions. If NAME is supplied returns an array containing a single JSON object, if an attribute of the given name exists, otherwise returns an empty array.

Examples:

[{"minimum-number":0,"maximum-number":1152921504606846975,"name":"attr","allowed-values":[],"id":1,"ordered":false}]

[{"minimum-number":5,"maximum-number":10,"name":"attr1","allowed-values":[5, 7, 10],"id":1,"ordered":true}, {"minimum-number":0,"maximum-number":20,"name":"attr2","allowed-values":[],"id":2,"ordered":false}]

### arguments

- name, string-or-nil
  If `name` is supplied, only information for the named attribute definition (if found) is returned.

POST /catalogs/[CATNAME]/repositories/[REPONAME]/attributes/definitions

Establishes or updates a triple attribute definition.

Attributes must be defined before they can be used. Defining an attribute establishes the name of an attribute and any constraints that should be placed on its use.

### arguments

- name, string
  `name` is a string naming the attribute.
- allowed-values, list
  `allowed-values` must be a list of string values that this attribute is allowed to take on. If the list is empty/nil, then this attribute will allow any string value.
- ordered, boolean
  If true, then the specified order of the `allowed-values` is significant. If 'false' or left unspecified then the order is not significant. Ordered attributes can be compared to one another. See the triple attributes reference guide for more information.
- minimum-number, integer-or-nil (default: 0)
  Specifies the minimum number of attributes of this type that must provided for each added triple. The default is 0.
- maximum-number, integer (default: most-positive-fixnum)
  Optionally specifies the maximum number of attributes of this type that may be provided for each added triple. The default when `ordered` is true is 1. When `ordered` is false, the default is 1,152,921,504,606,846,975.

DELETE /catalogs/[CATNAME]/repositories/[REPONAME]/attributes/definitions

Deletes an existing attribute definition.

If the named attribute definition was found and deleted, returns true.

If the named attribute definition was not found: If `error` is true (the default), throws an error. If `error` is false, returns false/nil.

Note that attribute definitions cannot be deleted if they are in use by the static attribute filter. An attempt to delete an attribute definition while it is in use will result in an error.

### arguments

- name, string
  A string naming the attribute definition to delete.
- error, boolean (default: true)
  (Optional) If 'true' (the default), an error will be generated if the named attribute definition does not exist. If 'false' an error will not be generated.

GET /catalogs/[CATNAME]/repositories/[REPONAME]/attributes/staticFilter

Returns the current static attribute filter for the triple store.

POST /catalogs/[CATNAME]/repositories/[REPONAME]/attributes/staticFilter

Sets the static attribute filter for the triple store.

When set, only triples which match the filter will be returned by any query against the store.

### arguments

- filter, string-or-nil
  (Optional) A string containing the filter expression. When unspecified the static attribute filter is removed and all triples will be returned for any query against the store.

DELETE /catalogs/[CATNAME]/repositories/[REPONAME]/attributes/staticFilter

Deletes the current static attribute filter for the triple store (if any).

POST /catalogs/[CATNAME]/repositories/[REPONAME]/backup-stream

Create a backup of the repository. Stream the backup file as a response.

POST /catalogs/[CATNAME]/repositories/[REPONAME]/begin

Begin a transaction

POST /catalogs/[CATNAME]/repositories/[REPONAME]/blankNodes

Return one or more blank nodes.

### arguments

- amount, integer (default: 1)
  The number of blank nodes to return.

GET /catalogs/[CATNAME]/repositories/[REPONAME]/bulkMode

Returns whether or not bulk-load mode is enabled for the repository.

PUT /catalogs/[CATNAME]/repositories/[REPONAME]/bulkMode

Enable bulk-load mode for the repository.

DELETE /catalogs/[CATNAME]/repositories/[REPONAME]/bulkMode

Disable bulk-load mode for the repository.

PUT /catalogs/[CATNAME]/repositories/[REPONAME]/clusterings

Create clusterings in a vector database. These are used to speedup nearest neighbor search

### arguments

- clusterings, integer (default: 2)
  The number of clusterings to create
- objects, integer (default: 250)
  The number of objects from the repo to use to create the clusterings
- clusters, integer (default: 10)
  The number of clusters per clustering
- iterations, integer (default: 2)
  The number of times a clustering is refined
- supersede, boolean
  true to replace an existing set of clusterings
- delete, boolean
  delete all clusterings from the repo
- update, boolean
  Only add new objects to existing clusters
- verbose, boolean
  true to log progress reports

POST /catalogs/[CATNAME]/repositories/[REPONAME]/commit

Commit the current transaction

### arguments

- leaveAutoCommitAlone, boolean
- phase, string
  If specified, `phase` must be `prepare` or `commit` to perform the corresponding phase of a two-phase commit operation.~ If `phase` is specified, then `xid` must also be specified.
- xid, string
  Specifies the transaction id of a two-phase commit. Required when `phase` is supplied.

GET /catalogs/[CATNAME]/repositories/[REPONAME]/contexts

Fetches a list of named graphs in the store.

Returns a set of tuples, each of which only has a `contextID` field, which is an N-triples string that names the graph.

PUT /catalogs/[CATNAME]/repositories/[REPONAME]/convert-to-vts

Ensure that the given triple store that is the value of `db` (default `*db*`) contains a vector store. If `db` is already a vector triple store then it will not be modified if `supersede` is nil. If `supersede` is true then the existing vector store in `db` will be completely removed before creating a new vector store in `db`. Only vector store triples will be deleted, the other triples in the store will remain. The `embedder`, `model` and `api-key` arguments are the same as for create-triple-store.

### arguments

- embedder, string
  name of the embedding service
- model, string-or-nil
  model to be used in the embedding service
- dimensions, integer-or-nil
  length of embedding vector
- embedding-api-key, string-or-nil
  api key, if any, need by the embedding service
- supersede, boolean
  Replace existing vector store (vectors and metadata only) if it exists
- compact-embeddings, boolean
  convert embeddings to 2 byte integer vectors

GET /catalogs/[CATNAME]/repositories/[REPONAME]/createSecondaryIndices

Return whether or not the store should create secondary indices (UPI-maps) at query time.

PUT /catalogs/[CATNAME]/repositories/[REPONAME]/createSecondaryIndices

Update the automatic secondary indices creation (UPI-maps) setting.

### arguments

- type, string (default: true)

DELETE /catalogs/[CATNAME]/repositories/[REPONAME]/createSecondaryIndices

Turn off automatic secondary indices creation (UPI-maps).

POST /catalogs/[CATNAME]/repositories/[REPONAME]/data-generator/patient

Adds and commits sample patient triples to the database.
Returns the number of triples added.

### arguments

- start-id, integer
  `start-id` specifies the starting patient id for generation
- count, integer
  `count` specifies the number of patients to generate
- rate, integer-or-nil
  Try to limit data generation to `rate` patients/second
- attributes-p, boolean
  Should an ID attribute be added to each triple generated.
- include-patients, boolean (default: true)
  If false, patient data will not be generated.
- include-diagnoses, boolean (default: true)
  If false, diagnoses knowledge base triples will not be generated.

POST /catalogs/[CATNAME]/repositories/[REPONAME]/data-generator/phoneCall

Adds and commits sample phone call triples to the database.
Returns the number of triples added.

### arguments

- start-id, integer
  `start-id` specifies the starting call id for generation
- count, integer
  `count` specifies the number of calls to generate
- rate, integer-or-nil
  Try to limit data generation to `rate` phone calls/second

PUT /catalogs/[CATNAME]/repositories/[REPONAME]/delete-objects

delete objects from a vector store

### arguments

- text, string-or-nil
- all, boolean
- property, string-or-nil
- value, string-or-nil

POST /catalogs/[CATNAME]/repositories/[REPONAME]/encodedIds

Return the next `amount` encoded IDs for `prefix`

### arguments

- prefix, string
- amount, integer (default: 1)

GET /catalogs/[CATNAME]/repositories/[REPONAME]/encodedIds/prefixes

Return information on any registered encoded IDs.

Returns a set of tuples with keys: prefix, format, and id.

POST /catalogs/[CATNAME]/repositories/[REPONAME]/encodedIds/prefixes

Register encoded IDs for the repository.

Use either the `prefix` and `format` arguments to specify a single encoded ID or encode a collection of registrations into a JSON array of form and include this in the body of the request.

### arguments

- prefix, string
- format, string

DELETE /catalogs/[CATNAME]/repositories/[REPONAME]/encodedIds/prefixes

Removes the encoded ID associated with `prefix`.

Note that it is an error if the encoded ID has been already been used in the triple-store.

### arguments

- prefix, string

GET /catalogs/[CATNAME]/repositories/[REPONAME]/encodedIds/prefixes/hasAny

Returns whether or not the repository has any encoded IDs registered.

GET /catalogs/[CATNAME]/repositories/[REPONAME]/encodedIds/prefixes/isInUse

Returns whether or not any triples have been added using the encoded ID associated with `prefix`.

### arguments

- prefix, string

GET /catalogs/[CATNAME]/repositories/[REPONAME]/encodedIds/prefixes/isRegistered

Returns whether or not a `prefix` is registered as an encoded ID.

### arguments

- prefix, string

POST /catalogs/[CATNAME]/repositories/[REPONAME]/eval

Evaluates the request body in the server.

By default, it is evaluated as Common Lisp code, with `*package*` set to the `db.agraph.user` package. If you specify a `Content-Type` of `text/javascript`, however, the code will be interpreted as JavaScript.

Makes an attempt to return the result in a sensible format, falling back to printing it (as per prin1) and returning it as a string.

GET /catalogs/[CATNAME]/repositories/[REPONAME]/exec-nl-query

Convert a natural language query (NLQ) in a SPARQL SELECT/ASK/DESCRIBE query. If the conversion is successful, the query and execution results are included in the response. If the prompt exactly matches an existing example, the result is returned directly. If the conversion fails, the response includes failed attempts of SPARQL queries generation and information on why the backend treated them as failures. Also, the response may include referenced SHACL shapes and examples with NLQ and SPARQL queries.

### arguments

- prompt, string
  Natural language query (NLQ) to convert to SPARQL.
- vdb-spec, string
  A vector store specification with NLQ examples. Examples are pairs of natural language queries (NLQ) and SPARQL queries to use as references in the generation process.
- with-fti, boolean (default: true)
  Optional boolean parameter to control freetext indices' inclusion in the SPARQL. Default is true.
- nl-example-score, float
  Optional float score (from 0 to 1) to pick SPARQL query from an existing NLQ example based on the prompt. Default is nil.
- asterisk-in-select-clause, boolean
  Enforce * in LLM generated query SELECT clause. The option is ignored for generated queries with other verbs. Default is false.

GET /catalogs/[CATNAME]/repositories/[REPONAME]/expected-store-size

Return the expected size of the store in number of triples.

GET/POST /catalogs/[CATNAME]/repositories/[REPONAME]/freetext

Query the repository using a free-text index

### arguments

- pattern, string
- expression, string
- index, string
- limit, integer
- offset, integer
- sorted, boolean
- attributeFilter, string
- returnExtendedTriples, boolean

GET /catalogs/[CATNAME]/repositories/[REPONAME]/freetext/indices

Return a list of freetext indices defined on the store

GET /catalogs/[CATNAME]/repositories/[REPONAME]/freetext/indices/[INDEXNAME]

Return information on the freetext-index named `indexName`.

POST /catalogs/[CATNAME]/repositories/[REPONAME]/freetext/indices/[INDEXNAME]

Modify the freetext-index named `indexName`.

### arguments

- predicate, list
- graph, list
- type, list
- indexLiterals, boolean (default: true)
- indexLiteralType, list
- indexResources, string (default: null)
- indexField, list
- minimumWordSize, integer (default: null)
- stopWord, list
- wordFilter, list
- reIndex, boolean (default: true)
- innerChars, list
- borderChars, list
- tokenizer, string (default: default)

PUT /catalogs/[CATNAME]/repositories/[REPONAME]/freetext/indices/[INDEXNAME]

Create or modify a freetext-index named `indexName`.

### arguments

- predicate, list
- graph, list
- type, list
- indexLiterals, boolean (default: true)
- indexLiteralType, list
- indexResources, string (default: false)
- indexField, list
- minimumWordSize, integer (default: 3)
- stopWord, list
- wordFilter, list
- innerChars, list
- borderChars, list
- tokenizer, string (default: default)

DELETE /catalogs/[CATNAME]/repositories/[REPONAME]/freetext/indices/[INDEXNAME]

Delete the free-text index `indexName`.

GET /catalogs/[CATNAME]/repositories/[REPONAME]/freetext/indices/[INDEXNAME]/borderChars

Return the border characters for the text index

GET /catalogs/[CATNAME]/repositories/[REPONAME]/freetext/indices/[INDEXNAME]/graphs

Return the graphs on which the text index is defined

GET /catalogs/[CATNAME]/repositories/[REPONAME]/freetext/indices/[INDEXNAME]/indexFields

Return the triple-fields that the index indexes

GET /catalogs/[CATNAME]/repositories/[REPONAME]/freetext/indices/[INDEXNAME]/indexLiterals

Return whether or not the index indexes literals

GET /catalogs/[CATNAME]/repositories/[REPONAME]/freetext/indices/[INDEXNAME]/indexResources

Return whether or not the index indexes resources

GET /catalogs/[CATNAME]/repositories/[REPONAME]/freetext/indices/[INDEXNAME]/innerChars

Return the inner characters for the text index

GET /catalogs/[CATNAME]/repositories/[REPONAME]/freetext/indices/[INDEXNAME]/minimumWordSize

Return the minimum word size of the text index

GET /catalogs/[CATNAME]/repositories/[REPONAME]/freetext/indices/[INDEXNAME]/predicates

Return the predicates on which the text index is defined

GET /catalogs/[CATNAME]/repositories/[REPONAME]/freetext/indices/[INDEXNAME]/stopWords

Return the stop words defined for the text index

GET /catalogs/[CATNAME]/repositories/[REPONAME]/freetext/indices/[INDEXNAME]/tokenizer

Return the tokenizer for the text index

GET /catalogs/[CATNAME]/repositories/[REPONAME]/freetext/indices/[INDEXNAME]/types

Return the RDF types for which the text index is defined

GET /catalogs/[CATNAME]/repositories/[REPONAME]/freetext/indices/[INDEXNAME]/wordFilters

Return the word filters specified for the text index

POST /catalogs/[CATNAME]/repositories/[REPONAME]/functor

Define one or more Prolog functors.

The body should contain the functors to be defined.

GET /catalogs/[CATNAME]/repositories/[REPONAME]/geo/box

Fetch all triples with a given predicate whose object is a geospatial value inside the given box.

### arguments

- type, string
  Specifies a geospatial sub-type
- predicate, string
  Specifies a predicate for the query
- xmin, float
  Specifies the left-most coordinate of the box
- ymin, float
  Specifies the bottom coordinate of the box
- xmax, float
  Specifies the right-most coordinate of the box
- ymax, float
  Specifies the top coordinate of the box
- infer, string
  Specifies the inference mode, if any
- limit, integer
  Specifies a maximum number of triples to return
- offset, integer
  Specifies how many triples should be skipped over
- useContext, boolean
  When `true`, the context (graph) field of triples is used as the geospatial value to match, rather than the object.

GET /catalogs/[CATNAME]/repositories/[REPONAME]/geo/circle

Retrieve triples whose object falls inside a circle.

### arguments

- type, string
  Specifies a geospatial sub-type
- predicate, string
  Specifies a predicate for the query
- x, float
  Specifies the x-coordinate of the circle
- y, float
  Specifies the y-coordinate of the circle
- radius, float
  Specifies the radius of the circle
- infer, string
  Specifies the inference mode, if any
- limit, integer
  Specifies a maximum number of triples to return
- offset, integer
  Specifies how many triples should be skipped over
- useContext, boolean
  When `true`, search using the context (graph) of the triple rather than its object

GET /catalogs/[CATNAME]/repositories/[REPONAME]/geo/haversine

Retrieve triples whose object lies within a circle in a spherical system.

### arguments

- type, string
  Specifies a geospatial sub-type
- predicate, string
  Specifies a predicate for the query
- lat, float
  Specifies the latitude of the center of the circle
- long, float
  Specifies the longitude of the center of the circle
- radius, float
  Specifies the radius of the circle
- unit, string (default: km)
  Specifies the unit in which the radius is given (`km` or `mile`)
- infer, string
  Specifies the inference mode, if any
- limit, integer
  Specifies a maximum number of triples to return
- offset, integer
  Specifies how many triples should be skipped over
- useContext, boolean
  When `true`, use the context (graph) field of the triple instead of its object

GET /catalogs/[CATNAME]/repositories/[REPONAME]/geo/polygon

Retrieve triples whose object lies inside a polygon.

### arguments

- type, string
  Specifies a geospatial sub-type
- predicate, string
  Specifies a predicate for the query
- polygon, string
  The name of a polygon
- infer, string
  Specifies the inference mode, if any
- limit, integer
  Specifies a maximum number of triples to return
- offset, integer
  Specifies how many triples should be skipped over
- useContext, boolean
  When `true`, use the context (graph) field of the triple instead of its object

PUT /catalogs/[CATNAME]/repositories/[REPONAME]/geo/polygon

Add a new polygon to the repository.

### arguments

- resource, string
  The name (URI) of the polygon to add.
- point, list
  A list of points represented as AllegroGraph geospatial objects.

GET /catalogs/[CATNAME]/repositories/[REPONAME]/geo/types

Retrieve a list of geospatial types defined in the store.

### arguments

- uuids, boolean

POST /catalogs/[CATNAME]/repositories/[REPONAME]/geo/types

Add a new geospatial sub-type to the triple-store. Returns the external index of the subtype.

### arguments

- uuid, string

POST /catalogs/[CATNAME]/repositories/[REPONAME]/geo/types/cartesian

Define a new Cartesian geospatial type.

Returns the type resource which can be used as the `type` argument in other geospatial services. The `xmin`, `xmax`, `ymin`, and `ymax` arguments determine the size of the Cartesian plane that is modelled by this type.

### arguments

- stripWidth, float
  A floating-point number that determines the granularity of the strip.
- xmin, float
- ymin, float
- xmax, float
- ymax, float

GET /catalogs/[CATNAME]/repositories/[REPONAME]/geo/types/id

Returns the internal index of a geospatial subtype based on its UUID.

### arguments

- uuid, string

POST /catalogs/[CATNAME]/repositories/[REPONAME]/geo/types/spherical

Define a spherical geospatial type.

Returns the type resource which can be used as the `type` argument in other geospatial services. The `latmin`, `longmin`, `latmax`, and `longmax` can be used to limit the size of the region modelled by this type. The default is to span the entire sphere.

### arguments

- stripWidth, float
  A floating-point number that determines the granularity of the strip.
- unit, string (default: degree)
  The unit in which `stripWidth` is specified. It can be degree, km, radian or mile.
- latmin, float
- longmin, float
- latmax, float
- longmax, float

POST /catalogs/[CATNAME]/repositories/[REPONAME]/geosparql/buildGeohashIndex

Incrementally build Geohash index. It only build for triples that do NOT have geohash index. If the building process finishes successfully, it will return a JSON object 1}; otherwise, it returns 2}.

POST /catalogs/[CATNAME]/repositories/[REPONAME]/geosparql/rebuildGeohashIndex

Forcefully rebuild Geohash index. It will delete all the current Geohash index and then rebuild. If the rebuilding process finishes successfully, it will return a JSON object 3}; otherwise, it returns 4}.

GET /catalogs/[CATNAME]/repositories/[REPONAME]/getPreparedTransactions

Returns a list of XIDs for transactions that have been prepared but not yet committed or rolled back.

POST /catalogs/[CATNAME]/repositories/[REPONAME]/graphql

### arguments

- default-prefix, string-or-nil
  Default URI prefix for plain fields.
- namespaces, string
  List of `prefix-name URI` pairs.Prefix and URI should be separated by a space and a comma used to separate the pairs.
- variables, string
  List of space separated pairs: variable name and value.
- aliases, string
  list of space separated pairs: alias name and value.
- infer, string (default: false)
  Specifies the kind of inference to use for this query. Valid values are `false`, `rdfs++`, and `hasvalue`.

GET /catalogs/[CATNAME]/repositories/[REPONAME]/indices

Return a list of indices defined on the triple-store

### arguments

- listValid, boolean
  If true, then all possible index flavors are returned rather than just the ones that are currently defined.
- listUndefined, boolean
  If true, only flavors that are not currently defined will be returned.

PUT /catalogs/[CATNAME]/repositories/[REPONAME]/indices/[TYPE]

Add an index of `type` to the triple-store.

### arguments

- style, integer (default: 0)
  Specifies the chunk style of the new index. Can be 0, 1 or 2

DELETE /catalogs/[CATNAME]/repositories/[REPONAME]/indices/[TYPE]

Drop the index `type` from the triple-store.

GET /catalogs/[CATNAME]/repositories/[REPONAME]/indices/[TYPE]/chunks

Visualize chunks of an index and return an image.

### arguments

- resolution, integer (default: 1000)
  Plot resolution (?).

POST /catalogs/[CATNAME]/repositories/[REPONAME]/indices/optimize

Optimize the indices in the repository at the given effort level.

### arguments

- level, integer
  Optimization effort level (integer). The values `0` and `1` are reserved for internal use; `2` (default) writes out in-memory triple data and then performs an index optimization of all overlapping chunks; `3` is as `2` but then optimizes all chunks regardless of overlap, purging deleted triples.
- wait, boolean
  If true, don't return until the operation is finished.
- index, list
  The name of an index. This can be specified multiple times. If unspecified or "all", all indices will be optimized.
- shard, integer
  0-based index of the shard of a distributed repo to optimize. When unspecified all shards are optimized.

GET /catalogs/[CATNAME]/repositories/[REPONAME]/jobs

Returns job information for the current store.

Returns lists of strings of the form ("uuid" "age" "description" [unused]), where "uuid" is the job UUID; "age" is the number of seconds since the job was created; and "description" is the query string. Only query jobs are returned. The fourth element of the list will also be a string but is not currently used and so is not meaningful.

DELETE /catalogs/[CATNAME]/repositories/[REPONAME]/jobs/[JOB-ID]

Cancels the specified job (if it exists) for the current store.

POST /catalogs/[CATNAME]/repositories/[REPONAME]/jobs/purge-deleted-triples

Schedules a background operation to purge deleted triples from the specified indices.

### arguments

- index, list
  The name of an index. This can be specified multiple times. If unspecified, the operation will be performed on all indices
- shard, integer
  0-based index of the shard of a distributed repo to purge. When unspecified all shards are purged.

DELETE /catalogs/[CATNAME]/repositories/[REPONAME]/jobs/purge-deleted-triples

Cancels purge deleted triple job for the specified indices.

### arguments

- index, list
  The name of an index. This can be specified multiple times. If unspecified, the purge operation will be stopped for all indices

PUT /catalogs/[CATNAME]/repositories/[REPONAME]/llm-index

do an llm index of the current repo according to the given spec

### arguments

- estimate-triple-count, boolean
- verbose, boolean

GET /catalogs/[CATNAME]/repositories/[REPONAME]/llm-list

Return a list of available vector databases for a given repository.

PUT /catalogs/[CATNAME]/repositories/[REPONAME]/llm-split

using the split-config convert file attached to the body into triples in the current store

### arguments

- split-config, string
- file-name, string
- verbose, boolean

PUT /catalogs/[CATNAME]/repositories/[REPONAME]/load-csv

Load a CSV file into the store. The CSV file is uploaded as the request body or by reading file passed via `csv-name` parameter. Parameters are used from the `agtool load` command except for `print-load-command`. The `print-load-command` parameter returns the appropriate `agtool` command based on your parameters but does NOT import the CSV file.

### arguments

- tr-id, string
- tr-prefix, string
- tr-rename, list
- tr-type, list
- tr-lang, list
- tr-skip, list
- tr-transform, list
- tr-graph, list
- tr-skipall, boolean (default: true)
- print-load-command, boolean
- csv-name, string
- continueOnError, boolean
  A boolean (which defaults to false) that indicates whether the load should continue when malformed data is encountered.
- bulkLoad, boolean
  If true, then the triple-store will be put into bulk load (non-transactional) mode for the duration of the load.
- attributes, string-or-nil
  If supplied, this must be a JSON object encoding of a list of key/value pairs. Keys must be strings and values must either be strings or arrays of strings. Each key must name an already existing attribute defintion.
- tr-use, list

POST /catalogs/[CATNAME]/repositories/[REPONAME]/lock

Attempts to page in and lock the specified indices or the string table into memory. String or index data added after this call will not be locked.

The ability to lock is limited by the 'memlock' rlimit and available memory. Increasing the 'memlock' limit requires Systems Administrator intervention.

### arguments

- object, list
  The name of an index to lock or :strings to lock the string table. This can be specified multiple times. If unspecified, no operation will be done

DELETE /catalogs/[CATNAME]/repositories/[REPONAME]/lock

Removes the specified index or string table locks.

### arguments

- object, list
  The name of an index or :strings to unlock the string table. This can be specified multiple times. If unspecified no operation will be performed

GET /catalogs/[CATNAME]/repositories/[REPONAME]/mapping

Return the datatype and predicate mappings for the repository.

DELETE /catalogs/[CATNAME]/repositories/[REPONAME]/mapping

Remove any user-defined datatype and predicate mappings.

DELETE /catalogs/[CATNAME]/repositories/[REPONAME]/mapping/all

Remove all datatype and predicate mappings (included the default ones).

POST/PUT /catalogs/[CATNAME]/repositories/[REPONAME]/mapping/predicate

Add a new predicate mapping between `predicate` and `encoding`.

### arguments

- predicate, string
- encoding, string

GET /catalogs/[CATNAME]/repositories/[REPONAME]/mapping/predicate

Return the predicate mapping for `predicate`.

### arguments

- predicate, string

DELETE /catalogs/[CATNAME]/repositories/[REPONAME]/mapping/predicate

Remove any predicate mapping on `predicate`.

### arguments

- predicate, string

POST /catalogs/[CATNAME]/repositories/[REPONAME]/mapping/predicate/cartesian

Define a Cartesian type-mapping between `predicate` and the geospatial subtype specified by `uuid`.

### arguments

- predicate, string
- uuid, string

POST /catalogs/[CATNAME]/repositories/[REPONAME]/mapping/predicate/spherical

Define a spherical type-mapping between `predicate` and the geospatial subtype specified by `uuid`.

### arguments

- predicate, string
- uuid, string

POST/PUT /catalogs/[CATNAME]/repositories/[REPONAME]/mapping/type

Add a new datatype mapping between `type` and `encoding`.

### arguments

- type, string
- encoding, string

GET /catalogs/[CATNAME]/repositories/[REPONAME]/mapping/type

Return the datatype mapping for `type`.

### arguments

- type, string

DELETE /catalogs/[CATNAME]/repositories/[REPONAME]/mapping/type

Remove the datatype mapping between `type` and `encoding`.

### arguments

- type, string

POST /catalogs/[CATNAME]/repositories/[REPONAME]/mapping/type/cartesian

Define a Cartesian datatype mapping between the datatype `type` and the geospatial subtype specified by `uuid`.

### arguments

- type, string
- uuid, string

POST /catalogs/[CATNAME]/repositories/[REPONAME]/mapping/type/spherical

Define a spherical datatype mapping between the datatype `type` and the geospatial subtype specified by `uuid`.

### arguments

- type, string
- uuid, string

PUT /catalogs/[CATNAME]/repositories/[REPONAME]/materializeEntailed

Use materialization to add inferred triples to the store.

### arguments

- with, list
- without, list
- useTypeSubproperty, boolean
- inferredGraph, string
- commit, integer
- verbose, boolean
  Write additional information to the log
- deleteFirst, boolean (default: true)
- deleteDuplicatesFirst, boolean (default: true)

DELETE /catalogs/[CATNAME]/repositories/[REPONAME]/materializeEntailed

Delete any materialized triples

### arguments

- inferredGraph, string
  Specifies the graph from which inferred triple will be deleted. Leave unspecified to use the default materialized triple graph.

GET /catalogs/[CATNAME]/repositories/[REPONAME]/metadata

Returns a subset of the store's metadata. Currently it returns the attribute definitions and static filter definition. The value may be saved or passed later to set-metadata; it must not be modified.

POST /catalogs/[CATNAME]/repositories/[REPONAME]/metadata

Merge the metadata in the `metadata` argument into the current metadata for the database. It is not currently permitted to change an attribute definition and doing so will result in an error. The metadata value must have come from an earlier call to get-metadata. After calling this function a commit-triple-store must be done to make the changes persistent.

### arguments

- metadata, string
  A string containing the metadata

GET /catalogs/[CATNAME]/repositories/[REPONAME]/mongoParameters

Return the mongoDB settings for the repository.

The settings include:

- `server` - server name where MongoDB is running
- `port` - port to use to communicate with MongoDB
- `database` - name of the database to use when querying MongoDB
- `collection` - name of the collection to use when querying MongoDB
- `user` - used to authenticate to the Mongo DB server
- `ssl` - use SSL to connect to the MongoDB server
- `ca-certificate` - path to the CA certificate file
- `client-certificate` - path to the client certificate file

Note, the mongoDB password is not returned. Use the POST request to change the parameters.

POST /catalogs/[CATNAME]/repositories/[REPONAME]/mongoParameters

Update the triple-store's MongoDB setting. See MongoDB interface for additional details.

### arguments

- server, string
  The server name where MongoDB is running.
- port, string
  The port on which MongoDB is running.
- database, string
  The name of the MongoDB database.
- collection, string
  The name of the MongoDB collection to query (must be non-empty)
- user, string
  The username used to authenticate with the MongoDB server.
- password, string
  The password used to authenticate with the MongoDB server.
- ssl, boolean
  Use SSL to connect to the MongoDB server.
- client-certificate, string
  The path to the client certificate file.
- ca-certificate, string
  The path to the CA certificate file.

GET /catalogs/[CATNAME]/repositories/[REPONAME]/namespaces

Return the currently active namespaces for your user in this repository

Namespaces are returned as tuples with `prefix` and `namespace` (the URI) fields.

DELETE /catalogs/[CATNAME]/repositories/[REPONAME]/namespaces

Deletes all namespaces in this repository for the current user.

### arguments

- reset, boolean
  If `true`, the user's namespaces are reset to the default set of namespaces.

POST/PUT /catalogs/[CATNAME]/repositories/[REPONAME]/namespaces/[PREFIX]

Associate `prefix` with the `uri` as a namespace abbreviation.

GET /catalogs/[CATNAME]/repositories/[REPONAME]/namespaces/[PREFIX]

Returns the namespace URI defined for the given prefix.

DELETE /catalogs/[CATNAME]/repositories/[REPONAME]/namespaces/[PREFIX]

Remove any namespace abbreviation associated with `prefix`.

GET /catalogs/[CATNAME]/repositories/[REPONAME]/nd/geospatialDatatypeAutomation

Returns whether or not automatic geospatial datatype recognition is enabled for this store.

PUT /catalogs/[CATNAME]/repositories/[REPONAME]/nd/geospatialDatatypeAutomation

Turns on automatic geospatial datatype recognition so that 2, 3 and n-dimensional data can be easily loaded.

DELETE /catalogs/[CATNAME]/repositories/[REPONAME]/nd/geospatialDatatypeAutomation

Turns off automatic geospatial datatype recognition.

GET /catalogs/[CATNAME]/repositories/[REPONAME]/nearest-neighbor

compute the semantically closest top N (top-n) strings from a vector triple store

### arguments

- text, string-or-nil
  the string to search for semantic matches in the database
- min-score, float-or-nil
  minimum score to consider a match
- top-n, integer-or-nil
  Return the top top-n matches
- selector, string-or-nil
  body of sparql to select objects to consider. Should bind ?id to objects to consider for nearest neighbor if all objects are not to be considered.
- embedding, string
  embedding to use instead of text
- api-key, string-or-nil
  api-key to use instead of the one in the vector database

GET /catalogs/[CATNAME]/repositories/[REPONAME]/needsCommit

Returns whether or not the whether the current transaction has any changes that require a commit.

PUT /catalogs/[CATNAME]/repositories/[REPONAME]/neighborMatrices/[NAME]

Create a neighbor-matrix, which is a pre-computed generator.

### arguments

- group, list
  A set of N-Triples terms (can be passed multiple times) which serve as start nodes for building up the matrix.
- depth, integer (default: 1)
  Specifies the maximum depth to which to compute the matrix..
- generator, string
  The generator to use to find neighbors, by name.

GET /catalogs/[CATNAME]/repositories/[REPONAME]/nl-queries

Retrieve NLQ and SPARQL queries from the vector store.

### arguments

- offset, integer (default: 0)
  Pagination offset. Default is 0.
- limit, integer (default: 100)
  Pagination limit. Default is 100.
- sort-by, string (default: nlQuery)
  Sort by field. Default is "nlQuery". Available values are "nlQuery", "sparqlQuery", "createdBy", "createdAt", "editedBy" and "editedAt".
- order-by, string (default: asc)
  Order direction. Default is "asc". Available values are "asc" and "desc".
- substring-search, string
  Optional parameter to search for a substring in the natural language query.
- neighbor-search, string
  Optional parameter to execute a vector nearest neighbor search.
- neighbor-search-limit, integer (default: 10)
  Optional parameter to limit the number of nearest neighbors to return. Takes effect only if "neighbor-search" parameter is included. Default is 10.
- neighbor-search-min-score, float (default: 0.5)
  Optional parameter to filter the nearest neighbors by the score. Takes effect only if "neighbor-search" parameter is included. Default is 0.5.

POST /catalogs/[CATNAME]/repositories/[REPONAME]/nl-queries

Add pairs of natural language and SPARQL queries to the vector store. Natural language queries are embedded in the vector store to be used in the nearest neighbor search.

### arguments

- q, string
  JSON array of objects or a single JSON object with 'nl-query' and 'sparql-query' required fields and optional 'id' field. If 'id' is not provided, it is generated automatically and a new pair is written. If 'id' is provided, the pair with the same id is upserted.

DELETE /catalogs/[CATNAME]/repositories/[REPONAME]/nl-queries

Remove natural language and SPARQL query examples from the vector store.

### arguments

- subj, list
  Can be specified multiple times. Must hold IDs of natural language query examples to remove.

GET /catalogs/[CATNAME]/repositories/[REPONAME]/nl-queries/missing-fields

Checks for query examples with missing fields due to updates in AG internal logic.

PUT /catalogs/[CATNAME]/repositories/[REPONAME]/nl-queries/missing-fields

Updates query examples with missing fields due to updates in AG internal logic.

GET /catalogs/[CATNAME]/repositories/[REPONAME]/nl-queries/total

Retrieve the total number of NLQ and SPARQL queries in the NLQ vector store.

GET /catalogs/[CATNAME]/repositories/[REPONAME]/noCommit

Return true if given repository is currently in read-only (no-commit) mode, false otherwise.

When this mode is active, all commits from any clients will return an error which effectively prevents writing to the store. This is used to enforce read-only stores.

PUT /catalogs/[CATNAME]/repositories/[REPONAME]/noCommit

Enable read-only (no-commit) mode. Requires superuser privileges.

DELETE /catalogs/[CATNAME]/repositories/[REPONAME]/noCommit

Disable read-only (no-commit) mode. Requires superuser privileges.

GET /catalogs/[CATNAME]/repositories/[REPONAME]/object-embedding

return the embedding for the object object-id from a vector store

### arguments

- object-id, string
  The resource that identifies this object. It can be a string, upi or future-part.

GET /catalogs/[CATNAME]/repositories/[REPONAME]/object-property-value

return the value of a given property for the object object-id in the vector store

### arguments

- object-id, string
  The resource that identifies this object. It can be a string, upi or future-part.
- property, string
  The name of the property
- all, boolean
  true to return plist of all properties and values

GET /catalogs/[CATNAME]/repositories/[REPONAME]/object-text

return the text for the object object-id from a vector store

### arguments

- object-id, string
  The resource that identifies this object. It can be a string, upi or future-part.
- full, boolean
  If true then return text string in ntriple format possibly with language or datatype information

GET/POST /catalogs/[CATNAME]/repositories/[REPONAME]/queries/[NAME]

Execute a saved query

### arguments

- bound, vars
- limit, integer
- offset, integer

DELETE /catalogs/[CATNAME]/repositories/[REPONAME]/queries/[NAME]

Remove a prepared query

GET /catalogs/[CATNAME]/repositories/[REPONAME]/query-options

Return the currently set query options for your user in this repository

Query options are returned as tuples with `name` and `value` (the URI) fields.

DELETE /catalogs/[CATNAME]/repositories/[REPONAME]/query-options

Deletes all query options set in this repository for the current user.

POST/PUT /catalogs/[CATNAME]/repositories/[REPONAME]/query-options/[NAME]

Set query option `name` to the value `value`.

GET /catalogs/[CATNAME]/repositories/[REPONAME]/query-options/[NAME]

Returns the value of the given query option.

DELETE /catalogs/[CATNAME]/repositories/[REPONAME]/query-options/[NAME]

Delete query option `name`.

GET /catalogs/[CATNAME]/repositories/[REPONAME]/queryResultsCache

Returns the size (in bytes) of query results cache directory.

DELETE /catalogs/[CATNAME]/repositories/[REPONAME]/queryResultsCache

Delete query results cache directory.

GET /catalogs/[CATNAME]/repositories/[REPONAME]/rdf-star

RDF-star mode status for a given repository.

PUT /catalogs/[CATNAME]/repositories/[REPONAME]/rdf-star

Enable RDF-star mode for a given repository. Triggers an error if RDF-star mode is not supported.

DELETE /catalogs/[CATNAME]/repositories/[REPONAME]/rdf-star

Disable RDF-star mode for a given repository. Triggers an error if RDF-star is not supported or the repository contains quoted triples and RDF-star mode cannot be disabled.

GET /catalogs/[CATNAME]/repositories/[REPONAME]/reports

Returns the report with specified path as a JSON object

### arguments

- path, list
  If specified, the specific report for this path will be generated. If omitted, a report that consists of a list of all reports will be returned.

POST /catalogs/[CATNAME]/repositories/[REPONAME]/rollback

Discards any local repository changes, then synchronize to the latest committed repository version on the server. Starts a new transaction.

### arguments

- xid, string-or-nil
  xid, if supplied, must be the xid of a previously prepared commit

GET /catalogs/[CATNAME]/repositories/[REPONAME]/session/autoCommit

Return whether or not auto-commit is currently active for this session.

Deprecated with Sesame 2.7; see isActive instead.

POST /catalogs/[CATNAME]/repositories/[REPONAME]/session/autoCommit

Change the auto-commit behavior for the session.

### arguments

- on, boolean
  If true, the autoCommit is turned on

POST /catalogs/[CATNAME]/repositories/[REPONAME]/session/close

Stop a session.

GET /catalogs/[CATNAME]/repositories/[REPONAME]/session/description

Return a description of the session.

GET /catalogs/[CATNAME]/repositories/[REPONAME]/session/isActive

Return whether or not there is an open transaction.

GET /catalogs/[CATNAME]/repositories/[REPONAME]/session/ping

Send a message to a session in order to keep it alive.

PUT /catalogs/[CATNAME]/repositories/[REPONAME]/set-api-key

set or clear the vector store api key and then commits

### arguments

- api-key, string
  new api-key to use in this vector store. Pass the empty string to only remove an existing api-key

GET /catalogs/[CATNAME]/repositories/[REPONAME]/settings/purge-rate-limit

Returns the deleted triple purge operation rate limit (read IOs per second). 0 means no limit.

POST /catalogs/[CATNAME]/repositories/[REPONAME]/settings/purge-rate-limit

Sets the deleted triple purge operation rate limit (read IOs per second). Note that this setting is not persistent. It will revert to 0 the next time the database instance is started.

### arguments

- rate, integer
  Sets the purge rate limit. 0 means no limit. The maximum limit is 4,294,967,295.

GET /catalogs/[CATNAME]/repositories/[REPONAME]/shacl-shapes

Retrieve SHACL shapes from the current repository.

Supported output formats are standard RDF formats, JSON-LD (use `Accept: application/ld+json`) and the Terse CPT Schema format (use `Accept: application/vnd.franz.terse-cpt-schema+json`).

### arguments

- shape, list
  SHACL shape to retrieved. Should be an IRI. Can be specified multiple times. If not specified, all SHACL shapes are returned.
- shapesGraph, list
  SHACL shapes graph to search. Should be an IRI, "default" or "all". Can be specified multiple times. If not specified, shapes from all graphs are returned.

PUT /catalogs/[CATNAME]/repositories/[REPONAME]/shacl-shapes

Import SHACL shapes into the current repository.

Any non-shape data will be ignored. If repository already contains a shape with the same ID in the same graph, the existing shape will be replaced.

### arguments

- shapesGraph, string
  The graph into which to import the shapes. Should be an IRI or "default". Default value is the default graph.

DELETE /catalogs/[CATNAME]/repositories/[REPONAME]/shacl-shapes

Delete a SHACL shape from the repository.

### arguments

- shape, list
  SHACL shape to delete. Should be an IRI. Can be specified multiple times.
- shapesGraph, list
  SHACL shapes graph to operate on. Should be an IRI, "default" or "all". Can be specified multiple times.

GET /catalogs/[CATNAME]/repositories/[REPONAME]/shacl-shapes/generate

Generate SHACL shapes for the current repository and return the resulting SHACL document.

Supported output formats are standard RDF formats, JSON-LD (use `Accept: application/ld+json`) and the Terse CPT Schema format (use `Accept: application/vnd.franz.terse-cpt-schema+json`).

SHACL shapes are generated based on the current state of the repository. Therefore resulting shapes should not be used to validate triple store data. If triple store data is semantically invalid then generated SHACL shapes constrains are semantically incorrect.

### arguments

- classFilter, list
  Exclude all target classes, whose IRIs match given prefix. For example, `classFilter=rdfs` excludes classes like `rdfs:Class` and `rdfs:Property`. Specifying `classFilter=http://example.org/SpecificClass` can be used to exclude a specific class, but note that this still works as a prefix, so so classes like `http://example.org/SpecificClass` will also be excluded. Can be specified multiple times.
- propertyFilter, list
  Exclude all properties, whose IRIs match given prefix. For example, `propertyFilter=rdfs` excludes properties like `rdfs:label and` rdfs:comment`in all classes. Specifying` propertyFilter=http://example.org/specificProperty`can be used to exclude a specific property, but note that this still works as a prefix, so properties like` http://example.org/specificProperty1` will also be excluded. Can be specified multiple times.
- filter, list
  Exclude all target classes and all properties, whose IRIs match given prefix. The values will be added to the values of `classFilter` and `propertyFilter`. For example, `filter=rdfs` is equivalent to setting both `classFilter=rdfs` and `propertyFilter=rdfs`.

PUT /catalogs/[CATNAME]/repositories/[REPONAME]/shacl-shapes/generate

Generate SHACL shapes for the current repository and add generated shapes to the current repository instead of returning the generated document.

If repository already contains a shape with the same ID in the same graph, the existing shape will be replaced.

SHACL shapes are generated based on the current state of the repository. Therefore resulting shapes should not be used to validate triple store data. If triple store data is semantically invalid then generated SHACL shapes constrains are semantically incorrect.

### arguments

- classFilter, list
  Exclude all target classes, whose IRIs match given prefix. For example, `classFilter=rdfs` excludes classes like `rdfs:Class` and `rdfs:Property`. Specifying `classFilter=http://example.org/SpecificClass` can be used to exclude a specific class, but note that this still works as a prefix, so so classes like `http://example.org/SpecificClass` will also be excluded. Can be specified multiple times.
- propertyFilter, list
  Exclude all properties, whose IRIs match given prefix. For example, `propertyFilter=rdfs` excludes properties like `rdfs:label and` rdfs:comment`in all classes. Specifying` propertyFilter=http://example.org/specificProperty`can be used to exclude a specific property, but note that this still works as a prefix, so properties like` http://example.org/specificProperty1` will also be excluded. Can be specified multiple times.
- filter, list
  Exclude all target classes and all properties, whose IRIs match given prefix. The values will be added to the values of `classFilter` and `propertyFilter`. For example, `filter=rdfs` is equivalent to setting both `classFilter=rdfs` and `propertyFilter=rdfs`.
- shapesGraph, string
  The graph into which to import the shapes. Should be an IRI or "default". Default value is the default graph.

GET /catalogs/[CATNAME]/repositories/[REPONAME]/shard-info

Returns a string that is the contents of the shard-info file for the repo, or the string "nil" if there is no shard-info file.

GET /catalogs/[CATNAME]/repositories/[REPONAME]/shards

List triple store shards as named pairs of shard's identifier and spec strings:

      { id: <id>, spec: <spec> }

in either JSON or plaintext representation.

GET /catalogs/[CATNAME]/repositories/[REPONAME]/size

Returns the number of statements in the repository, as an integer.

### arguments

- context, list
  if supplied, the count is only for the specified named graphs

GET /catalogs/[CATNAME]/repositories/[REPONAME]/sna/paths

Execute an SNA path search from `start` to `end`.

The `searchMode` controls whether `breadthFirst`, `depthFirst`, or `bidirectional` search is used (`breadthFirst` is the default). A generator can be built dynamically from the `predicate`, `predicateTo` and `predicateFrom` parameters. Each of these can be specified multiple times. Each URI in the `predicate` list will be used to find undirected paths whereas each URI in the `predicateTo` and `predicateFrom` lists will be used to find objects and subjects (respectively).

The graph parameter, which can be specified multiple times, can be used to restrict path searching to triples in only the specified graphs.

If `timeout` is supplied, it must be a floating point number and it will be used to limit the duration of the path searching.

If `limit` is supplied, it must be a positive integer and at most this many paths will be returned.

Lastly, the `maximumDepth` parameter can be used to limit the total search depth.

The return value depends on the `version` parameter. If the version is `1`, then it will be JSON list of lists where each sublist contains the nodes along a path including the starting and ending nodes. If version is `2`, then the result will be a JSON object with two keys: `"paths"` and `"status"`. `"paths"` will be a list of the paths found (as in version `1`). Each node will be either a subject or object of the triples that created the path. `"status"` indicates the reason the search stopped and can be one of `"complete"`, `"limit-reached"`, or `"timeout"`. If version is not supplied or is anything other than `2`, then the version `1` format will be used in order to be backwards compatible. Version `1` support is deprecated and will be phased out in the future.

### arguments

- start, string
- end, string
- maximumDepth, integer
- searchMode, string (default: breadthFirst)
- predicateTo, list
- predicateFrom, list
- predicate, list
- graph, list
- timeout, float
- limit, integer
- version, integer (default: 1)

PUT /catalogs/[CATNAME]/repositories/[REPONAME]/snaGenerators/[NAME]

Creates a new SNA generator under the given name.

### arguments

- subjectOf, list
  Like `objectOf`, but follow edges from object to subject.
- objectOf, list
  A predicate. Accepted multiple times. Causes the new generator to follow edges with the given predicate.
- undirected, list
  Like `objectOf` or `subjectOf`, but follow edges in both directions.
- query, list
  A Prolog query, in which the variable `?node` can be used to refer to the 'start' node, and whose results will be used as 'resulting' nodes. User namespaces may be used in this query.

GET /catalogs/[CATNAME]/repositories/[REPONAME]/solrParameters

Return the Solr settings for the repository.

POST /catalogs/[CATNAME]/repositories/[REPONAME]/solrParameters

Set the Solr settings for the repository

### arguments

- endpoint, string
- idfield, string

GET/POST /catalogs/[CATNAME]/repositories/[REPONAME]/sparql

Execute a SPARQL or Prolog select query.

Arguments of the form `$varname=value` specify variable bindings. Variables appearing in the query can be bound to a specific value outside the actual query using this mechanism. The value must be an N-Triples encoded RDF value. For example, if the value is an IRI, it must be wrapped in angle brackets.

### arguments

- query, string
  The query to evaluate
- update, string
  The update command to evaluate (POST requests only)
- queryLn, string (default: sparql)
  The query language to use (may be `sparql` or `prolog`)
- infer, string
  The inference mode to use if any
- limit, integer
  If `limit` is specifed and the query is a SPARQL query that also contains a LIMIT, then the minimum of the two will be used.
- offset, integer
  If `offset` is specifed and the query is a SPARQL query that also contains an OFFSET, then the sum of the two will be used.
- timeout, integer
- context, list
- namedContext, list
- defaultGraphName, list
- remove-graph-uri, list
- insert-graph-uri, string
- usingGraphURI, list
- usingNamedGraphURI, list
- default-graph-uri, list
- named-graph-uri, list
- uri, string
- baseURI, string
- checkVariables, string (default: default)
  If `yes`, then query warnings will cause the query to stop executing and fail.
- save, string
- analyzeIndicesUsed, boolean
- queryAnalysisTimeout, float
- queryAnalysisTechnique, string
- engine, string
- normalizeResult, boolean (default: true)
- logQuery, string
  If `log`, then query execution will be logged to agraph.log. If true, then the query will be processed, the results will be discarded, and the query log will be returned. Otherwise, no query logging will be performed unless the query itself enables it.
- returnPlan, boolean
- uuid, string
- accept, string
  Specify the content type that the request accepts. Note that this overrides any Accept-type value specified in the HTTP headers
- returnQueryMetadata, boolean
  If true, an additional HTTP header named `x-query-info` is returned. The header contains a URI encoded JSON encoding of query related metadata. If the client supports HTTP Trailers, then the x-query-final-info will contain the same information as x-query-info along with additional information collected during the execution of the query.

GET /catalogs/[CATNAME]/repositories/[REPONAME]/spin/function

Return information about any defined SPIN functions

GET /catalogs/[CATNAME]/repositories/[REPONAME]/spin/function/[URI]

Return information about the SPIN function associated with `uri`.

PUT /catalogs/[CATNAME]/repositories/[REPONAME]/spin/function/[URI]

Associate a SPIN function with `uri`.

### arguments

- query, string
- arguments, list

DELETE /catalogs/[CATNAME]/repositories/[REPONAME]/spin/function/[URI]

Remove the SPIN function associated with `uri`.

GET /catalogs/[CATNAME]/repositories/[REPONAME]/spin/magicproperty

Return a list of SPIN magic properties defined for the store.

GET /catalogs/[CATNAME]/repositories/[REPONAME]/spin/magicproperty/[URI]

Return information about the SPIN magic property associated with `uri`.

PUT /catalogs/[CATNAME]/repositories/[REPONAME]/spin/magicproperty/[URI]

Associate a SPIN magic property with `uri`.

### arguments

- query, string
- arguments, list

DELETE /catalogs/[CATNAME]/repositories/[REPONAME]/spin/magicproperty/[URI]

Remove the SPIN magic property associated with `uri`.

PUT /catalogs/[CATNAME]/repositories/[REPONAME]/split-shard

Split a shard into two shards

### arguments

- shard-number, integer
  the shard number to split
- to-servers, string (default: )
  list of server ids for the new shards

PUT /catalogs/[CATNAME]/repositories/[REPONAME]/statement

Add a triple to the repository.

The `subj`, `pred`, and `obj` arguments must be supplied and are used to fill in the subject, predicate and object parts of the triple. The `context` argument is used to fill in the triple's graph but may be left off. In this case, the triple's graph will be the default graph of the repository.

The `subj`, `pred`, `obj`, and `context` (if supplied) arguments must all be in URI encoded N-Triples notation.

The service returns the triple-ID of the newly added triple.

### arguments

- subj, string
- pred, string
- obj, string
- context, string
- attributes, string
  If supplied, this must be a JSON object encoding of a list of key/value pairs. Keys must be strings and values must either be strings or arrays of strings. Each key must name an already existing attribute defintions.

POST/PUT /catalogs/[CATNAME]/repositories/[REPONAME]/statements

Add triples to the triple-store.

This service can add triples in several ways:

- Via a SPARQL Update command. To do this use the `update` parameter. The `baseURI`, `context`, `remove-graph-uri`, `insert-graph-uri`, `using-graph-uri`, `using-named-graph-uri` and `infer` parameters are all used in this case. Note that you can also send a POST request directly to the repository where the body of that request contains the `update` command.

- Via AllegroGraph's bulk-load tool `agload`. In this case, the `file` or `url` parameters specify the location of the data to be loaded. The `bulkLoad`, `bulkLoaders`, `externalReferences`, `baseURI` and `context` parameters are used as parameters to `agload`.

- Via AllegroGraph's direct load facility. The source of the data can be either from a `file`, located at a `url` or directly included in the `body` of the request. In the latter two cases, the request's `Content-Type` header or the query's `type` parameter must be used to specify the type of the data. You can use `continueOnError`, `commit`, `context`, `baseURI` and `externalReferences` parameters to control the load.

When the `PUT` method is used, triples in the supplied `context`s are first deleted (if no `context` is supplied, then the store is completely emptied), whereas the `POST` method just adds triples. The value returned is an integer indicating the number of triples loaded.

The `Content-Type` header determines the way the given data is interpreted. The following formats are supported:

- `text/plain` for N-triples
- `application/rdf+xml` for RDF/XML
- `text/x-nquads` for N-quads
- `application/x-extended-nquads` for Extended N-Quads
- `application/trix` for TriX
- `text/turtle` for Turtle
- `application/json` for JSON data (an array of arrays of strings, with the inner arrays having 3-5 elements each. The 5th element being a JSON string containing JSON attributes. Keys and values must be strings. The 4th element may be null.) Returns the number of triples added. Inner array format: [s, p, o] - for a triple [s, p, o, g] - for a quad [s, p, o, g-or-null, attributes] - for a triple/quad with attributes attached.
- `application/ld+json` for JSON-LD data
- `application/x-rdftransaction` for a transaction XML document
- `application/x-buffered-triples` - internal format for flushing buffered triples for remote-triple-store.
- `application/x-franz-guess-format` for guessing format based on contents of request.

Small data sources are best loaded via the direct facility whereas large data sources should be loaded via `agload`.

### arguments

- useAgload, boolean
  If `true`, then AllegroGraph's `agload` command-line tool will be used for the load.
- attributes, string-or-nil
  If supplied, this must be a JSON object encoding of a list of key/value pairs. Keys must be strings and values must either be strings or arrays of strings. Each key must name an already existing attribute defintion.
- baseURI, string
  When loading RDF/XML or JSON-LD data, the value of this parameter is used as the base URI of the document.
- bulkLoaders, integer
  The number of loading processes to use when using the `agload` bulk load tool.
- bulkLoad, boolean
  If true, then the triple-store will be put into bulk load (non-transactional) mode for the duration of the load.
- commit, integer
  Will cause a commit to happen after every `N` added statements. Can be used to work around the fact that importing a huge amount of statements in a single transaction will require excessive amounts of memory.
- context, list
  Used to set the named graph into which new triples are stored when the format does not itself supply one. This option can have multiple values, but only the first one will be used unless `overrideContext` is `true`.
- overrideContext, boolean
  Force replacing graph information supplied in source data with the ones provided via `context`. If `context` is not provided, the graph from the data source will be used. For statements in the data source that do not contain graph information the default graph will be used.
- continueOnError, boolean
  A boolean (which defaults to false) that indicates whether the load should continue when malformed data is encountered. Currently only works for N-Triples and N-Quads data.
- uploadedFile, string
  Filename of file being uploaded for import. If set, the body of request will be interpreted as the contents of the uploaded file.
- file, list
  A server-side filename from which to load the data. Note that `eval` permission is required to use this option. This option can have multiple values.
- infer, string
  If `true`, then SPARQL Update commands will run with RDFS++ reasoning enabled.
- insert-graph-uri, string
  Used for SPARQL Update requests to specify the graph into which to insert triples.
- relaxSyntax, boolean
  If true, then less validation is done for the N-Triples and N-Quads formats. See the agload documentation for more details.
- remove-graph-uri, list
  Used for SPARQL Update requests to specify the graph from which triples will be removed.
- externalReferences, boolean
  A boolean (default is false) that indicates whether external references in RDF/XML and JSON-LD source files will be followed. When true, the caller must have eval permissions.
- externalReferenceTimeout, integer
  Used to specify the timeout (in seconds) for loading contexts from 3rd-party web-sites.
- type, string-or-nil
  May be used to specify the format of data in the body of the request or in the linked URL. Overrides the `Content-Type` header.
- update, string
  A SPARQL Update command that will be evaluated to modify the triple-store.
- url, string
  A url from which to load the data via an HTTP request. Can be AWS S3 URI, in which case agload-p must not be nil.
- using-graph-uri, list
  Used to specify the dataset for SPARQL Update commands.
- using-named-graph-uri, list
  Used to specify the dataset for SPARQL Update commands.
- jsonLdContext, string
  Used to provide an external context for JSON-LD loading.
- jsonLdStoreSource, boolean
  Used to specify if the JSON-LD source should be stored.
- parse-only, boolean
  Only parse the input and don't add any triples to the repo

GET /catalogs/[CATNAME]/repositories/[REPONAME]/statements

Retrieves statements (triples) by matching against their components.

All parameters are optional -- when none are given, every statement in the store is returned. The patterns to match come in pairs for subject, predicate, object, and graph. When given, they should be specified in N-triples notation. `subj`, `pred`, `obj` and `context` can be given multiple times. The `subjEnd`, `predEnd`, `objEnd` and `contextEnd` can only by specified if exactly one of their matching entries is supplied. At most one end parameter may be supplied.

### arguments

- subj, list
- subjEnd, string
- pred, list
- predEnd, string
- obj, list
- objEnd, string
- context, list
- contextEnd, string
- orderBy, string
- serializerFormat, string-or-nil
- infer, string (default: false)
  Specifies the kind of inference to use for this query. Valid values are `false`, `rdfs++`, and `hasvalue`.
- limit, integer
  Specifies the maximum number of triples to return.
- offset, integer
  Specifies the number of triples to skip before results are returned
- attributeFilter, string
- returnExtendedTriples, boolean

DELETE /catalogs/[CATNAME]/repositories/[REPONAME]/statements

Delete statements (triples) by matching against their components.

All parameters are optional -- when none are given, every statement in the store is deleted. The patterns to match come in pairs for subject, predicate, object, and graph. When given, they should be specified in N-triples notation.The `subjEnd`, `predEnd`, `objEnd` and `contextEnd` can only by specified if their matching entries is also supplied. At most one end parameter may be supplied.

### arguments

- subj, string
- pred, string
- obj, string
- context, string
- subjEnd, string
- predEnd, string
- objEnd, string
- contextEnd, string

POST /catalogs/[CATNAME]/repositories/[REPONAME]/statements/delete

Delete a set of triples from the store.

Expects a JSON-encoded array of statements as the posted data, and deletes the first triple found that matches each statement.

The `Content-Type` must be `application/json`.

Returns the number of deletes that succeeded.

### arguments

- ids, boolean
  If `true`, then the request body must contain a JSON-encoded list of triple-ids, instead of actual triples.

GET /catalogs/[CATNAME]/repositories/[REPONAME]/statements/duplicates

Returns a cursor of all duplicate triples visible in `db` inside the current transaction.

- `:db` - defaults to the value of *db*

- `:mode` - specifies how triple equality is determined. It can be `:spog` or `:spo` and defaults to `:spog`.

- `:return-extended-triples` - if true, each cursor result will be an `extended-triple`

In case `db` is a distributed repository, this will look for and return duplicate triples across shards. The knowledge base repositores are ignored.

### arguments

- mode, string (default: spog)
  specifies how triple equality is determined. It can be `spog` or `spo` and defaults to `spog`.
- filter
  This argument is not currently supported in AGTOOL.
- return-extended-triples, boolean
  if true then the triples returned by this call will contain any attached attributes.

DELETE /catalogs/[CATNAME]/repositories/[REPONAME]/statements/duplicates

Deletes duplicate triples in repository.

The MODE argument determines the test used to determine equality when testing for duplicates. Options are quad-based equality (spog, the default) or triple-based equality (spo).

### arguments

- mode, string (default: spog)
  specifies how triple equality is determined. It can be `spog` or `spo` and defaults to `spog`.
- filter
  This argument is not currently supported in AGTOOL.
- commit, boolean
  if true then commit before and after duplicates are deleted. Enabling this will improve performance.

GET /catalogs/[CATNAME]/repositories/[REPONAME]/statements/id

Return triples by their triple IDs

### arguments

- id, list

GET/POST /catalogs/[CATNAME]/repositories/[REPONAME]/statements/query

Retrieves statements (triples) by matching against their components.

All parameters are optional -- when none are given, every statement in the store is returned. The patterns to match come in pairs for subject, predicate, object, and graph. When given, they should be specified in N-triples notation. `subj`, `pred`, `obj` and `context` can be given multiple times. The `subjEnd`, `predEnd`, `objEnd` and `contextEnd` can only by specified if exactly one of their matching entries is supplied. At most one end parameter may be supplied.

### arguments

- subj, list
- subjEnd, string
- pred, list
- predEnd, string
- obj, list
- objEnd, string
- context, list
- contextEnd, string
- orderBy, string
- serializerFormat, string-or-nil
- infer, string (default: false)
  Specifies the kind of inference to use for this query. Valid values are `false`, `rdfs++`, and `hasvalue`.
- limit, integer
  Specifies the maximum number of triples to return.
- offset, integer
  Specifies the number of triples to skip before results are returned
- attributeFilter, string
- returnExtendedTriples, boolean

POST/PUT /catalogs/[CATNAME]/repositories/[REPONAME]/statements/transform

Similar to /statements/ but is used for loading documents that don't represent RDF data directly and should therefore be pre-processed according to format-specific rules. The data to load is obtained from the request body.

In addition to specific rule parameters like TR-ID, TR-PREFIX, etc., the TRANSFORM-RULES parameter may be used to specify transformation rules.

If submitted as an HTTP POST request, then the new triples are added to the CONTEXT graph. If a PUT is used, then any existing triples in that graph are first removed.

Currently handles (TYPE or CONTENT-TYPE) JSON, JSONL, and CSV documents.

The special parameters for each content-type are prefixed accordingly. For example, CSV-COLUMNS, JSON-STORE-SOURCE, etc.

The HTTP response body contains the number of triples added.

### arguments

- attributes, string-or-nil
  If supplied, this must be a JSON object encoding of a list of key/value pairs. Keys must be strings and values must either be strings or arrays of strings. Each key must name an already existing attribute defintion.
- commit, integer
  Will cause a commit to happen after every `N` added statements. Can be used to work around the fact that importing a huge amount of statements in a single transaction will require excessive amounts of memory.
- context, string
  Used to set the named graph into which new triples are stored.
- type, string-or-nil
  May be used to specify the format of data in the body of the request or in the linked URL. Overrides the `Content-Type` header.
- transform-rules, string
  Used to reference the additional per-element transformation rules that should be already stored in the CONTEXT graph.
- tr-id, string
  Tranformation rule for specifying custom id template.
- tr-skipall, boolean
  If `true` all keys that don't have transform rules will be skipped. Keys can be selectively forced to be used with `tr-use` parameter.
- tr-prefix, list
  Tranformation rules for specifying custom predicate prefixes.
- tr-rename, list
  Tranformation rules for specifying custom predicate renamings.
- tr-type, list
  Tranformation rules for specifying custom object types.
- tr-lang, list
  Tranformation rules for specifying custom object langs.
- tr-transform, list
  Tranformation rules for specifying custom object transforms.
- tr-skip, list
  Tranformation rules for specifying which keys to skip.
- tr-use, list
  Tranformation rules for specifying which keys to use when `tr-skipall` is `true`.
- tr-graph, list
  Tranformation rules for specifying override graphs for particular keys.
- json-store-source, boolean (default: true)
  Used to specify if the JSON source objects should be stored.
- csv-columns, string
  Used to specify CSV column names if the CSV data doesn't contain a header. The names should be a comma-separated list. If not provided it is assumed that the CSV header row is present.
- csv-separator, string (default: ,)
  Used to specify CSV separator character.
- csv-quote, string
  Used to specify CSV quote character.
- csv-whitespace, string
  Used to specify CSV whitespace characters. Should be a comma-separated list of characters.
- csv-double-quote-p, boolean
  Used to specify usage of double quote in CSV parsing. If true quotes can be escaped inside quoted values by doubling the quote character.
- csv-escape, string
  Used to specify CSV escape character.

GET /catalogs/[CATNAME]/repositories/[REPONAME]/storage-report

Returns a report on db's storage usage, detailing its total disk size, number of triples and active indices, as well as more detailed information about its flavors, memory chunks and obsolete chunks.

### arguments

- chunks, boolean
  If true then include information about each disk chunk
- outputFormat, string
  Format of the result; available options: text/plain, application/json, application/lisp.

GET /catalogs/[CATNAME]/repositories/[REPONAME]/storeID

Returns the ID of the triple-store. The ID is generated randomly when the triple-store is created. It is an array of four octets.

PUT /catalogs/[CATNAME]/repositories/[REPONAME]/storeID

Update the triple-store-id of DB to NEW-ID. For internal use only. NEW-ID must be an (unsigned-byte 8) array as would be returned by a call to TRIPLE-STORE-ID.

### arguments

- new-id, string
  A triple-store-id as returned by (triple-store-id)

GET /catalogs/[CATNAME]/repositories/[REPONAME]/string-table-size

Return the size of the string table in bytes.

GET /catalogs/[CATNAME]/repositories/[REPONAME]/suppressDuplicates

Returns the store's current duplicate suppression strategy.

Duplicate suppression controls if and how AllegroGraph checks triples that are about to be committed against triples that already exist in the triple-store.

It can be:

- `false` - no duplicate suppression is in effect,
- `spog` - on commit, do not add triples that match some existing triple on subject, predicate, object and graph, or
- `spo` - on commit, do not add triples that match some existing triple on subject, predicate, and object.

PUT /catalogs/[CATNAME]/repositories/[REPONAME]/suppressDuplicates

Sets the duplicate suppression strategy for the store.

### arguments

- type, string (default: spog)
  This can be one of:
  - `false` - turn off duplicate suppression,
  - `spog` - on commit, suppress the addition of triples with matching subject, predicate, object and graph, or
  - `spo` - on commit, suppress the addition of triples with matching subject, predicate and object

DELETE /catalogs/[CATNAME]/repositories/[REPONAME]/suppressDuplicates

Disable duplicate suppression for the store.

This is the equivalent of using PUT /repositories/(name)/suppressDuplicates with `false` as the `type` argument.

GET /catalogs/[CATNAME]/repositories/[REPONAME]/tlog/locker

Returns the process id of the process which is holding the transaction log lock. If the lock is unlocked, returns 0

GET /catalogs/[CATNAME]/repositories/[REPONAME]/tripleCache

Returns the size of the triple-cache (SPOGI cache).

Returns zero if the cache is disabled.

PUT /catalogs/[CATNAME]/repositories/[REPONAME]/tripleCache

Sets the size of the triple-cache (SPOGI cache).

### arguments

- size, integer
  The size to use for the cache. If left unspecified, then the default cache size is used.

DELETE /catalogs/[CATNAME]/repositories/[REPONAME]/tripleCache

Disable the triple-cache (SPOGI cache).

GET/POST /catalogs/[CATNAME]/repositories/[REPONAME]/unique/[COLUMN]

Return the unique values for the specified `column`.

`column` must be one of:

- `subject`, `subj` or `s` to return unique subjects,
- `predicate`, `pred` or `p` to return unique predicates,
- `object`, `obj` or `o` to return unique objects, or
- `graph`, `g`, `context` or `c` to return unique graphs (contexts).

Use the `subj`, `pred`, `obj` and `context` arguments to limit the triples that are examined.

This can be very expensive in time and space on a large triple-store.

### arguments

- subj, string
- pred, string
- obj, string
- context, string

PUT /catalogs/[CATNAME]/repositories/[REPONAME]/update-index

Update the result of the 'agtool llm index' command done earlier on this vector store

### arguments

- sync, boolean
  also delete vector store objects whose text value no longer exists in the repository

GET /catalogs/[CATNAME]/repositories/[REPONAME]/useSecondaryIndices

Return whether or not the store should use secondary indices (UPI-maps).

PUT /catalogs/[CATNAME]/repositories/[REPONAME]/useSecondaryIndices

Change the secondary indices (UPI-maps) usage setting.

### arguments

- type, string (default: true)

DELETE /catalogs/[CATNAME]/repositories/[REPONAME]/useSecondaryIndices

Turn off secondary indices (UPI-maps) usage.

GET /catalogs/[CATNAME]/repositories/[REPONAME]/uuid

Returns a string representing the UUID of the triple-store.

GET /catalogs/[CATNAME]/repositories/[REPONAME]/validate/shacl

Perform validation of the specified repository according to the SHACL rules.

### arguments

- dataGraph, list
  IRIs of the data graphs to be validated. "default" indicates the default graph, "all" - all graphs. The default value is "default".
- shapesGraph, list
  IRIs of the shapes graphs to validate against. "default" indicates the default graph, "all" - all graphs. If not supplied and no resources in the data graphs have the http://www.w3.org/ns/shacl#shapeGraph property, data graphs themselves are used.
- shape, list
  IRIs of the shape nodes to which to restrict validation. Must be members of the shapes graphs.
- focusNode, list
  IRIs of the data nodes to which to restrict validation. Must be members of the data graphs.
- addToRepo, boolean
  Add validation report data to the repository.
- resultsGraph, string
  IRI of the graph to use for the validation report (if adding the validation report to the repo is requested). "default" indicates the default graph. The default value is "default".
- outputFormat, string
  Format of the result; available options: text/plain, application/json, text/rdf+n3, text/turtle, text/nquads, text/x-nquads, application/trix, application/trig, application/n-quads, application/rdf+xml, application/x-turtle, application/n-triples.

PUT /catalogs/[CATNAME]/repositories/[REPONAME]/vector-store-import

Import objects from a vector store. If the source-repo is the empty string and supersede is true then simply delete the vector store inside the repo.

### arguments

- source-repo, string
  repo spec of vector store to import. If empty string and supersede is true then any vector store in the repo is completely removed.
- supersede, boolean
  remove existing vector store before importing vector store

GET /catalogs/[CATNAME]/repositories/[REPONAME]/vector-store-p

return true if store in a vector store

PUT /catalogs/[CATNAME]/repositories/[REPONAME]/warmup

Preloads portions of the repository into RAM for faster access.

### arguments

- includeStrings, boolean (default: true)
  If true, string table data will be warmed up.
- includeTriples, boolean (default: true)
  If true, triple indices will be warmed up. By default all indices are warmed up. The `index` parameter may be used to limit the operation to specific indices.
- index, list
  The name of an index. This can be specified multiple times. If unspecified, all indices will be warmed up.

POST /close

Tell the server to close a triple-store

### arguments

- catalog, string
- repository, string