NylorunDocsBeta
Runtime APIArtifacts

Compare two folder versions

GET
/v1/artifacts/{artifactId}/versions/{version}/diff

The files added, removed and changed from version from (default: the one before) to this one. Version 1 without from lists every file as added.

Authorization

headerAuthorizationBearer <token>

An application key of the Tenant (PUT /v1/tenant/keys/{keyId}), or Studio's key, derived from the admin key. With Nylorun-Subject and Nylorun-Scopes, it acts for that person, narrowed to those scopes. Never accepted from a browser (Origin).

Path Parameters

artifactId*string
version*string

A version number, or latest

Query Parameters

from?string

The version to compare against

Header Parameters

Nylorun-Protocol*string

The protocol version, 8

Nylorun-Subject?string

The person an application key acts for

Nylorun-Scopes?string

The subject's space-separated scopes; required with a subject

Response Body

What changed

application/json
  1. response
artifactId*string
from?integer
Range0 < value
to*integer
Range0 < value
added*array<>
removed*array<>
changed*array<>
import { createClient } from "@nylorun/agents";const client = await createClient();const diff = await client.artifacts.diff("art_123", { version: 2, from: 1 });
{  "artifactId": "string",  "from": 1,  "to": 1,  "added": [    {      "path": "string",      "size": 0,      "sha256": "string",      "contentType": "string"    }  ],  "removed": [    {      "path": "string",      "size": 0,      "sha256": "string",      "contentType": "string"    }  ],  "changed": [    {      "path": "string",      "from": {        "path": "string",        "size": 0,        "sha256": "string",        "contentType": "string"      },      "to": {        "path": "string",        "size": 0,        "sha256": "string",        "contentType": "string"      }    }  ]}