Function API
V.1 User Documentation
V.1 User Documentation
Higgs can perform a set of all-purpose functions which perform tasks on a target Resource. You can call Functions after a Resource ID.
To call example function someFunction
on a Classification such as Class/Person
you would have Class/Person/call/someFunction
.
Alternatively, for POST
functions, you can POST
the Resource id
in the POST
body using the resource
parameter as shown in the following Request Template:
GET|POST {function} HTTP/1.1
Host: higgs.online
{resourcePath}
POST branch
Copy an existing resource into your own account and assign the origin
Property to point to the branched Resource id
.
Name | Description |
resource
|
The Resource you want to branch your copy from. |
POST {resourcePath}/branch HTTP/1.1
Host: higgs.online
HTTP/1.1 200 OK
Date: Mon, 1 Mar 2016 11:11:11 GMT
Content-Type: application/ld+json
Content-Length: 1024
{
"@context": "https://higgs.online/context",
"@id": "higgs:Response/{responseType}",
"hsd:type": "higgs:Response",
"higgs:Operation": "{GET|POST|DELETE}",
"higgs:Response/{type}/message": "{resource} was branched into account {accountKey}.",
"higgs:resource": {
"@id": "{resource}",
...
"lastModified": "2017-03-01 11:11:11"
}
}
POST merge-request
Send a Merge Request Notification to the owner of the Resource.
Name | Description |
resource
|
The Resource you request to be merged. |
POST {resourcePath}/merge-request HTTP/1.1
Host: higgs.online
HTTP/1.1 200 OK
Date: Mon, 1 Mar 2016 11:11:11 GMT
Content-Type: application/ld+json
Content-Length: 1024
{
"@context": "https://higgs.online/context",
"@id": "higgs:Response/{type}/c6f6eb31-0db4-4156-9cf9-f5a7e98d27cd",
"hsd:type": "higgs:Response/{type}",
"higgs:Response/{type}/code": "{httpCode}",
"higgs:Operation": "{GET|POST|DELETE}",
"higgs:Response/{type}/message": "A Request to merge {resource} into {originAccount} was sent to the owner.",
"higgs:resource": {
"@id": "{resource}",
...
"lastModified": "2017-03-01 11:11:11"
}
}
GET|POST merge-accept{?mergeRequest}
As a Resource Owner, accept the Merge Request to merge the requestee's Resource with your working copy.
Name | Type | Description |
resource
|
URI |
The Resource to be merged. |
mergeRequest
|
classPath |
The Merge Request Key you would like to merge with. |
GET|POST {resourcePath}merge-accept HTTP/1.1
Host: higgs.online
{mergeRequest}
GET download{?*asText}
Download the resource as an encrypted JWT or decrypted text. Must be the resource owner to get decrypted text...
Name | Type | Description |
---|---|---|
resource
|
URI |
The Resource you want to download. |
*asText
|
boolean |
Decrypt the JWT in plain text. |
*Optional |
GET|POST {resourcePath}/download{?*asText} HTTP/1.1
Host: higgs.online
POST transform{?export,paramMap}
Transform a Resource into another Resource. This will automatically map data to matching Property keys, however users can provide their own map to customize the desired transformation.
Name | Type | Description |
---|---|---|
resource
|
URI |
The Resource to import to. |
export
|
URI |
The Resource to export from |
paramMap
|
Map
|
The export properties and matching import property to transform to. |
POST {resourcePath}/call/transform HTTP/1.1
Host: higgs.online
{export,paramMap}
POST {servicePath}/upload-csv{?headers}
Upload a CSV list of Resources into a Resource Service
Name | Type | Description |
---|---|---|
servicePath
|
URI |
The Service you want to upload to. |
headers
|
list |
headers in order of CSV cell representation. |
*Optional |
POST /{servicePath}/upload-csv HTTP/1.1
Host: higgs.online
Content-Type: multipart/form-data;
{fileUpload}
POST upload-resource
Upload a JSON representation of the target Resource and merge into your Knowledge Base.
POST /{resourcePath}upload-resource HTTP/1.1
Host: higgs.online
HTTP/1.1 200 OK
Date: Mon, 1 Mar 2016 11:11:11 GMT
Content-Type: application/ld+json
Content-Length: 1024
{
"@context": "https://higgs.online/context",
"@id": "higgs:Response/{type}",
"hsd:type": "higgs:Response",
"higgs:Response/{type}/code": "{httpCode}",
"higgs:Operation": "{GET|POST|DELETE}",
"higgs:Response/{type}/message": "File upload to {resource} was successful.",
"higgs:resource": {
"@id": "{resource}",
...
"lastModified": "2017-03-01 11:11:11"
}
}