openapi: 3.1.0 info: title: Terrain Discovery Environment Analyses Sharing API description: Terrain is the primary REST API gateway for CyVerse's Discovery Environment (DE), an open-source data science workbench for life sciences. Terrain validates user authentication via Keycloak JWT tokens and orchestrates calls to backend microservices covering filesystem operations, application management, data analysis, metadata annotation, notifications, and persistent identifier management. version: '2026.04' contact: name: CyVerse Support url: https://cyverse.org/contact license: name: BSD 3-Clause url: https://github.com/cyverse-de/terrain/blob/main/LICENSE servers: - url: https://de.cyverse.org/terrain description: CyVerse Discovery Environment Production security: - KeycloakBearer: [] - JwtHeader: [] tags: - name: Sharing description: Data sharing and permissions paths: /secured/filesystem/share: post: operationId: ShareDataWithUsers summary: Share Data with Users description: Shares files or directories with specified users. tags: - Sharing requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ShareRequest' responses: '200': description: Sharing completed content: application/json: schema: $ref: '#/components/schemas/ShareResponse' /secured/filesystem/unshare: post: operationId: UnshareData summary: Unshare Data description: Removes sharing permissions for specified users on files or directories. tags: - Sharing requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UnshareRequest' responses: '200': description: Unsharing completed components: schemas: ShareRequest: type: object properties: sharing: type: array items: type: object properties: user: type: string paths: type: array items: type: object properties: path: type: string permission: type: string enum: - read - write - own UnshareRequest: type: object properties: unsharing: type: array items: type: object properties: user: type: string paths: type: array items: type: string ShareResponse: type: object properties: sharing: type: array items: type: object securitySchemes: KeycloakBearer: type: http scheme: bearer bearerFormat: JWT description: Bearer JWT token obtained from Keycloak via /terrain/token/keycloak JwtHeader: type: apiKey in: header name: X-Iplant-De-Jwt description: Signed JWT token passed in the X-Iplant-De-Jwt header