New PHP-Prefixer REST API

Do you want to script PHP-Prefixer operations into your development pipeline easily? Do you want to integrate GitHub Actions, Bitbucket Pipelines or GitLab CI to prefix PHP?

New PHP-Prefixer REST API -
The REST API allows simple access from the Web Service interface.

I assume you are answering yes to both those questions. The REST API allows simple access from the Web Service interface to most of the functionality available on our site.

The PHP-Prefixer API allows you to create and interact with projects and builds on PHP-Prefixer through a simple REST API.

Here are some snippets for some everyday operations:

# Create Project
POST /api/v1/projects

  "name": "My Project",
  "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
  "source_type": "project_file"
# Create Build
POST /api/v1/projects/{projectId}/builds

Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
Accept: application/json, text/plain, */*
Authorization: Bearer {{PERSONAL_ACCESS_TOKEN}}

Content-Disposition: form-data; name="uploaded_source_file"; filename=""
Content-Type: application/x-zip

< /home/user/.../
# Download Build
GET /api/v1/projects/{projectId}/builds/{buildId}/download

HTTP/1.1 200 OK
Content-Disposition: attachment;
Content-Type: application/x-zip

It’s quick and easy to get a project up and running. The PHP-Prefixer API supports the same use cases that can be found in our guides. You can find the complete API reference in the API Documentation.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.