• CLI

sdk
  1. Help Center
  2. CLI
  3. Developer Guide
  4. Mapping Between API and SDK
  5. Python
  6. SMN

SMN

Interface

method

API URL

Topic

create_topic(**kwargs)

POST /v2/{project_id}/notifications/topics

update_topic(topic, **kwargs)

PUT /v2/{project_id}/notifications/topics/{topic_urn}

delete_topic(topic, ignore_missing=True)

DELETE /v2/{project_id}/notifications/topics/{topic_urn}

topics(**query)

GET /v2/{project_id}/notifications/topics?offset=0&limit=2

get_topic(topic)

GET /v2/{project_id}/notifications/topics/{topic_urn}

get_topic_attr(topic, attrname=None)

GET /v2/{project_id}/notifications/topics/{topic_urn}/attributes?name=access_policy

update_topic_attr(topic_attr, attrname, value)

PUT /v2/{project_id}/notifications/topics/{topic_urn}/attributes/{attributes_name}

delete_topic_attr(topic_attr, attrname)

DELETE /v2/{project_id}/notifications/topics/{topic_urn}/attributes/{attributes_name}

delete_topic_attrs(topic)

DELETE /v2/{project_id}/notifications/topics/{topic_urn}/attributes

Subscribe

subscriptions(**query)

GET /v2/{project_id}/notifications/subscriptions?offset=0&limit=2

topic_subscriptions(topic, **query)

GET /v2/{project_id}/notifications/topics/{topic_urn}/subscriptions?offset=0&limit=10

subscript_topic(topic, **kwargs)

POST /v2/{project_id}/notifications/topics/{topic_urn}/subscriptions

unsubscript_topic(sub, )

DELETE /v2/{project_id}/notifications/subscriptions/{subscription_urn}

Message template

create_message_template(**kwargs)

POST /v2/{project_id}/notifications/message_template

update_message_template(getm, **kwargs)

PUT /v2/{project_id}/notifications/message_template/{message_template_Id}

delete_message_template(mt,ignore_missing=True )

DELETE /v2/{project_id}/notifications/message_template/{message_template_id}

message_templates(**query)

GET /v2/{project_id}/notifications/message_template

get_message_template(mt)

GET /v2/{project_id}/notifications/message_template/{message_template_id}

Publish message

publish_topic(topic, **message_dict)

POST /v2/{project_id}/notifications/topics/{topic_urn}/publish

Sms

send_sms(conn)

POST /v2/{project_id}/notifications/sms