Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Vercel Storage #127

Open
omercnet opened this issue Aug 9, 2023 · 10 comments
Open

Add support for Vercel Storage #127

omercnet opened this issue Aug 9, 2023 · 10 comments

Comments

@omercnet
Copy link
Contributor

omercnet commented Aug 9, 2023

any plans to support storage resources?

@dglsparsons
Copy link
Collaborator

Hey @omercnet - great question. I've just reached out to the storage team, so I'll get back to you with what they say. Is there anything in particular you're looking for? (e.g. creating and managing KV/Postgres stores?)

@dglsparsons dglsparsons changed the title support storage Add support for Vercel Storage Aug 10, 2023
@omercnet
Copy link
Contributor Author

Creating and attaching to projects would be great for start

@amaralc
Copy link

amaralc commented Sep 7, 2023

That would be great indeed! Creating and managing Postgres through Vercel provider would be awesome!

@omercnet
Copy link
Contributor Author

@dglsparsons this is becoming a show stopper for us, if this isn't planned soon I might take a stab at it

@dglsparsons
Copy link
Collaborator

Sorry, I've been busy so I haven't had much time to look at adding features here. Nothing is immediately planned for this.

@ryneal
Copy link

ryneal commented Sep 22, 2023

+1 for this!

@ryneal
Copy link

ryneal commented Sep 22, 2023

I believe storage management is not included in the Vercel REST API yet

https://vercel.com/docs/rest-api/endpoints

@voidarg
Copy link

voidarg commented Mar 5, 2024

+1

1 similar comment
@aviadpriel
Copy link

+1

@versecafe
Copy link

@dglsparsons The API does exist there's just no docs on it check out

https://vercel.com/api/v1/storage/stores/redis?teamId=team_censoringthis

Note deletions are at

https://vercel.com/api/v1/storage/stores/postgres/[store ID]?teamId=team_censoringthis

interface POST {
  name: string; // name of the redis instance
  eviction: boolean; // remove entries when running out of space
  primaryRegion: string; // AWS region names such as "us-east-1"
  readRegions: []; // Edge config region names such as "spo1"
}

interface DELETE {}

interface Response {
  store: {
    id: string; // "store_randomizedCode"
    ownerId: string; // ""team_theAssociatedTeamID"
    createdAt: 1719214759850; // timestamp
    updatedAt: 1719214759850; // timestamp
    type: string; // type of store "redis"
    name: string; // name of the redis instance
    billingState: string; // "active"
    projectsMetadata: [];
    usageQuotaExceeded: false;
    primaryRegion: string; // AWS region names such as "us-east-1"
    readRegions: [];
    endpoint: string; // upstash endpoint such as "store_randomizedCode.upstash.io"
    port: number; // defaults to 6379
    eviction: boolean; // remove entries when running out of space
    status: string; // "available"
  };
}

For Vercel Postgres

https://vercel.com/api/v1/storage/stores/postgres?teamId=team_censoringthis

Note deletions are at

https://vercel.com/api/v1/storage/stores/postgres/[store ID]?teamId=team_censoringthis

interface POST {
  name: string; // name of the postgres instance
  region: string; // Region names prefixed with provider such as "aws-us-east-1"
}

interface DELETE {}

interface Response {
  store: {
    id: string; // "store_randomizedCode"
    ownerId: string; // ""team_theAssociatedTeamID"
    createdAt: 1719215496250; // timestamp
    updatedAt: 1719215496250; // timestamp
    type: "postgres"; // type of store "postgres"
    name: string; // name of the postgres instance
    billingState: string; // "active" or "inactive"
    projectsMetadata: [];
    usageQuotaExceeded: boolean; // true or false based off of usage
    computeUnitsMax: number; // maximum compute units vCPUs default 0.25
    computeUnitsMin: number; // minimum compute units vCPUs default 0.25
    suspendTimeoutSeconds: number; // timeout in seconds before suspending the instance default 300
    usage: {
      storage: {
        value: number; // storage value in bytes default 0
        limit: number; // storage limit in bytes default 214748364800
      };
      resetDate: string; // date string for reset example "2024-07-01T00:00:00Z"
    };
    connection: {
      region: string; // Region names prefixed with provider such as ""aws-us-east-1"
      database: string; // should always be "verceldb"
      host: string; // neon endpoint such as "store_randomizedCode.us-east-1.aws.neon.tech"
    };
    status: string; // "available"
  };
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants