openapi: 3.2.0 info: title: Loopio Library Entries API description: Loopio's Public API termsOfService: http://loopio.com/termsOfService contact: email: support@loopio.com license: name: Apache 2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html version: 1.0.0 servers: - url: https://api.loopio.com/data/v2 description: Production server for the American datacenter - url: https://api.eu.loopio.com/data/v2 description: Production server for the European datacenter tags: - name: Library Entries description: Create and manage Library Entries paths: /libraryEntries: get: parameters: - $ref: '#/components/parameters/Page' - name: pageSize in: query description: The numbers of items to return schema: type: integer minimum: 1 maximum: 200 example: 10 default: 10 required: false - name: filter in: query description: Passing in an empty string for language will instead show entries in every language. content: application/json: schema: $ref: '#/components/schemas/LibrarySearchOptions' tags: - Library Entries summary: List Library Entries you can interact with operationId: listLibraryEntries responses: '200': description: OK content: application/json: schema: type: object properties: totalItems: type: integer example: 100 totalPages: type: integer example: 10 items: type: array items: $ref: '#/components/schemas/LibraryEntry' required: - totalItems - totalPages - items examples: example-1: value: totalItems: 100 totalPages: 10 items: - id: 1744 questions: - id: 632 text: What is Loopio? complianceOption: id: 1 text: 'Yes' answer: text: string footnotes: - id: 124 name: Loopio Inc is based in Toronto, Canada languageCode: en creator: id: 1 name: name lastUpdatedBy: id: 1 name: name lastReviewedBy: id: 1 name: name libraryEntryOwner: id: 1 name: name attachmentCount: 1 createdDate: '2019-05-23T15:32:00Z' lastUpdatedDate: '2019-07-25T18:37:44Z' lastReviewedDate: '2019-05-23T15:32:00Z' status: APPROVED tags: - tag2 - tag6 scores: time: 10 usage: 10 freshness: 10 InlineImages: items: - id: 123 url: abc location: stack: id: 1 name: Sales category: id: 1 name: North America subCategory: id: 1 name: Canada '400': $ref: '#/components/responses/400' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' security: - loopio_auth: - library:read post: tags: - Library Entries summary: Create a Library Entry description: 'Answer text for an Entry can be null if its Questions have Compliance Answers. Note: we are making terminology updates in Loopio - Compliance Sets shall be referred to as Answer Sets. The API will be updated to reflect this change at a later time.' operationId: createLibraryEntry requestBody: description: Library entry to create. __Warning:__ This does not currently support creating library entries with merge variables in the answer text. content: application/json: schema: type: object properties: questions: type: array items: type: object properties: text: type: string description: Question text. Surrounding white space will be trimmed before checking the length against a minLength parameter. example: What is Loopio? minLength: 1 maxLength: 65535 complianceOption: type: - object - 'null' properties: text: type: - string - 'null' example: 'Yes' minLength: 1 maxLength: 45 required: - text minItems: 1 description: A question and possible variations which utilize the same answer answer: type: object properties: text: type: - string - 'null' maxLength: 65535 example: Loopio is RFP response software required: - text languageCode: $ref: '#/components/schemas/LanguageCode' location: type: object properties: stackID: type: integer categoryID: type: integer subCategoryID: type: integer description: A subCategoryID value should only be set when a categoryID is defined required: - stackID tags: type: array items: type: string maxLength: 100 example: company overview required: - questions - answer - location required: true responses: '201': description: CREATED content: application/json: schema: $ref: '#/components/schemas/LibraryEntry' '400': $ref: '#/components/responses/400' '403': $ref: '#/components/responses/403' security: - loopio_auth: - library:write /libraryEntries/bulk: post: tags: - Library Entries summary: Bulk create Library Entries description: 'Answer text for an Entry can be null if its Questions have Compliance Answers. Note: we are making terminology updates in Loopio - Compliance Sets shall be referred to as Answer Sets. The API will be updated to reflect this change at a later time.' operationId: bulkCreateLibraryEntries requestBody: required: true content: application/json: schema: type: object properties: createMissingLocations: type: boolean default: false entries: type: array minItems: 1 maxItems: 500 items: $ref: '#/components/schemas/LibraryEntryBulk' required: - entries responses: '202': $ref: '#/components/responses/AsyncTaskAccepted' '400': $ref: '#/components/responses/400' '403': $ref: '#/components/responses/403' security: - loopio_auth: - library:write /libraryEntries/{libraryEntryId}: parameters: - name: libraryEntryId in: path description: Library Entry Id required: true schema: type: integer get: tags: - Library Entries summary: Get a Library Entry parameters: - name: inline[] in: query required: false description: '@mergeVariables will substitute Merge Variable placeholders in answer text in the following ways: * Library Merge Variables: will be replaced with their corresponding values with their corresponding values * Project Merge Variables: will be replaced with the variable name in square brackets (e.g. [Client Name])' schema: type: array items: type: string enum: - '@mergeVariables' style: form explode: true operationId: getLibraryEntry responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/LibraryEntry' '400': $ref: '#/components/responses/400' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' security: - loopio_auth: - library:read patch: tags: - Library Entries summary: Update core properties of a Library Entry operationId: updateLibraryEntry requestBody: description: 'Library Entry properties to set. __Warning:__ Updating answer text with merge variables will remove the merge variable. Note: we are making terminology updates in Loopio - Compliance Sets shall be referred to as Answer Sets. The API will be updated to reflect this change at a later time.' content: application/json-patch+json: schema: $ref: '#/components/schemas/JsonPatch' examples: Change answer and tags: value: - op: replace path: /answer/text value: new answer - op: add path: /tags/- value: new tag Move Entry: value: - op: replace path: /location value: stackId: 7 categoryId: null subCategoryId: null Manage questions: value: - op: replace path: /questions/1/text value: better question text - op: add path: /questions/- value: text: new question complianceOption: null - op: move from: /questions/2 path: /questions/0 required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/LibraryEntry' '400': $ref: '#/components/responses/InvalidJSONPatchDocument' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' '422': $ref: '#/components/responses/UnprocessableJSONPatchRequest' security: - loopio_auth: - library:write delete: tags: - Library Entries operationId: deleteLibraryEntry responses: '204': description: No Content '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' security: - loopio_auth: - library:delete /libraryEntries/{libraryEntryId}/attachments: parameters: - name: libraryEntryId in: path description: Library Entry Id required: true schema: type: integer get: tags: - Library Entries summary: Get Library Entry's Attachments operationId: getLibraryEntryFiles responses: '200': description: OK content: application/json: schema: properties: items: type: array items: $ref: '#/components/schemas/File' '400': $ref: '#/components/responses/400' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' security: - loopio_auth: - library:read /libraryEntries/{libraryEntryId}/attachments/upload: parameters: - name: libraryEntryId in: path description: Library Entry ID required: true schema: type: integer post: tags: - Library Entries summary: Upload an attachment to a Library Entry operationId: uploadLibraryEntryAttachment requestBody: required: true content: multipart/form-data: schema: properties: file: type: string format: binary description: 'Maximum allowed file size: - Image: 5 MB - Document: 35 MB ' required: - file responses: '201': description: Created content: application/json: schema: $ref: '#/components/schemas/LibraryEntryAttachmentUploadResponse' '400': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/Error' example: name: VALIDATION_ERROR message: 'Error at ''filename'': Invalid file type. The following file extensions are valid: .doc, .docx, .pdf, .xls, .xlsx, .ppt, .pptx, .png, .jpg, .jpeg, .gif, .vsd, .vsdx, .vdx, .vss, .vsx, .vst, .vtx, .graffle, .indd, .indt, .idml, .ai, .eps, .zip' debugId: 0fas5 '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' security: - loopio_auth: - library:write /libraryEntries/{libraryEntryId}/attachments/{fileVersionId}/replace: parameters: - name: libraryEntryId in: path description: Library Entry ID required: true schema: type: integer - name: fileVersionId in: path description: File version ID of the attachment to replace required: true schema: type: integer post: tags: - Library Entries summary: Replace an attachment on a Library Entry description: 'Replaces an existing attachment with a new file. The `fileVersionId` must belong to the specified Library Entry. Image attachments can only be replaced with images, and non-image attachments can only be replaced with non-image files. ' operationId: replaceLibraryEntryAttachment requestBody: required: true content: multipart/form-data: schema: properties: file: type: string format: binary description: 'Maximum allowed file size: - Image: 5 MB - Document: 35 MB ' required: - file responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/LibraryEntryAttachmentUploadResponse' '400': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/Error' example: name: VALIDATION_ERROR message: 'Error at ''file'': Image Attachments cannot be replaced with Document Attachments.' debugId: 0fas5 '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' security: - loopio_auth: - library:write /libraryEntries/{libraryEntryId}/attachments/{fileVersionId}: parameters: - name: libraryEntryId in: path description: Library Entry Id required: true schema: type: integer - name: fileVersionId in: path description: File version ID of the attachment to delete required: true schema: type: integer delete: tags: - Library Entries summary: Delete an attachment from a Library Entry description: 'Removes an attachment from a Library Entry. If the file is not referenced by any other Library Entry, it is permanently deleted. ' operationId: deleteLibraryEntryAttachment responses: '204': $ref: '#/components/responses/204' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' security: - loopio_auth: - library:write /libraryEntryHistories/{libraryEntryId}: parameters: - name: libraryEntryId in: path description: Library Entry Id required: true schema: type: integer get: tags: - Library Entries summary: Get history of a Library Entry parameters: - $ref: '#/components/parameters/Page' - $ref: '#/components/parameters/PageSize' operationId: getLibraryEntryHistories responses: '200': description: OK content: application/json: schema: type: object properties: totalItems: type: integer example: 100 totalPages: type: integer example: 10 items: type: array items: $ref: '#/components/schemas/LibraryEntryHistory' '400': $ref: '#/components/responses/400' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' security: - loopio_auth: - library:read /libraryEntryHistories/{libraryEntryId}/{historyId}: parameters: - name: libraryEntryId in: path description: Library Entry Id required: true schema: type: integer - name: historyId in: path description: History Id required: true schema: type: integer get: tags: - Library Entries summary: Get a specific history item of a Library Entry operationId: getLibraryEntryHistory responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/LibraryEntryHistory' '400': $ref: '#/components/responses/400' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' security: - loopio_auth: - library:read components: responses: '204': description: No Content '400': description: Invalid Request content: application/json: schema: $ref: '#/components/schemas/Error' example: name: INVALID_REQUEST message: Bad request debugId: 0fas3 UnprocessableJSONPatchRequest: description: Unprocessable Request content: application/json: schema: $ref: '#/components/schemas/Error' example: name: UNPROCESSABLE_REQUEST message: Invalid operation on path /some/path debugId: 0fas3 InvalidJSONPatchDocument: description: Invalid JSON-Patch document content: application/json: schema: $ref: '#/components/schemas/Error' example: name: INVALID_REQUEST message: Invalid JSON-Patch document debugId: 0fas3 AsyncTaskAccepted: description: RECEIVED content: application/json: schema: type: object properties: taskId: type: integer '404': description: Resource Not Found content: application/json: schema: $ref: '#/components/schemas/Error' example: name: RESOURCE_NOT_FOUND message: Resource not found debugId: 0fas3 '403': description: No Permission content: application/json: schema: $ref: '#/components/schemas/Error' example: name: NO_PERMISSION message: No permission to access the resource debugId: 0fas3 schemas: LanguageCode: type: string default: en enum: - de - en - es - fr - pt - other Footnote: type: object properties: id: type: integer description: Footnote Id text: type: string description: Footnote text example: id: 124 name: Loopio Inc is based in Toronto, Canada LibraryEntryHistory: type: object properties: id: type: integer description: Library Entry History Id example: 1234 previousHistoryId: type: - integer - 'null' description: Previous Library Entry History Id example: 1111 user: type: string description: The user who made the change example: John Doe createdDate: type: string format: date-time example: '2019-05-23T15:32:00Z' type: type: string enum: - REVIEW_UPDATE - UPDATE - CREATE - RESTORE description: The type of the history item example: CREATE description: type: string example: created Entry libraryEntry: $ref: '#/components/schemas/LibraryEntry' LibraryEntryAttachmentUploadResponse: type: object properties: id: type: integer description: The file version ID of the attachment. example: 12607774 filename: type: string description: The full filename including extension. example: document.pdf required: - id - filename File: type: object properties: id: type: integer filename: type: string fileExtension: type: string example: pdf status: type: string enum: - AVAILABLE - UPLOADING - DELETED size: type: integer creator: $ref: '#/components/schemas/ReferenceLabel' createdDate: type: string format: date-time example: '2019-05-23T15:32:00Z' guid: type: string description: A file's generated unique guid example: 2e7a3fd2928111e3adb1a5bcbc7a2f7b url: type: string description: A file's generated unique signed s3 url (This link expires after 10 minutes) example: https://www.signedUrl.com lastUpdated: type: string format: date-time deprecated: true lastUpdatedDate: type: string format: date-time example: '2019-05-23T15:32:00Z' required: - filename - status - size LibraryEntryOwner: type: - object - 'null' properties: id: type: integer example: 1 name: type: string example: John Doe initials: type: string example: JD LibrarySearchOptions: type: object properties: lastUpdatedDate: $ref: '#/components/schemas/DateTimeRangeFilter' language: type: string example: en locations: type: array items: $ref: '#/components/schemas/LibraryLocation' searchQuery: type: string example: What is Loopio? synonyms: type: boolean example: true description: Allow searching for synonyms of searchQuery terms. exactPhrase: type: boolean example: false description: All searchQuery terms must be present in the given order. hasAttachment: type: boolean example: true description: Search for Entries with one or more Attachments searchInQuestions: type: boolean default: true example: false description: Search within Entry Question text. searchInAnswers: type: boolean default: true example: false description: Search within Entry Answer text. searchInTags: type: boolean default: true example: false description: Search within Entry Tags. example: lastUpdatedDate: gte: '2020-01-01T00:00:00Z' locations: - stackID: 2 categoryID: 5 searchQuery: What is Loopio? language: en minProperties: 1 NullableReferenceLabel: type: - object - 'null' properties: id: type: integer example: 1 name: type: string example: name LibraryLocation: type: object properties: stackID: type: integer categoryID: type: - integer - 'null' description: A categoryID should only be set when a stackID is defined subCategoryID: type: - integer - 'null' description: A subCategoryID value should only be set when a categoryID is defined required: - stackID example: stackID: 3 categoryID: 5 subCategoryID: 2 InlineImage: type: object properties: id: type: integer example: 123 url: type: string example: example/inline/image/url Question: type: object properties: id: type: integer description: Question Id example: 632 text: type: string description: Question text example: What is Loopio? complianceOption: description: 'Note: we are making terminology updates in Loopio - Compliance Sets shall be referred to as Answer Sets. The API will be updated to reflect this change at a later time.' type: - object - 'null' properties: id: type: integer example: 1 text: type: string example: 'Yes' ReferenceLabel: type: object properties: id: type: integer example: 1 name: type: string example: name Error: type: object properties: name: type: string enum: - FATAL_ERROR - FORBIDDEN - INVALID_REQUEST - NO_PERMISSION - RESOURCE_NOT_FOUND - UNPROCESSABLE_REQUEST - VALIDATION_ERROR message: type: string debugId: type: string JsonPath: type: string LibraryEntry: type: object properties: id: type: integer description: Library Entry Id example: 1744 questions: type: array items: $ref: '#/components/schemas/Question' answer: $ref: '#/components/schemas/Answer' alertText: type: - string - 'null' description: Alert Text languageCode: $ref: '#/components/schemas/LanguageCode' creator: $ref: '#/components/schemas/ReferenceLabel' lastUpdatedBy: $ref: '#/components/schemas/ReferenceLabel' lastReviewedBy: $ref: '#/components/schemas/NullableReferenceLabel' libraryEntryOwner: $ref: '#/components/schemas/LibraryEntryOwner' createdDate: type: string format: date-time example: '2019-05-23T15:32:00Z' lastUpdatedDate: type: string format: date-time description: Last time the Library Entry was updated example: '2019-07-25T18:37:44Z' lastReviewedDate: type: - string - 'null' format: date-time description: Last time the Library Entry was reviewed example: '2019-05-23T15:32:00Z' attachmentCount: type: integer description: Number of attachments a Library Entry has example: 1 status: type: string enum: - REVIEW - APPROVED description: The current status of the Library Entry example: APPROVED tags: type: array example: - tag2 - tag6 items: type: string inlineImages: type: array description: Access URLs for inline images. URLs expire in 10 minutes. items: $ref: '#/components/schemas/InlineImage' scores: type: object properties: time: type: integer example: 10 usage: type: integer example: 10 freshness: type: integer example: 10 location: type: object properties: stack: type: object properties: id: type: integer example: 1 name: type: string maxLength: 64 example: Sales category: type: - object - 'null' properties: id: type: integer example: 1 name: type: string maxLength: 100 example: North America subCategory: type: - object - 'null' properties: id: type: integer example: 1 name: type: string example: Canada maxLength: 100 usageCounts: type: object properties: projectUsageCount: type: integer example: 10 timesCopied: type: integer example: 10 totalUsageCount: type: integer example: 10 JsonPatch: type: array items: allOf: - properties: path: allOf: - description: A JSON Pointer path. - $ref: '#/components/schemas/JsonPath' required: - path - oneOf: - required: - path - value - op properties: op: description: The operation to perform. type: string enum: - add - replace - test value: description: The value to add, replace or test. - required: - path - op properties: op: description: The operation to perform. type: string enum: - remove - required: - path - from - op properties: op: description: The operation to perform. type: string enum: - move - copy from: allOf: - description: A JSON Pointer path pointing to the location to move/copy from. - $ref: '#/components/schemas/JsonPath' DateTimeRangeFilter: type: object minProperties: 1 example: gte: '2020-01-01T00:00:00Z' maxProperties: 2 additionalProperties: false properties: eq: type: string format: date-time description: Equals to gt: type: string format: date-time description: Greater than gte: type: string format: date-time description: Greater than or equals to lt: type: string format: date-time description: Less than lte: type: string format: date-time description: Less than or equals to LibraryEntryBulk: type: object properties: questions: type: array items: type: object properties: text: type: string description: Question text example: What is Loopio? maxLength: 65535 complianceOption: description: 'Note: we are making terminology updates in Loopio - Compliance Sets shall be referred to as Answer Sets. The API will be updated to reflect this change at a later time.' type: - object - 'null' properties: text: type: - string - 'null' example: 'Yes' maxLength: 45 required: - text minItems: 1 description: A question and possible variations which utilize the same answer answer: type: object properties: text: type: - string - 'null' maxLength: 65535 example: Loopio is RFP response software required: - text languageCode: $ref: '#/components/schemas/LanguageCode' location: type: object properties: stack: type: object properties: name: type: string maxLength: 64 required: - name category: type: object properties: name: type: string maxLength: 100 required: - name subCategory: type: object properties: name: type: string maxLength: 100 required: - name required: - stack tags: type: array items: type: string maxLength: 100 example: company overview required: - questions - answer - location Answer: type: object properties: text: type: - string - 'null' description: Answer text footnotes: type: array items: $ref: '#/components/schemas/Footnote' parameters: PageSize: name: pageSize in: query description: The numbers of items to return schema: type: integer minimum: 1 example: 10 default: 10 required: false Page: name: page in: query description: Page number schema: type: integer minimum: 1 example: 5 default: 1 required: false securitySchemes: loopio_auth: type: oauth2 flows: authorizationCode: authorizationUrl: /oauth2/authorize tokenUrl: /oauth2/access_token scopes: mergeVariable:read: View Merge Variables mergeVariable:write: Create/Edit Merge Variables mergeVariable:delete: Delete Merge Variables crm:read: List CRM opportunities linked to projects crm:write: Link CRM opportunities to projects customer.info:read: View customer information file:read: Download files and view file information file:delete: Delete files library:read: List Library Entries and stacks, view Library Entries and Entry data library:write: Create and update Library Entries and Entry data library:delete: Delete Library Entries project:read: List Projects, view Project data and source documents project:write: Create and update Projects, Project data, and source documents project:delete: Delete a Project project.participant:read: List participants of a project project.participant:write: Update participant information role:read: List user assignable roles user:read: List users, view user information user:write: Update user information webhook:read: View webhook subscriptions webhook:write: Create & edit webhook subscriptions webhook:delete: Delete webhook subscriptions clientCredentials: tokenUrl: /oauth2/access_token scopes: mergeVariable:read: View Merge Variables mergeVariable:write: Create/Edit Merge Variables mergeVariable:delete: Delete Merge Variables crm:read: List CRM opportunities linked to projects crm:write: Link CRM opportunities to projects customer.info:read: View customer information file:read: Download files and view file information file:delete: Delete files library:read: List Library Entries and stacks, view Library Entries and Entry data library:write: Create and update Library Entries and Entry data library:delete: Delete Library Entries project:read: List Projects, view Project data and source documents project:write: Create and update Projects, Project data, and source documents project:delete: Delete a Project project.participant:read: List participants of a project project.participant:write: Update participant information role:read: List user assignable roles user:read: List users, view user information user:write: Update user information webhook:read: View webhook subscriptions webhook:write: Create & edit webhook subscriptions webhook:delete: Delete webhook subscriptions