teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

16

一部削除

2019/10/31 04:47

投稿

s_akira
s_akira

スコア15

title CHANGED
File without changes
body CHANGED
@@ -10,7 +10,7 @@
10
10
  data_list = {'Kama_boko': 1, 'wA_ter': 2, 'thun_Der': 3}
11
11
  # 空のlist
12
12
  data = {}
13
- # for文(keyをキャメルケースに変換するfor文)
13
+ # keyをキャメルケースに変換するfor文
14
14
  for k,v in data_list.items():
15
15
  data[self.camel(k)] = v
16
16
  ```

15

追記

2019/10/31 04:47

投稿

s_akira
s_akira

スコア15

title CHANGED
File without changes
body CHANGED
@@ -19,4 +19,5 @@
19
19
  参考URL
20
20
  --
21
21
  [各要素のキーに対してforループ処理](https://note.nkmk.me/python-dict-keys-values-items/)
22
- [キャメルケース変換](http://hatakazu.hatenablog.com/entry/2013/02/16/135911)
22
+ [キャメルケース変換](http://hatakazu.hatenablog.com/entry/2013/02/16/135911)
23
+ [dict辞書(forループ処理)](https://note.nkmk.me/python-dict-keys-values-items/)

14

削除できないので変更

2019/10/17 09:22

投稿

s_akira
s_akira

スコア15

title CHANGED
@@ -1,1 +1,1 @@
1
- curlコマンドでRESTAPIたたきたい。
1
+ [dict]for文map関数で表現
body CHANGED
@@ -1,26 +1,22 @@
1
- RESTAPIを使用したいがcurlの記載方法がわらない。
1
+ for文で記載した内容をmap表現に変更可能どうか
2
2
 
3
- 使用したコマンド
4
- --
5
- [Start Process Instance](https://docs.camunda.org/manual/latest/reference/rest/process-definition/post-start-process-instance/)
6
- 上記の、「POST /process-definition/key/{key}/start」を使用したいです。
7
- 空josonを使用
3
+ ```python
4
+ import re
8
5
 
9
- 試したコマンドを複数個記載いたします。全てエラーです。。
6
+ def camel(self):
10
- `curl -XPOST http://localhost:8080/engine-rest/process-definition/key/sample2/start -H "ContentType:application/json" -d "{/""}/"`
7
+ return re.sub("_(.)",lambda x:x.group(1).upper(),tmp)
8
+ def cam(self):
9
+ # 中身
11
- →エラー:e.g., malformed request syntax, invalid request message framing, or deceptive request routing
10
+ data_list = {'Kama_boko': 1, 'wA_ter': 2, 'thun_Der': 3}
11
+ # 空のlist
12
+ data = {}
13
+ # for文(keyをキャメルケースに変換するfor文)
14
+ for k,v in data_list.items():
15
+ data[self.camel(k)] = v
16
+ ```
12
17
 
13
- `curl -XPOST http://localhost:8080/engine-rest/process-definition/key/sample2/start -H "Content-Type:application/json" -d '{}'`
14
- →Status 400エラー(e.g., malformed request syntax, invalid request message framing, or deceptive request routing)
15
18
 
16
19
  参考URL
17
- ---
18
- [Camunda の REST API を試してみる](https://qiita.com/Masaaki_Inaba/items/01f63641da6e3f69388a)
19
- [Start Process Instance](https://docs.camunda.org/manual/latest/reference/rest/process-definition/post-start-process-instance/)
20
- [curlコマンドの使い方](https://viral-community.com/security/curl-8263/)
21
-
22
- 備考
23
20
  --
21
+ [各要素のキーに対してforループ処理](https://note.nkmk.me/python-dict-keys-values-items/)
24
- camundaは、Docker([Dockerhub](https://hub.docker.com/r/camunda/camunda-bpm-platform/))で動かしています。
22
+ [キャメルケース変換](http://hatakazu.hatenablog.com/entry/2013/02/16/135911)
25
-
26
- crlの初歩的なことかもしれず申し訳ないのですが、ご教示のほどお願いいたします。

13

修正

2019/10/17 09:08

投稿

s_akira
s_akira

スコア15

title CHANGED
File without changes
body CHANGED
@@ -1,10 +1,10 @@
1
- CamundaのRESTAPI(POST /process-definition/key/{key}/start)を使用したいが、curlの記載方法がわからない。
1
+ RESTAPIを使用したいが、curlの記載方法がわからない。
2
2
 
3
3
  使用したコマンド
4
4
  --
5
5
  [Start Process Instance](https://docs.camunda.org/manual/latest/reference/rest/process-definition/post-start-process-instance/)
6
6
  上記の、「POST /process-definition/key/{key}/start」を使用したいです。
7
- 記載にRequest Bodyが記載されてて、何個か必須ってなってますが、コマンドにどう書けばいいのかわからないため、空josonを使用してます。
7
+ 空josonを使用
8
8
 
9
9
  試したコマンドを複数個記載いたします。全てエラーです。。
10
10
  `curl -XPOST http://localhost:8080/engine-rest/process-definition/key/sample2/start -H "ContentType:application/json" -d "{/""}/"`

12

修正

2019/10/10 04:06

投稿

s_akira
s_akira

スコア15

title CHANGED
@@ -1,1 +1,1 @@
1
- curlコマンドでCamundaのRESTAPIをたたきたい。
1
+ curlコマンドでRESTAPIをたたきたい。
body CHANGED
File without changes

11

修正

2019/10/10 04:05

投稿

s_akira
s_akira

スコア15

title CHANGED
File without changes
body CHANGED
File without changes

10

不要箇所削除

2019/10/04 07:23

投稿

s_akira
s_akira

スコア15

title CHANGED
File without changes
body CHANGED
@@ -1,24 +1,16 @@
1
- 最終的には、PythonからRequestsを使用してCamundaプロセスをキックしたいです。
2
- 上記を満たしたいのですが、そもそもcurlコマンドが動いていないです。
3
- 間違っているかもしれませんが、コマンドができたら,pythonにそれを組み込めばいいという認識でいます。
4
- ですので、一旦crulコマンドを動作させたいです。
5
-
6
- 困っていること
7
- --
8
1
  CamundaのRESTAPI(POST /process-definition/key/{key}/start)を使用したいが、curlの記載方法がわからない。
9
2
 
10
3
  使用したコマンド
11
4
  --
12
5
  [Start Process Instance](https://docs.camunda.org/manual/latest/reference/rest/process-definition/post-start-process-instance/)
13
6
  上記の、「POST /process-definition/key/{key}/start」を使用したいです。
14
- 記載にRequest Bodyが記載されてて、何個か必須ってなってますが、コマンドにどう書けばいいのかわかせん
7
+ 記載にRequest Bodyが記載されてて、何個か必須ってなってますが、コマンドにどう書けばいいのかわからないため、空josonを使用して
15
8
 
16
- 空josonでもありってあるので記載方法わからないので下のコマンドは全て空です…
17
- 試したコマンドを複数個記載いたします。全エラーです。。
9
+ 試したコマンドを複数個記載いたします。全エラーです。。
18
10
  `curl -XPOST http://localhost:8080/engine-rest/process-definition/key/sample2/start -H "ContentType:application/json" -d "{/""}/"`
19
11
  →エラー:e.g., malformed request syntax, invalid request message framing, or deceptive request routing
20
12
 
21
- `curl -XPOST http://localhost:8080/engine-rest/process-definition/key/sample2/start -H Content-Type:application/json -d '{}'`
13
+ `curl -XPOST http://localhost:8080/engine-rest/process-definition/key/sample2/start -H "Content-Type:application/json" -d '{}'`
22
14
  →Status 400エラー(e.g., malformed request syntax, invalid request message framing, or deceptive request routing)
23
15
 
24
16
  参考URL
@@ -30,7 +22,5 @@
30
22
  備考
31
23
  --
32
24
  camundaは、Docker([Dockerhub](https://hub.docker.com/r/camunda/camunda-bpm-platform/))で動かしています。
33
- camundaの中には、sample1,sample2,sample3のプロセスを作成/追加済です。
34
25
 
35
- crlの初歩的なことかもしれず申し訳ないのですが、ご教示のほどお願いいたします。
26
+ crlの初歩的なことかもしれず申し訳ないのですが、ご教示のほどお願いいたします。
36
- コマンドができれば、なんとかPythonもできると思うので…よろしくお願いいたします。

9

修正

2019/10/04 05:34

投稿

s_akira
s_akira

スコア15

title CHANGED
File without changes
body CHANGED
@@ -15,13 +15,10 @@
15
15
 
16
16
  空josonでもありってあるので記載方法わからないので下のコマンドは全て空です…
17
17
  試したコマンドを複数個記載いたします。全部エラーです。。
18
- `curl -XPOST http://localhost:8080/engine-rest/process-definition/key/sample2/start -H “ContentType:application/json”`
19
- →エラー:Status 400
20
-
21
- `curl -XPOST http://localhost:8080/engine-rest/process-definition/key/sample2/start -H ContentType:application/json -d "{/""}/"`
18
+ `curl -XPOST http://localhost:8080/engine-rest/process-definition/key/sample2/start -H "ContentType:application/json" -d "{/""}/"`
22
19
  →エラー:e.g., malformed request syntax, invalid request message framing, or deceptive request routing
23
20
 
24
- `curl -XPOST http://localhost:8080/engine-rest/process-definition/key/sample2/start -H “Content-Type:application/json” -d '{"startInstructions":{"type": "startAfterActivity"}}'`
21
+ `curl -XPOST http://localhost:8080/engine-rest/process-definition/key/sample2/start -H “Content-Type:application/json” -d '{}'`
25
22
  →Status 400エラー(e.g., malformed request syntax, invalid request message framing, or deceptive request routing)
26
23
 
27
24
  参考URL
@@ -35,6 +32,5 @@
35
32
  camundaは、Docker([Dockerhub](https://hub.docker.com/r/camunda/camunda-bpm-platform/))で動かしています。
36
33
  camundaの中には、sample1,sample2,sample3のプロセスを作成/追加済です。
37
34
 
38
- めちゃくちゃ舌打ちと怒られたので、多分すごく簡単なことだと思います…申し訳ないです。。
39
35
  crlの初歩的なことかもしれず申し訳ないのですが、ご教示のほどお願いいたします。
40
36
  コマンドができれば、なんとかPythonもできると思うので…よろしくお願いいたします。

8

変更

2019/10/03 09:51

投稿

s_akira
s_akira

スコア15

title CHANGED
@@ -1,1 +1,1 @@
1
- 【至急】curlコマンドでCamundaのRESTAPIをたたきたい。
1
+ curlコマンドでCamundaのRESTAPIをたたきたい。
body CHANGED
File without changes

7

コマンド変更

2019/10/03 09:26

投稿

s_akira
s_akira

スコア15

title CHANGED
File without changes
body CHANGED
@@ -21,8 +21,8 @@
21
21
  `curl -XPOST http://localhost:8080/engine-rest/process-definition/key/sample2/start -H “ContentType:application/json” -d "{/""}/"`
22
22
  →エラー:e.g., malformed request syntax, invalid request message framing, or deceptive request routing
23
23
 
24
- `curl -XPOST http://localhost:8080/engine-rest/process-definition/key/sample2/start -H “ContentType:application/json” -d "{}"`
24
+ `curl -XPOST http://localhost:8080/engine-rest/process-definition/key/sample2/start -H “Content-Type:application/json” -d '{"startInstructions":{"type": "startAfterActivity"}}'`
25
- →エラーe.g., malformed request syntax, invalid request message framing, or deceptive request routing
25
+ Status 400エラー(e.g., malformed request syntax, invalid request message framing, or deceptive request routing)
26
26
 
27
27
  参考URL
28
28
  ---

6

文言変更

2019/10/03 08:21

投稿

s_akira
s_akira

スコア15

title CHANGED
File without changes
body CHANGED
@@ -7,7 +7,7 @@
7
7
  --
8
8
  CamundaのRESTAPI(POST /process-definition/key/{key}/start)を使用したいが、curlの記載方法がわからない。
9
9
 
10
- 使用するコマンド
10
+ 使用したコマンド
11
11
  --
12
12
  [Start Process Instance](https://docs.camunda.org/manual/latest/reference/rest/process-definition/post-start-process-instance/)
13
13
  上記の、「POST /process-definition/key/{key}/start」を使用したいです。

5

文言変更

2019/10/03 07:22

投稿

s_akira
s_akira

スコア15

title CHANGED
File without changes
body CHANGED
@@ -1,11 +1,11 @@
1
- PythonからRequestsを使用してCamundaプロセスをキックしたいです。
1
+ 最終的には、PythonからRequestsを使用してCamundaプロセスをキックしたいです。
2
2
  上記を満たしたいのですが、そもそもcurlコマンドが動いていないです。
3
- 間違っているかもしれませんが、コマンドができたら,pythonにそれを組み込めばいいという認識でいます。
3
+ 間違っているかもしれませんが、コマンドができたら,pythonにそれを組み込めばいいという認識でいます。
4
- ですので、一旦crulコマンドを動作させたいと思っています。
4
+ ですので、一旦crulコマンドを動作させたいす。
5
5
 
6
6
  困っていること
7
7
  --
8
- CamundaのRESTAPI(POST /process-definition/key/{key}/start)を使用したいが、curlの書き方がわからない。
8
+ CamundaのRESTAPI(POST /process-definition/key/{key}/start)を使用したいが、curlの記載がわからない。
9
9
 
10
10
  使用するコマンド
11
11
  --
@@ -36,5 +36,5 @@
36
36
  camundaの中には、sample1,sample2,sample3のプロセスを作成/追加済です。
37
37
 
38
38
  めちゃくちゃ舌打ちと怒られたので、多分すごく簡単なことだと思います…申し訳ないです。。
39
- crlの初歩的なことかもしれず申し訳ないのですが、よろしくお願いいたします。
39
+ crlの初歩的なことかもしれず申し訳ないのですが、ご教示のほどお願いいたします。
40
40
  コマンドができれば、なんとかPythonもできると思うので…よろしくお願いいたします。

4

変な改行修正

2019/10/03 07:19

投稿

s_akira
s_akira

スコア15

title CHANGED
File without changes
body CHANGED
@@ -15,13 +15,13 @@
15
15
 
16
16
  空josonでもありってあるので記載方法わからないので下のコマンドは全て空です…
17
17
  試したコマンドを複数個記載いたします。全部エラーです。。
18
- `curl -XPOST http://localhost:8080/engine-rest/process-definition/key/sample2/start -H “Content-Type:application/json”`
18
+ `curl -XPOST http://localhost:8080/engine-rest/process-definition/key/sample2/start -H “ContentType:application/json”`
19
19
  →エラー:Status 400
20
20
 
21
- `curl -XPOST http://localhost:8080/engine-rest/process-definition/key/sample2/start -H “Content-Type:application/json” -d "{/""}/"`
21
+ `curl -XPOST http://localhost:8080/engine-rest/process-definition/key/sample2/start -H “ContentType:application/json” -d "{/""}/"`
22
22
  →エラー:e.g., malformed request syntax, invalid request message framing, or deceptive request routing
23
23
 
24
- `curl -XPOST http://localhost:8080/engine-rest/process-definition/key/sample2/start -H “Content-Type:application/json” -d "{}"`
24
+ `curl -XPOST http://localhost:8080/engine-rest/process-definition/key/sample2/start -H “ContentType:application/json” -d "{}"`
25
25
  →エラー:e.g., malformed request syntax, invalid request message framing, or deceptive request routing
26
26
 
27
27
  参考URL

3

タイトル変更

2019/10/03 07:17

投稿

s_akira
s_akira

スコア15

title CHANGED
@@ -1,1 +1,1 @@
1
- 【至急】PythonからCamundaプロセスをキックしたい。curlコマンドの方がわからない。
1
+ 【至急】curlコマンドでCamundaRESTAPIをたたい。
body CHANGED
File without changes

2

追記

2019/10/03 07:10

投稿

s_akira
s_akira

スコア15

title CHANGED
@@ -1,1 +1,1 @@
1
- 【至急】PythonからCamundaプロセスをキックしたい。コマンドの書き方がわからない。
1
+ 【至急】PythonからCamundaプロセスをキックしたい。curlコマンドの書き方がわからない。
body CHANGED
File without changes

1

修正

2019/10/03 06:58

投稿

s_akira
s_akira

スコア15

title CHANGED
File without changes
body CHANGED
@@ -13,7 +13,8 @@
13
13
  上記の、「POST /process-definition/key/{key}/start」を使用したいです。
14
14
  記載にRequest Bodyが記載されてて、何個か必須ってなってますが、コマンドにどう書けばいいのかわかりません。
15
15
 
16
+ 空josonでもありってあるので記載方法わからないので下のコマンドは全て空です…
16
- 試したコマンド以下など試しています。全部エラーです。
17
+ 試したコマンドを複数個記載たします。全部エラーです。
17
18
  `curl -XPOST http://localhost:8080/engine-rest/process-definition/key/sample2/start -H “Content-Type:application/json”`
18
19
  →エラー:Status 400
19
20