App Catalog API

What you will find here

This is a documentation page about PatchKit App Catalog API (Version 1).

What is App Catalog?

App Catalog is a library (Catalog) of applications or games from which users can browse.

Applications on PatchKit are non-public by default. To share an application, you need to share the app’s launcher or its download link. Instead of doing that, you can publish your application on App Catalog, along with things like long app description, news, screenshots, or even videos.

App Catalog is entirely accessible through a REST API.

Requests

You should make all requests to https://app-catalog.patchkit.net/v1/ endpoint.

Most requests can be passed either as application/form-data or application/json. File uploads require to be application/multipart. Most REST libraries should handle those formats automatically, depending on what you’re trying to pass as parameters.

Responses

App Catalog API uses JSON format in all responses. Entity IDs are UUID strings.

Response status codes

Code Status Description
200 OK Generic success response. Usually renders resource in the response body.
201 Created Indicates that the resource has been created successfully. Usually renders that resource in the response body.
204 No Content Indicates success but states that nothing will be rendered in the response body.
400 Bad Request Returned when something is not right with the parameters. Inspect the response body to find a human-readable error message.
401 Unauthorized Indicates that this resource requires authentication, but the request lacks valid authentication credentials.
403 Forbidden Returned when the current user does not have the required access to this resource.
404 Not Found It means that the resource does not exist or is not known in the given context.
500 Internal Server Error If even received, you should try making this request again. You should report repeated failures to PatchKit Support team.

Authentication

Anyone can read App Catalog API without a need for authentication. Some entities could not be visible for a non-authenticated user (e.g., apps with visibility=hidden).

Each Catalog has a unique Owner API Key assigned to it. Currently, the only way to retrieve it is to contact the support. This will change in the future.

You can pass your Owner API Key by X-Api-Key header, like this:

GET /resource HTTP/1.1
X-Api-Key: 52293bd82f5cbd049cf398c3f52547aa

Examples

Creating a new catalog

Currently, you can not create a new catalog using the API. You can create the Catalog only from the web browser. When done, write down your Catalog ID (UUID). You will use it across all the requests to App Catalog API.

Creating a new application

Applications on the app catalog are a little different than applications on the PatchKit panel. The main difference is that you don’t have to specify the platform. Instead, you choose what platforms are supported after creating the application.

curl -d "name=my_new_app" -H "X-Api-Key: APIKEY" -X POST https://app-catalog.patchkit.net/v1/catalogs/CATALOG_ID/apps/

As a response, you will receive a JSON. Make sure to assign your new application id to use it later:

{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "visibility": "hidden"
  ...
}

Your newly created application is, by default, hidden. It does not have any PatchKit application assigned to it - this means that App Catalog does not know what binary should be delivered to the user when somebody requests a download.

Assigning PatchKit application

Assigning a PatchKit application to App Catalog’s application entity makes it possible to download the application for a particular platform. This operation will reveal the app’s secret to the requester.

Take note that the application secret is, in most cases, the only required thing to download the application, but this default behavior can be changed. Contact the support to learn what are the possibilities on your account.

curl -d "platform=windows_x86_64&secret=APP_SECRET" -H "X-Api-Key: APIKEY" -X POST https://app-catalog.patchkit.net/v1/catalogs/CATALOG_ID/apps/APP_ID/patchkit_apps

Available platforms are:

  • windows_x86
  • windows_x86_64
  • linux_x86
  • linux_x86_64
  • osx_x86_64

Assigning an application has an immediate effect.

API Specification (OpenAPI)

You can read the full specification here.

Did this page help you? If you have any questions, please use the chatbox on the bottom-right or use our contact form.

Copyright © 2015 - 2022 Upsoft
All Rights Reserved.