MCPcopy Index your code
hub / github.com/StackStorm/st2 / create

Method create

st2client/st2client/models/core.py:370–376  ·  view source on GitHub ↗
(self, instance, **kwargs)

Source from the content-addressed store, hash-verified

368
369 @add_auth_token_to_kwargs_from_env
370 def create(self, instance, **kwargs):
371 url = "/%s" % self.resource.get_url_path_name()
372 response = self.client.post(url, instance.serialize(), **kwargs)
373 if response.status_code != http_client.OK:
374 self.handle_error(response)
375 instance = self.resource.deserialize(parse_api_response(response))
376 return instance
377
378 @add_auth_token_to_kwargs_from_env
379 def update(self, instance, **kwargs):

Callers 15

test_resource_createMethod · 0.95
_execute_workflowMethod · 0.80
runMethod · 0.80
runMethod · 0.80
runMethod · 0.80
runMethod · 0.80
runMethod · 0.80
runMethod · 0.80
run_and_printMethod · 0.80
runMethod · 0.80

Calls 6

handle_errorMethod · 0.95
parse_api_responseFunction · 0.85
get_url_path_nameMethod · 0.80
serializeMethod · 0.80
deserializeMethod · 0.80
postMethod · 0.45

Tested by 6

test_resource_createMethod · 0.76
run_dep_inferenceFunction · 0.64
run_st2_generate_schemasFunction · 0.64