• Platform
    • Overview
      • Risk Cloud Overview
      • Spark AI
      • Value Realization Tool
      • Services & Support
      • Pricing
    • Capabilities
      • Reporting & Analytics
      • Risk Quantificaton
      • Integrations & API
      • Risk Cloud Exchange
      • Frameworks
    • img
      LogicGate Named a Leader!
      The Forrester Wave™: Governance, Risk, And Compliance Platforms, Q4 2023
      Get the Full Report
  • Solutions
    • _separator
      • AI Governance
      • Cyber Risk Management
      • Enterprise Risk Management
      • Third-Party Risk Management
      • Controls Compliance
      • Policy Management
    • _separator
      • Regulatory Compliance
      • Data Privacy
      • Operational Resilience
      • Environmental, Social & Governance
      • Internal Audit
    • 10 Purpose-Built GRC Solutions. One Connected Platform.
      View All Solutions
  • Industries
    • _separator
      • Industries Overview
      • Software
      • FinTech
      • Telecom
      • Financial Services
    • _separator
      • Insurance
      • Investment Services
      • Hospitals & Health Systems
      • Pharmaceuticals
      • Medical Devices
    • _separator
      • Oil & Gas
      • Utilities
      • Alternative Energy
  • Company
    • _separator
      • About Us
      • Careers
      • Leadership
      • Partners
    • _separator
      • News
      • Trust & Security
      • Contact Us
    • img
      LogicGate Named a Leader!
      The Forrester Wave™: Governance, Risk, And Compliance Platforms, Q4 2023
      Get the Full Report
  • Resources
    • Risk Cloud Help
      • Help Center
      • Developer Portal
    • Learn + Connect
      • Blog
      • Customer Stories
      • Resources
      • Events
      • Podcast
    • img
      LogicGate Named a Leader!
      The Forrester Wave™: Governance, Risk, And Compliance Platforms, Q4 2023
      Get the Full Report
Request A Demo
img
The Forrester Wave™: Governance, Risk, And Compliance Platforms, Q4 2023
Get the Full Report

Documentation

Menu

  • Quick Start Guides
    • Risk Cloud API: Postman
    • Risk Cloud API: Getting Started
    • Risk Cloud PowerBI Connection
    • Risk Cloud Webhooks
  • API Usage Guides
    • Risk Cloud API: Update Field Configuration
    • Risk Cloud API: Update Roles on User
    • Risk Cloud API: Update Users and Permission Sets on Role
    • Risk Cloud API: Delete Records
    • Risk Cloud API: Bulk Link Records
    • Risk Cloud API: Data Repositories
    • Risk Cloud API: Bulk Import Records
    • Risk Cloud API: Build Audit Log Export
    • Risk Cloud API: Grant Users Record Access
    • Risk Cloud API: Assign Records
    • Risk Cloud API: View Record Audits
    • Risk Cloud API: Update Record User Groups
    • Risk Cloud API: Create User Groups
    • Risk Cloud API: Export Attachments
    • Risk Cloud API: Update Records
    • Risk Cloud API: Create Records
    • Risk Cloud API: View Field Audits
    • Risk Cloud API: Moving Records
    • Risk Cloud API: Post Record Comments
    • Risk Cloud API: Export Table Report
    • Risk Cloud API: Link Records
    • Risk Cloud API: Export Step Permission Sets
    • Risk Cloud API: Export User Groups
    • Risk Cloud API: Export Roles
    • Risk Cloud API: Linked Record Search
    • Risk Cloud API: Record Search
    • Risk Cloud API: Automated Evidence Collection
    • Risk Cloud API: Pagination
    • Risk Cloud API: Authentication
    • Risk Cloud API: Export Record Data
    • Risk Cloud API: Upload Attachments
    • Risk Cloud API: View User Access Audits
    • Risk Cloud API: View Applications, Workflows, and Steps
    • Risk Cloud API: Viewing Fields
    • Risk Cloud API: Viewing Users
    • Risk Cloud API: Create Users
  • Release Notes
    • v2025.4.0 Release Notes
    • v2025.3.2 Release Notes
    • v2025.2.0 Release Notes
    • v2025.1.0 Release Notes
    • v2024.12.0 Release Notes
    • v2024.11.1 Release Notes
    • v2024.11.0 Release Notes
    • v2024.10.1 Release Notes
    • v2024.10.0 Release Notes
    • v2024.9.2 Release Notes
    • v2024.9.1 Release Notes
    • v2024.9.0 Release Notes
    • v2024.8.1 Release Notes
    • v2024.8.0 Release Notes
    • v2024.7.1 Release Notes
    • v2024.7.0 Release Notes
    • v2024.6.1 Release Notes
    • v2024.6.0 Release Notes
    • v2024.5.1 Release Notes
    • v2024.5.0 Release Notes
    • v2024.4.2 Release Notes
    • v2024.4.1 Release Notes
    • v2024.4.0 Release Notes
    • v2024.3.1 Release Notes
    • v2024.3.0 Release Notes
    • v2024.2.1 Release Notes
    • v2024.2.0 Release Notes
    • v2024.1.1 Release Notes
    • v2024.1.0 Release Notes
    • v2023.12.0 Release Notes
    • v2023.11.0 Release Notes
    • v2023.10.2 Release Notes
    • v2023.10.1 Release Notes
    • v2023.10.0 Release Notes
    • v2023.9.1 Release Notes
    • v2023.9.0 Release Notes
    • v2023.8.1 Release Notes
    • v2023.8.0 Release Notes
    • v2023.7.1 Release Notes
    • v2023.7.0 Release Notes
    • v2023.6.1 Release Notes
    • v2023.6.0 Release Notes
    • v2023.5.2 Release Notes
    • v2023.5.1 Release Notes
    • v2023.5.0 Release Notes
    • v2021.4.0 Release Notes
    • v2021.3.0 Release Notes
    • v2021.2.0 Release Notes
    • v2021.1.0 Release Notes
  • Developer Blogs
    • New Year, New Developer Relations Resources: 2024 in Review
    • New Year, New Developer Relations Resources: 2023 in Review
    • Tidying Up Existing REST APIs
    • Accessibility Improvements at LogicGate
    • What Do We Look for in Developers?
    • 2 Quick Tips I’ve learned for FE Testing as a LogicGate Dev
    • Kotlin at LogicGate
    • Spring Boot with Neo4j & MySQL
  • Case Studies
  • Home
  • Developer Resources
  • API Usage Guides

Risk Cloud API: Upload Attachments

Updated on: January 17, 2022

This article will describe how to add an attachment to a Risk Cloud Record using our API.

Within Risk Cloud, you are able to add “Attachment” Fields to your Records. These Fields allow you to attach files such as evidence, documents for employee attestation, and many additional use cases.

Here are the possible use cases to attach a document using Risk Cloud API:

Use Case#1 Add New Attachment

  1. Obtain the FIELD_ID where you would like to upload an attachment

  2. Upload a new file via a POST /api/v1/attachments?field={FIELD_ID}

  3. Retrieve the current values (attachments) via a GET /api/v1/currentValues/field/{FIELD_ID}

  4. Attach the current values (attachments) to your specific record via a POST /api/v1/valueMaps?record={RECORD_ID}

Use Case #2 Add New Version for Existing Attachment

  1. Retrieve the current values (attachments) via a GET /api/v1/currentValues/field/{FIELD_ID}
  2. Upload new version of an existing attachment (versioning) via a POST /api/v1/internal/attachments/{attachmentId}

Obtaining Proper API Authentication

Prior to any interaction with Risk Cloud’s APIs we will need to set the authorization header. Instructions on how this can be accomplished can be found here.

Use Case#1 Add New Attachment

Please follow this use case if you are adding a new attachment to the attachment field.

Step 1: Obtain the FIELD_ID

In the first step, we will be running a series of requests in order to determine the FIELD_ID where we would like to upload our attachment. If you already know your FIELD_ID from obtaining it in the Field Edit menu of your Risk Cloud environment, you may continue to Step 2.

Part 1 : First, we need to determine the WORKFLOW_ID of the workflow that contains our field. To do this, you can send the following GET request:

GET/api/v1/workflows

This will return an array of workflow objects, each looking like this:

{
        "id": "WORKFLOW_ID",
        "name": TABLE REPORT NAME,
        "recordPrefix": null,
        "allowGroups": false,
        "requireGroups": false,
        "xpos": 177,
        "ypos": 156,
        "priority": 0,
        "sla": {
            "enabled": false,
            "duration": 0
        },
        "steps": [
            {
                ..
            },
            {
                ..
            }
        ]
    }

After identifying the Workflow that contains the Field you would like to add an attachment to, you can take the “id” from this object as your WORKFLOW_ID.

Part 2 : Now that we have our WORKFLOW_ID, we can send a request to find the specific Field where we want to add an attachment. To do this, we will send the following GET request:

GET/api/v1/fields/workflow/{WORKFLOW_ID}/values

This request will return an array of field objects, similar to this object:

{
        "fieldType": "TEXT_AREA",
        "id": "FIELD ID",
        "name": "text1",
        "label": "text1",
        "tooltip": null,
        "currentValues": [],
        "operators": [
            "NULL",
            "NOT_NULL",
            "EQUALS",
            "NOT_EQUALS",
            "CONTAINS",
            "DOES_NOT_CONTAIN"
        ],
        "convertibleTo": [
            "TEXT"
        ],
        "pattern": null,
        "message": null,
        "hasHtml": false,
        "fieldType": "TEXT_AREA",
        "valueType": "Common",
        "validTypeForCalculationInput": false,
        "discrete": false,
        "global": false
    }

Once you identify the Field where you would like to add an attachment, you can take the “id” value as your FIELD_ID for the subsequent steps.

Step 2: Upload a file

In this step, we will use the FIELD_ID found in step one to upload our attachment.

The file can be sent in the request using the  multipart/form-data content type with a key named file and a value of the attachment file (often represented by HTTP request libraries or tools as the path to the file).

A cURL sample is demonstrated below:

curl --location 'https://your-company.logicgate.com/api/v1/attachments?field={FIELD_ID}' \\
--header 'Authorization: Bearer {API_TOKEN}' \\
--form 'file=@"/the/path/to/attachment.pdf"'

Once you have built this body, you can send it using the following POST request:

POST/api/v1/attachments?field={FIELD_ID}

The response should look like this:

{
    "attachmentStatus": "CLEAN",
    "id": "QoZy9k73",
    "valueType": "Attachment",
    "discriminator": "CLEAN",
    "textValue": "FILE NAME",
    "numericValue": 1.0,
    "isDefault": false,
    "archived": false,
    "priority": 0,
    "attachmentStatus": "CLEAN",
    "contentType": "image/png",
    "fileSize": NUMBER,
    "fileExtension": "png",
    "originalFileExtension": "png",
    "awsS3Key": "S3 KEY",
    "versionCount": 1,
    "empty": false,
    "fieldId": "EbfvwDRi"
}

Step 3: Get the Current Values (Attachments)

We will retrieve the current values (attachments) by following this GET request:

GET/api/v1/currentValues/field/{FIELD_ID}

The response should look like this:

{
    "content": [
        {
            .. //current value 1 / attachment 1
        },
    ],
    "pageable": {
        ..
    },
    "last": true,
    "totalPages": 1,
    "totalElements": 3,
    "sort": {
        "empty": true,
        "unsorted": true,
        "sorted": false
    },
    "number": 0,
    "size": 20,
    "first": true,
    "numberOfElements": 3,
    "empty": false
}

Step 4: Attach the file to the record

In this final step, we will use the information from Step 3 to tie the attachment to the specified record. We will build our POST request’s body using the following structure:

{
  "currentValues": [
      # COPY THE ENTIRE CURRENT VALUE CONTENT FROM STEP 3 RESPONSE EX.
      { 
          .. //current value 1 / attachment 1 
      },
  ],
  "field": {
    "valueType": "Attachment",
    "fieldType": "ATTACHMENT",
    "id": "FIELD_ID"
  }
}

IMPORTANT: Make sure you copy the ENTIRE content list of current values (attachment) else those entries will be missing.

Once you build the above body, send the following POST request:

POST/api/v1/valueMaps?record={RECORD_ID}

The response should look like this:

{
    "id": "uexgD8Ej",
    "currentValues": [
        {
            "discriminator": "CLEAN",
            "id": "QoZy9k73",
            "valueType": "Attachment",
            "discriminator": "CLEAN",
            "textValue": "TEXT",
            "numericValue": 1.0,
            "isDefault": false,
            "archived": false,
            "priority": 0,
            "attachmentStatus": "CLEAN",
            "contentType": "image/png",
            "fileSize": 33517,
            "fileExtension": "png",
            "originalFileExtension": "png",
            "awsS3Key": "S3 KEY",
            "versionCount": 1,
            "empty": false,
            "fieldId": null
        }
    ],
    "field": {
        "fieldType": "ATTACHMENT",
        "id": "EbfvwDRi",
        "name": "attachment",
        "label": "attachment",
        "tooltip": null,
        "enableVersions": true,
        "validTypeForCalculationInput": false
    },
    "expressionResult": 1.0
}

After sending this final POST request, your attachment should be attached to your specified Record and Field.

Use Case#2 Add New Version for Existing Attachment

Please follow this use case if you are adding a new version to an existing attachment on the attachment field. FYI at this point, there should already be an existing attachment to work with.

Step 1: Get the Current Values (Attachments)

Refer to "Step 3: Get the Current Values (Attachments)" from above.

Step 2: Upload new version of an existing attachment

You will need the attachmentId aka the currentValue id from Step 1 above. It will also take in the same named updated file within the body request.

POST/api/v1/internal/attachments/{attachmentId}

The response should look like:

{
    "id": "<String>",
    "active": <boolean>,
    "created": <long>,
    "updated": null,
    "awsS3Bucket": null,
    "s3Directory": "<String>",
    "awsS3Key": "<String>",
    "contentType": "<String>",
    "fileSize": <long>,
    "fileExtension": "<String>",
    "awsVersionId": "<String>",
    "fileName": "<String>",
    "user": {
          ..
        },
        "lastDeactivated": null,
        "name": "LogicGate Administrator",
        "external": <boolean>,
        "locked": <boolean>,
        "serviceAccount": <boolean>,
        "superUser": <boolean>,
        "disabled": <boolean>,
        "empty": <boolean>,
        "idOrTransientId": "<String>",
        "transientIdOrId": "<String>",
        "fieldId": null
    }
}

You can rerun the GET current values endpoint or check the UI to verify that your attachment incremented in version.

 

For any additional questions, please reach out to [email protected]!

Read Previous API Usage Guides
Read Next API Usage Guides
  • 320 W Ohio St
    Suite 600W
    Chicago, IL 60654
  • 312-279-2775
    • LinkedIn
    • Twitter
    • Youtube
  • Looking for something specific?
  • Request A Demo
  • Platform
    • Risk Cloud Overview
    • Spark AI
    • Value Realization Tool
    • Reporting & Analytics
    • Risk Quantification
    • Integrations & API
    • Risk Cloud Exchange
    • Services & Support
    • Frameworks
    • Pricing
  • Company
    • Careers We're hiring!
    • Executive Team
    • Partners
    • LogicGate News
    • LogicGate Trust Center
    • Contact Us
  • Resources
    • Blog
    • Email Newsletter
    • Resource Center
    • Help Center
    • Developer
  • Solutions
    • AI Governance
    • Cyber Risk & Controls Compliance
    • Enterprise Risk Management
    • Third-Party Risk Management
    • Controls Compliance
    • Regulatory Compliance
    • Data Privacy Management
    • Operational Resilience
    • Policy Management
    • Environmental, Social & Governance
    • Internal Audit Management
    • View All Solutions
  • Industries
    • Software
    • FinTech
    • Telecom
    • Financial Services
    • Insurance
    • Investment Services
    • Healthcare
    • Pharmaceuticals
    • Medical Devices
    • Oil & Gas
    • Utilities
    • Alternative Energy
  • LinkedIn TwitterYoutube

Copyright © 2026. LogicGate, Inc. All rights reserved.

  • Privacy Policy
  • Information Security Measures