Packages


Get a list of packages

GET /packages

Response

1
2
3
4
[{ "id":1, "name":"vendor\/first", "description":"Package description 1", "status":1, "created<em>at":"2018-01-01 00:00:00", 
"updated</em>at":"2018-01-01 00:00:00" }, { "id":2, "name":"vendor\/second", "description":"Package description 2", "status":0, 
"created<em>at":"2018-01-01 00:00:00", "updated</em>at":"2018-01-01 00:00:00" }], 
response code 200 (400, 401 in case of errors)

Get a specific package

GET /packages/{id}

Parameters

Name Located in Description Type
id path The id of a package int

Response

1
2
3
{ "id":1, "name":"vendor\/name", "description":"Package description", "status":1, "created<em>at":"2018-01-01 00:00:00", 
"updated</em>at":"2018-01-01 00:00:00" }, 
response code 200 (400, 401 in case of errors)

Create a package

POST /packages

Parameters

Name Located in Description Type
request request {“name”,”description”,”status”} \Request

Response

1
2
3
{ "id":1, "name":"vendor\/name", "description":"Package description", "status":1, "created<em>at":"2018-01-01 00:00:00", 
"updated</em>at":"2018-01-01 00:00:00" }, 
response code 201 (400, 401 in case of errors)

Update a package

PUT /packages/{id}

Parameters

Name Located in Description Type
request request {“name”,”description”,”status”} \Request
id path The id of a package

Response

1
2
3
{ "id":1, "name":"vendor\/name", "description":"Package description", "status":1, "created<em>at":"2018-01-01 00:00:00", 
"updated</em>at":"2018-01-01 00:00:00" }, 
response code 201 (400, 401 in case of errors)

Update a package

PATCH /packages/{id}

Parameters

Name Located in Description Type
request request {“name”,”description”,”status”} \Request
id path The id of a package

Response

1
2
3
{ "id":1, "name":"vendor\/name", "description":"Package description", "status":1, "created<em>at":"2018-01-01 00:00:00", 
"updated</em>at":"2018-01-01 00:00:00" }, 
response code 201 (400, 401 in case of errors)

Delete a package

DELETE /packages/{id}

Parameters

Name Located in Description Type
id path The id of a package

Response

No content, response code 204 (400, 401 in case of errors)

Versions


Get a list of versions for a specified package

GET /versions/package/{id}

Parameters

Name Located in Description Type
id path The id of a package int

Response

1
2
3
4
[{ "id":1, "package<em>id":3, "name":"8.7.2", "filename":"438411134.zip", "status":1, "created</em>at":"2018-01-01 00:00:00", 
"updated<em>at":"2018-01-01 00:00:00" }, { "id":2, "package</em>id":4, "name":"4.0.9", "filename":"481047020.zip", "status":0, 
"created<em>at":"2018-01-01 00:00:00", "updated</em>at":"2018-01-01 00:00:00" }], 
response code 200 (400, 401 in case of errors)

Create a version

POST /versions/package/{id}

Parameters

Name Located in Description Type
request request {“name”,”filename”,”status”} \Request
id path The id of a package int

Response

1
2
3
{ "id":1, "name":"8.7.2", "filename":"438411134.zip", "status":1, "package<em>id":2, "updated</em>at":"2018-01-01 00:00:00", 
"created_at":"2018-01-01 00:00:00" }, 
response code 201 (400, 401 in case of errors)

Get a specific version

GET /versions/{id}

Parameters

Name Located in Description Type
id path The id of a version int

Response

1
2
3
{ "id":1, "package<em>id":2, "name":"8.7.2", "filename":"438411134.zip", "status":1, "created</em>at":"2018-01-01 00:00:00", 
"updated_at":"2018-01-01 00:00:00" }, 
response code 200 (400, 401 in case of errors)

Update a version

PUT /versions/{id}

Parameters

Name Located in Description Type
request request {“name”,”filename”,”status”} \Request
id path The id of a version int

Response

1
2
3
{ "id":1, "name":"8.7.2", "filename":"438411134.zip", "status":1, "package<em>id":2, "updated</em>at":"2018-01-01 00:00:00", 
"created_at":"2018-01-01 00:00:00" }, 
response code 200 (400, 401 in case of errors)

Update a version

PATCH /versions/{id}

Parameters

Name Located in Description Type
request request {“name”,”filename”,”status”} \Request
id path The id of a version int

Response

1
2
3
{ "id":1, "name":"8.7.2", "filename":"438411134.zip", "status":1, "package<em>id":2, "updated</em>at":"2018-01-01 00:00:00", 
"created_at":"2018-01-01 00:00:00" }, 
response code 200 (400, 401 in case of errors)

Delete a version

DELETE /versions/{id}

Parameters

Name Located in Description Type
id path The id of a version int

Response

No content, response code 204 (400, 401 in case of errors)

Consumers


Get a list of consumers

GET /consumers

Response

1
2
3
4
5
6
7
[{ "id":1, "email":"one@example.com", "public<em>key":"zPMmf9HhaOPwuGsFMMSC2adhEa3uifRatarQv49UgDai3LzJr1RYyPWfjuKl", 
"private</em>key":"XzVTo8rLAvOffhh1Y3LQ8JFTIA1ds2TkEQzbsZZQ2A7bCNpgm8i7y4I59ofO", "created<em>at":"2018-01-01 00:00:00", 
"updated</em>at":"2018-01-01 00:00:00" }, { "id":2, "email":"two@example.com", 
"public<em>key":"32zR5vDE3NNvAgvIwvjwNEdm3Mb9ZnKXDaoAxHJNWPTGsXWmsGJXCaVGUecW", 
"private</em>key":"PBbgqInrtHtMSxEQLsxobgs4ya0d0TUTBBx7dKU4LWLy9hCGTqGYUcP3O1Rd", 
"created<em>at":"2018-01-01 00:00:00", "updated</em>at":"2018-01-01 00:00:00" }], 
response code 200 (400, 401 in case of errors)

Get a list of consumers filtered by an email

GET /consumers/email/{email}

Parameters

Name Located in Description Type
email path The email of a consumer string

Response

1
2
3
4
5
6
7
[{ "id":1, "email":"one@example.com", "public<em>key":"zPMmf9HhaOPwuGsFMMSC2adhEa3uifRatarQv49UgDai3LzJr1RYyPWfjuKl", 
"private</em>key":"XzVTo8rLAvOffhh1Y3LQ8JFTIA1ds2TkEQzbsZZQ2A7bCNpgm8i7y4I59ofO", 
"created<em>at":"2018-01-01 00:00:00", "updated</em>at":"2018-01-01 00:00:00" }, 
{ "id":2, "email":"one@example.com", "public<em>key":"32zR5vDE3NNvAgvIwvjwNEdm3Mb9ZnKXDaoAxHJNWPTGsXWmsGJXCaVGUecW", 
"private</em>key":"PBbgqInrtHtMSxEQLsxobgs4ya0d0TUTBBx7dKU4LWLy9hCGTqGYUcP3O1Rd", 
"created<em>at":"2018-01-01 00:00:00", "updated</em>at":"2018-01-01 00:00:00" }], 
response code 200 (400, 401 in case of errors)

Get a specific consumer

GET /consumers/{id}

Parameters

Name Located in Description Type
id path The id of a consumer

Response

1
2
3
4
{ "id":1, "email":"one@example.com", "public<em>key":"zPMmf9HhaOPwuGsFMMSC2adhEa3uifRatarQv49UgDai3LzJr1RYyPWfjuKl", 
"private</em>key":"XzVTo8rLAvOffhh1Y3LQ8JFTIA1ds2TkEQzbsZZQ2A7bCNpgm8i7y4I59ofO", "created<em>at":"2018-01-01 00:00:00", 
"updated</em>at":"2018-01-01 00:00:00" }, 
response code 200 (400, 401 in case of errors)

Create a consumer

POST /consumers

Parameters

Name Located in Description Type
request request {“email”,”publickey”,”privatekey”} \Request

Response

1
2
3
4
{ "id":1 "email":"one@example.com", "public<em>key":"zPMmf9HhaOPwuGsFMMSC2adhEa3uifRatarQv49UgDai3LzJr1RYyPWfju12", 
"private</em>key":"XzVTo8rLAvOffhh1Y3LQ8JFTIA1ds2TkEQzbsZZQ2A7bCNpgm8i7y4I59ofO", "updated<em>at":"2018-01-01 00:00:00", 
"created</em>at":"2018-01-01 00:00:00", }, 
response code 201 (400, 401 in case of errors)

Update a consumer

PUT /consumers/{id}

Parameters

Name Located in Description Type
request request {“email”,”publickey”,”privatekey”} \Request
id path The id of a consumer int

Response

1
2
3
4
{ "id":1 "email":"one@example.com", "public<em>key":"zPMmf9HhaOPwuGsFMMSC2adhEa3uifRatarQv49UgDai3LzJr1RYyPWfju12", 
"private</em>key":"XzVTo8rLAvOffhh1Y3LQ8JFTIA1ds2TkEQzbsZZQ2A7bCNpgm8i7y4I59ofO", "updated<em>at":"2018-01-01 00:00:00", 
"created</em>at":"2018-01-01 00:00:00", }, 
response code 200 (400, 401 in case of errors)

Update a consumer

PATCH /consumers/{id}

Parameters

Name Located in Description Type
request request {“email”,”publickey”,”privatekey”} \Request
id path The id of a consumer int

Response

1
2
3
4
{ "id":1 "email":"one@example.com", "public<em>key":"zPMmf9HhaOPwuGsFMMSC2adhEa3uifRatarQv49UgDai3LzJr1RYyPWfju12", 
"private</em>key":"XzVTo8rLAvOffhh1Y3LQ8JFTIA1ds2TkEQzbsZZQ2A7bCNpgm8i7y4I59ofO", "updated<em>at":"2018-01-01 00:00:00", 
"created</em>at":"2018-01-01 00:00:00", }, 
response code 200 (400, 401 in case of errors)

Delete a consumer

DELETE /consumers/{id}

Parameters

Name Located in Description Type
id path The id of a consumer int

Response

No content, response code 204 (400, 401 in case of errors)


Get a list of packages for a specified consumer

GET /consumers/{id}/packages

Parameters

Name Located in Description Type
id path The id of a consumer int

Response

1
2
3
4
[{ "id":1, "name":"vendor\/first", "description":"Package description 1", "status":1, "created<em>at":"2018-01-01 00:00:00", 
"updated</em>at":"2018-01-01 00:00:00" }, { "id":2, "name":"vendor\/second", "description":"Package description 2", "status":0, 
"created<em>at":"2018-01-01 00:00:00", "updated</em>at":"2018-01-01 00:00:00" }], 
response code 200 (400, 401 in case of errors)

Get a list of a permissions for a specified consumer and package

GET /consumers/{consumerId}/packages/{packageId}

Parameters

Name Located in Description Type
consumerId path The id of a consumer int
packageId path The id of a package int

Response

1
2
3
4
[{ "id":5, "consumer<em>id":1, "package</em>id":2, "version":"5.<em>", "createdat":"2018-01-01 00:00:00", 
"updatedat":"2018-01-01 00:00:00" }, { "id":6, "consumerid":1, "packageid":2, "version":"4.</em>", 
"created<em>at":"2018-01-01 00:00:00", "updated</em>at":"2018-01-01 00:00:00" }], 
response code 200 (400, 401 in case of errors)

Permissions


Get a list of a permissions for a specified consumer and package

GET /permissions/consumer/{consumerId}/package/{packageId}

Parameters

Name Located in Description Type
consumerId path The id of a consumer int
packageId path The id of a package int

Response

1
2
3
4
[{ "id":5, "consumer<em>id":1, "package</em>id":2, "version":"5.<em>", "createdat":"2018-01-01 00:00:00", 
"updatedat":"2018-01-01 00:00:00" }, { "id":6, "consumerid":1, "packageid":2, "version":"4.</em>", 
"created<em>at":"2018-01-01 00:00:00", "updated</em>at":"2018-01-01 00:00:00" }], 
response code 200 (400, 401 in case of errors)

Get a specific permission

GET /permissions/{id}

Parameters

Name Located in Description Type
id path The id of a permission int

Response

1
2
3
{ "id":6, "consumer<em>id":1, "package</em>id":2, "version":"4.*", "created<em>at":"2018-01-01 00:00:00", 
"updated</em>at":"2018-01-01 00:00:00" }, 
response code 200 (400, 401 in case of errors)

Create a permission for a specific customer and package

POST /permissions

Parameters

Name Located in Description Type
request request {“consumerid”,”packageid”,”version”} \Request

Response

1
2
3
{ "id":7, "consumer<em>id":1, "package</em>id":2, "version":"9.*", "updated<em>at":"2018-01-01 00:00:00", 
"created</em>at":"2018-01-01 00:00:00" }, 
response code 201 (400, 401 in case of errors)

Update a specific permission

PUT /permissions/{id}

Parameters

Name Located in Description Type
request request {“consumerid”,”packageid”,”version”} \Request
id path The id of a permission int

Response

1
2
3
{ "id":7, "consumer<em>id":`, "package</em>id":1, "version":"8.*", "created<em>at":"2018-01-01 00:00:00", 
"updated</em>at":"2018-01-01 00:00:00" }, 
response code 200 (400, 401 in case of errors)

Update a specific permission

PATCH /permissions/{id}

Parameters

Name Located in Description Type
request request {“consumerid”,”packageid”,”version”} \Request
id path The id of a permission int

Response

1
2
3
{ "id":7, "consumer<em>id":`, "package</em>id":1, "version":"8.*", "created<em>at":"2018-01-01 00:00:00", 
"updated</em>at":"2018-01-01 00:00:00" }, 
response code 200 (400, 401 in case of errors)

Delete a specific permission

DELETE /permissions/{id}

Parameters

Name Located in Description Type
id path The id of a permission int

Response

No content, response code 204 (400, 401 in case of errors)