openapi: 3.2.0 info: title: Cesnet Consents Manager API version: 0.0.0 contact: url: https://perun-aai.org email: perun@cesnet.cz description: 'Operations tagged ConsentsManager across 2 of this provider''s published API definitions: cesnet-perun-rpc-openapi.yml, cesnet-perun-rpc-openapi.yml. Each path carries the servers of the definition it was published in.' servers: - url: https://{server}/{authentication}/rpc description: Perun RPC server variables: server: default: api-dev.perun-aai.org description: DNS name of a Perun server authentication: default: ba description: 'way of authentication: ba - HTTP Basic Auth krb - Kerberos non - no authentication cert - X509 client certificate oauth - OAuth 2.0 bearer access token fed - SAML federation ' enum: - ba - krb - non - cert - oauth - fed security: - BasicAuth: [] - BearerAuth: [] tags: - name: ConsentsManager description: ConsentsManager RPC API in Perun externalDocs: url: https://perun-aai.org/documentation/technical-documentation/rpc-api/rpc-javadoc-ConsentsManager.html paths: /json/consentsManager/getAllConsents: get: tags: - ConsentsManager operationId: getAllConsents summary: Return list of all existing Consents responses: '200': $ref: '#/components/responses/ListOfConsentResponse' default: $ref: '#/components/responses/ExceptionResponse' servers: - url: https://{server}/{authentication}/rpc description: Perun RPC server variables: server: default: api-dev.perun-aai.org description: DNS name of a Perun server authentication: default: ba description: 'way of authentication: ba - HTTP Basic Auth krb - Kerberos non - no authentication cert - X509 client certificate oauth - OAuth 2.0 bearer access token fed - SAML federation ' enum: - ba - krb - non - cert - oauth - fed /json/consentsManager/getConsentById: get: tags: - ConsentsManager operationId: getConsentById summary: Return Consent object with corresponding id parameters: - $ref: '#/components/parameters/id' responses: '200': $ref: '#/components/responses/ConsentResponse' default: $ref: '#/components/responses/ExceptionResponse' servers: - url: https://{server}/{authentication}/rpc description: Perun RPC server variables: server: default: api-dev.perun-aai.org description: DNS name of a Perun server authentication: default: ba description: 'way of authentication: ba - HTTP Basic Auth krb - Kerberos non - no authentication cert - X509 client certificate oauth - OAuth 2.0 bearer access token fed - SAML federation ' enum: - ba - krb - non - cert - oauth - fed /json/consentsManager/getConsentsForUser/id-s: get: tags: - ConsentsManager operationId: getConsentsForUserWithStatus summary: Return Consents of certain status for user with corresponding id parameters: - $ref: '#/components/parameters/userId' - name: status description: consent status schema: $ref: '#/components/schemas/ConsentStatus' in: query required: true responses: '200': $ref: '#/components/responses/ListOfConsentResponse' default: $ref: '#/components/responses/ExceptionResponse' servers: - url: https://{server}/{authentication}/rpc description: Perun RPC server variables: server: default: api-dev.perun-aai.org description: DNS name of a Perun server authentication: default: ba description: 'way of authentication: ba - HTTP Basic Auth krb - Kerberos non - no authentication cert - X509 client certificate oauth - OAuth 2.0 bearer access token fed - SAML federation ' enum: - ba - krb - non - cert - oauth - fed /json/consentsManager/getConsentsForUser/id: get: tags: - ConsentsManager operationId: getConsentsForUser summary: Return Consents for user with corresponding id parameters: - $ref: '#/components/parameters/userId' responses: '200': $ref: '#/components/responses/ListOfConsentResponse' default: $ref: '#/components/responses/ExceptionResponse' servers: - url: https://{server}/{authentication}/rpc description: Perun RPC server variables: server: default: api-dev.perun-aai.org description: DNS name of a Perun server authentication: default: ba description: 'way of authentication: ba - HTTP Basic Auth krb - Kerberos non - no authentication cert - X509 client certificate oauth - OAuth 2.0 bearer access token fed - SAML federation ' enum: - ba - krb - non - cert - oauth - fed /json/consentsManager/getConsentsForConsentHub/id-s: get: tags: - ConsentsManager operationId: getConsentsForConsentHubWithStatus summary: Return Consents of certain status for ConsentHub with corresponding id parameters: - $ref: '#/components/parameters/consentHubId' - name: status description: consent status schema: $ref: '#/components/schemas/ConsentStatus' in: query required: true responses: '200': $ref: '#/components/responses/ListOfConsentResponse' default: $ref: '#/components/responses/ExceptionResponse' servers: - url: https://{server}/{authentication}/rpc description: Perun RPC server variables: server: default: api-dev.perun-aai.org description: DNS name of a Perun server authentication: default: ba description: 'way of authentication: ba - HTTP Basic Auth krb - Kerberos non - no authentication cert - X509 client certificate oauth - OAuth 2.0 bearer access token fed - SAML federation ' enum: - ba - krb - non - cert - oauth - fed /json/consentsManager/getConsentsForConsentHub/id: get: tags: - ConsentsManager operationId: getConsentsForConsentHub summary: Return Consents for ConsentHub with corresponding id parameters: - $ref: '#/components/parameters/consentHubId' responses: '200': $ref: '#/components/responses/ListOfConsentResponse' default: $ref: '#/components/responses/ExceptionResponse' servers: - url: https://{server}/{authentication}/rpc description: Perun RPC server variables: server: default: api-dev.perun-aai.org description: DNS name of a Perun server authentication: default: ba description: 'way of authentication: ba - HTTP Basic Auth krb - Kerberos non - no authentication cert - X509 client certificate oauth - OAuth 2.0 bearer access token fed - SAML federation ' enum: - ba - krb - non - cert - oauth - fed /json/consentsManager/getConsentsForConsentHubByResource: get: tags: - ConsentsManager operationId: getConsentsForConsentHubByResource summary: Get consents for members assigned to the resource parameters: - $ref: '#/components/parameters/resourceId' responses: '200': $ref: '#/components/responses/ListOfConsentResponse' default: $ref: '#/components/responses/ExceptionResponse' servers: - url: https://{server}/{authentication}/rpc description: Perun RPC server variables: server: default: api-dev.perun-aai.org description: DNS name of a Perun server authentication: default: ba description: 'way of authentication: ba - HTTP Basic Auth krb - Kerberos non - no authentication cert - X509 client certificate oauth - OAuth 2.0 bearer access token fed - SAML federation ' enum: - ba - krb - non - cert - oauth - fed /json/consentsManager/getConsentsForUserAndConsentHub: get: tags: - ConsentsManager operationId: getConsentsForUserAndConsentHub summary: Return Consents for specified user in specified consent hub parameters: - $ref: '#/components/parameters/userId' - $ref: '#/components/parameters/consentHubId' responses: '200': $ref: '#/components/responses/ListOfConsentResponse' default: $ref: '#/components/responses/ExceptionResponse' servers: - url: https://{server}/{authentication}/rpc description: Perun RPC server variables: server: default: api-dev.perun-aai.org description: DNS name of a Perun server authentication: default: ba description: 'way of authentication: ba - HTTP Basic Auth krb - Kerberos non - no authentication cert - X509 client certificate oauth - OAuth 2.0 bearer access token fed - SAML federation ' enum: - ba - krb - non - cert - oauth - fed /json/consentsManager/getConsentForUserAndConsentHub: get: tags: - ConsentsManager operationId: getConsentForUserAndConsentHub summary: Return Consent object for chosen user in specified consent hub with specified… parameters: - $ref: '#/components/parameters/userId' - $ref: '#/components/parameters/consentHubId' - name: status description: consent status schema: $ref: '#/components/schemas/ConsentStatus' in: query required: true responses: '200': $ref: '#/components/responses/ConsentResponse' default: $ref: '#/components/responses/ExceptionResponse' servers: - url: https://{server}/{authentication}/rpc description: Perun RPC server variables: server: default: api-dev.perun-aai.org description: DNS name of a Perun server authentication: default: ba description: 'way of authentication: ba - HTTP Basic Auth krb - Kerberos non - no authentication cert - X509 client certificate oauth - OAuth 2.0 bearer access token fed - SAML federation ' enum: - ba - krb - non - cert - oauth - fed /json/consentsManager/getAllConsentHubs: get: tags: - ConsentsManager operationId: getAllConsentHubs summary: Return list of all Consent Hubs responses: '200': $ref: '#/components/responses/ListOfConsentHubResponse' default: $ref: '#/components/responses/ExceptionResponse' servers: - url: https://{server}/{authentication}/rpc description: Perun RPC server variables: server: default: api-dev.perun-aai.org description: DNS name of a Perun server authentication: default: ba description: 'way of authentication: ba - HTTP Basic Auth krb - Kerberos non - no authentication cert - X509 client certificate oauth - OAuth 2.0 bearer access token fed - SAML federation ' enum: - ba - krb - non - cert - oauth - fed /json/consentsManager/getConsentHubById: get: tags: - ConsentsManager operationId: getConsentHubById summary: Returns a Consent Hub by id parameters: - $ref: '#/components/parameters/id' responses: '200': $ref: '#/components/responses/ConsentHubResponse' default: $ref: '#/components/responses/ExceptionResponse' servers: - url: https://{server}/{authentication}/rpc description: Perun RPC server variables: server: default: api-dev.perun-aai.org description: DNS name of a Perun server authentication: default: ba description: 'way of authentication: ba - HTTP Basic Auth krb - Kerberos non - no authentication cert - X509 client certificate oauth - OAuth 2.0 bearer access token fed - SAML federation ' enum: - ba - krb - non - cert - oauth - fed /json/consentsManager/getConsentHubByName: get: tags: - ConsentsManager operationId: getConsentHubByName summary: Returns a Consent Hub by name parameters: - $ref: '#/components/parameters/name' responses: '200': $ref: '#/components/responses/ConsentHubResponse' default: $ref: '#/components/responses/ExceptionResponse' servers: - url: https://{server}/{authentication}/rpc description: Perun RPC server variables: server: default: api-dev.perun-aai.org description: DNS name of a Perun server authentication: default: ba description: 'way of authentication: ba - HTTP Basic Auth krb - Kerberos non - no authentication cert - X509 client certificate oauth - OAuth 2.0 bearer access token fed - SAML federation ' enum: - ba - krb - non - cert - oauth - fed /json/consentsManager/getConsentHubByFacility: get: tags: - ConsentsManager operationId: getConsentHubByFacility summary: Returns a Consent Hub by facility id parameters: - $ref: '#/components/parameters/facilityId' responses: '200': $ref: '#/components/responses/ConsentHubResponse' default: $ref: '#/components/responses/ExceptionResponse' servers: - url: https://{server}/{authentication}/rpc description: Perun RPC server variables: server: default: api-dev.perun-aai.org description: DNS name of a Perun server authentication: default: ba description: 'way of authentication: ba - HTTP Basic Auth krb - Kerberos non - no authentication cert - X509 client certificate oauth - OAuth 2.0 bearer access token fed - SAML federation ' enum: - ba - krb - non - cert - oauth - fed /json/consentsManager/getConsentHubByResource: get: tags: - ConsentsManager operationId: getConsentHubByResource summary: Returns a Consent Hub for facility to which resource belongs parameters: - $ref: '#/components/parameters/resourceId' responses: '200': $ref: '#/components/responses/ConsentHubResponse' default: $ref: '#/components/responses/ExceptionResponse' servers: - url: https://{server}/{authentication}/rpc description: Perun RPC server variables: server: default: api-dev.perun-aai.org description: DNS name of a Perun server authentication: default: ba description: 'way of authentication: ba - HTTP Basic Auth krb - Kerberos non - no authentication cert - X509 client certificate oauth - OAuth 2.0 bearer access token fed - SAML federation ' enum: - ba - krb - non - cert - oauth - fed /json/consentsManager/updateConsentHub: post: tags: - ConsentsManager operationId: updateConsentHub summary: Updates a consent hub. Ignores related facilities responses: '200': $ref: '#/components/responses/ConsentHubResponse' default: $ref: '#/components/responses/ExceptionResponse' requestBody: required: true content: application/json: schema: title: InputUpdateConsentHub description: input to updateConsentHub type: object required: - consentHub properties: consentHub: $ref: '#/components/schemas/ConsentHub' servers: - url: https://{server}/{authentication}/rpc description: Perun RPC server variables: server: default: api-dev.perun-aai.org description: DNS name of a Perun server authentication: default: ba description: 'way of authentication: ba - HTTP Basic Auth krb - Kerberos non - no authentication cert - X509 client certificate oauth - OAuth 2.0 bearer access token fed - SAML federation ' enum: - ba - krb - non - cert - oauth - fed /urlinjsonout/consentsManager/changeConsentStatus: post: tags: - ConsentsManager operationId: changeConsentStatus summary: Changes value of consent status parameters: - $ref: '#/components/parameters/consentId' - name: status description: consent status schema: $ref: '#/components/schemas/ConsentStatus' in: query required: true responses: '200': $ref: '#/components/responses/ConsentResponse' default: $ref: '#/components/responses/ExceptionResponse' servers: - url: https://{server}/{authentication}/rpc description: Perun RPC server variables: server: default: api-dev.perun-aai.org description: DNS name of a Perun server authentication: default: ba description: 'way of authentication: ba - HTTP Basic Auth krb - Kerberos non - no authentication cert - X509 client certificate oauth - OAuth 2.0 bearer access token fed - SAML federation ' enum: - ba - krb - non - cert - oauth - fed /urlinjsonout/consentsManager/evaluateConsentsForConsentHub: post: tags: - ConsentsManager operationId: evaluateConsentsForConsentHub summary: Evaluates consents for given consent hub parameters: - $ref: '#/components/parameters/consentHubId' responses: '200': $ref: '#/components/responses/VoidResponse' default: $ref: '#/components/responses/ExceptionResponse' servers: - url: https://{server}/{authentication}/rpc description: Perun RPC server variables: server: default: api-dev.perun-aai.org description: DNS name of a Perun server authentication: default: ba description: 'way of authentication: ba - HTTP Basic Auth krb - Kerberos non - no authentication cert - X509 client certificate oauth - OAuth 2.0 bearer access token fed - SAML federation ' enum: - ba - krb - non - cert - oauth - fed /urlinjsonout/consentsManager/evaluateConsentsForConsentHubs: post: tags: - ConsentsManager operationId: evaluateConsentsForConsentHubs summary: Evaluates consents for given list of consent hubs parameters: - $ref: '#/components/parameters/consentHubIds' responses: '200': $ref: '#/components/responses/VoidResponse' default: $ref: '#/components/responses/ExceptionResponse' servers: - url: https://{server}/{authentication}/rpc description: Perun RPC server variables: server: default: api-dev.perun-aai.org description: DNS name of a Perun server authentication: default: ba description: 'way of authentication: ba - HTTP Basic Auth krb - Kerberos non - no authentication cert - X509 client certificate oauth - OAuth 2.0 bearer access token fed - SAML federation ' enum: - ba - krb - non - cert - oauth - fed /urlinjsonout/consentsManager/evaluateConsentsForService: post: tags: - ConsentsManager operationId: evaluateConsentsForService summary: Evaluates consents ONLY for given service on consent hubs containing it. parameters: - $ref: '#/components/parameters/serviceId' responses: '200': $ref: '#/components/responses/VoidResponse' default: $ref: '#/components/responses/ExceptionResponse' servers: - url: https://{server}/{authentication}/rpc description: Perun RPC server variables: server: default: api-dev.perun-aai.org description: DNS name of a Perun server authentication: default: ba description: 'way of authentication: ba - HTTP Basic Auth krb - Kerberos non - no authentication cert - X509 client certificate oauth - OAuth 2.0 bearer access token fed - SAML federation ' enum: - ba - krb - non - cert - oauth - fed components: schemas: ConsentHub: allOf: - $ref: '#/components/schemas/Auditable' properties: name: type: string enforceConsents: type: boolean facilities: type: - array - 'null' items: $ref: '#/components/schemas/Facility' required: - name - enforceConsents - facilities AttributeDefinition: allOf: - $ref: '#/components/schemas/Auditable' properties: friendlyName: type: string namespace: type: string description: type: - string - 'null' type: type: string displayName: type: string writable: type: boolean unique: type: boolean friendlyNameParameter: type: string readOnly: true baseFriendlyName: type: string readOnly: true entity: type: string readOnly: true PerunBean: description: identifiable entity in Perun, common ancestor of all entity classes type: object properties: id: type: integer beanName: type: string required: - id - beanName discriminator: propertyName: beanName Facility: allOf: - $ref: '#/components/schemas/Auditable' properties: name: type: string description: type: - string - 'null' uuid: type: string format: uuid ConsentStatus: type: string description: statuses of consents enum: - UNSIGNED - GRANTED - REVOKED Consent: allOf: - $ref: '#/components/schemas/Auditable' properties: userId: type: integer status: $ref: '#/components/schemas/ConsentStatus' consentHub: $ref: '#/components/schemas/ConsentHub' attributes: type: array items: $ref: '#/components/schemas/AttributeDefinition' PerunException: description: exception thrown from inside of Perun type: object properties: errorId: type: string name: type: string message: type: string Auditable: description: represents audit information allOf: - $ref: '#/components/schemas/PerunBean' properties: createdAt: type: - string - 'null' createdBy: type: - string - 'null' modifiedAt: type: - string - 'null' modifiedBy: type: - string - 'null' createdByUid: type: - integer - 'null' modifiedByUid: type: - integer - 'null' parameters: serviceId: name: service description: id of Service schema: type: integer in: query required: true consentId: name: consent description: id of Consent schema: type: integer in: query required: true userId: name: user description: id of User schema: type: integer in: query required: true facilityId: name: facility description: id of Facility schema: type: integer in: query required: true consentHubIds: name: consentHubs[] description: list of ConsentHub ids List in: query required: true schema: type: array items: type: integer consentHubId: name: consentHub description: id of ConsentHub schema: type: integer in: query required: true resourceId: name: resource description: id of Resource schema: type: integer in: query required: true id: name: id description: numeric id schema: type: integer in: query required: true name: name: name description: name of entity schema: type: string in: query required: true responses: ListOfConsentResponse: description: returns List content: application/json: schema: type: array items: $ref: '#/components/schemas/Consent' VoidResponse: description: returns nothing ConsentResponse: description: returns Consent content: application/json: schema: $ref: '#/components/schemas/Consent' ExceptionResponse: description: exception occurred content: application/json: schema: $ref: '#/components/schemas/PerunException' ListOfConsentHubResponse: description: returns List content: application/json: schema: type: array items: $ref: '#/components/schemas/ConsentHub' ConsentHubResponse: description: returns ConsentHub content: application/json: schema: $ref: '#/components/schemas/ConsentHub' securitySchemes: BasicAuth: description: HTTP Basic authentication with username and password type: http scheme: basic BearerAuth: description: 'OAuth2 Resource Server authentication using access token in ''Authorization: Bearer'' HTTP header' type: http scheme: bearer x-refined-from: - cesnet-perun-rpc-openapi.yml - cesnet-perun-rpc-openapi.yml