Unity Version Control Client API
Unity Version Control client-facing APIs for working with VCS repositories
attached to Unity Build Automation projects. Supports user JWTs, End User
Service Account API keys (basic auth), and End User Service Account bearer
tokens ().
Authorization: Bearer unity_sa_bt.<id>.<secret>Download OpenAPI specification:
GET /organizations/{organizationId}/projects/{projectId}/vcs/repositories
List repositories from the VCS provider without going through UBA's stored SCM credentials.
GitHub: caller supplies a personal access token in the header. UVCS: no header
required. The gateway-authenticated user identity and URL org/project identify the target.
x-vcs-patCode samples for "GET /organizations/{organizationId}/projects/{projectId}/vcs/repositories":
Request example
curl -X GET \ -H "x-vcs-pat: <x-vcs-pat>" \ "https://services.api.unity.com/plastic/v1/organizations/{organizationId}/projects/{projectId}/vcs/repositories"
Response example
{ "results": [ { "name": "string", "id": "string", "description": "string", "defaultBranch": "string", "url": "string", "fullName": "string", "cloneUrl": "string", "owner": { "login": "string" } } ], "cursor": { "next": "string", "previous": "string" }, "limit": 0}
GET /organizations/{organizationId}/projects/{projectId}/vcs/repositories/{repository}/branches
List branches in a VCS repository. Two auth modes on the same route.
Omit for the default flow, which resolves credentials via UBA scm-credentials.
Set with the PAT in , or with no
header, to skip the UBA lookup and use the caller-supplied or gateway-authenticated
credential directly.
providerTypeproviderType=GITHUBx-vcs-patproviderType=UVCSPath parameters for "GET /organizations/{organizationId}/projects/{projectId}/vcs/repositories/{repository}/branches"
Header parameters for "GET /organizations/{organizationId}/projects/{projectId}/vcs/repositories/{repository}/branches"
Code samples for "GET /organizations/{organizationId}/projects/{projectId}/vcs/repositories/{repository}/branches":
Request example
curl -X GET \ -H "x-vcs-pat: <x-vcs-pat>" \ "https://services.api.unity.com/plastic/v1/organizations/{organizationId}/projects/{projectId}/vcs/repositories/{repository}/branches"
Response example
{ "results": [ { "name": "string", "id": 0, "description": "string", "author": "string", "lastChangesetName": "string", "lastChangesetComment": "string", "lastChangesetId": 0, "lastActivityDate": "2024-01-01T00:00:00Z", "creationDate": "2024-01-01T00:00:00Z", "status": "string", "canBeDeleted": true, "numberOfReviews": 0, "numberOfChangesets": 0, "isMain": true, "pulls": [ { "id": 0, "title": "string", "description": "string", "status": "string", "sourceBranch": "string", "targetBranch": "string" } ] } ], "cursor": { "next": "string", "previous": "string" }, "limit": 0}
POST /organizations/{organizationId}/projects/{projectId}/vcs/repositories/{repository}/branches
Fork a new branch from an existing one. UVCS resolves to its head
changeset and POSTs to Plastic's . GitHub looks up the source ref's
commit SHA and POSTs to .
fromBranch/branches/git/refsPath parameters for "POST /organizations/{organizationId}/projects/{projectId}/vcs/repositories/{repository}/branches"
Code samples for "POST /organizations/{organizationId}/projects/{projectId}/vcs/repositories/{repository}/branches":
Request example
curl -X POST \ -H "Content-Type: application/json" \ -d '{ "name": "string", "fromBranch": "string", "comment": "string"}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationId}/projects/{projectId}/vcs/repositories/{repository}/branches"
Response example
{ "name": "string", "id": 0, "description": "string", "author": "string", "lastChangesetName": "string", "lastChangesetComment": "string", "lastChangesetId": 0, "lastActivityDate": "2024-01-01T00:00:00Z", "creationDate": "2024-01-01T00:00:00Z", "status": "string", "canBeDeleted": true, "numberOfReviews": 0, "numberOfChangesets": 0, "isMain": true, "pulls": [ { "id": 0, "title": "string", "description": "string", "status": "string", "sourceBranch": "string", "targetBranch": "string" } ]}
GET /organizations/{organizationId}/projects/{projectId}/vcs/repositories/{repository}/branches/{branchName}/changesets
List changesets / commits on a branch.
Path parameters for "GET /organizations/{organizationId}/projects/{projectId}/vcs/repositories/{repository}/branches/{branchName}/changesets"
Code samples for "GET /organizations/{organizationId}/projects/{projectId}/vcs/repositories/{repository}/branches/{branchName}/changesets":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationId}/projects/{projectId}/vcs/repositories/{repository}/branches/{branchName}/changesets"
Response example
{ "results": [ { "id": 0, "name": "string", "guid": "string", "branchName": "string", "branchId": 0, "comment": "string", "authorName": "string", "date": "2024-01-01T00:00:00Z", "labels": [ "string" ], "canBeDeleted": true, "hasCodeReview": true, "codeReviewIds": [ 0 ], "merges": [ {} ], "createdByMe": true } ], "cursor": { "next": "string", "previous": "string" }, "limit": 0}
POST /organizations/{organizationId}/projects/{projectId}/vcs/repositories/{repository}/branches/{branchName}/changesets
Create a changeset on the branch from previously-uploaded files.
Path parameters for "POST /organizations/{organizationId}/projects/{projectId}/vcs/repositories/{repository}/branches/{branchName}/changesets"
Query parameters for "POST /organizations/{organizationId}/projects/{projectId}/vcs/repositories/{repository}/branches/{branchName}/changesets"
Code samples for "POST /organizations/{organizationId}/projects/{projectId}/vcs/repositories/{repository}/branches/{branchName}/changesets":
Request example
curl -X POST \ -H "Content-Type: application/json" \ -d '{ "comment": "string", "changes": [ { "changeType": "Added", "itemType": "Text", "path": "string", "content": "string", "md5": "string", "dstPath": "string", "symlinkPath": "string" } ]}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationId}/projects/{projectId}/vcs/repositories/{repository}/branches/{branchName}/changesets"
Response example
{ "id": 0, "name": "string", "guid": "string", "branchName": "string", "branchId": 0, "comment": "string", "authorName": "string", "date": "2024-01-01T00:00:00Z", "labels": [ "string" ], "canBeDeleted": true, "hasCodeReview": true, "codeReviewIds": [ 0 ], "merges": [ {} ], "createdByMe": true}
POST /organizations/{organizationId}/projects/{projectId}/vcs/repositories/{repository}/file-upload
Upload the full bytes of a single file. The gateway accepts Content-Type
application/offset+octet-stream, Unity's standard binary media type.
Plain application/octet-stream is not on the gateway allowlist.
Per-file cap is 75 MB (raw bytes).
Path parameters for "POST /organizations/{organizationId}/projects/{projectId}/vcs/repositories/{repository}/file-upload"
Code samples for "POST /organizations/{organizationId}/projects/{projectId}/vcs/repositories/{repository}/file-upload":
Request example
curl -X POST \ -H "Content-Type: application/offset+octet-stream" \ -d '"string"' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationId}/projects/{projectId}/vcs/repositories/{repository}/file-upload"
Response example
{ "fileUploadId": "string", "md5": "string"}
POST /organizations/{organizationId}/projects/{projectId}/vcs/repositories/{repository}/pulls
Create a pull request / code review.
Path parameters for "POST /organizations/{organizationId}/projects/{projectId}/vcs/repositories/{repository}/pulls"
Code samples for "POST /organizations/{organizationId}/projects/{projectId}/vcs/repositories/{repository}/pulls":
Request example
curl -X POST \ -H "Content-Type: application/json" \ -d '{ "title": "string", "sourceBranch": "string", "targetBranch": "string", "baseBranch": "string", "description": "string", "reviewers": [ "string" ]}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationId}/projects/{projectId}/vcs/repositories/{repository}/pulls"
Response example
{ "id": 0, "title": "string", "description": "string", "sourceBranch": "string", "targetBranch": "string", "author": "string", "status": "string", "createdAt": "2024-01-01T00:00:00Z", "updatedAt": "2024-01-01T00:00:00Z", "url": "string"}
POST /organizations/{organizationId}/projects/{projectId}/vcs/repositories/{repository}/merges
Merge a VCS branch into another. UVCS posts to /mergeto (sourceType=branch);
GitHub posts to /repos/.../merges. sourceBranch and targetBranch are both required.
Path parameters for "POST /organizations/{organizationId}/projects/{projectId}/vcs/repositories/{repository}/merges"
Code samples for "POST /organizations/{organizationId}/projects/{projectId}/vcs/repositories/{repository}/merges":
Request example
curl -X POST \ -H "Content-Type: application/json" \ -d '{ "comment": "string", "sourceBranch": "string", "targetBranch": "string"}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationId}/projects/{projectId}/vcs/repositories/{repository}/merges"
Response example
{ "status": "OK", "revision": "string", "message": "string"}
GET /organizations/{organizationId}/projects/{projectId}/vcs/repositories/{repository}/branches/{branchName}/build-status
Return the latest successful + currently in-progress build for the given build target, with the file diffs for "files being built" and "pending changes after the latest build".
Path parameters for "GET /organizations/{organizationId}/projects/{projectId}/vcs/repositories/{repository}/branches/{branchName}/build-status"
Code samples for "GET /organizations/{organizationId}/projects/{projectId}/vcs/repositories/{repository}/branches/{branchName}/build-status":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationId}/projects/{projectId}/vcs/repositories/{repository}/branches/{branchName}/build-status"
Response example
{ "lastSuccessful": { "buildNumber": 0, "scmBranch": "string", "scmCommitId": "string", "status": "queued", "startedAt": "2024-01-01T00:00:00Z", "finishedAt": "2024-01-01T00:00:00Z" }, "inProgress": { "buildNumber": 0, "scmBranch": "string", "scmCommitId": "string", "status": "queued", "startedAt": "2024-01-01T00:00:00Z", "finishedAt": "2024-01-01T00:00:00Z" }, "status": "not_started"}
GET /organizations/{organizationId}/projects/{projectId}/vcs/repositories/{repository}/branches/{branchName}/vcs-status
Return the VCS-side state of a branch: current head revision, parent (destination) branch with its merge-target tip and fork point, and files introduced on this branch (diff from forkPoint to head).
Path parameters for "GET /organizations/{organizationId}/projects/{projectId}/vcs/repositories/{repository}/branches/{branchName}/vcs-status"
Code samples for "GET /organizations/{organizationId}/projects/{projectId}/vcs/repositories/{repository}/branches/{branchName}/vcs-status":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationId}/projects/{projectId}/vcs/repositories/{repository}/branches/{branchName}/vcs-status"
Response example
{ "branchHead": { "revision": "string" }, "destinationBranch": { "name": "string", "revision": "string", "forkPoint": "string" }, "pendingFiles": [ { "path": "string", "changeType": "Added", "size": 0, "srcPath": "string", "itemType": "Text", "pending": true, "revisionId": "string" } ], "processing": [ { "path": "string", "changeType": "Added", "size": 0, "srcPath": "string", "itemType": "Text", "pending": true, "revisionId": "string" } ]}
GET /organizations/{organizationId}/projects/{projectId}/vcs/repositories/{repository}/branches/{branchName}/files/{filePath}/source-url
Return a signed, downloadable URL for the bytes of the file on the given branch. UVCS mints a JWT-signed URL with a short TTL; GitHub returns the contents API's download_url (pre-signed for private repos, plain raw URL for public).
Path parameters for "GET /organizations/{organizationId}/projects/{projectId}/vcs/repositories/{repository}/branches/{branchName}/files/{filePath}/source-url"
Code samples for "GET /organizations/{organizationId}/projects/{projectId}/vcs/repositories/{repository}/branches/{branchName}/files/{filePath}/source-url":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationId}/projects/{projectId}/vcs/repositories/{repository}/branches/{branchName}/files/{filePath}/source-url"
Response example
{ "url": "string"}
GET /organizations/{organizationName}
GET /organizations/{organizationName}/projects/{projectId}/repositories
List repositories under a project for the organization.
Code samples for "GET /organizations/{organizationName}/projects/{projectId}/repositories":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/projects/{projectId}/repositories"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
POST /organizations/{organizationName}/projects/{projectId}/repositories
Create a repository under a project for the organization.
Code samples for "POST /organizations/{organizationName}/projects/{projectId}/repositories":
Request example
curl -X POST \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/projects/{projectId}/repositories"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
GET /organizations/{organizationName}/repositories
Get organization activity
Get organization activity
Code samples for "Get organization activity":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/activities"
Response example
{ "activeUsers": { "dataset": [ { "date": "2024-01-01T00:00:00Z", "value": 0 } ], "trend": 0, "average": 0 }, "automaticSolvedFileConflicts": { "dataset": [ { "date": "2024-01-01T00:00:00Z", "value": 0 } ], "trend": 0, "average": 0 }, "branchExplorerViews": { "dataset": [ { "date": "2024-01-01T00:00:00Z", "value": 0 } ], "trend": 0, "average": 0 }, "changesets": { "dataset": [ { "date": "2024-01-01T00:00:00Z", "value": 0 } ], "trend": 0, "average": 0 }, "crossFileDiffsUsage": { "dataset": [ { "date": "2024-01-01T00:00:00Z", "value": 0 } ], "trend": 0, "average": 0 }, "dataStored": { "dataset": [ { "date": "2024-01-01T00:00:00Z", "value": 0 } ], "trend": 0, "average": 0 }, "diffsPerformed": { "dataset": [ { "date": "2024-01-01T00:00:00Z", "value": 0 } ], "trend": 0, "average": 0 }, "downloadedGb": { "dataset": [ { "date": "2024-01-01T00:00:00Z", "value": 0 } ], "trend": 0, "average": 0 }, "imageDiffsUsage": { "dataset": [ { "date": "2024-01-01T00:00:00Z", "value": 0 } ], "trend": 0, "average": 0 }, "keyOperationsNewBranches": { "dataset": [ { "date": "2024-01-01T00:00:00Z", "value": 0 } ], "trend": 0, "average": 0 }, "manualSolvedFileConflicts": { "dataset": [ { "date": "2024-01-01T00:00:00Z", "value": 0 } ], "trend": 0, "average": 0 }, "newBranches": { "dataset": [ { "date": "2024-01-01T00:00:00Z", "value": 0 } ], "trend": 0, "average": 0 }, "semanticDiffUsage": { "dataset": [ { "date": "2024-01-01T00:00:00Z", "value": 0 } ], "trend": 0, "average": 0 }, "solvedDirectoryConflicts": { "dataset": [ { "date": "2024-01-01T00:00:00Z", "value": 0 } ], "trend": 0, "average": 0 }, "xDiffsUsage": { "dataset": [ { "date": "2024-01-01T00:00:00Z", "value": 0 } ], "trend": 0, "average": 0 }}
Get organization code reviews
Get a paginated list of code reviews for an organization.
Code samples for "Get organization code reviews":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/code-reviews"
Response example
{ "limit": 0, "offset": 0, "total": 0, "results": [ { "assignee": "string", "comments": [ { "type": "Comment", "id": 0, "uuid": "string", "owner": "user@example.com", "timestamp": "2024-01-01T00:00:00Z", "createdAt": "2024-01-01T00:00:00Z", "updatedAt": "2024-01-01T00:00:00Z", "itemId": 0, "itemPath": "string", "revisionId": 0, "locationSpec": "string", "commentText": "string", "reviewId": 0, "parentCommentId": 0, "changesetId": 0, "appliedInChangesetId": 0, "branchChangesetId": 0 } ], "commentsCount": 0, "createdAt": "2024-01-01T00:00:00Z", "description": "string", "id": 0, "mergeAllowed": true, "mergeIssues": "string", "merges": [ { "sourceChangesetId": 0, "sourceBranchId": 0, "sourceBranchName": "string", "destinationChangesetId": 0, "destinationBranchId": 0, "destinationBranchName": "string", "destinationIsMain": true, "mergeDate": "2024-01-01T00:00:00Z", "author": "string", "comment": "string" } ], "numberOfIssues": 0, "object": { "type": "branch", "spec": "string", "id": 0 }, "owner": "string", "repositoryName": "string", "reviewers": [ { "name": "user@example.com", "isGroup": true, "status": "under-review" } ], "status": "under-review", "title": "string", "unansweredQuestionsCount": 0, "updatedAt": "2024-01-01T00:00:00Z", "userCommentsCount": 0 } ]}
Get an organization consumption
Get an organization consumption
Code samples for "Get an organization consumption":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/consumption"
Response example
{ "results": [ { "date": "2024-01-01T00:00:00Z", "networkUsageChange": 0, "storageChange": 0, "storageTotal": 0 } ]}
Get integrations
Code samples for "Get integrations":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/integrations"
Response example
[ { "channelWebhook": "string", "events": [ "string" ], "failures": [ { "message": "string", "status": "string" } ], "filters": "string", "id": 0, "name": "string", "organizationName": "string", "repositories": [ "string" ], "type": "string" }]
Create a discord integration
Create a discord integration
Code samples for "Create a discord integration":
Request example
curl -X POST \ -H "Content-Type: application/json" \ -d '{ "channelWebhook": "string", "events": [ "string" ], "filters": "string", "name": "string", "repositories": [ "string" ]}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/integrations/discord"
Response example
{ "channelWebhook": "string", "events": [ "string" ], "failures": [ { "message": "string", "status": "string" } ], "filters": "string", "id": 0, "name": "string", "organizationName": "string", "repositories": [ "string" ], "type": "string"}
Replace a discord integration
Replace a discord integration
Code samples for "Replace a discord integration":
Request example
curl -X PUT \ -H "Content-Type: application/json" \ -d '{ "channelWebhook": "string", "events": [ "string" ], "filters": "string", "name": "string", "repositories": [ "string" ]}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/integrations/discord/{id}"
Response example
{ "channelWebhook": "string", "events": [ "string" ], "failures": [ { "message": "string", "status": "string" } ], "filters": "string", "id": 0, "name": "string", "organizationName": "string", "repositories": [ "string" ], "type": "string"}
Create a slack integration
Create a slack integration
Code samples for "Create a slack integration":
Request example
curl -X POST \ -H "Content-Type: application/json" \ -d '{ "botOauthToken": "string", "events": [ "string" ], "filters": "string", "name": "string", "repositories": [ "string" ], "slackChannel": "string"}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/integrations/slack"
Response example
{ "botOauthToken": "string", "events": [ "string" ], "failures": [ { "message": "string", "status": "string" } ], "filters": "string", "id": 0, "name": "string", "organizationName": "string", "repositories": [ "string" ], "slackChannel": "string", "type": "string"}
Replace a slack integration
Replace a slack integration
Code samples for "Replace a slack integration":
Request example
curl -X PUT \ -H "Content-Type: application/json" \ -d '{ "botOauthToken": "string", "events": [ "string" ], "filters": "string", "name": "string", "repositories": [ "string" ], "slackChannel": "string"}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/integrations/slack/{id}"
Response example
{ "botOauthToken": "string", "events": [ "string" ], "failures": [ { "message": "string", "status": "string" } ], "filters": "string", "id": 0, "name": "string", "organizationName": "string", "repositories": [ "string" ], "slackChannel": "string", "type": "string"}
Create a webhook integration
Create a webhook integration
Code samples for "Create a webhook integration":
Request example
curl -X POST \ -H "Content-Type: application/json" \ -d '{ "events": [ "string" ], "filters": "string", "name": "string", "repositories": [ "string" ], "url": "string"}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/integrations/webhook"
Response example
{ "events": [ "string" ], "failures": [ { "message": "string", "status": "string" } ], "filters": "string", "id": 0, "name": "string", "organizationName": "string", "repositories": [ "string" ], "type": "string", "url": "string"}
Replace a webhook integration
Replace a webhook integration
Code samples for "Replace a webhook integration":
Request example
curl -X PUT \ -H "Content-Type: application/json" \ -d '{ "events": [ "string" ], "filters": "string", "name": "string", "repositories": [ "string" ], "url": "string"}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/integrations/webhook/{id}"
Response example
{ "events": [ "string" ], "failures": [ { "message": "string", "status": "string" } ], "filters": "string", "id": 0, "name": "string", "organizationName": "string", "repositories": [ "string" ], "type": "string", "url": "string"}
Get organization lock rule
Change the organization lock rule
Change the organization lock rule
Code samples for "Change the organization lock rule":
Request example
curl -X PUT \ -H "Content-Type: application/json" \ -d '{ "excludedBranches": [ "string" ], "fileExtensions": "string", "targetBranch": "string", "targetBranches": [ "string" ]}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/lock-rule"
Response example
{ "excludedBranches": [ "string" ], "fileExtensions": "string", "targetBranch": "string", "targetBranches": [ "string" ]}
Get merge bot plug definitions
Code samples for "Get merge bot plug definitions":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/merge-bots/plug-definitions"
Response example
{ "results": [ { "buildIn": true, "configuration": [ {} ], "description": "string", "name": "string", "type": "string" } ]}
Get merge rules
Code samples for "Get merge rules":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/merge-rules"
Response example
{ "results": [ { "condition": "string", "destination": { "branchesNamesPattern": [ "string" ], "attributes": [ { "name": null, "value": null } ] }, "id": 0, "isEnabled": true, "repositoriesPattern": [ "string" ], "source": { "branchesNamesPattern": [ "string" ], "attributes": [ { "name": null, "value": null } ] } } ]}
Create a merge rule
Create a merge rule
Code samples for "Create a merge rule":
Request example
curl -X POST \ -H "Content-Type: application/json" \ -d '{ "condition": "string", "destination": { "attributes": [ { "name": "string", "value": "string" } ], "branchesNamesPattern": [ "string" ] }, "isEnabled": true, "repositoriesPattern": [ "string" ], "source": { "attributes": [ { "name": "string", "value": "string" } ], "branchesNamesPattern": [ "string" ] }}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/merge-rules"
Response example
{ "condition": "string", "destination": { "branchesNamesPattern": [ "string" ], "attributes": [ { "name": "string", "value": "string" } ] }, "id": 0, "isEnabled": true, "repositoriesPattern": [ "string" ], "source": { "branchesNamesPattern": [ "string" ], "attributes": [ { "name": "string", "value": "string" } ] }}
Replace a merge rule
Replace a merge rule
Code samples for "Replace a merge rule":
Request example
curl -X PUT \ -H "Content-Type: application/json" \ -d '{ "condition": "string", "destination": { "attributes": [ { "name": "string", "value": "string" } ], "branchesNamesPattern": [ "string" ] }, "id": 0, "isEnabled": true, "repositoriesPattern": [ "string" ], "source": { "attributes": [ { "name": "string", "value": "string" } ], "branchesNamesPattern": [ "string" ] }}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/merge-rules/{id}"
Response example
{ "condition": "string", "destination": { "branchesNamesPattern": [ "string" ], "attributes": [ { "name": "string", "value": "string" } ] }, "id": 0, "isEnabled": true, "repositoriesPattern": [ "string" ], "source": { "branchesNamesPattern": [ "string" ], "attributes": [ { "name": "string", "value": "string" } ] }}
Change network permissions
Change network permissions
Code samples for "Change network permissions":
Request example
curl -X PUT \ -H "Content-Type: application/json" \ -d '{ "permissions": "string"}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/network-permissions"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
GET /organizations/{organizationName}/notifications
POST /organizations/{organizationName}/notifications
Enables email notifications for the organization.
Code samples for "POST /organizations/{organizationName}/notifications":
Request example
curl -X POST \ -H "Content-Type: application/json" \ -d '{ "repositories": [ "string" ]}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/notifications"
Response example
{ "id": 0, "organizationName": "string", "repositories": [ "string" ]}
Get organization permissions
Get permissions for an organization by name.
Code samples for "Get organization permissions":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/permissions"
Response example
{ "permissions": [ { "name": "string", "type": "user", "permissions": [ { "name": "string", "isOverride": true, "isEnabled": true, "valueInherited": true } ] } ]}
Patch an organization permissions
Patch an organization permissions
Code samples for "Patch an organization permissions":
Request example
curl -X PATCH \ -H "Content-Type: application/json" \ -d '{ "endUsersPermissions": [ { "name": "string", "type": "user", "permissions": [ { "name": "string", "isOverride": true, "isEnabled": true, "valueInherited": true } ] } ]}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/permissions"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
Get profiles
Get profiles of users in the organization
Code samples for "Get profiles":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/profiles"
Response example
{ "limit": 0, "offset": 0, "total": 0, "results": [ { "assignedAt": "2024-01-01T00:00:00Z", "email": "user@example.com", "groups": [ { "id": 0, "name": "string" } ], "id": 0, "isAdmin": true, "isOwner": true, "joinedOrganizationAt": "2024-01-01T00:00:00Z", "permissions": [ { "isEnabled": true, "isOverride": true, "name": "string", "valueInherited": true } ], "source": "DevOps", "unityUser": { "avatarUrl": "https://example.com", "email": "user@example.com", "genesisId": "string", "id": "string", "name": "string" } } ]}
GET /organizations/{organizationName}/projects/{projectId}/repositories/{repositoryName}
Get a repository scoped under a project.
Code samples for "GET /organizations/{organizationName}/projects/{projectId}/repositories/{repositoryName}":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/projects/{projectId}/repositories/{repositoryName}"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
PATCH /organizations/{organizationName}/projects/{projectId}/repositories/{repositoryName}
Update a repository scoped under a project.
Code samples for "PATCH /organizations/{organizationName}/projects/{projectId}/repositories/{repositoryName}":
Request example
curl -X PATCH \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/projects/{projectId}/repositories/{repositoryName}"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
DELETE /organizations/{organizationName}/projects/{projectId}/repositories/{repositoryName}
Delete a repository scoped under a project.
Code samples for "DELETE /organizations/{organizationName}/projects/{projectId}/repositories/{repositoryName}":
Request example
curl -X DELETE \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/projects/{projectId}/repositories/{repositoryName}"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
Get an organization repository
Get an organization repository
Code samples for "Get an organization repository":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}"
Response example
{ "creatorName": "string", "description": "string", "id": 0, "isFavorite": true, "isPublic": true, "lastActivityDate": "2024-01-01T00:00:00Z", "mainBranch": "string", "mainBranchId": 0, "name": "string", "uuid": "string", "workspaces": [ { "guid": "string", "id": 0, "lastActivityDate": "2024-01-01T00:00:00Z", "name": "string", "owner": "string", "ownerUnityUser": { "avatarUrl": "https://example.com", "email": "user@example.com", "genesisId": "string", "id": "string", "name": "string" }, "repositoryName": "string", "shares": [ { "name": "string", "user": "string", "unityUser": { "id": null, "genesisId": null, "name": null, "email": null, "avatarUrl": null } } ], "uvcsConnections": [ { "id": "string", "name": "string", "path": "string", "isPartial": true, "target": { "type": null, "server": null, "repositoryId": null, "repositoryName": null, "id": null, "spec": null } } ] } ]}
Patch an organization repository
Patch an organization repository
Code samples for "Patch an organization repository":
Request example
curl -X PATCH \ -H "Content-Type: application/json" \ -d '{ "description": "string", "isPublic": true, "name": "string"}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}"
Response example
{ "creatorName": "string", "description": "string", "id": 0, "isFavorite": true, "isPublic": true, "lastActivityDate": "2024-01-01T00:00:00Z", "mainBranch": "string", "mainBranchId": 0, "name": "string", "uuid": "string", "workspaces": [ { "guid": "string", "id": 0, "lastActivityDate": "2024-01-01T00:00:00Z", "name": "string", "owner": "string", "ownerUnityUser": { "avatarUrl": "https://example.com", "email": "user@example.com", "genesisId": "string", "id": "string", "name": "string" }, "repositoryName": "string", "shares": [ { "name": "string", "user": "string", "unityUser": { "id": null, "genesisId": null, "name": null, "email": null, "avatarUrl": null } } ], "uvcsConnections": [ { "id": "string", "name": "string", "path": "string", "isPartial": true, "target": { "type": null, "server": null, "repositoryId": null, "repositoryName": null, "id": null, "spec": null } } ] } ]}
PUT /organizations/{organizationName}/repositories/{repositoryName}/{targetType}/{targetNameOrId}/attributes/{id}
Create or replace a custom attribute on a branch, label, or other target.
Path parameters for "PUT /organizations/{organizationName}/repositories/{repositoryName}/{targetType}/{targetNameOrId}/attributes/{id}"
Code samples for "PUT /organizations/{organizationName}/repositories/{repositoryName}/{targetType}/{targetNameOrId}/attributes/{id}":
Request example
curl -X PUT \ -H "Content-Type: application/json" \ -d '{ "value": "string"}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/{targetType}/{targetNameOrId}/attributes/{id}"
Response example
{ "attributeId": 0, "attributeName": "string", "attributeComment": "string", "target": { "name": "string", "id": 0, "type": "branch" }, "value": "string", "lastUpdatedDate": "2024-01-01T00:00:00Z"}
DELETE /organizations/{organizationName}/repositories/{repositoryName}/{targetType}/{targetNameOrId}/attributes/{id}
Delete a custom attribute on a branch, label, or other target.
Code samples for "DELETE /organizations/{organizationName}/repositories/{repositoryName}/{targetType}/{targetNameOrId}/attributes/{id}":
Request example
curl -X DELETE \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/{targetType}/{targetNameOrId}/attributes/{id}"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
Start merge bots
Code samples for "Start merge bots":
Request example
curl -X POST \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/{targetType}/{targetValue}/merge-bots/start"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
GET /organizations/{organizationName}/repositories/{repositoryName}/{type}/{id}/subscriptions
Get the all notification subscriptions for the object
Code samples for "GET /organizations/{organizationName}/repositories/{repositoryName}/{type}/{id}/subscriptions":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/{type}/{id}/subscriptions"
Response example
[ { "id": 0, "type": "review" }]
POST /organizations/{organizationName}/repositories/{repositoryName}/{type}/{id}/subscriptions
Subscribe to notifications for the object
Code samples for "POST /organizations/{organizationName}/repositories/{repositoryName}/{type}/{id}/subscriptions":
Request example
curl -X POST \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/{type}/{id}/subscriptions"
Response example
{ "object": { "type": "review", "id": 0 }, "reason": "userIsUnsubscribed", "user": { "email": "string", "isGroup": true, "groupMembers": [ "string" ] }}
DELETE /organizations/{organizationName}/repositories/{repositoryName}/{type}/{id}/subscriptions
Unsubscribe from notifications for the object
Code samples for "DELETE /organizations/{organizationName}/repositories/{repositoryName}/{type}/{id}/subscriptions":
Request example
curl -X DELETE \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/{type}/{id}/subscriptions"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
Get attributes
Code samples for "Get attributes":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/attributes"
Response example
{ "cursor": { "next": "string", "previous": "string" }, "limit": 0, "results": [ { "author": "string", "comment": "string", "creationDate": "2024-01-01T00:00:00Z", "id": 0, "name": "string" } ]}
Create an attribute
Code samples for "Create an attribute":
Request example
curl -X POST \ -H "Content-Type: application/json" \ -d '{ "comment": "string", "name": "string"}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/attributes"
Response example
{ "author": "string", "comment": "string", "creationDate": "2024-01-01T00:00:00Z", "id": 0, "name": "string"}
Patch attribute
Code samples for "Patch attribute":
Request example
curl -X PATCH \ -H "Content-Type: application/json" \ -d '{ "comment": "string", "name": "string"}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/attributes/{id}"
Response example
{ "author": "string", "comment": "string", "creationDate": "2024-01-01T00:00:00Z", "id": 0, "name": "string"}
Get attribute permissions
Code samples for "Get attribute permissions":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/attributes/{id}/permissions"
Response example
{ "permissions": [ { "name": "string", "type": "user", "permissions": [ { "name": "string", "isOverride": true, "isEnabled": true, "valueInherited": true } ] } ]}
Set attribute permissions
Set attribute permissions
Code samples for "Set attribute permissions":
Request example
curl -X PUT \ -H "Content-Type: application/json" \ -d '{ "endUsersPermissions": [ { "name": "string", "type": "user", "permissions": [ { "name": "string", "isOverride": true, "isEnabled": true, "valueInherited": true } ] } ]}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/attributes/{id}/permissions"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
Get branches
Code samples for "Get branches":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/branches"
Response example
{ "cursor": { "next": "string", "previous": "string" }, "limit": 0, "results": [ { "author": "string", "canBeDeleted": true, "creationDate": "2024-01-01T00:00:00Z", "description": "string", "hidden": true, "id": 0, "isMain": true, "lastActivityDate": "2024-01-01T00:00:00Z", "lastChangesetId": 0, "lastChangesetName": "string", "merges": [ { "author": "string", "comment": "string", "destinationBranchId": 0, "destinationBranchName": "string", "destinationChangesetId": 0, "destinationIsMain": true, "mergeDate": "2024-01-01T00:00:00Z", "sourceBranchId": 0, "sourceBranchName": "string", "sourceChangesetId": 0 } ], "name": "string", "numberOfChangesets": 0, "numberOfReviews": 0, "status": "string" } ]}
Create a branch
Code samples for "Create a branch":
Request example
curl -X POST \ -H "Content-Type: application/json" \ -d '{ "changeset": 0, "comment": "", "name": "string"}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/branches"
Response example
{ "author": "string", "canBeDeleted": true, "creationDate": "2024-01-01T00:00:00Z", "description": "string", "hidden": true, "id": 0, "isMain": true, "lastActivityDate": "2024-01-01T00:00:00Z", "lastChangesetId": 0, "lastChangesetName": "string", "merges": [ { "author": "string", "comment": "string", "destinationBranchId": 0, "destinationBranchName": "string", "destinationChangesetId": 0, "destinationIsMain": true, "mergeDate": "2024-01-01T00:00:00Z", "sourceBranchId": 0, "sourceBranchName": "string", "sourceChangesetId": 0 } ], "name": "string", "numberOfChangesets": 0, "numberOfReviews": 0, "status": "string"}
Get a branch
Use to specify whether you are using name or id to lookup the branch
idTypeCode samples for "Get a branch":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/branches/{branchIdOrName}"
Response example
{ "attributesValues": [ { "attributeComment": "string", "attributeId": 0, "attributeName": "string", "lastUpdatedDate": "2024-01-01T00:00:00Z", "target": { "name": "string", "id": 0, "type": "branch" }, "value": "string" } ], "author": "string", "canBeDeleted": true, "creationDate": "2024-01-01T00:00:00Z", "description": "string", "hidden": true, "id": 0, "isMain": true, "lastActivityDate": "2024-01-01T00:00:00Z", "lastChangesetId": 0, "lastChangesetName": "string", "merges": [ { "author": "string", "comment": "string", "destinationBranchId": 0, "destinationBranchName": "string", "destinationChangesetId": 0, "destinationIsMain": true, "mergeDate": "2024-01-01T00:00:00Z", "sourceBranchId": 0, "sourceBranchName": "string", "sourceChangesetId": 0 } ], "name": "string", "numberOfChangesets": 0, "numberOfReviews": 0, "status": "string"}
Patch a branch
Code samples for "Patch a branch":
Request example
curl -X PATCH \ -H "Content-Type: application/json" \ -d '{ "hidden": true, "name": "string"}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/branches/{branchIdOrName}"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
Delete a branch
Code samples for "Delete a branch":
Request example
curl -X DELETE \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/branches/{branchIdOrName}"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
GET /organizations/{organizationName}/repositories/{repositoryName}/branches/{branchName}/folder-info
Get folder summary information for the branch root.
Code samples for "GET /organizations/{organizationName}/repositories/{repositoryName}/branches/{branchName}/folder-info":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/branches/{branchName}/folder-info"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
Get folder information (files, folders and total size in bytes) from a branch
Get folder information (files, folders and total size in bytes) from a branch
Code samples for "Get folder information (files, folders and total size in bytes) from a branch":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/branches/{branchName}/folder-info/{path}"
Response example
{ "files": 0, "folders": 0, "totalSize": 0}
GET /organizations/{organizationName}/repositories/{repositoryName}/branches/{branchName}/items
List items at the branch root.
Code samples for "GET /organizations/{organizationName}/repositories/{repositoryName}/branches/{branchName}/items":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/branches/{branchName}/items"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
Get items from a branch
Get items from a branch
Code samples for "Get items from a branch":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/branches/{branchName}/items/{path}"
Response example
{ "branch": "string", "branchId": 0, "changeset": 0, "children": [ { "revision": 0, "item": "string", "size": 0, "branch": "string", "branchId": 0, "changeset": 0, "comment": "string", "owner": "string", "date": "2024-01-01T00:00:00Z", "repository": "string", "type": "string", "contentType": "string", "xLink": { "xLinkChangeset": {}, "xLinkRelative": true, "xLinkOrganization": "string", "xLinkRepository": "string", "xLinkRoot": "string" } } ], "comment": "string", "contentType": "string", "date": "2024-01-01T00:00:00Z", "item": "string", "lock": { "date": "2024-01-01T00:00:00Z", "destinationBranchId": 0, "destinationBranchName": "string", "holderBranchId": 0, "holderBranchName": "string", "id": "string", "name": "string", "owner": "string", "status": "Retained" }, "owner": "string", "path": "string", "rawUrl": "string", "repository": "string", "revision": 0, "size": 0, "type": "string", "xLink": { "xLinkChangeset": {}, "xLinkRelative": true, "xLinkOrganization": "string", "xLinkRepository": "string", "xLinkRoot": "string" }}
Get an item permissions
Code samples for "Get an item permissions":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/branches/{branchName}/items/permissions/{path}"
Response example
{ "permissions": [ { "name": "string", "type": "user", "permissions": [ { "name": "string", "isOverride": true, "isEnabled": true, "valueInherited": true } ] } ]}
Set an item permissions
Set an item permissions
Code samples for "Set an item permissions":
Request example
curl -X PUT \ -H "Content-Type: application/json" \ -d '{ "endUsersPermissions": [ { "name": "string", "type": "user", "permissions": [ { "name": "string", "isOverride": true, "isEnabled": true, "valueInherited": true } ] } ]}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/branches/{branchName}/items/permissions/{path}"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
Get a branch permissions
Code samples for "Get a branch permissions":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/branches/{branchName}/permissions"
Response example
{ "permissions": [ { "name": "string", "type": "user", "permissions": [ { "name": "string", "isOverride": true, "isEnabled": true, "valueInherited": true } ] } ]}
Set a branch permissions
Set a branch permissions
Code samples for "Set a branch permissions":
Request example
curl -X PUT \ -H "Content-Type: application/json" \ -d '{ "endUsersPermissions": [ { "name": "string", "type": "user", "permissions": [ { "name": "string", "isOverride": true, "isEnabled": true, "valueInherited": true } ] } ]}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/branches/{branchName}/permissions"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
Get changesets
Code samples for "Get changesets":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/changesets"
Response example
{ "cursor": { "next": "string", "previous": "string" }, "limit": 0, "results": [ { "authorName": "string", "branchId": 0, "branchName": "string", "canBeDeleted": true, "codeReviewIds": [ 0 ], "comment": "string", "date": "2024-01-01T00:00:00Z", "guid": "string", "hasCodeReview": true, "id": 0, "labels": [ "string" ], "merges": [ { "author": "string", "comment": "string", "destinationBranchId": 0, "destinationBranchName": "string", "destinationChangesetId": 0, "destinationIsMain": true, "mergeDate": "2024-01-01T00:00:00Z", "sourceBranchId": 0, "sourceBranchName": "string", "sourceChangesetId": 0 } ], "name": "string" } ]}
GET /organizations/{organizationName}/repositories/{repositoryName}/changesets/{changesetId}/items
List items changed in a changeset (root path).
Code samples for "GET /organizations/{organizationName}/repositories/{repositoryName}/changesets/{changesetId}/items":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/changesets/{changesetId}/items"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
Get items from a changeset
Get items from a changeset
Code samples for "Get items from a changeset":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/changesets/{changesetId}/items/{path}"
Response example
{ "branch": "string", "branchId": 0, "changeset": 0, "children": [ { "revision": 0, "item": "string", "size": 0, "branch": "string", "branchId": 0, "changeset": 0, "comment": "string", "owner": "string", "date": "2024-01-01T00:00:00Z", "repository": "string", "type": "string", "contentType": "string", "xLink": { "xLinkChangeset": {}, "xLinkRelative": true, "xLinkOrganization": "string", "xLinkRepository": "string", "xLinkRoot": "string" } } ], "comment": "string", "contentType": "string", "date": "2024-01-01T00:00:00Z", "item": "string", "lock": { "date": "2024-01-01T00:00:00Z", "destinationBranchId": 0, "destinationBranchName": "string", "holderBranchId": 0, "holderBranchName": "string", "id": "string", "name": "string", "owner": "string", "status": "Retained" }, "owner": "string", "path": "string", "rawUrl": "string", "repository": "string", "revision": 0, "size": 0, "type": "string", "xLink": { "xLinkChangeset": {}, "xLinkRelative": true, "xLinkOrganization": "string", "xLinkRepository": "string", "xLinkRoot": "string" }}
GET /organizations/{organizationName}/repositories/{repositoryName}/changesets/{id}
Get changeset details.
Code samples for "GET /organizations/{organizationName}/repositories/{repositoryName}/changesets/{id}":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/changesets/{id}"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
PATCH /organizations/{organizationName}/repositories/{repositoryName}/changesets/{id}
Update changeset metadata.
Code samples for "PATCH /organizations/{organizationName}/repositories/{repositoryName}/changesets/{id}":
Request example
curl -X PATCH \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/changesets/{id}"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
DELETE /organizations/{organizationName}/repositories/{repositoryName}/changesets/{id}
Delete a changeset.
Code samples for "DELETE /organizations/{organizationName}/repositories/{repositoryName}/changesets/{id}":
Request example
curl -X DELETE \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/changesets/{id}"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
Get code reviews
Get a paginated list of code reviews.
Code samples for "Get code reviews":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/code-reviews"
Response example
{ "assignedToMe": 0, "reviewedCount": 0, "reviews": {}, "reworkRequiredCount": 0, "totalCount": 0, "underReviewCount": 0}
Create a code review
Create a code review with the given data.
Code samples for "Create a code review":
Request example
curl -X POST \ -H "Content-Type: application/json" \ -d '{ "description": "string", "object": { "type": "branch", "spec": "string" }, "reviewers": [ "string" ], "title": "string"}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/code-reviews"
Response example
{ "assignee": "string", "comments": [ { "type": "Comment", "id": 0, "uuid": "string", "owner": "user@example.com", "timestamp": "2024-01-01T00:00:00Z", "createdAt": "2024-01-01T00:00:00Z", "updatedAt": "2024-01-01T00:00:00Z", "itemId": 0, "itemPath": "string", "revisionId": 0, "locationSpec": "string", "commentText": "string", "reviewId": 0, "parentCommentId": 0, "changesetId": 0, "appliedInChangesetId": 0, "branchChangesetId": 0 } ], "commentsCount": 0, "createdAt": "2024-01-01T00:00:00Z", "description": "string", "id": 0, "mergeAllowed": true, "mergeIssues": "string", "merges": [ { "sourceChangesetId": 0, "sourceBranchId": 0, "sourceBranchName": "string", "destinationChangesetId": 0, "destinationBranchId": 0, "destinationBranchName": "string", "destinationIsMain": true, "mergeDate": "2024-01-01T00:00:00Z", "author": "string", "comment": "string" } ], "numberOfIssues": 0, "object": { "type": "branch", "spec": "string", "id": 0 }, "owner": "string", "repositoryName": "string", "reviewers": [ { "name": "user@example.com", "isGroup": true, "status": "under-review" } ], "status": "under-review", "title": "string", "unansweredQuestionsCount": 0, "updatedAt": "2024-01-01T00:00:00Z", "userCommentsCount": 0}
Delete code reviews
Delete code reviews by id
Code samples for "Delete code reviews":
Request example
curl -X DELETE \ -H "Content-Type: application/json" \ -d '{ "reviews": [ "string" ]}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/code-reviews"
Response example
{ "failures": [ "string" ]}
Get a code review
Get a code review by id
Code samples for "Get a code review":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/code-reviews/{codeReviewId}"
Response example
{ "assignee": "string", "comments": [ { "type": "Comment", "id": 0, "uuid": "string", "owner": "user@example.com", "timestamp": "2024-01-01T00:00:00Z", "createdAt": "2024-01-01T00:00:00Z", "updatedAt": "2024-01-01T00:00:00Z", "itemId": 0, "itemPath": "string", "revisionId": 0, "locationSpec": "string", "commentText": "string", "reviewId": 0, "parentCommentId": 0, "changesetId": 0, "appliedInChangesetId": 0, "branchChangesetId": 0 } ], "commentsCount": 0, "createdAt": "2024-01-01T00:00:00Z", "description": "string", "id": 0, "mergeAllowed": true, "mergeIssues": "string", "merges": [ { "sourceChangesetId": 0, "sourceBranchId": 0, "sourceBranchName": "string", "destinationChangesetId": 0, "destinationBranchId": 0, "destinationBranchName": "string", "destinationIsMain": true, "mergeDate": "2024-01-01T00:00:00Z", "author": "string", "comment": "string" } ], "numberOfIssues": 0, "object": { "type": "branch", "spec": "string", "id": 0 }, "owner": "string", "repositoryName": "string", "reviewers": [ { "name": "user@example.com", "isGroup": true, "status": "under-review" } ], "status": "under-review", "title": "string", "unansweredQuestionsCount": 0, "updatedAt": "2024-01-01T00:00:00Z", "userCommentsCount": 0}
Patch a code review
Patch a code review by id
Code samples for "Patch a code review":
Request example
curl -X PATCH \ -H "Content-Type: application/json" \ -d '{ "description": "string", "title": "string"}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/code-reviews/{codeReviewId}"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
Delete a code review
Code samples for "Delete a code review":
Request example
curl -X DELETE \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/code-reviews/{codeReviewId}"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
Get comments
Code samples for "Get comments":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/code-reviews/{codeReviewId}/comments"
Response example
{ "comments": [ { "type": "Comment", "id": 0, "uuid": "string", "owner": "user@example.com", "timestamp": "2024-01-01T00:00:00Z", "createdAt": "2024-01-01T00:00:00Z", "updatedAt": "2024-01-01T00:00:00Z", "itemId": 0, "itemPath": "string", "revisionId": 0, "locationSpec": "string", "commentText": "string", "reviewId": 0, "parentCommentId": 0, "changesetId": 0, "appliedInChangesetId": 0, "branchChangesetId": 0 } ]}
Add a comment
Add a comment to a code review.
Code samples for "Add a comment":
Request example
curl -X POST \ -H "Content-Type: application/json" \ -d '{ "changesetId": 0, "commentText": "string", "locationSpec": "string", "revisionId": 0, "type": "Change"}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/code-reviews/{codeReviewId}/comments"
Response example
{ "appliedInChangesetId": 0, "branchChangesetId": 0, "changesetId": 0, "commentText": "string", "createdAt": "2024-01-01T00:00:00Z", "id": 0, "itemId": 0, "itemPath": "string", "locationSpec": "string", "owner": "user@example.com", "parentCommentId": 0, "reviewId": 0, "revisionId": 0, "timestamp": "2024-01-01T00:00:00Z", "type": "Comment", "updatedAt": "2024-01-01T00:00:00Z", "uuid": "string"}
Patch a comment
Patch a comment for a code review.
Code samples for "Patch a comment":
Request example
curl -X PATCH \ -H "Content-Type: application/json" \ -d '{ "commentText": "string"}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/code-reviews/{codeReviewId}/comments/{commentId}"
Response example
{ "appliedInChangesetId": 0, "branchChangesetId": 0, "changesetId": 0, "commentText": "string", "createdAt": "2024-01-01T00:00:00Z", "id": 0, "itemId": 0, "itemPath": "string", "locationSpec": "string", "owner": "user@example.com", "parentCommentId": 0, "reviewId": 0, "revisionId": 0, "timestamp": "2024-01-01T00:00:00Z", "type": "Comment", "updatedAt": "2024-01-01T00:00:00Z", "uuid": "string"}
Delete a comment
Code samples for "Delete a comment":
Request example
curl -X DELETE \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/code-reviews/{codeReviewId}/comments/{commentId}"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
Resolve a comment
Resolve a comment on a code review.
Code samples for "Resolve a comment":
Request example
curl -X POST \ -H "Content-Type: application/json" \ -d '{ "changesetId": 0}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/code-reviews/{codeReviewId}/comments/{commentId}/resolutions"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
POST /organizations/{organizationName}/repositories/{repositoryName}/code-reviews/{codeReviewId}/comments/{parentCommentId}/replies
Post a reply to a code review comment thread.
Code samples for "POST /organizations/{organizationName}/repositories/{repositoryName}/code-reviews/{codeReviewId}/comments/{parentCommentId}/replies":
Request example
curl -X POST \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/code-reviews/{codeReviewId}/comments/{parentCommentId}/replies"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
Get reviewers
Code samples for "Get reviewers":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/code-reviews/{codeReviewId}/reviewers"
Response example
{ "reviewers": [ { "name": "user@example.com", "isGroup": true, "status": "under-review" } ]}
Add reviewers
Code samples for "Add reviewers":
Request example
curl -X POST \ -H "Content-Type: application/json" \ -d '{ "reviewers": [ { "name": "user@example.com", "isGroup": true, "status": "under-review" } ]}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/code-reviews/{codeReviewId}/reviewers"
Response example
{ "reviewers": [ { "name": "user@example.com", "isGroup": true, "status": "under-review" } ]}
Remove reviewers
Remove reviewers from a code review.
Code samples for "Remove reviewers":
Request example
curl -X DELETE \ -H "Content-Type: application/json" \ -d '{ "reviewers": [ { "name": "user@example.com", "isGroup": true } ]}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/code-reviews/{codeReviewId}/reviewers"
Response example
{ "failures": [ { "name": "user@example.com", "isGroup": true } ]}
Mark as reviewed
Mark a code review as the provided review status.
Code samples for "Mark as reviewed":
Request example
curl -X POST \ -H "Content-Type: application/json" \ -d '{ "comment": "string", "reviewerName": "user@example.com", "status": "under-review"}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/code-reviews/{codeReviewId}/reviews"
Response example
{ "appliedInChangesetId": 0, "branchChangesetId": 0, "changesetId": 0, "commentText": "string", "createdAt": "2024-01-01T00:00:00Z", "id": 0, "itemId": 0, "itemPath": "string", "locationSpec": "string", "owner": "user@example.com", "parentCommentId": 0, "reviewId": 0, "revisionId": 0, "timestamp": "2024-01-01T00:00:00Z", "type": "Comment", "updatedAt": "2024-01-01T00:00:00Z", "uuid": "string"}
Get a diff for branches
There is a source branch and a destination branch. Destination is not mandatory, if not provided, the diff will be with the origin branch of the source branch
Code samples for "Get a diff for branches":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/diffs/branches"
Response example
{ "added": [ { "mountId": "string", "itemId": 0, "path": "string", "srcPath": "string", "sourceRev": 0, "sourceRevSize": 0, "sourceChangeset": 0, "sourceBranch": 0, "sourceBranchName": "string", "dstRev": 0, "dstRevSize": 0, "dstChangeset": 0, "dstBranch": 0, "dstBranchName": "string", "timestamp": "string", "repoName": "string", "xlink": { "sourceData": "string", "sourceXLink": { "xLinkChangeset": {}, "xLinkRelative": true, "xLinkOrganization": "string", "xLinkRepository": "string", "xLinkRoot": "string" }, "dstData": "string", "dstXLink": { "xLinkChangeset": {}, "xLinkRelative": true, "xLinkOrganization": "string", "xLinkRepository": "string", "xLinkRoot": "string" } }, "type": "string", "diffInfo": { "drawingInfo": { "left": { "diffRegions": null, "insideLineRegions": null }, "right": { "diffRegions": null, "insideLineRegions": null } }, "lineMapping": { "sourceEditor": [ null ], "destinationEditor": [ null ] }, "moveInfo": { "regions": { "left": null, "right": null }, "diffRegions": { "left": null, "right": null }, "insideLineRegions": { "left": null, "right": null } }, "semanticInfo": { "left": { "diffIcons": null }, "right": { "diffIcons": null } } }, "lock": { "id": "string", "name": "string", "holderBranchName": "string", "holderBranchId": 0, "destinationBranchName": "string", "destinationBranchId": 0, "owner": "string", "date": "2024-01-01T00:00:00Z", "status": "Retained" } } ], "author": "string", "changed": [ { "mountId": "string", "itemId": 0, "path": "string", "srcPath": "string", "sourceRev": 0, "sourceRevSize": 0, "sourceChangeset": 0, "sourceBranch": 0, "sourceBranchName": "string", "dstRev": 0, "dstRevSize": 0, "dstChangeset": 0, "dstBranch": 0, "dstBranchName": "string", "timestamp": "string", "repoName": "string", "xlink": { "sourceData": "string", "sourceXLink": { "xLinkChangeset": {}, "xLinkRelative": true, "xLinkOrganization": "string", "xLinkRepository": "string", "xLinkRoot": "string" }, "dstData": "string", "dstXLink": { "xLinkChangeset": {}, "xLinkRelative": true, "xLinkOrganization": "string", "xLinkRepository": "string", "xLinkRoot": "string" } }, "type": "string", "diffInfo": { "drawingInfo": { "left": { "diffRegions": null, "insideLineRegions": null }, "right": { "diffRegions": null, "insideLineRegions": null } }, "lineMapping": { "sourceEditor": [ null ], "destinationEditor": [ null ] }, "moveInfo": { "regions": { "left": null, "right": null }, "diffRegions": { "left": null, "right": null }, "insideLineRegions": { "left": null, "right": null } }, "semanticInfo": { "left": { "diffIcons": null }, "right": { "diffIcons": null } } }, "lock": { "id": "string", "name": "string", "holderBranchName": "string", "holderBranchId": 0, "destinationBranchName": "string", "destinationBranchId": 0, "owner": "string", "date": "2024-01-01T00:00:00Z", "status": "Retained" } } ], "comment": "string", "deleted": [ { "mountId": "string", "itemId": 0, "path": "string", "srcPath": "string", "sourceRev": 0, "sourceRevSize": 0, "sourceChangeset": 0, "sourceBranch": 0, "sourceBranchName": "string", "dstRev": 0, "dstRevSize": 0, "dstChangeset": 0, "dstBranch": 0, "dstBranchName": "string", "timestamp": "string", "repoName": "string", "xlink": { "sourceData": "string", "sourceXLink": { "xLinkChangeset": {}, "xLinkRelative": true, "xLinkOrganization": "string", "xLinkRepository": "string", "xLinkRoot": "string" }, "dstData": "string", "dstXLink": { "xLinkChangeset": {}, "xLinkRelative": true, "xLinkOrganization": "string", "xLinkRepository": "string", "xLinkRoot": "string" } }, "type": "string", "diffInfo": { "drawingInfo": { "left": { "diffRegions": null, "insideLineRegions": null }, "right": { "diffRegions": null, "insideLineRegions": null } }, "lineMapping": { "sourceEditor": [ null ], "destinationEditor": [ null ] }, "moveInfo": { "regions": { "left": null, "right": null }, "diffRegions": { "left": null, "right": null }, "insideLineRegions": { "left": null, "right": null } }, "semanticInfo": { "left": { "diffIcons": null }, "right": { "diffIcons": null } } }, "lock": { "id": "string", "name": "string", "holderBranchName": "string", "holderBranchId": 0, "destinationBranchName": "string", "destinationBranchId": 0, "owner": "string", "date": "2024-01-01T00:00:00Z", "status": "Retained" } } ], "destination": "string", "destinationId": 0, "fsProtectionChanged": [ { "mountId": "string", "itemId": 0, "path": "string", "srcPath": "string", "sourceRev": 0, "sourceRevSize": 0, "sourceChangeset": 0, "sourceBranch": 0, "sourceBranchName": "string", "dstRev": 0, "dstRevSize": 0, "dstChangeset": 0, "dstBranch": 0, "dstBranchName": "string", "timestamp": "string", "repoName": "string", "xlink": { "sourceData": "string", "sourceXLink": { "xLinkChangeset": {}, "xLinkRelative": true, "xLinkOrganization": "string", "xLinkRepository": "string", "xLinkRoot": "string" }, "dstData": "string", "dstXLink": { "xLinkChangeset": {}, "xLinkRelative": true, "xLinkOrganization": "string", "xLinkRepository": "string", "xLinkRoot": "string" } }, "type": "string", "diffInfo": { "drawingInfo": { "left": { "diffRegions": null, "insideLineRegions": null }, "right": { "diffRegions": null, "insideLineRegions": null } }, "lineMapping": { "sourceEditor": [ null ], "destinationEditor": [ null ] }, "moveInfo": { "regions": { "left": null, "right": null }, "diffRegions": { "left": null, "right": null }, "insideLineRegions": { "left": null, "right": null } }, "semanticInfo": { "left": { "diffIcons": null }, "right": { "diffIcons": null } } }, "lock": { "id": "string", "name": "string", "holderBranchName": "string", "holderBranchId": 0, "destinationBranchName": "string", "destinationBranchId": 0, "owner": "string", "date": "2024-01-01T00:00:00Z", "status": "Retained" } } ], "mergeGroups": [ { "itemId": 0, "branchName": "string", "branchId": 0, "repoName": "string", "merged": [ { "mountId": "string", "itemId": 0, "path": "string", "srcPath": "string", "sourceRev": 0, "sourceRevSize": 0, "sourceChangeset": 0, "sourceBranch": 0, "sourceBranchName": "string", "dstRev": 0, "dstRevSize": 0, "dstChangeset": 0, "dstBranch": 0, "dstBranchName": "string", "timestamp": "string", "repoName": "string", "xlink": { "sourceData": null, "sourceXLink": null, "dstData": null, "dstXLink": null }, "type": "string", "diffInfo": { "drawingInfo": null, "lineMapping": null, "moveInfo": null, "semanticInfo": null }, "lock": { "id": null, "name": null, "holderBranchName": null, "holderBranchId": null, "destinationBranchName": null, "destinationBranchId": null, "owner": null, "date": null, "status": null } } ], "added": [ { "mountId": "string", "itemId": 0, "path": "string", "srcPath": "string", "sourceRev": 0, "sourceRevSize": 0, "sourceChangeset": 0, "sourceBranch": 0, "sourceBranchName": "string", "dstRev": 0, "dstRevSize": 0, "dstChangeset": 0, "dstBranch": 0, "dstBranchName": "string", "timestamp": "string", "repoName": "string", "xlink": { "sourceData": null, "sourceXLink": null, "dstData": null, "dstXLink": null }, "type": "string", "diffInfo": { "drawingInfo": null, "lineMapping": null, "moveInfo": null, "semanticInfo": null }, "lock": { "id": null, "name": null, "holderBranchName": null, "holderBranchId": null, "destinationBranchName": null, "destinationBranchId": null, "owner": null, "date": null, "status": null } } ], "changed": [ { "mountId": "string", "itemId": 0, "path": "string", "srcPath": "string", "sourceRev": 0, "sourceRevSize": 0, "sourceChangeset": 0, "sourceBranch": 0, "sourceBranchName": "string", "dstRev": 0, "dstRevSize": 0, "dstChangeset": 0, "dstBranch": 0, "dstBranchName": "string", "timestamp": "string", "repoName": "string", "xlink": { "sourceData": null, "sourceXLink": null, "dstData": null, "dstXLink": null }, "type": "string", "diffInfo": { "drawingInfo": null, "lineMapping": null, "moveInfo": null, "semanticInfo": null }, "lock": { "id": null, "name": null, "holderBranchName": null, "holderBranchId": null, "destinationBranchName": null, "destinationBranchId": null, "owner": null, "date": null, "status": null } } ], "moved": [ { "mountId": "string", "itemId": 0, "path": "string", "srcPath": "string", "sourceRev": 0, "sourceRevSize": 0, "sourceChangeset": 0, "sourceBranch": 0, "sourceBranchName": "string", "dstRev": 0, "dstRevSize": 0, "dstChangeset": 0, "dstBranch": 0, "dstBranchName": "string", "timestamp": "string", "repoName": "string", "xlink": { "sourceData": null, "sourceXLink": null, "dstData": null, "dstXLink": null }, "type": "string", "diffInfo": { "drawingInfo": null, "lineMapping": null, "moveInfo": null, "semanticInfo": null }, "lock": { "id": null, "name": null, "holderBranchName": null, "holderBranchId": null, "destinationBranchName": null, "destinationBranchId": null, "owner": null, "date": null, "status": null } } ], "deleted": [ { "mountId": "string", "itemId": 0, "path": "string", "srcPath": "string", "sourceRev": 0, "sourceRevSize": 0, "sourceChangeset": 0, "sourceBranch": 0, "sourceBranchName": "string", "dstRev": 0, "dstRevSize": 0, "dstChangeset": 0, "dstBranch": 0, "dstBranchName": "string", "timestamp": "string", "repoName": "string", "xlink": { "sourceData": null, "sourceXLink": null, "dstData": null, "dstXLink": null }, "type": "string", "diffInfo": { "drawingInfo": null, "lineMapping": null, "moveInfo": null, "semanticInfo": null }, "lock": { "id": null, "name": null, "holderBranchName": null, "holderBranchId": null, "destinationBranchName": null, "destinationBranchId": null, "owner": null, "date": null, "status": null } } ] } ], "merged": [ { "mountId": "string", "itemId": 0, "path": "string", "srcPath": "string", "sourceRev": 0, "sourceRevSize": 0, "sourceChangeset": 0, "sourceBranch": 0, "sourceBranchName": "string", "dstRev": 0, "dstRevSize": 0, "dstChangeset": 0, "dstBranch": 0, "dstBranchName": "string", "timestamp": "string", "repoName": "string", "xlink": { "sourceData": "string", "sourceXLink": { "xLinkChangeset": {}, "xLinkRelative": true, "xLinkOrganization": "string", "xLinkRepository": "string", "xLinkRoot": "string" }, "dstData": "string", "dstXLink": { "xLinkChangeset": {}, "xLinkRelative": true, "xLinkOrganization": "string", "xLinkRepository": "string", "xLinkRoot": "string" } }, "type": "string", "diffInfo": { "drawingInfo": { "left": { "diffRegions": null, "insideLineRegions": null }, "right": { "diffRegions": null, "insideLineRegions": null } }, "lineMapping": { "sourceEditor": [ null ], "destinationEditor": [ null ] }, "moveInfo": { "regions": { "left": null, "right": null }, "diffRegions": { "left": null, "right": null }, "insideLineRegions": { "left": null, "right": null } }, "semanticInfo": { "left": { "diffIcons": null }, "right": { "diffIcons": null } } }, "lock": { "id": "string", "name": "string", "holderBranchName": "string", "holderBranchId": 0, "destinationBranchName": "string", "destinationBranchId": 0, "owner": "string", "date": "2024-01-01T00:00:00Z", "status": "Retained" } } ], "moved": [ { "mountId": "string", "itemId": 0, "path": "string", "srcPath": "string", "sourceRev": 0, "sourceRevSize": 0, "sourceChangeset": 0, "sourceBranch": 0, "sourceBranchName": "string", "dstRev": 0, "dstRevSize": 0, "dstChangeset": 0, "dstBranch": 0, "dstBranchName": "string", "timestamp": "string", "repoName": "string", "xlink": { "sourceData": "string", "sourceXLink": { "xLinkChangeset": {}, "xLinkRelative": true, "xLinkOrganization": "string", "xLinkRepository": "string", "xLinkRoot": "string" }, "dstData": "string", "dstXLink": { "xLinkChangeset": {}, "xLinkRelative": true, "xLinkOrganization": "string", "xLinkRepository": "string", "xLinkRoot": "string" } }, "type": "string", "diffInfo": { "drawingInfo": { "left": { "diffRegions": null, "insideLineRegions": null }, "right": { "diffRegions": null, "insideLineRegions": null } }, "lineMapping": { "sourceEditor": [ null ], "destinationEditor": [ null ] }, "moveInfo": { "regions": { "left": null, "right": null }, "diffRegions": { "left": null, "right": null }, "insideLineRegions": { "left": null, "right": null } }, "semanticInfo": { "left": { "diffIcons": null }, "right": { "diffIcons": null } } }, "lock": { "id": "string", "name": "string", "holderBranchName": "string", "holderBranchId": 0, "destinationBranchName": "string", "destinationBranchId": 0, "owner": "string", "date": "2024-01-01T00:00:00Z", "status": "Retained" } } ], "objectType": "string", "refactorGroups": [ { "itemId": 0, "branchName": "string", "branchId": 0, "repoName": "string", "merged": [ { "mountId": "string", "itemId": 0, "path": "string", "srcPath": "string", "sourceRev": 0, "sourceRevSize": 0, "sourceChangeset": 0, "sourceBranch": 0, "sourceBranchName": "string", "dstRev": 0, "dstRevSize": 0, "dstChangeset": 0, "dstBranch": 0, "dstBranchName": "string", "timestamp": "string", "repoName": "string", "xlink": { "sourceData": null, "sourceXLink": null, "dstData": null, "dstXLink": null }, "type": "string", "diffInfo": { "drawingInfo": null, "lineMapping": null, "moveInfo": null, "semanticInfo": null }, "lock": { "id": null, "name": null, "holderBranchName": null, "holderBranchId": null, "destinationBranchName": null, "destinationBranchId": null, "owner": null, "date": null, "status": null } } ], "added": [ { "mountId": "string", "itemId": 0, "path": "string", "srcPath": "string", "sourceRev": 0, "sourceRevSize": 0, "sourceChangeset": 0, "sourceBranch": 0, "sourceBranchName": "string", "dstRev": 0, "dstRevSize": 0, "dstChangeset": 0, "dstBranch": 0, "dstBranchName": "string", "timestamp": "string", "repoName": "string", "xlink": { "sourceData": null, "sourceXLink": null, "dstData": null, "dstXLink": null }, "type": "string", "diffInfo": { "drawingInfo": null, "lineMapping": null, "moveInfo": null, "semanticInfo": null }, "lock": { "id": null, "name": null, "holderBranchName": null, "holderBranchId": null, "destinationBranchName": null, "destinationBranchId": null, "owner": null, "date": null, "status": null } } ], "changed": [ { "mountId": "string", "itemId": 0, "path": "string", "srcPath": "string", "sourceRev": 0, "sourceRevSize": 0, "sourceChangeset": 0, "sourceBranch": 0, "sourceBranchName": "string", "dstRev": 0, "dstRevSize": 0, "dstChangeset": 0, "dstBranch": 0, "dstBranchName": "string", "timestamp": "string", "repoName": "string", "xlink": { "sourceData": null, "sourceXLink": null, "dstData": null, "dstXLink": null }, "type": "string", "diffInfo": { "drawingInfo": null, "lineMapping": null, "moveInfo": null, "semanticInfo": null }, "lock": { "id": null, "name": null, "holderBranchName": null, "holderBranchId": null, "destinationBranchName": null, "destinationBranchId": null, "owner": null, "date": null, "status": null } } ], "moved": [ { "mountId": "string", "itemId": 0, "path": "string", "srcPath": "string", "sourceRev": 0, "sourceRevSize": 0, "sourceChangeset": 0, "sourceBranch": 0, "sourceBranchName": "string", "dstRev": 0, "dstRevSize": 0, "dstChangeset": 0, "dstBranch": 0, "dstBranchName": "string", "timestamp": "string", "repoName": "string", "xlink": { "sourceData": null, "sourceXLink": null, "dstData": null, "dstXLink": null }, "type": "string", "diffInfo": { "drawingInfo": null, "lineMapping": null, "moveInfo": null, "semanticInfo": null }, "lock": { "id": null, "name": null, "holderBranchName": null, "holderBranchId": null, "destinationBranchName": null, "destinationBranchId": null, "owner": null, "date": null, "status": null } } ], "deleted": [ { "mountId": "string", "itemId": 0, "path": "string", "srcPath": "string", "sourceRev": 0, "sourceRevSize": 0, "sourceChangeset": 0, "sourceBranch": 0, "sourceBranchName": "string", "dstRev": 0, "dstRevSize": 0, "dstChangeset": 0, "dstBranch": 0, "dstBranchName": "string", "timestamp": "string", "repoName": "string", "xlink": { "sourceData": null, "sourceXLink": null, "dstData": null, "dstXLink": null }, "type": "string", "diffInfo": { "drawingInfo": null, "lineMapping": null, "moveInfo": null, "semanticInfo": null }, "lock": { "id": null, "name": null, "holderBranchName": null, "holderBranchId": null, "destinationBranchName": null, "destinationBranchId": null, "owner": null, "date": null, "status": null } } ] } ], "repository": "string", "source": "string", "timestamp": "string"}
GET /organizations/{organizationName}/repositories/{repositoryName}/diffs/changesets/{changesetId}
Get a diff for a single changeset (no destination changeset in path).
Code samples for "GET /organizations/{organizationName}/repositories/{repositoryName}/diffs/changesets/{changesetId}":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/diffs/changesets/{changesetId}"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
Get a changeset diff
Get a changeset diff
Code samples for "Get a changeset diff":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/diffs/changesets/{changesetId}/{destinationChangesetId}"
Response example
{ "added": [ { "mountId": "string", "itemId": 0, "path": "string", "srcPath": "string", "sourceRev": 0, "sourceRevSize": 0, "sourceChangeset": 0, "sourceBranch": 0, "sourceBranchName": "string", "dstRev": 0, "dstRevSize": 0, "dstChangeset": 0, "dstBranch": 0, "dstBranchName": "string", "timestamp": "string", "repoName": "string", "xlink": { "sourceData": "string", "sourceXLink": { "xLinkChangeset": {}, "xLinkRelative": true, "xLinkOrganization": "string", "xLinkRepository": "string", "xLinkRoot": "string" }, "dstData": "string", "dstXLink": { "xLinkChangeset": {}, "xLinkRelative": true, "xLinkOrganization": "string", "xLinkRepository": "string", "xLinkRoot": "string" } }, "type": "string", "diffInfo": { "drawingInfo": { "left": { "diffRegions": null, "insideLineRegions": null }, "right": { "diffRegions": null, "insideLineRegions": null } }, "lineMapping": { "sourceEditor": [ null ], "destinationEditor": [ null ] }, "moveInfo": { "regions": { "left": null, "right": null }, "diffRegions": { "left": null, "right": null }, "insideLineRegions": { "left": null, "right": null } }, "semanticInfo": { "left": { "diffIcons": null }, "right": { "diffIcons": null } } }, "lock": { "id": "string", "name": "string", "holderBranchName": "string", "holderBranchId": 0, "destinationBranchName": "string", "destinationBranchId": 0, "owner": "string", "date": "2024-01-01T00:00:00Z", "status": "Retained" } } ], "author": "string", "changed": [ { "mountId": "string", "itemId": 0, "path": "string", "srcPath": "string", "sourceRev": 0, "sourceRevSize": 0, "sourceChangeset": 0, "sourceBranch": 0, "sourceBranchName": "string", "dstRev": 0, "dstRevSize": 0, "dstChangeset": 0, "dstBranch": 0, "dstBranchName": "string", "timestamp": "string", "repoName": "string", "xlink": { "sourceData": "string", "sourceXLink": { "xLinkChangeset": {}, "xLinkRelative": true, "xLinkOrganization": "string", "xLinkRepository": "string", "xLinkRoot": "string" }, "dstData": "string", "dstXLink": { "xLinkChangeset": {}, "xLinkRelative": true, "xLinkOrganization": "string", "xLinkRepository": "string", "xLinkRoot": "string" } }, "type": "string", "diffInfo": { "drawingInfo": { "left": { "diffRegions": null, "insideLineRegions": null }, "right": { "diffRegions": null, "insideLineRegions": null } }, "lineMapping": { "sourceEditor": [ null ], "destinationEditor": [ null ] }, "moveInfo": { "regions": { "left": null, "right": null }, "diffRegions": { "left": null, "right": null }, "insideLineRegions": { "left": null, "right": null } }, "semanticInfo": { "left": { "diffIcons": null }, "right": { "diffIcons": null } } }, "lock": { "id": "string", "name": "string", "holderBranchName": "string", "holderBranchId": 0, "destinationBranchName": "string", "destinationBranchId": 0, "owner": "string", "date": "2024-01-01T00:00:00Z", "status": "Retained" } } ], "comment": "string", "deleted": [ { "mountId": "string", "itemId": 0, "path": "string", "srcPath": "string", "sourceRev": 0, "sourceRevSize": 0, "sourceChangeset": 0, "sourceBranch": 0, "sourceBranchName": "string", "dstRev": 0, "dstRevSize": 0, "dstChangeset": 0, "dstBranch": 0, "dstBranchName": "string", "timestamp": "string", "repoName": "string", "xlink": { "sourceData": "string", "sourceXLink": { "xLinkChangeset": {}, "xLinkRelative": true, "xLinkOrganization": "string", "xLinkRepository": "string", "xLinkRoot": "string" }, "dstData": "string", "dstXLink": { "xLinkChangeset": {}, "xLinkRelative": true, "xLinkOrganization": "string", "xLinkRepository": "string", "xLinkRoot": "string" } }, "type": "string", "diffInfo": { "drawingInfo": { "left": { "diffRegions": null, "insideLineRegions": null }, "right": { "diffRegions": null, "insideLineRegions": null } }, "lineMapping": { "sourceEditor": [ null ], "destinationEditor": [ null ] }, "moveInfo": { "regions": { "left": null, "right": null }, "diffRegions": { "left": null, "right": null }, "insideLineRegions": { "left": null, "right": null } }, "semanticInfo": { "left": { "diffIcons": null }, "right": { "diffIcons": null } } }, "lock": { "id": "string", "name": "string", "holderBranchName": "string", "holderBranchId": 0, "destinationBranchName": "string", "destinationBranchId": 0, "owner": "string", "date": "2024-01-01T00:00:00Z", "status": "Retained" } } ], "destination": "string", "destinationId": 0, "fsProtectionChanged": [ { "mountId": "string", "itemId": 0, "path": "string", "srcPath": "string", "sourceRev": 0, "sourceRevSize": 0, "sourceChangeset": 0, "sourceBranch": 0, "sourceBranchName": "string", "dstRev": 0, "dstRevSize": 0, "dstChangeset": 0, "dstBranch": 0, "dstBranchName": "string", "timestamp": "string", "repoName": "string", "xlink": { "sourceData": "string", "sourceXLink": { "xLinkChangeset": {}, "xLinkRelative": true, "xLinkOrganization": "string", "xLinkRepository": "string", "xLinkRoot": "string" }, "dstData": "string", "dstXLink": { "xLinkChangeset": {}, "xLinkRelative": true, "xLinkOrganization": "string", "xLinkRepository": "string", "xLinkRoot": "string" } }, "type": "string", "diffInfo": { "drawingInfo": { "left": { "diffRegions": null, "insideLineRegions": null }, "right": { "diffRegions": null, "insideLineRegions": null } }, "lineMapping": { "sourceEditor": [ null ], "destinationEditor": [ null ] }, "moveInfo": { "regions": { "left": null, "right": null }, "diffRegions": { "left": null, "right": null }, "insideLineRegions": { "left": null, "right": null } }, "semanticInfo": { "left": { "diffIcons": null }, "right": { "diffIcons": null } } }, "lock": { "id": "string", "name": "string", "holderBranchName": "string", "holderBranchId": 0, "destinationBranchName": "string", "destinationBranchId": 0, "owner": "string", "date": "2024-01-01T00:00:00Z", "status": "Retained" } } ], "mergeGroups": [ { "itemId": 0, "branchName": "string", "branchId": 0, "repoName": "string", "merged": [ { "mountId": "string", "itemId": 0, "path": "string", "srcPath": "string", "sourceRev": 0, "sourceRevSize": 0, "sourceChangeset": 0, "sourceBranch": 0, "sourceBranchName": "string", "dstRev": 0, "dstRevSize": 0, "dstChangeset": 0, "dstBranch": 0, "dstBranchName": "string", "timestamp": "string", "repoName": "string", "xlink": { "sourceData": null, "sourceXLink": null, "dstData": null, "dstXLink": null }, "type": "string", "diffInfo": { "drawingInfo": null, "lineMapping": null, "moveInfo": null, "semanticInfo": null }, "lock": { "id": null, "name": null, "holderBranchName": null, "holderBranchId": null, "destinationBranchName": null, "destinationBranchId": null, "owner": null, "date": null, "status": null } } ], "added": [ { "mountId": "string", "itemId": 0, "path": "string", "srcPath": "string", "sourceRev": 0, "sourceRevSize": 0, "sourceChangeset": 0, "sourceBranch": 0, "sourceBranchName": "string", "dstRev": 0, "dstRevSize": 0, "dstChangeset": 0, "dstBranch": 0, "dstBranchName": "string", "timestamp": "string", "repoName": "string", "xlink": { "sourceData": null, "sourceXLink": null, "dstData": null, "dstXLink": null }, "type": "string", "diffInfo": { "drawingInfo": null, "lineMapping": null, "moveInfo": null, "semanticInfo": null }, "lock": { "id": null, "name": null, "holderBranchName": null, "holderBranchId": null, "destinationBranchName": null, "destinationBranchId": null, "owner": null, "date": null, "status": null } } ], "changed": [ { "mountId": "string", "itemId": 0, "path": "string", "srcPath": "string", "sourceRev": 0, "sourceRevSize": 0, "sourceChangeset": 0, "sourceBranch": 0, "sourceBranchName": "string", "dstRev": 0, "dstRevSize": 0, "dstChangeset": 0, "dstBranch": 0, "dstBranchName": "string", "timestamp": "string", "repoName": "string", "xlink": { "sourceData": null, "sourceXLink": null, "dstData": null, "dstXLink": null }, "type": "string", "diffInfo": { "drawingInfo": null, "lineMapping": null, "moveInfo": null, "semanticInfo": null }, "lock": { "id": null, "name": null, "holderBranchName": null, "holderBranchId": null, "destinationBranchName": null, "destinationBranchId": null, "owner": null, "date": null, "status": null } } ], "moved": [ { "mountId": "string", "itemId": 0, "path": "string", "srcPath": "string", "sourceRev": 0, "sourceRevSize": 0, "sourceChangeset": 0, "sourceBranch": 0, "sourceBranchName": "string", "dstRev": 0, "dstRevSize": 0, "dstChangeset": 0, "dstBranch": 0, "dstBranchName": "string", "timestamp": "string", "repoName": "string", "xlink": { "sourceData": null, "sourceXLink": null, "dstData": null, "dstXLink": null }, "type": "string", "diffInfo": { "drawingInfo": null, "lineMapping": null, "moveInfo": null, "semanticInfo": null }, "lock": { "id": null, "name": null, "holderBranchName": null, "holderBranchId": null, "destinationBranchName": null, "destinationBranchId": null, "owner": null, "date": null, "status": null } } ], "deleted": [ { "mountId": "string", "itemId": 0, "path": "string", "srcPath": "string", "sourceRev": 0, "sourceRevSize": 0, "sourceChangeset": 0, "sourceBranch": 0, "sourceBranchName": "string", "dstRev": 0, "dstRevSize": 0, "dstChangeset": 0, "dstBranch": 0, "dstBranchName": "string", "timestamp": "string", "repoName": "string", "xlink": { "sourceData": null, "sourceXLink": null, "dstData": null, "dstXLink": null }, "type": "string", "diffInfo": { "drawingInfo": null, "lineMapping": null, "moveInfo": null, "semanticInfo": null }, "lock": { "id": null, "name": null, "holderBranchName": null, "holderBranchId": null, "destinationBranchName": null, "destinationBranchId": null, "owner": null, "date": null, "status": null } } ] } ], "merged": [ { "mountId": "string", "itemId": 0, "path": "string", "srcPath": "string", "sourceRev": 0, "sourceRevSize": 0, "sourceChangeset": 0, "sourceBranch": 0, "sourceBranchName": "string", "dstRev": 0, "dstRevSize": 0, "dstChangeset": 0, "dstBranch": 0, "dstBranchName": "string", "timestamp": "string", "repoName": "string", "xlink": { "sourceData": "string", "sourceXLink": { "xLinkChangeset": {}, "xLinkRelative": true, "xLinkOrganization": "string", "xLinkRepository": "string", "xLinkRoot": "string" }, "dstData": "string", "dstXLink": { "xLinkChangeset": {}, "xLinkRelative": true, "xLinkOrganization": "string", "xLinkRepository": "string", "xLinkRoot": "string" } }, "type": "string", "diffInfo": { "drawingInfo": { "left": { "diffRegions": null, "insideLineRegions": null }, "right": { "diffRegions": null, "insideLineRegions": null } }, "lineMapping": { "sourceEditor": [ null ], "destinationEditor": [ null ] }, "moveInfo": { "regions": { "left": null, "right": null }, "diffRegions": { "left": null, "right": null }, "insideLineRegions": { "left": null, "right": null } }, "semanticInfo": { "left": { "diffIcons": null }, "right": { "diffIcons": null } } }, "lock": { "id": "string", "name": "string", "holderBranchName": "string", "holderBranchId": 0, "destinationBranchName": "string", "destinationBranchId": 0, "owner": "string", "date": "2024-01-01T00:00:00Z", "status": "Retained" } } ], "moved": [ { "mountId": "string", "itemId": 0, "path": "string", "srcPath": "string", "sourceRev": 0, "sourceRevSize": 0, "sourceChangeset": 0, "sourceBranch": 0, "sourceBranchName": "string", "dstRev": 0, "dstRevSize": 0, "dstChangeset": 0, "dstBranch": 0, "dstBranchName": "string", "timestamp": "string", "repoName": "string", "xlink": { "sourceData": "string", "sourceXLink": { "xLinkChangeset": {}, "xLinkRelative": true, "xLinkOrganization": "string", "xLinkRepository": "string", "xLinkRoot": "string" }, "dstData": "string", "dstXLink": { "xLinkChangeset": {}, "xLinkRelative": true, "xLinkOrganization": "string", "xLinkRepository": "string", "xLinkRoot": "string" } }, "type": "string", "diffInfo": { "drawingInfo": { "left": { "diffRegions": null, "insideLineRegions": null }, "right": { "diffRegions": null, "insideLineRegions": null } }, "lineMapping": { "sourceEditor": [ null ], "destinationEditor": [ null ] }, "moveInfo": { "regions": { "left": null, "right": null }, "diffRegions": { "left": null, "right": null }, "insideLineRegions": { "left": null, "right": null } }, "semanticInfo": { "left": { "diffIcons": null }, "right": { "diffIcons": null } } }, "lock": { "id": "string", "name": "string", "holderBranchName": "string", "holderBranchId": 0, "destinationBranchName": "string", "destinationBranchId": 0, "owner": "string", "date": "2024-01-01T00:00:00Z", "status": "Retained" } } ], "objectType": "string", "refactorGroups": [ { "itemId": 0, "branchName": "string", "branchId": 0, "repoName": "string", "merged": [ { "mountId": "string", "itemId": 0, "path": "string", "srcPath": "string", "sourceRev": 0, "sourceRevSize": 0, "sourceChangeset": 0, "sourceBranch": 0, "sourceBranchName": "string", "dstRev": 0, "dstRevSize": 0, "dstChangeset": 0, "dstBranch": 0, "dstBranchName": "string", "timestamp": "string", "repoName": "string", "xlink": { "sourceData": null, "sourceXLink": null, "dstData": null, "dstXLink": null }, "type": "string", "diffInfo": { "drawingInfo": null, "lineMapping": null, "moveInfo": null, "semanticInfo": null }, "lock": { "id": null, "name": null, "holderBranchName": null, "holderBranchId": null, "destinationBranchName": null, "destinationBranchId": null, "owner": null, "date": null, "status": null } } ], "added": [ { "mountId": "string", "itemId": 0, "path": "string", "srcPath": "string", "sourceRev": 0, "sourceRevSize": 0, "sourceChangeset": 0, "sourceBranch": 0, "sourceBranchName": "string", "dstRev": 0, "dstRevSize": 0, "dstChangeset": 0, "dstBranch": 0, "dstBranchName": "string", "timestamp": "string", "repoName": "string", "xlink": { "sourceData": null, "sourceXLink": null, "dstData": null, "dstXLink": null }, "type": "string", "diffInfo": { "drawingInfo": null, "lineMapping": null, "moveInfo": null, "semanticInfo": null }, "lock": { "id": null, "name": null, "holderBranchName": null, "holderBranchId": null, "destinationBranchName": null, "destinationBranchId": null, "owner": null, "date": null, "status": null } } ], "changed": [ { "mountId": "string", "itemId": 0, "path": "string", "srcPath": "string", "sourceRev": 0, "sourceRevSize": 0, "sourceChangeset": 0, "sourceBranch": 0, "sourceBranchName": "string", "dstRev": 0, "dstRevSize": 0, "dstChangeset": 0, "dstBranch": 0, "dstBranchName": "string", "timestamp": "string", "repoName": "string", "xlink": { "sourceData": null, "sourceXLink": null, "dstData": null, "dstXLink": null }, "type": "string", "diffInfo": { "drawingInfo": null, "lineMapping": null, "moveInfo": null, "semanticInfo": null }, "lock": { "id": null, "name": null, "holderBranchName": null, "holderBranchId": null, "destinationBranchName": null, "destinationBranchId": null, "owner": null, "date": null, "status": null } } ], "moved": [ { "mountId": "string", "itemId": 0, "path": "string", "srcPath": "string", "sourceRev": 0, "sourceRevSize": 0, "sourceChangeset": 0, "sourceBranch": 0, "sourceBranchName": "string", "dstRev": 0, "dstRevSize": 0, "dstChangeset": 0, "dstBranch": 0, "dstBranchName": "string", "timestamp": "string", "repoName": "string", "xlink": { "sourceData": null, "sourceXLink": null, "dstData": null, "dstXLink": null }, "type": "string", "diffInfo": { "drawingInfo": null, "lineMapping": null, "moveInfo": null, "semanticInfo": null }, "lock": { "id": null, "name": null, "holderBranchName": null, "holderBranchId": null, "destinationBranchName": null, "destinationBranchId": null, "owner": null, "date": null, "status": null } } ], "deleted": [ { "mountId": "string", "itemId": 0, "path": "string", "srcPath": "string", "sourceRev": 0, "sourceRevSize": 0, "sourceChangeset": 0, "sourceBranch": 0, "sourceBranchName": "string", "dstRev": 0, "dstRevSize": 0, "dstChangeset": 0, "dstBranch": 0, "dstBranchName": "string", "timestamp": "string", "repoName": "string", "xlink": { "sourceData": null, "sourceXLink": null, "dstData": null, "dstXLink": null }, "type": "string", "diffInfo": { "drawingInfo": null, "lineMapping": null, "moveInfo": null, "semanticInfo": null }, "lock": { "id": null, "name": null, "holderBranchName": null, "holderBranchId": null, "destinationBranchName": null, "destinationBranchId": null, "owner": null, "date": null, "status": null } } ] } ], "repository": "string", "source": "string", "timestamp": "string"}
GET /organizations/{organizationName}/repositories/{repositoryName}/diffs/labels/{labelId}
Get a diff for a label (no destination label in path).
Code samples for "GET /organizations/{organizationName}/repositories/{repositoryName}/diffs/labels/{labelId}":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/diffs/labels/{labelId}"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
GET /organizations/{organizationName}/repositories/{repositoryName}/diffs/labels/{labelId}/{destinationLabelId}
Get a diff between two labels.
Code samples for "GET /organizations/{organizationName}/repositories/{repositoryName}/diffs/labels/{labelId}/{destinationLabelId}":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/diffs/labels/{labelId}/{destinationLabelId}"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
Get a revision diff
Get a revision diff
Code samples for "Get a revision diff":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/diffs/revisions"
Response example
{ "comment": "string", "diffInfo": { "drawingInfo": { "left": { "diffRegions": [ { "initialLine": null, "endLine": null, "color": null, "borderColor": null } ], "insideLineRegions": [ { "line": null, "regions": null } ] }, "right": { "diffRegions": [ {} ], "insideLineRegions": [ { "line": null, "regions": null } ] } }, "lineMapping": { "destinationEditor": [ 0 ], "sourceEditor": [ 0 ] }, "moveInfo": { "diffRegions": { "left": [ { "initialLine": null, "endLine": null, "color": null, "borderColor": null } ], "right": [ { "initialLine": null, "endLine": null, "color": null, "borderColor": null } ] }, "insideLineRegions": { "left": [ { "line": null, "regions": null } ], "right": [ { "line": null, "regions": null } ] }, "regions": { "left": [ { "initialLine": null, "endLine": null, "color": null, "borderColor": null } ], "right": [ { "initialLine": null, "endLine": null, "color": null, "borderColor": null } ] } }, "semanticInfo": { "left": { "diffIcons": [ { "diffIconType": null, "position": null } ] }, "right": { "diffIcons": [ { "diffIconType": null, "position": null } ] } } }, "dstRev": { "branchName": "string", "changeset": 0, "owner": "string" }, "path": "string", "srcRev": { "branchName": "string", "changeset": 0, "owner": "string" }}
Get a source history
Get a source history
Code samples for "Get a source history":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/items/history/{sourceType}/{sourceName}/{path}"
Response example
{ "cursor": { "next": "string", "previous": "string" }, "limit": 0, "results": [ { "branchId": 0, "branchName": "string", "changesetId": 0, "changesetName": "string", "comment": "string", "date": "string", "ownerName": "string", "parentRevisionId": 0, "prevName": "string", "revisionId": 0, "type": "string" } ]}
Get labels
Code samples for "Get labels":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/labels"
Response example
{ "cursor": { "next": "string", "previous": "string" }, "limit": 0, "results": [ { "comment": "string", "date": "2024-01-01T00:00:00Z", "id": 0, "lastChangesetId": 0, "lastChangesetName": "string", "name": "string", "ownerEmail": "string", "repositoryName": "string" } ]}
Create a label
Code samples for "Create a label":
Request example
curl -X POST \ -H "Content-Type: application/json" \ -d '{ "applyLabelToXlinkRepositories": true, "changeset": 0, "comment": "", "name": "string"}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/labels"
Response example
{ "comment": "string", "date": "2024-01-01T00:00:00Z", "id": 0, "lastChangesetId": 0, "lastChangesetName": "string", "name": "string", "ownerEmail": "string", "repositoryName": "string"}
GET /organizations/{organizationName}/repositories/{repositoryName}/labels/{id}
Get a label by id.
Code samples for "GET /organizations/{organizationName}/repositories/{repositoryName}/labels/{id}":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/labels/{id}"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
PATCH /organizations/{organizationName}/repositories/{repositoryName}/labels/{id}
Update label fields by id.
Code samples for "PATCH /organizations/{organizationName}/repositories/{repositoryName}/labels/{id}":
Request example
curl -X PATCH \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/labels/{id}"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
DELETE /organizations/{organizationName}/repositories/{repositoryName}/labels/{id}
Delete a label by id.
Code samples for "DELETE /organizations/{organizationName}/repositories/{repositoryName}/labels/{id}":
Request example
curl -X DELETE \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/labels/{id}"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
GET /organizations/{organizationName}/repositories/{repositoryName}/labels/{id}/permissions
Get permissions for a label.
Code samples for "GET /organizations/{organizationName}/repositories/{repositoryName}/labels/{id}/permissions":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/labels/{id}/permissions"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
PUT /organizations/{organizationName}/repositories/{repositoryName}/labels/{id}/permissions
Replace permissions for a label.
Code samples for "PUT /organizations/{organizationName}/repositories/{repositoryName}/labels/{id}/permissions":
Request example
curl -X PUT \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/labels/{id}/permissions"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
GET /organizations/{organizationName}/repositories/{repositoryName}/labels/{labelName}/items
List items included in a label (root path).
Code samples for "GET /organizations/{organizationName}/repositories/{repositoryName}/labels/{labelName}/items":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/labels/{labelName}/items"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
Get items from a label
Get items from a label
Code samples for "Get items from a label":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/labels/{labelName}/items/{path}"
Response example
{ "branch": "string", "branchId": 0, "changeset": 0, "children": [ { "revision": 0, "item": "string", "size": 0, "branch": "string", "branchId": 0, "changeset": 0, "comment": "string", "owner": "string", "date": "2024-01-01T00:00:00Z", "repository": "string", "type": "string", "contentType": "string", "xLink": { "xLinkChangeset": {}, "xLinkRelative": true, "xLinkOrganization": "string", "xLinkRepository": "string", "xLinkRoot": "string" } } ], "comment": "string", "contentType": "string", "date": "2024-01-01T00:00:00Z", "item": "string", "lock": { "date": "2024-01-01T00:00:00Z", "destinationBranchId": 0, "destinationBranchName": "string", "holderBranchId": 0, "holderBranchName": "string", "id": "string", "name": "string", "owner": "string", "status": "Retained" }, "owner": "string", "path": "string", "rawUrl": "string", "repository": "string", "revision": 0, "size": 0, "type": "string", "xLink": { "xLinkChangeset": {}, "xLinkRelative": true, "xLinkOrganization": "string", "xLinkRepository": "string", "xLinkRoot": "string" }}
Change or create a repository lock rule
Change or create a repository lock rule
Code samples for "Change or create a repository lock rule":
Request example
curl -X PUT \ -H "Content-Type: application/json" \ -d '{ "excludedBranches": [ "string" ], "fileExtensions": "string", "targetBranch": "string", "targetBranches": [ "string" ]}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/lock-rule"
Response example
{ "excludedBranches": [ "string" ], "fileExtensions": "string", "repositoryName": "string", "targetBranch": "string", "targetBranches": [ "string" ]}
Get all lock rules
Code samples for "Get all lock rules":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/locks"
Response example
[ { "date": "2024-01-01T00:00:00Z", "destinationBranchId": 0, "destinationBranchName": "string", "holderBranchId": 0, "holderBranchName": "string", "id": "string", "name": "string", "owner": "string", "status": "Retained" }]
Delete several locks
Delete several locks
Code samples for "Delete several locks":
Request example
curl -X DELETE \ -H "Content-Type: application/json" \ -d '{ "ids": [ "string" ]}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/locks"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
Perform a merge
Code samples for "Perform a merge":
Request example
curl -X POST \ -H "Content-Type: application/json" \ -d '{ "comment": "string", "destination": "string", "source": {}, "sourceType": "branch"}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/merge"
Response example
{ "changesetId": 0, "message": "string", "status": "OK"}
Get merge bots
Code samples for "Get merge bots":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/merge-bots"
Response example
{ "results": [ { "configuration": { "branchPrefix": "string", "ciGroup": {} }, "description": "string", "name": "string", "started": true, "type": "string" } ]}
Create a merge bot
This merge bot will be specific for the repository
Code samples for "Create a merge bot":
Request example
curl -X POST \ -H "Content-Type: application/json" \ -d '{ "configuration": { "branchPrefix": "string", "ciGroup": {} }, "description": "string", "name": "string", "type": "trunk-bot"}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/merge-bots"
Response example
{ "configuration": { "branchPrefix": "string", "ciGroup": {} }, "description": "string", "name": "string", "started": true, "type": "string"}
Delete merge bots
Code samples for "Delete merge bots":
Request example
curl -X DELETE \ -H "Content-Type: application/json" \ -d '{ "mergeBotNames": [ "string" ]}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/merge-bots"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
Get a merge bot
Code samples for "Get a merge bot":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/merge-bots/{mergeBotName}"
Response example
{ "configuration": { "branchPrefix": "string", "ciGroup": {} }, "description": "string", "name": "string", "started": true, "type": "string"}
Change a merge bot
Code samples for "Change a merge bot":
Request example
curl -X PATCH \ -H "Content-Type: application/json" \ -d '{ "configuration": { "branchPrefix": "string", "ciGroup": {} }, "description": "string", "name": "string"}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/merge-bots/{mergeBotName}"
Response example
{ "configuration": { "branchPrefix": "string", "ciGroup": {} }, "description": "string", "name": "string", "started": true, "type": "string"}
Start or stop a merge bot
Start or stop a merge bot
Code samples for "Start or stop a merge bot":
Request example
curl -X PUT \ -H "Content-Type: application/json" \ -d '{ "started": true}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/merge-bots/{mergeBotName}/started"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
Get merge bot plugs
Code samples for "Get merge bot plugs":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/merge-bots/plugs"
Response example
{ "results": [ { "configuration": {}, "name": "string", "plugDefinitionName": "string", "plugDefinitionType": "string" } ]}
Create merge bot plug
Create merge bot plug
Code samples for "Create merge bot plug":
Request example
curl -X POST \ -H "Content-Type: application/json" \ -d '{ "configuration": {}, "name": "string", "plugDefinitionName": "string", "plugDefinitionType": "string"}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/merge-bots/plugs"
Response example
{ "configuration": {}, "name": "string", "plugDefinitionName": "string", "plugDefinitionType": "string"}
Delete merge bot plugs
Delete merge bot plugs
Code samples for "Delete merge bot plugs":
Request example
curl -X DELETE \ -H "Content-Type: application/json" \ -d '{ "names": [ "string" ]}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/merge-bots/plugs"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
GET /organizations/{organizationName}/repositories/{repositoryName}/merge-bots/plugs/{name}
Get merge bot plug configuration by name.
Code samples for "GET /organizations/{organizationName}/repositories/{repositoryName}/merge-bots/plugs/{name}":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/merge-bots/plugs/{name}"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
PUT /organizations/{organizationName}/repositories/{repositoryName}/merge-bots/plugs/{name}
Update merge bot plug configuration by name.
Code samples for "PUT /organizations/{organizationName}/repositories/{repositoryName}/merge-bots/plugs/{name}":
Request example
curl -X PUT \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/merge-bots/plugs/{name}"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
Get merge bots reports
Get merge bots reports
Code samples for "Get merge bots reports":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/merge-bots/reports"
Response example
{ "results": [ { "date": "2024-01-01T00:00:00Z", "mergeBotName": "string", "properties": [ { "type": "string", "value": "string" } ], "repositoryName": "string" } ]}
GET /organizations/{organizationName}/repositories/{repositoryName}/merge-bots/reports/latest
Get the latest merge bot reports for the repository.
Code samples for "GET /organizations/{organizationName}/repositories/{repositoryName}/merge-bots/reports/latest":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/merge-bots/reports/latest"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
Produce a merge report
Produce a merge report
Code samples for "Produce a merge report":
Request example
curl -X POST \ -H "Content-Type: application/json" \ -d '{ "comment": "string", "destination": "string", "source": {}, "sourceType": "branch"}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/merge-report"
Response example
{ "conflictsThatCannotBeSolved": true, "mergeAllowed": true, "mergeIssues": "string", "result": { "changes": [ { "base": { "changeset": 0, "branchId": 0, "itemId": 0, "type": "directory", "owner": "string", "date": "2024-01-01T00:00:00Z", "size": 0 }, "isDirectory": true, "isContentChanged": true, "itemId": 0, "path": "string", "revInfo": { "changeset": 0, "branchId": 0, "itemId": 0, "type": "directory", "owner": "string", "date": "2024-01-01T00:00:00Z", "size": 0 }, "status": "string", "sourcePath": "string", "destinationPath": "string", "type": "string" } ], "directoryConflicts": [ { "type": "string", "source": { "base": { "changeset": null, "branchId": null, "itemId": null, "type": null, "owner": null, "date": null, "size": null }, "isDirectory": true, "isContentChanged": true, "itemId": 0, "path": "string", "revInfo": { "changeset": null, "branchId": null, "itemId": null, "type": null, "owner": null, "date": null, "size": null }, "status": "string", "sourcePath": "string", "destinationPath": "string", "type": "string" }, "destination": { "base": { "changeset": null, "branchId": null, "itemId": null, "type": null, "owner": null, "date": null, "size": null }, "isDirectory": true, "isContentChanged": true, "itemId": 0, "path": "string", "revInfo": { "changeset": null, "branchId": null, "itemId": null, "type": null, "owner": null, "date": null, "size": null }, "status": "string", "sourcePath": "string", "destinationPath": "string", "type": "string" }, "base": { "changeset": 0, "branchId": 0, "itemId": 0, "type": "directory", "owner": "string", "date": "2024-01-01T00:00:00Z", "size": 0 } } ], "fileConflicts": [ { "type": "string", "source": { "base": { "changeset": null, "branchId": null, "itemId": null, "type": null, "owner": null, "date": null, "size": null }, "isDirectory": true, "isContentChanged": true, "itemId": 0, "path": "string", "revInfo": { "changeset": null, "branchId": null, "itemId": null, "type": null, "owner": null, "date": null, "size": null }, "status": "string", "sourcePath": "string", "destinationPath": "string", "type": "string" }, "destination": { "base": { "changeset": null, "branchId": null, "itemId": null, "type": null, "owner": null, "date": null, "size": null }, "isDirectory": true, "isContentChanged": true, "itemId": 0, "path": "string", "revInfo": { "changeset": null, "branchId": null, "itemId": null, "type": null, "owner": null, "date": null, "size": null }, "status": "string", "sourcePath": "string", "destinationPath": "string", "type": "string" }, "base": { "changeset": 0, "branchId": 0, "itemId": 0, "type": "directory", "owner": "string", "date": "2024-01-01T00:00:00Z", "size": 0 } } ], "resultStatus": "string" }}
GET /organizations/{organizationName}/repositories/{repositoryName}/notifications
List repository notifications.
Code samples for "GET /organizations/{organizationName}/repositories/{repositoryName}/notifications":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/notifications"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
POST /organizations/{organizationName}/repositories/{repositoryName}/notifications
Create or register a repository notification.
Code samples for "POST /organizations/{organizationName}/repositories/{repositoryName}/notifications":
Request example
curl -X POST \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/notifications"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
DELETE /organizations/{organizationName}/repositories/{repositoryName}/notifications
Clear or dismiss repository notifications.
Code samples for "DELETE /organizations/{organizationName}/repositories/{repositoryName}/notifications":
Request example
curl -X DELETE \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/notifications"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
Get a repository permissions
Get a repository permissions
Code samples for "Get a repository permissions":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/permissions"
Response example
{ "permissions": [ { "name": "string", "type": "user", "permissions": [ { "name": "string", "isOverride": true, "isEnabled": true, "valueInherited": true } ] } ]}
Patch a repository permissions
Patch a repository permissions
Code samples for "Patch a repository permissions":
Request example
curl -X PATCH \ -H "Content-Type: application/json" \ -d '{ "endUsersPermissions": [ { "name": "string", "type": "user", "permissions": [ { "name": "string", "isOverride": true, "isEnabled": true, "valueInherited": true } ] } ]}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/permissions"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
Get a revision
Code samples for "Get a revision":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/revisions/{revisionId}"
Response example
{ "branch": "string", "changesetId": 0, "comment": "string", "date": "2024-01-01T00:00:00Z", "itemPath": "string", "owner": "string", "repositoryName": "string", "revisionId": 0, "size": 0, "type": "string"}
Get the content of a revision
Code samples for "Get the content of a revision":
Request example
curl -X GET \ -H "x-encryption-token: <x-encryption-token>" \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/revisions/{revisionId}/{format}"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
Get short-lived url that points to revision content
This returned url can directly be used without other authentication
Code samples for "Get short-lived url that points to revision content":
Request example
curl -X GET \ -H "x-encryption-token: <x-encryption-token>" \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/revisions/{revisionId}/{format}/url"
Response example
{ "url": "string"}
Get revision annotations
Code samples for "Get revision annotations":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/revisions/{revisionId}/annotations"
Response example
[ { "branchName": "string", "changesetId": 0, "comment": "string", "date": "2024-01-01T00:00:00Z", "line": 0, "owner": "string", "parentRevisionId": 0, "revisionId": 0 }]
Get data content revisions
Gives you metadata if it is a binary or the content if it is a text file
Code samples for "Get data content revisions":
Request example
curl -X GET \ -H "x-encryption-token: <x-encryption-token>" \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/revisions/data"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
Get data content revisions
Gives you metadata if it is a binary or the content if it is a text file. This endpoint has a body to avoid the url size limit
Code samples for "Get data content revisions":
Request example
curl -X POST \ -H "x-encryption-token: <x-encryption-token>" \ -H "Content-Type: application/json" \ -d '{ "encryptionToken": "string", "revision": [ { "name": "string", "revisionId": 0 } ], "revisionIds": []}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/revisions/data"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
GET /organizations/{organizationName}/repositories/{repositoryName}/revisions/data/url
Get signed URLs for data (non-raw) revision content via query parameters.
Code samples for "GET /organizations/{organizationName}/repositories/{repositoryName}/revisions/data/url":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/revisions/data/url"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
POST /organizations/{organizationName}/repositories/{repositoryName}/revisions/data/url
Obtain signed URLs for data revision content via request body.
Code samples for "POST /organizations/{organizationName}/repositories/{repositoryName}/revisions/data/url":
Request example
curl -X POST \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/revisions/data/url"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
Get raw content revisions
Code samples for "Get raw content revisions":
Request example
curl -X GET \ -H "x-encryption-token: <x-encryption-token>" \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/revisions/raw"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
Get raw content revisions
Gives you the file content, whatever the file type. This endpoint has a body to avoid the url size limit
Code samples for "Get raw content revisions":
Request example
curl -X POST \ -H "x-encryption-token: <x-encryption-token>" \ -H "Content-Type: application/json" \ -d '{ "encryptionToken": "string", "revision": [ { "name": "string", "revisionId": 0 } ], "revisionIds": []}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/revisions/raw"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
GET /organizations/{organizationName}/repositories/{repositoryName}/revisions/raw/url
Get signed URLs for raw revision content via query parameters.
Code samples for "GET /organizations/{organizationName}/repositories/{repositoryName}/revisions/raw/url":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/revisions/raw/url"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
POST /organizations/{organizationName}/repositories/{repositoryName}/revisions/raw/url
Obtain signed URLs for raw revision content via request body.
Code samples for "POST /organizations/{organizationName}/repositories/{repositoryName}/revisions/raw/url":
Request example
curl -X POST \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/revisions/raw/url"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
GET /organizations/{organizationName}/repositories/{repositoryName}/subscriptions
PATCH /organizations/{organizationName}/repositories/{repositoryName}/subscriptions
Update the user subscription for notifications from repository
Path parameters for "PATCH /organizations/{organizationName}/repositories/{repositoryName}/subscriptions"
Code samples for "PATCH /organizations/{organizationName}/repositories/{repositoryName}/subscriptions":
Request example
curl -X PATCH \ -H "Content-Type: application/json" \ -d '{ "types": [ "reviews" ]}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/{repositoryName}/subscriptions"
Response example
{ "type": [ "reviews" ]}
Get repositories lock rules
Get all rules for all repositories in the organization
Code samples for "Get repositories lock rules":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/lock-rules"
Response example
{ "limit": 0, "offset": 0, "total": 0, "results": [ { "excludedBranches": [ "string" ], "fileExtensions": "string", "repositoryName": "string", "targetBranch": "string", "targetBranches": [ "string" ] } ]}
Create or update a repository lock rule
Create or update a lock rule for a repository. If the lock rule exists, the POST we replace it
Code samples for "Create or update a repository lock rule":
Request example
curl -X POST \ -H "Content-Type: application/json" \ -d '{ "excludedBranches": [ "string" ], "fileExtensions": "string", "repositoryName": "string", "targetBranch": "string", "targetBranches": [ "string" ]}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/lock-rules"
Response example
{ "excludedBranches": [ "string" ], "fileExtensions": "string", "repositoryName": "string", "targetBranch": "string", "targetBranches": [ "string" ]}
Delete repositories lock rules
Each repository has only one lock rule. Give the name of the repository is enough to delete it s lock rule
Code samples for "Delete repositories lock rules":
Request example
curl -X DELETE \ -H "Content-Type: application/json" \ -d '{ "repositoriesNames": [ "string" ]}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/repositories/lock-rules"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
Get organization storage
Code samples for "Get organization storage":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/storage"
Response example
{ "rawStorageMax": 0, "rawStorageUsed": 0, "repositories": [ { "name": "string", "size": 0 } ], "storageMax": 0, "storageUsed": 0}
GET /organizations/{organizationName}/subscriptions
PATCH /organizations/{organizationName}/subscriptions
Update the user subscription for notifications from organization
Code samples for "PATCH /organizations/{organizationName}/subscriptions":
Request example
curl -X PATCH \ -H "Content-Type: application/json" \ -d '{ "types": [ "reviews" ]}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/subscriptions"
Response example
{ "type": [ "reviews" ]}
Get user groups
Create a user group
Create a user group
Code samples for "Create a user group":
Request example
curl -X POST \ -H "Content-Type: application/json" \ -d '{ "description": "string", "name": "string", "permissions": [ { "endUsersPermissions": [ { "name": "string", "type": "user", "permissions": [ null ] } ] } ]}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/user-groups"
Response example
{ "description": "string", "id": 0, "name": "string", "userCount": 0}
Change a user group
Code samples for "Change a user group":
Request example
curl -X PATCH \ -H "Content-Type: application/json" \ -d '{ "userGroups": [ { "id": 0, "users": { "add": [ "string" ], "remove": [ "string" ] } } ]}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/user-groups"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
Patch a user group
Code samples for "Patch a user group":
Request example
curl -X PATCH \ -H "Content-Type: application/json" \ -d '{ "description": "string", "name": "string"}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/user-groups/{groupId}"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
Get users in a user group
Get a paginated list of users in a user group by name.
Code samples for "Get users in a user group":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/user-groups/{groupId}/users"
Response example
{ "limit": 0, "offset": 0, "total": 0, "results": [ { "assignedAt": "2024-01-01T00:00:00Z", "email": "user@example.com", "groups": [ { "id": 0, "name": "string" } ], "id": 0, "isAdmin": true, "isOwner": true, "joinedOrganizationAt": "2024-01-01T00:00:00Z", "permissions": [ { "isEnabled": true, "isOverride": true, "name": "string", "valueInherited": true } ], "source": "DevOps", "unityUser": { "avatarUrl": "https://example.com", "email": "user@example.com", "genesisId": "string", "id": "string", "name": "string" } } ]}
Add users to a user group
Add users to a user group by name.
Code samples for "Add users to a user group":
Request example
curl -X POST \ -H "Content-Type: application/json" \ -d '{ "emails": [ "user@example.com" ]}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/user-groups/{groupId}/users"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
Remove users from a user group
Remove users from a user group by name.
Code samples for "Remove users from a user group":
Request example
curl -X DELETE \ -H "Content-Type: application/json" \ -d '{ "emails": [ "user@example.com" ]}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/user-groups/{groupId}/users"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}
Get users
Paginated list of users in the organization.
Code samples for "Get users":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/users"
Response example
{ "limit": 0, "offset": 0, "total": 0, "results": [ { "assignedAt": "2024-01-01T00:00:00Z", "email": "user@example.com", "groups": [ { "id": 0, "name": "string" } ], "id": 0, "isAdmin": true, "isOwner": true, "joinedOrganizationAt": "2024-01-01T00:00:00Z", "permissions": [ { "isEnabled": true, "isOverride": true, "name": "string", "valueInherited": true } ], "source": "DevOps", "unityUser": { "avatarUrl": "https://example.com", "email": "user@example.com", "genesisId": "string", "id": "string", "name": "string" } } ]}
GET /organizations/{organizationName}/users/{id}
GET /at-unity-organizations/{organizationId}
Get @unity organization by unity organization id
Code samples for "GET /at-unity-organizations/{organizationId}":
Request example
curl -X GET \ "https://services.api.unity.com/plastic/v1/at-unity-organizations/{organizationId}"
Response example
{ "canCreateRepository": true, "creationDate": "2024-01-01T00:00:00Z", "description": "string", "devOpsUnlimited": true, "freeTierLimitReached": true, "genesisOrganizationId": "string", "isEncrypted": true, "isLinked": true, "isUnityCloudBundle": true, "name": "string", "ownerId": 0, "rawStorageMax": 0, "rawStorageUsed": 0, "regionDescription": "string", "regionName": "string", "regionUrl": "https://example.com", "source": "purchase", "storageMax": 0, "storageUsed": 0, "ugoLimitReached": true, "unityOrganization": { "genesisId": "string", "id": "string", "name": "string" }, "userBelongsToOrganization": true, "userCount": 0}
POST /organizations/{organizationName}/invitations
Send invitations to join the organization. Duplicate emails are deduplicated.
Code samples for "POST /organizations/{organizationName}/invitations":
Request example
curl -X POST \ -H "Content-Type: application/json" \ -d '{ "emails": [ "user@example.com" ], "adminPermissions": true}' \ "https://services.api.unity.com/plastic/v1/organizations/{organizationName}/invitations"
Response example
{ "failures": [ { "name": "string", "id": 0, "code": "string", "message": "string" } ]}