Subscription

abb_rws_client_python_rw6.rws.subscription

RWS module: Subscription Service → Get Subscription Actions

1:1 mirror of the ABB RobotWare 6 REST API. Each function maps to exactly one HTTP endpoint. No composed logic — see highlevel/ for wrappers.

add_new_resources_remove_existing_resources_or(client, group_id, identifier=None, identifier_p=None) async

Add new resources, Remove existing Resources or change existing resources priorities..

Route: PUT /subscription/{group-id} ABB constraints: maximum 1000 resources can be subscribed per group Each client can have maximum 2 groups. Low priority subscription(p=0) is allowed on any resource. Medium priority subscription(p=1) is allowed on any resource. RobotWebservice clients can subscribe maximum of 64 resources with High priority (p=2)...

Parameters:
  • client (RWSClient) –

    Open RWSClient instance.

  • group_id (str) –

    URL path parameter.

  • identifier (str | None, default: None ) –

    Body parameter. Optional.

  • identifier_p (str | None, default: None ) –

    Body parameter. Optional.

Returns:
  • Response –

    Raw HTTP response. Expected success: HTTP 200.

Raises:
Example
>>> await add_new_resources_remove_existing_resources_or(client, "group_id_value")
<Response [200]>
Source code in abb_rws_client_python_rw6/rws/subscription.py
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
async def add_new_resources_remove_existing_resources_or(
    client: RWSClient,
    group_id: str,
    identifier: str | None = None,
    identifier_p: str | None = None,
) -> httpx.Response:
    """
    Add new resources, Remove existing Resources or change existing resources priorities..

    Route: ``PUT /subscription/{group-id}``
    ABB constraints: maximum 1000 resources can be subscribed per group Each client can have
        maximum 2 groups. Low priority subscription(p=0) is allowed on any resource. Medium
        priority subscription(p=1) is allowed on any resource. RobotWebservice clients can
        subscribe maximum of 64 resources with High priority (p=2)...

    Args:
        client: Open RWSClient instance.
        group_id: URL path parameter.
        identifier: Body parameter. Optional.
        identifier_p: Body parameter. Optional.

    Returns:
        Raw HTTP response. Expected success: HTTP 200.

    Raises:
        RWSAuthenticationError: On HTTP 401.
        RWSNotFoundError: On HTTP 404.
        RWSHTTPError: On any other HTTP >= 400.
        # ABB codes: BAD_REQUEST(400), UNSUPPORTED_MEDIA(415), see

    Example:
        ```python
        >>> await add_new_resources_remove_existing_resources_or(client, "group_id_value")
        <Response [200]>
        ```
    """
    return await client.put(
        f"/subscription/{group_id}",
        data={
            k: v
            for k, v in {"identifier": identifier, "identifier_p": identifier_p}.items()
            if v is not None
        },
    )

get_subscription_actions(client, action=None) async

Get Subscription Actions.

Route: GET /subscription ABB constraints: The form body is in standard form data format and consists of three name-value pairs per resource. 1st pair - resources= e.g. resources=1 2nd pair - = e.g. 1=/rw/iosystem/signals/Virtual1/Board1/do1;state 3rd pair - -p=<0|1|2> 1-p=1 In th...

Parameters:
  • client (RWSClient) –

    Open RWSClient instance.

  • action (str | None, default: None ) –

    Query parameter. Optional.

Returns:
  • Response –

    Raw HTTP response. Expected success: HTTP 200.

Raises:
Example
>>> await get_subscription_actions(client)
<Response [200]>
Source code in abb_rws_client_python_rw6/rws/subscription.py
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
async def get_subscription_actions(
    client: RWSClient,
    action: str | None = None,
) -> httpx.Response:
    """
    Get Subscription Actions.

    Route: ``GET /subscription``
    ABB constraints: The form body is in standard form data format and consists of three
        name-value pairs per resource. 1st pair - resources=<identifier> e.g. resources=1 2nd
        pair - <identifier>=<subscription-resource> e.g.
        1=/rw/iosystem/signals/Virtual1/Board1/do1;state 3rd pair - <identifier>-p=<0|1|2> 1-p=1
        In th...

    Args:
        client: Open RWSClient instance.
        action: Query parameter. Optional.

    Returns:
        Raw HTTP response. Expected success: HTTP 200.

    Raises:
        RWSAuthenticationError: On HTTP 401.
        RWSNotFoundError: On HTTP 404.
        RWSHTTPError: On any other HTTP >= 400.
        # ABB codes: BAD_REQUEST(400), see

    Example:
        ```python
        >>> await get_subscription_actions(client)
        <Response [200]>
        ```
    """
    return await client.get(
        "/subscription",
        params={k: v for k, v in {"action": action}.items() if v is not None},
    )

get_subscription_group_actions(client, group_id, action=None) async

Get Subscription Group Actions.

Route: GET /subscription/{group-id} ABB constraints: The form body is in standard form data format and consists of three name-value pairs per resource. 1st pair - resources= e.g. resources=1 2nd pair - = e.g. 1=/rw/iosystem/signals/Virtual1/Board1/do1;state 3rd pair - -p=<0|1|2> 1-p=1 In th...

Parameters:
  • client (RWSClient) –

    Open RWSClient instance.

  • group_id (str) –

    URL path parameter.

  • action (str | None, default: None ) –

    Query parameter. Optional.

Returns:
  • Response –

    Raw HTTP response. Expected success: HTTP 200.

Raises:
Example
>>> await get_subscription_group_actions(client, "group_id_value")
<Response [200]>
Source code in abb_rws_client_python_rw6/rws/subscription.py
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
async def get_subscription_group_actions(
    client: RWSClient,
    group_id: str,
    action: str | None = None,
) -> httpx.Response:
    """
    Get Subscription Group Actions.

    Route: ``GET /subscription/{group-id}``
    ABB constraints: The form body is in standard form data format and consists of three
        name-value pairs per resource. 1st pair - resources=<identifier> e.g. resources=1 2nd
        pair - <identifier>=<subscription-resource> e.g.
        1=/rw/iosystem/signals/Virtual1/Board1/do1;state 3rd pair - <identifier>-p=<0|1|2> 1-p=1
        In th...

    Args:
        client: Open RWSClient instance.
        group_id: URL path parameter.
        action: Query parameter. Optional.

    Returns:
        Raw HTTP response. Expected success: HTTP 200.

    Raises:
        RWSAuthenticationError: On HTTP 401.
        RWSNotFoundError: On HTTP 404.
        RWSHTTPError: On any other HTTP >= 400.
        # ABB codes: BAD_REQUEST(400) See

    Example:
        ```python
        >>> await get_subscription_group_actions(client, "group_id_value")
        <Response [200]>
        ```
    """
    return await client.get(
        f"/subscription/{group_id}",
        params={k: v for k, v in {"action": action}.items() if v is not None},
    )

subscribe_on_resources(client, identifier=None, identifier_p=None) async

Subscribe on resources.

Route: POST /subscription ABB constraints: The sequence of steps involved to setup subscription and start listening for events are shown below: Subscribe on resources Response to this HTTP request is a list of initial events for the subscribed resources along with the location header. Retrieve Location header and use this value to setup w...

Parameters:
  • client (RWSClient) –

    Open RWSClient instance.

  • identifier (str | None, default: None ) –

    Body parameter. Optional.

  • identifier_p (str | None, default: None ) –

    Body parameter. Optional.

Returns:
  • Response –

    Raw HTTP response. Expected success: HTTP 201.

Raises:
Example
>>> await subscribe_on_resources(client)
<Response [201]>
Source code in abb_rws_client_python_rw6/rws/subscription.py
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
async def subscribe_on_resources(
    client: RWSClient,
    identifier: str | None = None,
    identifier_p: str | None = None,
) -> httpx.Response:
    """
    Subscribe on resources.

    Route: ``POST /subscription``
    ABB constraints: The sequence of steps involved to setup subscription and start listening for
        events are shown below: Subscribe on resources Response to this HTTP request is a list of
        initial events for the subscribed resources along with the location header. Retrieve
        Location header and use this value to setup w...

    Args:
        client: Open RWSClient instance.
        identifier: Body parameter. Optional.
        identifier_p: Body parameter. Optional.

    Returns:
        Raw HTTP response. Expected success: HTTP 201.

    Raises:
        RWSAuthenticationError: On HTTP 401.
        RWSNotFoundError: On HTTP 404.
        RWSHTTPError: On any other HTTP >= 400.
        # ABB codes: BAD_REQUEST(400), UNSUPPORTED_MEDIA(415) See

    Example:
        ```python
        >>> await subscribe_on_resources(client)
        <Response [201]>
        ```
    """
    return await client.post(
        "/subscription",
        data={
            k: v
            for k, v in {"identifier": identifier, "identifier_p": identifier_p}.items()
            if v is not None
        },
    )

unsubscribe_or_remove_the_resource_from_subscription(client, group_id, resource_uri) async

Unsubscribe or remove the resource from subscription group..

Route: DELETE /subscription/{group-id}/{resource-uri} ABB constraints: Not supported in bootserver mode

Parameters:
  • client (RWSClient) –

    Open RWSClient instance.

  • group_id (str) –

    URL path parameter.

  • resource_uri (str) –

    URL path parameter.

Returns:
  • Response –

    Raw HTTP response. Expected success: HTTP 200.

Raises:
Example
>>> await unsubscribe_or_remove_the_resource_from_subscription(
...     client,
...     "group_id_value",
...     "resource_uri_value"
... )
<Response [200]>
Source code in abb_rws_client_python_rw6/rws/subscription.py
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
async def unsubscribe_or_remove_the_resource_from_subscription(
    client: RWSClient,
    group_id: str,
    resource_uri: str,
) -> httpx.Response:
    """
    Unsubscribe or remove the resource from subscription group..

    Route: ``DELETE /subscription/{group-id}/{resource-uri}``
    ABB constraints: Not supported in bootserver mode

    Args:
        client: Open RWSClient instance.
        group_id: URL path parameter.
        resource_uri: URL path parameter.

    Returns:
        Raw HTTP response. Expected success: HTTP 200.

    Raises:
        RWSAuthenticationError: On HTTP 401.
        RWSNotFoundError: On HTTP 404.
        RWSHTTPError: On any other HTTP >= 400.
        # ABB codes: BAD_REQUEST(400), see

    Example:
        ```python
        >>> await unsubscribe_or_remove_the_resource_from_subscription(
        ...     client,
        ...     "group_id_value",
        ...     "resource_uri_value"
        ... )
        <Response [200]>
        ```
    """
    return await client.delete(f"/subscription/{group_id}/{resource_uri}")

unsubscribe_or_remove_the_subscription_group_resources(client, group_id) async

Unsubscribe or remove the subscription group/resources in group..

Route: DELETE /subscription/{group-id} ABB constraints: Not supported in bootserver mode

Parameters:
  • client (RWSClient) –

    Open RWSClient instance.

  • group_id (str) –

    URL path parameter.

Returns:
  • Response –

    Raw HTTP response. Expected success: HTTP 200.

Raises:
Example
>>> await unsubscribe_or_remove_the_subscription_group_resources(
...     client,
...     "group_id_value"
... )
<Response [200]>
Source code in abb_rws_client_python_rw6/rws/subscription.py
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
async def unsubscribe_or_remove_the_subscription_group_resources(
    client: RWSClient,
    group_id: str,
) -> httpx.Response:
    """
    Unsubscribe or remove the subscription group/resources in group..

    Route: ``DELETE /subscription/{group-id}``
    ABB constraints: Not supported in bootserver mode

    Args:
        client: Open RWSClient instance.
        group_id: URL path parameter.

    Returns:
        Raw HTTP response. Expected success: HTTP 200.

    Raises:
        RWSAuthenticationError: On HTTP 401.
        RWSNotFoundError: On HTTP 404.
        RWSHTTPError: On any other HTTP >= 400.
        # ABB codes: BAD_REQUEST(400), see

    Example:
        ```python
        >>> await unsubscribe_or_remove_the_subscription_group_resources(
        ...     client,
        ...     "group_id_value"
        ... )
        <Response [200]>
        ```
    """
    return await client.delete(f"/subscription/{group_id}")