Skip to content

fix: use /pulses/activity endpoint instead of /pulses/subscribed#83

Open
root-Brainoverflow wants to merge 1 commit intoAlienVault-OTX:masterfrom
root-Brainoverflow:fix/use-activity-endpoint-instead-of-subscribed
Open

fix: use /pulses/activity endpoint instead of /pulses/subscribed#83
root-Brainoverflow wants to merge 1 commit intoAlienVault-OTX:masterfrom
root-Brainoverflow:fix/use-activity-endpoint-instead-of-subscribed

Conversation

@root-Brainoverflow
Copy link
Copy Markdown

@root-Brainoverflow root-Brainoverflow commented Apr 13, 2026

Description

This PR fixes the OTX-Python-SDK by switching from the /pulses/subscribed endpoint to /pulses/activity endpoint, which resolves persistent 504 Gateway Timeout errors.

Changes:

  • Update SUBSCRIBED constant to use /pulses/activity endpoint
  • Add comment explaining the change

Root Cause:
The /pulses/subscribed endpoint consistently returns 504 Gateway Timeout after 30+ seconds, making the SDK unusable.

Testing:

  • Successfully tested with valid API key
  • Confirmed /pulses/activity returns identical data structure
  • All pulse fetching methods now work without timeouts

API Comparison:

Endpoint Status Response Time
/api/v1/pulses/subscribed TIMEOUT 30s+
/api/v1/pulses/activity SUCCESS less than 2s

Fixes #ISSUE_NUMBER

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Backward Compatibility

This change is backward compatible. Both endpoints return the same data structure, so existing code will continue to work without modification.

Testing

Tested with:

  • Python 3.12
  • OTX-Python-SDK 1.5.12
  • Valid AlienVault OTX API key

Example working code after fix:

from OTXv2 import OTXv2
from datetime import datetime

otx = OTXv2("YOUR_API_KEY")
pulses = otx.getsince(datetime(2026, 3, 1))  # Now works successfully

Checklist

  • My code follows the style guidelines of this project
  • I have tested my code and it works as expected
  • This change maintains backward compatibility
  • No breaking changes introduced

Related issue: #82

The /pulses/subscribed endpoint consistently returns 504 Gateway Timeout errors,
making the SDK unusable for fetching subscribed pulses. The /pulses/activity
endpoint provides the same data and works reliably.

Testing shows:
- /pulses/subscribed: 504 timeout (30+ seconds)
- /pulses/activity: Success (< 2 seconds, returns all pulses)

This change maintains backward compatibility as both endpoints return the same
data structure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant