--- swagger: "2.0" info: description: "This is the swager server for the 5G-enabled Trust and Reputation Management Framework (5G-TRMF).This software is developed under EU H2020 [http://5gzorro.eu](5GZORRO) project. The 5G-TRMF repository can be found at https://5gzorro.github.io/5G-TRMF/ ." version: "1.0" title: "5G-enabled Trust and Reputation Management Framework" #termsOfService: "http://swagger.io/terms/" contact: email: "josemaria.jorquera@um.es" license: name: "Apache 2.0" url: "http://www.apache.org/licenses/LICENSE-2.0.html" #basePath: "/v2" tags: - name: "5G-TRMF" description: "Methods related with the trust establisment across domains" externalDocs: description: "Find out more" url: "http://5gzorro.eu" schemes: - "https" - "http" paths: /start_data_collection: post: tags: - "5G-TRMF" summary: "Activates the process of collecting trust information about a stakeholder." description: "This method is responsible for starting a continuous collection data from Data Lake." operationId: "startDataCollection" consumes: - "application/json" produces: - "application/json" parameters: - name: "trustorDID" description: "Stakeholder’s DID of who launches the process of continuous information recollection." required: true type: "string" - name: "trusteeDID" description: "Stakeholder’s DID on which it launches the process of continuous information recollection." required: true type: "string" - name: "offerDID" description: "Offer’s DID on which it launches the process of continuous information recollection." required: false type: "list of objects" responses: 200: description: "Successful operation." schema: $ref: "#/definitions/trust_parameters" 400: description: "Invalid status value." /stop_trust_relationship: post: tags: - "5G-TRMF" summary: "Disables the process of collecting trust information as well as a relationship with a stakeholder." description: "This method is responsible for stopping a continuous trust relationship." operationId: "stopRelationship" produces: - "application/json" parameters: - name: "offerDID" description: "Distributed identifier of the final selected resource or service/slice." required: true type: "DID" responses: 200: description: "Successful operation" 400: description: "Invalid status value" /request_trust_scores: post: tags: - "5G-TRMF" summary: "Sends a list of offers from the Smart Resource and Service Discovery application." description: "This method is employed by the Smart Service and Resource Discovery application in order to evaluate trust scores of a list of pre-classified offers." produces: - "application/json" parameters: - name: "trustorDID" description: "Unique identifier for a resource or service consumer." required: true type: "string" - name: "offers_list" description: "Set of offers matching stakeholder’s criteria such as intent-based priorities." required: true type: "list of product offers" responses: 200: description: "Successful operation." schema: $ref: "#/definitions/trust_parameters" /notify_final_selection: post: tags: - "5G-TRMF" summary: "Final resource or service/slice determined by ISSM-WFM." description: "This method is employed by the ISSM-WFM to notify the 5G-TRMF the final resource or service/slice selected." produces: - "application/json" parameters: - name: "offerDID" description: "Distributed identifier of the final resource or service/slice candidate." required: true type: "string" responses: 200: description: "Successful operation." #schema: #$ref: "#/definitions/trust_score" /gather_information: get: tags: - "5G-TRMF" summary: "Gets the trust information from the Data Lake platform" description: "This method is responsible for acquiring trust information (previously collected), from Data Lake Platform, which will be used to derive trust parameters." operationId: "gatherInformation" produces: - "application/json" parameters: - name: "stakeholder_did" description: "Stakeholder’s DID on whom the previously collected data is to be recovered." required: true type: "string" - name: "offerDID" description: "Distributed identifier of the product offering on which it collects information." required: true type: "string" responses: 200: description: "Successful operation." schema: $ref: "#/definitions/trust_dictionary" /compute_trust_level: post: tags: - "5G-TRMF" summary: "Calculates a stakeholder's trust score" description: "This method allows calculating a trust level score from previous data collected. Then, this value will be used to determine the most feasible stakeholder with which to establish a connection." operationId: "computeTrustLevel" consumes: - "application/json" produces: - "application/json" parameters: - name: "stakeholder_did" description: "Stakeholder's DID." required: true type: "string" - in: "body" name: "trust_paremeters" description: "Dictionary with paramount data to calculate trust level." required: true #type: "dictionary" schema: $ref: "#/definitions/trust_dictionary" responses: 200: description: "Successful operation." schema: $ref: "#/definitions/trust_parameters" 400: description: "Invalid status value." /store_trust_level: post: tags: - "5G-TRMF" summary: "Stores current trust information for future interactions" description: "This method allows the storage of trustworthy information in any of the available destinations (Data Lake platform and/or PostgreSQL)." operationId: "storeTrustLevel" consumes: - "application/json" produces: - "application/json" parameters: - name: "stakeholder_did" description: "Stakeholder’s DID that wants to store the data for future trust computations." required: true type: "string" - in: "body" name: "trus_information" description: "Dictionary containing relevant data on the trust level and confidence parameters used." required: true #type: "dictionary" schema: $ref: "#/definitions/trust_dictionary" #schema: #$ref: "#/definitions/trust_parameters" responses: 200: description: "Successful operation." 400: description: "Invalid status value." /update_trust_level: post: tags: - "5G-TRMF" summary: "Updates a trust score of an ongoing relationship" description: "This method allows continuosly updating an established trust score between two stakeholders." operationId: "updateTrustLevel" consumes: - "application/json" produces: - "application/json" parameters: - in: "body" name: "trust_information" description: "Dictionary containing relevant data on the trust level and confidence parameters used." required: true #type: "dictionary" schema: $ref: "#/definitions/trust_dictionary" #schema: #$ref: "#/definitions/trust_parameters" responses: 200: description: "Successful operation." 400: description: "Invalid status value." /query_trust_level: post: tags: - "5G-TRMF" summary: "Retrieve the last trust score of a stakeholder." description: "This method requests the last trust score of a particular stakeholder." operationId: "queryTrustLevel" consumes: - "application/json" produces: - "application/json" parameters: - name: "trustorDID" description: "Stakeholder’s DID who wants to know a trust value" required: true type: "string" - name: "trusteeDID" description: "Stakeholder’s DID from whom to retrieve trust value" required: true type: "string" - name: "offerDID" description: "Offer’s DID from whom to retrieve trust value" required: true type: "string" responses: 200: description: "Successful operation" schema: $ref: "#/definitions/trustValue" 400: description: "Invalid status value" /query_satisfaction_value: post: tags: - "5G-TRMF" summary: "Retrieve the last satisfaction value of a stakeholder." description: "This method requests the last satisfaction value of a particular stakeholder." operationId: "queryTrustLevel" consumes: - "application/json" produces: - "application/json" parameters: - name: "trustorDID" description: "Stakeholder’s DID who wants to know a trust value" required: true type: "string" - name: "trusteeDID" description: "Stakeholder’s DID from whom to retrieve trust value" required: true type: "string" - name: "offerDID" description: "Offer’s DID from whom to retrieve trust value" required: true type: "string" responses: 200: description: "Successful operation" schema: $ref: "#/definitions/satisfactionValue" 400: description: "Invalid status value" #security: #- petstore_auth: #- "write:pets" #- "read:pets" definitions: satisfactionValue: type: "object" properties: userSatisfaction: type: "double" trustValue: type: "object" properties: trust_value: type: "double" recommendation: type: "object" properties: recommender: type: "string" trust_level: type: "double" location: type: "geographicalAddress" offerDID: type: "object" properties: type: type: "string" trustee: type: "object" properties: trusteeDID: type: "string" recommendation: $ref: "#/definitions/recommendation" offerDID: $ref: "#/definitions/offerDID" trusteeSatisfaction: type: "double" direct_parameters: type: "object" properties: direct_weigting: type: "double" userSatisfaction: type: "double" providerSatisfaction: type: "double" PSWeighting: type: "double" offerSatisfaction: type: "double" OSWeighting: type: "double" providerReputation: type: "double" offerReputation: type: "double" availableAssets: type: "double" totalAssets: type: "double" availableAssetLocation: type: "double" totalAssetLocation: type: "double" managedViolations: type: "double" predictedViolations: type: "double" executedViolations: type: "double" nonPredictedViolations: type: "double" consideredOffers: type: "double" totalOffers: type: "double" consideredOfferLocation: type: "double" totalOfferLocation: type: "double" managedOfferViolations: type: "double" predictedOfferViolations: type: "double" executedOfferViolations: type: "double" nonPredictedOfferViolations: type: "double" interactionNumber: type: "int" totalInteractionNumber: type: "int" feedbackNumber: type : "int" feedbackOfferNumber: type: "int" location: type: "geographicalAddress" validFor: type: "timePeriod" indirect_parameters: type: "object" properties: recommendation_weigthing: type: "double" recommendations: type: "recommendationlist" trustor: type: "object" properties: trustorDID: type: "string" trusteeDID: type: "string" credibility: type: "double" transactionFactor: type: "double" communityFactor: type: "double" trust_propagation: type: "boolean" trust_update: type: "triggerList" trust_evaluation: type: "algorithmList" direct_parameters: $ref: "#/definitions/direct_parameters" indirect_parameters: $ref: "#/definitions/indirect_parameters" offerDID: $ref: "#/definitions/offerDID" trust_dictionary: type: "object" properties: trustor: $ref: "#/definitions/trustor" trustee: $ref: "#/definitions/trustee" trust_parameters: type: "object" properties: trustor: #$ref: "#/definitions/trustor" type: "string" trustee: #$ref: "#/definitions/trustee" type: "string" offer: type: "string" trust_value: type: "double" currentInteractionNumber: type: "int" evaluation_criteria: type: "policiesList" initEvaluationPeriod: type: "timestamp" endEvaluationPeriod: type: "timestamp" trust_score: type: "object" properties: stakeholder_did: type: "string" final_trust_score: type: "double" direct_trust: type: "double" direct_trust_weighting: type: "double" indirect_trust: type: "double" indirect_trust_weighting: type: "double" externalDocs: description: "Find out more about 5GZORRO" url: "http://5gzorro.eu"