[[appendix_project_json]] === Appendix A: Project JSON Projects relate branches of revisions with other structures, like groups, to help create the foundation for general workflows. The content type of the project JSON is `application/vnd.perforce.project.v1+json`. You can specify the content type without the version string, e.g., `application/vnd.perforce.project+json`. This may be useful in cases where you can handle possibly different versions of JSON, say, for migration. ==== JSON structure The minimal project document is an empty JSON object: `{}`. Each project document starts with project properties. Most of these project properties are string values, but some are JSON objects. Each of those JSON objects fall under the following kinds of structures: - Branches - Views - Extensions ===== Project Properties [cols="3*", options="header"] |=== | Property | Required | Description | `id` | Yes | A string composed only of lower-case alpha characters, numbers, and underscores. The `id` should be unique within the system. | `name` | No | A string suitable for display of the project. | `version` | No | The version of the project. This is typically derived from the revision number stored within the system. | `description` | No | A possibly multiline text string that indicates the purpose of the project. | `branches` | Yes | An array of Branch objects (each object is described below) | `extensions` | Yes | An object that maps extension ID to extension data (described below) |=== ===== Branch properties [cols="3*", options="header"] |=== | Property | Required | Description | `id` | Yes | A string identifying the branch. | `name` | No | A display string for the branch | `view` | No | An array of view objects defining a "classic" style Perforce branch. Either the `view` or the `stream` should be defined. | `stream` | No | The stream to use for the particular branch. Either the `view` or the `stream` should be defined. |=== ===== View properties [cols="3*", options="header"] |=== | `depotPath` | A typical absolute P4 depot path specification. | `viewPath | A relative path specification. |=== ===== Extension properties Each project has a single extension object that maps an extension ID to it's data. Note that these extensions are not stored directly into the data on the perforce server. As a convention, each extension contains a `contentType` property that indicates a MIME-style content type. This content type will contain a version number. [cols="2*", options="header"] |=== | Property | Description | The extension ID, e.g., `roles` | The value of the property is typically a JSON object, usually documented with the extension. |===
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#3 | 15622 | tjuricek |
Move source code to 'source/' subdirectory of branch. build/ will remain where it is. |
||
#2 | 15098 | tjuricek |
Revised project services to GET-only forms. With Helix Sync revising to integrate purely with Helix Cloud, this is the only thing we can reasonably define. |
||
#1 | 15090 | tjuricek |
Update _proposed_ API for project services. This is *very likely* to change, and will not be implemented until reviewed. |