NavigationContentFooter
Jump toSuggest an edit

Scaleway JS software development kit (SDK)

Reviewed on 27 November 2024Published on 14 November 2023

The Scaleway JS SDK is a dynamic tool for developers who use JavaScript to interact with Scaleway’s cloud services. It makes complex tasks like managing servers, handling storage operations, and setting up networking more manageable by automating intricate API calls and the authentication process. This SDK is instrumental for integrating or programmatically managing Scaleway’s cloud resources.

Important

The SDK is designed to function in a Node.js environment. Browser-based requests are not supported due to CORS restrictions.

Installing the JS SDK

To use the SDK, you need an access key and a secret key for the Scaleway API. Refer to Scaleway’s documentation on API keys for instructions on creating and retrieving these keys.

Below is a basic setup example:

import { Registry, createClient } from '@scaleway/sdk'
const client = createClient({
accessKey: 'SCWXXXXXXXXXXXXXXXXX',
secretKey: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
defaultProjectId: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
defaultRegion: 'fr-par',
defaultZone: 'fr-par-1',
})
const api = new Registry.v1.API(client)

Using the SDK

The SDK is written in TypeScript, offering the full benefits of this language.

  • For any product, its types are available under Product.version. For example, access the Image interface of Registry v1 using Registry.v1.Image.

  • Scaleway also provides exports of errors under the Errors namespace, which helps differentiate various error cases, like Errors.PermissionsDeniedError.

Contributing

This project is in the early stages of development and is actively evolving. If you are interested in contributing, join us at #opensource in Scaleway’s Slack community for discussions.

Further resources

  • SDK reference documentation
  • SDK example projects
  • Developers website (API documentation)
Was this page helpful?
API DocsScaleway consoleDedibox consoleScaleway LearningScaleway.comPricingBlogCareers
© 2023-2024 – Scaleway