> ## Documentation Index
> Fetch the complete documentation index at: https://generaltranslation.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# स्ट्रीम नियम अपडेट करें

> फ़िल्टर की गई स्ट्रीम के लिए सक्रिय नियम-समूह में नियम जोड़ता या हटाता है।



## OpenAPI

````yaml /hi/openapi.json POST /2/tweets/search/stream/rules
openapi: 3.0.0
info:
  description: X API v2 के उपलब्ध एंडपॉइंट्स
  version: '2.157'
  title: X API v2
  termsOfService: https://developer.x.com/en/developer-terms/agreement-and-policy.html
  contact:
    name: X Developers
    url: https://developer.x.com/
  license:
    name: X Developer Agreement and Policy
    url: https://developer.x.com/en/developer-terms/agreement-and-policy.html
servers:
  - description: X API
    url: https://api.x.com
security: []
tags:
  - name: Account Activity
    description: AAA सदस्यताओं को प्राप्त करने और प्रबंधित करने से संबंधित एंडपॉइंट
    externalDocs:
      description: और जानें
      url: >-
        https://docs.x.com/x-api/enterprise-gnip-2.0/fundamentals/account-activity
  - name: Bookmarks
    description: >-
      किसी उपयोगकर्ता के बुकमार्क प्राप्त करने और प्रबंधित करने से संबंधित
      एंडपॉइंट
    externalDocs:
      description: और जानें
      url: https://developer.twitter.com/en/docs/twitter-api/bookmarks
  - name: Compliance
    description: आपके सिस्टम में X डेटा को अनुपालक बनाए रखने से संबंधित एंडपॉइंट
    externalDocs:
      description: और जानें
      url: >-
        https://developer.twitter.com/en/docs/twitter-api/compliance/batch-tweet/introduction
  - name: Connections
    description: स्ट्रीमिंग कनेक्शनों से संबंधित एंडपॉइंट
    externalDocs:
      description: और जानें
      url: https://developer.x.com/en/docs/x-api/connections
  - name: Direct Messages
    description: Direct Messages को प्राप्त करने और प्रबंधित करने से संबंधित एंडपॉइंट
    externalDocs:
      description: और जानें
      url: https://developer.twitter.com/en/docs/twitter-api/direct-messages
  - name: General
    description: सामान्य API कार्यक्षमता के लिए विविध एंडपॉइंट
    externalDocs:
      description: और जानें
      url: https://developer.twitter.com/en/docs/twitter-api
  - name: Lists
    description: सूचियों को प्राप्त करने और प्रबंधित करने से संबंधित एंडपॉइंट
    externalDocs:
      description: और जानें
      url: https://developer.twitter.com/en/docs/twitter-api/lists
  - name: Media
    description: Media से संबंधित एंडपॉइंट
    externalDocs:
      description: और जानें
      url: https://developer.x.com
  - name: MediaUpload
    description: Media अपलोड करने से संबंधित एंडपॉइंट
    externalDocs:
      description: और जानें
      url: https://developer.x.com
  - name: News
    description: समाचार स्टोरीज़ प्राप्त करने के लिए एंडपॉइंट
    externalDocs:
      description: और जानें
      url: https://developer.twitter.com/en/docs/twitter-api/news
  - name: Spaces
    description: Spaces को प्राप्त करने और प्रबंधित करने से संबंधित एंडपॉइंट
    externalDocs:
      description: और जानें
      url: https://developer.twitter.com/en/docs/twitter-api/spaces
  - name: Stream
    description: स्ट्रीमिंग से संबंधित एंडपॉइंट
    externalDocs:
      description: और जानें
      url: https://developer.x.com
  - name: Tweets
    description: Tweets को प्राप्त करने, खोजने और संशोधित करने से संबंधित एंडपॉइंट
    externalDocs:
      description: और जानें
      url: https://developer.twitter.com/en/docs/twitter-api/tweets/lookup
  - name: Users
    description: Users के संबंधों को प्राप्त करने और प्रबंधित करने से संबंधित एंडपॉइंट
    externalDocs:
      description: और जानें
      url: https://developer.twitter.com/en/docs/twitter-api/users/lookup
paths:
  /2/tweets/search/stream/rules:
    post:
      tags:
        - Stream
        - Tweets
      summary: स्ट्रीम नियम अपडेट करें
      description: >-
        फ़िल्टर की गई स्ट्रीम के लिए सक्रिय नियम-समूह में नियम जोड़ता या हटाता
        है।
      operationId: updateRules
      parameters:
        - name: dry_run
          in: query
          description: >-
            Dry Run का उपयोग add और delete, दोनों कार्रवाइयों के साथ किया जा
            सकता है, जिसमें अपेक्षित परिणाम दिया जाता है, लेकिन सिस्टम में
            वास्तव में कोई कार्रवाई नहीं की जाती (अर्थात, अंतिम स्थिति वही रहेगी
            जो अनुरोध सबमिट किए जाने के समय थी)। यह नियमों में किए गए बदलावों को
            सत्यापित करने के लिए विशेष रूप से उपयोगी है।
          required: false
          schema:
            type: boolean
          style: form
        - name: delete_all
          in: query
          description: >-
            Delete All का उपयोग इस client app से जुड़े सभी नियमों को हटाने के
            लिए किया जा सकता है; इसे किसी अन्य पैरामीटर के बिना निर्दिष्ट किया
            जाना चाहिए। एक बार हटाए जाने के बाद, नियम पुनर्प्राप्त नहीं किए जा
            सकते।
          required: false
          schema:
            type: boolean
          style: form
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddOrDeleteRulesRequest'
        required: true
      responses:
        '200':
          description: अनुरोध सफल रहा है।
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AddOrDeleteRulesResponse'
        default:
          description: अनुरोध विफल रहा है।
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
      security:
        - BearerToken: []
      externalDocs:
        url: >-
          https://developer.twitter.com/en/docs/twitter-api/tweets/filtered-stream/api-reference/post-tweets-search-stream-rules
components:
  schemas:
    AddOrDeleteRulesRequest:
      oneOf:
        - $ref: '#/components/schemas/AddRulesRequest'
        - $ref: '#/components/schemas/DeleteRulesRequest'
    AddOrDeleteRulesResponse:
      type: object
      description: उपयोगकर्ता-निर्दिष्ट स्ट्रीम फ़िल्टरिंग नियमों में संशोधन का रिस्पॉन्स।
      required:
        - meta
      properties:
        data:
          type: array
          description: बनाए गए सभी उपयोगकर्ता-निर्दिष्ट स्ट्रीम फ़िल्टरिंग नियम।
          items:
            $ref: '#/components/schemas/Rule'
        errors:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/Problem'
        meta:
          $ref: '#/components/schemas/RulesResponseMetadata'
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: integer
          format: int32
        message:
          type: string
    Problem:
      type: object
      description: >-
        IETF RFC 7807 (https://tools.ietf.org/html/rfc7807) में परिभाषित एक HTTP
        Problem Details ऑब्जेक्ट।
      required:
        - type
        - title
      properties:
        detail:
          type: string
        status:
          type: integer
        title:
          type: string
        type:
          type: string
      discriminator:
        propertyName: type
        mapping:
          about:blank:
            $ref: '#/components/schemas/GenericProblem'
          https://api.twitter.com/2/problems/client-disconnected:
            $ref: '#/components/schemas/ClientDisconnectedProblem'
          https://api.twitter.com/2/problems/client-forbidden:
            $ref: '#/components/schemas/ClientForbiddenProblem'
          https://api.twitter.com/2/problems/conflict:
            $ref: '#/components/schemas/ConflictProblem'
          https://api.twitter.com/2/problems/disallowed-resource:
            $ref: '#/components/schemas/DisallowedResourceProblem'
          https://api.twitter.com/2/problems/duplicate-rules:
            $ref: '#/components/schemas/DuplicateRuleProblem'
          https://api.twitter.com/2/problems/invalid-request:
            $ref: '#/components/schemas/InvalidRequestProblem'
          https://api.twitter.com/2/problems/invalid-rules:
            $ref: '#/components/schemas/InvalidRuleProblem'
          https://api.twitter.com/2/problems/noncompliant-rules:
            $ref: '#/components/schemas/NonCompliantRulesProblem'
          https://api.twitter.com/2/problems/not-authorized-for-field:
            $ref: '#/components/schemas/FieldUnauthorizedProblem'
          https://api.twitter.com/2/problems/not-authorized-for-resource:
            $ref: '#/components/schemas/ResourceUnauthorizedProblem'
          https://api.twitter.com/2/problems/operational-disconnect:
            $ref: '#/components/schemas/OperationalDisconnectProblem'
          https://api.twitter.com/2/problems/resource-not-found:
            $ref: '#/components/schemas/ResourceNotFoundProblem'
          https://api.twitter.com/2/problems/resource-unavailable:
            $ref: '#/components/schemas/ResourceUnavailableProblem'
          https://api.twitter.com/2/problems/rule-cap:
            $ref: '#/components/schemas/RulesCapProblem'
          https://api.twitter.com/2/problems/streaming-connection:
            $ref: '#/components/schemas/ConnectionExceptionProblem'
          https://api.twitter.com/2/problems/unsupported-authentication:
            $ref: '#/components/schemas/UnsupportedAuthenticationProblem'
          https://api.twitter.com/2/problems/usage-capped:
            $ref: '#/components/schemas/UsageCapExceededProblem'
    AddRulesRequest:
      type: object
      description: उपयोगकर्ता-निर्दिष्ट स्ट्रीम फ़िल्टरिंग नियम जोड़ने का अनुरोध।
      required:
        - add
      properties:
        add:
          type: array
          items:
            $ref: '#/components/schemas/RuleNoId'
    DeleteRulesRequest:
      type: object
      description: उपयोगकर्ता-निर्दिष्ट stream filtering rules को हटाने पर मिला रिस्पॉन्स।
      required:
        - delete
      properties:
        delete:
          type: object
          description: >-
            हटाए गए सभी उपयोगकर्ता-निर्दिष्ट stream filtering rules के id और
            मान।
          properties:
            ids:
              type: array
              description: हटाए गए सभी उपयोगकर्ता-निर्दिष्ट stream filtering rules के id।
              items:
                $ref: '#/components/schemas/RuleId'
            values:
              type: array
              description: हटाए गए सभी उपयोगकर्ता-निर्दिष्ट stream filtering rules के मान।
              items:
                $ref: '#/components/schemas/RuleValue'
    Rule:
      type: object
      description: उपयोगकर्ता द्वारा दी गई stream filtering rule।
      required:
        - value
      properties:
        id:
          $ref: '#/components/schemas/RuleId'
        tag:
          $ref: '#/components/schemas/RuleTag'
        value:
          $ref: '#/components/schemas/RuleValue'
    RulesResponseMetadata:
      type: object
      required:
        - sent
      properties:
        next_token:
          $ref: '#/components/schemas/NextToken'
        result_count:
          type: integer
          description: परिणाम सेट में नियमों की संख्या।
          format: int32
        sent:
          type: string
        summary:
          $ref: '#/components/schemas/RulesRequestSummary'
    GenericProblem:
      description: >-
        एक सामान्य समस्या, जिसमें HTTP स्टेटस कोड द्वारा दी गई जानकारी के
        अतिरिक्त कोई और जानकारी नहीं होती।
      allOf:
        - $ref: '#/components/schemas/Problem'
    ClientDisconnectedProblem:
      description: आपका क्लाइंट डिस्कनेक्ट हो गया है।
      allOf:
        - $ref: '#/components/schemas/Problem'
    ClientForbiddenProblem:
      description: >-
        ऐसी समस्या जो दर्शाती है कि आपका क्लाइंट यह अनुरोध करने के लिए अधिकृत
        नहीं है।
      allOf:
        - $ref: '#/components/schemas/Problem'
        - type: object
          properties:
            reason:
              type: string
              enum:
                - official-client-forbidden
                - client-not-enrolled
            registration_url:
              type: string
              format: uri
    ConflictProblem:
      description: यदि एक जॉब पहले से प्रगति में है, तो आप नई जॉब नहीं बना सकते।
      allOf:
        - $ref: '#/components/schemas/Problem'
    DisallowedResourceProblem:
      description: >-
        एक Problem जो दर्शाता है कि अनुरोधित resource इस API के सिद्धांतों का
        उल्लंघन करता है।
      allOf:
        - $ref: '#/components/schemas/Problem'
        - type: object
          required:
            - resource_id
            - resource_type
            - section
          properties:
            resource_id:
              type: string
            resource_type:
              type: string
              enum:
                - user
                - tweet
                - media
                - list
                - space
            section:
              type: string
              enum:
                - data
                - includes
    DuplicateRuleProblem:
      description: आपके द्वारा सबमिट किया गया नियम डुप्लिकेट है।
      allOf:
        - $ref: '#/components/schemas/Problem'
        - type: object
          properties:
            id:
              type: string
            value:
              type: string
    InvalidRequestProblem:
      description: ऐसी समस्या, जो बताती है कि यह अनुरोध अमान्य है।
      allOf:
        - $ref: '#/components/schemas/Problem'
        - type: object
          properties:
            errors:
              type: array
              minItems: 1
              items:
                type: object
                properties:
                  message:
                    type: string
                  parameters:
                    type: object
                    additionalProperties:
                      type: array
                      items:
                        type: string
    InvalidRuleProblem:
      description: आपके द्वारा सबमिट किया गया नियम अमान्य है।
      allOf:
        - $ref: '#/components/schemas/Problem'
    NonCompliantRulesProblem:
      description: ऐसी समस्या जो दर्शाती है कि यूज़र का नियम-समूह अनुपालन में नहीं है।
      allOf:
        - $ref: '#/components/schemas/Problem'
    FieldUnauthorizedProblem:
      description: >-
        ऐसी समस्या जो यह दर्शाती है कि आपको Tweet, उपयोगकर्ता आदि पर किसी विशेष
        फ़ील्ड को देखने की अनुमति नहीं है।
      allOf:
        - $ref: '#/components/schemas/Problem'
        - type: object
          required:
            - resource_type
            - field
            - section
          properties:
            field:
              type: string
            resource_type:
              type: string
              enum:
                - user
                - tweet
                - media
                - list
                - space
            section:
              type: string
              enum:
                - data
                - includes
    ResourceUnauthorizedProblem:
      description: >-
        ऐसी Problem जो दर्शाती है कि आपको किसी विशेष Tweet, User आदि को देखने की
        अनुमति नहीं है।
      allOf:
        - $ref: '#/components/schemas/Problem'
        - type: object
          required:
            - value
            - resource_id
            - resource_type
            - section
            - parameter
          properties:
            parameter:
              type: string
            resource_id:
              type: string
            resource_type:
              type: string
              enum:
                - user
                - tweet
                - media
                - list
                - space
            section:
              type: string
              enum:
                - data
                - includes
            value:
              type: string
    OperationalDisconnectProblem:
      description: परिचालन कारणों से आपका कनेक्शन डिस्कनेक्ट कर दिया गया है।
      allOf:
        - $ref: '#/components/schemas/Problem'
        - type: object
          properties:
            disconnect_type:
              type: string
              enum:
                - OperationalDisconnect
                - UpstreamOperationalDisconnect
                - ForceDisconnect
                - UpstreamUncleanDisconnect
                - SlowReader
                - InternalError
                - ClientApplicationStateDegraded
                - InvalidRules
    ResourceNotFoundProblem:
      description: ऐसी Problem जो दर्शाती है कि दिया गया Tweet, User आदि मौजूद नहीं है।
      allOf:
        - $ref: '#/components/schemas/Problem'
        - type: object
          required:
            - parameter
            - value
            - resource_id
            - resource_type
          properties:
            parameter:
              type: string
              minLength: 1
            resource_id:
              type: string
            resource_type:
              type: string
              enum:
                - user
                - tweet
                - media
                - list
                - space
            value:
              type: string
              description: मान फ़ील्ड के स्कीमा से मेल खाएगा।
    ResourceUnavailableProblem:
      description: >-
        ऐसी Problem जो दर्शाती है कि कोई विशेष Tweet, User आदि आपके लिए उपलब्ध
        नहीं है।
      allOf:
        - $ref: '#/components/schemas/Problem'
        - type: object
          required:
            - parameter
            - resource_id
            - resource_type
          properties:
            parameter:
              type: string
              minLength: 1
            resource_id:
              type: string
            resource_type:
              type: string
              enum:
                - user
                - tweet
                - media
                - list
                - space
    RulesCapProblem:
      description: आप rules की अधिकतम संख्या से अधिक हो गए हैं।
      allOf:
        - $ref: '#/components/schemas/Problem'
    ConnectionExceptionProblem:
      description: एक Problem जो दर्शाता है कि कनेक्शन में कुछ गड़बड़ी है।
      allOf:
        - $ref: '#/components/schemas/Problem'
        - type: object
          properties:
            connection_issue:
              type: string
              enum:
                - TooManyConnections
                - ProvisioningSubscription
                - RuleConfigurationIssue
                - RulesInvalidIssue
    UnsupportedAuthenticationProblem:
      description: ऐसी समस्या जो दर्शाती है कि उपयोग किया गया प्रमाणीकरण समर्थित नहीं है।
      allOf:
        - $ref: '#/components/schemas/Problem'
    UsageCapExceededProblem:
      description: ऐसी समस्या जो दर्शाती है कि उपयोग सीमा पार हो गई है।
      allOf:
        - $ref: '#/components/schemas/Problem'
        - type: object
          properties:
            period:
              type: string
              enum:
                - Daily
                - Monthly
            scope:
              type: string
              enum:
                - Account
                - Product
    RuleNoId:
      type: object
      description: उपयोगकर्ता द्वारा दी गई stream filtering rule।
      required:
        - value
      properties:
        tag:
          $ref: '#/components/schemas/RuleTag'
        value:
          $ref: '#/components/schemas/RuleValue'
    RuleId:
      type: string
      description: इस rule का अद्वितीय पहचानकर्ता।
      pattern: ^[0-9]{1,19}$
      example: '120897978112909812'
    RuleValue:
      type: string
      description: rule का filterlang मान।
      example: coffee -is:retweet
    RuleTag:
      type: string
      description: उपयोगकर्ता द्वारा दिए गए rules को लेबल करने के लिए एक टैग।
      example: Non-retweeted coffee Posts
    NextToken:
      type: string
      description: अगला टोकन।
      minLength: 1
    RulesRequestSummary:
      oneOf:
        - type: object
          description: >-
            उपयोगकर्ता-निर्दिष्ट स्ट्रीम फ़िल्टरिंग नियमों को जोड़ने के परिणामों
            का सारांश।
          required:
            - created
            - not_created
            - valid
            - invalid
          properties:
            created:
              type: integer
              description: >-
                बनाए गए उपयोगकर्ता-निर्दिष्ट स्ट्रीम फ़िल्टरिंग नियमों की
                संख्या।
              format: int32
              example: 1
            invalid:
              type: integer
              description: अमान्य उपयोगकर्ता-निर्दिष्ट स्ट्रीम फ़िल्टरिंग नियमों की संख्या।
              format: int32
              example: 1
            not_created:
              type: integer
              description: >-
                उन उपयोगकर्ता-निर्दिष्ट स्ट्रीम फ़िल्टरिंग नियमों की संख्या जो
                बनाए नहीं गए।
              format: int32
              example: 1
            valid:
              type: integer
              description: वैध उपयोगकर्ता-निर्दिष्ट स्ट्रीम फ़िल्टरिंग नियमों की संख्या।
              format: int32
              example: 1
        - type: object
          required:
            - deleted
            - not_deleted
          properties:
            deleted:
              type: integer
              description: >-
                उन उपयोगकर्ता-निर्दिष्ट स्ट्रीम फ़िल्टरिंग नियमों की संख्या
                जिन्हें हटाया गया।
              format: int32
            not_deleted:
              type: integer
              description: >-
                उन उपयोगकर्ता-निर्दिष्ट स्ट्रीम फ़िल्टरिंग नियमों की संख्या
                जिन्हें हटाया नहीं गया।
              format: int32
  securitySchemes:
    BearerToken:
      type: http
      scheme: bearer

````