Skip to main content

Repository federation

Generated from apiome-rest/openapi.yaml (API version 1.307.0) — do not edit by hand. How to authenticate is on the REST API reference.

Tag: repository-federation · 5 operations

GET /v1/tenants/{tenant_slug}/projects/{project_ref}/federation-merges​

List a project's federation merge history

Newest first. Requires projects:view.

Operation id: list_project_federation_merges_v1_tenants__tenant_slug__projects__project_ref__federation_merges_get

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
project_refpathstringyesPath parameter identifying the project ref segment.
limitqueryintegernoMaximum number of rows to return.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Responses

StatusDescriptionBody
200Successful response for list a project's federation merge history.application/json FederationMergeList
422Validation Errorapplication/json HTTPValidationError

POST /v1/tenants/{tenant_slug}/projects/{project_ref}/federation-merges​

Record a federation merge (called by the import)

Records what federation did to one repository-file import: merged, conflicted (nothing written; each conflict carries every source's definition — the contributing file's is read from parentVersionId's rendered spec when not sent) or replaced (federation off). The row and its audit row (repository.federation_merged, repository.federation_conflicted or repository.federation_replaced) are written in one transaction.

Requires imports:create.

Operation id: create_federation_merge_v1_tenants__tenant_slug__projects__project_ref__federation_merges_post

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
project_refpathstringyesPath parameter identifying the project ref segment.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Request body (required)

Request body for record a federation merge (called by the import).

Responses

StatusDescriptionBody
201Successful response for record a federation merge (called by the import).application/json FederationMerge
422Validation Errorapplication/json HTTPValidationError

GET /v1/tenants/{tenant_slug}/projects/{project_ref}/repository-federation​

Read a project's multi-repository federation switch

enabled: true (the default) merges each repository file imported into the project with the other contributing files into one API surface. false makes each import replace the surface with the importing file alone.

Requires projects:view.

Operation id: get_repository_federation_v1_tenants__tenant_slug__projects__project_ref__repository_federation_get

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
project_refpathstringyesPath parameter identifying the project ref segment.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Responses

StatusDescriptionBody
200Successful response for read a project's multi-repository federation switch.application/json FederationSetting
422Validation Errorapplication/json HTTPValidationError

PUT /v1/tenants/{tenant_slug}/projects/{project_ref}/repository-federation​

Switch a project's multi-repository federation on or off

Applies to the next import; existing versions are not changed. Requires projects:edit. Audited as repository.federation_toggled.

Operation id: put_repository_federation_v1_tenants__tenant_slug__projects__project_ref__repository_federation_put

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
project_refpathstringyesPath parameter identifying the project ref segment.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Request body (required)

Request body for switch a project's multi-repository federation on or off.

Responses

StatusDescriptionBody
200Successful response for switch a project's multi-repository federation on or off.application/json FederationSetting
422Validation Errorapplication/json HTTPValidationError

GET /v1/tenants/{tenant_slug}/repositories/{repository_id}/federation-merges​

List the federation merges a repository's files were imported in

The repository's sync history: every merge, conflict and replacement where one of its files was the imported file, newest first. Requires imports:view.

Operation id: list_repository_federation_merges_v1_tenants__tenant_slug__repositories__repository_id__federation_merges_get

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
repository_idpathstringyesConnected repository identifier.
limitqueryintegernoMaximum number of rows to return.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Responses

StatusDescriptionBody
200Successful response for list the federation merges a repository's files were imported in.application/json FederationMergeList
422Validation Errorapplication/json HTTPValidationError

Schemas used​

FederationMerge​

One row of a project's merge history.

PropertyTypeRequiredDescription
idstringyesStable resource identifier.
projectIdstringyesProject ID.
projectNamestring or nullnoProject Name.
statusenum "merged", "conflicted", "replaced"yesStatus.
versionIdstring or nullnoVersion ID.
versionLabelstring or nullnoVersion Label.
parentVersionIdstring or nullnoParent Version ID.
repositoryIdstring or nullnoRepository ID.
repositoryFullNamestringyesRepository Full Name.
branchstringyesBranch.
pathstringyesPath.
sourceCountintegeryesNumber of source.
classesCarriedintegeryesClasses Carried.
pathsCarriedintegeryesPaths Carried.
removedCountintegeryesNumber of removed.
conflictCountintegeryesNumber of conflict.
sourcesarray of FederationSourceRefnoSources.
conflictsarray of FederationConflictnoConflicts.
actorIdstring or nullnoActor ID.
createdAtstring (date-time)yesCreated At.

FederationMergeCreate​

What an import reports after federation acted on it.

PropertyTypeRequiredDescription
statusenum "merged", "conflicted", "replaced"yesStatus.
versionIdstring or nullnoVersion ID.
parentVersionIdstring or nullnoParent Version ID.
repositoryIdstring or nullnoRepository ID.
repositoryFullNamestringyesRepository Full Name.
branchstringyesBranch.
pathstringyesPath.
sourceCountintegernoNumber of source.
classesCarriedintegernoClasses Carried.
pathsCarriedintegernoPaths Carried.
removedCountintegernoNumber of removed.
sourcesarray of FederationSourceRefnoSources.
conflictsarray of FederationConflictnoConflicts.
conflictCountinteger or nullnoHow many conflicts there were in all, when more than conflicts lists.

FederationMergeList​

A page of merge history, newest first.

PropertyTypeRequiredDescription
mergesarray of FederationMergenoMerges.

FederationSetting​

A project's federation switch.

PropertyTypeRequiredDescription
projectIdstringyesProject ID.
enabledbooleanyesTrue: each imported repository file is merged with the other contributing files. False: each import replaces the project's surface with the importing file alone.

FederationSettingUpdate​

Body for switching federation on or off.

PropertyTypeRequiredDescription
enabledbooleanyesWhether the resource is active.

HTTPValidationError​

Validation error response emitted when request data fails schema checks.

PropertyTypeRequiredDescription
detailarray of ValidationErrornoDetail.