{
  "opencollection": "1.0.0",
  "info": {
    "name": "TrustLayer Platform Auth Projects API",
    "version": "1.0"
  },
  "items": [
    {
      "info": {
        "name": "Projects",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Update project external IDs",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "http://localhost:4000/v1/projects/:id/external-ids",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Update the list of external IDs for this project. The passed values will replace the current ones.\nExternal IDs are in the format `source/id` or `source:instance/id`, where `instance` can be used to differentiate multiple instances of the same `source`.\n\nNote that if the workspace is already integrated with one or more external systems, this endpoint should _not_ be used."
        },
        {
          "info": {
            "name": "List projects",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "http://localhost:4000/v1/projects",
            "params": [
              {
                "name": "sort",
                "value": "",
                "type": "query",
                "description": "List of comma-separated keys used to sort. Reversing is done by prepending \"-\" to the key name."
              },
              {
                "name": "page[number]",
                "value": "",
                "type": "query",
                "description": "Page number, starting from 1"
              },
              {
                "name": "page[size]",
                "value": "",
                "type": "query",
                "description": "Number of items per page. Defaults to 20. Maximum is 100"
              },
              {
                "name": "filter",
                "value": "",
                "type": "query",
                "description": "Key-value pair, e.g. filter[key]=value"
              },
              {
                "name": "include",
                "value": "",
                "type": "query",
                "description": "List of comma-separated relationships to include in the result"
              }
            ]
          },
          "docs": "Available filters:\n* `name`\n* `status` (\"compliant\", \"non_compliant\", others?)\n* `active`\n* `createdAt`\n* `updatedAt`\n* `startDate`\n* `endDate`\n* `customField`\n* `externalId`\n* `active`\n\n\nAvailable sort keys:\n* `name`\n* `createdAt`\n* `updatedAt`\n* `startDate`\n* `endDate`\n\nAvailable include options:\n* `parties`\n* `customFields`\n\nNotes:\n\n* the value of the `externalId` filter must be in the format `<provider name>/<external id>`, e.g. `procore/1234`\n* the value of the `customField` filter must be "
        },
        {
          "info": {
            "name": "Create a new project",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "http://localhost:4000/v1/projects",
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "The only required attribute is `name`."
        },
        {
          "info": {
            "name": "Fetch a project",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "http://localhost:4000/v1/projects/:projectId",
            "params": [
              {
                "name": "projectId",
                "value": "",
                "type": "path",
                "description": "Project ID"
              },
              {
                "name": "include",
                "value": "",
                "type": "query",
                "description": "List of comma-separated relationships to include in the result"
              }
            ]
          },
          "docs": "Available include options:\n* `parties`\n* `customFields`\n"
        },
        {
          "info": {
            "name": "Delete a project",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "http://localhost:4000/v1/projects/:projectId",
            "params": [
              {
                "name": "projectId",
                "value": "",
                "type": "path",
                "description": "Project ID"
              }
            ]
          },
          "docs": "Soft-deletes a project"
        },
        {
          "info": {
            "name": "Add parties to a project",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "http://localhost:4000/v1/projects/:projectId/relationships/parties",
            "params": [
              {
                "name": "projectId",
                "value": "",
                "type": "path",
                "description": "Project ID"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Parties that are already associated with the project are ignored.\n\nAll parties _must_ exist, otherwise a 404 response will be returned and no party will be added."
        },
        {
          "info": {
            "name": "Remove a party from a project",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "http://localhost:4000/v1/projects/:projectId/relationships/parties",
            "params": [
              {
                "name": "projectId",
                "value": "",
                "type": "path",
                "description": "Project ID"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "All parties _must_ exist, otherwise a 404 response will be returned and no party will be removed."
        },
        {
          "info": {
            "name": "Attach documents to a project",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "http://localhost:4000/v1/projects/:projectId/relationships/documents",
            "params": [
              {
                "name": "projectId",
                "value": "",
                "type": "path",
                "description": "Project ID"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "A document can be attached to any number of projects.\n\nAll documents _must_ exist, otherwise a 404 response will be returned and no document will be attached."
        },
        {
          "info": {
            "name": "Detach documents from a project",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "http://localhost:4000/v1/projects/:projectId/relationships/documents",
            "params": [
              {
                "name": "projectId",
                "value": "",
                "type": "path",
                "description": "Project ID"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "All documents _must_ exist, otherwise a 404 response will be returned and no document will be detached."
        },
        {
          "info": {
            "name": "Remove a document from a project",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "http://localhost:4000/v1/projects/:projectId/relationships/documents/:documentId",
            "params": [
              {
                "name": "projectId",
                "value": "",
                "type": "path",
                "description": "Project ID"
              },
              {
                "name": "documentId",
                "value": "",
                "type": "path",
                "description": "Document ID"
              }
            ]
          },
          "docs": "If you need to remove multiple documents at once you can use the alternative endpoint `DELETE /projects/{projectId}/relationships/documents`"
        },
        {
          "info": {
            "name": "Remove a party from a project",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "http://localhost:4000/v1/projects/:projectId/relationships/parties/:partyId",
            "params": [
              {
                "name": "projectId",
                "value": "",
                "type": "path",
                "description": "Project ID"
              },
              {
                "name": "partyId",
                "value": "",
                "type": "path",
                "description": "Party ID"
              }
            ]
          },
          "docs": "If you need to remove multiple parties at once you can use the alternative endpoint `DELETE /projects/{projectId}/relationships/parties`"
        },
        {
          "info": {
            "name": "Fetch compliance profile for project",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "http://localhost:4000/v1/projects/:projectId/compliance-profile",
            "params": [
              {
                "name": "projectId",
                "value": "",
                "type": "path"
              },
              {
                "name": "scope[type]",
                "value": "",
                "type": "query",
                "description": "Type of the resource to be used as scope"
              },
              {
                "name": "scope[id]",
                "value": "",
                "type": "query",
                "description": "Id of the resource to be used as scope"
              }
            ]
          },
          "docs": "This will return the project-specific compliance profile relative to the given scope.\n\nNOTE: it is _mandatory_ to specify a `scope`, which can be either a `party` (belonging to a project) or a `complianceProfile`."
        },
        {
          "info": {
            "name": "Associate a document to multiple projects",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "http://localhost:4000/v1/documents/:documentId/relationships/projects",
            "params": [
              {
                "name": "documentId",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "TBD"
        }
      ]
    }
  ],
  "bundled": true
}