This documentation describes NewReleases API v1 resources.
NewReleases can be used as a web service available on newreleases.io
address and some of functionalities are available over JSON API on api.newreleases.io
domain.
To use publicly available service, the endpoint is:
https://api.newreleases.io/v1
All API paths are prefixed with a version number, as part of the root endpoint.
This document describes only v1
version of the API, which is the first stable version.
Each HTTP request requires X-Key
header to be provided with an API key as a value, or as username or password in Basic Auth header. All GET requests in this API can be performed in browser by passing API key in either username or password field in browser authentication dialog.
API key is unique for every NewReleases user account and can be generated on a website under API keys Settings page. Every user account can have multiple keys. It is also filtered by IP subnets that user can specify on the same page.
If the token is missing or invalid, API will return an Unauthorized response.
Examples:
curl -H "X-Key: ewcppcsk781h1bwlxp0q3pe8gf7322dl8n52" \
https://api.newreleases.io/v1/projects
curl -u ewcppcsk781h1bwxp0q3pe8gf7322d8n52: \
https://api.newreleases.io/v1/projects
Auth endpoint /v1/auth/keys
additionally accepts Basic Auth header with user’s login credentials: email address and password.
Rate limiting is applied on every API request, in a way that GET
requests reduce the number of available requests per hour by 1
and all other requests by the value of 10
.
Additional HTTP response headers are returned with more information:
X-Ratelimit-Limit
: The maximum number of requests that the user is permitted to make per hour.
X-Ratelimit-Remaining
: The number of requests remaining in the current rate limit window.
X-Ratelimit-Reset
: Seconds remaining until current rate limit window reset to the maximal value.
Retry-After
: Seconds remaining until new requests are permitted when limit is reached.
If X-Ratelimit-Limit
header is absent, no limit is enforced.
When rate limit is reached, a Too Many Requests response will be returned.
NewReleases API uses HTTP for communication and this section describes HTTP requests, their parameters and responses from the API. Beside specified error responses for each query, the Internal Server Error may occur.
If resource URL path is not valid, a Not Found response will be returned.
In case that the request body can not be decoded from JSON, a Bad Request response will be returned. All POST requests must have Content-Type: application/json
header.
URL paths may contain parameters which are indicated with a variable name surrounded with curly brackets {}.
GET /v1/projects
Query parameters:
Response returns resource:
curl -H "X-Key: API_KEY" \
https://api.newreleases.io/v1/projects
{
"projects": [
{
"id": "pf4w494lbjsd3ydp5hnf4gsptw",
"name": "golang/go",
"provider": "github",
"url": "https://github.com/golang/go/releases",
"email_notification": "hourly",
"exclude_updated": true
}
],
"total_pages": 1
}
GET /v1/projects/{provider}
Query parameters:
If q parameter is provided for search, other parameters are ignored.
Response returns resource:
curl -H "X-Key: API_KEY" \
https://api.newreleases.io/v1/projects/github
{
"projects": [
{
"id": "pf4w494lbjsd3ydp5hnf4gsptw",
"name": "golang/go",
"provider": "github",
"url": "https://github.com/golang/go/releases",
"email_notification": "hourly",
"exclude_updated": true
}
],
"total_pages": 1
}
GET /v1/projects/search
Query parameters:
Response returns resource:
curl -H "X-Key: API_KEY" \
https://api.newreleases.io/v1/projects/search?q=go
{
"q": "go",
"projects": [
{
"id": "pf4w494lbjsd3ydp5hnf4gsptw",
"name": "golang/go",
"provider": "github",
"url": "https://github.com/golang/go/releases",
"email_notification": "hourly",
"exclude_updated": true
}
]
}
GET /v1/projects/{id}
URL parameters:
GET /v1/projects/{provider}/{projectName}
URL parameters:
Returns Project resource.
curl -H "X-Key: API_KEY" \
https://api.newreleases.io/v1/project/pf4w494lbjsd3ydp5hnf4gsptw
curl -H "X-Key: API_KEY" \
https://api.newreleases.io/v1/project/golang/go
{
"id": "pf4w494lbjsd3ydp5hnf4gsptw",
"name": "golang/go",
"provider": "github",
"url": "https://github.com/golang/go/releases",
"email_notification": "hourly",
"exclude_updated": true
}
POST /v1/projects
Request body properties:
Response returns Project resource.
curl -H "X-Key: API_KEY" \
-H "Content-Type: application/json" \
-d '{"provider":"github", "name": "golang/go"}' \
https://api.newreleases.io/v1/projects
{
"id": "pf4w494lbjsd3ydp5hnf4gsptw",
"name": "golang/go",
"provider": "github",
"url": "https://github.com/golang/go/releases",
"email_notification": "daily"
}
POST /v1/projects/{id}
URL parameters:
POST /v1/projects/{provider}/{projectName}
URL parameters:
Request body properties:
Response returns Project resource.
curl -H "X-Key: API_KEY" \
-H "Content-Type: application/json" \
-d '{"exclude_updated": true}' \
https://api.newreleases.io/v1/projects/pf4w494lbjsd3ydp5hnf4gsptw
curl -H "X-Key: API_KEY" \
-H "Content-Type: application/json" \
-d '{"exclude_updated": true}' \
https://api.newreleases.io/v1/projects/github/golang/go
{
"id": "pf4w494lbjsd3ydp5hnf4gsptw",
"name": "golang/go",
"provider": "github",
"url": "https://github.com/golang/go/releases",
"email_notification": "daily",
"exclude_updated": true
}
DELETE /v1/projects/{id}
URL parameters:
DELETE /v1/projects/{provider}/{projectName}
URL parameters:
Response returns OK.
curl -H "X-Key: API_KEY" \
-X DELETE \
https://api.newreleases.io/v1/projects/pf4w494lbjsd3ydp5hnf4gsptw
curl -H "X-Key: API_KEY" \
-X DELETE \
https://api.newreleases.io/v1/projects/github/golang/go
{
"message": "OK",
"code": 200
}
Query parameters:
GET /v1/projects/{id}/releases
URL parameters:
GET /v1/projects/{provider}/{projectName}/releases
URL parameters:
Response returns resource:
curl -H "X-Key: API_KEY" \
https://api.newreleases.io/v1/projects/8wdvh4w9bhsvzclz4ynaqpcpvg/releases
curl -H "X-Key: API_KEY" \
https://api.newreleases.io/v1/projects/github/nodejs/node/releases
{
"releases": [
{
"version": "v11.12.0",
"date": "2019-03-15T21:16:54Z",
"has_note": true
},
{
"version": "v11.11.0",
"date": "2019-03-06T19:44:17Z",
"has_note": true
},
{
"version": "v10.15.3",
"date": "2019-03-05T17:37:13Z",
"has_note": true
},
{
"version": "v6.17.0",
"date": "2019-02-28T11:23:55Z"
},
{
"version": "v8.15.1",
"date": "2019-02-28T11:20:35Z"
},
{
"version": "v10.15.2",
"date": "2019-02-28T11:17:15Z"
},
{
"version": "v11.10.1",
"date": "2019-02-28T11:03:34Z"
},
{
"version": "v11.10.0",
"date": "2019-02-14T23:03:07Z",
"has_note": true
},
{
"version": "v11.9.0",
"date": "2019-01-30T22:13:59Z",
"has_note": true
},
{
"version": "v11.8.0",
"date": "2019-01-29T20:38:32Z",
"has_note": true
}
],
"total_pages": 54
}
GET /v1/projects/{id}/releases/{version}
URL parameters:
GET /v1/projects/{provider}/{projectName}/releases/{version}
URL parameters:
Returns Release resource.
curl -H "X-Key: API_KEY" \
https://api.newreleases.io/v1/project/8wdvh4w9bhsvzclz4ynaqpcpvg/releases/v11.12.0
{
"version": "v11.12.0",
"date": "2019-03-15T21:16:54Z",
"has_note": true
}
GET /v1/projects/{id}/latest-release
URL parameters:
GET /v1/projects/{provider}/{projectName}/latest-release
URL parameters:
Returns Release resource.
curl -H "X-Key: API_KEY" \
https://api.newreleases.io/v1/project/8wdvh4w9bhsvzclz4ynaqpcpvg/latest-release
{
"version": "v11.12.0",
"date": "2019-03-15T21:16:54Z",
"has_note": true
}
GET /v1/projects/{id}/releases/{version}/note
URL parameters:
GET /v1/projects/{provider}/{projectName}/releases/{version}/note
URL parameters:
Returns Release Note resource.
curl -H "X-Key: API_KEY" \
https://api.newreleases.io/v1/project/8wdvh4w9bhsvzclz4ynaqpcpvg/releases/v11.12.0/note
curl -H "X-Key: API_KEY" \
https://api.newreleases.io/v1/project/github/nodejs/node/releases/v11.12.0/note
{
"title": "2019-03-15, Version 11.12.0 (Current), @BridgeAR",
"message": "<h3>Notable Changes</h3>\n\n<ul>\n<li>...",
"url": "https://github.com/nodejs/node/releases/tag/v11.12.0"
}
GET /v1/providers
Query parameters:
Response returns resource:
curl -H "X-Key: API_KEY" \
https://api.newreleases.io/v1/providers
{
"providers": [
"artifacthub",
"bitbucket",
"cargo",
"codeberg",
"cpan",
"debian-gitlab",
"dockerhub",
"ecr-public",
"exozyme",
"freedesktop-gitlab",
"gcr",
"gems",
"ghcr",
"gitea",
"github-npm",
"github",
"gitlab",
"gnome-gitlab",
"gnu-savannah",
"hex",
"kde-gitlab",
"maven",
"npm",
"packagist",
"pypi",
"quay",
"sourceforge",
"xfce-gitlab",
"yarn"
]
}
curl -H "X-Key: API_KEY" \
https://api.newreleases.io/v1/providers?added
{
"providers": [
"github",
"pypi"
]
}
GET /v1/slack-channels
Response returns resource:
curl -H "X-Key: API_KEY" \
https://api.newreleases.io/v1/slack-channels
{
"channels": [
{
"id": "00q3pe8gf7322d8n52bgrl551",
"channel": "releases",
"team_name": "My Slack Team"
}
]
}
GET /v1/telegram-chats
Response returns resource:
curl -H "X-Key: API_KEY" \
https://api.newreleases.io/v1/telegram-chats
{
"channels": [
{
"id": "51732818n52bgh1bwlpf2drl5",
"type": "group",
"name": "My Telegram Chat"
}
]
}
GET /v1/discord-channels
Response returns resource:
curl -H "X-Key: API_KEY" \
https://api.newreleases.io/v1/discord-channels
{
"channels": [
{
"id": "08n52bgrl550q3pe8gf7322d1",
"name": "My Discord"
}
]
}
GET /v1/hangouts-chat-webhooks
Response returns resource:
curl -H "X-Key: API_KEY" \
https://api.newreleases.io/v1/hangouts-chat-webhooks
{
"webhooks": [
{
"id": "ewcppcsk781h1bwlp0q3pe8gf7",
"name": "My Hangouts"
}
]
}
GET /v1/microsoft-teams-webhooks
Response returns resource:
curl -H "X-Key: API_KEY" \
https://api.newreleases.io/v1/microsoft-teams-webhooks
{
"webhooks": [
{
"id": "w1a56q4es0dvtl84tdst4ezma8",
"name": "My Team"
}
]
}
GET /v1/mattermost-webhooks
Response returns resource:
curl -H "X-Key: API_KEY" \
https://api.newreleases.io/v1/mattermost-webhooks
{
"webhooks": [
{
"id": "4t0dvtl8dst4ezma8w1a56q4es",
"name": "My Channel"
}
]
}
GET /v1/rocketchat-webhooks
Response returns resource:
curl -H "X-Key: API_KEY" \
https://api.newreleases.io/v1/rocketchat-webhooks
{
"webhooks": [
{
"id": "0dzm56q4a8wvtesl8dst4e1a4t",
"name": "My Chat"
}
]
}
GET /v1/matrix-rooms
Response returns resource:
curl -H "X-Key: API_KEY" \
https://api.newreleases.io/v1/matrix-rooms
{
"webhooks": [
{
"id": "56q4zma8w4dvtle4t08dstes1a",
"name": "My Room",
"homeserver_url": "https://matrix-client.matrix.org",
"internal_room_id": "!CklwygGihbIcsulFYK:matrix.org"
}
]
}
GET /v1/webhooks
Response returns resource:
curl -H "X-Key: API_KEY" \
https://api.newreleases.io/v1/webhooks
{
"webhooks": [
{
"id": "aw680q7n6vv2s75snp2lpr006m",
"name": "My Webhook"
}
]
}
GET /v1/tags
Response returns resource:
curl -H "X-Key: API_KEY" \
https://api.newreleases.io/v1/tags
{
"tags": [
{
"id": "cf35e5b69d74",
"name": "Go"
},
{
"id": "d74f35ce69b5",
"name": "Python"
}
]
}
POST /v1/tags
Request body properties:
Response returns Tag.
curl -H "X-Key: API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "Go"}' \
https://api.newreleases.io/v1/tags
{
"id": "cf35e5b69d74",
"name": "Go"
}
GET /v1/tags/{id}
URL parameters:
Response returns Tag.
curl -H "X-Key: API_KEY" \
https://api.newreleases.io/v1/tags/cf35e5b69d74
{
"id": "cf35e5b69d74",
"name": "Go"
}
POST /v1/tags/{id}
URL parameters:
Request body properties:
Response returns Tag.
curl -H "X-Key: API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "Golang"}' \
https://api.newreleases.io/v1/tags/cf35e5b69d74
{
"id": "cf35e5b69d74",
"name": "Golang"
}
DELETE /v1/tags/{id}
URL parameters:
Response returns OK.
GET /v1/auth/keys
Response returns resource:
Only Basic Auth headers with user’s login credentials (email address and password) are accepted for authentication.
curl -u "you@example.com:password" \
https://api.newreleases.io/v1/auth/keys
{
"keys": [
{
"name": "My Key",
"secret": "ewcppcsk781h1bwxplq3pe8gf7322d8n52bg",
"authorized_networks": [
"::/0",
"0.0.0.0/0"
]
}
]
}
Request and response HTTP bodies are JSON-encoded as JSON objects. In this section, resources that represent data that NewRelease is managing are described as properties of JSON objects with their types and default values where properties may be omitted in the response.
Properties:
Available providers are:
Properties:
Properties:
Properties:
Properties:
Properties:
Properties:
Properties:
Properties:
Properties:
Properties:
API utilizes HTTP Status codes as well as specific codes for more granular error reporting.
Message responses have the following example of JSON-encoded body:
{
"message": "OK",
"code": 200
}
Bad Request response contains additional field describing specific errors:
{
"message": "Bad Request",
"code": 400,
"errors": [
"Project name is required."
]
}