Web application REST API

Overview

The DBB server provides REST services to create, read, update, and delete objects from the DBB database. The services accept and return objects in XML or JSON format.

Table of Contents

---

Collection Service

A Collection represents an SCM branch or stream. The dependency data related APIs will require a unique collection name.

Collection Fields

id: A unique ID assigned by the system to identify individual Collection objects.
name: Unique name for a Collection.
logicalFile: See Logical File Service NOTE: JSON format will use the field name "logicalFiles". owner: The owner of this object. The default value is the creator of the object. team: The team with access authority to the object. The default value is null. permission: The type of authority that an owner, team, or individual has to the object. The permission is represented by a three-digit octal number. See Permission Details for more information.

HTTP Method: POST (Create New Collection)

A POST can be used to create a Collection. Use the Content-Type header to indicate the format of the request body. Logical file metadata is optional and may be added in a separate POST request.
    Example request URL: https://localhost:9443/dbb/rest/collection

A successful POST will return a 201 response code. The response "Location" header will contain the URL of the item created.
    Example response URL: https://localhost:9443/dbb/rest/collection/1351

Content-type Example of request body
application/json
{
"name" : "MortgageApplication",
"logicalFiles" : [{
"lname" : "EPSMLIST",
"file" : "MortgageApplication/cobol/epsmlist.cbl",
"language" : "COB",
"logicalDependencies" : [
{"lname" : "COPY1", "category" : "COPY", "library" : "SYSLIB"},
{"lname" : "COPY2", "category" : "COPY", "library" : "SYSLIB"} ]
},{
"lname" : "EPSNBRVL",
"file" : "MortgageApplication/cobol/epsnbrvl.cbl",
"language" : "COB",
"logicalDependencies" : [
{"lname" : "COPY1", "category" : "COPY", "library" : "SYSLIB"},
{"lname" : "COPY2", "category" : "COPY", "library" : "SYSLIB"} ]
} ]
}
application/xml
<collection>
<name>MortgageApplication</name>
<logicalFiles>
<logicalFile>
<lname>EPSMLIST</lname>
<file>MortgageApplication/cobol/epsmlist.cbl</file>
<language>COB</language>
<logicalDependencies>
<logicalDependency>
<lname>COPY1</lname><category>COPY</category><library>SYSLIB</library>
</logicalDependency>
<logicalDependency>
<lname>COPY2</lname><category>COPY</category><library>SYSLIB</library>
</logicalDependency>
</logicalDependencies>
</logicalFile>
<logicalFile>
<lname>EPSNBRVL</lname>
<file>MortgageApplication/cobol/epsnbrvl.cbl</file>
<language>COB</language>
<logicalDependencies>
<logicalDependency>
<lname>COPY1</lname><category>COPY</category><library>SYSLIB</library>
</logicalDependency>
<logicalDependency>
<lname>COPY2</lname><category>COPY</category><library>SYSLIB</library>
</logicalDependency>
</logicalDependencies>
</logicalFile>
</logicalFiles>
</collection>
text/plain The service will accept a content-type of text/plain with the expectation that the request body is either XML or JSON.

HTTP Method: POST (Copy)

A POST can be used to create a Collection from another Collection. A request body is not expected and will be ignored if provided. The new collection becomes a copy of the source collection with a new name.
    Example request URL: https://localhost:9443/dbb/rest/collection/{new_name}?source={id_or_name}
        Where:
            new_name: becomes the name of the new collection. The new name must be unique.
            id_or_name: is the id or unique name of the existing collection that is being copied.

A successful POST will return a 201 response code. The response "Location" header will contain the URL of the item created.
    Example response URL: https://localhost:9443/dbb/rest/collection/1351

HTTP Method: POST or PUT (Add logical files)

A POST or PUT can be used to add logical file metadata to an existing Collection. Use the Content-Type header to indicate the format of the request body. Logical file metadata will be merged with the existing logical file metadata that is already part of the collection. Use the Logical File DELETE API to remove a logical file from a collection.
    Example request URL: https://localhost:9443/dbb/rest/collection/{id_or_name}/logicalFile
        Where:
            id: is the unique id number assigned when the collection is created.
            name: is the unique name supplied during collection creation.

A successful POST will return a 200 response code.

Content-type Example of request body
application/json
[{
"lname" : "EPSMLIST",
"file" : "MortgageApplication/cobol/epsmlist.cbl",
"language" : "COB",
"logicalDependencies" : [
{"lname" : "COPY1", "category" : "COPY", "library" : "SYSLIB"},
{"lname" : "COPY2", "category" : "COPY", "library" : "SYSLIB"} ]
},{
"lname" : "EPSNBRVL",
"file" : "MortgageApplication/cobol/epsnbrvl.cbl",
"language" : "COB",
"logicalDependencies" : [
{"lname" : "COPY1", "category" : "COPY", "library" : "SYSLIB"},
{"lname" : "COPY2", "category" : "COPY", "library" : "SYSLIB"} ]
}]
application/xml
<logicalFiles>
<logicalFile>
<lname>EPSMLIST</lname>
<file>MortgageApplication/cobol/epsmlist.cbl</file>
<language>COB</language>
<logicalDependencies>
<logicalDependency>
<lname>COPY1</lname><category>COPY</category><library>SYSLIB</library>
</logicalDependency>
<logicalDependency>
<lname>COPY2</lname><category>COPY</category><library>SYSLIB</library>
</logicalDependency>
</logicalDependencies>
</logicalFile>
<logicalFile>
<lname>EPSNBRVL</lname>
<file>MortgageApplication/cobol/epsnbrvl.cbl</file>
<language>COB</language>
<logicalDependencies>
<logicalDependency>
<lname>COPY1</lname><category>COPY</category><library>SYSLIB</library>
</logicalDependency>
<logicalDependency>
<lname>COPY2</lname><category>COPY</category><library>SYSLIB</library>
</logicalDependency>
<logicalDependencies>
</logicalFile>
</logicalFiles>
text/plain The service will accept a content-type of text/plain with the expectation that the request body is either XML or JSON.

HTTP Method: GET (without ID or name)

A GET request without a collection id or name as part of the URL is used to read the contents of all collection objects. The request Accept header will determine the format (XML or JSON) of the output in the response body.

Optionally, you may add minimal to the URL to eliminate logical file metadata from the response. Minimal is recommended for large collections or large number of collections to limit the amount of data returned.
    Example request URL: https://localhost:9443/dbb/rest/collection or https://localhost:9443/dbb/rest/collection/minimal

A successful GET will return a 200 response code.

Accept Example of Response Body
application/json
[ {
"id" : 468,
"name" : "Collection1",
"logicalFiles" : [ {
"id" : "30",
"lname" : "EPSMLIST",
"file" : "MortgageApplication/cobol/epsmlist.cbl",
"language" : "COB",
"logicalDependencies" : [
{"id" : "31", "lname" : "COPY1", "category" : "COPY", "library" : "SYSLIB"},
{"id" : "32", "lname" : "COPY2", "category" : "COPY", "library" : "SYSLIB"} ]
},{
"id" : "33",
"lname" : "EPSNBRVL",
"file" : "MortgageApplication/cobol/epsnbrvl.cbl",
"language" : "COB",
"logicalDependencies" : [
{"id" : "31", "lname" : "COPY1", "category" : "COPY", "library" : "SYSLIB"},
{"id" : "32", "lname" : "COPY2", "category" : "COPY", "library" : "SYSLIB"} ]
} ],
"created" : "2017-03-29T10:08:04.24-04:00",
"createdBy" : "ADMIN",
"lastUpdated" : "2017-03-29T10:08:04.24-04:00",
"lastUpdatedBy" : "ADMIN"
}, {
"id" : 469,
"name" : "Collection2",
"logicalFiles" : [ {
"id" : "30",
"lname" : "EPSMLIST",
"file" : "MortgageApplication/cobol/epsmlist.cbl",
"language" : "COB",
"logicalDependencies" : [
{"id" : "31", "lname" : "COPY1", "category" : "COPY", "library" : "SYSLIB"},
{"id" : "32", "lname" : "COPY2", "category" : "COPY", "library" : "SYSLIB"} ]
}, {
"id" : "33",
"lname" : "EPSNBRVL",
"file" : "MortgageApplication/cobol/epsnbrvl.cbl",
"language" : "COB",
"logicalDependencies" : [
{"id" : "31", "lname" : "COPY1", "category" : "COPY", "library" : "SYSLIB"},
{"id" : "32", "lname" : "COPY2", "category" : "COPY", "library" : "SYSLIB"} ]
} ],
"created" : "2017-03-29T10:08:04.24-04:00",
"createdBy" : "ADMIN",
"lastUpdated" : "2017-03-29T10:08:04.24-04:00",
"lastUpdatedBy" : "ADMIN"
} ]
application/xml
<collections>
<collection id="468">
<name>Collection1</name>
<created>2017-03-29T10:08:04.24-04:00</created>
<createdBy>ADMIN</createdBy>
<lastUpdated>2017-03-29T10:08:04.24-04:00</lastUpdated>
<lastUpdatedBy>ADMIN</lastUpdatedBy>
<logicalFiles>
<logicalFile id="30">
<lname>EPSMLIST</lname>
<file>MortgageApplication/cobol/epsmlist.cbl</file>
<language>COB</language>
<logicalDependencies>
<logicalDependency id="31">
<lname>COPY1</lname><category>COPY</category><library>SYSLIB</library>
</logicalDependency>
<logicalDependency id="32">
<lname>COPY2</lname><category>COPY</category><library>SYSLIB</library>
</logicalDependency>
</logicalDependencies>
</logicalFile>
<logicalFile id="33">
<lname>EPSNBRVL</lname>
<file>MortgageApplication/cobol/epsnbrvl.cbl</file>
<language>COB</language>
<logicalDependencies>
<logicalDependency id="31">
<lname>COPY1</lname><category>COPY</category><library>SYSLIB</library>
</logicalDependency>
<logicalDependency id="32">
<lname>COPY2</lname><category>COPY</category><library>SYSLIB</library>
</logicalDependency>
</logicalDependencies>
</logicalFile>
</logicalFiles>
</collection>
<collection id="469">
<name>Collection2</name>
<created>2017-03-29T10:08:04.396-04:00</created>
<createdBy>ADMIN</createdBy>
<lastUpdated>2017-03-29T10:08:04.396-04:00</lastUpdated>
<lastUpdatedBy>ADMIN</lastUpdatedBy>
<logicalFiles>
<logicalFile id="30">
<lname>EPSMLIST</lname>
<file>MortgageApplication/cobol/epsmlist.cbl</file>
<language>COB</language>
<logicalDependencies>
<logicalDependency id="31">
<lname>COPY1</lname><category>COPY</category><library>SYSLIB</library>
</logicalDependency>
<logicalDependency id="32">
<lname>COPY2</lname><category>COPY</category><library>SYSLIB</library>
</logicalDependency>
</logicalDependencies>
</logicalFile>
<logicalFile id="33">
<lname>EPSNBRVL</lname>
<file>MortgageApplication/cobol/epsnbrvl.cbl</file>
<language>COB</language>
<logicalDependencies>
<logicalDependency id="31">
<lname>COPY1</lname><category>COPY</category><library>SYSLIB</library>
</logicalDependency>
<logicalDependency id="32">
<lname>COPY2</lname><category>COPY</category><library>SYSLIB</library>
</logicalDependency>
</logicalDependencies>
</logicalFile>
</logicalFiles>
</collection>
</collections>
text/plain Not Supported

HTTP Method: GET (with ID or name)

A GET request with an ID or name as part of the URL is used to read the contents of an individual collection object. The request Accept header will determine the format (XML or JSON) of the output in the response body. The URL returned from the POST is used to perform the GET. The number on the URL corresponds with the id attribute in the XML returned by a GET or the id field in the JSON returned by a GET. Optionally, you may add minimal to the URL to eliminate logical file metadata from the response. Minimal is recommended for large collections to limit the amount of data returned.
    Example request URL: https://localhost:9443/dbb/rest/collection/468 or https://localhost:9443/dbb/rest/collection/Collection1/minimal
        id: is the unique id number assigned when the collection is created.
        name: is the unique name supplied during collection creation.

A successful GET will return a 200 response code.

Accept Example of Response Body
application/json
{
"id" : 468,
"name" : "Collection1",
"logicalFiles" : [ {
"id" : "30",
"lname" : "EPSMLIST",
"file" : "MortgageApplication/cobol/epsmlist.cbl",
"language" : "COB",
"logicalDependencies" : [
{"id" : "31", "lname" : "COPY1", "category" : "COPY", "library" : "SYSLIB"},
{"id" : "32", "lname" : "COPY2", "category" : "COPY", "library" : "SYSLIB"} ]
}, {
"id" : "33",
"lname" : "EPSNBRVL",
"file" : "MortgageApplication/cobol/epsnbrvl.cbl",
"language" : "COB",
"logicalDependencies" : [
{"id" : "31", "lname" : "COPY1", "category" : "COPY", "library" : "SYSLIB"},
{"id" : "32", "lname" : "COPY2", "category" : "COPY", "library" : "SYSLIB"} ]
}
],
"created" : "2017-03-29T10:08:04.24-04:00",
"createdBy" : "ADMIN",
"lastUpdated" : "2017-03-29T10:08:04.24-04:00",
"lastUpdatedBy" : "ADMIN"
}
application/xml
<collection id="468">
<name>Collection1</name>
<created>2017-03-29T10:08:04.24-04:00</created>
<createdBy>ADMIN</createdBy>
<lastUpdated>2017-03-29T10:08:04.24-04:00</lastUpdated>
<lastUpdatedBy>ADMIN</lastUpdatedBy>
<logicalFiles>
<logicalFile id="30">
<lname>EPSMLIST</lname>
<file>MortgageApplication/cobol/epsmlist.cbl</file>
<language>COB</language>
<logicalDependencies>
<logicalDependency id="31">
<lname>COPY1</lname><category>COPY</category><library>SYSLIB</library>
</logicalDependency>
<logicalDependency id="32">
<lname>COPY2</lname><category>COPY</category><library>SYSLIB</library>
</logicalDependency>
</logicalDependencies>
</logicalFile>
<logicalFile id="33">
<lname>EPSNBRVL</lname>
<file>MortgageApplication/cobol/epsnbrvl.cbl</file>
<language>COB</language>
<logicalDependencies>
<logicalDependency id="31">
<lname>COPY1</lname><category>COPY</category><library>SYSLIB</library>
</logicalDependency>
<logicalDependency id="32">
<lname>COPY2</lname><category>COPY</category><library>SYSLIB</library>
</logicalDependency>
</logicalDependencies>
</logicalFile>
</logicalFiles>
</collection>
text/plain Not Supported

HTTP Method: GET Logical File (with ID or name)

A GET request with an ID or Collection name and followed by logicalFile as part of the URL is used to read the logical file metadata of an individual collection object. The request Accept header will determine the format (XML or JSON) of the output in the response body.

Additionally, one or more query parameters may be used to further limit the content that is returned.
    lname: returns logical file metadata where lname equals the supplied value.
    file: returns logical file metadata where file equals the supplied value.
    language: returns logical file metadata where language equals the supplied value.
    cics: limits result to logical files whose source contains EXEC CICS statements (cics, cics=y, cics=yes, cics=true equate to true. All other values equate to false.)
    sql: limits result to logical files whose source contains EXEC SQL statements (sql, sql=y, sql=yes, sql=true equate to true. All other values equate to false.)
    dli: limits result to logical files whose source contains DLI statements (dli, dli=y, dli=yes, dli=true equate to true. All other values equate to false.)

Example request URL:
    https://localhost:9443/dbb/rest/collection/{id_or_name}/logicalFile
        id: is the unique id number assigned when the collection is created.
        name: is the unique name supplied during collection creation.
    https://localhost:9443/dbb/rest/collection/{id_or_name}/logicalFile?lname=EPSMLIST&file=MortgageApplication/cobol/epsmlist.cbl&language=COB
     https://localhost:9443/dbb/rest/collection/{id_or_name}/logicalFile?cics
        returns all logicalFiles that contain EXEC CICS commands
    https://localhost:9443/dbb/rest/collection/{id_or_name}/logicalFile?cics=true
        returns all logicalFiles that contain EXEC CICS commands
    https://localhost:9443/dbb/rest/collection/{id_or_name}/logicalFile?cics=false
        returns all logicalFiles that do not contain EXEC CICS commands

A successful GET will return a 200 response code.

Accept Example of Response Body
application/json
[ {
"id" : "30",
"lname" : "EPSMLIST",
"file" : "MortgageApplication/cobol/epsmlist.cbl",
"language" : "COB",
"cics" : "true",
"sql" : "false",
"dli" : "false",
"logicalDependencies" : [
{"id" : "31", "lname" : "COPY1", "category" : "COPY", "library" : "SYSLIB"},
{"id" : "32", "lname" : "COPY2", "category" : "COPY", "library" : "SYSLIB"} ]
}, {
"id" : "33",
"lname" : "EPSNBRVL",
"file" : "MortgageApplication/cobol/epsnbrvl.cbl",
"language" : "COB",
"cics" : "false",
"sql" : "false",
"dli" : "false",
"logicalDependencies" : [
{"id" : "31", "lname" : "COPY1", "category" : "COPY", "library" : "SYSLIB"},
{"id" : "32", "lname" : "COPY2", "category" : "COPY", "library" : "SYSLIB"} ]
} ]
application/xml
<logicalFiles>
<logicalFile id="30">
<lname>EPSMLIST</lname>
<file>MortgageApplication/cobol/epsmlist.cbl</file>
<language>COB</language>
<cics>true</cics>
<sql>false</sql>
<dli>false</dli>
<logicalDependencies>
<logicalDependency id="31">
<lname>COPY1</lname><category>COPY</category><library>SYSLIB</library>
</logicalDependency>
<logicalDependency id="32">
<lname>COPY2</lname><category>COPY</category><library>SYSLIB</library>
</logicalDependency>
</logicalDependencies>
</logicalFile>
<logicalFile id="33">
<lname>EPSNBRVL</lname>
<file>MortgageApplication/cobol/epsnbrvl.cbl</file>
<language>COB</language>
<cics>false</cics>
<sql>false</sql>
<dli>false</dli>
<logicalDependencies>
<logicalDependency id="31">
<lname>COPY1</lname><category>COPY</category><library>SYSLIB</library>
</logicalDependency>
<logicalDependency id="32">
<lname>COPY2</lname><category>COPY</category><library>SYSLIB</library>
</logicalDependency>
</logicalDependencies>
</logicalFile>
</logicalFiles>
text/plain Not Supported

HTTP Method: DELETE

A DELETE request is used to delete a collection object. A request body is not expected and will be ignored and no response body is returned. Therefore, no Content-Type or Accept headers are necessary. The URL returned from the POST is used to perform the DELETE. The number on the URL corresponds with the id attribute in the XML returned by a GET or the id field in the JSON returned by a GET.
    Example request URL: https://localhost:9443/dbb/rest/collection/{id_or_name}
        id: is the unique id number assigned when the collection is created.
        name: is the unique name supplied during collection creation.

A successful DELETE will return a 200 response code.

HTTP Method: DELETE Logical Files (with ID or name)

A DELETE request with an ID or Collection name and followed by logicalFile as part of the URL is used to delete the logical file(s) of an individual collection object.

Additionally, one or more query parameters may be used to further limit the scope of the delete.
    lname: deletes logical file metadata where lname equals the supplied value.
    file: deletes logical file metadata where file equals the supplied value.
    language: deletes logical file metadata where language equals the supplied value.
    cics: deletes logical file metadata where the source contains EXEC CICS statements (cics, cics=y, cics=yes, cics=true equate to true. All other values equate to false.)
    sql: deletes logical file metadata where the source contains EXEC SQL statements (sql, sql=y, sql=yes, sql=true equate to true. All other values equate to false.)
    dli: deletes logical file metadata where the source contains DLI statements (dli, dli=y, dli=yes, dli=true equate to true. All other values equate to false.)

Example request URL:
    https://localhost:9443/dbb/rest/collection/{id_or_name}/logicalFile
        id: is the unique id number assigned when the collection is created.
        name: is the unique name supplied during collection creation.
    https://localhost:9443/dbb/rest/collection/{id_or_name}/logicalFile?lname=EPSMLIST&file=MortgageApplication/cobol/epsmlist.cbl&language=COB
     https://localhost:9443/dbb/rest/collection/{id_or_name}/logicalFile?cics
        deletes all logicalFiles in collection that contain EXEC CICS commands
    https://localhost:9443/dbb/rest/collection/{id_or_name}/logicalFile?cics=true
        deletes all logicalFiles in collection that contain EXEC CICS commands
    https://localhost:9443/dbb/rest/collection/{id_or_name}/logicalFile?cics=false
        deletes all logicalFiles in collection that do not contain EXEC CICS commands

A successful DELETE will return a 200 response code.

HTTP Method: PUT (Update Collection)

A PUT is used to update a Collection. Note that only the name, owner, team, and permission can be updated. If other fields are included in the XML or JSON body, they will be ignored. Updating logical files and logical dependencies must be done via the appropriate update services.

    Example request URL: https://localhost:9443/dbb/rest/collection/{id}

        Where:

            id: is the unique id number assigned when the collection is created.

A successful PUT will return a 200 response code.

Content-type Header Example of request body
application/json
{
"name" : "CollectionName",
"owner" : "ADMIN",
"team" : "dbbgroup",
"permission" : 664
}
application/xml
<collection>
<name>CollectionName</name>
<owner>ADMIN</owner>
<team>dbbgroup</team>
<permission>664</permission>
</collection>
text/plain The service will accept a content-type of text/plain with the expectation that the request body is either XML or JSON.

---

Logical File Service

The logical file is the metadata representation of a file in the source code management system.

Logical File Fields

id: A unique ID assigned by the system to identify individual build request objects.
lname: Logical name of the file represented by this metadata.
file: Relative path and file name associated with this file.
language: Optional field used to denote the programming language for the file.
cics: Source contains EXEC CICS statements. The default value is false.
sql: Source contains EXEC SQL statements. The default value is false.
dli: Source contains DLI statements. The default value is false.
logicalDependency: See Logical Dependency. NOTE: JSON format will use the field name logicalDependencies.

HTTP Method: POST or PUT

A POST or PUT adds new logicalFile(s) to the collection. A logicalFile that already exists for this collection with same dependencies are not modified. An existing logicalFile with different dependencies are unlinked from the collection and a new logicalFile is created. This is equivalent to using the Collection POST or PUT (Add logical files) Service. Use the Logical File DELETE API to remove a logical file from a collection.
    Example request URL: https://localhost:9443/dbb/rest/logicalFile?collection={id_or_name}
        collection: A required query parameter specifying the id or name of an existing collection

A successful POST will return a 200 response code.

Content-type Example of request body
application/json
[ {
"lname" : "EPSMLIST",
"file" : "MortgageApplication/cobol/epsmlist.cbl",
"cics" : "true",
"language" : "COB",
"logicalDependencies" : [
{"lname" : "COPY1", "category" : "COPY", "library" : "SYSLIB"},
{"lname" : "COPY2", "category" : "COPY", "library" : "SYSLIB"} ]
}, {
"lname" : "EPSNBRVL",
"file" : "MortgageApplication/cobol/epsnbrvl.cbl",
"language" : "COB",
"logicalDependencies" : [
{"lname" : "COPY1", "category" : "COPY", "library" : "SYSLIB"},
{"lname" : "COPY2", "category" : "COPY", "library" : "SYSLIB"} ]
} ]
application/xml
<logicalFiles>
<logicalFile>
<lname>EPSMLIST</lname>
<file>MortgageApplication/cobol/epsmlist.cbl</file>
<language>COB</language>
<cics>true</cics>
<logicalDependencies>
<logicalDependency>
<lname>COPY1</lname><category>COPY</category><library>SYSLIB</library>
</logicalDependency>
<logicalDependency>
<lname>COPY2</lname><category>COPY</category><library>SYSLIB</library>
</logicalDependency>
</logicalDependencies>
</logicalFile>
<logicalFile>
<lname>EPSNBRVL</lname>
<file>MortgageApplication/cobol/epsnbrvl.cbl</file>
<language>COB</language>
<logicalDependencies>
<logicalDependency>
<lname>COPY1</lname><category>COPY</category><library>SYSLIB</library>
</logicalDependency>
<logicalDependency>
<lname>COPY2</lname><category>COPY</category><library>SYSLIB</library>
</logicalDependency>
</logicalDependencies>
</logicalFile>
</logicalFiles>
text/plain The service will accept a content-type of text/plain with the expectation that the request body is either XML or JSON.

HTTP Method: GET (without ID)

A GET request without a logical file id as part of the URL is used to read the contents of all logical file objects. The request Accept header will determine the format (XML or JSON) of the output in the response body.

Additionally, one or more query parameters may be used to further limit the content that is returned.
    lname: limits result to logical files where lname parameter equals logical file name field.
    file: limits result logical files where file parameter equals the logical file file field.
    language: limits result to logical files where language parameter equals the logical file language field.
    cics: limits result to logical files whose source contains EXEC CICS statements (cics, cics=y, cics=yes, cics=true equate to true. All other values equate to false.)
    sql: limits result to logical files whose source contains EXEC SQL statements (sql, sql=y, sql=yes, sql=true equate to true. All other values equate to false.)
    dli: limits result to logical files whose source contains DLI statements (dli, dli=y, dli=yes, dli=true equate to true. All other values equate to false.)
    collection: limit search to logical files in a collection
    ld.lname: limits results to logical files with a logical dependency where ld.lname equals the logical dependency logical name.
    ld.library: limits results to logical files with a logical dependency where ld.library equals the logical dependency library.
    ld.category: limits results to logical files with a logical dependency where ld.category equals the logical dependency category.

Example request URL:
    https://localhost:9443/dbb/rest/logicalFile
        returns all logicalFiles
     https://localhost:9443/dbb/rest/logicalFile?lname=EPSMLIST
        returns all logicalFiles with an lname of EPSMLIST
    https://localhost:9443/dbb/rest/logicalFile?lname=EPSMLIST&collection=MortgageApp
        returns all logicalFiles with an lname of EPSMLIST and is part of the MortgageApp collection
    https://localhost:9443/dbb/rest/logicalFile?ld.lname=EPSMORTF&ld.library=SYSLIB&ld.category=COPY&collection=MortgageApp
        returns all logicalFiles in collection MortgageApp that have a dependency on copybook EPSMORTF in library SYSLIB.
    https://localhost:9443/dbb/rest/logicalFile?cics
        returns all logicalFiles whose source contains EXEC CICS statements.
    https://localhost:9443/dbb/rest/logicalFile?cics=false
        returns all logicalFiles whose source does not contain EXEC CICS statements.

A successful GET will return a 200 response code.

Accept Header Example of Response Body
application/json
[ {
"id" : "30",
"lname" : "EPSMLIST",
"file" : "MortgageApplication/cobol/epsmlist.cbl",
"language" : "COB",
"cics" : "true",
"sql" : "false",
"dli" : "false",
"logicalDependencies" : [
{"id" : "31", "lname" : "COPY1", "category" : "COPY", "library" : "SYSLIB"},
{"id" : "32", "lname" : "COPY2", "category" : "COPY", "library" : "SYSLIB"} ]
}, {
"id" : "33",
"lname" : "EPSNBRVL",
"file" : "MortgageApplication/cobol/epsnbrvl.cbl",
"language" : "COB",
"cics" : "false",
"sql" : "false",
"dli" : "false",
"logicalDependencies" : [
{"id" : "31", "lname" : "COPY1", "category" : "COPY", "library" : "SYSLIB"},
{"id" : "32", "lname" : "COPY2", "category" : "COPY", "library" : "SYSLIB"} ]
} ]
application/xml
<logicalFiles>
<logicalFile id="30">
<lname>EPSMLIST</lname>
<file>MortgageApplication/cobol/epsmlist.cbl</file>
<language>COB</language>
<cics>true</cics>
<sql>false</sql>
<dli>false</dli>
<logicalDependencies>
<logicalDependency id="31">
<lname>COPY1</lname><category>COPY</category><library>SYSLIB</library>
</logicalDependency>
<logicalDependency id="32">
<lname>COPY2</lname><category>COPY</category><library>SYSLIB</library>
</logicalDependency>
</logicalDependencies>
</logicalFile>
<logicalFile id="33">
<lname>EPSNBRVL</lname>
<file>MortgageApplication/cobol/epsnbrvl.cbl</file>
<language>COB</language>
<cics>false</cics>
<sql>false</sql>
<dli>false</dli>
<logicalDependencies>
<logicalDependency id="31">
<lname>COPY1</lname><category>COPY</category><library>SYSLIB</library>
</logicalDependency>
<logicalDependency id="32">
<lname>COPY2</lname><category>COPY</category><library>SYSLIB</library>
</logicalDependency>
</logicalDependencies>
</logicalFile>
</logicalFiles>
text/plain Not Supported

HTTP Method: GET (with ID)

A GET request with an ID as part of the URL is used to read the contents of an individual logical file object. The request Accept header will determine the format (XML or JSON) of the output in the response body. The number on the URL corresponds with the id attribute in the XML returned by a GET or the id field in the JSON returned by a GET.
    Example request URL: https://localhost:9443/dbb/rest/logicalFile/30

A successful GET will return a 200 response code.

Accept Heaader Example of Response Body
application/json
{
"id" : "30",
"lname" : "EPSMLIST",
"file" : "MortgageApplication/cobol/epsmlist.cbl",
"language" : "COB",
"cics" : "true",
"logicalDependencies" : [
{"id" : "31", "lname" : "COPY1", "category" : "COPY", "library" : "SYSLIB"},
{"id" : "32", "lname" : "COPY2", "category" : "COPY", "library" : "SYSLIB"} ]
}
application/xml
<logicalFile id="30">
<lname>EPSMLIST</lname>
<file>MortgageApplication/cobol/epsmlist.cbl</file>
<language>COB</language>
<cics>true</cics>
<logicalDependencies>
<logicalDependency id="31">
<lname>COPY1</lname><category>COPY</category><library>SYSLIB</library>
</logicalDependency>
<logicalDependency id="32">
<lname>COPY2</lname><category>COPY</category><library>SYSLIB</library>
</logicalDependency>
</logicalDependencies>
</logicalFile>
text/plain Not Supported

HTTP Method: GET Logical Dependency (with ID)

A GET request with an ID as part of the URL and followed by LogicalDependency is used to read the list of logical dependencies of an individual logical file object. The request Accept header will determine the format (XML or JSON) of the output in the response body.
    Example request URL: https://localhost:9443/dbb/rest/logicalFile/{id}/logicalDependency

Optional query parameters may also be used to limit the amount of data that is returned
    ld.lname: limits results to logical files with a logical dependency where ld.lname equals the logical dependency logical name.
    ld.library: limits results to logical files with a logical dependency where ld.library equals the logical dependency library.
    ld.category: limits results to logical files with a logical dependency where ld.category equals the logical dependency category.

A successful GET will return a 200 response code.

Accept header Example of Response Body
application/json
[
{"id" : "31", "lname" : "COPY1", "category" : "COPY", "library" : "SYSLIB"},
{"id" : "32", "lname" : "COPY2", "category" : "COPY", "library" : "SYSLIB"}
]
application/xml
<logicalDependencies>
<logicalDependency id="31">
<lname>COPY1</lname><category>COPY</category><library>SYSLIB</library>
</logicalDependency>
<logicalDependency id="32">
<lname>COPY2</lname><category>COPY</category><library>SYSLIB</library>
</logicalDependency>
</logicalDependencies>
text/plain Not Supported

HTTP Method: DELETE

A DELETE request is used to delete a logical file from a collection. A request body is not expected and will be ignored and no response body is returned. Therefore, no Content-Type or Accept headers are necessary.

Example request URL:
    https://localhost:9443/dbb/rest/logicalFile/{id}?collection={id_or_name}
        Deletes a specific logical file from a collection.
    https://localhost:9443/dbb/rest/logicalFile?collection={id_or_name}&lname=<lname>&file=<file>&language=<language>
        Delete logical file(s) meeting query criteria from a collection:
    Where:
        id: (required for this form of URL)id number assigned to a specific logical file object

Required query parameters:
    collection: (required)remove the logical file from a collection identified by the collection id number or collection name.

Optional Query parameters:
    lname: logical name of the logical file to be removed from a collection
    file: file name of the logical file to be removed from a collection
    language: language of the logical file to be removed from a collection
    cics: deletes logical file metadata where the source contains EXEC CICS statements (cics, cics=y, cics=yes, cics=true equate to true. All other values equate to false.)
    sql: deletes logical file metadata where the source contains EXEC SQL statements (sql, sql=y, sql=yes, sql=true equate to true. All other values equate to false.)
    dli: deletes logical file metadata where the source contains DLI statements (dli, dli=y, dli=yes, dli=true equate to true. All other values equate to false.)

A successful DELETE will return a 200 response code.

---

Logical Dependency Service

The logical dependency service enables a user to list logical dependencies based on the query criteria. The service does not allow direct updates to a logical dependency. Therefore there are no PUT/POST/DELETE services. Updates to logical dependencies are done in the context of Collections and Logical Files

Logical Dependency Fields

id: A numeric id assigned during a POST or PUT of a Collection or Logical Files.
lname: The dependency logical name.
category: The type of the logical dependency.
library: The library to which this logical dependency belongs.

HTTP Method: GET (without ID)

A GET request without an ID as part of the URL will return all logical dependencies that meet the query criteria. A full list of logical dependencies (no query parameters) is not recommended due to a potential for a large list. The request Accept header will determine the format (XML or JSON) of the output in the response body.
    Example request URLs:
        https://localhost:9443/dbb/rest/logicalDependency
         https://localhost:9443/dbb/rest/logicalDependency?lname=<lname>&library=<library>&category=<category>

Optional query parameters can be used to limit the amount of data that is returned
    lname: limits results to logical dependencies where lname equals the logical dependency logical name.
    library: limits results to logical dependencies where library equals the logical dependency library.
    category: limits results to logical dependencies where category equals the logical dependency category.

A successful GET will return a 200 response code.

Accept Header Example of Response Body
application/json
[
{"id" : "31", "lname" : "COPY1", "category" : "COPY", "library" : "SYSLIB"},
{"id" : "32", "lname" : "COPY2", "category" : "COPY", "library" : "SYSLIB"}
]
application/xml
<logicalDependencies>
<logicalDependency id="31">
<lname>COPY1</lname><category>COPY</category><library>SYSLIB</library>
</logicalDependency>
<logicalDependency id="32">
<lname>COPY2</lname><category>COPY</category><library>SYSLIB</library>
</logicalDependency>
</logicalDependencies>
text/plain Not Supported

HTTP Method: GET (with ID)

A GET request with an id is used to read a single logical dependency that corresponds with the id in the URL. The request Accept header will determine the format (XML or JSON) of the output in the response body.
    Example request URL: https://localhost:9443/dbb/rest/logicalDependency/31

A successful GET will return a 200 response code.

Accept Header Example of Response Body
application/json
{"id" : "31", "lname" : "COPY1", "category" : "COPY", "library" : "SYSLIB"}
application/xml
<logicalDependency id="31">
<lname>COPY1</lname><category>COPY</category><library>SYSLIB</library>
</logicalDependency>
text/plain Not Supported

HTTP Method: GET Logical File (with query)

A GET request returns all logical files that have a dependency or dependencies that meet the query criteria. The request Accept header will determine the format (XML or JSON) of the output in the response body.

Example request URLs:
    https://localhost:9443/dbb/rest/logicalDependency/logicalFile?lname=<lname>&library=<library>&category=<category>&collection={id_or_name}
        Return logical files in a collection that have a dependency that matches the supplied criteria

Query parameters can be used to limit the amount of data that is returned
    collection: id or name of a collection. This limits the results to logical files that belong to this collection.
    lname: Identifies a logical dependency where lname equals the dependency lname.
    category: Identifies a logical dependency where category equals the dependency category.
    library: Identifies a logical dependency where library equals the dependency library.

A successful GET will return a 200 response code.

Accept Header Example of Response Body
application/json
[ {
"id" : "30",
"lname" : "EPSMLIST",
"file" : "MortgageApplication/cobol/epsmlist.cbl",
"language" : "COB",
"logicalDependencies" : [
{"id" : "31", "lname" : "COPY1", "category" : "COPY", "library" : "SYSLIB"},
{"id" : "32", "lname" : "COPY2", "category" : "COPY", "library" : "SYSLIB"} ]
}, {
"id" : "33",
"lname" : "EPSNBRVL",
"file" : "MortgageApplication/cobol/epsnbrvl.cbl",
"language" : "COB",
"logicalDependencies" : [
{"id" : "31", "lname" : "COPY1", "category" : "COPY", "library" : "SYSLIB"},
{"id" : "32", "lname" : "COPY2", "category" : "COPY", "library" : "SYSLIB"} ]
} ]
application/xml
<logicalFiles>
<logicalFile id="30">
<lname>EPSMLIST</lname>
<file>MortgageApplication/cobol/epsmlist.cbl</file>
<language>COB</language>
<logicalDependencies>
<logicalDependency id="31">
<lname>COPY1</lname><category>COPY</category><library>SYSLIB</library>
</logicalDependency>
<logicalDependency id="32">
<lname>COPY2</lname><category>COPY</category><library>SYSLIB</library>
</logicalDependency>
</logicalDependencies>
</logicalFile>
<logicalFile id="33">
<lname>EPSNBRVL</lname>
<file>MortgageApplication/cobol/epsnbrvl.cbl</file>
<language>COB</language>
<logicalDependencies>
<logicalDependency id="31">
<lname>COPY1</lname><category>COPY</category><library>SYSLIB</library>
</logicalDependency>
<logicalDependency id="32">
<lname>COPY2</lname><category>COPY</category><library>SYSLIB</library>
</logicalDependency>
</logicalDependencies>
</logicalFile>
</logicalFiles>
text/plain Not Supported

HTTP Method: GET Logical File (with ID)

A GET request returns all logical files that have a dependency identified by the ID in the URL. The request Accept header will determine the format (XML or JSON) of the output in the response body.
    Example request URLs:
         https://localhost:9443/dbb/rest/logicalDependency/{id}/logicalFile?collection={id_or_name}
            Return logical files with a dependency identified by id

Optional query parameters can be used to limit the amount of data that is returned
    collection: id or name of a collection. This limits the results to logical files that belong to this collection.

A successful GET will return a 200 response code.

Accept Header Example of Response Body
application/json
[ {
"id" : "30",
"lname" : "EPSMLIST",
"file" : "MortgageApplication/cobol/epsmlist.cbl",
"language" : "COB",
"logicalDependencies" : [
{"id" : "31", "lname" : "COPY1", "category" : "COPY", "library" : "SYSLIB"},
{"id" : "32", "lname" : "COPY2", "category" : "COPY", "library" : "SYSLIB"} ]
},{
"id" : "33",
"lname" : "EPSNBRVL",
"file" : "MortgageApplication/cobol/epsnbrvl.cbl",
"language" : "COB",
"logicalDependencies" : [
{"id" : "31", "lname" : "COPY1", "category" : "COPY", "library" : "SYSLIB"},
{"id" : "32", "lname" : "COPY2", "category" : "COPY", "library" : "SYSLIB"} ]
} ]
application/xml
<logicalFiles>
<logicalFile id="30">
<lname>EPSMLIST</lname>
<file>MortgageApplication/cobol/epsmlist.cbl</file>
<language>COB</language>
<logicalDependencies>
<logicalDependency id="31">
<lname>COPY1</lname><category>COPY</category><library>SYSLIB</library>
</logicalDependency>
<logicalDependency id="32">
<lname>COPY2</lname><category>COPY</category><library>SYSLIB</library>
</logicalDependency>
</logicalDependencies>
</logicalFile>
<logicalFile id="33">
<lname>EPSNBRVL</lname>
<file>MortgageApplication/cobol/epsnbrvl.cbl</file>
<language>COB</language>
<logicalDependencies>
<logicalDependency id="31">
<lname>COPY1</lname><category>COPY</category><library>SYSLIB</library>
</logicalDependency>
<logicalDependency id="32">
<lname>COPY2</lname><category>COPY</category><library>SYSLIB</library>
</logicalDependency>
</logicalDependencies>
</logicalFile>
</logicalFiles>
text/plain Not Supported

---

Build Result Service

A Build Result represents an instance of a build and the resulting artifacts associated with that build (build report, logs, properties, etc).

Build Result Fields

id: A unique ID assigned by the system to identify individual build result objects.
group: A name used for identifying a group of build results.
label: A name used to identify an instance of a build result. NOTE: A group and label pair must be unique.
state: An integer representing the state of the build, 0-NEW, 1-PROCESSING, 2-COMPLETE, 3-ABANDONED, or other values defined by the user.
status: An integer representing the status of the build, 0-CLEAN, 1-ERROR, 2-WARNING, or other values defined by the user.
buildReport: An HTML page used to render the build report data into a consumable format.
buildReportData: Raw build report data containing information about the files built during a build.
attachment: Zero or more files (compile listings, logs, and other files, etc) attached to this build result. NOTE: JSON format will use the field name "attachments".
property: zero or more name/value pairs associated with this build result. NOTE: JSON format will use the field name "properties".
created: timestamp of when the build result was created.
createdBy: Userid used when the build result was created.
lastUpdated: timestamp of when the build result was last updated.
lastUpdatedBy: >Userid used when the build result was last updated. owner: The owner of this object. The default value is the creator of the object. team: The team with access authority to the object. The default value is null. permission: The type of authority that an owner, team, or individual has to the object. The permission is represented by a three-digit octal number. See Permission Details for more information.

HTTP Method: POST (Create Build Result)

A POST is used to create a Build Result. Use the Content-Type header to indicate the format of the request body. Note that only group, label, state, status, and properties can be set. All other fields will be ignored. Separate POST requests must be made to add build report/data and each attachment.
    Example request URL: https://localhost:9443/dbb/rest/buildResult

A successful POST will return a 201 response code. The response "Location" header will contain the URL of the item created.
    Example response URL: https://localhost:9443/dbb/rest/buildResult/1351

Content-type Header Example of request body
application/json
{
"group" : "DansMA",
"label" : "DansMA001",
"state" : 1,
"status" : 0,
"properties" : [ {
"name" : "property2",
"value" : "value2"
}, {
"name" : "property1",
"value" : "value1"
} ]
}
application/xml
<buildResult>
<group>DansMA</group>
<label>DansMA001</label>
<state>1</state>
<status>0</status>
<properties>
<property>
<name>property2</name>
<value>value2</value>
</property>
<property>
<name>property1</name>
<value>value1</value>
</property>
</properties>
</buildResult>
text/plain The service will accept a content-type of text/plain with the expectation that the request body is either XML or JSON.

HTTP Method: POST (Create Build Report)

A POST is used to create a Build Report associated with a build result. A build report is an HTML page that can render the build report data into a consumable format. Use the Content-Type header to indicate the format of the request body. The request body is the content of the build report.
    Example request URL: https://localhost:9443/dbb/rest/buildResult/{id}/buildReport
        Where:
            id: is the unique id number assigned when the build result is created.

A successful POST will return a 201 response code. The response "Location" header will contain the URL of the created artifact.
    Example response URL: https://localhost:9443/dbb/rest/buildResult/{id}/buildReport

A response code 409(Conflict) is returned if the build result already has a build report. Use DELETE to remove or PUT to update an existing build report.

Content-type Header Example of request body
text/html is expected The request body must agree with the content type. Generally, the build report is expected to be an HTML page.

HTTP Method: POST (Create Build Report Data)

A POST is used to create Build Report data associated with a build result. The build report data is used by the build report to display information about the files processsed by this build. Use the Content-Type header to indicate the format of the request body. The request body is the content of the build report data.
    Example request URL: https://localhost:9443/dbb/rest/buildResult/{id}/buildReportData
        Where:
            id: is the unique id number assigned when the build result is created.

A successful POST will return a 201 response code. The response "Location" header will contain the URL of the created artifact.
        Example response URL: https://localhost:9443/dbb/rest/buildResult/{id}/buildReportData

A response code 409(Conflict) is returned if the build result already has build report data. Use DELETE to remove or PUT to update existing build report data.

Content-type Example of request body
application/json is expected The request body must agree with the content type. Generally, the build report data is expected to be JSON data.

HTTP Method: POST (Create Build Result Attachment)

A POST is used to create an attachment (compile listing, log, etc) to the build result. Use the Content-Type header to indicate the format of the request body. The request body is the content of the attachment.
    Example request URL: https://localhost:9443/dbb/rest/buildResult/{id}/attachment/{name}
        Where:
            id: is the unique id number assigned when the build result is created.
            name: is the name for the new attachment. Duplicate names may exist in a build result but caution should be used.

A successful POST will return a 201 response code. The response "Location" header will contain the URL of the created artifact.
    Example response URL: https://localhost:9443/dbb/rest/buildResult/{id}/attachment/2051
        Where 2051 is the attachment's id number assigned by the system.

Content-type Header Example of request body
any content-type The request body must agree with the content type.

HTTP Method: POST (Create Build Result Property)

Adds one or more unique name/value pairs to the build result. Duplicate names are allowed but duplicate name/value pairs are ignored.
    Example request URL: https://localhost:9443/dbb/rest/buildResult/{id}/property
        Where:
            id: is the unique id number assigned when the build result is created.

A successful POST will return a 200 response code.

Content-type Header Example of request body
application/json
{
"property" : "value"
}
-- or --
[
{"property1" : "value1"},
{"property2" : "value2"},
{"property3" : "value3"}
]
application/xml
<property>
 <name>property</name>
<value>value</value>
</property>
-- or --
<properties>
<property><name>property1</name><value>value1</value></property>
<property><name>property2</name><value>value2</value></property>
<property><name>property3</name><value>value3</value></property>
</properties>
text/plain The service will accept a content-type of text/plain with the expectation that the request body is either XML or JSON.

HTTP Method: GET (without ID)

A GET request without a Build Result id as part of the URL is used to get a list of all build result objects. The request Accept header will determine the format (XML or JSON) of the output in the response body.
    Example request URLs:
        https://localhost:9443/dbb/rest/buildResult
        https://localhost:9443/dbb/rest/buildResult?group=<group>&label=<lable>&property=<property name>&value=<property value>
        https://localhost:9443/dbb/rest/buildResult?group=<group>&state=<state>&status=<status>
         https://localhost:9443/dbb/rest/buildResult?group=<group>&orderBy=lastUpdated&order=desc

Query parameters can be used to limit the amount of data that is returned
    group: limits list to build results with the same group.
    label: limits list to build results with the same label.
    property: limits list to build results with an associated property name.
    value: limits list to build results with an associated property value.
    state: limits list to build results with a state equal to supplied value. NEW, PROCESSING, COMPLETE, and ABANDONED are also acceptable values.
    status: limits list to build results with a status equal to supplied value. CLEAN, ERROR, and WARNING are also acceptable values.
    orderBy: Returns the list sorted on the specified field (id, group, label, created, createdBy, lastUpdated, lastUpdatedBy). Other values are ignored.
    order: Sorting order is ascending(ASC) or descending(DESC). Order defaults to ASC.

A successful GET will return a 200 response code.

Accept Header Example of Response Body
application/json
[ {
"id" : 1,
"group" : "DansMA",
"label" : "DansMA001",
"state" : 2,
"status" : 0,
"buildReport" : {
"id" : 3,
"name" : "BuildReport.html",
"contentType" : "text/html",
"size" : 27456,
"created" : "2017-11-06T17:14:23.471-05:00",
"createdBy" : "ADMIN",
"lastUpdated" : "2017-11-06T17:14:23.471-05:00",
"lastUpdatedBy" : "ADMIN"
},
"buildReportData" : {
"id" : 5,
"name" : "BuildReport.json",
"contentType" : "application/json",
"size" : 2468,
"created" : "2017-11-06T17:16:44.716-05:00",
"createdBy" : "ADMIN",
"lastUpdated" : "2017-11-06T17:16:44.716-05:00",
"lastUpdatedBy" : "ADMIN"
},
"attachments" : [ {
"id" : 25,
"name" : "EPSCMORT.log",
"contentType" : "application/json",
"size" : 3645,
"created" : "2017-11-06T17:16:44.716-05:00",
"createdBy" : "ADMIN",
"lastUpdated" : "2017-11-06T17:16:44.716-05:00",
"lastUpdatedBy" : "ADMIN"
}, {
"id" : 27,
"name" : "EPSMLIST.log",
"contentType" : "application/json",
"size" : 4096,
"created" : "2017-11-06T17:17:39.451-05:00",
"createdBy" : "ADMIN",
"lastUpdated" : "2017-11-06T17:17:39.451-05:00",
"lastUpdatedBy" : "ADMIN"
} ],
"properties" : [ {
"name" : "property1",
"value" : "value1"
}, {
"name" : "property2",
"value" : "value2"
} ],
"created" : "2017-11-06T17:02:20.925-05:00",
"createdBy" : "ADMIN",
"lastUpdated" : "2017-11-09T15:46:12.344-05:00",
"lastUpdatedBy" : "ADMIN"
}, {
"id" : 19,
"group" : "ADansMA",
"label" : "ADansMA001",
"state" : 2,
"status" : 0,
"created" : "2017-11-07T09:33:55.078-05:00",
"createdBy" : "ADMIN",
"lastUpdated" : "2017-11-07T09:33:55.078-05:00",
"lastUpdatedBy" : "ADMIN"
}, {
"id" : 20,
"group" : "ADansMA",
"label" : "DansMA002",
"state" : 2,
"status" : 0,
"created" : "2017-11-07T09:34:07.512-05:00",
"createdBy" : "ADMIN",
"lastUpdated" : "2017-11-07T09:34:07.512-05:00",
"lastUpdatedBy" : "ADMIN"
}, {
"id" : 17643,
"group" : "DansBuild",
"label" : "build.20171113.0154",
"state" : 2,
"status" : 0,
"created" : "2017-11-13T13:54:16.109-05:00",
"createdBy" : "ADMIN",
"lastUpdated" : "2017-11-13T13:54:16.109-05:00",
"lastUpdatedBy" : "ADMIN"
}, {
"id" : 17644,
"group" : "DansBuild",
"label" : "build.20171113.0201",
"state" : 2,
"status" : 0,
"created" : "2017-11-13T14:01:07.748-05:00",
"createdBy" : "ADMIN",
"lastUpdated" : "2017-11-13T14:01:07.748-05:00",
"lastUpdatedBy" : "ADMIN"
}, {
"id" : 17645,
"group" : "DansBuild",
"label" : "build.20171113.0207",
"state" : 2,
"status" : 0,
"created" : "2017-11-13T14:07:04.425-05:00",
"createdBy" : "ADMIN",
"lastUpdated" : "2017-11-13T14:07:04.425-05:00",
"lastUpdatedBy" : "ADMIN"
} ]
application/xml
<buildResults>
<buildResult id="1">
<group>DansMA</group>
<label>DansMA001</label>
<state>2</state>
<status>0</status>
<buildReport id="3">
<name>BuildReport.html</name>
<contentType>text/html; charset=utf-8</contentType>
<size>27456</size>
<created>2017-11-06T17:14:23.471-05:00</created>
<createdBy>ADMIN</createdBy>
<lastUpdated>2017-11-06T17:14:23.471-05:00</lastUpdated>
<lastUpdatedBy>ADMIN</lastUpdatedBy>
</buildReport>
<buildReportData id="5">
<name>BuildReport.json</name>
<contentType>application/json; charset=utf-8</contentType>
<size>2468</size>
<created>2017-11-06T17:16:44.716-05:00</created>
<createdBy>ADMIN</createdBy>
<lastUpdated>2017-11-06T17:16:44.716-05:00</lastUpdated>
<lastUpdatedBy>ADMIN</lastUpdatedBy>
</buildReportData>
<attachments>
<attachment id="25">
<name>EPSCMORT.log</name>
<contentType>text/plain; charset=utf-8</contentType>
<size>3645</size>
<created>2017-11-06T17:16:44.716-05:00</created>
<createdBy>ADMIN</createdBy>
<lastUpdated>2017-11-06T17:16:44.716-05:00</lastUpdated>
<lastUpdatedBy>ADMIN</lastUpdatedBy>
</attachment>
<attachment id="27">
<name>EPSMLIST.log</name>
<contentType>text/plain; charset=utf-8</contentType>
<size>4096</size>
<created>2017-11-06T17:17:39.451-05:00</created>
<createdBy>ADMIN</createdBy>
<lastUpdated>2017-11-06T17:17:39.451-05:00</lastUpdated>
<lastUpdatedBy>ADMIN</lastUpdatedBy>
</attachment>
</attachments>
<created>2017-11-06T17:02:20.925-05:00</created>
<createdBy>ADMIN</createdBy>
<lastUpdated>2017-11-09T15:46:12.344-05:00</lastUpdated>
<lastUpdatedBy>ADMIN</lastUpdatedBy>
</buildResult>
<buildResult id="19">
<group>ADansMA</group>
<label>ADansMA001</label>
<state>2</state>
<status>0</status>
<created>2017-11-07T09:33:55.078-05:00</created>
<createdBy>ADMIN</createdBy>
<lastUpdated>2017-11-07T09:33:55.078-05:00</lastUpdated>
<lastUpdatedBy>ADMIN</lastUpdatedBy>
</buildResult>
<buildResult id="20">
<group>ADansMA</group>
<label>DansMA002</label>
<state>2</state>
<status>0</status>
<created>2017-11-07T09:34:07.512-05:00</created>
<createdBy>ADMIN</createdBy>
<lastUpdated>2017-11-07T09:34:07.512-05:00</lastUpdated>
<lastUpdatedBy>ADMIN</lastUpdatedBy>
</buildResult>
<buildResult id="17643">
<group>DansBuild</group>
<label>build.20171113.0154</label>
<state>2</state>
<status>0</status>
<created>2017-11-13T13:54:16.109-05:00</created>
<createdBy>ADMIN</createdBy>
<lastUpdated>2017-11-13T13:54:16.109-05:00</lastUpdated>
<lastUpdatedBy>ADMIN</lastUpdatedBy>
</buildResult>
<buildResult id="17644">
<group>DansBuild</group>
<label>build.20171113.0201</label>
<state>2</state>
<status>0</status>
<created>2017-11-13T14:01:07.748-05:00</created>
<createdBy>ADMIN</createdBy>
<lastUpdated>2017-11-13T14:01:07.748-05:00</lastUpdated>
<lastUpdatedBy>ADMIN</lastUpdatedBy>
</buildResult>
<buildResult id="17645">
<group>DansBuild</group>
<label>build.20171113.0207</label>
<state>2</state>
<status>0</status>
<created>2017-11-13T14:07:04.425-05:00</created>
<createdBy>ADMIN</createdBy>
<lastUpdated>2017-11-13T14:07:04.425-05:00</lastUpdated>
<lastUpdatedBy>ADMIN</lastUpdatedBy>
</buildResult>
</buildResults>
text/plain Not Supported

HTTP Method: GET (with ID)

A GET request with an ID as part of the URL is used to read the contents of an individual build result object. The request Accept header will determine the format (XML or JSON) of the output in the response body. The URL returned from the POST is used to perform the GET. The number on the URL corresponds with the id attribute in the XML returned by a GET or the id field in the JSON returned by a GET.
    Example request URL: https://localhost:9443/dbb/rest/buildResult/{id}
        id: is the unique id number assigned when the build result is created.

A successful GET will return a 200 response code.

Accept Header Example of Response Body
application/json
{
"id" : 1,
"group" : "DansMA",
"label" : "DansMA001",
"state" : 2,
"status" : 0,
"buildReport" : {
"id" : 3,
"name" : "BuildReport.html",
"contentType" : "text/html",
"size" : 27456,
"created" : "2017-11-06T17:14:23.471-05:00",
"createdBy" : "ADMIN",
"lastUpdated" : "2017-11-06T17:14:23.471-05:00",
"lastUpdatedBy" : "ADMIN"
},
"buildReportData" : {
"id" : 5,
"name" : "BuildReport.json",
"contentType" : "application/json",
"size" : 2468,
"created" : "2017-11-06T17:16:44.716-05:00",
"createdBy" : "ADMIN",
"lastUpdated" : "2017-11-06T17:16:44.716-05:00",
"lastUpdatedBy" : "ADMIN"
},
"attachments" : [ {
"id" : 25,
"name" : "EPSCMORT.log",
"contentType" : "text/plain; charset=utf-8",
"size" : 3645,
"created" : "2017-11-06T17:16:44.716-05:00",
"createdBy" : "ADMIN",
"lastUpdated" : "2017-11-06T17:16:44.716-05:00",
"lastUpdatedBy" : "ADMIN"
}, {
"id" : 27,
"name" : "EPSMLIST.log",
"contentType" : "text/plain; charset=utf-8",
"size" : 4096,
"created" : "2017-11-06T17:17:39.451-05:00",
"createdBy" : "ADMIN",
"lastUpdated" : "2017-11-06T17:17:39.451-05:00",
"lastUpdatedBy" : "ADMIN"
} ],
"properties" : [ {
"name" : "property1",
"value" : "value1"
}, {
"name" : "property2",
"value" : "value2"
} ],
"created" : "2017-11-06T17:02:20.925-05:00",
"createdBy" : "ADMIN",
"lastUpdated" : "2017-11-14T08:55:06.953-05:00",
"lastUpdatedBy" : "ADMIN"
}
application/xml
<buildResult id="1">
<group>DansMA</group>
<label>DansMA001</label>
<state>2</state>
<status>0</status>
<buildReport id="3">
<name>BuildReport.html</name>
<contentType>text/html</contentType>
<size>27456</size>
<created>2017-11-06T17:14:23.471-05:00</created>
<createdBy>ADMIN</createdBy>
<lastUpdated>2017-11-06T17:14:23.471-05:00</lastUpdated>
<lastUpdatedBy>ADMIN</lastUpdatedBy>
</buildReport>
<buildReportData id="5">
<name>BuildReport.json</name>
<contentType>application/json</contentType>
<size>2468</size>
<created>2017-11-06T17:16:44.716-05:00</created>
<createdBy>ADMIN</createdBy>
<lastUpdated>2017-11-06T17:16:44.716-05:00</lastUpdated>
<lastUpdatedBy>ADMIN</lastUpdatedBy>
</buildReportData>
<attachments>
<attachment id="25">
<name>EPSCMORT.log</name>
<contentType>text/plain; charset=utf-8</contentType>
<size>3645</size>
<created>2017-11-06T17:16:44.716-05:00</created>
<createdBy>ADMIN</createdBy>
<lastUpdated>2017-11-06T17:16:44.716-05:00</lastUpdated>
<lastUpdatedBy>ADMIN</lastUpdatedBy>
</attachment>
<attachment id="27">
<name>EPSMLIST.log</name>
<contentType>text/plain; charset=utf-8</contentType>
<size>4096</size>
<created>2017-11-06T17:17:39.451-05:00</created>
<createdBy>ADMIN</createdBy>
<lastUpdated>2017-11-06T17:17:39.451-05:00</lastUpdated>
<lastUpdatedBy>ADMIN</lastUpdatedBy>
</attachment>
</attachments>
<properties>
<property>
<name>property1</name>
<value>value1</value>
</property>
<property>
<name>property2</name>
<value>value2</value>
</property>
</properties>
<created>2017-11-06T17:02:20.925-05:00</created>
<createdBy>ADMIN</createdBy>
<lastUpdated>2017-11-14T08:55:06.953-05:00</lastUpdated>
<lastUpdatedBy>ADMIN</lastUpdatedBy>
</buildResult>
text/plain Not Supported

HTTP Method: GET (Read Build Report)

A GET is used to read a Build Report associated with a build result. A build report is an HTML page that can render the build report data into a consumable format. The Content-Type header indicates the format of the response body. The response body is the content of the build report.
    Example request URL: https://localhost:9443/dbb/rest/buildResult/{id}/buildReport
        Where:
            id: is the unique id number assigned when the build result is created.

A successful GET will return a 200 response code.

Accept Header Example of response body
Content-type used on the POST Build Report to create the build report, typically text/html. The response body must agree with the content type. Generally, the build report is expected to be an HTML page.

HTTP Method: GET (Read Build Report Data)

A GET is used to read the Build Report data associated with a build result. The build report data is used by the build report to display information about the files processsed by this build. The Content-Type header indicates the format of the response body. The response body is the content of the build report data.
    Example request URL: https://localhost:9443/dbb/rest/buildResult/{id}/buildReportData
        Where:
            id: is the unique id number assigned when the build result is created.

A successful GET will return a 200 response code.

Content-type Header Example of response body
Content-type used on the Create Build Report Data to create the build report data, typically application/json. The response body must agree with the content type. Generally, the build report data is expected to be JSON data.

HTTP Method: GET (Read Build Result Attachment Content)

A GET is used to read a Build Result attachment content. Use List Build Result Attachments to list the attachment metadata. The individual attachment contents are read separately. The Content-Type header indicates the format of the response body. The response body is the content of the attachment.
    Example request URL: https://localhost:9443/dbb/rest/buildResult/{id}/attachment/{a_id}/content
        Where:
            id: is the unique id number assigned when the build result is created.
            a_id: is the unique id number assigned to the attachment when the attachment was added to the build result.

A successful GET will return a 200 response code.

Content-type Header Example of response body
Content-type used on the Create Build Result Attachment to create the attachment. The response body must agree with the content type.

HTTP Method: GET (List Build Result Attachments)

A GET request is used to list the metadata for build result attachments. The request Accept header will determine the format (XML or JSON) of the output in the response body. The URL returned from the build result POST is used to perform the GET. The number on the URL corresponds with the id attribute in the XML returned by a GET or the id field in the JSON returned by a GET.
    Example request URL: https://localhost:9443/dbb/rest/buildResult/{id}/attachment or https://localhost:9443/dbb/rest/buildResult/{id}/attachment?name=<name>
        id: is the unique id number assigned when the build result is created.

Optional query parameters may also be used to limit the amount of data that is returned
    name: limits results to attachments with that name.

A successful GET will return a 200 response code.

Accept Header Example of Response Body
application/json
[ {
"id" : 25,
"name" : "EPSCMORT.log",
"contentType" : "text/plain; charset=utf-8",
"size" : 3645,
"created" : "2017-11-06T17:16:44.716-05:00",
"createdBy" : "ADMIN",
"lastUpdated" : "2017-11-06T17:16:44.716-05:00",
"lastUpdatedBy" : "ADMIN"
}, {
"id" : 27,
"name" : "EPSMLIST.log",
"contentType" : "text/plain; charset=utf-8",
"size" : 4096,
"created" : "2017-11-06T17:17:39.451-05:00",
"createdBy" : "ADMIN",
"lastUpdated" : "2017-11-06T17:17:39.451-05:00",
"lastUpdatedBy" : "ADMIN"
} ]
application/xml
<attachments>
<attachment id="25">
<name>EPSCMORT.log</name>
<contentType>text/plain; charset=utf-8</contentType>
<size>3645</size>
<created>2017-11-06T17:16:44.716-05:00</created>
<createdBy>ADMIN</createdBy>
<lastUpdated>2017-11-06T17:16:44.716-05:00</lastUpdated>
<lastUpdatedBy>ADMIN</lastUpdatedBy>
</attachment>
<attachment id="27">
<name>EPSMLIST.log</name>
<contentType>text/plain; charset=utf-8</contentType>
<size>4096</size>
<created>2017-11-06T17:17:39.451-05:00</created>
<createdBy>ADMIN</createdBy>
<lastUpdated>2017-11-06T17:17:39.451-05:00</lastUpdated>
<lastUpdatedBy>ADMIN</lastUpdatedBy>
</attachment>
</attachments>
text/plain Not Supported

HTTP Method: GET (List Build Result Properties)

A GET request is used to list the build result properties. The request Accept header will determine the format (XML or JSON) of the output in the response body. The URL returned from the build result POST is used to perform the GET. The number on the URL corresponds with the id attribute in the XML returned by a GET or the id field in the JSON returned by a GET.
    Example request URL: https://localhost:9443/dbb/rest/buildResult/{id}/property or https://localhost:9443/dbb/rest/buildResult/{id}/property?name=<name>
        id: is the unique id number assigned when the build result is created.

Optional query parameters may also be used to limit the amount of data that is returned
    name: limits results to properties with that name.

A successful GET will return a 200 response code.

Accept Header Example of Response Body
application/json
[ {
"name" : "property1",
"value" : "value1"
}, {
"name" : "property2",
"value" : "value2"
} ]
application/xml
<properties>
<property>
<name>property1</name>
<value>value1</value>
</property>
<property>
<name>property2</name>
<value>value2</value>
</property>
</properties>
text/plain Not Supported

HTTP Method: GET (List Build Result Groups)

A GET request is used to list the distinct build result group names. The request Accept header will determine the format (XML, JSON, or plain text) of the output in the response body.
    Example request URL: https://localhost:9443/dbb/rest/buildResult/groups

A successful GET will return a 200 response code.

Accept Header Example of Response Body
application/json
["ADansMA","DansBuild","DansMA"]
application/xml
<groups>
<group>ADansMA</group>
<group>DansBuild</group>
<group>DansMA</group>
</groups>
text/plain
ADansMA
DansBuild
DansMA

HTTP Method: GET (List Build Result Labels)

A GET request is used to list the distinct build result label names. The request Accept header will determine the format (XML, JSON or plain text) of the output in the response body.
    Example request URL: https://localhost:9443/dbb/rest/buildResult/labels or https://localhost:9443/dbb/rest/buildResult/labels?group=

Optional query parameters may also be used to limit the amount of data that is returned
    group: limits results to labels of build results with group name.

A successful GET will return a 200 response code.

Accept Header Example of Response Body
application/json
["ADansMA001","DansMA001","DansMA002","build.20171113.0401"]
application/xml
<labels>
<label>ADansMA001</label>
<label>DansMA001</label>
<label>DansMA002</label>
<label>build.20171113.0401</label>
</labels>
text/plain
ADansMA001
DansMA001
DansMA002
build.20171113.0401

HTTP Method: PUT (Update Build Result)

A PUT is used to update a Build Result. Note that only group, label, state, status, and properties can be updated. If other fields are included in the XML or JSON body, they will be ignored. Properties are merged with existing properties. Updating build report, report data, and attachments must be done via the appropriate update services.
    Example request URL: https://localhost:9443/dbb/rest/buildResult/{id}
        Where:
            id: is the unique id number assigned when the build result is created.

A successful PUT will return a 200 response code.

Content-type Header Example of request body
application/json
{
"group" : "DansMA",
"label" : "DansMA001",
"properties" : [ {
"name" : "property1",
"value" : "value1"
}, {
"name" : "property2",
"value" : "value2"
} ]
}
application/xml
<buildResult>
<group>DansMA</group>
<label>DansMA001</label>
<properties>
<property>
<name>property1</name>
<value>value1</value>
</property>
<property>
<name>property2</name>
<value>value2</value>
</property>
</properties>
</buildResult>
text/plain Not Supported

HTTP Method: PUT (Update Build Report)

A PUT is used to update a Build Report associated with a build result. A build report is an HTML page that can render the build report data into a consumable format. Use the Content-Type header to indicate the format of the request body. The request body is the content of the build report.
    Example request URL: https://localhost:9443/dbb/rest/buildResult/{id}/buildReport
        Where:
            id: is the unique id number assigned when the build result is created.

A successful PUT will return a 200 response code.

Content-type Header Example of request body
text/html is expected The request body must agree with the content type. Generally, the build report is expected to be an HTML page.

HTTP Method: PUT (Update Build Report Data)

A PUT is used to update Build Report data associated with a build result. The build report data is used by the build report to display information about the files processsed by this build. Use the Content-Type header to indicate the format of the request body. The request body is the content of the build report data.
    Example request URL: https://localhost:9443/dbb/rest/buildResult/{id}/buildReportData
        Where:
            id: is the unique id number assigned when the build result is created.

A successful PUT will return a 200 response code.

Content-type Header Example of request body
application/json is expected The request body must agree with the content type. Generally, the build report data is expected to be JSON data.

HTTP Method: PUT (Update Build Result Attachment)

A PUT is used to update an attachment to a build result. Only the name property can be update via this API.
    Example request URL: https://localhost:9443/dbb/rest/buildResult/{id}/attachment/{a_id}
        Where:
            id: is the unique number assigned when the build result is created.
            a_id: is the unique number assigned when the attachment was POSTed to the build result.

A successful PUT will return a 200 response code.

Content-type Header Example of request body
application/json {"name" : "new name"}
application/xml <artifact><name>new name</name></artifact>
text/plain The service will accept a content-type of text/plain with the expectation that the request body is either XML or JSON.

HTTP Method: PUT (Update Build Result Attachment Content)

A PUT is used to update the contents of an attachment (compile listing, log, etc) to the build result. Use the Content-Type header to indicate the format of the request body. The request body becomes the new content of the attachment.
    Example request URL: https://localhost:9443/dbb/rest/buildResult/{id}/attachment/{a_id}/content
        Where:
            id: is the unique number assigned when the build result is created.
            a_id: is the unique number assigned when the attachment was POSTed to the build result.

A successful PUT will return a 200 response code.

Content-type Header Example of request body
any content-type The request body must agree with the content type.

HTTP Method: PUT (Update Build Result Property)

A build result property cannot be updated. Use Delete Build result Property to remove the old property and Create Build Result Property to create the property with the new value.

HTTP Method: DELETE (Delete Build Result)

A DELETE request is used to delete a build result object. A request body is not expected and will be ignored and no response body is returned. Therefore, no Content-Type or Accept headers are necessary. The URL returned from the POST is used to perform the DELETE. The number on the URL corresponds with the id attribute in the XML returned by a GET or the id field in the JSON returned by a GET.
    Example request URL: https://localhost:9443/dbb/rest/buildResult/{id}
        Where:
            id: is the unique id number assigned when the build result is created.

A successful DELETE will return a 200 response code.

HTTP Method: DELETE (Delete Build Report)

A DELETE request is used to delete the build report associated with a build result object. A request body is not expected and will be ignored and no response body is returned. Therefore, no Content-Type or Accept headers are necessary. The URL returned from the POST is used to perform the DELETE. The number on the URL corresponds with the id attribute in the XML returned by a GET or the id field in the JSON returned by a GET.
    Example request URL: https://localhost:9443/dbb/rest/buildResult/{id}/buildReport
        Where:
            id: is the unique id number assigned when the build result is created.

A successful DELETE will return a 200 response code.

HTTP Method: DELETE (Delete Build Report Data)

A DELETE request is used to delete the build report data associated with a build result object. A request body is not expected and will be ignored and no response body is returned. Therefore, no Content-Type or Accept headers are necessary. The URL returned from the POST is used to perform the DELETE. The number on the URL corresponds with the id attribute in the XML returned by a GET or the id field in the JSON returned by a GET.
    Example request URL: https://localhost:9443/dbb/rest/buildResult/{id}/buildReportData
        Where:
            id: is the unique id number assigned when the build result is created.

A successful DELETE will return a 200 response code.

HTTP Method: DELETE (Delete Build Result Attachment)

A DELETE request is used to remove an attachment from a build result object. A request body is not expected and will be ignored and no response body is returned. Therefore, no Content-Type or Accept headers are necessary. The URL returned from the POST is used to perform the DELETE. The number on the URL corresponds with the id attribute in the XML returned by a GET or the id field in the JSON returned by a GET.
    Example request URL:
         https://localhost:9443/dbb/rest/buildResult/{id}/attachment
            will delete all attachments of this build result.
        https://localhost:9443/dbb/rest/buildResult/{id}/attachment?name=<name>
            will delete all attachments named <name> of this build result.
        https://localhost:9443/dbb/rest/buildResult/{id}/attachment/{a_id}
            will delete the attachment with id, a_id, of this build result.
        Where:
            id: is the unique id number assigned when the build result is created.
            a_id: is the unique id number assigned when the attachment is created.

Optional query parameters may also be used to limit the attachments that are removed.
    name: only attachments with this name are removed.

A successful DELETE will return a 200 response code.

HTTP Method: DELETE (Delete Build Result Property)

A DELETE request is used to remove a property from a build result object. A request body is not expected and will be ignored and no response body is returned. Therefore, no Content-Type or Accept headers are necessary. The URL returned from the POST is used to perform the DELETE. The number on the URL corresponds with the id attribute in the XML returned by a GET or the id field in the JSON returned by a GET.
    Example request URL:
         https://localhost:9443/dbb/rest/buildResult/{id}/property
        https://localhost:9443/dbb/rest/buildResult/{id}/property?name=<name>
         https://localhost:9443/dbb/rest/buildResult/{id}/property?value=<value>
        https://localhost:9443/dbb/rest/buildResult/{id}/property?name=<name>&value=<value>
    Where:
        id: is the unique id number assigned when the build result is created.

Optional query parameters may also be used to limit the properties that are removed.
    No query parameters will remove all properties from the build result
    name: only properties with this name are removed.
    value: only the properties with this value are removed.

A successful DELETE will return a 200 response code.

Permission Details

DBB Object Ownership and Roles

High level objects in the DBB database, like Collection and Build Results, have owner, team, and individual authority permissions. Other objects like logical files and logical dependencies have permissions based on their containing Collection. Likewise, build reports and attachments permissions are controlled by their containing Build Result.

Roles

DBB defines three roles that control user authority to read and write DBB objects and authority to access certain REST API. A DBB server user must belong to one of these groups.

DBBAdmins: Has full control and authority over all DBB objects regardless of the object's permissions settings.

DBBUsers: Has authority over DBB objects based on object's owner, team, and individual permission settings.

DBBGuests: Only has read authority over DBB objects if provided via the object's individual authority permissions.

Owner Authority

Ownership of a DBB object defaults to the user creating the object. Ownership may be assigned using the owner field during creation (POST) or update (PUT). The owner is granted authority based on the owner permission setting (See Permissions).

Team Authority

A user may belong to a team and will be granted authority to a DBB object based on the team permission setting (See Permissions). The team may be assigned using the team field during creation (POST) or update (PUT). The team defaults to null or empty meaning that no team is assigned. A team is a user registry (i.e. LDAP) group used to assign authority rights to groups of users.

Individual Authority

If a user is not the owner of an object nor belongs to a team, they may be granted authority to a DBB object based on the individual permission setting. See Permissions for more details.

Permissions

Permissions in DBB are assigned using a three digit octal number. The permission setting can be assigned using the permission field during creation (POST) or update (PUT). The first octal digit represents the authority granted to the owner (4=read, 2=write, 6=read and write). The second octal digit represents the team authority and the third octal number represents the authority for everyone else. The default permission is 664 meaning that the owner has read and write permission, the team has read and write permission and everyone else has read permission.