{"openapi":"3.0.1","info":{"title":"Activity Service","version":"v1.0.0"},"servers":[{"url":"https://activity.3dcloud.io"}],"tags":[{"name":"Project State","description":"Creating and managing project state"},{"name":"Project State History","description":"Getting project state history"}],"paths":{"/projects/{projectId}":{"get":{"tags":["Project State"],"summary":"Get the active state values for a specified project. The project is associated with the client through the API_KEY header value.","operationId":"findByProjectId_1","parameters":[{"name":"projectId","in":"path","description":"id of the project to retieve the state for","required":true,"schema":{"type":"string"}}],"responses":{"404":{"description":"Project not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectState"}}}},"200":{"description":"Gets the current Project State","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectState"}}}}}},"put":{"tags":["Project State"],"summary":"Updates the existing state record for the specific project. Updated state values are provided in the request body. The project is associated with the client through the API_KEY header value.","operationId":"updateProject","parameters":[{"name":"projectId","in":"path","description":"id of the project to retieve the state for","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectStateDto"}}},"required":true},"responses":{"404":{"description":"No project found with given Id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectState"}}}},"200":{"description":"Project record successfully created / updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectState"}}}}}}},"/projects":{"post":{"tags":["Project State"],"summary":"Creates a new project state record (or updates an existing record if the project id already exists for the matching client)","operationId":"createProject","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectStateDto"}}},"required":true},"responses":{"200":{"description":"Project record successfully created / updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectState"}}}}}}},"/projects/{projectId}/history":{"get":{"tags":["Project State History"],"summary":"Retrieves the history of state changes for the specified project. Result supports pagination through request parameters. The project is associated with the client through the API_KEY header value. If the provided project id is not found under the associated client, no results are returned","operationId":"findByProjectId","parameters":[{"name":"projectId","in":"path","description":"id of the project to retrieve the history for","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"supports pagination of results, specifies the page of results to return","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"size","in":"query","description":"supports pagination, specifies the number of records per page to return","required":false,"schema":{"type":"integer","format":"int32","default":10}}],"responses":{"200":{"description":"Gets the current Project History","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProjectHistory"}}}}}}}}},"components":{"schemas":{"ProjectStateDto":{"type":"object","properties":{"projectId":{"type":"string"},"userId":{"type":"string"},"projectOpen":{"type":"boolean"},"dateCreated":{"type":"string","format":"date-time"},"dateUpdated":{"type":"string","format":"date-time"},"projectDirty":{"type":"boolean"},"projectBomGenerated":{"type":"boolean"},"projectQuoted":{"type":"boolean"},"projectVersion":{"type":"string"}}},"ProjectState":{"type":"object","properties":{"clientId":{"type":"string"},"projectId":{"type":"string"},"userId":{"type":"string"},"dateCreated":{"type":"integer","format":"int64"},"dateUpdated":{"type":"integer","format":"int64"},"projectOpen":{"type":"boolean"},"projectDirty":{"type":"boolean"},"projectBomGenerated":{"type":"boolean"},"projectQuoted":{"type":"boolean"},"projectVersion":{"type":"string"},"id":{"type":"string"}}},"ProjectHistory":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"clientId":{"type":"string"},"projectId":{"type":"string"},"projectVersion":{"type":"string"},"userId":{"type":"string"},"dateCreated":{"type":"integer","format":"int64"},"dateUpdated":{"type":"integer","format":"int64"},"projectStateChange":{"type":"string"}}}}}}