Query
To query the nodegoat API you need a valid domain, a valid path, and a valid query component. The following URL contains the possible basic domain, path, and query parameters:
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&form={}
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
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.
A | Description |
---|---|
/ project / ID | Access a specific nodegoat Project. If this is left out, the default configured Project is assumed. |
//nodegoat/A/B
Specify the mode. One of the following parameters has to be provided.
B | Description |
---|---|
/ 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. |
/ data | Access the Project’s data. |
/ model | Access the Project's data Model. |
/ graph | Access the Project's Analysis settings and its graphs. |
//nodegoat/A/B:data/C
Specify for which Type you want to access the data.
C | Description |
---|---|
/ type / ID | Access 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.
D | Description |
---|---|
/ scope / ID | Apply the specified Scope to the request. This allows you to generate highly-relational and ready-to-use data structures using nodegoat Scope functionality. |
/ filter / ID | Apply the specified Filter to the request. Additionally, the Filter can be manipulated in the query component of the request. |
/ condition / ID | Apply the specified Condition to the request to format the output. |
//nodegoat/A/B:data/C/D/E
Specify the data requested.
D | Description |
---|---|
/ object | Select 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.
C | Description |
---|---|
/ type / ID(,ID) | Access the data Model for the specified Type(s). |
//nodegoat/A/B:graph/C
Specify for which Type to access the graph's available Analysis settings.
C | Description |
---|---|
/ type / ID | Access the available settings for the specified Type. |
//nodegoat/A/B:graph/C/D
Apply Project- and Type-specific operations to the request. Optional.
D | Description |
---|---|
/ condition / ID | Apply the specified Condition to the request. This allows you to apply constraints and other conditional weighting to the graph. |
//nodegoat/A/B:graph/C/D/E
Get the graph from Analysis.
E | Description |
---|---|
/ analysis / ID | Apply 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.
Q | Description |
---|---|
object_id = ID(,ID) | Select the specified Object(s). |
search = value | Quick search Objects for value . |
filter = ID orfilter = JSON | Apply a JSON-formatted Filter. The filter parameter allows you to customise and apply full-featured nodegoat Filters to your query. |
scope = ID orscope = JSON | Apply a JSON-formatted Scope. The scope parameter allows you to customise and apply full-featured nodegoat Scopes to your query. |
output = output | Specifiy 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 ororder = element:DESC ororder = 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
|
limit = number | Limit the results to a maximum amount of Objects. Handy for pagination purposes. |
offset = number | Offset the results with a specific amount of Objects. Handy for pagination purposes. |
//nodegoat/A/B:model/C?Q
All parameters in the query component are optional.
Q | Description |
---|---|
output = output | Specifiy the output format: template for relational name-based IDs instead of numeric IDs (easy for storage puposes, see store Model), or default . |
Response: Model & Data
The result from your request to the nodegoat API can be found in the JSON response under the key data
. The result is a JSON dictionary that promotes direct lookup and access to its structure.
The specific response depends on the mode (model or data, see the previous Query section) of your request.
Model
In mode = model
the result contains the requested Type IDs with the Type's configuration.
Data
In mode = data
the result contains the requested or queried Object IDs with the Object's definition.
Response: Graph
The result from your request to the nodegoat API is a CSV file that includes the following columns:
key
Identifier for the edgefrom
Start nodeto
End nodeweight
time
When applicable, this includes a sequence (white-space,
separated)