PassiveLogic Organization API

Routes related to organization management

OpenAPI Specification

passivelogic-organization-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: 0.0.0
  description: 'This page documents the operations supported by the PassiveLogic HTTP API, covering authentication,
    user management, and

    GraphQL API access.'
  title: PassiveLogic REST Organization API
tags:
- description: Routes related to organization management
  name: Organization
paths:
  /api/organization/invite:
    post:
      security:
      - Basic Auth - login: []
      - XSRF header: []
      - DEPRECATED - PL API Key: []
      - PL API Key: []
      requestBody:
        required: true
        content:
          application/json:
            examples:
              InviteUserToOrganizationData:
                $ref: '#/components/examples/InviteUserToOrganizationData'
            schema:
              $ref: '#/components/schemas/InviteUserToOrganizationData'
      summary: Sends an organization invite to the given email.
      tags:
      - Organization
      description: Generates and sends an invitation link for the given organization to the given user
        email.
      operationId: postApiOrganizationInvite
      responses:
        '200':
          description: OK
          content:
            application/json:
              examples:
                OrgInviteResponse:
                  $ref: '#/components/examples/OrgInviteResponse'
              schema:
                $ref: '#/components/schemas/OrgInviteResponse'
  /api/v0.20/organization/delete:
    post:
      security:
      - Basic Auth - login: []
      - XSRF header: []
      - DEPRECATED - PL API Key: []
      - PL API Key: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteOrganizationData'
            examples:
              DeleteOrganizationData:
                $ref: '#/components/examples/DeleteOrganizationData'
      summary: Deletes specified organization.
      tags:
      - Organization
      description: 'Completely deletes an organization, after verifying that the user making this request
        has permission to do so.

        Sends an email to all other members of the organization informing them that it has been deleted.'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericMessageResponse'
              examples:
                GenericMessageResponse:
                  $ref: '#/components/examples/GenericMessageResponse'
          description: OK
      operationId: postApiV0.20OrganizationDelete
  /api/v0.19/organization/update-logo:
    post:
      security:
      - Basic Auth - login: []
      - XSRF header: []
      - DEPRECATED - PL API Key: []
      - PL API Key: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrganizationImageData'
            examples:
              OrganizationImageData:
                $ref: '#/components/examples/OrganizationImageData'
      summary: Updates the organization's logo
      tags:
      - Organization
      description: 'Verifies that the user making the request has sufficient permissions to change the
        logo for the organization.

        Takes in a new image as the organization''s logo. Creates or replaces the previous stored logo.'
      operationId: postApiV0.19OrganizationUpdate-logo
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImageUploadResponse'
              examples:
                ImageUploadResponse:
                  $ref: '#/components/examples/ImageUploadResponse'
  /api/organization/decline:
    post:
      security:
      - Basic Auth - login: []
      - XSRF header: []
      - DEPRECATED - PL API Key: []
      - PL API Key: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeclineOrganizationInvite'
            examples:
              DeclineOrganizationInvite:
                $ref: '#/components/examples/DeclineOrganizationInvite'
      summary: Declines an organization invitation
      description: 'Rejects an invitation based on Organization invite ID.

        Invitation is deleted.'
      tags:
      - Organization
      operationId: postApiOrganizationDecline
      responses:
        '200':
          content:
            application/json:
              examples:
                GenericMessageResponse:
                  $ref: '#/components/examples/GenericMessageResponse'
              schema:
                $ref: '#/components/schemas/GenericMessageResponse'
          description: OK
  /api/organization/update-image:
    post:
      security:
      - Basic Auth - login: []
      - XSRF header: []
      - DEPRECATED - PL API Key: []
      - PL API Key: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrganizationImageData'
            examples:
              OrganizationImageData:
                $ref: '#/components/examples/OrganizationImageData'
        required: true
      summary: Updates the organization's image
      description: 'Verifies that the user making the request has sufficient permissions to change the
        image for the organization.

        Takes in a new image as the new organization image. Creates or replaces the previously stored
        image.'
      tags:
      - Organization
      responses:
        '200':
          description: OK
          content:
            application/json:
              examples:
                ImageUploadResponse:
                  $ref: '#/components/examples/ImageUploadResponse'
              schema:
                $ref: '#/components/schemas/ImageUploadResponse'
      operationId: postApiOrganizationUpdate-image
  /api/v0.20/organization/decline:
    post:
      security:
      - Basic Auth - login: []
      - XSRF header: []
      - DEPRECATED - PL API Key: []
      - PL API Key: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeclineOrganizationInvite'
            examples:
              DeclineOrganizationInvite:
                $ref: '#/components/examples/DeclineOrganizationInvite'
      summary: Declines an organization invitation
      description: 'Rejects an invitation based on Organization invite ID.

        Invitation is deleted.'
      tags:
      - Organization
      operationId: postApiV0.20OrganizationDecline
      responses:
        '200':
          content:
            application/json:
              examples:
                GenericMessageResponse:
                  $ref: '#/components/examples/GenericMessageResponse'
              schema:
                $ref: '#/components/schemas/GenericMessageResponse'
          description: OK
  /api/organization/update-logo:
    post:
      security:
      - Basic Auth - login: []
      - XSRF header: []
      - DEPRECATED - PL API Key: []
      - PL API Key: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrganizationImageData'
            examples:
              OrganizationImageData:
                $ref: '#/components/examples/OrganizationImageData'
      summary: Updates the organization's logo
      tags:
      - Organization
      description: 'Verifies that the user making the request has sufficient permissions to change the
        logo for the organization.

        Takes in a new image as the organization''s logo. Creates or replaces the previous stored logo.'
      operationId: postApiOrganizationUpdate-logo
      responses:
        '200':
          description: OK
          content:
            application/json:
              examples:
                ImageUploadResponse:
                  $ref: '#/components/examples/ImageUploadResponse'
              schema:
                $ref: '#/components/schemas/ImageUploadResponse'
  /api/v0.19/organization/invite:
    post:
      security:
      - Basic Auth - login: []
      - XSRF header: []
      - DEPRECATED - PL API Key: []
      - PL API Key: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InviteUserToOrganizationData'
            examples:
              InviteUserToOrganizationData:
                $ref: '#/components/examples/InviteUserToOrganizationData'
        required: true
      summary: Sends an organization invite to the given email.
      tags:
      - Organization
      description: Generates and sends an invitation link for the given organization to the given user
        email.
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrgInviteResponse'
              examples:
                OrgInviteResponse:
                  $ref: '#/components/examples/OrgInviteResponse'
          description: OK
      operationId: postApiV0.19OrganizationInvite
  /api/v0.19/organization/decline:
    post:
      security:
      - Basic Auth - login: []
      - XSRF header: []
      - DEPRECATED - PL API Key: []
      - PL API Key: []
      requestBody:
        content:
          application/json:
            examples:
              DeclineOrganizationInvite:
                $ref: '#/components/examples/DeclineOrganizationInvite'
            schema:
              $ref: '#/components/schemas/DeclineOrganizationInvite'
        required: true
      summary: Declines an organization invitation
      description: 'Rejects an invitation based on Organization invite ID.

        Invitation is deleted.'
      tags:
      - Organization
      operationId: postApiV0.19OrganizationDecline
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericMessageResponse'
              examples:
                GenericMessageResponse:
                  $ref: '#/components/examples/GenericMessageResponse'
  /api/organization/join:
    post:
      security:
      - Basic Auth - login: []
      - XSRF header: []
      - DEPRECATED - PL API Key: []
      - PL API Key: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AcceptOrganizationInvite'
            examples:
              AcceptOrganizationInvite:
                $ref: '#/components/examples/AcceptOrganizationInvite'
      summary: Adds a user to an organization
      description: 'Adds user to organization based on Organization invite ID.

        Role in organization is determined through Organization invite role, if no role is defined, we
        default to read-only user.'
      tags:
      - Organization
      operationId: postApiOrganizationJoin
      responses:
        '200':
          description: OK
          content:
            application/json:
              examples:
                GenericMessageResponse:
                  $ref: '#/components/examples/GenericMessageResponse'
              schema:
                $ref: '#/components/schemas/GenericMessageResponse'
  /api/v0.20/organization/update-image:
    post:
      security:
      - Basic Auth - login: []
      - XSRF header: []
      - DEPRECATED - PL API Key: []
      - PL API Key: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrganizationImageData'
            examples:
              OrganizationImageData:
                $ref: '#/components/examples/OrganizationImageData'
        required: true
      summary: Updates the organization's image
      tags:
      - Organization
      description: 'Verifies that the user making the request has sufficient permissions to change the
        image for the organization.

        Takes in a new image as the new organization image. Creates or replaces the previously stored
        image.'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImageUploadResponse'
              examples:
                ImageUploadResponse:
                  $ref: '#/components/examples/ImageUploadResponse'
      operationId: postApiV0.20OrganizationUpdate-image
  /api/v0.19/organization/join:
    post:
      security:
      - Basic Auth - login: []
      - XSRF header: []
      - DEPRECATED - PL API Key: []
      - PL API Key: []
      requestBody:
        content:
          application/json:
            examples:
              AcceptOrganizationInvite:
                $ref: '#/components/examples/AcceptOrganizationInvite'
            schema:
              $ref: '#/components/schemas/AcceptOrganizationInvite'
        required: true
      summary: Adds a user to an organization
      description: 'Adds user to organization based on Organization invite ID.

        Role in organization is determined through Organization invite role, if no role is defined, we
        default to read-only user.'
      tags:
      - Organization
      operationId: postApiV0.19OrganizationJoin
      responses:
        '200':
          description: OK
          content:
            application/json:
              examples:
                GenericMessageResponse:
                  $ref: '#/components/examples/GenericMessageResponse'
              schema:
                $ref: '#/components/schemas/GenericMessageResponse'
  /api/v0.20/organization/update-logo:
    post:
      security:
      - Basic Auth - login: []
      - XSRF header: []
      - DEPRECATED - PL API Key: []
      - PL API Key: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrganizationImageData'
            examples:
              OrganizationImageData:
                $ref: '#/components/examples/OrganizationImageData'
      summary: Updates the organization's logo
      tags:
      - Organization
      description: 'Verifies that the user making the request has sufficient permissions to change the
        logo for the organization.

        Takes in a new image as the organization''s logo. Creates or replaces the previous stored logo.'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImageUploadResponse'
              examples:
                ImageUploadResponse:
                  $ref: '#/components/examples/ImageUploadResponse'
      operationId: postApiV0.20OrganizationUpdate-logo
  /api/v0.19/organization/delete:
    post:
      security:
      - Basic Auth - login: []
      - XSRF header: []
      - DEPRECATED - PL API Key: []
      - PL API Key: []
      requestBody:
        required: true
        content:
          application/json:
            examples:
              DeleteOrganizationData:
                $ref: '#/components/examples/DeleteOrganizationData'
            schema:
              $ref: '#/components/schemas/DeleteOrganizationData'
      summary: Deletes specified organization.
      description: 'Completely deletes an organization, after verifying that the user making this request
        has permission to do so.

        Sends an email to all other members of the organization informing them that it has been deleted.'
      tags:
      - Organization
      operationId: postApiV0.19OrganizationDelete
      responses:
        '200':
          content:
            application/json:
              examples:
                GenericMessageResponse:
                  $ref: '#/components/examples/GenericMessageResponse'
              schema:
                $ref: '#/components/schemas/GenericMessageResponse'
          description: OK
  /api/v0.20/organization/invite:
    post:
      security:
      - Basic Auth - login: []
      - XSRF header: []
      - DEPRECATED - PL API Key: []
      - PL API Key: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InviteUserToOrganizationData'
            examples:
              InviteUserToOrganizationData:
                $ref: '#/components/examples/InviteUserToOrganizationData'
        required: true
      summary: Sends an organization invite to the given email.
      tags:
      - Organization
      description: Generates and sends an invitation link for the given organization to the given user
        email.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrgInviteResponse'
              examples:
                OrgInviteResponse:
                  $ref: '#/components/examples/OrgInviteResponse'
      operationId: postApiV0.20OrganizationInvite
  /api/v0.20/organization/join:
    post:
      security:
      - Basic Auth - login: []
      - XSRF header: []
      - DEPRECATED - PL API Key: []
      - PL API Key: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AcceptOrganizationInvite'
            examples:
              AcceptOrganizationInvite:
                $ref: '#/components/examples/AcceptOrganizationInvite'
      summary: Adds a user to an organization
      description: 'Adds user to organization based on Organization invite ID.

        Role in organization is determined through Organization invite role, if no role is defined, we
        default to read-only user.'
      tags:
      - Organization
      responses:
        '200':
          description: OK
          content:
            application/json:
              examples:
                GenericMessageResponse:
                  $ref: '#/components/examples/GenericMessageResponse'
              schema:
                $ref: '#/components/schemas/GenericMessageResponse'
      operationId: postApiV0.20OrganizationJoin
  /api/organization/delete:
    post:
      security:
      - Basic Auth - login: []
      - XSRF header: []
      - DEPRECATED - PL API Key: []
      - PL API Key: []
      requestBody:
        required: true
        content:
          application/json:
            examples:
              DeleteOrganizationData:
                $ref: '#/components/examples/DeleteOrganizationData'
            schema:
              $ref: '#/components/schemas/DeleteOrganizationData'
      summary: Deletes specified organization.
      description: 'Completely deletes an organization, after verifying that the user making this request
        has permission to do so.

        Sends an email to all other members of the organization informing them that it has been deleted.'
      tags:
      - Organization
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericMessageResponse'
              examples:
                GenericMessageResponse:
                  $ref: '#/components/examples/GenericMessageResponse'
          description: OK
      operationId: postApiOrganizationDelete
  /api/v0.19/organization/update-image:
    post:
      security:
      - Basic Auth - login: []
      - XSRF header: []
      - DEPRECATED - PL API Key: []
      - PL API Key: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrganizationImageData'
            examples:
              OrganizationImageData:
                $ref: '#/components/examples/OrganizationImageData'
      summary: Updates the organization's image
      tags:
      - Organization
      description: 'Verifies that the user making the request has sufficient permissions to change the
        image for the organization.

        Takes in a new image as the new organization image. Creates or replaces the previously stored
        image.'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImageUploadResponse'
              examples:
                ImageUploadResponse:
                  $ref: '#/components/examples/ImageUploadResponse'
      operationId: postApiV0.19OrganizationUpdate-image
components:
  schemas:
    ImageUploadResponse:
      properties:
        url:
          type:
          - string
          - 'null'
        message:
          type: string
          description: Informative message relating to image upload. Updated image url with cache bust.
      required:
      - message
      description: Image response definition
      type: object
    DeleteOrganizationData:
      properties:
        orgID:
          format: uuid
          description: ID of the organization being deleted
          type: string
      required:
      - orgID
      description: Parameters require to delete an organization
      type: object
    AcceptOrganizationInvite:
      properties:
        inviteID:
          description: ID of the invitation being accepted.
          type: string
          format: uuid
      required:
      - inviteID
      description: Parameters required to accept an organization invite
      type: object
    GenericMessageResponse:
      type: object
      properties:
        message:
          description: Informative message relating to the specific response
          type: string
      description: Generic response information
      required:
      - message
    OrganizationImageData:
      properties:
        organizationID:
          description: The organization that is associated with this image request.
          format: uuid
          type: string
        image:
          description: File data to write to the server. Must be Base64-encoded if sending as JSON.
          format: byte
          type: string
        fileType:
          description: The type of file the given data represents, from a list of allowed files
          type: string
      required:
      - fileType
      - image
      - organizationID
      description: Data required to upload a organization image
      type: object
    OrgInviteResponse:
      properties:
        inviteID:
          type: string
          description: ID of the invitation generated/sent
          format: uuid
        message:
          type: string
          description: Message with additional information
      required:
      - inviteID
      - message
      description: Response indicating that an organization invitation was successfully sent.
      type: object
    InviteUserToOrganizationData:
      properties:
        inviteEmail:
          description: Email to send the invite to
          type: string
        orgID:
          description: ID of the organization to which this invite pertains
          format: uuid
          type: string
        expiration:
          description: Timestamp at which this invitation will no longer be valid
          format: date-time
          type:
          - string
          - 'null'
        role:
          $ref: '#/components/schemas/QuantumRole'
      required:
      - inviteEmail
      - orgID
      description: Parameters required to invite a user to an organization
      type: object
    QuantumRole:
      enum:
      - PrivilegedUser
      - ReadOnlyUser
      - StandardUser
      - SuperUser
      type: string
    DeclineOrganizationInvite:
      properties:
        inviteID:
          description: ID of the invitation being declined.
          format: uuid
          type: string
      required:
      - inviteID
      description: Parameters required to decline an organization invite
      type: object
  examples:
    AcceptOrganizationInvite:
      value:
        inviteID: C3D4BFA1-76F7-4221-A097-ECAC145945AC
    ImageUploadResponse:
      value:
        message: Image was succefully updated.
        url: http://www.passivelogic.com/image/45EC668F-A000-4769-913F-3F7B0487724E
    InviteUserToOrganizationData:
      value:
        role: StandardUser
        expiration: '2027-08-04T18:39:54Z'
        orgID: 826F5A10-0158-43FD-B134-A0D047A6E8CB
        inviteEmail: mithrawnuruodo@galactic-empire.com
    OrgInviteResponse:
      value:
        inviteID: 33E9B8C6-BECC-4723-9BCA-08A432C7F8B5
        message: Invitation sent.
    DeclineOrganizationInvite:
      value:
        inviteID: 2E78D3E5-D702-4C0C-918F-7D4569E153CB
    OrganizationImageData:
      value:
        organizationID: E77FF523-421A-4625-A224-053A10A04381
        image: PHN2ZyBoZWlnaHQ9IjI0IiB3aWR0aD0iMjQiPjxjaXJjbGUgY3g9IjUwIiBjeT0iNTAiIHI9IjQwIiBzdHJva2U9ImJsYWNrIiBzdHJva2Utd2lkdGg9IjMiIGZpbGw9ImJsdWUiIC8+PC9zdmc+
        fileType: svg
    DeleteOrganizationData:
      value:
        orgID: 3E401610-4DB2-4A0F-9BC1-6F84709C4C20
    GenericMessageResponse:
      value:
        message: We will watch your career with great interest.
  securitySchemes:
    XSRF_header:
      in: header
      description: Authentication using an XSRF protected JWT
      name: X-PL-AUTH
      type: apiKey
    Basic_Auth_-_login:
      description: Basic authentication used only at login.
      scheme: basic
      type: http
    PL_API_Key:
      in: header
      description: PL API Key in header
      name: PL-API-KEY
      type: apiKey
    DEPRECATED_-_PL_API_Key:
      in: header
      description: DEPRECATED - PL API Key in Bearer header
      name: 'Authorization: PL-API-KEY'
      type: apiKey