Can I call Private Stackscripts using the API?

Hello!

Is it possible for users to use the api to call my private stackscript if I grant access through oauth2?

1 Reply

Hey there! Yes, it is indeed possible. Under the StackScripts portion of our APIv4 documentation, there is a note that states:

If the request is not authenticated, only public StackScripts are returned.

Accordingly, authenticating your request with your OAuth or APIv4 token will also return private StackScripts. You can then include an X-Filter header to only return private StackScripts and proceed from there. Here's an example call that will only return your private StackScripts:

curl "https://api.linode.com/v4/linode/stackscripts" \
    -H "Authorization: Bearer $TOKEN" \
    -H 'X-Filter: {"is_public": false}'

Note: I've edited the title of this post and added some tags to make it easier to find for others.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct