Query

To query the nodegoat API you need a valid domain, a valid path, and a valid query component. The following example URLs contain some of the possible basic domain, path, and query parameters:

Unauthenticated domain 'demo', access default Project, get the OpenAPI description:

GET 'https://demo.nodegoat.io/.openapi'

Unauthenticated domain 'demo', access default Project, inspect the Project as an MCP server:

GET 'https://demo.nodegoat.io/.mcp'

Authenticated, access Project 1, access Project’s data, Type 2, apply Scope 3, apply Filter 4, request Object 5 & 6 & 7, request Object 8, quick search for 'A', apply a JSON-formatted filter form:

GET 'https://nodegoat.io/project/1/data/type/2/scope/3/filter/4/object/5,6,7?object_id=8&search=A&filter={}' -H 'Authorization: Bearer TOKEN'

Authenticated, access Project 1, access Project’s data Model, request Types 2 & 3 & 4

GET 'https://nodegoat.io/project/1/model/type/2,3,4' -H 'Authorization: Bearer TOKEN'

Authenticated, access Project 1, access Project’s Filters, request Filter 2 & 3:

GET 'https://nodegoat.io/project/1/feature/filter/2,3' -H 'Authorization: Bearer TOKEN'

Authenticated, access the Projects, request Project 1:

GET 'https://nodegoat.io/project/1' -H 'Authorization: Bearer TOKEN'

Domain  

The domain indicates whether you are creating an authenticated or unauthenticated/open request.

Authenticated

When making an authenticated request, HTTPS is required and should query nodegoat’s main API domain at nodegoat.io or api.nodegoat.net.

Unauthenticated

To make an unauthenticated request, you use the subdomain of your nodegoat Domain’s to query the nodegoat API over unencrypted HTTP at DOMAIN.nodegoat.io or api.DOMAIN.nodegoat.net. When you have an institutional installation of nodegoat you use the main API domain, you also have the option to use HTTPS.

Path  

The path tells the API what Project and what data you want to access.

//nodegoat/A  

Specify which nodegoat Project to access. Optional.

ADescription
noneAccess the default nodegoat Project. For mode = model combined with administrator clearance, this bypasses Project specificity and provides access to the full data Model.
/ project / IDAccess a specific nodegoat Project by its ID.
/ project or
/ project / ID without a mode
Access the Projects' configuration: returns the available Projects, or the specified Project with the instructions on how to access its data. See Response: Project.

//nodegoat/A.openapi  

Append .openapi to access the OpenAPI description for using the nodegoat API with the selected Project: / project / ID .openapi. The .openapi is set-up to provide a full machine-readable and promptable description for the Project. Without a specified (or default) Project, / project / .openapi describes the Projects' configuration. Optional.

//nodegoat/A.mcp  

Switch .openapi (described above) with .mcp to access the selected Project as an MCP server. The .mcp presents every operation described in .openapi as a tool that can be called by an AI client. Without a specified (or default) Project, .mcp serves the Projects' configuration. Optional.

//nodegoat/A/B  

Specify the mode. One of the following parameters has to be provided.

BDescription
/ ID or
?id = ID
Directly access Objects with their corresponding nodegoat IDs or other identifiers (see data Model on how to indicate what Object Descriptions can be used for identification). The ID can also be provided using the query component id (both GET and POST). The query component has to be used when identifiers contain characters reserved for URLs.
/ dataAccess the Project’s data.
/ modelAccess the Project's data Model. Without a specified project in the path, and with administrator clearance, the full data Model is accessed.
/ featureAccess the Project's Filters, Scopes, and Conditions. These use the data Model, but are not part of it.
/ graphAccess the Project's Analysis settings and its graphs.

//nodegoat/A/B:data/C  

Specify for which Type you want to access the data.

CDescription
/ type / IDAccess data for the specified Type.

//nodegoat/A/B:data/C/D  

Apply Project- and Type-specific operations to the request. More than one of the following parameters can be provided. Optional.

DDescription
/ scope / IDApply the specified Scope to the request. This allows you to generate highly-relational and ready-to-use data structures using nodegoat Scope functionality.
/ filter / IDApply the specified Filter to the request. Additionally, the Filter can be manipulated in the query component of the request.
/ condition / IDApply the specified Condition to the request to format the output.

//nodegoat/A/B:data/C/D/E  

Specify the data requested.

EDescription
/ objectSelect Object data.
/ object / ID(,ID)Select the specified Object(s)' data. Optional.

//nodegoat/A/B:model/C  

Specify for which Type(s) to access the data Model.

CDescription
/ type / ID(,ID)Access the data Model for the specified Type(s).

//nodegoat/A/B:feature/C  

Specify which Project feature to access. One of the following parameters has to be provided.

CDescription
/ filterAccess the Project's Filters, and the instructions on how to compose a Filter form for the query component.
/ scopeAccess the Project's Scopes, and the instructions on how to compose a Scope form for the query component.
/ conditionAccess the Project's Conditions, the effect of each Condition on the output, and the instructions on how to compose a Condition form for the query component.

//nodegoat/A/B:feature/C/D  

Specify which of the stored features to access. Optional.

DDescription
/ ID(,ID)Access the specified Filter(s), Scope(s), or Condition(s). When not included, all stored Filters, Scopes, or Conditions are returned.

//nodegoat/A/B:graph/C  

Specify for which Type to access the graph's available Analysis settings.

CDescription
/ type / IDAccess the available settings for the specified Type.

//nodegoat/A/B:graph/C/D  

Apply Project- and Type-specific operations to the request. Optional.

DDescription
/ condition / IDApply the specified Condition to the request. This allows you to apply constraints and other conditional weighting to the graph. A Condition form can be applied in the query component, see the condition parameter.

//nodegoat/A/B:graph/C/D/E  

Get the graph from Analysis.

EDescription
/ analysis / IDApply the specified Analysis settings and output the graph / edge list.

Component  

The query component allows you to further specify your request by means of search parameters. It is also possible to POST the query component instead of using GET (e.g. when using JSON in the request).

//nodegoat/A/B:data/C/D/E?Q  

All parameters in the query component are optional. When combined, each additional parameter will filter the result (AND).

Query the API for a Type's data Model to get an overview of the possible IDs for Object Descriptions, Sub-Object Details, and Sub-Object Descriptions.

QDescription
object_id = ID(,ID)Select the specified Object(s).
search = valueQuick search Objects for value.
filter = ID or
filter = JSON or
filter = Endpoint Dictionary
Apply a JSON-formatted Filter. The filter parameter allows you to customise and apply full-featured nodegoat Filters to your query. Access / feature / filter for the Project's stored Filters and the instructions on how to compose a Filter form.

A Filter form has to filter: a valid form that does not limit the selection returns an error instead of all Objects of the Type.

scope = ID or
scope = JSON
Apply a JSON-formatted Scope. The scope parameter allows you to customise and apply full-featured nodegoat Scopes to your query. Access / feature / scope for the Project's stored Scopes and the instructions on how to compose a Scope form.
condition = ID or
condition = JSON
Apply a JSON-formatted Condition to format the output. The condition parameter allows you to customise and apply full-featured nodegoat Conditions to your query. Access / feature / condition for the Project's stored Conditions, the effect of each Condition, and the instructions on how to compose a Condition form. The Condition is applied in addition to the Conditions that are already applied by the data Model and the Project.
output = outputSpecify the output format raw for native and fast output of the data without additional processing such as parsing Object names, or default.
order = element:ASC or
order = element:DESC or
order = JSON
Specify the Object's element used for ordering the output. An element could be one of the following: object_name, object_analysis, object_description_ID, date (Object version date).

Or, apply a JSON-formatted ordering form. The form can contain any of the following ranked properties and direction value specifying ASC or DESC:

{
"object": {
"object_name": "direction",
"object_analysis": "direction",
"object_description_ID": "direction",
"date": "direction"
},
"object_subs": {
Sub-Object Details ID: {
"object_sub_details_name": "direction",
"object_sub_details_date_start": "direction",
"object_sub_details_date_end": "direction",
"object_sub_description_ID": "direction"
}
}
}
limit = number or
limit = ∞
Limit the results to a maximum amount of Objects. Handy for pagination purposes. The default is 100, use ∞ (or 0) for no limit. Unauthenticated requests have a maximum of 10000, also when ∞ is used. Requests that specify object_id have no default limit.
offset = numberOffset the results with a specific amount of Objects. Handy for pagination purposes. Requires a limit.
total = 1Include the amount of Objects selected by the query (total_filtered) and the amount of Objects in the Type (total) in the result. Counting requires an additional query, so only request it when the amounts are needed for pagination.

//nodegoat/A/B:model/C?Q  

All parameters in the query component are optional.

QDescription
output = outputSpecify the output format: template for relational name-based IDs instead of numeric IDs (easy for storage purposes, see store Model), or default.

//nodegoat/A/B:feature/C?Q  

All parameters in the query component are optional.

QDescription
type_id = IDLimit the results to the features that apply to the specified Type.

Response  

The result from your request to the nodegoat API can be found in the JSON response under the key data (if not specified differently in the next sections). The result is a JSON dictionary that promotes direct lookup and access to its structure.

The specific response depends on the mode (model, data, feature, or graph, see the Query path section above) of your request.

Response: Data  

In mode = data the result contains:

  • objects The requested or queried Objects with the Object's definition, keyed by Object ID.
  • count The amount of Objects returned.
  • offset The offset applied to the query.
  • limit The limit applied to the query, ∞ when unlimited. This can differ from the requested limit: a default applies when no limit is set, and unauthenticated requests have a maximum.
  • total_filtered The amount of Objects selected by the query, before applying limit and offset. Only included with total = 1.
  • total The amount of Objects in the Type. Only included with total = 1.

Response: Model  

In mode = model the result contains:

  • types The requested Types with the Type's configuration, keyed by Type ID

Response: Feature  

In mode = feature the result contains:

  • filters, scopes, or conditions The requested Filters, Scopes, or Conditions.
  • instructions The instructions on how to compose a Filter, Scope, or Condition form, and the effect of a Condition on the output.

Each feature contains its ID feature_id, the type_id of the Type it applies to, its name and description, and its stored form. The form can be copied and adjusted for use in the query component, or in a request that stores a new feature. Filters and Conditions can include an additional member:

  • parameters The Endpoint Dictionary parameters of a Filter, when the Filter uses them.
  • form_model_conditions The Conditions that a stored Condition applies to the other Types a query touches on.

Consult store feature to find more on the possible members.

Response: Project  

When accessing / project or / project / ID without a mode, the result contains:

  • projects The Projects available to you, or the specified Project, each with its project_id and name. With administrator clearance, all Projects of the nodegoat Domain are returned, including their form.
  • instructions The instructions on how to access the data of the specified Project. Only included when the Project can be selected.

The form is the stored configuration of the Project, which can be copied and adjusted for use in a request that stores a new Project. Consult store Project to find more on the possible members.

Response: Graph  

The result from your request to the nodegoat API is a CSV file that includes the following columns:

  • key Identifier for the edge
  • from Start node
  • to End node
  • weight
  • time When applicable, this includes a sequence (white-space   separated) of start and end timestamps (comma , separated)