Post

2 followers Follow
0
Avatar

Using API to Create App in workspace - Fields don't get created

I'm trying to write a script that will auto-create an App in a workspace. I'm using PodioApi.php to do this. The app gets created but no fields are created using the PodioApp::Create($spaceId,$app); Here is my code...

https://gist.github.com/anonymous/faf8939d3fc851253875

Is it possible that the "fields" property is ignored when creating an app and I have to create the fields 1 at a time using PodioAppFields::Create()?

Thanks!

Scott Costello Answered

Please sign in to leave a comment.

2 comments

0
Avatar

Hi Scott,

The fields-property should not be nested under config:

{
  "space_id": 123,
  "config": { ... },
  "fields": [ ... ]
}

Hope it helps :)

Best,
Andreas

Andreas Garnæs 0 votes
Comment actions Permalink
0
Avatar

Man! how did I not see that? I was staring at the documentation for hours yesterday. Thanks Andreas

Scott Costello 0 votes
Comment actions Permalink