Functional Principle - API Reference

Started by glompf
8054e2ff2b399d0208068e44699722cc?s=128&d=mm

glompf

I was able to use the API described under 5. API Reference.
But how can I use the commands described in 3. Functional Reference. Are this all PUT request to http://[ip]:16021/api/v1/[key]/???

9163947fc9f14ca9dfc3145e9d4a4440?s=128&d=mm

csuchland

Yes, PUT to set a value/state, GET to retrieve current value/state

8054e2ff2b399d0208068e44699722cc?s=128&d=mm

glompf

Thanks for your answer.
For example to rename an effect (3.2.9. Rename Effect)

To which endpoint do I have to put:

{
command: rename,
animName: My Flow Animation,
newName: My New Flow Animation
}

?

I'm always getting 400 Bad request answer.

9163947fc9f14ca9dfc3145e9d4a4440?s=128&d=mm

csuchland

PUT to /api/v1/auth_token/effects, with the body containing:

{write :
{
command: rename,
animName: My Flow Animation,
newName: My New Flow Animation
}
}

8054e2ff2b399d0208068e44699722cc?s=128&d=mm

glompf

Oh, many thanks for your help! I finally made it!

I did not know I had to start with { write: …

and I had to put everything into quotation marks: { "write": { "command": "rename"…

thx