Documentation Archive

Developer

Xcode Server API Reference

On This Page

Schema

The Xcode Server API consumes and produces JSON objects. Each type of object the Xcode Server uses has a defined structure, with certain expected properties.

Bot

  1. {
  2. /* Bot ID */
  3. "_id": "bb5b5dfa1c4abff347d28bed7e00b381",
  4. /* Revision ID */
  5. "_rev": "5-a050220837762e423ee28a5e9c150844",
  6. /* Configuration. See the section "Schema > Bot Configuration" for more information. */
  7. "configuration": {
  8. ...
  9. },
  10. /* Name of the bot */
  11. "name": "Sketch",
  12. /* The integration counter
  13. This number dictates the number that the next integration will be set to.
  14. */
  15. "integration_counter": 2,
  16. /* The document type */
  17. "doc_type": "bot",
  18. /* Last revision blueprint. See the section "Blueprint" for more information. */
  19. "lastRevisionBlueprint": {
  20. ...
  21. }
  22. }

Bot Configuration

  1. {
  2. /* ----- Scheduling ----- */
  3. /* Schedule type:
  4. 1: Periodically
  5. 2: On commit
  6. 3: Manual
  7. */
  8. "scheduleType": 3,
  9. /* Periodic schedule
  10. 1: Hourly
  11. 2: Daily
  12. 3: Weekly
  13. Dependencies:
  14. - 'scheduleType' set to 1 (Periodically)
  15. */
  16. "periodicScheduleInterval": 0,
  17. /* Minutes after the hour to integrate
  18. Value: 0 to 59
  19. Dependencies:
  20. - 'periodicScheduleInterval' set to 1 (Hourly)
  21. "minutesAfterHourToIntegrate": 0,
  22. /* Hour of integration
  23. Value: 0 (midnight) to 23
  24. Dependencies:
  25. - 'periodicScheduleInterval' set to 2 (Daily) or 3 (Weekly)
  26. */
  27. "hourOfIntegration": 0,
  28. /* Weekly schedule day
  29. 1: Monday
  30. 2: Tuesday
  31. 3: Wednesday
  32. 4: Thursday
  33. 5: Friday
  34. 6: Saturday
  35. 7: Sunday
  36. Dependencies:
  37. - 'periodicScheduleInterval' set to 3 (Weekly)
  38. "weeklyScheduleDay": 0,
  39. /* ----- General ----- */
  40. /* Scheme name
  41. The name of the scheme used to integrate.
  42. */
  43. "schemeName": "dojo-testing",
  44. /* Built from clean
  45. 0: Never
  46. 1: Always
  47. 2: Once a day
  48. 3: Once a week
  49. */
  50. "builtFromClean": 0,
  51. /* Configuration
  52. Value: "Debug" | "Release" | "XXX" <- we need to set the value because if exists already,
  53. devs cannot remove it (there is no support for it)
  54. */
  55. "buildConfiguration": "Release",
  56. /* ----- Actions ----- */
  57. /* Performs analyze action
  58. Value: true | false
  59. */
  60. "performsAnalyzeAction": true,
  61. /* Performs test action
  62. Value: true | false
  63. */
  64. "performsTestAction": true,
  65. /* Performs archive action
  66. Value: true | false
  67. */
  68. "exportsProductFromArchive": true,
  69. /* ----- Testing ----- */
  70. /* Code coverage
  71. 1: Use scheme setting
  72. 2: Enabled
  73. 3: Disabled
  74. Dependencies:
  75. - 'performsTestAction' set to true
  76. */
  77. "codeCoveragePreference": 1,
  78. /* ----- Triggers ----- */
  79. /* Triggers
  80. Value: array of <Trigger>
  81. Trigger:
  82. phase: 1 (Before) | 2 (After)
  83. scriptBody: string (script)
  84. type:
  85. name: string (title of the script)
  86. conditions:
  87. status: ???
  88. onWarnings: true | false
  89. onBuildErrors: true | false
  90. onInternalErrors: true | false
  91. onAnalyzerWarnings: true | false
  92. onFailingTests: true | false
  93. onSuccess: true | false
  94. Dependencies:
  95. - 'phase' set to 2 must specify Trigger property 'conditions'.
  96. */
  97. "triggers": [
  98. ...
  99. ],
  100. /* ----- Devices ----- */
  101. /* Device specification
  102. Value: array of <device ID>
  103. Dependencies:
  104. - 'performsTestAction' set to true
  105. */
  106. "deviceSpecification": {
  107. "filters": [
  108. {
  109. ...
  110. ],
  111. "deviceIdentifiers": [
  112. ...
  113. ]
  114. },
  115. /* ----- Blueprint ----- */
  116. "sourceControlBlueprint": {
  117. /* Unique identifier for each blueprint
  118. Value: A valid UUID
  119. */
  120. "DVTSourceControlWorkspaceBlueprintIdentifierKey": "34D1C3F9-E33F-4935-A5E4-7154F4309EDF",
  121. /* Locations
  122. Value: array of <Location>
  123. Location:
  124. DVTSourceControlBranchIdentifierKey: string (branch name)
  125. DVTSourceControlBranchOptionsKey:
  126. 4 (normal remote branch) |
  127. 5 (primary remote branch, necessary for trunk-like branch in Subversion)
  128. DVTSourceControlPathIdentifierKey: string (relative path in repository)
  129. DVTSourceControlLocationRevisionKey: string (revision)
  130. DVTSourceControlWorkspaceBlueprintLocationTypeKey: one of the following options:
  131. "DVTSourceControlBranch" (Branch)
  132. "DVTSourceControlPathLocation" (Path, Subversion-only)
  133. "DVTSourceControlLockedRevisionLocation" (Revision, Git-only)
  134. */
  135. "DVTSourceControlWorkspaceBlueprintLocationsKey": {
  136. "47B0B4A0E6B2316DF0F333C188B6423A9479B516": {
  137. "DVTSourceControlBranchIdentifierKey": "master",
  138. "DVTSourceControlBranchOptionsKey": 5,
  139. "DVTSourceControlWorkspaceBlueprintLocationTypeKey": "DVTSourceControlBranch"
  140. }
  141. },
  142. /* The name for the blueprint, typically the name of the Xcode project or workspace
  143. Value: string
  144. */
  145. "DVTSourceControlWorkspaceBlueprintNameKey": "Project",
  146. /* The identifier of the working copy containing the Xcode project or workspace to build,
  147. considered the primary working copy.
  148. Value: string (repository identifier)
  149. */
  150. "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey": "47B0B4A0E6B2316DF0F333C188B6423A9479B516",
  151. /* The relative path in the primary working copy to the Xcode project or workspace to build
  152. Value: string (relative path)
  153. */
  154. "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey": "Project.xcworkspace",
  155. /* Repositories
  156. Value: array of <Repository>
  157. Repository:
  158. DVTSourceControlWorkspaceBlueprintRemoteRepositoryEnforceTrustCertFingerprintKey: true | false
  159. DVTSourceControlWorkspaceBlueprintRemoteRepositoryTrustSelfSignedCertKey: true | false
  160. DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey: string
  161. DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey:
  162. "com.apple.dt.Xcode.sourcecontrol.Git" (Git) |
  163. "com.apple.dt.Xcode.sourcecontrol.Subversion" (Subversion)
  164. DVTSourceControlWorkspaceBlueprintRemoteRepositoryTrustedCertFingerprintKey: a string of one of the following fingerprint options:
  165. RSA (SSH servers) |
  166. MD5 (self-signed SSL server certificates)
  167. DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey: string (URI)
  168. */
  169. "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey": [
  170. {
  171. "DVTSourceControlWorkspaceBlueprintRemoteRepositoryEnforceTrustCertFingerprintKey": true,
  172. "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey": "47B0B4A0E6B2316DF0F333C188B6423A9479B516",
  173. "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey": "com.apple.dt.Xcode.sourcecontrol.Git",
  174. "DVTSourceControlWorkspaceBlueprintRemoteRepositoryTrustedCertFingerprintKey": "174F678B9ED220D9C8B2A47F42392A44",
  175. "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey": "git@server:/repo.git"
  176. }
  177. ],
  178. /* Authentication strategies
  179. Value: dictionary of string (repository identifier) to <Authentication>
  180. Authentication:
  181. DVTSourceControlWorkspaceBlueprintRemoteRepositoryAuthenticationTypeKey: one of the following options:
  182. "DVTSourceControlAuthenticationStrategy" (Anonymous)
  183. "DVTSourceControlBasicAuthenticationStrategy" (Username and Password)
  184. "DVTSourceControlSSHKeysAuthenticationStrategy" (SSH Keys)
  185. DVTSourceControlWorkspaceBlueprintRemoteRepositoryPasswordKey: string (Password or Passphrase)
  186. DVTSourceControlWorkspaceBlueprintRemoteRepositoryUsernameKey: string (Username)
  187. DVTSourceControlWorkspaceBlueprintRemoteRepositoryPublicKeyDataKey: string (Base64-encoded public key data)
  188. DVTSourceControlWorkspaceBlueprintRemoteRepositoryPrivateKeyDataKey: string (Base64-encoded private key data)
  189. */
  190. "DVTSourceControlWorkspaceBlueprintRemoteRepositoryAuthenticationStrategiesKey": {
  191. "47B0B4A0E6B2316DF0F333C188B6423A9479B516": {
  192. "DVTSourceControlWorkspaceBlueprintRemoteRepositoryAuthenticationTypeKey":
  193. "DVTSourceControlBasicAuthenticationStrategy",
  194. "DVTSourceControlWorkspaceBlueprintRemoteRepositoryPasswordKey": "foobar",
  195. "DVTSourceControlWorkspaceBlueprintRemoteRepositoryUsernameKey": "git"
  196. }
  197. },
  198. /* The blueprint format version
  199. Value: 204
  200. */
  201. "DVTSourceControlWorkspaceBlueprintVersion": 204,
  202. /* Working copy layout
  203. Value: dictionary of string (repository identifier) to string (relative path of checkout)
  204. */
  205. "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey": {
  206. "47B0B4A0E6B2316DF0F333C188B6423A9479B516": "Project/"
  207. }
  208. }
  209. }

Integration

  1. {
  2. /* Integration ID */
  3. "_id": "bb5b5dfa1c4abff347d28bed7e00bf87",
  4. /* Revision ID */
  5. "_rev": "17-c23a1a6231571d17435af0f0ff1f4228",
  6. /* Integration number */
  7. "number": 1,
  8. /* The result of the integration
  9. Values:
  10. succeeded
  11. test-failures
  12. build-errors
  13. warnings
  14. analyzer-warnings
  15. build-failed
  16. checkout-error
  17. internal-error
  18. internal-checkout-error
  19. internal-build-error
  20. internal-processing-error
  21. canceled
  22. trigger-error
  23. unknown
  24. */
  25. "result": "succeeded",
  26. /* The number of successful continuous integrations */
  27. "success_streak": 1,
  28. /* The bot snapshot. See the section "Schema > Bot" for more information. */
  29. "bot": {
  30. ...
  31. },
  32. /* */
  33. "shouldClean": false,
  34. /* The document type */
  35. "doc_type": "integration",
  36. /* The current step of the integration */
  37. "currentStep": "completed",
  38. /* The date when the integration was triggered */
  39. "queuedDate": "2015-08-03T17:26:53.183Z",
  40. /* The date when the integration started */
  41. "startedTime": "2015-08-03T17:26:53.786Z",
  42. /* The date when the integration finished */
  43. "endedTime": "2015-08-03T17:27:15.050Z",
  44. /* The duration of the integration (in seconds) */
  45. "duration": 21.264,
  46. /* Revision blueprint. See the section "Blueprint" for more information. */
  47. "revisionBlueprint": {
  48. ...
  49. },
  50. /* The build results summary
  51. Values:
  52. errorCount: number of errors detected in the Build phase
  53. errorChange: number of errors delta with the previous integration
  54. warningCount: number of warnings detected in the Build phase
  55. warningChange: number of warnings delta with the previous integration
  56. analyzerWarningCount: number of warnings detected in the Analysis phase
  57. analyzerWarningChange: number of warnings delta with the previous integration
  58. testsCount: number of tests to be executed
  59. testsChange: number of tests delta with the previous integration
  60. testFailureCount: number of failed tests
  61. testFailureChange: number of failed tests delta with the previous integration
  62. regressedPerfTestCount: number of regressed performance tests
  63. improvedPerfTestCount: number of improved performance tests
  64. codeCoveragePercentage: coverage percentage
  65. codeCoveragePercentageDelta: coverage percentage delta with the previous integration
  66. */
  67. "buildResultSummary": {
  68. "errorCount": 0,
  69. "errorChange": 0,
  70. "warningCount": 0,
  71. "warningChange": 0,
  72. "analyzerWarningCount": 0,
  73. "analyzerWarningChange": 0,
  74. "testsCount": 220,
  75. "testsChange": 220,
  76. "testFailureCount": 0,
  77. "testFailureChange": 0,
  78. "regressedPerfTestCount": 0,
  79. "improvedPerfTestCount": 0,
  80. "codeCoveragePercentage": 71,
  81. "codeCoveragePercentageDelta": 0
  82. }
  83. }

Issue

  1. {
  2. /*
  3. The top-level properties are the following:
  4. errors
  5. testFailures
  6. analyzerWarnings
  7. warnings
  8. buildServiceErrors
  9. buildServiceWarnings
  10. Each of these properties (except for buildServiceErrors and buildServiceWarnings) contains the following sub-properties:
  11. freshIssues: new issues that appeared in the integration
  12. unresolvedIssues: issues that appeared before and have not been resolved yet
  13. resolvedIssues: issues that appeared before and have been resolved
  14. Each of these sub-properties are arrays containing one or more elements with the following structure
  15. {
  16. /* Issue status
  17. 0: New
  18. 1: Unresolved
  19. 2: Resolved
  20. */
  21. "status": 1,
  22. /* The document file path
  23. Under some circumstances, the file may not exist (i.e. the issue is a test failure).
  24. */
  25. "documentFilePath": "<unknown>",
  26. /* The name of the test */
  27. "testCase": "-[TestKVOConditionValidator testAsyncCallback]",
  28. /* The reason for the issue */
  29. "message": "Test process exited unexpectedly.",
  30. /* The associated integration ID where this issue was first discovered */
  31. "integrationID": "ee61c2f211a21ebd39d697f056924f2d",
  32. /* Number of integrations since the issue appeared */
  33. "age": 5,
  34. /* Issue type
  35. Values:
  36. error
  37. warning
  38. analyzerWarning
  39. testFailure
  40. buildServiceError
  41. buildServiceWarning
  42. triggerError
  43. unknown
  44. */
  45. "type": "testFailure",
  46. /* A list of commits associated with the integration. See the section "Schema > Commit" for more information. */
  47. "commits": [
  48. ]
  49. }
  50. */
  51. /* Issue ID */
  52. "_id": "0c613a043b42f4ff8ee13ef6c61abe9a",
  53. /* revision ID */
  54. "_rev": "3-339372917d7245edf03ae553db9f7f89",
  55. "errors": {
  56. "unresolvedIssues": [
  57. ],
  58. "resolvedIssues": [
  59. ],
  60. "freshIssues": [
  61. ]
  62. },
  63. "testFailures": {
  64. "unresolvedIssues": [
  65. ],
  66. "resolvedIssues": [
  67. ],
  68. "freshIssues": [
  69. ]
  70. },
  71. "buildServiceWarnings": [
  72. ],
  73. "analyzerWarnings": {
  74. "unresolvedIssues": [
  75. ],
  76. "resolvedIssues": [
  77. ],
  78. "freshIssues": [
  79. ]
  80. },
  81. "buildServiceErrors": [
  82. ],
  83. "warnings": {
  84. "unresolvedIssues": [
  85. ],
  86. "resolvedIssues": [
  87. ],
  88. "freshIssues": [
  89. ]
  90. },
  91. /* Integration ID */
  92. "integration": "b76633a9c3974e21c2f263f6849ecf60",
  93. /* The document type */
  94. "doc_type": "issue"
  95. }

Commit List

  1. {
  2. /* Commit ID */
  3. "_id": "b31ad8317300e89b2db73aad3d0194ad",
  4. /* Revision ID */
  5. "_rev": "3-7fda81759371fb8644058c0cfc83737e",
  6. /* The list of commits per repository */
  7. "commits": {
  8. /* Repository ID (matched against the bot blueprint) */
  9. "6446FCB001D8C2E70EC59D119F3E3318109CE1A9": [
  10. {
  11. /* A list of commits objects. See the section "Schema > Commit" for more information. */
  12. }
  13. ]
  14. },
  15. /* Integration ID */
  16. "integration": "b31ad8317300e89b2db73aad3d049327",
  17. /* Bot ID */
  18. "botID": "b31ad8317300e89b2db73aad3d048d19",
  19. /* The document type */
  20. "doc_type": "commit"
  21. }

Commit

  1. {
  2. /* List of file paths and SCM file status
  3. File status codes:
  4. 1: Added
  5. 2: Deleted
  6. 4: Modified
  7. 8: Modified Properties
  8. */
  9. "XCSCommitCommitChangeFilePaths": [
  10. {
  11. /* SCM status */
  12. "status": 4,
  13. "filePath": "Sketch.xcodeproj/project.pbxproj"
  14. }
  15. ],
  16. /* Commit message */
  17. "XCSCommitMessage": "Remove run scripts (is obsolete and was causing a warning)",
  18. /* Blueprint repository ID */
  19. "XCSBlueprintRepositoryID": "6446FCB001D8C2E70EC59D119F3E3318109CE1A9",
  20. /* Commit contributor list */
  21. "XCSCommitContributor": {
  22. /* List of emails associated with the user */
  23. "XCSContributorEmails": [
  24. "appleseed@mycompany.com"
  25. ],
  26. /* Name of the contributor */
  27. "XCSContributorName": "John Appleseed",
  28. /* Display name of the contributor */
  29. "XCSContributorDisplayName": "John Appleseed"
  30. },
  31. /* Commit hash */
  32. "XCSCommitHash": "3982fd5a6dd349c3673c9f91a96baf69eedc44a1",
  33. /* Commit timestamp */
  34. "XCSCommitTimestamp": "2015-06-19T18:37:31.000Z"
  35. }