Call OCtopus API

Hello,

I try to call API validate manually step with my code C# :

but I have this problem :

Thanks

Hi @yassine.kerkeni,

Thanks for reaching out.

Without seeing the rest of the code the only thing that jumps out at me is that you need to supply the {id} of the interruption you want to GET/POST in the var responsable and var validate line. They have a format such as “Interruptions-23”.

Are you supplying those API calls with an id in another way?

Thanks,
Jeremy

Hello,
I have problem with y request body I don’t know how to write it with C#

Hello @jeremy.miller,

It’s working now :slight_smile

1 Like

Hi @yassine.kerkeni,

I’m glad to hear you got it working.

We have a repository of C# scripts that may be helpful to look at for examples. It’s not as fleshed out as our PowerShell examples, but there’s some good stuff in there. I’ve linked the PowerShell examples as well since you should be able to translate the logic to C# syntax.
C# Example Repo
PowerShell Repo 1
PowerShell Repo 2

Have a great rest of your week. Please feel free to reach out with any other questions.

Thanks,
Jeremy

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.