1. Overview

Registration Handler API Description

1.1. Version information

Version : 3.0.0

1.2. Contact information

Contact : Jose Antonio Sanchez Murillo
Contact Email : jose.sanchezm@atos.net

1.3. License information

License : BSD 3-Clause License
License URL : https://github.com/symbiote-h2020/RegistrationHandler/blob/master/LICENSE.txt
Terms of service : null

1.4. URI scheme

1.5. Tags

  • registration-handler-rest-service : Registration Handler Rest Service

1.6. Produces

  • application/json

2. Resources

2.1. Registration-handler-rest-service

Registration Handler Rest Service

2.1.1. Delete all L1 and L2 Resources

DELETE /rh/clear
Description

Delete all resources in the local database and the core. USE WITH CAUTION!!!

Responses
HTTP Code Description Schema

200

OK

< CloudResource > array

204

No Content

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

2.1.2. Update several L2 Resources

POST /rh/local/resources
Description

Update the metadata of resources in the local registry. This operation will register this metadata if it’s not already registered but it won’t change how it’s shared with different federations

Parameters
Type Name Description Schema

Body

input
optional

The list of resources metadata to be updated

< CloudResource > array

Responses
HTTP Code Description Schema

200

OK

< CloudResource > array

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

2.1.3. Update several L2 Resources

PUT /rh/local/resources
Description

Update the metadata of resources in the local registry. This operation will register this metadata if it’s not already registered but it won’t change how it’s shared with different federations

Parameters
Type Name Description Schema

Body

input
optional

The list of resources metadata to be updated

< CloudResource > array

Responses
HTTP Code Description Schema

200

OK

< CloudResource > array

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

2.1.4. Delete several L2 Resources

DELETE /rh/local/resources
Description

Remove resource metadata from the local registry. If these resources were shared with some federations, they will be removed from those federations as well

Parameters
Type Name Description Schema

Query

resourceIds
optional

The list of resource internal IDs to be removed

< string > array(multi)

Responses
HTTP Code Description Schema

200

OK

< CloudResource > array

204

No Content

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

2.1.5. Share L2 Resources

PUT /rh/local/resources/share
Description

Share resources with federations. The return value is a JSON object whose key is the federation Id and the value is a list of the resource’s metadata which have been shared to that federation

Parameters
Type Name Description Schema

Body

input
optional

A JSON object whose keys are the federation Ids. As value, there’s another object with the resource internal Id and if the resource should be shared by bartering for that federation

< string, Map«string,boolean» > map

Responses
HTTP Code Description Schema

200

OK

< CloudResource > array

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

2.1.6. Unshare L2 Resources

DELETE /rh/local/resources/share
Description

Remove resources previously shared in a federation. The return value is a JSON object whose keys are federation Ids and each value is a lis of resource metadata from the resources that were removed from that federation

Parameters
Type Name Description Schema

Body

input
optional

A JSON object whose keys are the federation Ids and each value is a list of resource internal id’s to remove from that federation

< string, < string > array > map

Responses
HTTP Code Description Schema

200

OK

< CloudResource > array

204

No Content

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

2.1.7. Add several L1 Resources using RDF

POST /rh/rdf-resources
Description

Register RDF resources into the core

Parameters
Type Name Description Schema

Body

resources
optional

List of resources to be registered

RdfCloudResourceList

Responses
HTTP Code Description Schema

200

OK

< CloudResource > array

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

2.1.8. Add a single L1 Resource

POST /rh/resource
Description

Register a resource into the SymbIoTe Core. If the resource is already registered, its metadata will be updated with the input information.

Parameters
Type Name Description Schema

Body

resource
required

The resource description

CloudResource

Responses
HTTP Code Description Schema

200

OK

CloudResource

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

2.1.9. Get resource by id

GET /rh/resource
Description

Get a resource providing its internal ID

Parameters
Type Name Description Schema

Query

resourceInternalId
optional

Internal id of the resource

string

Responses
HTTP Code Description Schema

200

OK

CloudResource

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

2.1.10. Update a single L1 Resource

PUT /rh/resource
Description

Update the metadata of a previously registered resource in the core. If the resource is not registered, it will be done by this operation

Parameters
Type Name Description Schema

Body

resource
optional

The resource description to be updated

CloudResource

Responses
HTTP Code Description Schema

200

OK

CloudResource

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

2.1.11. Delete a single L1 Resource

DELETE /rh/resource
Description

Delete a single resource from the core providing its internal ID

Parameters
Type Name Description Schema

Query

resourceInternalId
optional

Internal id of the resource to be deleted

string

Responses
HTTP Code Description Schema

200

OK

CloudResource

204

No Content

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

2.1.12. Add several L1 Resources

POST /rh/resources
Description

Register several resources into the SymbIote Core. If the resources are already registered, their metadata will be updated with the input information.

Parameters
Type Name Description Schema

Body

resources
optional

An array with the description of the resources metadata

< CloudResource > array

Responses
HTTP Code Description Schema

200

OK

< CloudResource > array

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

2.1.13. Get the registered resources

GET /rh/resources
Description

Gets the whole set of resources that have been registered

Responses
HTTP Code Description Schema

200

OK

< CloudResource > array

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

2.1.14. Update several L1 Resources

PUT /rh/resources
Description

Update the metadata of previously registered resources in the core. If the resources are not registered, they will be registered by this operation

Parameters
Type Name Description Schema

Body

resources
optional

The list of resource descriptions to be updated

< CloudResource > array

Responses
HTTP Code Description Schema

200

OK

< CloudResource > array

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

2.1.15. Delete several L1 Resources

DELETE /rh/resources
Description

Delete several resources from the core prividing their internal IDs

Parameters
Type Name Description Schema

Query

resourceInternalIds
optional

Internal ids of the resources to be deleted

< string > array(multi)

Responses
HTTP Code Description Schema

200

OK

< CloudResource > array

204

No Content

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

2.1.16. Sync local and Core databases

PUT /rh/sync
Description

Execute a sync operation. This operation will delete all resources of this platform in the core and re-register the local ones in the database

Responses
HTTP Code Description Schema

200

OK

< CloudResource > array

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

3. Definitions

3.1. CloudResource

Name Schema

accessPolicy
optional

IAccessPolicySpecifier

federationInfo
optional

FederationInfoBean

filteringPolicy
optional

IAccessPolicySpecifier

internalId
optional

string

pluginId
optional

string

resource
optional

Resource

3.2. FederationInfoBean

Name Schema

aggregationId
optional

string

resourceTrust
optional

number(double)

sharingInformation
optional

< string, ResourceSharingInformation > map

3.3. IAccessPolicySpecifier

Name Schema

policyType
optional

enum (SLHTIBAP, SLHTAP, SFTAP, STAP, CHTAP, PUBLIC, CAP, AOAP, PAOAP, CPAOAP)

3.4. Map«string,boolean»

Type : < string, boolean > map

3.5. RDFInfo

Name Schema

rdf
optional

string

rdfFormat
optional

enum (TURTLE, NTRIPLES, RDFXML, N3, JSONLD)

3.6. RdfCloudResourceList

Name Schema

idMappings
optional

< string, CloudResource > map

rdfInfo
optional

RDFInfo

3.7. Resource

Description of a Resource. Can be one of following subclasses: Actuator, Service, ActuatingService, StationarySensor, StationaryDevice, MobileSensor, MobileDevice (consult SymbIoTeLibraries documentation for API).

Name Schema

description
optional

< string > array

id
optional

string

interworkingServiceURL
optional

string

name
optional

string

3.8. ResourceSharingInformation

Name Schema

bartering
optional

boolean

sharingDate
optional

string(date-time)

symbioteId
optional

string