Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
Code samples
# You can also use wget
curl -X GET /ping
GET /ping
service health check
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | returns pong message | None |
Code samples
# You can also use wget
curl -X POST /v1/namespaces/{namespace}/descriptors \
-H 'Content-Type: multipart/form-data'
POST /v1/namespaces/{namespace}/descriptors
upload descriptors
Body parameter
name: string
version: string
latest: true
dryrun: true
skiprules:
- FILE_NO_BREAKING_CHANGE
file: string
Name | In | Type | Required | Description |
---|---|---|---|---|
namespace | path | string | true | none |
body | body | object | true | none |
» name | body | string | true | none |
» version | body | string | true | version number for descriptor file. This should follow semantic version compatability |
» latest | body | boolean | false | mark this descriptor file as latest |
» dryrun | body | boolean | false | flag for dryRun |
» skiprules | body | [string] | false | list of rules to skip |
» file | body | string(binary) | true | descriptorset file to upload |
Parameter | Value |
---|---|
» skiprules | FILE_NO_BREAKING_CHANGE |
» skiprules | MESSAGE_NO_DELETE |
» skiprules | FIELD_NO_BREAKING_CHANGE |
» skiprules | ENUM_NO_BREAKING_CHANGE |
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Success response if operation succeded | None |
400 | Bad Request | Validation error response when user payload has missing required fields or currently being uploaded file is not backward compatible with previously uploaded file | None |
409 | Conflict | conflict error reponse if namespace, name and version combination already present | None |
500 | Internal Server Error | Unexpected internal error reponse | None |
Code samples
# You can also use wget
curl -X GET /v1/namespaces/{namespace}/descriptors/{name}/versions/{version}
GET /v1/namespaces/{namespace}/descriptors/{name}/versions/{version}
download specified descriptor file
Name | In | Type | Required | Description |
---|---|---|---|---|
namespace | path | string | true | none |
name | path | string | true | none |
version | path | string | true | none |
fullnames | query | array[string] | false | Proto fullnames |
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | download response | None |
Code samples
# You can also use wget
curl -X GET /v1/snapshots \
-H 'Accept: application/json'
GET /v1/snapshots
Name | In | Type | Required | Description |
---|---|---|---|---|
namespace | query | string | false | none |
name | query | string | false | none |
version | query | string | false | none |
latest | query | boolean | false | none |
Example responses
200 Response
{
"snapshots": [
{
"id": "string",
"namespace": "string",
"name": "string",
"version": "string",
"latest": true
}
]
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | A successful response. | v1ListSnapshotsResponse |
default | Default | An unexpected error response. | rpcStatus |
Code samples
# You can also use wget
curl -X PATCH /v1/snapshots/{id}/promote \
-H 'Accept: application/json'
PATCH /v1/snapshots/{id}/promote
PromoteSnapshot promotes particular snapshot version as latest
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string(int64) | true | none |
Example responses
200 Response
{
"snapshot": {
"id": "string",
"namespace": "string",
"name": "string",
"version": "string",
"latest": true
}
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | A successful response. | v1PromoteSnapshotResponse |
default | Default | An unexpected error response. | rpcStatus |
{
"typeUrl": "string",
"value": "string"
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
typeUrl | string | false | none | none |
value | string(byte) | false | none | none |
{
"code": 0,
"message": "string",
"details": [
{
"typeUrl": "string",
"value": "string"
}
]
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
code | integer(int32) | false | none | none |
message | string | false | none | none |
details | [protobufAny] | false | none | none |
{
"snapshots": [
{
"id": "string",
"namespace": "string",
"name": "string",
"version": "string",
"latest": true
}
]
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
snapshots | [v1Snapshot] | false | none | none |
{
"snapshot": {
"id": "string",
"namespace": "string",
"name": "string",
"version": "string",
"latest": true
}
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
snapshot | v1Snapshot | false | none | none |
{
"id": "string",
"namespace": "string",
"name": "string",
"version": "string",
"latest": true
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string(int64) | false | none | none |
namespace | string | true | none | none |
name | string | false | none | none |
version | string | false | none | none |
latest | boolean | false | none | none |