LogoLogo
  • AttackForge Support
  • Release Notes
    • 2025
    • 2024
    • 2023
    • 2022
    • 2021
    • 2020
    • 2019
  • Core & Enterprise
    • Getting Started
      • How It Works
      • Requesting A Project
      • Creating & Updating Projects
      • Invite User To Project
      • View Project Team
      • Project Scope
      • Project Workspace
      • Project Notes
      • Project Pages
      • Test Cases
      • Creating Vulnerabilities
      • Updating Vulnerabilities
      • Review & QA
      • Attack Chains
      • Reporting
      • Retesting & Remediation
      • Notifications
      • Custom Fields & Forms
      • Vulnerability SLAs
      • User Settings
      • Login Redirects
    • Modules
      • Dashboard
      • Analytics
      • Vulnerabilities
      • Projects
      • Scheduling
      • Portfolios
      • Groups
      • Attack Chains
      • Assets
      • Writeups
      • Test Suites
      • Report Templates
        • Overview
        • Tutorial
        • Tips & Tricks
        • Troubleshooting
        • Template - Report Templates
        • Template - Tags
        • Template - Options
        • Template - Functions
        • Template - Filters
        • Template - Styles
        • Template - Tables
        • Template - Charts
        • Template - Conditions
        • ReportGen CLI
        • ReportGen Library
      • Users
      • Administration
      • Flows
      • Self-Service RESTful API
        • GETTING STARTED
        • EXPORTING TO CSV
        • ADVANCED QUERY FILTER
        • ActivateUser
        • AddProjectMembershipAdministrators
        • AddTestcaseToTestsuite
        • AddTestcasesToTestsuite
        • AddUserToGroup
        • ApproveProjectRequestById
        • ArchivePortfolio
        • ArchiveProject
        • CancelProjectRetestRound
        • CloneProject
        • CompleteProjectRetestRound
        • CreateAssetInLibrary
        • CreateGroup
        • CreatePortfolio
        • CreateProject
        • CreateProjectNote
        • CreateProjectRequest
        • CreateProjectTestCase
        • CreateProjectWorkspaceNote
        • CreateRemediationNote
        • CreateScope
        • CreateTestcaseNote
        • CreateTestsuite
        • CreateUser
        • CreateUsers
        • CreateVulnerability
        • CreateVulnerabilityBulk
        • CreateVulnerabilityLibraryIssue
        • CreateVulnerabilityWithLibrary
        • DeactivateUser
        • DownloadProjectTestCaseFile
        • DownloadProjectTestCaseNoteFile
        • DownloadProjectTestCaseWorkspaceNoteFile
        • DownloadVulnerabilityEvidence
        • DownloadVulnerabilityLibraryFile
        • DownloadWorkspaceFile
        • GetApplicationAuditLogs
        • GetAssets
        • GetAssetsByGroup
        • GetAssetInLibrary
        • GetAssetsInLibrary
        • GetCustomFieldsConfig
        • GetFormConfig
        • GetGroup
        • GetGroups
        • GetMostCommonVulnerabilities
        • GetMostFailedTestcases
        • GetMostVulnerableAssets
        • GetPortfolio
        • GetPortfolios
        • GetPortfolioStream
        • GetProjectAuditLogs
        • GetProjectById
        • GetProjects
        • GetProjectsAndVulnerabilities
        • GetProjectsByGroup
        • GetProjectMembershipAdministrators
        • GetProjectNotes
        • GetProjectReport
        • GetProjectReportData
        • GetProjectRequests
        • GetProjectRequestById
        • GetProjectTestcasesById
        • GetProjectVulnerabilitiesById
        • GetProjectWorkspace
        • GetTestsuiteById
        • GetTestsuites
        • GetUserByEmail
        • GetUserById
        • GetUserByUsername
        • GetUserAuditLogs
        • GetUserGroups
        • GetUserLoginHistory
        • GetUserProjects
        • GetUsers
        • GetVulnerabilityById
        • GetVulnerabilities
        • GetVulnerabilitiesByAssetName
        • GetVulnerabilitiesByGroup
        • GetVulnerabilityLibraryIssues
        • GetVulnerabilityRevisionHistory
        • InviteUserToProject
        • InviteUsersToProjectTeam
        • RejectProjectRequestById
        • RegenerateAPIKey
        • RemoveProjectMembershipAdministrators
        • RemoveProjectTeamMembers
        • RequestNewProjectRetest
        • RestoreProject
        • SendEmail
        • SendDailyCommencementEmail
        • SendDailyCompletionEmail
        • UpdateAssetInLibrary
        • UpdateCustomFieldsConfig
        • UpdateExecSummaryNotes
        • UpdateFormConfig
        • UpdateGroup
        • UpdatePortfolio
        • UpdateProjectById
        • UpdateProjectMembershipAdministrators
        • UpdateProjectNote
        • UpdateProjectRequestById
        • UpdateProjectRetestRound
        • UpdateProjectWorkspaceNote
        • UpdateScope
        • UpdateTestcase
        • UpdateTestcaseOnTestsuite
        • UpdateTestsuite
        • UpdateUserAccessOnGroup
        • UpdateUserAccessOnProject
        • UpdateUser
        • UpdateVulnerabilityById
        • UpdateVulnerabilityLibraryIssue
        • UpdateVulnerabilitySLAs
        • UpdateVulnerabilityWithLibrary
        • UploadTestcaseFile
        • UploadVulnerabilityEvidence
        • UploadVulnerabilityLibraryFile
        • UploadWorkspaceFile
      • Self-Service Events API
        • GETTING STARTED
        • Project Created
        • Project Updated
        • Project Request Created
        • Project Request Updated
        • Project Retest Requested
        • Project Retest Completed
        • Project Retest Cancelled
        • Vulnerability Created
        • Vulnerability Updated
        • Vulnerability Evidence Created
        • Vulnerability Evidence Updated
        • Vulnerability Remediation Note Created
        • Vulnerability Remediation Note Updated
    • AFScript
    • Access Control Matrix
    • Raising Support Tickets
    • Security
  • Contact
Powered by GitBook

Check YouTube for more tutorials: https://youtube.com/@attackforge

On this page
  • Parameters
  • Headers
  • Query
  • Example
  • Request
  • Response
  1. Core & Enterprise
  2. Modules
  3. Self-Service RESTful API

UpdateCustomFieldsConfig

This method can be used for the following: Update custom fields configuration for a type;

Parameters

The following URL, Headers and Parameters are required for requests to this API endpoint. Where a parameter is optional, it will be indicated. Otherwise treat all parameters as mandatory.

Headers

PUT /api/ss/config/custom-fields/:type HTTP/1.1
Host: demo.attackforge.com
X-SSAPI-KEY: APIKey
Content-Type: application/json
Connection: close

Query

type (string)

Update configuration options for a particular type. Must be one of the following: asset or portfolio

Example:

PUT /api/ss/config/custom-fields/project-request HTTP/1.1

config (array of objects)

List of all custom field configuration options for a particular type. This will replace the existing custom field configuration for the specified type.

  • custom_field_type - must be either input, textarea, select, ui-select-multiple, datepicker, or table.

  • custom_field_key - must be a string with alphanumeric & underscores only.

  • custom_field_default_value (optional) - must be a string.

  • custom_field_label - must be a string.

  • custom_field_required - must be either Yes, or No.

  • custom_field_display_in_tables - must be either Yes, or No.

  • custom_field_hide_condition (optional) - must be a string.

  • custom_field_sort_order (optional) - must be a number between 1 and 999.

  • custom_field_placeholder (optional) - must be a string.

  • custom_field_information (optional) - must be a string.

  • custom_field_view_roles (optional) - view access to custom field. must be a string array. Values must be either "admin", "projectoperator", "librarymod", "consultant", "client"

  • custom_field_view_groups (optional) - view access to custom field. must be a string array. Values must be Group Ids.

  • custom_field_view_users (optional) - view access to custom field. must be a string array. Values must be User Ids.

  • custom_field_edit_roles (optional) - edit access to custom field. must be a string array. Values must be either "admin", "projectoperator", "librarymod", "consultant", "client"

  • custom_field_edit_groups (optional) - edit access to custom field. must be a string array. Values must be Group Ids.

  • custom_field_edit_users (optional) - edit access to custom field. must be a string array. Values must be User Ids.

  • custom_field_linked_project_key (optional if type is project-request) - must be a string with alphanumeric & underscores only. type must be set to project-request.

  • custom_field_select_field_options (required if custom_field_type is select or ui-select-multiple) - must be an array of objects. Each object must have an "option" and "value". option must be a string. value must be a string. custom_field_type must be set to either select or ui-select-multiple.

  • custom_field_table_field_columns (required if custom_field_type is table) - must be an array of objects. Each object must have a "column_type", "column_key", "column_label" and "column_required". column_type - must be either input, textarea, select, ui-select-multiple, or datepicker. column_key - must be a string. column_value (optional) - must be a string. column_label - must be a string. column_required - must be either Yes, or No. column_select_field_options - is required if column_type is select or ui-select-multiple. column_select_field_options must be an array of objects. Each object must have an "option" and "value". option must be a string. value must be a string. column_type must be set to either select or ui-select-multiple.

Example:

{
  "config" : [
    {
      "custom_field_type" : "...",
      "custom_field_key" : "...",
      "custom_field_default_value" : "...",
      "custom_field_label" : "...",
      "custom_field_required" : "...",
      "custom_field_display_in_tables" : "...",
      "custom_field_hide_condition" : "...",
      "custom_field_sort_order" : 999,
      "custom_field_placeholder" : "...",
      "custom_field_information" : "...",
      "custom_field_view_roles": [
        "...",
      ],
      "custom_field_view_groups": [
        "...",
      ],
      "custom_field_view_users": [
        "...",
      ],
      "custom_field_edit_roles": [
        "...",
      ],
      "custom_field_edit_groups": [
        "...",
      ],
      "custom_field_edit_users": [
        "...",
      ],
      "custom_field_linked_project_key" : "...",
      "custom_field_select_field_options" : [
        {
          "option": "...",
          "value": "..."
        }
      ],
      "custom_field_table_field_columns" : [
        {
          "column_type" : "...",
          "column_key" : "...",
          "column_value" : "...",
          "column_label" : "...",
          "column_info" : "...",
          "column_required" : "...",
          "column_options" : [
            {
              "option": "...",
              "value": "..."
            }
          ]
        }
      ]
    }
  ]
}

Example

The following example is a cURL request to update custom fields configuration for projects.

Request

Include API Token instead of stars in 'X-SSAPI-KEY: ***************************************' parameter.

curl -X PUT 'https://demo.attackforge.com/api/ss/config/custom-fields/project' -H 'Host: localhost:3000' -H 'X-SSAPI-KEY: ***************************************' -H 'Content-Type: application/json' -H 'Connection: close' -d '{
  "config" : [
    {
      "custom_field_type" : "input",
      "custom_field_key" : "customer_name",
      "custom_field_label" : "Customer Name",
      "custom_field_required" : "Yes",
      "custom_field_display_in_tables" : "No"
    }
  ]
}'

Response

Response contains a status and a list of custom field configuration objects.

{
  "status" : "updated",
  "type" : "...",
  "config" : [
    {
      "custom_field_type" : "...",
      "custom_field_key" : "...",
      "custom_field_default_value" : "...",
      "custom_field_label" : "...",
      "custom_field_required" : "...",
      "custom_field_display_in_tables" : "...",
      "custom_field_hide_condition" : "...",
      "custom_field_sort_order" : 999,
      "custom_field_placeholder" : "...",
      "custom_field_information" : "...",
      "custom_field_linked_project_key" : "...",
      "custom_field_select_field_options" : [
        {
          "option": "...",
          "value": "..."
        }
      ],
      "custom_field_table_field_columns" : [
        {
          "column_type" : "...",
          "column_key" : "...",
          "column_value" : "...",
          "column_label" : "...",
          "column_info" : "...",
          "column_required" : "...",
          "column_options" : [
            {
              "option": "...",
              "value": "..."
            }
          ]
        }
      ]
    }
  ]
}
PreviousUpdateAssetInLibraryNextUpdateExecSummaryNotes

Last updated 1 day ago