Create buckets via GraphQL API
andrewclu
PROOP

2 months ago

Is there a way to create storage buckets via the GraphQL API? I can't seem to find it in docs

Under Review

0 Threads mention this feature

5 Replies

Railway
BOT

2 months ago

Hey there! We've found the following might help you get unblocked faster:

If you find the answer from one of these, please let us know by solving the thread!


mattijsdp
PRO

2 months ago

Likewise even though they say "The Railway public API is built with GraphQL and is the same API that powers the Railway dashboard.". By inspecting the requests that are made when I click through the UI I can see that there is a mutation bucketCreate though.


timomeh
EMPLOYEE

2 months ago

I'll add the bucketCreate mutation to the public API schema, there's no reason anymore for it to be internal only. However, this mutation does not provision an actual bucket with credentials in an environment. The actual provisioning of a bucket instance in an environment is only supported with Environment Patches (the environmentStageChanges, environmentPatchCommit , environmentPatchCommitStaged mutations).


andrewclu
PROOP

2 months ago

Got it. Is there any way to get the values of the environment variables for a given bucket via the public API? The environment query doesn't seem to provide bucket environment variables, even in the decrypted EnvironmentConfig. There does seem to be a bucketS3Credentials internal endpoint that is not in the public API.


andrewclu

Got it. Is there any way to get the values of the environment variables for a given bucket via the public API? The environment query doesn't seem to provide bucket environment variables, even in the decrypted EnvironmentConfig. There does seem to be a bucketS3Credentials internal endpoint that is not in the public API.

timomeh
EMPLOYEE

2 months ago

The bucketS3Credentials query is now not internal anymore, so you can use it to programmatically get the credentials.


Loading...