/usr/share/obs/docs/api/api.txt is in obs-api 2.7.4-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 | = Open Build Service API
Version: 2.7
Only authenticated users are allowed to access the API. Authentication is done
by sending a Basic HTTP Authorisation header.
Do NOT simply add api calls here without discussion before.
The main base routes are:
/source : To handle all source submissions and project setups
/build : To access build results and their states
/published : Read access to published repositories
/search : Access to search interface
== Table of Contents
Contents:
== About
GET /about
Get information about API.
XmlResult: about
== Architectures
GET /architectures
Get a list of all known architectures known to OBS in general.
This is not the list of architectures provided by this instance, go
to /configuration for this
XmlResult: architecture list
== Issue Trackers
GET /issue_trackers
Get the list of available issue trackers
XmlResult: issue_trackers
<name>: Issue tracker name
GET /issue_trackers/<name>
Read issue tracker data.
XmlResult: issue_tracker
PUT /issue_tracker/<name>
Update issue tracker data.
XmlResult: status
POST /issue_tracker/<name>
Create new issue tracker.
XmlResult: issue_tracker
DELETE /issue_tracker/<name>
Delete issue tracker.
XmlResult: status
GET /issue_trackers/show_url_for
Parameters:
issue: attribute used for issue search (example: 'bnc#123456')
== Distribution List
GET /distributions
Get the list of base distributions hosted on this OBS instance
XmlResult: distributions
PUT /distributions
Write the list of base distributions hosted on this OBS instance
XmlResult: distributions
GET /distributions/<distribution_id>
Get data of one base distributions hosted on this OBS instance
XmlResult: status
POST /distributions/<distribution_id>
Modifies one base distribution entry. Distro must be hosted on the OBS instance
XmlResult: status
GET /distributions/include_remotes
Get the list of base distributions hosted on this OBS instance and on all used remote instances
XmlResult: distributions
== User data
<userid>: Id of user
<groupid> Id of group
GET /person/<userid>
Read user data.
XmlResult: user
PUT /person/<userid>
Write user data.
XmlBody: user
XmlResult: status
POST /person?cmd=register
Can be used to register a new user, if OBS instance is allowing this.
POST /person/<userid>
cmd=change_password to post the new password in the request body. Just the first line gets used.
XmlBody: password
XmlResult: status
Parameters:
cmd: change_password
GET /person/<userid>/token
Lists all authentification token for a user
XmlResult: tokenlist
POST /person/<userid>/token
Create a new authentification token for this user. It may be limited for a specific package
via optional project&package parameters.
cmd: create
project: create a token for a specific project
package: create a token for a specific package
XmlResult: status
DELETE /person/<userid>/token/<id>
Delete a specific authentification token. The <id> is listed in GET call.
XmlResult: status
== Group data
GET /group
List available groups
XmlResult: directory
Parameters:
login: List available groups of this user.
GET /group/<group title>
Read group data.
XmlResult: group
PUT /group/<group title>
Write group data.
XmlBody: user
XmlResult: status
POST /group/<group title>
Modify group data.
Multiple commands on processing group.
add_user: add a user to a group
remove_user: remove a user from a group
set_email: set email adress of group.
Parameters:
userid: user login name, required for add_user and remove_user command
email: email address for set_email command. email of group gets removed if not defined
XmlResult: status
DELETE /group/<group title>
Delete a group.
XmlResult: status
== Sources
=== Projects
GET /source/
Read list of projects.
XmlResult: directory
Parameters:
deleted: show deleted projects instead of existing
POST /source
Commands on processing sources globally. Possible commands are
branch: branch a set of packages based on attributes or on existing request
createmaintenanceincident: create mainatenance incident projects based on attribute search
Parameters:
linkrev: linked revision, optional (for linkrev=base)
attribute: attribute used for package search, default is OBS:Maintained
update_project_attribute: attribute name used to find out possible existing update projects of a package
request: branch by request, branch all packages in actions of request for superseding it
noaccess: the new created project will be read protected
target_project: project which will get used or created
GET /source/<project>/_meta
Read project meta file.
Parameters:
rev: revision, mandatory
XmlResult: project
PUT /source/<project>/_meta
Write project meta file.
Parameters:
comment: comment, optional
XmlBody: project
XmlResult: status
DELETE /source/<project>
Deletes specified project. All packages of this project are deleted as if a
DELETE request were issued for each package.
Parameters:
force: If force = 1, the project is deleted even if repositories of other
projects include a path to a repository from this project. The path
in the other repository is replaced by one pointing to 'deleted/standard',
preventing the build and publishing of the other repository.
comment: comment, optional
XmlResult: status
GET /source/<project>/_attribute/<attribute>
Get all attributes or a specific one
XmlBody: attribute
POST /source/<project>/_attribute/<attribute>
Modifies a specific attribute as in body
Parameters:
comment: comment, optional
XmlResult: status
DELETE /source/<project>/_attribute/<attribute>
Removes a specific attribute
Parameters:
comment: comment, optional
XmlResult: status
GET /source/<project>/_config
Read project configuration
Parameters:
rev: revision, mandatory
Result: configuration as text/plain
PUT /source/<project>/_config
Change project configuration
Parameters:
comment: comment, optional
XmlResult: status
GET /source/<project>/_pattern
Get list of all patterns set up for this project
XmlResult: pattern
GET /source/<project>/_pattern/<patternfile>
Get pattern
XmlResult: pattern
PUT /source/<project>/_pattern/<patternfile>
Write pattern
XmlBody: pattern
XmlResult: status
DELETE /source/<project>/_pattern/<patternfile>
Remove pattern
XmlResult: status
GET /source/<project>/_pubkey
Get project GPG key. If the project has no own key (default), it uses
the first available one in the namespace hierarchy, ending at the global
buildservice key.
Result: gpgkey
DELETE /source/<project>/_pubkey
Removes the current gpg key. Has no effect if no key is set.
XmlResult: status
POST /source/<project>
Multiple commands on processing sources in package. Possible commands are
createkey: Generate a new gpg key. If the project already has an own gpg key, the old key is discarded.
extendkey: Extend the expiration date of gpg keys.
undelete: undelete the project and all packages existing when the project got removed.
showlinked: List all projects linking to this one
copy: copy the entire project
move: ADMIN ONLY. schedulers need to be stopped. move all sources and binaries around from oproject.
createmaintenanceincident: create a single mainatenance incident project as sub project
createpatchinfo: create a new patchinfo package collecting all mentioned issues in sources
addchannels: add channel packages and repositories for matching packages in project
modifychannels: modify existing channels by specified mode
set_flag: change a defined flag, requires at least flag and status parameters
remove_flag: remove a defined flag, requires at least flag and status parameters
lock: lock a project
unlock: unlock a locked project
release: release sources and binaries according to release target specification
Parameters:
noaccess: the new created project will be read protected
repository: set_flag for given repository or release just this repository (optional)
arch: set_flag for given arch (optional)
flag: modify this flag (build/publish/..) for set_flag command
status: enable or disable for set_flag command
comment: description for the history
# for modifychannels and addchannels command only:
mode: how to deal with disabled channels: add_disabled(default), skip_disabled, enable_all
# for copy command only:
oproject: origin project name (required)
resign: resign all binaries with new target project key
makeolder: make a split, the source is bumped by two numbers and target by one
withhistory: copies sources with history on copy command
withbinaries: copies also binaries on copy command
noservice: do not run source services
setrelease: define a specific release tag when used with "release" command. Setting it to "-" strips
the release string. Note: this modifies only the filename.
=== Packages
GET /source/<project>
Read list of packages.
XmlResult: package directory.xsd
Parameters:
deleted: show deleted package instead of existing
expand: include also packages from linked projects
view: issues, can be used to show all tracked issues for all packages in project
productlist, shows all containing products, unifies result when used with expand
verboseproductlist, same as productlist, but with detailed information about the product
GET /source/<project>/<package>
Package source listing
Parameters:
rev: revision of new package, optional
linkrev: linked revision, optional
emptylink: bool, , optional
expand: bool, expand links, optional
meta: bool, switch to meta files, optional
view: The "info" view will show data like source version, md5sums and build description files. May be used together with parse, arch or repository parameter, optional
"issues" can be used to show all tracked issues for all packages in project, optional
"products" show all products of a package (works only on "_product" packages)
extension: filter for file extension, optional
lastworking: bool, show sources of last mergeable sources in case of conflicting changes, optional
withlinked: bool, show all used package containers (in case of multiple link indirections) in linkinfo information, optional
deleted: bool, show content of deleted package instance
parse: bool, for view=info: take build description into account, optional
arch: string, for view=info: parse buildinfo for this architecture, optinal
repository: string, for view=info: parse buildinfo for this repository, optinal
product: string, limit the product view to a given product
XmlResult: package directory.xsd
GET /source/<project>/<package>/_meta
Read project meta data.
Parameters:
rev: revision of new package, optional
XmlResult: package
PUT /source/<project>/<package>/_meta
Write project meta data. Writing of the project meta data commits the packages
contained in the project to the build backend.
Parameters:
comment: comment, optional
XmlBody: package
XmlResult: status
DELETE /source/<project>/<package>
Deletes specified package including all source files
Parameters:
comment: comment, optional
XmlResult: status
GET /source/<project>/<package>/_attribute/<attribute>
Get all attributes or a specific one
XmlBody: attribute
POST /source/<project>/<package>/_attribute/<attribute>
Modifies a specific attribute as in body
Parameters:
comment: comment, optional
XmlResult: status
DELETE /source/<project>/<package>/_attribute/<attribute>
Removes a specific attribute
Parameters:
comment: comment, optional
XmlResult: status
GET /source/<project>/<package>/_history
Get package commit history
XmlResult: revisionlist
POST /source/<project>/<package>?cmd=showlinked
List all package instances linking to this one.
Result: package list
POST /source/<project>/<package>?cmd=diff
Create a source diff
Parameters:
rev: revision of new package, optional
oproject: old project, optional
opackage: old package, optional
orev: old revision, optional
Result: diff as text/plain
POST /source/<project>/<package>?cmd=instantiate
Instantiate a package container, which is available via project links only so far.
Parameters:
makeoriginolder: optional, can be used to modify source and target to guarantee that new version
stay older also on future updates in older code stream
XmlResult: status
POST /source/<project>/<package>?cmd=release
Releases sources and binaries of that package. This requires a set
release target in the repository definitions of <project>. Also the
trigger must be set to "manual"
Parameters:
comment: description for the history
repository: limit the release to the specified repository
target_repository: specify the target repository name (together with target_project)
target_project: overwrites the target definition from project meta
(repository and target_repository parameter required as well)
XmlResult: status
POST /source/<project>/<package>?cmd=unlock
Unlocks a locked package
Parameters:
comment: description for the history
XmlResult: status
POST /source/<project>/<package>?cmd=branch
Create a source link from a package of an existing project to a
new subproject of the requesters home project.
The default target is home:<user>:branches:<project>/<package>
A possible defined devel project in the package meta data gets ignored.
Parameters:
ignoredevel: bool, optional
target_project: target project name, optional
target_package: target package name, optional
noaccess: the new created project will be read protected, bool, optional
missingok: the target package does not exist
newinstance: the target package exists only via project links, but the link should point to given project
add_repositories: bool, optional, adds repositories base on source project (default for new projects)
update_path_elements: bool, optional, update all path elements if needed (used repositories depend on each other)
extend_package_names: bool, optional, extends package and repository names to allow multiple instances of same package
add_repositories_rebuild: use defined rebuild policy for new repos
add_repositories_block: use defined block policy for new repos
XmlResult: status
POST /source/<project>/<package>?cmd=set_flag
Modify or set a defined flag for package
Parameters:
repository: set_flag for given repository (optional)
arch: set_flag for given arch (optional)
flag: modify this flag (build/publish/..) for set_flag command
status: enable or disable for set_flag command
XmlResult: status
POST /source/<project>/<package>?cmd=createSpecFileTemplate
Create template for RPM SPEC file. Returns an error, if the SPEC file already
exists.
XmlResult: status
POST /source/<project>/<package>?cmd=commit
Commits package changes to buildservice
Parameters:
rev: revision, mandatory
comment: comment, optional
XmlResult: status
POST /source/<project>/<package>?cmd=collectbuildenv
Creates _buildenv files based on origin package builds. This can be used
to re-use exact older build enviroment even when further new binary packages
got added. For example to re-build an old maintenance update in the same way.
Parameters:
oproject: Origin project to copy from (required)
opackage: Origin package to copy from (required)
comment: Optional comment by the user
XmlResult: status
POST /source/<project>/<package>?cmd=importchannel
Import a kiwi channel file for OBS. Project names will be set
to update projects if defined.
Parameters:
target_project: optional target repository to set
target_repository: optional target repository to set
XmlResult: status
POST /source/<project>/<package>?deleteuploadrev
Removes all changes made to the upload revision and reverts to last revision
Parameters:
none
XmlResult: status
=== Source files
<filename>: File name
GET /source/<project>/<package>
Get directory listing of all source files in the package
Parameters:
rev: package source revision, optional
linkrev: linked revision, optional
expand: expand links, optional
meta: switch to meta files
lastworking: auto detect last working link revision, optional
view: The "cpio" view will stream all files as cpio, optional
extension: filter for file extension, optional
GET /source/<project>/<package>/<filename>
Read source file.
Result: Content of file
Parameters:
meta: switch to meta files
PUT /source/<project>/<package>/<filename>
Write source file.
Parameters:
rev: if set to 'upload', multiple files can be uploaded one by one in one commit, before
finishing the commit with cmd=commit (see below), optional
comment: comment, optional
keeplink: bool, optional
meta: switch to meta files
Body: Content of file
XmlResult: status
DELETE /source/<project>/<package>/<filename>
Delete source file.
XmlResult: status
Parameters:
meta: switch to meta files
POST /source/<project>/<package>
Multiple commands on processing sources in package. Possible commands are
diff: for server side diff
linkdiff: for server side diff of a linked or branched package
servicediff: shows the changes of the service run
commit: commit files in upload revision
commitfilelist: commit defined files in upload revision
deleteuploadrev: delete all uploaded sources which are not committed yet
copy: copy package sources from another package
undelete: undelete the package
unlock: unlock a package with lock enabled. A comment is required.
release: release sources and binaries according to release target specification
branch: branch a package into another one
linktobranch: convert a plain source link into a full branch
enablechannel: adds repositories and enable this channel package
updatepatchinfo: update _patchinfo file, esp. the issues list
remove_flag: remove a specific flag from meta (flag must be defined, optionally arch and repository)
set_flag: remove a specific flag from meta (flag must be defined, optionally arch and repository)
showlinked: show all source packages linking to this one
deleteuploadrev: delete all uploaded, but not yet commited files.
rebuild: rebuild all builds
getprojectservices: list all service defined in project spaces defined for this package.
runservice: trigger run of defined services in _service file
waitservice: returns when all services have finished, code 200 when service run was successful
mergeservice: drops the _service file and commits all server side generated files
wipe: wipe all build results of this package
Parameters:
rev: package source revision, optional
linkrev: linked revision, optional
orev: origin package source revision as defined in opackage/project, optional
olinkrev: origin linked revision, optional
oproject: origin project, used as base project
opackage: origin package, used as base package
requestid: log the requestid in source history, optional (copy and commitfilelist only)
expand: expand links, optional
keeplink: keep link on source commit, optional
repairlink: repair link on source commit, optional
dontupdatesource: Do not update origin package, optional (copy only)
noservice: do not run source services
comment: comment for history, optional
meta: switch to meta files
arch: architecture when using flag modifing command
repository: repository when using flag modifing command
view: may be "xml" for structured answered (for diff commands)
withissues: set to get issues parsed from changelogs (for diff commands)
onlyissues: used to limit to issues (for diff commands)
setrelease: define a specific release tag when used with "release" command. Setting it to "-" strips
the release string.
GET /source/<project>/<package>/<binary>/_attribute/<attribute>
Get all attributes or a specific one
XmlBody: attribute
POST /source/<project>/<package>/<binary>/_attribute/<attribute>
Modifies a specific attribute as in body
Parameters:
comment: comment, optional
XmlResult: status
DELETE /source/<project>/<package>/<binary>/_attribute/<attribute>
Removes a specific attribute
Parameters:
comment: comment, optional
XmlResult: status
== Requests
GET /request
Get a list of requests. When using the "view=collection" you need also to filter
either by user, project or package.
Parameters:
view: collection, return a collection of requests instead of directory listing
user: filter for given user, includes all target projects and packages where
the user is maintainer and also open review requests
project: limit to result to defined target project or review requests
package: limit to result to defined target package or review requests
states: filter for given request state, multiple matches can be added as comma seperated list (eg states=new,review)
types: filter for given action types (comma seperated)
roles: filter for given roles (creator, maintainer, reviewer, source or target)
withhistory: includes the request history in result
withfullhistory: includes the request and review history in result
XmlResult: collection
GET /request/<id>
Get a request
Parameters:
withhistory: includes the request history in result
withfullhistory: includes the request and review history in result
XmlResult: request
POST /request
Create a new request
XmlResult: request
Commands on processing requests
create: to crfeate a new request
Parameters:
addrevision: ask the server to add revisions of current sources to the request
PUT /request/<id>
Modify a request. NOTE: Only admins can change all parts of a request.
XmlResult: request
POST /request/<id>?cmd=diff
Shows the diff of all affected packages.
Result: diff as text/plain
POST /request/<id>
Modify a request
XmlResult: request
Commands on processing requests
addreview: Adds a review to a request
assignreview: Adds a review for a user and accepts it for the used group
changestate: Modifies the state of a request
changereviewstate: Modifies the state of a review inside a request
setpriority: Modifies the priority of a requst
setincident: Change the target incident for maintenance_incident actions
setacceptat: Set or modify the accept_at time. Either specified by time parameter or now.
Parameters:
newstate: Define the new state
priority: Define the new priority
by_user: Specify the user of the new review
by_group: Specify the group of the new review
by_project: Specify the project of the new review
by_package: Specify the user of the new review
incident: Specifiy inicdent number for setincident
time: Specifiy time for setacceptat
== Attribute definition api
GET /attribute/
List all attribute namespaces
XmlResult: directory
GET /attribute/<namespace>/
List all attributes under given namespace
XmlResult: directory
GET /attribute/<namespace>/_meta
shows namespace setup
XmlResult: attribute_namespace_meta
DELETE /attribute/<namespace>/_meta
Delete a attribute namespace and all attributes below
XmlResult: status
PUT /attribute/<namespace>/_meta
change attribute namespace meta
XmlBody: attribute_namespace_meta_data
XmlResult: status
GET /attribute/<namespace>/<name>/_meta
shows attribute setup
XmlResult: attribute_meta
DELETE /attribute/<namespace>/<name>/_meta
Delete a attribute and all its values in projects or packages
XmlResult: status
PUT /attribute/<namespace>/<name>/_meta
change attribute meta
XmlBody: attribute_meta_data
XmlResult: status
== Comments api
GET /comments/request/:id
GET /comments/project/:name
GET /comments/package/:project/:pname
Get all comments for the object
XmlResult: directory
POST /comments/request/:id
POST /comments/project/:name
POST /comments/package/:project/:pname
Create a comment for the object
XmlResult: status
DELETE /comment/:id
Delete a comment specified by the comment id
XmlResult: status
== Build Results
<build>: Build repository
GET /build/
List all repositories
XmlResult: directory
GET /build/_workerstatus
Lists all running jobs, waiting jobs, status of the backend services and general statistics.
XmlResult: workerstatus
GET /build/<project>
List all repositories of the specified project
XmlResult: directory
GET /build/<project>/<repository>
List all architectures of the specified project repository
XmlResult: directory
GET /build/<project>/<repository/<arch>
List all packages used in this project repository for given architecture.
XmlResult: directory
=== Binaries
GET /build/<project>/<repository>/<arch>/<package>
Get list of binaries built by the sources of the given package
Result: binarylist
GET /build/<project>/<repository>/<arch>/<package>/<binaryname>
Get single binary from build results of given package
Result: binary file
GET /build/<project>/<repository>/<arch>/<package>/<binaryname>?view=fileinfo
GET /build/<project>/<repository>/<arch>/<package>/<binaryname>?view=fileinfo_ext
Get information about the binary from build results of given package
Result: fileinfo
GET /build/<project>/<repository>/<arch>/_builddepinfo
POST /build/<project>/<repository>/<arch>/_builddepinfo
Shows all build dependencies of one or more packages, a change in any of them will
trigger a build.
A changed dependency can be posted to let the server recalculate the order
including the local dependency changes.
Parameters:
package=<name> filter package container, can be used multiple times
view=pkgnames show package names instead of binary names
view=revpkgnames show which packages will be triggered if the package is changed
view=order sort packages ordered by dependencies
Result: build dependencies
GET /build/<project>/<repository>/<arch>/_jobhistory?package=<package>&code=succeeded&limit=10
Get the build log of all finished builds in this repository, including
time and trigger reason. Optional filtering for one ore more packages/codes is
possible.
Result: jobhistory
GET /build/<project>/<repository>/<arch>/_repository
Get list of binaries in given repository (binaries produced by all packages
of the project)
Result: binarylist
POST /build/<project>/<repository>/<arch>/_repository?match=
Uploads binaries to a given repository. ADMIN ONLY
Result: status
PUT /build/<project>/<repository>/<arch>/_repository/<file>
Uploads binaries into the repository. ADMIN ONLY.
Result: status
GET /build/<project>/<repository>/<arch>/_repository/<binaryname>
Get single binary from the given repository
Result: binary file
=== Status
GET /build/<project>/_result
Return build results for the packages, architectures and repositories
specified by the parameters. If no parameters are given, all results for the
project are returned.
The view parameter specifies which sections are included in the results.
view=summary includes the summary of the status values. view=status includes
detailed status information. view=binarylist includes the list of generated
binary files. If no view parameter is given, view=status is assumed. To
combine views the parameter can be given multiple times.
Parameters:
package: package name, optional, multiple
arch: architecture, optional, multiple
repository: name of repository, optional, multiple
view: summary | status | binarylist
lastbuild: bool, optional
XmlResult: buildresult
GET /build/<project>/<repository>/<arch>/<package>/_history
Get build history
XmlResult: buildhistory
GET /build/<project>/<repository>/<arch>/<package>/_reason
Detailed reason, why the last build got triggered. This may be
caused by a source change, meta change (binary package below changed) or
release number sync.
A user triggered build will show up as source change.
XmlResult: buildreason
GET /build/<project>/<repository>/<arch>/<package>/_jobstatus
Get build status of a current running build job or empty result if no job is running.
XmlResult: jobstatus
GET /build/<project>/<repository>/<arch>/<package>/_status
Get build status of the specified project/package/repo/arch combination
XmlResult: buildstatus
GET /build/<project>/<repository>/<arch>/<package>/_log
Get build log.
Parameters:
nostream: do not hang if the build is currently running
last: show log from last finished build
start: start at a given number of bytes
end: stop after the given number of bytes
view: special view instead of plain logfile. "entry" shows the size and mtime of logfile.
Result: Build log as text file.
=== Control
POST /build/<project>?cmd=rebuild
Triggers package rebuild for the repositories/architectures of the package
specified by the parameters. If no parameters are given, all packages of the
project are completely rebuilt.
Possible values for the code parameter are:
succeeded - build succeeded
failed - build failed
disabled - build is disabled in package config
excluded - build is excluded in spec file
scheduled - package is ready to be built
building - package is building on a worker
broken - package source is bad (i.e. no specfile)
unresolvable - build needs unavailable binary packages
Parameters:
package: package name, optional, multiple
arch: architecture, optional, multiple
repository: name of repository, optional, multiple
code: build status code, optional, multiple
XmlResult: status
POST /build/<project>?cmd=abortbuild
Kill all running builds, marking them as failed
Parameters:
see cmd=rebuild
POST /build/<project>?cmd=restartbuild
Restart all running builds
Parameters:
see cmd=rebuild
POST /build/<project>?cmd=wipe
Delete all binary packages from the packages
Parameters:
see cmd=rebuild
=== Local Build
GET /build/<project>/<repository>/<arch>/<package>/_buildinfo
Get build information for local building
XmlResult: buildinfo
POST /build/<project>/<repository>/<arch>/<package>/_buildinfo
Get build info for local building using the POSTed specfile.
<package> can be "_repository", if the designated package does not yet exist
on the server. Usefull for local build test before committing the initial package.
Body: specfile
XmlResult: buildinfo
=== Trigger area
POST /trigger/runservice
This call needs a token created via "createtoken" command to identify user and
package which shall be updated via a source service. The token must be delivered
as HTTP header:
Authorization: Token <TOKEN_STRING>
Parameters
project: To be used together with "package" to identify the object.
package:
XmlResult: status
=== Repository Information
GET /build/<project>/<repository>/<arch>/_repository
Returns list of binaries contained in the specified repository
XmlResult: binarylist
GET /build/<project>/<repository>/<arch>/_repository/<binaryname>
Returns binary
Result: binary file
GET /build/<project>/<repository>/<arch>/<package>
Returns list of binaries contained in the specified repository
XmlResult: binarylist
GET /build/<project>/<repository>/<arch>/<package>/_buildinfo
Build info according to the committed sources
XmlResult: buildinfo
POST /build/<project>/<repository>/<arch>/<package>/_buildinfo
Build info according to the uploaded sources
XmlResult: buildinfo
GET /build/<project>/<repository>/<arch>/_builddepinfo
Returns dependency information of packages in the specified repository. One or more
packages can be specified with the 'package' parameter. By default dependencies for
all packages are returned.
XmlResult: builddepinfo
GET /build/<project>/<repository>/_buildconfig
Build configuration for this repository, all base package requirements, mappings and macros.
== Search
GET /search/project
Searches for project metadata using xpath. A xpath predicate has to be
specified using the match parameter. The predicate will be used in this
expression: /project[<match>]. Only complete meta files will be returned.
Parameters:
match: xpath predicate, mandatory
XmlResult: collection
GET /search/project/id
Searches for project metadata analogous to /search/project, only the root
element is returned without any children.
Parameters:
match: xpath predicate, mandatory
XmlResult: collection
GET /search/package
Searches for package metadata using xpath. A xpath predicate has to be
specified using the match parameter. The predicate will be used in this
expression: /package[<match>]. Only complete meta files will be returned.
Parameters:
match: xpath predicate, mandatory
XmlResult: collection
GET /search/package/id
Searches for package metadata analogous to /search/package, only the root
element is returned without any children.
Parameters:
match: xpath predicate, mandatory
XmlResult: collection
GET /search/published/binary/id
Search for currenlty available binaries in the publish area.
Parameters:
match: xpath predicate, mandatory
XmlResult: collection
GET /search/published/pattern/id
Search for published patterns
Parameters:
match: xpath predicate, mandatory
XmlResult: collection
GET /search/channel/binary
Search for packages, sources or binaries which are referenced in channel files.
Unlike the released/binary search this works already after setting up a channel
even without releasing files.
Parameters:
match: xpath predicate, mandatory
XmlResult: collection
GET /search/channel/binary/id
Search for packages, sources or binaries which are referenced in channel files.
Unlike the released/binary search this works already after setting up a channel
even without releasing files.
This is the short version without full release data information.
Parameters:
match: xpath predicate, mandatory
XmlResult: collection
GET /search/released/binary
Search for binaries which got released. This works only for binaries published
via release mechanism. It also includes binaries which got removed again.
It is recommended to specify at least the @name binary package name or the
@disturl.
Parameters:
match: xpath predicate, mandatory
XmlResult: collection
GET /search/released/binary/id
Search for binaries which got released. This works only for binaries published
via release mechanism. It also includes binaries which got removed again.
This is the short version without full release data information.
Parameters:
match: xpath predicate, mandatory
XmlResult: collection
GET /search/request
Searches for requests using xpath. A xpath predicate has to be
specified using the match parameter. The predicate will be used in this
expression: /request[<match>]. Only complete meta files will be returned.
Parameters:
match: xpath predicate, mandatory
withhistory: includes the request history in result
withfullhistory: includes the request and review history in result
XmlResult: collection
GET /search/issue
Searches for issue metadata using xpath. A xpath predicate has to be
specified using the match parameter. The predicate will be used in this
expression: /issue[<match>]. Only complete issue information will be returned.
Parameters:
match: xpath predicate, mandatory
XmlResult: collection
GET /search/owner
Search for default responsible person or group.
Using the binary parameter the lookup happens via a build binary name
Using user or group all sources where they are responsible are for are listed.
Either binary, user or group parameter is required.
Parameters:
binary: specify the binary package to search for
user: specify a user login name to list his packages
group: specify a group title name to list their packages
devel: true/false: include devel package definitions?
limit: limit the number of results. Default is "1" single result. Use 0 for all hits, -1 for deepest match.
This works only when used together with binary search otherwise always all items get returned.
project: specify project to search in
filter: Comma seperated list of role names to be taken into account
attribute: specify attribute which is marking the default project(s). Default is OBS:OwnerRootProject
XmlResult: collection
GET /search/missing_owner
Search for missing definitions of specific role.
No parameter is required by default
Parameters:
devel: true/false: include devel package definitions?
limit: limit the number of results.
project: specify project to search in
filter: Comma seperated list of role names to be taken into account
attribute: specify attribute which is marking the default project(s). Default is OBS:OwnerRootProject
XmlResult: collection
== Published binary package tree
GET /published
List of published projects
XmlResult: directory
GET /published/<project>
List of repositories of published projects
XmlResult: directory
GET /published/<project>/<repository>
List of published repositories for the given project/repo
XmlResult: directory
GET /published/<project>/<repository>/<arch>
List of published binaries for the given project/repo/arch
XmlResult: directory
GET /published/<project>/<repository>/<arch>/<binary>
Download published binary
NOTE: use this only if you absolutely have to as it doesn't use
the redirector
Result: binary
GET /published/<project>/<repository>/<arch>/<binary>?view=ymp
Generate an ymp pattern that includes the needed repositories to install the
given binary
XmlResult: ymp
== Tags
GET /source/<project>/_tags
Get tags by project.
XmlResult: tags
GET /source/<project>/<package>/_tags
Get tags by package.
XmlResult: tags
GET /tag/<tag>/_projects
Get projects by tag(s).
For selection by more than one tag use TagA::TagB for example.
XmlResult: collection_objects_by_tag
GET /tag/<tag>/_packages
Get packages by tag.
XmlResult: collection_objects_by_tag
GET /tag/<tag>/_all
Get projects and packages by tag.
XmlResult: collection_objects_by_tag
GET /user/<user>/tags/_projects
Get all projects including tags assigned by the user
XmlResult: collection_objects_with_tags_by_user
GET /user/<user>/tags/_packages
Get all packages including tags assigned by the user
XmlResult: collection_objects_with_tags_by_user
GET /user/<user>/tags/_tagcloud
Parameters:
distribution=linear | logarithmic | raw
steps=[1..100]
limit=[0..] (default = 100, 0 = no limit)
Get a tag cloud from the tags used by the user.
XmlResult: tagcloud
GET /tag/_tagcloud
Parameters:
distribution=linear | logarithmic | raw
steps=[1..100]
limit=[0..] (default = 100, 0 = no limit)
Get a tag cloud including all tags.
XmlResult: tagcloud
GET user/<user>/tags/<project>
Get tags by user and project.
XmlResult: tags
PUT user/<user>/tags/<project>
Write tags by user and project.
XmlBody: tags
XmlResult: status
GET user/<user>/tags/<project>/<package>
Get tags by user and package.
XmlResult: tags
PUT user/<user>/tags/<project>/<package>
Write tags by user and package.
XmlBody: tags
XmlResult: status
== Build Results (Legacy)
This section describes the obsolete API for build results. It will be replaced
by the API available under /build.
=== Build Results
GET /result/<project>/<platform>/result
Read project summary result.
XmlResult: projectresult
GET /result/<project>/<platform>/<package>/result
Read package result.
XmlResult: packageresult
GET /result/<project>/<platform>/<package>/<arch>/log
Read build log.
Result: Build log as text file.
== Statistics
<limit>: limit count of results. optional, defaults to 10.
<group_by>: group results by: project, package, repo or arch.
<type>: can be projects or packages. optional, defaults to packages
GET /statistics/latest_added?limit=<limit>
Get a list of packages and projects (mixed) latest added to the build
service. All entries are sorted by creation time.
XmlResult: latest_added
GET /statistics/added_timestamp/<project>/<package>
Get timestamp when project or package was added to the build service.
XmlResult: added_timestamp
GET /statistics/latest_updated?limit=<limit>
Get a list of packages and project that were last updated. All entries are
sorted by the update timestamp.
XmlResult: latest_updated
GET /statistics/updated_timestamp/<project>/<package>
Get timestamp when project or package was last updated.
XmlResult: updated_timestamp
GET /statistics/activity/<project>/<package>
Get activity in % of project or package.
XmlResult: activity
GET /statistics/most_active?type=<type>&limit=<limit>
Get list of most active packages (type=packages) or projects (type=projects).
Also returns count of updates since package was created when type=packages.
Also returns count of packages that are in this project when type=projects.
XmlResult: most_active
GET /statistics/highest_rated?limit=<limit>
Get list of highest rated projects and packages. Results are sorted by score.
Only items with more than 3 ratings will show up in this list.
XmlResult: highest_rated
GET /statistics/rating/<project>/<package>
Get rating of a specific project or package. Also returns what score the
logged in user gave and how many ratings there are already for the specified
object.
XmlResult: rating
PUT /statistics/rating/<project>/<package>
Rate this project / package.
XmlResult: rating
GET /statistics/download_counter?limit=<limit>
Get download counters for top downloaded files including to which project,
package, repository and architecture they belong.
XmlResult: download_counter
GET /statistics/download_counter?group_by=<group_by>&limit=<limit>
Get summarized download counters for top downloaded projects, packages,
repositories or architectures (by setting group_by parameter to project,
package, repo or arch) including count of files that belong to the respective
object.
XmlResult: download_counter_summary
PUT /statistics/redirect_stats
Send download statistics from the openSUSE download redirector to the build
service api, to update the download_counter database.
User needs to have appropriate permissions.
XmlResult: redirect_stats
GET /statistics/newest_stats
Get the timestamp of the newest stats in build service. This is useful for the
create_stats_xml.rb script. Using this value it can import only those
statistics that changed from the last import of statistics.
If there are no statistics yet, returns "1970-01-01T01:00:00+01:00"
XmlResult: newest_stats
== Status Messages
<limit>: limit count of messages. optional, defaults to unlimited.
GET /status_message/?limit=<limit>
Get a list of status messages.
XmlResult: status_messages
PUT /status_message/
Send a new status message to the build service. User needs to have
appropriate permissions.
XmlResult: status_message
== Messages (for projects/packages)
<id>: message id
<limit>: limit count of messages. optional, defaults to unlimited.
GET /message/<id>
Get (one) message specified by id.
XmlResult: messages
GET /message/?limit=<limit>
Get a list of messages, independent of project or package.
All entries are ordered by creation time (latest first).
XmlResult: messages
GET /message/?project=<project>
Get a list of messages for this package.
All entries are ordered by creation time (latest first).
XmlResult: messages
GET /message/?project=<project>&package=<package>
Get a list of messages for this package.
All entries are ordered by creation time (latest first).
XmlResult: messages
PUT /message/?project=<project>&package=<package>
Append message to the specified package (or project, if package parameter
is omitted).
XmlBody :message
XmlResult: message
== Internal only routes
/public shall not be used in any tools, it is for OBS remote support only and may
change or disappear at any time.
|