• Overview
    Key features
    • Observability
    • Auto-scaling
    • Multiframework
    • Security
    Frameworks
    • Django
    • Next.js
    • Drupal
    • WordPress
    • Symfony
    • Magento
    • See all frameworks
    Languages
    • PHP
    • Python
    • Node.js
    • Ruby
    • Java
    • Go
  • Industries
    • Consumer Goods
    • Media/Entertainment
    • Higher Education
    • Government
    • Ecommerce
  • Pricing
  • Featured articles
    • Switching to Platform.sh can help IT/DevOps organizations drive 219% ROI
    • Organizations, the ultimate way to manage your users and projects
  • Support
  • Docs
  • Login
  • Request a demo
  • Free Trial
Meet Upsun. The new, self-service, fully managed PaaS, powered by Platform.sh.Try it now
Blog
Look ma! No hands!

New API docs help you automate workflows

apinewfeature
10 July, 2019
Nick Anderegg
Nick Anderegg
Developer Relations Engineer

Look ma! No hands!

Although our main API is Git itself, Platform.sh has a powerful RESTful API that enables you to manage nearly every aspect of your account and the projects you host with us.

Today, we’re happy to announce that we’re launching a new documentation site that details our entire RESTful API, so you can use it to build robust development and management workflows, as well as integrations with your CI systems and internal services.

You can check out these docs right now.

What can I do with the API?

Everything! If you're already a Platform.sh customer, you’re likely accustomed to interacting with your projects through our management console or our CLI tool. With our API, you can automate all of those interactions! You can create a new project to run your app, and manage snapshots of your production and development environments. Or integrate your project with third-party services, like Git repositories, health notification services, and webhooks.

How you actually use this API is totally up to you. From a simple action—like adding new domains to a project—to a complex task—like automating the process of creating and configuring new projects for each of your clients' applications—there’s virtually no limit to what you can build.

How do I get started?

Because this is a REST API, all you need to get started is an API token. Once you have that, you can start making calls directly, or you can check out one of our libraries on GitHub that make it easier to access the API, such as our PHP API client or our JavaScript API client.

If you already have an account with us, you can visit your accounts-setting page to generate a new API token.

Your API token can be exchanged for an access token with a POST request from your tool of choice. Here's an example using cURL:

curl -X POST \
   https://auth.api.platform.sh/oauth2/token \
  -H 'Content-Type: application/json' \
  -d '{
         "client_id": "platform-api-user",
         "grant_type": "api_token",
         "api_token": "YOUR_API_TOKEN"
  }'

The response to your request will include an access token you can use to authenticate subsequent API requests.

{
  "access_token": "abcdefghij1234567890",
  "expires_in": 3600,
  "token_type": "Bearer",
  "scope": "account"
}

If you don’t already have an account on Platform.sh, and you want to see what our API can do, we have a free trial available, so you can start building right now!

Get the latest Platform.sh news and resources
Subscribe

Related Content

How software company security priorities are changing

How software company security priorities are changing

Company
AboutSecurity and complianceTrust CenterCareersPressContact us
Thank you for subscribing!
  •  
Field required
Leader Winter 2023
System StatusPrivacyTerms of ServiceImpressumWCAG ComplianceAcceptable Use PolicyManage your cookie preferencesReport a security issue
© 2024 Platform.sh. All rights reserved.
Supported by Horizon 2020's SME Instrument - European Commission 🇪🇺