• Platform
    • Overview
      • Risk Cloud Overview
      • Features
      • Services & Support
      • Pricing
    • Capabilities
      • Reporting & Analytics
      • Risk Quantificaton
      • Integrations & API
      • Risk Cloud Exchange
      • Platform Security
    • img
      See why Risk Cloud was rated the #1 GRC platform on the G2 Grid for Winter 2023.
      Learn more
  • Solutions
    • _separator
      • Cyber Risk & Controls Compliance
      • Enterprise Risk Management
      • Third-Party Risk Management
      • Controls Compliance
      • Policy Management
    • _separator
      • Regulatory Compliance
      • Data Privacy
      • Operational Resiliency
      • Environmental, Social & Governance
      • Internal Audit
    • 10 Purpose-Built GRC Solutions. One Connected Platform.
      View All Solutions
  • Industries
    • _separator
      • Industries Overview
      • Software
      • FinTech
      • Telecom
      • Banking
    • _separator
      • Insurance
      • Investment Services
      • Hospitals & Health Systems
      • Pharmaceuticals
      • Medical Devices
    • _separator
      • Oil & Gas
      • Utilities
      • Alternative Energy
  • Company
    • _separator
      • Our Company
      • Careers
      • Executive Team
      • Partners
    • _separator
      • LogicGate News
      • LogicGate Trust Center
      • Contact Us
    • img
      The Root of the Compliance vs Security Paradox
      Upcoming Webinar
      Register Now
  • Resources
    • Risk Cloud Help
      • Help Center
      • Developer Portal
    • Learn + Connect
      • Blog
      • Customer Stories
      • LogicGate Resources
      • LogicGate Events
      • GRC & Me Podcast
    • img
      Five Board Questions That Security and Risk Leaders Must Be Prepared to Answer
      View Report
Request A Demo
img
See why Risk Cloud was rated the #1 GRC platform on the G2 Grid for Winter 2023.
Learn more

Documentation

Menu

  • Quick Start Guides
    • Risk Cloud API: Getting Started
    • Risk Cloud PowerBI Connection
    • Risk Cloud Webhooks
  • API Usage Guides
    • Risk Cloud API: Pagination
    • Risk Cloud API: Record Search
    • Risk Cloud API: Authentication
    • Risk Cloud API: Create Records
    • Risk Cloud API: Export Record Data
    • Risk Cloud API: Update Records
    • 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
    • v2021.4.0 Release Notes
    • v2021.3.0 Release Notes
    • v2021.2.0 Release Notes
    • v2021.1.0 Release Notes
  • Developer Blogs
    • 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
  • Integrations
    • Vital4 Risk Cloud Connector
    • Ascent Risk Cloud Connector
    • SecurityScorecard Risk Cloud Connector
    • Tenable Risk Cloud Connector
    • Black Kite Risk Cloud Connector
  • Home
  • Developer Resources
  • API Usage Guides

Risk Cloud API: Update Records

Updated on: January 17, 2022

How to update the value of a Field in a specific Record.

When you submit a Record in Risk Cloud, all of the Field values you have selected or input are saved on that Record. In this article we will learn how to update a specific Field's value in a specific Record using the Risk Cloud API. In this example we will cover how to update a Select Field. The API requests & responses seen in this article will differ slightly based on the Field type that is being updated.

Updating a Field on a Record

Within a Step, we have a Field named "Severity." Severity has selectable values of "Low," "Medium," and "High."

Let's assume that you have created a Record and selected a severity of "Medium," but would like to change that to "High." We are able to do this with some requests to the Risk Cloud API.

First, we must obtain the values already on the Record, which can be done via the following GET request.

Note: The "record_id" to use in your GET request will be the unique string of numbers and letters in the record URL. In our case, the URL of the record we would like to update is https://your-company.logicgate.com/records/srAIdk3c. The "record_id" we will use is "srAIdk3c."

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.

GET/api/v1/valueMaps?record=RECORD_ID

Response:

{
    "srAIdk3c": {
        "id": "k9IYrkst",
        "active": true,
        "created": 1554232752610,
        "updated": 1554233219059,
        "step": null,
        "user": null,
        "currentValues": [
            {
                "discriminator": "Common",
                "id": "ziJtKBiZ",
                "active": true,
                "created": 1554232752610,
                "updated": null,
                "valueType": "Common",
                "textValue": "Medium",
                "numericValue": 1,
                "isDefault": false,
                "archived": false,
                "priority": 2,
                "empty": false,
                "default": false,
                "fieldId": null
            }
        ],
        "field": {
            "fieldType": "SELECT",
            "id": "srAIdk3c",
            "active": true,
            "created": 1554228320342,
            "updated": 1554232752610,
            "name": "Severity",
            "label": "Severity Level",
            "tooltip": null
        },
        "record": null,
        "node": null,
        "expressionResult": 2,
        "assignment": null
    }
}

The response is a key value pair where the key is the ID of the field and the value is the selected value. The most important part of this response is the currentValues array. The object inside this array is what is currently selected, and what we need to update.

Because we are updating a "select" field, we should first understand what all of our options are! We can do this by submitting a GET request to the "field" endpoint. You can find your field_id in the response above within the "field" object, or by calling the fields/workflow/WORKFLOW_ID endpoint.

GET/api/v1/fields/srAIdk3c

Response:

{
    "fieldType": "SELECT",
    "id": "srAIdk3c",
    "name": "Severity",
    "label": "Severity Level",
    "tooltip": null,
    "currentValues": [
        {
            "discriminator": "Common",
            "id": "IXxbj7uk",
            "valueType": "Common",
            "textValue": "Low",
            "numericValue": 1,
            "isDefault": false,
            "archived": false,
            "priority": 3,
            "empty": false,
            "default": false,
            "fieldId": "srAIdk3c"
        },
        {
            "discriminator": "Common",
            "id": "ziJtKBiZ",
            "valueType": "Common",
            "textValue": "Medium",
            "numericValue": 1,
            "isDefault": false,
            "archived": false,
            "priority": 2,
            "empty": false,
            "default": false,
            "fieldId": "srAIdk3c"
        },
        {
            "discriminator": "Common",
            "id": "fwy1ntpD",
            "valueType": "Common",
            "textValue": "High",
            "numericValue": 1,
            "isDefault": false,
            "archived": false,
            "priority": 1,
            "empty": false,
            "default": false,
            "fieldId": "srAIdk3c"
        }
    ],
...
}

The currentValues array contains all of the selectable options for Severity select field in the form of objects. We can choose any object in the array to be our new selected value, and for this example we will be choosing the value of "High."

In the following POST request, use the "record_id" for the specific record that you want to update.

POST/api/v1/valueMaps?record=RECORD_ID

Request:

{
        "id": "k9IYrkst",
        "active": true,
        "created": 1554232752610,
        "updated": 1554233219059,
        "step": null,
        "user": null,
        "currentValues": [
        {
            "discriminator": "Common",
            "id": "fwy1ntpD",
            "valueType": "Common",
            "textValue": "High",
            "numericValue": 1,
            "isDefault": false,
            "archived": false,
            "priority": 1,
            "empty": false,
            "default": false,
            "fieldId": "srAIdk3c"
        }
        ],
        "field": {
            "fieldType": "SELECT",
            "id": "srAIdk3c",
            "active": true,
            "created": 1554228320342,
            "updated": 1554244721428,
            "name": "Severity",
            "label": "Severity Level",
            "tooltip": null
        },
        "record": null,
        "node": null,
        "expressionResult": 2,
        "assignment": null
}

Notice that we have replaced the object in the currentValues array with the value object for "High." This serves to update the selected value from our original value of "medium" to our new desired value of "High."

Response:

{
    "id": "k9IYrkst",
    "currentValues": [
        {
            "discriminator": "Common",
            "id": "fwy1ntpD",
            "valueType": "Common",
            "textValue": "High",
            "numericValue": 1,
            "isDefault": false,
            "archived": false,
            "priority": 1,
            "empty": false,
            "default": false,
            "fieldId": null
        }
    ],
    "field": {
        "fieldType": "SELECT",
        "id": "srAIdk3c",
        "name": "Severity",
        "label": "Severity Level",
        "tooltip": null
    },
    "node": {
        "stepType": "End",
        "id": "lkePaPYj"
    },
    "expressionResult": 10
}

We can see the severity level has been updated to "High."

For more information about the Risk Cloud API you can read our Developer Center.

Read Previous API Usage Guides
Read Next API Usage Guides
  • 320 W Ohio St
    Floor 5E
    Chicago, IL 60654
  • 312-279-2775
    • LinkedIn
    • Twitter
    • Youtube
    • Facebook
  • Looking for something specific?
  • Request A Demo
  • Platform
    • Risk Cloud Overview
    • Features
    • Reporting & Analytics
    • Risk Quantification
    • Integrations & API
    • Risk Cloud Exchange
    • Services & Support
    • 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
    • Cyber Risk & Controls Compliance
    • Enterprise Risk Management
    • Third-Party Risk Management
    • Controls Compliance
    • Regulatory Compliance
    • Data Privacy Management
    • Operational Resiliency
    • Policy Management
    • Environmental, Social & Governance
    • Internal Audit Management
    • View All Solutions
  • Industries
    • Software
    • FinTech
    • Telecom
    • Banking
    • Insurance
    • Investment Services
    • Healthcare
    • Pharmaceuticals
    • Medical Devices
    • Oil & Gas
    • Utilities
    • Alternative Energy
Also of Interest
  • Connect, Optimize, and Scale Your Cyber Risk...
  • Data Privacy Software Solution
  • Grow Your Relationships Not Your Risks.
  • LinkedIn TwitterYoutubeFacebook

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

  • Privacy Policy
  • Information Security Overview
  • Site Map

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