{"action":"created","issue":{"url":"https://api.github.com/repos/StackStorm/st2/issues/4039","repository_url":"https://api.github.com/repos/StackStorm/st2","labels_url":"https://api.github.com/repos/StackStorm/st2/issues/4039/labels{/name}","comments_url":"https://api.github.com/repos/StackStorm/st2/issues/4039/comments","events_url":"https://api.github.com/repos/StackStorm/st2/issues/4039/events","html_url":"https://github.com/StackStorm/st2/issues/4039","id":306363643,"number":4039,"title":"Invalid file path while trying to create an action through REST API","user":{"login":"NikosVlagoidis","id":10330520,"avatar_url":"https://avatars1.githubusercontent.com/u/10330520?v=4","gravatar_id":"","url":"https://api.github.com/users/NikosVlagoidis","html_url":"https://github.com/NikosVlagoidis","followers_url":"https://api.github.com/users/NikosVlagoidis/followers","following_url":"https://api.github.com/users/NikosVlagoidis/following{/other_user}","gists_url":"https://api.github.com/users/NikosVlagoidis/gists{/gist_id}","starred_url":"https://api.github.com/users/NikosVlagoidis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NikosVlagoidis/subscriptions","organizations_url":"https://api.github.com/users/NikosVlagoidis/orgs","repos_url":"https://api.github.com/users/NikosVlagoidis/repos","events_url":"https://api.github.com/users/NikosVlagoidis/events{/privacy}","received_events_url":"https://api.github.com/users/NikosVlagoidis/received_events","type":"User","site_admin":false},"labels":[{"id":591965294,"url":"https://api.github.com/repos/StackStorm/st2/labels/API","name":"API","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2018-03-19T07:59:03Z","updated_at":"2018-03-20T09:01:03Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"https://api.stackstorm.com/api/v1/actions/#/actions_controller.post\r\n\r\nWhile I was trying to create a new action which I previous deleted with the REST API so the file is in the filesystem the following error occurred.\r\n\r\nRequest:\r\n\r\n```\r\n{\t\r\n\t\"name\": \"test_action\",\r\n\t\"runner_type\": \"python-script\",\r\n\t\"data_files\":[{\r\n\t\t\"file_path\": \"/opt/stackstorm/packs.dev/my_pack/action\",\r\n\t\t\"content\": \"test_action.py\"\r\n\t}]\r\n}\r\n```\r\n\r\nResponse: \r\n\r\n```\r\n{\r\n    \"faultstring\": \"Invalid file path: /opt/stackstorm/packs.dev/my_pack/action\"\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/StackStorm/st2/issues/comments/374522298","html_url":"https://github.com/StackStorm/st2/issues/4039#issuecomment-374522298","issue_url":"https://api.github.com/repos/StackStorm/st2/issues/4039","id":374522298,"user":{"login":"Kami","id":125088,"avatar_url":"https://avatars3.githubusercontent.com/u/125088?v=4","gravatar_id":"","url":"https://api.github.com/users/Kami","html_url":"https://github.com/Kami","followers_url":"https://api.github.com/users/Kami/followers","following_url":"https://api.github.com/users/Kami/following{/other_user}","gists_url":"https://api.github.com/users/Kami/gists{/gist_id}","starred_url":"https://api.github.com/users/Kami/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kami/subscriptions","organizations_url":"https://api.github.com/users/Kami/orgs","repos_url":"https://api.github.com/users/Kami/repos","events_url":"https://api.github.com/users/Kami/events{/privacy}","received_events_url":"https://api.github.com/users/Kami/received_events","type":"User","site_admin":false},"created_at":"2018-03-20T09:01:03Z","updated_at":"2018-03-20T09:01:03Z","author_association":"OWNER","body":"I confirmed the following works fine:\r\n\r\n```bash\r\ncurl -X POST \"http://127.0.0.1:9101/v1/actions\" -H \"Content-Type: application/json\" -d '{\"data_files\": [{\"content\": \"import sys\", \"file_path\": \"test_action.py\"}], \"ref\": \"test\", \"name\": \"Test Pack\", \"runner_type\": \"python-script\", \"pack\": \"test\"}'\r\n````"}}
{"actor":{"display_login":"Kami"}}