Metaware

DATE: 04 September 2015
This version:
http://polls.apiblueprint.org/v1
Latest version:
http://polls.apiblueprint.org/latest

Editors

Copyright (C) 2015 Telecom Italia S.p.A.

Metaware is the Open Source reference implementation of the Metadata Store Management Platform GE.

This project is part of FIWARE.


Abstract

Metaware is the Open Source reference implementation of the Metada Store Management Platform GE. This project is part of FIWARE.

This is a cookbook with recipes that show how to interact with Metaware API.


Authentication

Every API listed in this document can be accessed through a Basic authorization ("Authorization" field in header).

Authorization

The authorization in Metaware is based on a specific "permission" field, stored in every object. This field is actually an array of objects, and each of them contains two fields: + referenceId (id - string) - Id of the referring entity (can be a company, a department, or a user) + perm (string) - similarly to Unix permissions, this string contains the actions that the referring entity can do; "r": can read, "u": can update, "d": can delete (e.g., "rud": the referring entity can read, update, and delete the object).

Error list

  • Bad request (400): the received JSON object contains some errors.
  • Resource not found (404): they selected resource cannot be found.
  • Server error (500): the Metaware server has encountered an unexpected error.

API Specification

Company

Resources related to companies in the API.

A company has the following fields:

  • _id (id - string)

  • name (string)

  • description (string)

  • email (string)

  • phone (string)

  • address (string)

  • url (string)

Companies collection management [/api/v1/companies]

This resource refers to the whole companies collection.

List all companies - GET /api/v1/companies

Retrieves the list of all the stored companies metadata.

Request (application/json)
Response 200 (application/json)

Insert a new company - POST /api/v1/companies

The metadata related to the new company is stored.

Request (application/json)
Response 200 (application/json)

Single company management [/api/v1/companies/{companyId}]

This resource refers to a specific company.

Parameters
companyId (Required, string )
Id of a specific company

Retrieve a company - GET /api/v1/companies/{companyId}

Obtains the metadata of the selected company.

Request (application/json)
Response 200 (application/json)

Update a company - PUT /api/v1/companies/{companyId}

Modifies (or insert if missing) the metadata related to a specific company.

Request (application/json)
Response 200 (application/json)

Remove a company - DELETE /api/v1/companies/{companyId}

Removes the metadata related to the selected company.

Request (application/json)
Response 200 (application/json)

Department

Resources related to departments in the API.

A department belongs to a company and it has the following fields:

  • _id (id - string)

  • name (string)

  • description (string)

  • company_id (id - string) - this is the Id of the related company

  • email (string)

  • phone (string)

  • address (string)

  • url (string)

Departments collection management [/api/v1/departments]

This resource refers to the whole departments collection.

List all departments - GET /api/v1/departments

Retrieves the metadata about all the departments stored in Metaware.

Request (application/json)
Response 200 (application/json)

Insert a new department - POST /api/v1/departments

Store the metadata information about a new department.

Request (application/json)
Response 200 (application/json)

Single department management [/api/v1/departments/{departmentId}]

This resource refers to a specific department.

Parameters
departmentId (Required, string )
Id of a specific departments

Retrieve a department - GET /api/v1/departments/{departmentId}

Obtains the metadata information related to the selected department.

Request (application/json)
Response 200 (application/json)

Update a department - PUT /api/v1/departments/{departmentId}

Modifies (or insert if missing) the metadata information related to the selected department.

Request (application/json)
Response 200 (application/json)

Remove a department - DELETE /api/v1/departments/{departmentId}

Removes from Metaware the metadata related to a specific department.

Request (application/json)
Response 200 (application/json)

User

Resources related to users in the API.

A user can be associated to a department and a company; the schema is the following:

  • _id (id - string)

  • name (string)

  • surname (string)

  • email (string)

  • phone (string)

  • address (string)

  • company_id (id - string) - this is the Id of the related company

  • department_id (id - string) - this is the Id of the related department

  • username (string)

  • password (hashed string)

  • role (string) - can be "basic" or "admin".

Users collection management [/api/v1/users]

This resource refers to the whole users collection.

List all users - GET /api/v1/users

Retrieves the metadata related to all the registered users.

Request (application/json)
Response 200 (application/json)

Insert a new user - POST /api/v1/users

Registers the metadata of a new user.

Request (application/json)
Response 200 (application/json)

Single user management [/api/v1/users/{userId}]

This resource refers to a specific user.

Parameters
userId (Required, string )
Id of a specific user

Retrieve a user - GET /api/v1/users/{userId}

Obtains the metadata of the selected user.

Request (application/json)
Response 200 (application/json)

Update a user - PUT /api/v1/users/{userId}

Update (or insert if missing) the metadata of the selected user.

Request (application/json)
Response 200 (application/json)

Remove a user - DELETE /api/v1/users/{userId}

Removes the metadata of the selected user.

Request (application/json)
Response 200 (application/json)

Algorithm

Resources related to algorithms in the API.

An algorithm has the following fields:

  • _id (id - string)

  • name (string)

  • description (string)

  • type (string)

  • creationDate (long - unix epoch time)

  • lastModifiedDate (long - unix epoch time)

  • permissions (array - permission object) - array of permissions

  • owner (id - string) - the Id of the owner of the algorithm's metadata (can be a company, a department, or a user)

  • status (string)

  • model (string)

  • subModel (string)

  • hiveQuery (string)

  • elapsedTime (long)

  • runNumber (integer)

  • logUrl (string)

Algorithms collection management [/api/v1/algorithms]

This resource refers to the whole algorithms collection.

List all algorithms - GET /api/v1/algorithms

Retrieves the metadata about all the stored algorithms.

Request (application/json)
Response 200 (application/json)

Insert a new algorithm - POST /api/v1/algorithms

Store the metadata information regarding a new algorithm.

Request (application/json)
Response 200 (application/json)

Single algorithm management [/api/v1/algorithms/{algorithmId}]

This resource refers to a specific algorithm.

Parameters
algorithmId (Required, string )
Id of a specific algorithm

Retrieve an algorithm - GET /api/v1/algorithms/{algorithmId}

Obtains the metadata about a selected algorithm.

Request (application/json)
Response 200 (application/json)

Update an algorithm - PUT /api/v1/algorithms/{algorithmId}

Modifies (or insert if missing) the metadata about the selected algorithm.

Request (application/json)
Response 200 (application/json)

Delete an algorithm - DELETE /api/v1/algorithms/{algorithmId}

Removes from Metaware the metadata of the selected algorithm.

Request (application/json)
Response 200 (application/json)

Dataset

Resources related to datasets in the API.

A dataset has the following fields:

  • _id (id - string)

  • name (string)

  • description (string)

  • type (string)

  • creationDate (long - unix epoch time)

  • lastModifiedDate (long - unix epoch time)

  • permissions (array - permission object) - array of permissions

  • owner (id - string) - the Id of the owner of the algorithm's metadata (can be a company, a department, or a user)

  • status (string)

  • readOnly (boolean

  • structure (dataset structure - object) - simple JSON containing the structure of the related dataset (e.g., "X_COORD" : "integer")

Datasets collection management [/api/v1/datasets]

This resource refers to the whole datasets collection.

List all datasets - GET /api/v1/datasets

Retrieves the metadata of the whole list of datasets in Metaware.

Request (application/json)
Response 200 (application/json)

Insert a new dataset - POST /api/v1/datasets

Store the metadata information about the new dataset.

Request (application/json)
Response 200 (application/json)

Single dataset management [/api/v1/datasets/{datasetId}]

This resource refers to a specific dataset.

Parameters
datasetId (Required, string )
Id of a specific dataset

Retrieve a dataset - GET /api/v1/datasets/{datasetId}

Obtains the metadata information related to the specified dataset.

Request (application/json)
Response 200 (application/json)

Update a dataset - PUT /api/v1/datasets/{datasetId}

Update (or insert, if missing) the metadata related to the selected algorithm.

Request (application/json)
Response 200 (application/json)

Delete a dataset - DELETE /api/v1/datasets/{datasetId}

Removes from Metaware the metadata related to the selected dataset

Request (application/json)
Response 200 (application/json)

Import OpenData [/api/v1/datasets/importOpenData]

This resource imports a dataset in DCAT format.

Import a dataset DCAT - POST /api/v1/datasets/importOpenData

Convert and store the DCAT representation of the dataset (open data).

Request (application/xml)
Response 200 (application/json)

Export OpenData [/api/v1/datasets/exportOpenData/{datasetId}]

This resource exports a specific dataset in DCAT format.

Export a dataset DCAT - GET /api/v1/datasets/exportOpenData/{datasetId}

Retrives and convert the dataset in DCAT format (open data).

Request (application/json)
Response 200 (application/xml)

Data-Source

Resources related to data-sources in the API.

A data-source has the following fields:

  • _id (id - string)

  • name (string)

  • description (string)

  • type (string)

  • creationDate (long - unix epoch time)

  • lastModifiedDate (long - unix epoch time)

  • permissions (array - permission object) - array of permissions

  • owner (id - string) - the Id of the owner of the algorithm's metadata (can be a company, a department, or a user)

  • status (string)

  • subtype (string)

  • url (string)

  • username (string)

  • password (string)

  • resourceType (string) - can be "table", "query", or "file"

  • resource (string) - can be "table name", "query", "file name"

Data-Sources collection management [/api/v1/datasources]

This resource refers to the whole data-sources collection.

List all data-sources - GET /api/v1/datasources

Retrieves the metadata information about the whole list of data-sources.

Request (application/json)
Response 200 (application/json)

Insert a new data-source - POST /api/v1/datasources

Store the metadata of the new data-source.

Request (application/json)
Response 200 (application/json)

Single data-source management [/api/v1/datasources/{datasourceId}]

This resource refers to a specific data-source.

Parameters
datasourceId (Required, string )
Id of a specific data-source

Retrieve a data-source - GET /api/v1/datasources/{datasourceId}

Obtains the metadata of the specified data-source.

Request (application/json)
Response 200 (application/json)

Update a data-source - PUT /api/v1/datasources/{datasourceId}

Modifies (or insert if missing) the metadata of the selected data-source.

Request (application/json)
Response 200 (application/json)

Delete a data-source - DELETE /api/v1/datasources/{datasourceId}

Removes the metadata of the selected data-source.

Request (application/json)
Response 200 (application/json)

Process

Resources related to processes in the API.

A process has the following fields:

  • _id (id - string)

  • name (string)

  • description (string)

  • type (string)

  • creationDate (long - unix epoch time)

  • lastModifiedDate (long - unix epoch time)

  • permissions (array - permission object) - array of permissions

  • owner (id - string) - the Id of the owner of the algorithm's metadata (can be a company, a department, or a user)

  • status (string)

  • frequence (string) - can be "daily", "hourly", etc.

  • startingTime (long - unix epoch time)

  • lastRunTime (long - unix epoch time)

  • runNumber (long)

  • processingBlocks (array - processing blocks) - array of processing block objects; each of these object has two fields: "order" (int) and "block" (string)

  • logUrl (string)

Processes collection management [/api/v1/processes]

This resource refers to the whole processes collection.

List all processes - GET /api/v1/processes

Retrieves the metadata about the whole list of stored processes.

Request (application/json)
Response 200 (application/json)

Insert a new process - POST /api/v1/processes

Store the metadata information related to the new process.

Request (application/json)
Response 200 (application/json)

Single process management [/api/v1/processes/{processId}]

This resource refers to a specific process.

Parameters
processId (Required, string )
Id of a specific process

Retrieve a process - GET /api/v1/processes/{processId}

Obtains the metadata of the selected process.

Request (application/json)
Response 200 (application/json)

Update a process - PUT /api/v1/processes/{processId}

Update (or insert new, if missing) the metadata of the selected process.

Request (application/json)
Response 200 (application/json)

Delete a process - DELETE /api/v1/processes/{processId}

Removes the metadata of the selected process.

Request (application/json)
Response 200 (application/json)

Template

Resources related to templates in the API.

A template contains the various fields that an entity can have (e.g., algorithm, company, user); a template can only have two fields (+ the index), but the latter contains a set of sub-fields that describe the associated entity. The following is the example of Company template:

    {
        "_id" : ObjectId("5514334787284ced30e20bcf"),
        "name" : "company",
        "details" : {
            "_id" : "id - string",
            "name" : "string",
            "description" : "string",
            "email" : "string",
            "phone" : "string",
            "address" : "string",
            "url" : "string"
        }
    }

Templates collection management [/api/v1/templates]

This resource refers to the whole templates collection.

List all templates - GET /api/v1/templates

Obtains all the templates stored in Metaware.

Request (application/json)
Response 200 (application/json)

Insert a new template - POST /api/v1/templates

Store a new template.

Request (application/json)
Response 200 (application/json)

Signle template management [/api/v1/templates/{templateName}]

This resource refers to a specific template.

Parameters
templateName (Required, string )
The name of the refering object

Retrieve a template - GET /api/v1/templates/{templateName}

Obtains the information related to the specified template.

Request (application/json)
Response 200 (application/json)

Delete a template - DELETE /api/v1/templates/{templateName}

Removes a template from Metaware.

Request (application/json)
Response 200 (application/json)

DiscoverObj

Resources related to the discover functionality in the API.

Usable [/api/v1/discoverObjects/usable/{requestedId}]

This resource can be used to obtain a list of objects that can be used by the specified entity (can be a company, a department, or a user). This API scans the various collections by checking the "permissions" array in every object, to retrieves the objects "usable" by the specified entity.

Discover usable objects - GET /api/v1/discoverObjects/usable/{requestedId}

Request (application/json)
Response 200 (application/json)

Owned [/api/v1/discoverObjects/owned/{ownerId}]

This resource can be used to obtain a list of objects that are owned by the specified entity (can be a company, a department, or a user). This API scans the various collections by checking the "owner" field in every object.

Discover owned objects - GET /api/v1/discoverObjects/owned/{ownerId}

Request (application/json)
Response 200 (application/json)

Examples

Company

Companies collection management [/api/v1/companies]

List all companies - GET /api/v1/companies

Request (application/json)

Headers

Content-Type: application/json
Authorization: Basic YWRtaW46YWRtaW4=
Response 200 (application/json)

Headers

Content-Type: application/json

Body

[
    {
        "_id": "550812fab2d1f89cb41208c2",
        "name": "Telecom Italia",
        "description": "Telecom Italia Lab",
        "email": "info@tilab.com",
        "phone": "+390112285111",
        "address": "Via Reiss Romoli 274 Torino",
        "url": "http://www.telecomitalia.com/"
    },
    {
        "_id": "55081305b2d1f89cb41208c3",
        "name": "Consoft",
        "description": "Gruppo Consoft",
        "email": "info@gruppoconsoft.com",
        "phone": "+390113161571",
        "url": "http://www.consoft.it/"
    },
    {
        "_id": "559512dd11f6f3a1c91d0421",
        "name": "FIWARE",
        "description": "Open APIs for Open Minds",
        "email": "fiware-general-help@lists.fi-ware.org",
        "phone": "",
        "url": "https://www.fiware.org/"
    }
]

Insert a new company - POST /api/v1/companies

Request (application/json)

Headers

Content-Type: application/json
Authorization: Basic YWRtaW46YWRtaW4=

Body

{
    "name": "Consoft",
    "description": "Gruppo Consoft",
    "email": "info@gruppoconsoft.com",
    "phone": "+390113161571",
    "url": "http://www.consoft.it/"
}
Response 200 (application/json)

Headers

Content-Type: application/json

Body

55081305b2d1f89cb41208c3

Single company management [/api/v1/companies/{companyId}]

Parameters
companyId (Required, string )
Id of a specific company

Retrieve a company - GET /api/v1/companies/{companyId}

Request (application/json)

Headers

Content-Type: application/json
Authorization: Basic YWRtaW46YWRtaW4=
Response 200 (application/json)

Headers

Content-Type: application/json

Body

{
    "_id": "559512dd11f6f3a1c91d0421",
    "name": "FIWARE",
    "description": "Open APIs for Open Minds",
    "email": "fiware-general-help@lists.fi-ware.org",
    "phone": "",
    "url": "https://www.fiware.org/"
}

Update a company - PUT /api/v1/companies/{companyId}

Request (application/json)

Headers

Content-Type: application/json
Authorization: Basic YWRtaW46YWRtaW4=

Body

{
    "name": "FIWARE Open Source Community",
    "description": "Open APIs for Open Minds",
    "email": "fiware-general-help@lists.fi-ware.org",
    "phone": "123456789",
    "url": "https://www.fiware.org/"
}
Response 200 (application/json)

Headers

Content-Type: application/json

Body

{
    "_id": "559512dd11f6f3a1c91d0421",
    "name": "FIWARE Open Source Community",
    "description": "Open APIs for Open Minds",
    "email": "fiware-general-help@lists.fi-ware.org",
    "phone": "123456789",
    "url": "https://www.fiware.org/"
}

Remove a company - DELETE /api/v1/companies/{companyId}

Request (application/json)

Headers

Content-Type: application/json
Authorization: Basic YWRtaW46YWRtaW4=
Response 200 (application/json)

Headers

Content-Type: application/json

Body

559512dd11f6f3a1c91d0421

Department

Departments collection management [/api/v1/departments]

List all departments - GET /api/v1/departments

Request (application/json)

Headers

Content-Type: application/json
Authorization: Basic YWRtaW46YWRtaW4=
Response 200 (application/json)

Headers

Content-Type: application/json

Body

[
    {
        "_id": "55081357b2d1f89cb41208c5",
        "name": "Research",
        "description": "Research department",
        "company_id": "550812fab2d1f89cb41208c2",
        "email": "research@telecomitalia.com",
        "phone": "+390112285111",
        "url": "http://www.telecomitalia.com/research"
    },
    {
        "_id": "5594f73011f61c70f31dbbfc",
        "name": "Applications BU",
        "description": "Applications Business Unit",
        "company_id": "55081305b2d1f89cb41208c3",
        "email": "info@gruppoconsoft.com",
        "phone": "+390113161571",
        "url": "http://www.consoft.it/"
    }
]

Insert a new department - POST /api/v1/departments

Request (application/json)

Headers

Content-Type: application/json
Authorization: Basic YWRtaW46YWRtaW4=

Body

{
    "name": "Customer Service",
    "description": "Customer service department",
    "company_id": "550812fab2d1f89cb41208c2",
    "email": "customerservice@telecomitalia.com",
    "phone": "+390112285111",
    "url": "http://www.telecomitalia.com/customerservice"
}
Response 200 (application/json)

Headers

Content-Type: application/json

Body

5508134db2d1f89cb41209d5

Single department management [/api/v1/departments/{departmentId}]

Parameters
departmentId (Required, string )
Id of a specific departments

Retrieve a department - GET /api/v1/departments/{departmentId}

Request (application/json)

Headers

Content-Type: application/json
Authorization: Basic YWRtaW46YWRtaW4=
Response 200 (application/json)

Headers

Content-Type: application/json

Body

{
    "_id": "55081357b2d1f89cb41208c5",
    "name": "Research",
    "description": "Research department",
    "company_id": "550812fab2d1f89cb41208c2",
    "email": "research@telecomitalia.com",
    "phone": "+390112285111",
    "url": "http://www.telecomitalia.com/research"
}

Update a department - PUT /api/v1/departments/{departmentId}

Request (application/json)

Headers

Content-Type: application/json
Authorization: Basic YWRtaW46YWRtaW4=

Body

{
    "name": "Customer Service Center",
    "description": "Customer service department",
    "company_id": "550812fab2d1f89cb41208c2",
    "email": "customerservicedep@telecomitalia.com",
    "phone": "+390112285111",
    "url": "http://www.telecomitalia.com/customerservice"
}
Response 200 (application/json)

Headers

Content-Type: application/json

Body

{
    "_id": "5508134db2d1f89cb41209d5",
    "name": "Customer Service Center",
    "description": "Customer service department",
    "company_id": "550812fab2d1f89cb41208c2",
    "email": "customerservicedep@telecomitalia.com",
    "phone": "+390112285111",
    "url": "http://www.telecomitalia.com/customerservice"
}

Remove a department - DELETE /api/v1/departments/{departmentId}

Request (application/json)

Headers

Content-Type: application/json
Authorization: Basic YWRtaW46YWRtaW4=
Response 200 (application/json)

Headers

Content-Type: application/json

Body

5594f73011f61c70f31dbbfc

User

Users collection management [/api/v1/users]

List all users - GET /api/v1/users

Request (application/json)

Headers

Content-Type: application/json
Authorization: Basic YWRtaW46YWRtaW4=
Response 200 (application/json)

Headers

Content-Type: application/json

Body

[
    {
        "_id": "5594fc1611f61c70f31dbbfe",
        "name": "Marco",
        "surname": "Verdi",
        "email": "marcoverdi@telecomitalia.com",
        "phone": "+390112285111",
        "company_id": "550812fab2d1f89cb41208c2",
        "department_id": "5508134db2d1f89cb41208c4",
        "username": "verdi",
        "password": "aeca01371581fda90e31862e10405c4948567d1f74cd92aeac5fe8cd29b6ea96",
        "role": "admin"
    },
    {
        "_id": "55a63b3ae0021578699e84d0",
        "name": "Lucia",
        "surname": "Bianchi",
        "email": "lucia.bianchi@consoft.it",
        "phone": "+390113161571",
        "company_id": "55081305b2d1f89cb41208c3",
        "department_id": "5594f73011f61c70f31dbbfc",
        "username": "bianchi",
        "password": "14e59f423e87958ebe26243504b88e5a682e86af814844f2379650303e2bef21",
        "role": "basic"
    }
]

Insert a new user - POST /api/v1/users

Request (application/json)

Headers

Content-Type: application/json
Authorization: Basic YWRtaW46YWRtaW4=

Body

{
    "name": "Mario",
    "surname": "Rossi",
    "email": "mariorossi@consoft.it",
    "phone": "+390112285111",
    "company_id": "55081305b2d1f89cb41208c3",
    "department_id": "5594f73011f61c70f31dbbfc",
    "username": "rossi",
    "password": "aeca01371581fda90e31862e10405c4948567d1f74cd92aeac5fe8cd29b6ea96",
    "role": "basic"
}
Response 200 (application/json)

Headers

Content-Type: application/json

Body

55081305b2d1f89cb41208c3

Single user management [/api/v1/users/{userId}]

Parameters
userId (Required, string )
Id of a specific user

Retrieve a user - GET /api/v1/users/{userId}

Request (application/json)

Headers

Content-Type: application/json
Authorization: Basic YWRtaW46YWRtaW4=
Response 200 (application/json)

Headers

Content-Type: application/json

Body

{
    "_id": "55a63b3ae0021578699e84d0",
    "name": "Lucia",
    "surname": "Bianchi",
    "email": "lucia.bianchi@consoft.it",
    "phone": "+390113161571",
    "company_id": "55081305b2d1f89cb41208c3",
    "department_id": "5594f73011f61c70f31dbbfc",
    "username": "bianchi",
    "password": "14e59f423e87958ebe26243504b88e5a682e86af814844f2379650303e2bef21",
    "role": "basic"
}

Update a user - PUT /api/v1/users/{userId}

Request (application/json)

Headers

Content-Type: application/json
Authorization: Basic YWRtaW46YWRtaW4=

Body

{
    "name": "Francesca",
    "surname": "Bianchi",
    "email": "francescabianchi@consoft.it",
    "phone": "+39587964421",
    "company_id": "55081305b2d1f89cb41208c3",
    "department_id": "5594f73011f61c70f31dbbfc",
    "username": "bianchihcnaib",
    "password": "14e59f423e87958ebe26243504b88e5a682e86af814844f2379650303e2bef21",
    "role": "basic"
}
Response 200 (application/json)

Headers

Content-Type: application/json

Body

{
    "_id": "55a63b3ae0021578699e84d0",
    "name": "Francesca",
    "surname": "Bianchi",
    "email": "francescabianchi@consoft.it",
    "phone": "+39587964421",
    "company_id": "55081305b2d1f89cb41208c3",
    "department_id": "5594f73011f61c70f31dbbfc",
    "username": "bianchihcnaib",
    "password": "14e59f423e87958ebe26243504b88e5a682e86af814844f2379650303e2bef21",
    "role": "basic"
}

Remove a user - DELETE /api/v1/users/{userId}

Request (application/json)

Headers

Content-Type: application/json
Authorization: Basic YWRtaW46YWRtaW4=
Response 200 (application/json)

Headers

Content-Type: application/json

Body

55a63b3ae0021578699e84d0

Algorithm

Algorithms collection management [/api/v1/algorithms]

List all algorithms - GET /api/v1/algorithms

Request (application/json)

Headers

Content-Type: application/json
Authorization: Basic YWRtaW46YWRtaW4=
Response 200 (application/json)

Headers

Content-Type: application/json

Body

[
    {
        "_id": "556f31ac2c7cc6dbf16985c9",
        "name": "Dijkstra",
        "description": "Dijkstra's algorithm is an algorithm for finding the shortest paths between nodes in a graph.",
        "type": "Search",
        "creationDate": 1362962298,
        "lastModifiedDate": 1392962298,
        "permissions": [
            {
                "referenceId": "5508151eb2d1f89cb41208c6",
                "perm": "rud"
            },
            {
                "referenceId": "5508151eb2d1f89cb41208c6",
                "perm": "r"
            }
        ],
        "owner": "550812fab2d1f89cb41208c2",
        "status": "public",
        "model": "model test",
        "subModel": "submodel test",
        "hiveQuery": "none",
        "elapsedTime": 123456789,
        "runNumber": 125,
        "logUrl": "https://en.wikipedia.org/wiki/Dijkstra's_algorithm"
    },
    {
        "_id": "556f31e02c7cc6dbf16985ca",
        "name": "NTRUEncrypt",
        "description": "The NTRUEncrypt public key cryptosystem, also known as the NTRU encryption algorithm, is a lattice-based alternative to RSA and ECC and is based on the shortest vector problem in a lattice (which is not known to be breakable using quantum computers).",
        "type": "Security",
        "creationDate": 820458061,
        "lastModifiedDate": 1293843661,
        "permissions": [
            {
                "referenceId": "5594fc1611f61c70f31dbbfe",
                "perm": "rud"
            }
        ],
        "owner": "5594fc1611f61c70f31dbbfe",
        "status": "private",
        "model": "updated model test",
        "subModel": "submodel test",
        "hiveQuery": "none",
        "elapsedTime": 123456789,
        "runNumber": 500,
        "logUrl": "https://www.securityinnovation.com/products/encryption-libraries/ntru-cryptography.html"
    }
]

Insert a new algorithm - POST /api/v1/algorithms

Request (application/json)

Headers

Content-Type: application/json
Authorization: Basic YWRtaW46YWRtaW4=

Body

{
    "name": "RSA",
    "description": "RSA is one of the first practical public-key cryptosystems and is widely used for secure data transmission. In such a cryptosystem, the encryption key is public and differs from the decryption key which is kept secre.",
    "type": "Security",
    "creationDate": 218160000,
    "lastModifiedDate": 968198400,
    "permissions": [],
    "owner": "5594fc1611f61c70f31dbbfe",
    "status": "public",
    "model": "updated model test",
    "subModel": "submodel test",
    "hiveQuery": "none",
    "elapsedTime": 123456789,
    "runNumber": 10,
    "logUrl": "http://www.emc.com/emc-plus/rsa-labs/standards-initiatives/pkcs-rsa-cryptography-standard.htm"
}
Response 200 (application/json)

Headers

Content-Type: application/json

Body

556f31e02c7cc6dbf16985ca

Single algorithm management [/api/v1/algorithms/{algorithmId}]

Parameters
algorithmId (Required, string )
Id of a specific algorithm

Retrieve an algorithm - GET /api/v1/algorithms/{algorithmId}

Request (application/json)

Headers

Content-Type: application/json
Authorization: Basic YWRtaW46YWRtaW4=
Response 200 (application/json)

Headers

Content-Type: application/json

Body

{
    "_id": "556f31e02c7cc6dbf16985ca",
    "name": "NTRUEncrypt",
    "description": "The NTRUEncrypt public key cryptosystem, also known as the NTRU encryption algorithm, is a lattice-based alternative to RSA and ECC and is based on the shortest vector problem in a lattice (which is not known to be breakable using quantum computers).",
    "type": "Security",
    "creationDate": 820458061,
    "lastModifiedDate": 1293843661,
    "permissions": [
        {
            "referenceId": "5594fc1611f61c70f31dbbfe",
            "perm": "rud"
        }
    ],
    "owner": "5594fc1611f61c70f31dbbfe",
    "status": "private",
    "model": "updated model test",
    "subModel": "submodel test",
    "hiveQuery": "none",
    "elapsedTime": 123456789,
    "runNumber": 500,
    "logUrl": "https://www.securityinnovation.com/products/encryption-libraries/ntru-cryptography.html"
}

Update an algorithm - PUT /api/v1/algorithms/{algorithmId}

Request (application/json)

Headers

Content-Type: application/json
Authorization: Basic YWRtaW46YWRtaW4=

Body

{
    "name": "NTRU encryption algorithm",
    "description": "The NTRUEncrypt public key cryptosystem, also known as the NTRU encryption algorithm, is a lattice-based alternative to RSA and ECC and is based on the shortest vector problem in a lattice (which is not known to be breakable using quantum computers).",
    "type": "Security",
    "creationDate": 820458061,
    "lastModifiedDate": 1293843661,
    "permissions": [
        {
            "referenceId": "5594fc1611f61c70f31dbbfe",
            "perm": "r"
        }
    ],
    "owner": "5594fc1611f61c70f31dbbfe",
    "status": "private",
    "model": "model test",
    "subModel": "submodel test",
    "hiveQuery": "none",
    "elapsedTime": 123456789,
    "runNumber": 5000,
    "logUrl": "https://www.securityinnovation.com/products/encryption-libraries/ntru-cryptography.html"
}
Response 200 (application/json)

Headers

Content-Type: application/json

Body

{
    "_id": "556f31e02c7cc6dbf16985ca",
    "name": "NTRU encryption algorithm",
    "description": "The NTRUEncrypt public key cryptosystem, also known as the NTRU encryption algorithm, is a lattice-based alternative to RSA and ECC and is based on the shortest vector problem in a lattice (which is not known to be breakable using quantum computers).",
    "type": "Security",
    "creationDate": 820458061,
    "lastModifiedDate": 1293843661,
    "permissions": [
        {
            "referenceId": "5594fc1611f61c70f31dbbfe",
            "perm": "r"
        }
    ],
    "owner": "5594fc1611f61c70f31dbbfe",
    "status": "private",
    "model": "model test",
    "subModel": "submodel test",
    "hiveQuery": "none",
    "elapsedTime": 123456789,
    "runNumber": 5000,
    "logUrl": "https://www.securityinnovation.com/products/encryption-libraries/ntru-cryptography.html"
}

Delete an algorithm - DELETE /api/v1/algorithms/{algorithmId}

Request (application/json)

Headers

Content-Type: application/json
Authorization: Basic YWRtaW46YWRtaW4=
Response 200 (application/json)

Headers

Content-Type: application/json

Body

556f31e02c7cc6dbf16985ca

Dataset

Datasets collection management [/api/v1/datasets]

List all datasets - GET /api/v1/datasets

Request (application/json)

Headers

Content-Type: application/json
Authorization: Basic YWRtaW46YWRtaW4=
Response 200 (application/json)

Headers

Content-Type: application/json

Body

[
    {
        "_id": "559503cd11f61c70f31dbbff",
        "name": "Bike Sharing",
        "description": "Bike Sharing of Turin from AperTO",
        "type": "test",
        "creationDate": 1411002061,
        "lastModifiedDate": 1474160461,
        "permissions": [
            {
                "referenceId": "5508151eb2d1f89cb41208c6",
                "perm": "rud"
            }
        ],
        "owner": "550812fab2d1f89cb41208c2",
        "status": "public",
        "readOnly": false,
        "keyword": "bike",
        "theme": "viability",
        "accessUrl": "http://aperto.comune.torino.it/sites/default/files/bike_sharing.csv",
        "distDescription": "Comma separated value file",
        "distFormat": "cvs",
        "license": "http://www.dati.gov.it/iodl/2.0/",
        "structure": {
            "ID_STRING": "String",
            "ID_BIKE_SHARING": "String",
            "DENOMINAZIONE": "String",
            "URL": "String",
            "COORD_X": "Float",
            "COORD_Y": "Float"
        }
    },
    {
        "_id": "5595128411f6f3a1c91d0420",
        "name": "Car Sharing",
        "description": "Car Sharing of Turin from AperTO",
        "type": "test",
        "creationDate": 1411002061,
        "lastModifiedDate": 1474160461,
        "permissions": [
            {
                "referenceId": "5508151eb2d1f89cb41208c6",
                "perm": "rud"
            }
        ],
        "owner": "550812fab2d1f89cb41208c2",
        "status": "public",
        "readOnly": false,
        "keyword": "car",
        "theme": "viability",
        "accessUrl": "http://aperto.comune.torino.it/sites/default/files/car_sharing.csv",
        "distDescription": "Comma separated value file",
        "distFormat": "cvs",
        "license": "http://www.dati.gov.it/iodl/2.0/",
        "structure": {
            "ID_CAR_SHARING": "String",
            "NOME_PARCHEGGIO": "String",
            "UBICAZIONE": "String",
            "URL": "String",
            "COORD_X": "Float",
            "COORD_Y": "Float"
        }
    }
]

Insert a new dataset - POST /api/v1/datasets

Request (application/json)

Headers

Content-Type: application/json
Authorization: Basic YWRtaW46YWRtaW4=

Body

{
    "name": "Skate Sharing",
    "description": "Skate Sharing of Turin from AperTO",
    "type": "Default type",
    "creationDate": 1411002061,
    "lastModifiedDate": 1474160461,
    "permissions": [],
    "owner": "550812fab2d1f89cb41208c2",
    "status": "public",
    "readOnly": false,
    "structure": {}
}
Response 200 (application/json)

Headers

Content-Type: application/json

Body

55b2415196f0bc192c79cc31

Single dataset management [/api/v1/datasets/{datasetId}]

Parameters
datasetId (Required, string )
Id of a specific dataset

Retrieve a dataset - GET /api/v1/datasets/{datasetId}

Request (application/json)

Headers

Content-Type: application/json
Authorization: Basic YWRtaW46YWRtaW4=
Response 200 (application/json)

Headers

Content-Type: application/json

Body

{
    "_id": "55b2415196f0bc192c79cc31",
    "name": "Skate Sharing",
    "description": "Skate Sharing of Turin from AperTO",
    "type": "Default type",
    "creationDate": 1411002061,
    "lastModifiedDate": 1474160461,
    "permissions": [],
    "owner": "550812fab2d1f89cb41208c2",
    "status": "public",
    "readOnly": false,
    "structure": {}
}

Update a dataset - PUT /api/v1/datasets/{datasetId}

Request (application/json)

Headers

Content-Type: application/json
Authorization: Basic YWRtaW46YWRtaW4=

Body

{
    "name": "Skate Sharing",
    "description": "Skate Sharing of Turin from AperTO",
    "type": "Default type",
    "creationDate": 1411002061,
    "lastModifiedDate": 1474160461,
    "permissions": [],
    "owner": "550812fab2d1f89cb41208c2",
    "status": "public",
    "readOnly": false,
    "structure": {
        "ID_SKATE_SHARING": "String",
        "NAME_HUB": "String",
        "UBICAZIONE": "String",
        "URL": "String",
        "COORD_X": "Float",
        "COORD_Y": "Float"
    }
}
Response 200 (application/json)

Headers

Content-Type: application/json

Body

{
    "_id": "55b2415196f0bc192c79cc31",
    "name": "Skate Sharing",
    "description": "Skate Sharing of Turin from AperTO",
    "type": "Default type",
    "creationDate": 1411002061,
    "lastModifiedDate": 1474160461,
    "permissions": [],
    "owner": "550812fab2d1f89cb41208c2",
    "status": "public",
    "readOnly": false,
    "structure": {
        "ID_SKATE_SHARING": "String",
        "NAME_HUB": "String",
        "UBICAZIONE": "String",
        "URL": "String",
        "COORD_X": "Float",
        "COORD_Y": "Float"
    }
}

Delete a dataset - DELETE /api/v1/datasets/{datasetId}

Request (application/json)

Headers

Content-Type: application/json
Authorization: Basic YWRtaW46YWRtaW4=
Response 200 (application/json)

Headers

Content-Type: application/json

Body

55b2415196f0bc192c79cc31

Import OpenData [/api/v1/datasets/importOpenData]

Import a dataset DCAT - POST /api/v1/datasets/importOpenData

Request (application/xml)

Headers

Content-Type: application/xml
Authorization: Basic YWRtaW46YWRtaW4=

Body

<?xml version="1.0"?>
<rdf:RDF
    xmlns:dct="http://purl.org/dc/terms/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:adms="http://www.w3.org/ns/adms#"
    xmlns:vcard="http://www.w3.org/2006/vcard/ns#"
    xmlns:dcat="http://www.w3.org/ns/dcat#"
    xmlns:foaf="http://xmlns.com/foaf/0.1/" >
    <rdf:Description rdf:about="http://metaware.org/dataset#559503cd11f61c70f31dbbff">
        <rdf:type>http://www.w3.org/ns/dcat#Dataset</rdf:type>
        <dct:description>Bike Sharing of Turin from AperTO</dct:description>
        <dct:publisher rdf:resource="http://metaware.org/organization#550812fab2d1f89cb41208c2"/>
        <dct:title>Bike Sharing</dct:title>
        <adms:contactPoint rdf:resource="http://metaware.org/contactpoint#550812fab2d1f89cb41208c2"/>
        <dcat:keyword>bike</dcat:keyword>
        <dct:modified rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2016-09-18T03:01:01</dct:modified>
        <dct:identifier>559503cd11f61c70f31dbbff</dct:identifier>
        <dct:issued rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2014-09-18T03:01:01</dct:issued>
        <dcat:distribution rdf:resource="http://metaware.org/distribution#558d759f8192682c10631285"/>
    </rdf:Description>
    <rdf:Description rdf:about="http://metaware.org/organization#550812fab2d1f89cb41208c2">
        <foaf:mbox>info@tilab.com</foaf:mbox>
        <foaf:homepage>http://www.telecomitalia.com/</foaf:homepage>
        <foaf:name>Telecom Italia</foaf:name>
        <dct:type>http://purl.org/adms/publishertype/Company</dct:type>
        <rdf:type rdf:resource="http://xmlns.com/foaf/0.1/Agent"/>
    </rdf:Description>
    <rdf:Description rdf:about="http://metaware.org/address#">
        <vcard:country-name>tmp</vcard:country-name>
        <vcard:locality>tmp</vcard:locality>
        <vcard:postal-code>tmp</vcard:postal-code>
        <vcard:street-address>Via Reiss Romoli 274 Torino</vcard:street-address>
        <rdf:type>http://www.w3.org/2006/vcard/ns#Address</rdf:type>
    </rdf:Description>
    <rdf:Description rdf:about="http://metaware.org/publisher#558d761b8192682c10631286">
        <foaf:name>Telecom Italia</foaf:name>
        <dct:type>http://purl.org/adms/publishertype/Company</dct:type>
        <rdf:type rdf:resource="http://xmlns.com/foaf/0.1/Agent"/>
    </rdf:Description>
    <rdf:Description rdf:about="http://metaware.org/telephone#">
        <rdf:type>http://www.w3.org/2006/vcard/ns#Work</rdf:type>
        <rdf:type>http://www.w3.org/2006/vcard/ns#Voice</rdf:type>
        <vcard:hasValue>+390112285111</vcard:hasValue>
    </rdf:Description>
    <rdf:Description rdf:about="http://metaware.org/distribution#558d759f8192682c10631285">
        <dct:license>http://www.dati.gov.it/iodl/2.0/</dct:license>
        <dct:format>cvs</dct:format>
        <dct:description>Comma separated value file</dct:description>
        <dcat:accessURL>http://aperto.comune.torino.it/sites/default/files/bike_sharing.csv</dcat:accessURL>
        <rdf:type>http://www.w3.org/ns/dcat#Distribution</rdf:type>
    </rdf:Description>
    <rdf:Description rdf:about="http://metaware.org/catalog#">
        <dcat:dataset rdf:resource="http://metaware.org/dataset#559503cd11f61c70f31dbbff"/>
        <dct:license rdf:resource="http://www.dati.gov.it/iodl/2.0/"/>
        <foaf:homepage>http://metaware.org/</foaf:homepage>
        <dct:title>Default Catalog Title</dct:title>
        <dct:publisher rdf:resource="http://metaware.org/publisher#558d761b8192682c10631286"/>
        <rdf:type>http://www.w3.org/ns/dcat#Catalog</rdf:type>
        <dct:description>This is the default catalog for MetaWare.</dct:description>
        <dct:modified rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2015-09-04T10:40:18</dct:modified>
        <dct:language>http://id.loc.gov/vocabulary/iso639-1/en</dct:language>
        <dct:issued rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2015-09-04T10:40:18</dct:issued>
    </rdf:Description>
    <rdf:Description rdf:about="http://metaware.org/contactpoint#550812fab2d1f89cb41208c2">
        <vcard:hasAddress rdf:resource="http://metaware.org/address#"/>
        <vcard:hasTelephone rdf:resource="http://metaware.org/telephone#"/>
        <vcard:hasEmail rdf:resource="mailto:info@tilab.com"/>
        <vcard:fn>Telecom Italia</vcard:fn>
        <rdf:type>http://www.w3.org/2006/vcard/ns#Organization</rdf:type>
    </rdf:Description>
</rdf:RDF>
Response 200 (application/json)

Headers

Content-Type: application/json

Body

55b2415196f0bc192c79cc31

Export OpenData [/api/v1/datasets/exportOpenData/{datasetId}]

Export a dataset DCAT - GET /api/v1/datasets/exportOpenData/{datasetId}

Request (application/json)

Headers

Content-Type: application/json
Authorization: Basic YWRtaW46YWRtaW4=
Response 200 (application/xml)

Headers

Content-Type: application/xml

Body

<?xml version="1.0"?>
<rdf:RDF
    xmlns:dct="http://purl.org/dc/terms/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:adms="http://www.w3.org/ns/adms#"
    xmlns:vcard="http://www.w3.org/2006/vcard/ns#"
    xmlns:dcat="http://www.w3.org/ns/dcat#"
    xmlns:foaf="http://xmlns.com/foaf/0.1/" >
    <rdf:Description rdf:about="http://metaware.org/dataset#559503cd11f61c70f31dbbff">
        <rdf:type>http://www.w3.org/ns/dcat#Dataset</rdf:type>
        <dct:description>Bike Sharing of Turin from AperTO</dct:description>
        <dct:publisher rdf:resource="http://metaware.org/organization#550812fab2d1f89cb41208c2"/>
        <dct:title>Bike Sharing</dct:title>
        <adms:contactPoint rdf:resource="http://metaware.org/contactpoint#550812fab2d1f89cb41208c2"/>
        <dcat:keyword>bike</dcat:keyword>
        <dct:modified rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2016-09-18T03:01:01</dct:modified>
        <dct:identifier>559503cd11f61c70f31dbbff</dct:identifier>
        <dct:issued rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2014-09-18T03:01:01</dct:issued>
        <dcat:distribution rdf:resource="http://metaware.org/distribution#558d759f8192682c10631285"/>
    </rdf:Description>
    <rdf:Description rdf:about="http://metaware.org/organization#550812fab2d1f89cb41208c2">
        <foaf:mbox>info@tilab.com</foaf:mbox>
        <foaf:homepage>http://www.telecomitalia.com/</foaf:homepage>
        <foaf:name>Telecom Italia</foaf:name>
        <dct:type>http://purl.org/adms/publishertype/Company</dct:type>
        <rdf:type rdf:resource="http://xmlns.com/foaf/0.1/Agent"/>
    </rdf:Description>
    <rdf:Description rdf:about="http://metaware.org/address#">
        <vcard:country-name>tmp</vcard:country-name>
        <vcard:locality>tmp</vcard:locality>
        <vcard:postal-code>tmp</vcard:postal-code>
        <vcard:street-address>Via Reiss Romoli 274 Torino</vcard:street-address>
        <rdf:type>http://www.w3.org/2006/vcard/ns#Address</rdf:type>
    </rdf:Description>
    <rdf:Description rdf:about="http://metaware.org/publisher#558d761b8192682c10631286">
        <foaf:name>Telecom Italia</foaf:name>
        <dct:type>http://purl.org/adms/publishertype/Company</dct:type>
        <rdf:type rdf:resource="http://xmlns.com/foaf/0.1/Agent"/>
    </rdf:Description>
    <rdf:Description rdf:about="http://metaware.org/telephone#">
        <rdf:type>http://www.w3.org/2006/vcard/ns#Work</rdf:type>
        <rdf:type>http://www.w3.org/2006/vcard/ns#Voice</rdf:type>
        <vcard:hasValue>+390112285111</vcard:hasValue>
    </rdf:Description>
    <rdf:Description rdf:about="http://metaware.org/distribution#558d759f8192682c10631285">
        <dct:license>http://www.dati.gov.it/iodl/2.0/</dct:license>
        <dct:format>cvs</dct:format>
        <dct:description>Comma separated value file</dct:description>
        <dcat:accessURL>http://aperto.comune.torino.it/sites/default/files/bike_sharing.csv</dcat:accessURL>
        <rdf:type>http://www.w3.org/ns/dcat#Distribution</rdf:type>
    </rdf:Description>
    <rdf:Description rdf:about="http://metaware.org/catalog#">
        <dcat:dataset rdf:resource="http://metaware.org/dataset#559503cd11f61c70f31dbbff"/>
        <dct:license rdf:resource="http://www.dati.gov.it/iodl/2.0/"/>
        <foaf:homepage>http://metaware.org/</foaf:homepage>
        <dct:title>Default Catalog Title</dct:title>
        <dct:publisher rdf:resource="http://metaware.org/publisher#558d761b8192682c10631286"/>
        <rdf:type>http://www.w3.org/ns/dcat#Catalog</rdf:type>
        <dct:description>This is the default catalog for MetaWare.</dct:description>
        <dct:modified rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2015-09-04T10:40:18</dct:modified>
        <dct:language>http://id.loc.gov/vocabulary/iso639-1/en</dct:language>
        <dct:issued rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2015-09-04T10:40:18</dct:issued>
    </rdf:Description>
    <rdf:Description rdf:about="http://metaware.org/contactpoint#550812fab2d1f89cb41208c2">
        <vcard:hasAddress rdf:resource="http://metaware.org/address#"/>
        <vcard:hasTelephone rdf:resource="http://metaware.org/telephone#"/>
        <vcard:hasEmail rdf:resource="mailto:info@tilab.com"/>
        <vcard:fn>Telecom Italia</vcard:fn>
        <rdf:type>http://www.w3.org/2006/vcard/ns#Organization</rdf:type>
    </rdf:Description>
</rdf:RDF>

Data-Source

Data-Sources collection management [/api/v1/datasources]

List all data-sources - GET /api/v1/datasources

Request (application/json)

Headers

Content-Type: application/json
Authorization: Basic YWRtaW46YWRtaW4=
Response 200 (application/json)

Headers

Content-Type: application/json

Body

[
    {
        "_id": "55a53117e00277027a182d41",
        "name": "Sharing System data-source",
        "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
        "type": "test",
        "creationDate": 1436889028,
        "lastModifiedDate": 1436889039,
        "permissions": [
            {
                "referenceId": "5508151eb2d1f89cb41208c6",
                "perm": "rud"
            }
        ],
        "owner": "5508151eb2d1f89cb41208c6",
        "status": "public",
        "subtype": "initial test",
        "url": "jdbc://mysql://metaware.org/test/sharing",
        "username": "metaware",
        "password": "metaware",
        "resourceType": "query",
        "resource": "SELECT * FROM SHARING"
    }
]

Insert a new data-source - POST /api/v1/datasources

Request (application/json)

Headers

Content-Type: application/json
Authorization: Basic YWRtaW46YWRtaW4=

Body

{
    "name": "Warehouse System data-source",
    "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
    "type": "test",
    "creationDate": 1436889028,
    "lastModifiedDate": 1436889039,
    "permissions": [],
    "owner": "5508151eb2d1f89cb41208c6",
    "status": "public",
    "subtype": "initial test",
    "url": "jdbc://mysql://metaware.org/test/warehouse",
    "username": "metaware",
    "password": "metaware",
    "resourceType": "query",
    "resource": "SELECT * FROM WAREHOUSE"
}
Response 200 (application/json)

Headers

Content-Type: application/json

Body

55a53117e00277027a182d41

Single data-source management [/api/v1/datasources/{datasourceId}]

Parameters
datasourceId (Required, string )
Id of a specific data-source

Retrieve a data-source - GET /api/v1/datasources/{datasourceId}

Request (application/json)

Headers

Content-Type: application/json
Authorization: Basic YWRtaW46YWRtaW4=
Response 200 (application/json)

Headers

Content-Type: application/json

Body

{
    "_id": "55a53117e00277027a182d41",
    "name": "Sharing System data-source",
    "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
    "type": "test",
    "creationDate": 1436889028,
    "lastModifiedDate": 1436889039,
    "permissions": [
        {
            "referenceId": "5508151eb2d1f89cb41208c6",
            "perm": "rud"
        }
    ],
    "owner": "5508151eb2d1f89cb41208c6",
    "status": "public",
    "subtype": "initial test",
    "url": "jdbc://mysql://metaware.org/test/sharing",
    "username": "metaware",
    "password": "metaware",
    "resourceType": "query",
    "resource": "SELECT * FROM SHARING"
}

Update a data-source - PUT /api/v1/datasources/{datasourceId}

Request (application/json)

Headers

Content-Type: application/json
Authorization: Basic YWRtaW46YWRtaW4=

Body

{
    "_id": "55a53117e00277027a182d41",
    "name": "Sharing System data-source",
    "description": "Source point for sharing system.",
    "type": "Relational database",
    "creationDate": 1436889028,
    "lastModifiedDate": 1436889039,
    "permissions": [],
    "owner": "5508151eb2d1f89cb41208c6",
    "status": "public",
    "subtype": "initial test",
    "url": "jdbc://mysql://metaware.org/test/sharing",
    "username": "metaware",
    "password": "metaware",
    "resourceType": "query",
    "resource": "SELECT * FROM SHARING"
}
Response 200 (application/json)

Headers

Content-Type: application/json

Body

{
    "_id": "55a53117e00277027a182d41",
    "name": "Sharing System data-source",
    "description": "Source point for sharing system.",
    "type": "Relational database",
    "creationDate": 1436889028,
    "lastModifiedDate": 1436889039,
    "permissions": [],
    "owner": "5508151eb2d1f89cb41208c6",
    "status": "public",
    "subtype": "initial test",
    "url": "jdbc://mysql://metaware.org/test/sharing",
    "username": "metaware",
    "password": "metaware",
    "resourceType": "query",
    "resource": "SELECT * FROM SHARING"
}

Delete a data-source - DELETE /api/v1/datasources/{datasourceId}

Request (application/json)

Headers

Content-Type: application/json
Authorization: Basic YWRtaW46YWRtaW4=
Response 200 (application/json)

Headers

Content-Type: application/json

Body

55a53117e00277027a182d41

Process

Processes collection management [/api/v1/processes]

List all processes - GET /api/v1/processes

Request (application/json)

Headers

Content-Type: application/json
Authorization: Basic YWRtaW46YWRtaW4=
Response 200 (application/json)

Headers

Content-Type: application/json

Body

[
    {
        "_id": "55e03507a44640611190febc",
        "name": "Nmap process",
        "description": "Nmap process running on test machine",
        "type": "test",
        "creationDate": 1411002061,
        "lastModifiedDate": 1440756837,
        "permissions": [
            {
                "referenceId": "5508151eb2d1f89cb41208c6",
                "perm": "rud"
            }
        ],
        "owner": "550812fab2d1f89cb41208c2",
        "status": "public",
        "frequence": "daily",
        "startingTime": 1440749631,
        "lastRuntime": 1411002061,
        "runNumber": 100,
        "processingBlocks": [
            {
                "order": 2,
                "block": "somedata"
            },
            {
                "order": 3,
                "block": "someotherdata"
            }
        ],
        "logUrl": "http://metaware.org/process/test/log"
    }
]

Insert a new process - POST /api/v1/processes

Request (application/json)

Headers

Content-Type: application/json
Authorization: Basic YWRtaW46YWRtaW4=

Body

{
    "_id": "55e07c35a4466d29e3c4cea0",
    "name": "Tracker process",
    "description": "Tracker process running on test machine",
    "type": "test",
    "creationDate": 1411002062,
    "lastModifiedDate": 1440756832,
    "permissions": [
        {
            "referenceId": "5508151eb2d1f89cb41208c6",
            "perm": "rud"
        }
    ],
    "owner": "550812fab2d1f89cb41208c2",
    "status": "public",
    "frequence": "daily",
    "startingTime": 1440749632,
    "lastRuntime": 1411002062,
    "runNumber": 1000,
    "processingBlocks": [
        {
            "order": 4,
            "block": "somedata"
        },
        {
            "order": 5,
            "block": "someotherdata"
        }
    ],
    "logUrl": "http://metaware.org/process/test/log/another"
}
Response 200 (application/json)

Headers

Content-Type: application/json

Body

55e07c35a4466d29e3c4cea0

Single process management [/api/v1/processes/{processId}]

Parameters
processId (Required, string )
Id of a specific process

Retrieve a process - GET /api/v1/processes/{processId}

Request (application/json)

Headers

Content-Type: application/json
Authorization: Basic YWRtaW46YWRtaW4=
Response 200 (application/json)

Headers

Content-Type: application/json

Body

{
    "_id": "55e07c35a4466d29e3c4cea0",
    "name": "Tracker process",
    "description": "Tracker process running on test machine",
    "type": "test",
    "creationDate": 1411002062,
    "lastModifiedDate": 1440756832,
    "permissions": [
        {
            "referenceId": "5508151eb2d1f89cb41208c6",
            "perm": "rud"
        }
    ],
    "owner": "550812fab2d1f89cb41208c2",
    "status": "public",
    "frequence": "daily",
    "startingTime": 1440749632,
    "lastRuntime": 1411002062,
    "runNumber": 1000,
    "processingBlocks": [
        {
            "order": 4,
            "block": "somedata"
        },
        {
            "order": 5,
            "block": "someotherdata"
        }
    ],
    "logUrl": "http://metaware.org/process/test/log/another"
}

Update a process - PUT /api/v1/processes/{processId}

Request (application/json)

Headers

Content-Type: application/json
Authorization: Basic YWRtaW46YWRtaW4=

Body

{
    "name": "Tracker process",
    "description": "Tracker process running on localhost",
    "type": "test",
    "creationDate": 1411002062,
    "lastModifiedDate": 1440756832,
    "permissions": [
        {
            "referenceId": "5508151eb2d1f89cb41208c6",
            "perm": "rud"
        }
    ],
    "owner": "550812fab2d1f89cb41208c2",
    "status": "private",
    "frequence": "hourly",
    "startingTime": 1440749632,
    "lastRuntime": 1411002062,
    "runNumber": 1000,
    "processingBlocks": [
        {
            "order": 5,
            "block": "someimportantdata"
        }
    ],
    "logUrl": "http://metaware.org/process/test/log/important"
}
Response 200 (application/json)

Headers

Content-Type: application/json

Body

{
    "_id": "55e07c35a4466d29e3c4cea0",
    "name": "Tracker process",
    "description": "Tracker process running on localhost",
    "type": "test",
    "creationDate": 1411002062,
    "lastModifiedDate": 1440756832,
    "permissions": [
        {
            "referenceId": "5508151eb2d1f89cb41208c6",
            "perm": "rud"
        }
    ],
    "owner": "550812fab2d1f89cb41208c2",
    "status": "private",
    "frequence": "hourly",
    "startingTime": 1440749632,
    "lastRuntime": 1411002062,
    "runNumber": 1000,
    "processingBlocks": [
        {
            "order": 5,
            "block": "someimportantdata"
        }
    ],
    "logUrl": "http://metaware.org/process/test/log/important"
}

Delete a process - DELETE /api/v1/processes/{processId}

Request (application/json)

Headers

Content-Type: application/json
Authorization: Basic YWRtaW46YWRtaW4=
Response 200 (application/json)

Headers

Content-Type: application/json

Body

55e07c35a4466d29e3c4cea0

Template

Templates collection management [/api/v1/templates]

List all templates - GET /api/v1/templates

Request (application/json)

Headers

Content-Type: application/json
Authorization: Basic YWRtaW46YWRtaW4=
Response 200 (application/json)

Headers

Content-Type: application/json

Body

[
    {
        "_id": "550b0b10264ed792cace7a3c",
        "name": "user",
        "details": {
            "_id": "id - string",
            "name": "string",
            "surname": "string",
            "email": "string",
            "phone": "string",
            "company_id": "id - string",
            "department_id": "id - string",
            "username": "string",
            "password": "hex - string",
            "role": "string"
        }
    },
    {
        "_id": "5514334787284ced30e20bcf",
        "name": "company",
        "details": {
            "_id": "id - string",
            "name": "string",
            "description": "string",
            "email": "string",
            "phone": "string",
            "address": "string",
            "url": "string"
        }
    },
    {
        "_id": "5514338387284ced30e20bd0",
        "name": "department",
        "details": {
            "_id": "id - string",
            "name": "string",
            "description": "string",
            "company_id": "id - string",
            "email": "string",
            "phone": "string",
            "url": "string"
        }
    }
]

Insert a new template - POST /api/v1/templates

Request (application/json)

Headers

Content-Type: application/json
Authorization: Basic YWRtaW46YWRtaW4=

Body

{
    "name": "datasources",
    "details": {
        "_id": "id - string",
        "name": "string",
        "description": "string",
        "type": "string",
        "creationDate": "int32",
        "lastModifiedDate": "int32",
        "permissions": "array - permission",
        "owner": "id - string",
        "status": "string",
        "subtype": "string",
        "url": "string",
        "username": "string",
        "password": "string",
        "resourceType": "string [table | query | file]",
        "resource": "string [table name | query | file name]"
    }
}
Response 200 (application/json)

Headers

Content-Type: application/json

Body

55a63e04e0021578699e84d4

Signle template management [/api/v1/templates/{templateName}]

Parameters
templateName (Required, string )
The name of the refering object

Retrieve a template - GET /api/v1/templates/{templateName}

Request (application/json)

Headers

Content-Type: application/json
Authorization: Basic YWRtaW46YWRtaW4=
Response 200 (application/json)

Headers

Content-Type: application/json

Body

{
    "_id": "550b0b10264ed792cace7a3c",
    "name": "user",
    "details": {
        "_id": "id - string",
        "name": "string",
        "surname": "string",
        "email": "string",
        "phone": "string",
        "company_id": "id - string",
        "department_id": "id - string",
        "username": "string",
        "password": "hex - string",
        "role": "string"
    }
}

Delete a template - DELETE /api/v1/templates/{templateName}

Request (application/json)

Headers

Content-Type: application/json
Authorization: Basic YWRtaW46YWRtaW4=
Response 200 (application/json)

Headers

Content-Type: application/json

Body

550b0b10264ed792cace7a3c

DiscoverObj

Usable [/api/v1/discoverObjects/usable/{requestedId}]

Discover usable objects - GET /api/v1/discoverObjects/usable/{requestedId}

Request (application/json)

Headers

Content-Type: application/json
Authorization: Basic YWRtaW46YWRtaW4=
Response 200 (application/json)

Headers

Content-Type: application/json

Body

[
    {
        "_id": "556f31ac2c7cc6dbf16985c9",
        "name": "Dijkstra",
        "description": "Dijkstra's algorithm is an algorithm for finding the shortest paths between nodes in a graph.",
        "type": "Search",
        "creationDate": 1362962298,
        "lastModifiedDate": 1392962298,
        "permissions": [
            {
                "referenceId": "5508151eb2d1f89cb41208c6",
                "perm": "rud"
            },
            {
                "referenceId": "5508151eb2d1f89cb41208c6",
                "perm": "r"
            }
        ],
        "owner": "550812fab2d1f89cb41208c2",
        "status": "public",
        "model": "model test",
        "subModel": "submodel test",
        "hiveQuery": "none",
        "elapsedTime": 123456789,
        "runNumber": 125,
        "logUrl": "https://en.wikipedia.org/wiki/Dijkstra's_algorithm"
    },
    {
        "_id": "5595128411f6f3a1c91d0420",
        "name": "Car Sharing",
        "description": "Car Sharing of Turin from AperTO",
        "type": "test",
        "creationDate": 1411002061,
        "lastModifiedDate": 1474160461,
        "permissions": [
            {
                "referenceId": "5508151eb2d1f89cb41208c6",
                "perm": "rud"
            }
        ],
        "owner": "550812fab2d1f89cb41208c2",
        "status": "public",
        "readOnly": false,
        "keyword": "car",
        "theme": "viability",
        "accessUrl": "http://aperto.comune.torino.it/sites/default/files/car_sharing.csv",
        "distDescription": "Comma separated value file",
        "distFormat": "cvs",
        "license": "http://www.dati.gov.it/iodl/2.0/",
        "structure": {
            "ID_CAR_SHARING": "String",
            "NOME_PARCHEGGIO": "String",
            "UBICAZIONE": "String",
            "URL": "String",
            "COORD_X": "Float",
            "COORD_Y": "Float"
        }
    }
]

Owned [/api/v1/discoverObjects/owned/{ownerId}]

Discover owned objects - GET /api/v1/discoverObjects/owned/{ownerId}

Request (application/json)

Headers

Content-Type: application/json
Authorization: Basic YWRtaW46YWRtaW4=
Response 200 (application/json)

Headers

Content-Type: application/json

Body

[
    {
    "_id": "556f31e02c7cc6dbf16985ca",
    "name": "NTRUEncrypt",
    "description": "The NTRUEncrypt public key cryptosystem, also known as the NTRU encryption algorithm, is a lattice-based alternative to RSA and ECC and is based on the shortest vector problem in a lattice (which is not known to be breakable using quantum computers).",
    "type": "Security",
    "creationDate": 820458061,
    "lastModifiedDate": 1293843661,
    "permissions": [
        {
            "referenceId": "5594fc1611f61c70f31dbbfe",
            "perm": "rud"
        }
    ],
    "owner": "5594fc1611f61c70f31dbbfe",
    "status": "private",
    "model": "updated model test",
    "subModel": "submodel test",
    "hiveQuery": "none",
    "elapsedTime": 123456789,
    "runNumber": 500,
    "logUrl": "https://www.securityinnovation.com/products/encryption-libraries/ntru-cryptography.html"
    }
]