Polarity Admin Guide Version 5
Release Notes
  • Guides
    • Installing License
    • Authentication
      • LDAP Troubleshooting
      • SAML
        • Azure ADFS
        • Okta
        • SAML Troublshooting
    • Installing SSL Certificate
      • Configuring Certificate Signing Request (CSR)
    • Configuring a Proxy
    • Upgrade PostgreSQL to v15
    • Enabling SMTP
    • Server Environment Variables
    • File System Layout
    • Configuring a FQDN
    • Upgrade Polarity Server v4 to v5
    • Update Polarity V5
    • Troubleshooting V5
    • Fresh Installation Polarity Server v5
    • Enabling Source Analytics
      • Splunk
        • Sending Source Analytics to Splunk
        • Source Analytics Integration
      • Elasticsearch
        • Sending Source Analytics to Elasticsearch
        • Source Analytics Integration
  • Integrations
    • Installation
    • Install Multiple Copies of an Integration
    • Modifying Integration Name & Acronym
  • REST API
    • Authentication
    • Search Integrations
    • Integration Information
      • Integration Attributes
      • Updating Integrations
      • Updating Integration Permissions
      • Integration Options
Powered by GitBook
On this page
  • PATCH Integration Attributes
  • Example
  • Integration Attributes
  1. REST API
  2. Integration Information

Updating Integrations

PATCH Integration Attributes

Integration attributes can be updated via the PATCH HTTP Verb on the integrations endpoint.

PATCH /api/integrations/<INTEGRATION_ID>
{
  "data": {
      "id": "<INTEGRATION_ID>",
      "attributes": {
          "<INTEGRATION_PROPERTY>": <PROPERTY_VALUE>
      }
  }
}

Example

The following example updates the Integration's "Team Subscription" flag via the autosubscribe property on the specified integration.

curl -v -X PATCH \
'https://<POLARITY_FQDN>/api/integrations/<INTEGRATION_ID>' \
--header 'Authorization: Bearer <AUTH_TOKEN>' \
--header 'Content-Type: application/vnd.api+json' \
--data-binary @- <<EOF
{
  "data": {
      "id": "<INTEGRATION_ID>",
      "attributes": {
          "autosubscribe": true
      }
  }
}
EOF
import requests
import json

def update_integration_team_subscription(token, host, integration_id, autosubscribe):
    url = f'{host}/api/integrations/{integration_id}'

    payload = json.dumps({
      "data": {
          "id": integration_id,
          "attributes": {
              "autosubscribe": autosubscribe
          }
      }
    })
    headers = {
        'Content-Type': 'application/vnd.api+json',
        'Authorization': f'Bearer {token}'
    }

    response = requests.request("PATCH", url, headers=headers, data=payload)
    response.raise_for_status()

    return response.json()
    
update_result = update_integration_team_subscription(token, HOST, 'virustotal_3_7_4_node_18_63e5110da4_1697729362', True)  

When set to true users with access to the integration will be automatically subscribed.

Integration Attributes

For a full list of attributes that can be updated via the PATCH endpoint see the integration attributes page.

PreviousIntegration AttributesNextUpdating Integration Permissions

Last updated 8 months ago

Integration Attributes