DocsSkmtc API

This reference is the skmtc/skmtc-api API on Hub. Star it to see each revision, and add a pipeline to get its changes.

Star
POST

Add an API revision by upload

Changed on Oct 30, 2026

Add a new revision to an existing API by uploading a schema document - the raw file bytes are the request body. The document is validated, content-addressed and deduplicated: re-uploading identical bytes (or a cosmetic reformat) is a no-op (deduped: true); changed bytes append a revision. Use this to record a new snapshot of an API whose schema is built locally and has no refetchable URL source.

Request

Method
POST
Path
/v1/apis/{account}/{api}/revisions
content-type
application/octet-stream
account
stringpath, required
api
stringpath, required
filename
stringquery

Original filename, used to detect JSON vs YAML.

originUrl
stringquery

As on uploadApi: the fetchable origin of these bytes, when known.

Request body

string

Response

201 application/json

The request has succeeded and a new resource has been created as a result.

object

The outcome of importing a schema document into the catalog.

apiobjectrequired

The API the schema belongs to - newly created, or extended with a revision.

revisionobjectrequired

The revision created - or the pre-existing one when deduped is true.

dedupedbooleanrequired

True when identical content already existed; no new revision was created.

isNewApibooleanrequired

True when the import created a brand-new API entry.

diffsPendingbooleanrequired

True when the API's full revision history is still being archived + diffed in the background - a large GitHub history deferred to the diff-backfill queue so the import responds without waiting on minutes of container diffs. The returned revision (the newest) is complete; older revisions' diffs fill in shortly. False for single-revision imports, which diff inline.

Example response
{
  "api": {
    "id": "string",
    "owner": {
      "id": "string",
      "handle": "string",
      "displayName": "string",
      "type": "user",
      "avatarUrl": "string",
      "bio": "string",
      "location": "string",
      "emailDomain": "string",
      "claimStatus": "claimed",
      "joinedAt": "2026-10-30T12:00:00Z",
      "url": "string",
      "htmlUrl": "string"
    },
    "slug": "string",
    "name": "string",
    "displayName": "string",
    "visibility": "public",
    "description": "string",
    "category": "ai-machine-learning",
    "readme": "string",
    "providerName": "string",
    "homepageUrl": "string",
    "logoUrl": "string",
    "isVerified": true,
    "license": {
      "name": "string",
      "spdxId": "string",
      "url": "string"
    },
    "sources": [
      {
        "id": "string",
        "type": "direct_url",
        "url": "string",
        "discoveredVia": "string",
        "isPrimary": true,
        "refetchEnabled": true,
        "lastCheckedAt": "2026-10-30T12:00:00Z",
        "lastStatus": "updated",
        "lastError": "string",
        "createdAt": "2026-10-30T12:00:00Z"
      }
    ],
    "versions": [
      {
        "label": "string",
        "stability": "ga",
        "isDefault": true,
        "sortRank": 0,
        "releasedAt": "2026-10-30T12:00:00Z",
        "eolAt": "2026-10-30T12:00:00Z"
      }
    ],
    "lastCheckedAt": "2026-10-30T12:00:00Z",
    "lastUpdatedAt": "2026-10-30T12:00:00Z",
    "latestVersionRef": "string",
    "versionCount": 0,
    "retiredAt": "2026-10-30T12:00:00Z",
    "starCount": 0,
    "consumerCount": 0,
    "createdAt": "2026-10-30T12:00:00Z",
    "updatedAt": "2026-10-30T12:00:00Z",
    "url": "string",
    "htmlUrl": "string",
    "viewer": {
      "canRead": true,
      "canWrite": true,
      "canAdmin": true
    }
  },
  "revision": {
    "publishedAt": "2026-10-30T12:00:00Z",
    "isLatest": true,
    "hasDocument": true,
    "documentUrl": "string",
    "commit": {
      "sha": "string",
      "message": "string",
      "date": "2026-10-30T12:00:00Z",
      "htmlUrl": "string"
    },
    "linkedRepositoryRun": {
      "repository": "string",
      "sha": "string",
      "runId": "string",
      "runAttempt": "string",
      "workflowRef": "string",
      "htmlUrl": "string"
    },
    "specType": "openapi",
    "specVersion": "string",
    "documentVersion": "string",
    "license": {
      "name": "string",
      "spdxId": "string",
      "url": "string"
    },
    "retrievedAt": "2026-10-30T12:00:00Z",
    "operationCount": 0,
    "schemaCount": 0,
    "serverUrl": "string",
    "authSchemes": [
      "apiKey"
    ],
    "documentFormat": "json",
    "byteSize": 0,
    "contentHash": "string",
    "contentRef": "string",
    "url": "string",
    "htmlUrl": "string"
  },
  "deduped": true,
  "isNewApi": true,
  "diffsPending": true
}

400 application/json

Binds a concrete HTTP Status to the shared ApiError body.

object

The uniform error envelope returned for every non-2xx response.

codeenumrequiredbadRequestunauthorizedforbiddennotFoundconflictunprocessablepayloadTooLargeunsupportedMediaTypedocumentTooLargewebhookLimitReachedrateLimitedinternalunavailablebadGatewaynotImplemented

Machine-readable error category. Each value pairs with one HTTP status.

messagestringrequired

Human-readable summary safe to surface to end users.

requestIdstringrequired

Correlates the response with server logs for support.

detailsarray of ErrorDetail
Example response
{
  "code": "badRequest",
  "message": "string",
  "requestId": "string",
  "details": [
    {
      "field": "string",
      "message": "string"
    }
  ]
}

401 application/json

Binds a concrete HTTP Status to the shared ApiError body.

object

The uniform error envelope returned for every non-2xx response.

codeenumrequiredbadRequestunauthorizedforbiddennotFoundconflictunprocessablepayloadTooLargeunsupportedMediaTypedocumentTooLargewebhookLimitReachedrateLimitedinternalunavailablebadGatewaynotImplemented

Machine-readable error category. Each value pairs with one HTTP status.

messagestringrequired

Human-readable summary safe to surface to end users.

requestIdstringrequired

Correlates the response with server logs for support.

detailsarray of ErrorDetail
Example response
{
  "code": "badRequest",
  "message": "string",
  "requestId": "string",
  "details": [
    {
      "field": "string",
      "message": "string"
    }
  ]
}

403 application/json

Binds a concrete HTTP Status to the shared ApiError body.

object

The uniform error envelope returned for every non-2xx response.

codeenumrequiredbadRequestunauthorizedforbiddennotFoundconflictunprocessablepayloadTooLargeunsupportedMediaTypedocumentTooLargewebhookLimitReachedrateLimitedinternalunavailablebadGatewaynotImplemented

Machine-readable error category. Each value pairs with one HTTP status.

messagestringrequired

Human-readable summary safe to surface to end users.

requestIdstringrequired

Correlates the response with server logs for support.

detailsarray of ErrorDetail
Example response
{
  "code": "badRequest",
  "message": "string",
  "requestId": "string",
  "details": [
    {
      "field": "string",
      "message": "string"
    }
  ]
}

404 application/json

Binds a concrete HTTP Status to the shared ApiError body.

object

The uniform error envelope returned for every non-2xx response.

codeenumrequiredbadRequestunauthorizedforbiddennotFoundconflictunprocessablepayloadTooLargeunsupportedMediaTypedocumentTooLargewebhookLimitReachedrateLimitedinternalunavailablebadGatewaynotImplemented

Machine-readable error category. Each value pairs with one HTTP status.

messagestringrequired

Human-readable summary safe to surface to end users.

requestIdstringrequired

Correlates the response with server logs for support.

detailsarray of ErrorDetail
Example response
{
  "code": "badRequest",
  "message": "string",
  "requestId": "string",
  "details": [
    {
      "field": "string",
      "message": "string"
    }
  ]
}

422 application/json

Binds a concrete HTTP Status to the shared ApiError body.

object

The uniform error envelope returned for every non-2xx response.

codeenumrequiredbadRequestunauthorizedforbiddennotFoundconflictunprocessablepayloadTooLargeunsupportedMediaTypedocumentTooLargewebhookLimitReachedrateLimitedinternalunavailablebadGatewaynotImplemented

Machine-readable error category. Each value pairs with one HTTP status.

messagestringrequired

Human-readable summary safe to surface to end users.

requestIdstringrequired

Correlates the response with server logs for support.

detailsarray of ErrorDetail
Example response
{
  "code": "badRequest",
  "message": "string",
  "requestId": "string",
  "details": [
    {
      "field": "string",
      "message": "string"
    }
  ]
}
Oct 30, 20262fe10b584fa2
  • added#/components/schemas/SourceRefetchStatus to the api/allOf[#/components/schemas/Api]/sources/items/lastStatus response property allOf list for the response status 201
  • removed#/components/schemas/SourceRefreshStatus from the api/allOf[#/components/schemas/Api]/sources/items/lastStatus response property allOf list for the response status 201