This user guide only applies if your account and project is on our old platform, i.e. if your project's URL begins with https://xp-dev.com rather than https://<your-account>.xp-dev.com. If your account is on our new platform, you should be using this user guide instead.
Each Repository Object has the following attributes:
Attribute | Description |
---|---|
id | Unique repository ID |
projectId | The project ID that the repository belongs to |
name | A unique repository name |
type | Repository type, either Subversion, Mercurial or Git |
minimumCommentLength | The minimum characters that all comments during check-ins should have |
allowRevisionPropertyChanges | Subversion only: allow repository revision property changes |
publicRepository | Whether the repository can be read by unauthenticated users (open to public) |
noDiffsInCommitEmails | Do not include diff changes in commit emails |
commitEmails | List of emails addresses to send commit emails to |
webhookUrl | URL to send webhook commit requests |
directFileHosting | Turn on Direct File Hosting (serving repository as a static website) |
forceSSL | Force all requests to use SSL |
commitEmailsSubject | Format template for commit emails |
commitEmailsPlainText | Whether to send commit emails as plain text (rather than HTML) |
transports | A list of Transport Objects |
size | Size of the repository |
Each Transport Object has the following attributes:
Attribute | Description |
---|---|
type | Either HTTP, HTTPS, SSH or WebDAV |
url | The url for the repository using the specified transport type |
Each Path Based Permissions Object has the following attributes:
Attribute | Description |
---|---|
repositoryId | The repository ID that the path based permission belongs to |
pathPermissions | Content of the authorization file for mod_authz_svn |
POST
call to https://xp-dev.com/api/v1/repositories/
with the
following attributes:
Mandatory:
Example request:
curl -X POST -H 'Content-Type: application/json' -d '{"projectId":168, "name":"ansvnrepository","type":"Subversion","createInitialDirectories":false}' https://xp-dev.com/api/v1/repositories/
Responses will be a single Repository object.
For example:
{
"response":{
"name":"ansvnrepository",
"id":167,
"type":"Subversion",
"publicRepository":false,
"commitEmails":null,
"commitEmailsPlainText":false,
"commitEmailsSubject":"{1} repository [{0}] commit notification",
"webhookUrl":null,
"projectId":168,
"forceSSL":false,
"createInitialDirectories":false,
"minimumCommentLength":0,
"allowRevisionPropertyChanges":false,
"noDiffsInCommitEmails":false,
"directFileHosting":false
"transports":[
{
"type":"HTTP",
"url":"http://example.com/svn/ansvnrepository"
},
{
"type":"HTTPS",
"url":"https://example.com/svn/ansvnrepository"
},
{
"type":"WebDAV",
"url":"https://example.com/svn/ansvnrepository"
}
],
"size":16.0
}
}
GET
call to https://xp-dev.com/api/v1/repositories/<repository-id>
.
For example:
curl https://xp-dev.com/api/v1/repositories/136
Responses will be a single Repository Object
PUT
call to https://xp-dev.com/api/v1/repositories/<repository-id>
with the following attributes:
Mandatory:
Example request:
curl -X PUT -d '{"name":"slavetest","publicRepository":false,"commitEmails":["a@a.com", "b@b.com"],"commitEmailsPlainText":false,"commitEmailsSubject":"{1} repository [{0}] commit notification","webhookUrl":null,"projectId":126,"forceSSL":false,"minimumCommentLength":0,"allowRevisionPropertyChanges":false,"noDiffsInCommitEmails":false,"directFileHosting":false}' -H 'Content-Type: application/json' https://xp-dev.com/api/v1/repositories/150;
Responses will be a single Repository Object
DELETE
request to
https://xp-dev.com/api/v1/repositories/<repository-id>
:
curl -X DELETE https://xp-dev.com/api/v1/repositories/150
GET
request to
https://xp-dev.com/api/v1/repositories/path-permissions/<repository-id>
:
curl https://xp-dev.com/api/v1/repositories/path-permissions/182
Responses will be a single Path Based Permissions Object
For example:
{
"response":{
"repositoryId":51,
"pathPermissions":"[groups]\nharry_and_sally = harry,sally \nharry_sally_and_joe = harry,sally,&joe"
}
}
PUT
call to https://xp-dev.com/api/v1/repositories/path-permissions/<repository-id>
with the following attributes:
Mandatory:
Example request:
curl -X PUT -d '{"pathPermissions":"[groups]\nharry_and_sally = harry,sally \nharry_sally_and_joe = harry,sally,&joe"}' -H 'Content-Type: application/json' https://xp-dev.com/api/v1/repositories/path-permissions/190
Responses will be a single Path Based Permissions Object
Feel free to contact us if you need any assistance.