diff --git a/demo/playground/hmr-playground.tsx b/demo/playground/hmr-playground.tsx index adca6279..a6aceeed 100644 --- a/demo/playground/hmr-playground.tsx +++ b/demo/playground/hmr-playground.tsx @@ -1,53 +1,167 @@ import * as React from 'react'; +import { useEffect, useState } from 'react'; import { render } from 'react-dom'; import { AppContainer } from 'react-hot-loader'; -// import DevTools from 'mobx-react-devtools'; - -import { Redoc, RedocProps } from '../../src/components/Redoc/Redoc'; +import styled from 'styled-components'; +import { Loading } from '../../src'; +import { Redoc } from '../../src/components/Redoc/Redoc'; import { AppStore } from '../../src/services/AppStore'; -import { RedocRawOptions } from '../../src/services/RedocNormalizedOptions'; import { loadAndBundleSpec } from '../../src/utils/loadAndBundleSpec'; -const renderRoot = (props: RedocProps) => +const API_SOURCES = [ + { name: 'Supergrid', url: '../swagger/sg/swagger.json' }, + { name: 'What If', url: '../swagger/t5/swagger.json' }, +]; + +const RedocPlayground = () => { + const [store, setStore] = useState(null); + const [selectedApi, setSelectedApi] = useState(0); + const [showDownloadButton, setShowDownloadButton] = useState(true); + const [loading, setLoading] = useState(false); + + const redocOptions = { + hideDownloadButton: window.location.protocol === 'file:', + theme: { + colors: { + primary: { + main: '#37B5FF', + }, + }, + typography: { + fontWeightRegular: '400', + fontWeightBold: '700', + fontWeightLight: '300', + fontFamily: '\'Open Sans\', sans-serif', + headings: { + fontFamily: '\'Open Sans\', sans-serif', + }, + }, + menu: { + backgroundColor: '#fff', + }, + logo: { + maxWidth: '150px', + maxHeight: '60px', + gutter: '10px 20px', + }, + rightPanel: { + textColor: '#000', + headerTextColor: '#697386', + backgroundColor: '#fff', + tabPanelBackgroundColor: '#f5f5f5', + }, + codeSample: { + endpointBackgroundColor: '#59618d', + }, + schema: { + defaultDetailsWidth: '100%', + }, + }, + }; + + const loadApi = async (apiIndex: number) => { + try { + setLoading(true); + if (store) { store.dispose(); } + + const specUrl = API_SOURCES[apiIndex].url; + const spec = await loadAndBundleSpec(specUrl); + const newStore = new AppStore(spec, specUrl, redocOptions); + setStore(newStore); + } catch (error) { + console.error('Error loading API:', error); + } finally { + setLoading(false); + } + }; + + useEffect(() => { + if (window.location.protocol === 'file:') { + setShowDownloadButton(false); + } + loadApi(selectedApi); + }, []); + + const handleApiChange = (e: React.ChangeEvent) => { + const newIndex = parseInt(e.target.value, 10); + setSelectedApi(newIndex); + loadApi(newIndex); + }; + + return ( +
+
+ {showDownloadButton && ( + + Download HTML Version + + )} + + + + +
+ +
+ {loading && ( + + )} + {!loading && store && } +
+
+ ); +}; + +const Header = styled.div` + position: absolute; + top: 0; + right: 0; + z-index: 200; + text-align: right; + height: 30px; + padding: 19px; + font-family: 'Open Sans', sans-serif; + font-weight: 400; + line-height: 1.5em; + font-size: 14px; +`; + +const DownloadButton = styled.a` + border: 1px solid rgb(55, 181, 255); + color: rgb(55, 181, 255); + font-weight: normal; + margin-left: 0.5em; + padding: 4px 8px; + display: inline-block; + text-decoration: none; + cursor: pointer; + box-sizing: border-box; + -webkit-tap-highlight-color: rgba(255, 255, 255, 0); +`; + +// Рендеринг +const renderRoot = () => { render( - + , document.getElementById('example'), ); +}; -const big = window.location.search.indexOf('big') > -1; -const swagger = window.location.search.indexOf('swagger') > -1; - -const userUrl = window.location.search.match(/url=(.*)$/); - -const specUrl = - (userUrl && userUrl[1]) || (swagger ? 'swagger.yaml' : big ? 'big-openapi.json' : 'openapi.yaml'); - -let store; -const options: RedocRawOptions = { nativeScrollbars: false }; - -async function init() { - const spec = await loadAndBundleSpec(specUrl); - store = new AppStore(spec, specUrl, options); - renderRoot({ store }); -} - -init(); +renderRoot(); +// Hot Module Replacement if (module.hot) { - const reload = (reloadStore = false) => async () => { - if (reloadStore) { - // create a new Store - store.dispose(); - - const state = await store.toJS(); - store = AppStore.fromJS(state); - } - - renderRoot({ store }); - }; - - module.hot.accept(['../../src/components/Redoc/Redoc'], reload()); - module.hot.accept(['../../src/services/AppStore'], reload(true)); + module.hot.accept(() => { + renderRoot(); + }); } diff --git a/demo/playground/index.html b/demo/playground/index.html index d322ee3e..3bd7407d 100644 --- a/demo/playground/index.html +++ b/demo/playground/index.html @@ -4,22 +4,29 @@ - ReDoc + Supergrid API Reference + + + - - +
\ No newline at end of file diff --git a/demo/swagger/sg/swagger.json b/demo/swagger/sg/swagger.json new file mode 100644 index 00000000..f33ff6f6 --- /dev/null +++ b/demo/swagger/sg/swagger.json @@ -0,0 +1,18690 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "Supergrid Web API Specification", + "description": "Note: the maximum length of the query string is limited to 2048 characters by default. The limit can be increased by changing maxQueryString and maxQueryStringLength options in the configuration file.\r\n\r\n## Errors Logging\r\n\r\nError logs can be accessed at the following URL: [/GetErrors](../GetErrors)\r\n\r\n### Supported Parameters:\r\n\r\n- [/GetErrors](../GetErrors) provides error logs for the last 7 days.\r\n\r\n- [/GetErrors/24](../GetErrors/24) provides error logs for the last 24 hours. If the number is greater than 168, error logs for the last week will be retrieved.\r\n\r\n- [/GetErrors/id1027](../GetErrors/id1027) provides error log details where the ID is equal to 1027.\r\n\r\n- [/GetErrors/idAfter1027](../GetErrors/idAfter1027) provides error log details where the ID is greater than 1027 but within the last week.\r\n\r\n- [/GetErrors/m30](../GetErrors/m30) provides error logs for the last 30 minutes. If the number is greater than 10080, error logs for the last week will be retrieved.\r\n\r\n- [/GetErrors/d15-07-2024](../GetErrors/d15-07-2024) provides error logs created on a specific date (15-07-2024, day-month-year format).\r\n\r\n### Optional Parameter: `environment`\r\n\r\nThe `environment` parameter can be used to filter error logs specific to a particular environment. This parameter helps in tracking and analyzing errors based on the environment but is optional for retrieving error logs. Setting this parameter will only show error logs originating from the given envrionment.\n\n Supported values include:\r\n\r\n- **Web**\r\n- **WebMaster**\r\n- **BackgroundWorker**\r\n- **InsightPlusSyncService**\r\n\r\n### Example Request with `environment` Parameter:\r\n```http\r\nGET /GetErrors?environment=BackgroundWorker\r\n```", + "version": "1.0.0", + "x-logo": { + "url": "../assets/plugins/redoc/assets/logo.svg" + } + }, + "servers": [ + { + "url": "/qa/next/normal" + } + ], + "paths": { + "/api/sg/v1/AdminTimes": { + "get": { + "tags": [ + "AdminTimes" + ], + "summary": "List Admin Times", + "description": "Gets all admin times in ascending order by id.", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.AdminTimeType" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.AdminTimeType" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.AdminTimeType" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/AdminTimes" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.AdminTimeTypesClient.GetAdminTimeTypes().Result;" + } + ] + }, + "post": { + "tags": [ + "AdminTimes" + ], + "summary": "Insert Admin Time Types", + "requestBody": { + "description": "The list of admin time types to create. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.AdminTimeType" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.AdminTimeType" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.AdminTimeType" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.AdminTimeType" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "POST /api/sg/v1/AdminTimes\r\n\r\n[\r\n {\r\n \"id\": 0,\r\n \"name\": \"Personal\"\r\n }\r\n]\r\n" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\n\r\nvar adminTimeTypesToCreate = new List\r\n{\r\n new AdminTimeType\r\n {\r\n Id = 0,\r\n Name = \"Personal\",\r\n },\r\n};\r\n\r\nsgClient.AdminTimeTypesClient.CreateAdminTimeTypes(adminTimeTypesToCreate).Result;" + } + ] + }, + "put": { + "tags": [ + "AdminTimes" + ], + "summary": "Update Admin Time Types", + "description": "Updates Admin time types with values provided in request body.", + "requestBody": { + "description": "The list of Admin time types to update. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.AdminTimeType" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.AdminTimeType" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.AdminTimeType" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.AdminTimeType" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "PUT /api/sg/v1/AdminTimes\r\n\r\n[\r\n {\r\n \"id\": 1,\r\n \"name\": \"Personal\"\r\n }\r\n]\r\n" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\n\r\nvar adminTimeTypesToUpdate = new List\r\n{\r\n new AdminTimeType\r\n {\r\n Id = 1,\r\n Name = \"Personal\",\r\n },\r\n};\r\n\r\nsgClient.AdminTimeTypesClient.UpdateAdminTimeTypes(adminTimeTypesToUpdate).Result;" + } + ] + }, + "delete": { + "tags": [ + "AdminTimes" + ], + "summary": "Delete Admin Time Types", + "description": "Deletes admin time types.", + "parameters": [ + { + "name": "ids", + "in": "query", + "description": "Comma separated ids of admin types to delete. Has a limit of 5000 entities in a single call.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "DELETE /api/sg/v1/AdminTimes?ids=1,2" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.AdminTimeTypesClient.DeleteAdminTimeTypes(new List{ 1, 2 }).Result;" + } + ] + } + }, + "/api/sg/v1/AdminTimes/{id}": { + "get": { + "tags": [ + "AdminTimes" + ], + "summary": "Get Admin Times", + "description": "Gets the admin time by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Id of the admin time.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.AdminTimeType" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.AdminTimeType" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.AdminTimeType" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/AdminTimes/2" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.AdminTimeTypesClient.GetAdminTimeType(2).Result;" + } + ] + } + }, + "/api/sg/v1/Assignments": { + "get": { + "tags": [ + "Assignments" + ], + "summary": "List Assignments", + "parameters": [ + { + "name": "timeUnit", + "in": "query", + "description": "Time unit of assignment allocations aggregation. By default allocations aggregated by day. Project is also possible. In this case only one allocation value can be provided which will be allocated over the entire period of the project. If Project time unit is used, the start date will be defaulted to the project's start date and can be omitted.", + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.TimeUnit" + } + }, + { + "name": "dataUnit", + "in": "query", + "description": "Data unit of assignment allocations. By default allocations provided in hours.", + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.DataUnit" + } + }, + { + "name": "planType", + "in": "query", + "description": "Comma-separated list of plan types of task. Possible values Allocation, Demand. By default tasks for both plan types provided.", + "schema": { + "type": "string" + } + }, + { + "name": "allocationType", + "in": "query", + "description": "Comma-separated list of allocation type of allocations. Possible values Planned, Actual. By default allocations for both allocation types provided.", + "schema": { + "type": "string" + } + }, + { + "name": "resourceIds", + "in": "query", + "description": "Comma-separated list of resource ids. Optional parameter. Mutually exclusive with resourceExternalIds.", + "schema": { + "type": "string" + } + }, + { + "name": "resourceExternalIds", + "in": "query", + "description": "Comma-separated list of resource external ids. Optional. Mutually exclusive with ResourceIds.", + "schema": { + "type": "string" + } + }, + { + "name": "projectIds", + "in": "query", + "description": "Comma-separated list or project ids. Optional. Mutually exclusive with TaskIds and ProjectExternalIds.", + "schema": { + "type": "string" + } + }, + { + "name": "assignmentIds", + "in": "query", + "description": "Comma-separated list of assignment ids. Optional.", + "schema": { + "type": "string" + } + }, + { + "name": "projectExternalIds", + "in": "query", + "description": "Comma-separated list of project ids. Optional. Mutually exclusive with TaskIds and ProjectIds.", + "schema": { + "type": "string" + } + }, + { + "name": "taskIds", + "in": "query", + "description": "Comma-separated list of task ids. Optional. Mutually exclusive with ProjectIds and ProjectExternalIds parameters.", + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "Page index to return.", + "schema": { + "type": "integer", + "format": "int32", + "default": 1 + } + }, + { + "name": "pageSize", + "in": "query", + "description": "The maximum number of items to return per page.", + "schema": { + "type": "integer", + "format": "int32", + "default": 100 + } + }, + { + "name": "compressed", + "in": "query", + "description": "Compress assignment allocations array if set to true.", + "schema": { + "type": "boolean", + "default": true + } + }, + { + "name": "modifiedLaterThan", + "in": "query", + "description": "Optional filter parameter to find assignments that have been modified later than given timestamp. Timestamp format 2018-04-20T18:30:00.", + "schema": { + "type": "string", + "format": "date-time" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.PagedAllocationsResult`1[[SG.Api.Model.Assignment, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.PagedAllocationsResult`1[[SG.Api.Model.Assignment, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.PagedAllocationsResult`1[[SG.Api.Model.Assignment, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/Assignments?timeUnit=Month&DataUnit=Time&planType=Demand,Allocation&projectIds=2,3&compressed=false" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.AssignmentsClient.GetAssignments(TimeUnit.Day, DataUnit.Time, new[]\r\n {\r\n PlanType.Allocation, PlanType.Demand\r\n }, new[]\r\n {\r\n AllocationType.Actual, AllocationType.Planned\r\n }, null, new[] {2,3}, null, 1, 100, false).Result;" + } + ] + }, + "post": { + "tags": [ + "Assignments" + ], + "summary": "Create Assignments", + "parameters": [ + { + "name": "dominantUnit", + "in": "query", + "description": "The dominant unit selected in the system.", + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.DominantUnit" + } + }, + { + "name": "dataUnit", + "in": "query", + "description": "Data unit of assignment allocations. By default allocations expected in dominant unit.", + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.DataUnit" + } + }, + { + "name": "withLock", + "in": "query", + "description": "If True, automatically acquires assignments locks before update, and releases locks after assignments updated. If False, locks should be already acquired.", + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "compressed", + "in": "query", + "description": "True if allocations are compressed, otherwise False.", + "schema": { + "type": "boolean", + "default": true + } + }, + { + "name": "timeUnit", + "in": "query", + "description": "Allocation time unit.", + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.TimeUnit" + } + } + ], + "requestBody": { + "description": "The list of assignments to create. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.AssignmentEdit" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.AssignmentEdit" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.AssignmentEdit" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.AssignmentEdit" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "POST /api/sg/v1/Assignments?dominantUnit=Time&withLock=true&compressed=false&timeUnit=Day\r\n\r\n[\r\n {\r\n \"taskId\": 5,\r\n \"resourceId\": 2,\r\n \"actualStartDate\": \"2017-08-12T05:51:09Z\",\r\n \"actualAllocations\": [\r\n 5,4,2,2,4,4,3\r\n ],\r\n \"plannedStartDate\": \"2017-08-12T05:51:09Z\",\r\n \"plannedAllocations\": [\r\n 6,6,6,6,4,4,4\r\n ]\r\n }\r\n]" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nvar assignments = new List{\r\n new AssignmentEdit\r\n {\r\n TaskId = 5,\r\n ResourceId = 2,\r\n ActualStartDate = DateTime.Now,\r\n ActualAllocations = new double[]{5,4,2,2,4,4,3},\r\n PlannedStartDate = DateTime.Now,\r\n PlannedAllocations = new double[]{6,6,6,6,4,4,4},\r\n }\r\n};\r\nsgClient.AssignmentsClient.CreateAssignments(assignments, DominantUnit.Time, true, false, TimeUnit.Day).Result;" + } + ] + }, + "put": { + "tags": [ + "Assignments" + ], + "summary": "Update Assignments", + "parameters": [ + { + "name": "dominantUnit", + "in": "query", + "description": "The dominant unit selected in the system.", + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.DominantUnit" + } + }, + { + "name": "dataUnit", + "in": "query", + "description": "Data unit of assignment allocations. By default allocations expected in dominant unit.", + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.DataUnit" + } + }, + { + "name": "withLock", + "in": "query", + "description": "If True, automatically acquires assignments locks before update, and releases locks after assignments updated. If False, locks should be already acquired.", + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "compressed", + "in": "query", + "description": "True if allocations are compressed, otherwise False.", + "schema": { + "type": "boolean", + "default": true + } + }, + { + "name": "merge", + "in": "query", + "description": "If True, assignment allocations will be merged with existing from the start date. If False, allocations will be replaced.", + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "timeUnit", + "in": "query", + "description": "Allocation time unit.", + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.TimeUnit" + } + } + ], + "requestBody": { + "description": "The list of assignments to update. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.AssignmentEdit" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.AssignmentEdit" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.AssignmentEdit" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.AssignmentEdit" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "PUT /api/sg/v1/Assignments?dominantUnit=Time&withLock=true&compressed=false&timeUnit=Day\r\n\r\n[\r\n {\r\n \"assignmentId\": 5,\r\n \"actualStartDate\": \"2017-08-12T05:51:09Z\",\r\n \"actualAllocations\": [\r\n 5,4,2,2,4,4,3\r\n ],\r\n \"plannedStartDate\": \"2017-08-12T05:51:09Z\",\r\n \"plannedAllocations\": [\r\n 6,6,6,6,4,4,4\r\n ]\r\n }\r\n]" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nvar assignments = new List{\r\n new AssignmentEdit\r\n {\r\n AssignmentId = 5,\r\n ActualStartDate = DateTime.Now,\r\n ActualAllocations = new double[]{5,4,2,2,4,4,3},\r\n PlannedStartDate = DateTime.Now,\r\n PlannedAllocations = new double[]{6,6,6,6,4,4,4},\r\n };\r\n}\r\nsgClient.AssignmentsClient.UpdateAssignments(assignments, DominantUnit.Time, true, false, TimeUnit.Day).Wait();" + } + ] + } + }, + "/api/sg/v1/Assignments/Delete": { + "post": { + "tags": [ + "Assignments" + ], + "summary": "Delete Assignments", + "parameters": [ + { + "name": "withLock", + "in": "query", + "description": "If True, automatically acquires assignments locks before delete, and releases locks after assignments deleted. If False, locks should be already acquired.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "requestBody": { + "description": "The list of assignment ids to delete. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.AssignmentKey" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.AssignmentKey" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.AssignmentKey" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.AssignmentKey" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "POST /api/sg/v1/Assignments/Delete\r\n\r\n[\r\n {\r\n \"assignmentId\" : 5\r\n },\r\n {\r\n \"assignmentId\" : 6\r\n }\r\n]" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nvar assignments = new List{\r\n new AssignmentKey{\r\n AssignmentId = 5\r\n },\r\n new AssignmentKey{\r\n AssignmentId = 6\r\n }\r\n}\r\nsgClient.AssignmentsClient.DeleteAssignments(assignments).Wait();" + } + ] + } + }, + "/api/sg/v1/Assignments/AcquireLocks": { + "post": { + "tags": [ + "Assignments" + ], + "summary": "Acquire Locks", + "requestBody": { + "description": "Array of assignment ids to lock.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.AssignmentKey" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.AssignmentKey" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.AssignmentKey" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.AssignmentKey" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.LockState" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.LockState" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.LockState" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "POST /api/sg/v1/Assignments/AcquireLocks\r\n\r\n[\r\n {\r\n \"assignmentId\" : 2\r\n },\r\n {\r\n \"assignmentId\" : 3\r\n }\r\n]" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nvar assignments = new List{\r\n new AssignmentKey{\r\n AssignmentId = 5\r\n },\r\n new AssignmentKey{\r\n AssignmentId = 6\r\n }\r\n}\r\nsgClient.AssignmentsClient.AcquireLocks(assignments).Wait();" + } + ] + } + }, + "/api/sg/v1/Assignments/ExtendLocks": { + "put": { + "tags": [ + "Assignments" + ], + "summary": "Extend Locks", + "description": "Extends all assignments acquired by user.", + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "PUT /api/sg/v1/Assignments/ExtendLocks" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.AssignmentsClient.ExtendLocks().Wait();" + } + ] + } + }, + "/api/sg/v1/Assignments/ReleaseLocks": { + "put": { + "tags": [ + "Assignments" + ], + "summary": "Release Locks", + "description": "Releases all assignments locked acquired by user.", + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "PUT /api/sg/v1/Assignments/ReleaseLocks" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.AssignmentsClient.ReleaseLocks().Wait();" + } + ] + } + }, + "/api/sg/v1/Assignments/CustomFieldValues": { + "post": { + "tags": [ + "Assignments" + ], + "summary": "List Assignments Custom Field Values", + "description": "Gets the list of custom field values for provided assignments and custom fields ids.", + "requestBody": { + "description": "The filter for requested assignments custom field values.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.AssignmentsCustomFieldValuesFilter" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.AssignmentsCustomFieldValuesFilter" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.AssignmentsCustomFieldValuesFilter" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.AssignmentsCustomFieldValuesFilter" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BulkCustomFieldValue" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BulkCustomFieldValue" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BulkCustomFieldValue" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "POST /api/sg/v1/Assignments/CustomFieldValues\r\n\r\n{\r\n \"customFieldIds\" : null,\r\n \"assignmentIds\" : [\r\n\t{\"assignmentId\" : 3},\r\n\t{\"assignmentId\" : 3},\r\n ]\r\n}" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.AssignmentsClient.GetCustomFieldValues(new List{new AssignmentKey {AssignmentId = 3}, new AssignmentKey {AssignmentId = 3}}, null).Result;" + } + ] + }, + "put": { + "tags": [ + "Assignments" + ], + "summary": "Update Assignments Custom Field Values", + "description": "Update assignments custom field values specified in request body.", + "requestBody": { + "description": "The list of custom field values to update. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BulkCustomFieldValue" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BulkCustomFieldValue" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BulkCustomFieldValue" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BulkCustomFieldValue" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "PUT /api/sg/v1/Assignments/CustomFieldValues\r\n\r\n[\r\n {\r\n \"value\": \"high\",\r\n \"customFieldId\": 1,\r\n \"entityIds\": null,\r\n \"assignmentIds\": [\r\n\t{\"assignmentId\" : 3},\r\n {\"assignmentId\" : 3},\r\n ]\r\n }\r\n]" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nvar values = new List\r\n {\r\n new BulkCustomFieldValue\r\n {\r\n AssignmentIds = new List\r\n {\r\n new AssignmentKey() {AssignmentId = 3},\r\n new AssignmentKey() {AssignmentId = 3},\r\n },\r\n CustomFieldId = 1,\r\n Value = new CustomFieldValue\r\n {\r\n ValueString = \"high\"\r\n }\r\n },\r\n };\r\n\r\nsgClient.AssignmentsClient.UpdateCustomFieldValues(values).Wait();" + } + ] + } + }, + "/api/sg/v1/AuditLogs": { + "get": { + "tags": [ + "AuditLogs" + ], + "summary": "List Audit Logs", + "description": "Gets the list of audit logs.", + "parameters": [ + { + "name": "page", + "in": "query", + "description": "Page index to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "The maximum number of items to return per page.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "minId", + "in": "query", + "description": "Id of the minimum log item to filter.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "minCreatedOn", + "in": "query", + "description": "Earliest date when the log is created to filter.", + "schema": { + "type": "string", + "format": "date-time" + } + } + ], + "responses": { + "200": { + "description": "Returns list of objects containing audit log data.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.PagedResult`1[[SG.Api.Model.AuditLogItem, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.PagedResult`1[[SG.Api.Model.AuditLogItem, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.PagedResult`1[[SG.Api.Model.AuditLogItem, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/auditLogs?page=1&pageSize=20&minId=34&minCreatedOn=2019-01-20T14:00:00" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsg.Client.AuditLogsClient.GetAuditLogs(35, new DateTime(2019,1,20, 14, 0, 0), 1, 20).Result;" + } + ] + } + }, + "/api/sg/v1/Budgets": { + "get": { + "tags": [ + "Budgets" + ], + "summary": "List Budgets", + "parameters": [ + { + "name": "ids", + "in": "query", + "description": "Comma separated ids of the budgets. All available budgets will be provided if parameter not specified.", + "schema": { + "type": "string" + } + }, + { + "name": "compressed", + "in": "query", + "description": "Compress costs arrays if set to true.", + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.Budget" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.Budget" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.Budget" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/budgets?ids=28,35&compressed=true" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.BudgetsClient.GetBudgets(new List { 28, 35 }, true).Result;" + } + ] + }, + "post": { + "tags": [ + "Budgets" + ], + "summary": "Create Budgets", + "description": "Create new budgets.", + "parameters": [ + { + "name": "compressed", + "in": "query", + "description": "Compress costs arrays if set to true.", + "schema": { + "type": "boolean", + "default": true + } + } + ], + "requestBody": { + "description": "The list of budgets to create. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BudgetEdit" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BudgetEdit" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BudgetEdit" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BudgetEdit" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "POST /api/sg/v1/budgets?compressed=true\r\n\r\n[\r\n {\r\n \"name\" : \"HR Department Budget\",\r\n \"description\" : null,\r\n \"startMonth\" : \"2018-01-01T00:00:00Z\",\r\n \"endMonth\" : \"2018-11-01T00:00:00Z\",\r\n \"costType\" : \"Planned\",\r\n \"customFieldId\" : 9,\r\n \"isShared\" : true,\r\n \"budgetRows\" : [\r\n\t \t{\r\n\t \t\t\"customFieldMemberId\" : 1,\r\n\t \t\t\"budgetCosts\" : [11, 220]\r\n\t \t},\r\n\t \t{\r\n\t \t\t\"customFieldMemberId\" : 2,\r\n\t \t\t\"budgetCosts\" : [11, 35]\r\n\t \t}\r\n \t]\r\n }\r\n]" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\n\r\nvar budgets = new List\r\n{\r\n new BudgetEdit\r\n {\r\n Name = \"HR Department Budget\",\r\n StartMonth = new DateTime(2018, 1, 1),\r\n EndMonth = new DateTime(2018, 11, 1),\r\n CostType = BudgetCostType.Planned,\r\n CustomFieldId = 9,\r\n IsShared = true,\r\n BudgetRows = new List\r\n {\r\n new BudgetRowEdit\r\n {\r\n CustomFieldMemberId = 1,\r\n BudgetCosts = List { 11, 220 }\r\n },\r\n new BudgetRowEdit\r\n {\r\n CustomFieldMemberId = 2,\r\n BudgetCosts = List { 11, 35 }\r\n }\r\n }\r\n }\r\n};\r\n\r\nsgClient.BudgetsClient.CreateBudgets(budgets).Wait();" + } + ] + }, + "put": { + "tags": [ + "Budgets" + ], + "summary": "Update Budgets", + "description": "Update new budgets.", + "parameters": [ + { + "name": "compressed", + "in": "query", + "description": "Compress costs arrays if set to true.", + "schema": { + "type": "boolean", + "default": true + } + } + ], + "requestBody": { + "description": "The list of budgets to update. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BudgetEdit" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BudgetEdit" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BudgetEdit" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BudgetEdit" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "PUT /api/sg/v1/budgets?compressed=true\r\n\r\n[\r\n {\r\n \t\"id\" : 51,\r\n \"name\" : \"HR Department Budget\",\r\n \"description\" : null,\r\n \"startMonth\" : \"2018-01-01T00:00:00Z\",\r\n \"endMonth\" : \"2018-11-01T00:00:00Z\",\r\n \"costType\" : \"Planned\",\r\n \"customFieldId\" : 9,\r\n \"isShared\" : true,\r\n \"budgetRows\" : [\r\n\t \t{\r\n\t \t\t\"customFieldMemberId\" : 1,\r\n\t \t\t\"budgetCosts\" : [11, 220]\r\n\t \t},\r\n\t \t{\r\n\t \t\t\"customFieldMemberId\" : 2,\r\n\t \t\t\"budgetCosts\" : [11, 35]\r\n\t \t}\r\n \t]\r\n }\r\n]" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\n\r\nvar budgets = new List\r\n{\r\n new BudgetEdit\r\n {\r\n Id = 51,\r\n Name = \"HR Department Budget\",\r\n StartMonth = new DateTime(2018, 1, 1),\r\n EndMonth = new DateTime(2018, 11, 1),\r\n CostType = BudgetCostType.Planned,\r\n CustomFieldId = 9,\r\n IsShared = true,\r\n BudgetRows = new List\r\n {\r\n new BudgetRowEdit\r\n {\r\n CustomFieldMemberId = 1,\r\n BudgetCosts = new List { 11, 220 }\r\n },\r\n new BudgetRowEdit\r\n {\r\n CustomFieldMemberId = 2,\r\n BudgetCosts = new List { 11, 35 }\r\n }\r\n }\r\n }\r\n};\r\n\r\nsgClient.BudgetsClient.UpdateBudgets(budgets).Wait();" + } + ] + }, + "delete": { + "tags": [ + "Budgets" + ], + "summary": "Delete Budgets", + "description": "Delete budgets with specified ids.", + "parameters": [ + { + "name": "ids", + "in": "query", + "description": "Comma separated id of budgets to delete. Has a limit of 5000 entities in a single call.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "DELETE /api/sg/v1/budgets?ids=51" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.BudgetsClient.DeleteBudgets(new List { 51 }).Wait();" + } + ] + } + }, + "/api/sg/v1/Budgets/{id}": { + "get": { + "tags": [ + "Budgets" + ], + "summary": "Get Budget", + "description": "Get budget by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Id of budget.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "compressed", + "in": "query", + "description": "Compress costs arrays if set to true.", + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Budget" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Budget" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Budget" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/budgets/2" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.BudgetsClient.GetBudget(28).Result;" + } + ] + } + }, + "/api/sg/v1/Calendars": { + "get": { + "tags": [ + "Calendars" + ], + "summary": "List Calendars", + "description": "Gets the list of resource calendars.", + "parameters": [ + { + "name": "timeUnit", + "in": "query", + "description": "The time unit of requested calendars allocations. By default allocations provided by day.", + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.TimeUnit" + } + }, + { + "name": "compressed", + "in": "query", + "description": "True if response needs to be compressed, otherwise False.", + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Returns SG.Api.Model.CalendarData object containing calendars dates range and all calendars details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.AllocationsResult`1[[SG.Api.Model.CalendarData, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.AllocationsResult`1[[SG.Api.Model.CalendarData, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.AllocationsResult`1[[SG.Api.Model.CalendarData, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/Calendars?timeUnit=Month&compressed=false" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.CalendarsClient.GetCalendars(TimeUnit.Month, false).Result;" + } + ] + } + }, + "/api/sg/v1/CustomFields": { + "get": { + "tags": [ + "CustomFields" + ], + "summary": "Get Custom Fields", + "description": "Gets all available custom fields of specified entity type.", + "parameters": [ + { + "name": "entityType", + "in": "query", + "description": "Entity type of requested custom fields.", + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.EntityType" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.CustomField" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.CustomField" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.CustomField" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/CustomFields?entityType=Project" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.CustomFieldsClient.GetCustomFields(EntityType.Project).Result;" + } + ] + }, + "post": { + "tags": [ + "CustomFields" + ], + "summary": "Create Custom Fields", + "description": "Create new custom fields with values provided in request body.", + "requestBody": { + "description": "The list of custom fields to create. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.CustomFieldEdit" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.CustomFieldEdit" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.CustomFieldEdit" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.CustomFieldEdit" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "POST /api/sg/v1/CustomFields\r\n\r\n[\r\n {\r\n \"id\": null,\r\n \"name\": \"enum field\",\r\n \"entityType\": \"Project\",\r\n \"dataType\": \"Enum\",\r\n \"defaultValue\": null,\r\n \"enumMembers\": [\r\n {\r\n \"enumMemberId\": -1,\r\n \"name\": \"High\"\r\n },\r\n {\r\n \"enumMemberId\": -2,\r\n \"name\": \"Medium\"\r\n },\r\n {\r\n \"enumMemberId\": -3,\r\n \"name\": \"Low\"\r\n }\r\n ],\r\n \"isRequired\": false,\r\n \"isUnique\": false,\r\n \"isReadOnly\": false,\r\n \"referenceBooleanFilterId\": null,\r\n \"calculatedFormula\": null\r\n }\r\n]" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nvar customFields = new List\r\n {\r\n new CustomFieldEdit\r\n {\r\n DataType = CustomFieldDataType.Enum,\r\n Name = \"enum field\",\r\n EnumMembers = new List\r\n {\r\n new ValueEnumMemberInfo { EnumMemberId = -1, Name = \"High\" },\r\n new ValueEnumMemberInfo { EnumMemberId = -2, Name = \"Medium\" },\r\n new ValueEnumMemberInfo { EnumMemberId = -3, Name = \"Low\" },\r\n },\r\n EntityType = EntityType.Project,\r\n IsRequired = false,\r\n IsUnique = false,\r\n DefaultValue = new CustomFieldValue\r\n {\r\n ValueDouble = -1\r\n }\r\n },\r\n };\r\nsgClient.CustomFieldsClient.CreateCustomFields(customFields).Result;" + } + ] + }, + "put": { + "tags": [ + "CustomFields" + ], + "summary": "Update Custom Fields", + "description": "Updates the list of existing custom fields with values provided in request body.", + "requestBody": { + "description": "The list of custom fields to update. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.CustomFieldEdit" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.CustomFieldEdit" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.CustomFieldEdit" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.CustomFieldEdit" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "PUT /api/sg/v1/CustomFields\r\n\r\n[\r\n {\r\n \"id\": 3,\r\n \"name\": \"enum field\",\r\n \"entityType\": \"Project\",\r\n \"dataType\": \"Enum\",\r\n \"defaultValue\": 6,\r\n \"enumMembers\": [\r\n {\r\n \"enumMemberId\": 5,\r\n \"name\": \"High\"\r\n },\r\n {\r\n \"enumMemberId\": 6,\r\n \"name\": \"Medium\"\r\n },\r\n {\r\n \"enumMemberId\": 7,\r\n \"name\": \"Low\"\r\n }\r\n ],\r\n \"isRequired\": false,\r\n \"isUnique\": false,\r\n \"isReadOnly\": false,\r\n \"referenceBooleanFilterId\": null,\r\n \"calculatedFormula\": null\r\n }\r\n]" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nvar customFields = new List\r\n {\r\n new CustomFieldEdit\r\n {\r\n Id = 3,\r\n DataType = CustomFieldDataType.Enum,\r\n Name = \"enum field\",\r\n EnumMembers = new List\r\n {\r\n new ValueEnumMemberInfo { EnumMemberId = 5, Name = \"High\" },\r\n new ValueEnumMemberInfo { EnumMemberId = 6, Name = \"Medium\" },\r\n new ValueEnumMemberInfo { EnumMemberId = 7, Name = \"Low\" },\r\n },\r\n EntityType = EntityType.Project,\r\n IsRequired = false,\r\n IsUnique = false,\r\n DefaultValue = new CustomFieldValue\r\n {\r\n ValueDouble = 6\r\n }\r\n },\r\n };\r\nsgClient.CustomFieldsClient.UpdateCustomFields(customFields).Wait();" + } + ] + }, + "delete": { + "tags": [ + "CustomFields" + ], + "summary": "Delete Custom Fields", + "description": "Delete custom fields with given ids.", + "parameters": [ + { + "name": "ids", + "in": "query", + "description": "Comma separated ids list of custom fields to delete. Has a limit of 5000 entities in a single call.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "DELETE /api/sg/v1/CustomFields?ids=3,4" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.CustomFieldsClient.DeleteCustomFields(new List{3,4}).Wait();" + } + ] + } + }, + "/api/sg/v1/CustomFields/{id}": { + "get": { + "tags": [ + "CustomFields" + ], + "summary": "Get Custom Field", + "description": "Gets the custom field by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Id of the custom field.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.CustomField" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.CustomField" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.CustomField" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/CustomFields/2" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.CustomFieldsClient.GetCustomField(2).Result;" + } + ] + } + }, + "/api/sg/v1/CustomFields/CheckNameExist": { + "get": { + "tags": [ + "CustomFields" + ], + "summary": "Check Name Exists", + "description": "Check if the name is assigned to any custom field.", + "parameters": [ + { + "name": "name", + "in": "query", + "description": "Name of the custom field.", + "schema": { + "type": "string" + } + }, + { + "name": "entityType", + "in": "query", + "description": "Entity type of the custom field.", + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.EntityType" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "boolean" + } + }, + "text/plain": { + "schema": { + "type": "boolean" + } + }, + "text/json": { + "schema": { + "type": "boolean" + } + } + } + } + } + } + }, + "/api/sg/v1/Files": { + "post": { + "tags": [ + "Files" + ], + "summary": "Create Files", + "description": "Creates new files", + "requestBody": { + "description": "Files to be created", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.FileCreate" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.FileCreate" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.FileCreate" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.FileCreate" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "POST /api/sg/v1/Files\r\n\r\n[\r\n {\r\n \"name\": \"example-file.txt\",\r\n \"entityId\": 955,\r\n \"entityType\": \"Project\",\r\n \"content\": \"dGhpcyBpcyBzYW1wbGUgZmlsZSBjb250ZW50\",\r\n \"workflowStepId\": null,\r\n \"entityExternalId\": null,\r\n }\r\n]" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\n\r\nvar files = new List\r\n{\r\n new FileCreate\r\n {\r\n Name = \"example-file.txt\",\r\n EntityId = 955,\r\n EntityExternalId = null,\r\n WorkflowStepId = null,\r\n EntityType = FileEntityType.Project,\r\n Content = \"dGhpcyBpcyBzYW1wbGUgZmlsZSBjb250ZW50\",\r\n }\r\n};\r\n\r\nsgClient.FilesClient.CreateFiles(files).Wait();" + } + ] + }, + "put": { + "tags": [ + "Files" + ], + "summary": "Update Files", + "description": "Updates the files.", + "requestBody": { + "description": "Files to be updated", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.FileUpdate" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.FileUpdate" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.FileUpdate" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.FileUpdate" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "PUT /api/sg/v1/Files\r\n\r\n[\r\n {\r\n \"id\" : 51,\r\n \"name\" : \"new-name.txt\",\r\n }\r\n]" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\n\r\nvar files = new List\r\n{\r\n new FileUpdate\r\n {\r\n Id = 51,\r\n Name = \"new-name.txt\",\r\n }\r\n};\r\n\r\nsgClient.FilesClient.UpdateFiles(files).Wait();" + } + ] + }, + "get": { + "tags": [ + "Files" + ], + "summary": "Get Files", + "description": "Gets all available files.", + "parameters": [ + { + "name": "entityType", + "in": "query", + "description": "Entity type of the file", + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.FileEntityType" + } + }, + { + "name": "entityId", + "in": "query", + "description": "Id of the entity for which files are to be fetched. Mutually exclusive with EntityExternalId.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "entityExternalId", + "in": "query", + "description": "EntityExternalId of the entity for which files are to be fetched. Mutually exclusive with EntityId.", + "schema": { + "type": "string" + } + }, + { + "name": "rowIndex", + "in": "query", + "description": "Index of the sheet row for which files are to be fetched", + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.File" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.File" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.File" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/Files?entityId=955&entityType=Project" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.FilesClient.GetFiles(955, null, FileEntityType.Project).Result;" + } + ] + }, + "delete": { + "tags": [ + "Files" + ], + "summary": "Delete Files", + "description": "Deletes the files.", + "parameters": [ + { + "name": "ids", + "in": "query", + "description": "Comma separated list of file ids to be deleted", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "DELETE /api/sg/v1/Files?ids=51" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.FilesClient.DeleteFiles(new List { 51 }).Wait();" + } + ] + } + }, + "/api/sg/v1/Files/{id}": { + "get": { + "tags": [ + "Files" + ], + "summary": "Get File", + "description": "Gets the file by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Id of the file to be fetched", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.File" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.File" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.File" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/Files/28" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.FilesClient.GetFile(28).Result;" + } + ] + } + }, + "/api/sg/v1/Files/Content/{id}": { + "get": { + "tags": [ + "Files" + ], + "summary": "Get Content", + "description": "Gets the content of the file by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Id of the file whose content is to be fetched", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.FileContent" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.FileContent" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.FileContent" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/Files/Content/450" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.FilesClient.Content(450).Result.Content;" + } + ] + } + }, + "/api/sg/v1/Files/Content": { + "get": { + "tags": [ + "Files" + ], + "summary": "Get Content", + "description": "Gets the content of the file by id.", + "parameters": [ + { + "name": "id", + "in": "query", + "description": "Id of the file whose content is to be fetched", + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.FileContent" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.FileContent" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.FileContent" + } + } + } + } + } + } + }, + "/api/sg/v1/FinancialCategories": { + "get": { + "tags": [ + "FinancialCategories" + ], + "summary": "List Financial Categories", + "description": "Gets the list of financial categories.", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.FinancialCategory" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.FinancialCategory" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.FinancialCategory" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/FinancialCategories" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.FinancialCategoriesClient.GetFinancialCategories().Result;" + } + ] + }, + "post": { + "tags": [ + "FinancialCategories" + ], + "summary": "Create Financial Categories", + "description": "Creates new financial categories with values provided in request body.", + "requestBody": { + "description": "The list of financial categories to create. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.FinancialCategoryEdit" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.FinancialCategoryEdit" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.FinancialCategoryEdit" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.FinancialCategoryEdit" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "POST /api/sg/v1/FinancialCategories\r\n\r\n[\r\n {\r\n \"id\": null,\r\n \"name\": \"Software\",\r\n \"financialTypeId\": null,\r\n \"isPositive\": true\r\n },\r\n {\r\n \"id\": null,\r\n \"name\": \"Hardware\",\r\n \"financialTypeId\": 9,\r\n \"isPositive\": false\r\n }\r\n]" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\n\r\nvar financialCategories = new List\r\n{\r\n new FinancialCategoryEdit\r\n {\r\n Id = null,\r\n Name = \"Software\",\r\n FinancialTypeId = null,\r\n IsPositive = false\r\n },\r\n new FinancialCategoryEdit\r\n {\r\n Id = null,\r\n Name = \"Hardware\",\r\n FinancialTypeId = 9,\r\n IsPositive = true\r\n }\r\n};\r\n\r\nsgClient.FinancialCategoriesClient.CreateFinancialCategories(financialCategories).Wait();" + } + ] + }, + "put": { + "tags": [ + "FinancialCategories" + ], + "summary": "Update Financial Categories", + "description": "Updates financial categories with values provided in request body.", + "requestBody": { + "description": "The list of financial categories to update. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.FinancialCategoryEdit" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.FinancialCategoryEdit" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.FinancialCategoryEdit" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.FinancialCategoryEdit" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "PUT /api/sg/v1/FinancialCategories\r\n\r\n[\r\n {\r\n \"id\": 4,\r\n \"name\": \"Software\",\r\n \"financialTypeId\": null,\r\n \"isPositive\": true\r\n },\r\n {\r\n \"id\": 2,\r\n \"name\": \"Hardware\",\r\n \"financialTypeId\": 9,\r\n \"isPositive\": false\r\n }\r\n]" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\n\r\nvar financialCategories = new List\r\n{\r\n new FinancialCategoryEdit\r\n {\r\n Id = 5,\r\n Name = \"Software\",\r\n FinancialTypeId = null,\r\n IsPositive = false\r\n },\r\n new FinancialCategoryEdit\r\n {\r\n Id = 3,\r\n Name = \"Hardware\",\r\n FinancialTypeId = 9,\r\n IsPositive = true\r\n }\r\n};\r\n\r\nsgClient.FinancialCategoriesClient.UpdateFinancialCategories(financialCategories).Wait();" + } + ] + }, + "delete": { + "tags": [ + "FinancialCategories" + ], + "summary": "Delete Financial Categories", + "description": "Deletes financial categories.", + "parameters": [ + { + "name": "ids", + "in": "query", + "description": "Comma separated ids of financial categories to delete. Has a limit of 5000 entities in a single call.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "DELETE /api/sg/v1/FinancialCategories?ids=3,4" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.FinancialCategoriesClient.DeleteFinancialCategories(new List{ 2, 6 }).Wait();" + } + ] + } + }, + "/api/sg/v1/FinancialCategories/{id}": { + "get": { + "tags": [ + "FinancialCategories" + ], + "summary": "Get Financial Category", + "description": "Gets the financial category by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A unique id of financial category.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.FinancialCategory" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.FinancialCategory" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.FinancialCategory" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/FinancialCategories/2" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.FinancialCategoriesClient.GetFinancialCategory(4).Result;" + } + ] + } + }, + "/api/sg/v1/FinancialTypes": { + "get": { + "tags": [ + "FinancialTypes" + ], + "summary": "List Financial Types", + "description": "Gets the list of financial types.", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.FinancialType" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.FinancialType" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.FinancialType" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/FinancialTypes" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.FinancialTypesClient.GetFinancialTypes().Result;" + } + ] + }, + "post": { + "tags": [ + "FinancialTypes" + ], + "summary": "Create Financial Types", + "description": "Creates new financial types with values provided in request body.", + "requestBody": { + "description": "The list of financial types to create. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.FinancialTypeEdit" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.FinancialTypeEdit" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.FinancialTypeEdit" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.FinancialTypeEdit" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "POST /api/sg/v1/FinancialTypes\r\n\r\n[\r\n {\r\n \"id\": null,\r\n \"name\": \"Software\"\r\n },\r\n {\r\n \"id\": null,\r\n \"name\": \"Hardware\"\r\n }\r\n]" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\n\r\nvar financialTypes = new List\r\n{\r\n new FinancialTypeEdit\r\n {\r\n Id = null,\r\n Name = \"Software\"\r\n },\r\n new FinancialTypeEdit\r\n {\r\n Id = null,\r\n Name = \"Hardware\"\r\n }\r\n};\r\n\r\nsgClient.FinancialTypesClient.CreateFinancialTypes(financialTypes).Wait();" + } + ] + }, + "put": { + "tags": [ + "FinancialTypes" + ], + "summary": "Update Financial Types", + "description": "Updates financial types with values provided in request body.", + "requestBody": { + "description": "The list of financial types to update. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.FinancialTypeEdit" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.FinancialTypeEdit" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.FinancialTypeEdit" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.FinancialTypeEdit" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "PUT /api/sg/v1/FinancialTypes\r\n\r\n[\r\n {\r\n \"id\": 4,\r\n \"name\": \"Software\"\r\n },\r\n {\r\n \"id\": 2,\r\n \"name\": \"Hardware\"\r\n }\r\n]" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\n\r\nvar financialTypes = new List\r\n{\r\n new FinancialTypeEdit\r\n {\r\n Id = 5,\r\n Name = \"Software\"\r\n },\r\n new FinancialTypeEdit\r\n {\r\n Id = 3,\r\n Name = \"Hardware\"\r\n }\r\n};\r\n\r\nsgClient.FinancialTypesClient.UpdateFinancialTypes(financialTypes).Wait();" + } + ] + }, + "delete": { + "tags": [ + "FinancialTypes" + ], + "summary": "Delete Financial Types", + "description": "Deletes financial types.", + "parameters": [ + { + "name": "ids", + "in": "query", + "description": "Comma separated ids of financial types to delete. Has a limit of 5000 entities in a single call.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "DELETE /api/sg/v1/FinancialTypes?ids=3,4" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.FinancialTypesClient.DeleteFinancialTypes(new List{ 2, 6 }).Wait();" + } + ] + } + }, + "/api/sg/v1/FinancialTypes/{id}": { + "get": { + "tags": [ + "FinancialTypes" + ], + "summary": "Get Financial Type", + "description": "Gets the financial type by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A unique id of financial type.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.FinancialType" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.FinancialType" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.FinancialType" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/FinancialTypes/2" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.FinancialTypesClient.GetFinancialType(4).Result;" + } + ] + } + }, + "/api/sg/v1/GeneralSettings": { + "get": { + "tags": [ + "GeneralSettings" + ], + "summary": "Get General Settings", + "description": "Gets the general settings that are used in the system.", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.GeneralSettings" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.GeneralSettings" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.GeneralSettings" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/GeneralSettings" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.GeneralSettingsClient.GetGeneralSettings().Result;" + } + ] + } + }, + "/api/sg/v1/GeneralSettings/GetVersion": { + "get": { + "tags": [ + "GeneralSettings" + ], + "summary": "Get Version", + "description": "Gets the application version.", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "string" + } + }, + "text/plain": { + "schema": { + "type": "string" + } + }, + "text/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/GeneralSettings/getVersion" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.GeneralSettingsClient.GetVersion().Result;" + } + ] + } + }, + "/api/sg/v1/Milestones": { + "get": { + "tags": [ + "Milestones" + ], + "summary": "List Milestones", + "description": "Gets the list of milestones for provided project ids.", + "parameters": [ + { + "name": "ids", + "in": "query", + "description": "Ids of milestones separated by comma.", + "schema": { + "type": "string" + } + }, + { + "name": "projectIds", + "in": "query", + "description": "Comma-separated list or project ids. Optional. Mutually exclusive with ProjectExternalIds.", + "schema": { + "type": "string" + } + }, + { + "name": "projectExternalIds", + "in": "query", + "description": "Comma-separated list or project external ids. Optional. Mutually exclusive with ProjectIds.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ProjectMilestones" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ProjectMilestones" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ProjectMilestones" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/Milestones?projectIds=2,3" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.MilestonesClient.GetMilestones(null, new List{2,3}).Result;" + } + ] + }, + "post": { + "tags": [ + "Milestones" + ], + "summary": "Create Milestones", + "description": "Create new milestones.", + "requestBody": { + "description": "The list of milestones to create. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.MilestoneEdit" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.MilestoneEdit" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.MilestoneEdit" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.MilestoneEdit" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "POST /api/sg/v1/Milestones\r\n\r\n[\r\n {\r\n \"projectId\" : 1,\r\n \"name\": \"Milestone 1\",\r\n \"description\": null,\r\n \"date\": \"2016-09-21T00:00:00\",\r\n \"color\": \"HotPink\",\r\n \"shape\": \"Diamond\"\r\n },\r\n {\r\n \"projectId\" : 1,\r\n \"name\": \"Milestone 3\",\r\n \"description\": null,\r\n \"date\": \"2017-03-21T00:00:00\",\r\n \"color\": \"PaleVioletRed\",\r\n \"shape\": \"Square\"\r\n }\r\n]\r\n" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nvar milestones = new List{\r\n new MilestoneEdit{\r\n Name = \"New Milestone\",\r\n ProjectId = 2,\r\n Description = \"New description\",\r\n Date = DateTime.Today,\r\n Shape = MilestoneShape.Circle,\r\n Color = MilestoneColor.DarkCyan\r\n }\r\n};\r\n\r\nsgClient.MilestonesClient.CreateMilestones(milestones).Result;" + } + ] + }, + "put": { + "tags": [ + "Milestones" + ], + "summary": "Update Milestones", + "description": "Update existing milestones.", + "requestBody": { + "description": "The list of milestones to update. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.MilestoneEdit" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.MilestoneEdit" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.MilestoneEdit" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.MilestoneEdit" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "PUT /api/sg/v1/Milestones\r\n\r\n[\r\n {\r\n \"id\": 1,\r\n \"projectId\" : 1,\r\n \"name\": \"Milestone 1\",\r\n \"description\": null,\r\n \"date\": \"2016-09-21T00:00:00\",\r\n \"color\": \"HotPink\",\r\n \"shape\": \"Diamond\"\r\n },\r\n {\r\n \"id\": 3,\r\n \"projectId\" : 1,\r\n \"name\": \"Milestone 3\",\r\n \"description\": null,\r\n \"date\": \"2017-03-21T00:00:00\",\r\n \"color\": \"PaleVioletRed\",\r\n \"shape\": \"Square\"\r\n }\r\n]\r\n" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nvar milestones = new List{\r\n new MilestoneEdit{\r\n Id = 3,\r\n Name = \"Milestone\"\r\n Description = \"description\",\r\n Date = DateTime.Today,\r\n Shape = MilestoneShape.Circle,\r\n Color = MilestoneColor.DarkCyan\r\n }\r\n};\r\n\r\nsgClient.MilestonesClient.UpdateMilestones(milestones).Wait();" + } + ] + }, + "delete": { + "tags": [ + "Milestones" + ], + "summary": "Delete Milestones", + "description": "Delete milestones.", + "parameters": [ + { + "name": "ids", + "in": "query", + "description": "Comma separated id of milestones to delete. Has a limit of 5000 entities in a single call.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "DELETE /api/sg/v1/Milestones?ids=3,5" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.MilestonesClient.DeleteMilestones(new List{3,5}).Wait();" + } + ] + } + }, + "/api/sg/v1/Milestones/{id}": { + "get": { + "tags": [ + "Milestones" + ], + "summary": "Get Milestones", + "description": "Get milestone by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Id of milestone.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Milestone" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Milestone" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Milestone" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/Milestones/2" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.MilestonesClient.GetMilestone(1).Result;" + } + ] + } + }, + "/api/sg/v1/Milestones/CustomFieldValues": { + "get": { + "tags": [ + "Milestones" + ], + "summary": "List Milestones Custom Field Values", + "description": "Gets the list of custom field values for provided milestones and custom fields ids. Either milestoneIds or customFieldIds must be provided.", + "parameters": [ + { + "name": "milestoneIds", + "in": "query", + "description": "Comma-separated list of milestone ids.", + "schema": { + "type": "string" + } + }, + { + "name": "customFieldIds", + "in": "query", + "description": "Ids of custom fields separated by comma.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BulkCustomFieldValue" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BulkCustomFieldValue" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BulkCustomFieldValue" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/Milestones/CustomFieldValues?milestoneIds=2,3" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.MilestonesClient.GetCustomFieldValues(new List{2,3}, null).Result;" + } + ] + }, + "put": { + "tags": [ + "Milestones" + ], + "summary": "Update Milestones Custom Field Values", + "description": "Update milestones custom field values specified in request body.", + "requestBody": { + "description": "The list of custom field values to update. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BulkCustomFieldValue" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BulkCustomFieldValue" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BulkCustomFieldValue" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BulkCustomFieldValue" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "PUT /api/sg/v1/Milestones/CustomFieldValues\r\n\r\n[\r\n {\r\n \"value\": \"high\",\r\n \"customFieldId\": 1,\r\n \"entityIds\": [\r\n 2, 3\r\n ],\r\n \"assignmentIds\": null\r\n }\r\n]" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nvar values = new List\r\n {\r\n new BulkCustomFieldValue\r\n {\r\n EntityIds = new List\r\n {\r\n 2, 3\r\n },\r\n CustomFieldId = 1,\r\n Value = new CustomFieldValue\r\n {\r\n ValueString = \"high\"\r\n }\r\n },\r\n };\r\n\r\nsgClient.MilestonesClient.UpdateCustomFieldValues(values).Wait();" + } + ] + } + }, + "/api/sg/v1/ProjectAccessRules": { + "get": { + "tags": [ + "ProjectAccessRules" + ], + "summary": "List Project Access Rules", + "description": "Gets the list of ruless in ascending order by id.", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ProjectPermissionRule" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ProjectPermissionRule" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ProjectPermissionRule" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/ProjectAccessRules" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.ProjectAccessRulesClient.GetProjectAccessRules().Result;" + } + ] + }, + "post": { + "tags": [ + "ProjectAccessRules" + ], + "summary": "Create Project Access Rules", + "description": "Create new rules with values provided in request body.", + "requestBody": { + "description": "The list of rules to create. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ProjectPermissionRuleEdit" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ProjectPermissionRuleEdit" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ProjectPermissionRuleEdit" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ProjectPermissionRuleEdit" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.PermissionRuleEditResult" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.PermissionRuleEditResult" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.PermissionRuleEditResult" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "POST /api/sg/v1/ProjectAccessRules\r\n\r\n[\r\n {\r\n \"id\": null,\r\n \"resourceIds\": [\r\n 137\r\n ],\r\n \"resourceSecurityGroupIds\": [],\r\n \"globalRoleIds\": [],\r\n \"projectIds\": [],\r\n \"projectSecurityGroupIds\": [],\r\n \"projectRoleId\": 10,\r\n \"allowOverride\": false\r\n },\r\n {\r\n \"id\": null,\r\n \"resourceIds\": [\r\n 1183\r\n ],\r\n \"resourceSecurityGroupIds\": [],\r\n \"globalRoleIds\": [],\r\n \"projectIds\": [],\r\n \"projectSecurityGroupIds\": [],\r\n \"projectRoleId\": 40,\r\n \"allowOverride\": false\r\n }\r\n]" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\n\r\nvar rules = new List\r\n{\r\n new ProjectPermissionRuleEdit\r\n {\r\n ProjectRoleId = 2,\r\n ProjectIds = new List { 22, 25 },\r\n ProjectSecurityGroupIds = new List(),\r\n GlobalRoleIds = new List(),\r\n ResourceIds = new List { 122, 135 },\r\n ResourceSecurityGroupIds = new List()\r\n },\r\n new ProjectPermissionRuleEdit\r\n {\r\n ProjectRoleId = 3,\r\n ProjectIds = new List { 12, 15 },\r\n ProjectSecurityGroupIds = new List(),\r\n GlobalRoleIds = new List(),\r\n ResourceIds = new List(),\r\n ResourceSecurityGroupIds = new List { 3 }\r\n }\r\n};\r\n\r\nsgClient.ProjectAccessRulesClient.CreateProjectAccessRules(rules).Result;" + } + ] + }, + "put": { + "tags": [ + "ProjectAccessRules" + ], + "summary": "Update Project Access Rules", + "description": "Update new rules with values provided in request body.", + "requestBody": { + "description": "The list of rules to update. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ProjectPermissionRuleEdit" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ProjectPermissionRuleEdit" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ProjectPermissionRuleEdit" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ProjectPermissionRuleEdit" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "PUT /api/sg/v1/ProjectAccessRules\r\n\r\n[\r\n {\r\n \"id\": 32,\r\n \"resourceIds\": [\r\n 137\r\n ],\r\n \"resourceSecurityGroupIds\": [],\r\n \"globalRoleIds\": [],\r\n \"projectIds\": [],\r\n \"projectSecurityGroupIds\": [],\r\n \"projectRoleId\": 10,\r\n \"allowOverride\": false\r\n },\r\n {\r\n \"id\": 33,\r\n \"resourceIds\": [\r\n 631\r\n ],\r\n \"resourceSecurityGroupIds\": [],\r\n \"globalRoleIds\": [],\r\n \"projectIds\": [],\r\n \"projectSecurityGroupIds\": [],\r\n \"projectRoleId\": 6,\r\n \"allowOverride\": false\r\n },\r\n {\r\n \"id\": 36,\r\n \"resourceIds\": [\r\n 1183\r\n ],\r\n \"resourceSecurityGroupIds\": [],\r\n \"globalRoleIds\": [],\r\n \"projectIds\": [],\r\n \"projectSecurityGroupIds\": [],\r\n \"projectRoleId\": 40,\r\n \"allowOverride\": false\r\n }\r\n]" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\n\r\nvar rules = new List\r\n{\r\n new ProjectPermissionRuleEdit\r\n {\r\n Id = 7,\r\n ProjectRoleId = 2,\r\n ProjectIds = new List { 22, 25 },\r\n ProjectSecurityGroupIds = new List(),\r\n GlobalRoleIds = new List(),\r\n ResourceIds = new List { 122, 135 },\r\n ResourceSecurityGroupIds = new List()\r\n },\r\n new ProjectPermissionRuleEdit\r\n {\r\n Id = 5,\r\n ProjectRoleId = 3,\r\n ProjectIds = new List { 12, 15 },\r\n ProjectSecurityGroupIds = new List(),\r\n GlobalRoleIds = new List(),\r\n ResourceIds = new List(),\r\n ResourceSecurityGroupIds = new List { 3 }\r\n }\r\n};\r\n\r\nsgClient.ProjectAccessRulesClient.UpdateProjectAccessRules(rules).Result;" + } + ] + }, + "delete": { + "tags": [ + "ProjectAccessRules" + ], + "summary": "Delete Project Access Rules", + "parameters": [ + { + "name": "ids", + "in": "query", + "description": "Comma separated list of ids of rules to delete. Has a limit of 5000 entities in a single call.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "DELETE /api/sg/v1/ProjectAccessRules?ids=3,4" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.ProjectAccessRulesClient.DeleteProjectAccessRules(new List{ 2, 6 }).Result;" + } + ] + } + }, + "/api/sg/v1/ProjectAccessRules/{id}": { + "get": { + "tags": [ + "ProjectAccessRules" + ], + "summary": "Get Project Access Rule", + "description": "Gets the rule by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Id of the rule.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.ProjectPermissionRule" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.ProjectPermissionRule" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.ProjectPermissionRule" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/ProjectAccessRules/2" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.ProjectAccessRulesClient.GetProjectAccessRule(2).Result;" + } + ] + } + }, + "/api/sg/v1/ProjectDependencies": { + "get": { + "tags": [ + "ProjectDependencies" + ], + "summary": "List Projects Dependencies.", + "description": "Gets the list of project dependencies. Any of toProjectIds, fromProjectIds, toProjectExternalIds, fromProjectExternalIds is required.", + "parameters": [ + { + "name": "fromProjectIds", + "in": "query", + "description": "Comma-separated list or project ids. Optional. Mutually exclusive with FromProjectExternalIds.", + "schema": { + "type": "string" + } + }, + { + "name": "fromProjectExternalIds", + "in": "query", + "description": "Comma-separated list or project external ids. Optional. Mutually exclusive with FromProjectIds.", + "schema": { + "type": "string" + } + }, + { + "name": "toProjectIds", + "in": "query", + "description": "Comma-separated list or project ids. Optional. Mutually exclusive with ToProjectExternalIds.", + "schema": { + "type": "string" + } + }, + { + "name": "toProjectExternalIds", + "in": "query", + "description": "Comma-separated list or project external ids. Optional. Mutually exclusive with ToProjectIds.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ProjectDependency" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ProjectDependency" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ProjectDependency" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/ProjectDependencies?fromProjectIds=184" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.ProjectDependenciesClient.GetProjectDependencies(new List{3,4}).Result;" + } + ] + }, + "post": { + "tags": [ + "ProjectDependencies" + ], + "summary": "Create Project Dependencies.", + "description": "Create a list of project dependencies.", + "requestBody": { + "description": "The list of project dependencies to create. Has a limit of 5000 dependencies in a single call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ProjectDependency" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ProjectDependency" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ProjectDependency" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ProjectDependency" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "POST /api/sg/v1/ProjectDependencies\r\n\r\n[\r\n {\r\n \"fromProjectId\": 255,\r\n \"toProjectId\": 126\r\n }\r\n]" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nvar projectDependencies = new List\r\n {\r\n new ProjectDependency\r\n {\r\n FromProjectId = 255,\r\n ToProjectId = 126,\r\n },\r\n };\r\nsgClient.ProjectDependenciesClient.CreateProjectDependencies(projectDependencies).Result;" + } + ] + }, + "delete": { + "tags": [ + "ProjectDependencies" + ], + "summary": "Delete Project Dependencies.", + "description": "Delete a list of project dependencies.", + "parameters": [ + { + "name": "ids", + "in": "query", + "description": "Comma separated list of ids of project dependencies to delete. Has a limit of 5000 dependencies in a single call.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "DELETE /api/sg/v1/ProjectDependencies?ids=3,4" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.ProjectDependenciesClient.DeleteProjectDependencies(new List{255,126}).Wait();" + } + ] + } + }, + "/api/sg/v1/ProjectDependencies/AvailableProjectsToLink": { + "get": { + "tags": [ + "ProjectDependencies" + ], + "summary": "List Available Projects Dependencies.", + "description": "Get the list of available project child dependencies.", + "parameters": [ + { + "name": "projectIds", + "in": "query", + "description": "Comma-separated list or project ids. Optional. Mutually exclusive with ProjectExternalIds.", + "schema": { + "type": "string" + } + }, + { + "name": "projectExternalIds", + "in": "query", + "description": "Comma-separated list or project external ids. Optional. Mutually exclusive with ProjectIds.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.AvailableProjectsToLink" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.AvailableProjectsToLink" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.AvailableProjectsToLink" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/ProjectDependencies/AvailableProjectsToLink?projectIds=184" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.ProjectDependenciesClient.GetAvailableProjectsToLink(new List{3,4}).Result;" + } + ] + } + }, + "/api/sg/v1/ProjectFinancials": { + "get": { + "tags": [ + "ProjectFinancials" + ], + "summary": "List Project Financials", + "parameters": [ + { + "name": "projectIds", + "in": "query", + "description": "Comma-separated list or project ids. Optional. Mutually exclusive with ProjectExternalIds.", + "schema": { + "type": "string" + } + }, + { + "name": "projectExternalIds", + "in": "query", + "description": "Comma-separated list or project external ids. Optional. Mutually exclusive with ProjectIds.", + "schema": { + "type": "string" + } + }, + { + "name": "financialCategoryIds", + "in": "query", + "description": "Ids of Financial categorys to include in response.", + "schema": { + "type": "string" + } + }, + { + "name": "financialCostTypes", + "in": "query", + "description": "Financial cost types to include into response.", + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "Page index to return. Must be specified if projects and financial categories filters no used.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "The maximum number of items to return per page. Must be specified if projects and financial categories filters no used.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "compressed", + "in": "query", + "description": "Compress financial costs arrays if set to true.", + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.PagedResult`1[[SG.Api.Model.FinancialRow, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.PagedResult`1[[SG.Api.Model.FinancialRow, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.PagedResult`1[[SG.Api.Model.FinancialRow, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/ProjectFinancials?projectIds=731&financialCostTypes=Planned,Actual&financialCategoryIds=5&page=1&pageSize=50&compressed=true" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.ProjectFinancialsClient.GetProjectFinancials(new List { 731 }, new List { 5 }, new List { FinancialCostType.Actual, FinancialCostType.Planned }, 1, 50, true).Result;" + } + ] + }, + "post": { + "tags": [ + "ProjectFinancials" + ], + "summary": "Create Project Financials", + "parameters": [ + { + "name": "withLock", + "in": "query", + "description": "If True, automatically acquires projects locks before update, and releases locks after financial rows saved. If False, locks should be already acquired.", + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "compressed", + "in": "query", + "description": "True if financial costs are compressed, otherwise False.", + "schema": { + "type": "boolean", + "default": true + } + } + ], + "requestBody": { + "description": "The list of financial rows to create. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.FinancialRow" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.FinancialRow" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.FinancialRow" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.FinancialRow" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "POST /api/sg/v1/ProjectFinancials?withLock=true&compressed=true\r\n\r\n[\r\n {\r\n \"projectId\": 731,\r\n \"financialCategoryId\": 5,\r\n \"actualCosts\": [\r\n 11, 200\r\n ],\r\n \"plannedCosts\": [\r\n 11, 0\r\n ],\r\n \"budgetCosts\": [\r\n 11, 270\r\n ],\r\n \"forecastCosts\": [\r\n 88, 44\r\n ]\r\n }\r\n]" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\n\r\nvar projectFinancialRows = new List\r\n{\r\n new FinancialRow\r\n {\r\n ProjectId = 731,\r\n FinancialCategoryId = 5,\r\n ActualCosts = new List { 11, 200 },\r\n PlannedCosts = new List { 11, 0 },\r\n BudgetCosts = new List { 11, 270 },\r\n ForecastCosts = new List { 5, 88 } \r\n }\r\n};\r\n\r\nsgClient.ProjectFinancialsClient.CreateProjectFinancials(projectFinancialRows).Wait();\r\n" + } + ] + }, + "put": { + "tags": [ + "ProjectFinancials" + ], + "summary": "Update Project Financials", + "parameters": [ + { + "name": "withLock", + "in": "query", + "description": "If True, automatically acquires projects locks before update, and releases locks after financial rows saved. If False, locks should be already acquired.", + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "compressed", + "in": "query", + "description": "True if financial costs are compressed, otherwise False.", + "schema": { + "type": "boolean", + "default": true + } + }, + { + "name": "merge", + "in": "query", + "description": "If True, financial rows costs will be merged with existing costs from the start date.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "requestBody": { + "description": "The list of financial rows to update. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.FinancialRow" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.FinancialRow" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.FinancialRow" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.FinancialRow" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "PUT /api/sg/v1/ProjectFinancials?withLock=true&compressed=true\r\n\r\n[\r\n {\r\n \"projectId\": 731,\r\n \"financialCategoryId\": 5,\r\n \"actualCosts\": [\r\n 11, 100\r\n ],\r\n \"plannedCosts\": [\r\n 11, 120\r\n ],\r\n \"budgetCosts\": [\r\n 11, 0\r\n ],\r\n \"forecastCosts\": [\r\n 88, 44\r\n ]\r\n }\r\n]" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\n\r\nvar projectFinancialRows = new List\r\n{\r\n new FinancialRow\r\n {\r\n ProjectId = 731,\r\n FinancialCategoryId = 5,\r\n ActualCosts = new List { 11, 100 },\r\n PlannedCosts = new List { 11, 120 },\r\n BudgetCosts = new List { 11, 0 },\r\n ForecastCosts = new List { 5, 88 } \r\n }\r\n};\r\n\r\nsgClient.ProjectFinancialsClient.UpdateProjectFinancials(projectFinancialRows).Wait();\r\n" + } + ] + } + }, + "/api/sg/v1/ProjectFinancials/Delete": { + "post": { + "tags": [ + "ProjectFinancials" + ], + "summary": "Delete Project Financials", + "parameters": [ + { + "name": "withLock", + "in": "query", + "description": "If True, automatically acquires projects locks before update, and releases locks after financial rows deleted. If False, locks should be already acquired.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "requestBody": { + "description": "The list of financial rows compound ids to delete. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.FinancialRowKey" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.FinancialRowKey" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.FinancialRowKey" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.FinancialRowKey" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "POST /api/sg/v1/ProjectFinancials/Delete?withLock=true\r\n\r\n[\r\n {\r\n \"projectId\" : 731,\r\n \"financialCategoryId\" : 5\r\n }\r\n]" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\n\r\nvar financialRowIds = new List\r\n{\r\n new FinancialRowKey\r\n {\r\n ProjectId = 731,\r\n FinancialCategoryId = 5\r\n }\r\n};\r\n\r\nsgClient.ProjectFinancialsClient.DeleteProjectFinancials(financialRowIds, true).Wait();\r\n" + } + ] + } + }, + "/api/sg/v1/ProjectFinancials/CustomFieldValues": { + "get": { + "tags": [ + "ProjectFinancials" + ], + "summary": "List Financial Row Custom Field Values", + "description": "Gets the list of custom field values for provided financialRows and custom fields ids.", + "parameters": [ + { + "name": "financialRowIds", + "in": "query", + "description": "Comma-separated list or financialRow ids. Optional.", + "schema": { + "type": "string" + } + }, + { + "name": "customFieldIds", + "in": "query", + "description": "Ids or custom fields separated by comma.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BulkCustomFieldValue" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BulkCustomFieldValue" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BulkCustomFieldValue" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/ProjectFinancials/CustomFieldValues?financialRowIds=2,3" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.ProjectFinancialsClient.GetCustomFieldValues(new List{2,3}, null).Result;" + } + ] + }, + "put": { + "tags": [ + "ProjectFinancials" + ], + "summary": "Update Financial Row Custom Field Values", + "description": "Update financial rows custom field values specified in request body.", + "requestBody": { + "description": "The list of custom field values to update. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BulkCustomFieldValue" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BulkCustomFieldValue" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BulkCustomFieldValue" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BulkCustomFieldValue" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "PUT /api/sg/v1/ProjectFinancials/CustomFieldValues\r\n\r\n[\r\n {\r\n \"value\": \"high\",\r\n \"customFieldId\": 1,\r\n \"entityIds\": [\r\n 2, 3\r\n ],\r\n \"assignmentIds\": null\r\n }\r\n]" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nvar values = new List\r\n {\r\n new BulkCustomFieldValue\r\n {\r\n EntityIds = new List\r\n {\r\n 2, 3\r\n },\r\n CustomFieldId = 1,\r\n Value = new CustomFieldValue\r\n {\r\n ValueString = \"high\"\r\n }\r\n },\r\n };\r\n\r\nsgClient.ProjectFinancialsClient.UpdateCustomFieldValues(values).Wait();" + } + ] + } + }, + "/api/sg/v1/Projects": { + "get": { + "tags": [ + "Projects" + ], + "summary": "List Projects", + "description": "Gets the list of projects that the user has access to in ascending order by id.", + "parameters": [ + { + "name": "ids", + "in": "query", + "description": "Comma separated id of the projects. Mandatory parameter if page and externalIds are not specified. Mutually exclusive with page and externalIds parameters.", + "schema": { + "type": "string" + } + }, + { + "name": "externalIds", + "in": "query", + "description": "Comma separated external id of the projects. Mandatory parameter if page and ids is not specified. Mutually exclusive with page and ids parameters.", + "schema": { + "type": "string" + } + }, + { + "name": "name", + "in": "query", + "description": "Optional filter parameter to find projects by name.", + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "The index of page to return. Mandatory parameter if ids and externalIds are not specified. Mutually exclusive with parameter ids and externalIds.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "The maximum number of items to return per page. Mandatory parameter if page specified.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "modifiedLaterThan", + "in": "query", + "description": "Optional filter parameter to find projects that have been modified later than given timestamp. Mutually exclusive with ids and name parameter. Timestamp format 2018-04-20T18:30:00.", + "schema": { + "type": "string", + "format": "date-time" + } + } + ], + "responses": { + "200": { + "description": "The list of available projects.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.PagedResult`1[[SG.Api.Model.Project, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.PagedResult`1[[SG.Api.Model.Project, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.PagedResult`1[[SG.Api.Model.Project, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/Projects?page=1&pageSize=100" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.ProjectsClient.GetProjects(null, null, 1, 100).Result;" + } + ] + }, + "post": { + "tags": [ + "Projects" + ], + "summary": "Create Projects", + "description": "Create new projects with values provided in request body.", + "requestBody": { + "description": "The list of projects to create. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ProjectEdit" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ProjectEdit" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ProjectEdit" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ProjectEdit" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "POST /api/sg/v1/Projects\r\n\r\n[\r\n {\r\n \"updateSecurityGroup\": true,\r\n \"securityGroupId\": 2,\r\n \"id\": null,\r\n \"name\": \"project name\",\r\n \"updateProjectDates\": true,\r\n \"startDate\": \"2017-08-08T05:08:55Z\",\r\n \"endDate\": \"2017-09-08T05:08:55Z\",\r\n \"updateFinancialDates\": true,\r\n \"financialStartMonth\": \"2017-08-01T00:00:00Z\",\r\n \"financialEndMonth\": \"2017-09-01T00:00:00Z\",\r\n \"updateWorkflow\" : true,\r\n \"updateAssignmentWorkflow\" : true,\r\n \"updateProjectWorkflow\" : true,\r\n \"assignmentWorkflowId\" : 1,\r\n \"projectWorkflowId\" : 2,\r\n \"updateLock\": false,\r\n \"isLocked\": false\r\n }\r\n]" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nvar projectsToCreate = new List\r\n{\r\n new ProjectEdit\r\n {\r\n Name = \"project name\",\r\n SecurityGroupId = 2,\r\n UpdateSecurityGroup = true,\r\n StartDate = DateTime.Now,\r\n EndDate = DateTime.Now.AddMonths(1),\r\n UpdateProjectDates = true,\r\n UpdateFinancialDates = true,\r\n FinancialStartMonth = new DateTime(2018, 1, 1),\r\n FinancialEndMonth = new DateTime(2018, 12, 1),\r\n UpdateWorkflow = true,\r\n UpdateAssignmentWorkflow = true,\r\n UpdateProjectWorkflow = true,\r\n AssignmentWorkflowId = 1,\r\n ProjectWorkflowId = 2,\r\n UpdateLock = false,\r\n IsLocked = false\r\n }\r\n};\r\n\r\nsgClient.ProjectsClient.CreateProjects(projectsToCreate).Result;" + } + ] + }, + "put": { + "tags": [ + "Projects" + ], + "summary": "Update Projects", + "description": "Update the list of existing projects with values provided in request body.", + "requestBody": { + "description": "The list of projects to update. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ProjectEdit" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ProjectEdit" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ProjectEdit" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ProjectEdit" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "PUT /api/sg/v1/Projects\r\n\r\n[\r\n {\r\n \"updateSecurityGroup\": true,\r\n \"securityGroupId\": 3,\r\n \"id\": 2,\r\n \"name\": \"project name\",\r\n \"updateProjectDates\": true,\r\n \"startDate\": \"2017-08-08T05:08:55Z\",\r\n \"endDate\": \"2017-10-08T05:08:55Z\",\r\n \"updateFinancialDates\": true,\r\n \"financialStartMonth\": \"2017-08-01T00:00:00Z\",\r\n \"financialEndMonth\": \"2017-09-01T00:00:00Z\",\r\n \"updateWorkflow\" : true,\r\n \"updateAssignmentWorkflow\" : true,\r\n \"updateProjectWorkflow\" : true,\r\n \"assignmentWorkflowId\" : 1,\r\n \"projectWorkflowId\" : 2,\r\n \"updateLock\": false,\r\n \"isLocked\": false\r\n }\r\n]" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nvar projectsToUpdate = new List\r\n{\r\n new ProjectEdit\r\n {\r\n Id = 2,\r\n Name = \"project name\",\r\n SecurityGroupId = 2,\r\n UpdateSecurityGroup = true,\r\n StartDate = DateTime.Now,\r\n EndDate = DateTime.Now.AddMonths(1),\r\n UpdateProjectDates = true,\r\n UpdateFinancialDates = true,\r\n FinancialStartMonth = new DateTime(2018, 1, 1),\r\n FinancialEndMonth = new DateTime(2018, 12, 1),\r\n UpdateWorkflow = true,\r\n UpdateAssignmentWorkflow = true,\r\n UpdateProjectWorkflow = true,\r\n AssignmentWorkflowId = 1,\r\n ProjectWorkflowId = 2,\r\n UpdateLock = false,\r\n IsLocked = false\r\n }\r\n};\r\n\r\nsgClient.ProjectsClient.UpdateProjects(projectsToUpdate).Result;" + } + ] + }, + "delete": { + "tags": [ + "Projects" + ], + "summary": "Delete Projects", + "description": "Delete projects with given ids or external ids.", + "parameters": [ + { + "name": "ids", + "in": "query", + "description": "Comma separated list of ids of projects to delete. Optional. Mutually exclusive with ExternalIds. Has a limit of 5000 entities in a single call.", + "schema": { + "type": "string" + } + }, + { + "name": "externalIds", + "in": "query", + "description": "Comma separated list of external ids of projects to delete. Optional. Mutually exclusive with Ids. Has a limit of 5000 entities in a single call.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "DELETE /api/sg/v1/Projects?ids=2,3" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.ProjectsClient.DeleteProjects(new List{ 2, 3 }).Wait();" + } + ] + } + }, + "/api/sg/v1/Projects/{id}": { + "get": { + "tags": [ + "Projects" + ], + "summary": "Get Project", + "description": "Gets the project by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Id of the project.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Project" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Project" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Project" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/Projects/2" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.ProjectsClient.GetProject(2).Result;" + } + ] + } + }, + "/api/sg/v1/Projects/CheckNameExist": { + "get": { + "tags": [ + "Projects" + ], + "summary": "Check Name Exists", + "description": "Check if the name is assigned to any project.", + "parameters": [ + { + "name": "name", + "in": "query", + "description": "Name of the project.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "boolean" + } + }, + "text/plain": { + "schema": { + "type": "boolean" + } + }, + "text/json": { + "schema": { + "type": "boolean" + } + } + } + } + } + } + }, + "/api/sg/v1/Projects/CheckExternalIdExist": { + "get": { + "tags": [ + "Projects" + ], + "summary": "Check External Id Exists", + "description": "Check if the external id is assigned to any project.", + "parameters": [ + { + "name": "externalId", + "in": "query", + "description": "External id of the project.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "boolean" + } + }, + "text/plain": { + "schema": { + "type": "boolean" + } + }, + "text/json": { + "schema": { + "type": "boolean" + } + } + } + } + } + } + }, + "/api/sg/v1/Projects/Milestones": { + "get": { + "tags": [ + "Projects" + ], + "summary": "List Milestones", + "description": "Gets the list of milestones for provided project ids.", + "parameters": [ + { + "name": "projectIds", + "in": "query", + "description": "Ids of projects separated by comma. Optional. Mutually exclusive with ProjectExternalIds.", + "schema": { + "type": "string" + } + }, + { + "name": "projectExternalIds", + "in": "query", + "description": "Comma-separated list or project external ids. Optional. Mutually exclusive with ProjectIds.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ProjectMilestones" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ProjectMilestones" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ProjectMilestones" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/Projects/Milestones?projectIds=2,3" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.ProjectsClient.GetMilestones(new List{2,3}).Result;" + } + ] + } + }, + "/api/sg/v1/Projects/Teams": { + "get": { + "tags": [ + "Projects" + ], + "summary": "List Project Team", + "description": "Gets the list of teams for provided project ids or project external ids.", + "parameters": [ + { + "name": "projectIds", + "in": "query", + "description": "Ids of projects separated by comma. Optional. Mutually exclusive with ProjectExternalIds.", + "schema": { + "type": "string" + } + }, + { + "name": "projectExternalIds", + "in": "query", + "description": "Comma-separated list or project external ids. Optional. Mutually exclusive with ProjectIds.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ProjectTeam" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ProjectTeam" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ProjectTeam" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/Projects/Teams?projectIds=2,3" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.ProjectsClient.GetTeams(new List{2,3}).Result;" + } + ] + }, + "put": { + "tags": [ + "Projects" + ], + "summary": "Update Project Team", + "description": "Update projects with teams provided in request body.", + "requestBody": { + "description": "Projects teams to update.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ProjectTeam" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ProjectTeam" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ProjectTeam" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ProjectTeam" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "PUT /api/sg/v1/Projects/teams\r\n\r\n[\r\n {\r\n \"projectId\": 1,\r\n \"team\": [\r\n 1, 2, 3\r\n ]\r\n }\r\n]" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nvar teams = new List\r\n{\r\n new ProjectTeam\r\n {\r\n ProjectId = 1,\r\n Team = new List\r\n {\r\n 1, 2, 3\r\n }\r\n }\r\n};\r\n\r\nsgClient.ProjectsClient.UpdateTeams(teams).Wait();\r\n" + } + ] + } + }, + "/api/sg/v1/Projects/Clone/{id}": { + "post": { + "tags": [ + "Projects" + ], + "summary": "Clone Project", + "description": "Clone project with given id.", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Id of the project to clone.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "name", + "in": "query", + "description": "The name of cloned project.", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Flags for cloning project data.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.ProjectClone" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.ProjectClone" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.ProjectClone" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.ProjectClone" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "integer", + "format": "int32" + } + }, + "text/plain": { + "schema": { + "type": "integer", + "format": "int32" + } + }, + "text/json": { + "schema": { + "type": "integer", + "format": "int32" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "POST /api/sg/v1/Projects/Clone/2?name=new project name\r\n\r\n {\r\n \"cloneScheduleAssignments\": true,\r\n \"cloneTeam\": true,\r\n \"cloneFinancials\": true,\r\n \"cloneMilestones\": false,\r\n \"cloneCustomFieldValues\": true,\r\n \"cloneActualAllocation\": false,\r\n \"clonePlannedAllocation\": true,\r\n \"cloneActualDemand\": false,\r\n \"clonePlannedDemand\": false,\r\n \"cloneDocuments\": false\r\n}" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\n\r\nvar projectClone = new ProjectClone\r\n{\r\n CloneActualAllocation = false,\r\n CloneActualDemand = false,\r\n CloneScheduleAssignments = false,\r\n CloneCustomFieldValues = false,\r\n CloneFinancials = false,\r\n CloneMilestones = false,\r\n ClonePlannedAllocation = false,\r\n ClonePlannedDemand = false,\r\n CloneTeam = false,\r\n CloneDocuments = false\r\n};\r\n\r\nsgClientProjectsClient.CloneProject(2, \"new project name\", projectClone).Result;" + } + ] + } + }, + "/api/sg/v1/Projects/LockStates": { + "get": { + "tags": [ + "Projects" + ], + "summary": "List Lock States", + "description": "Get lock states of projects and project assignment which are locked by the current or other users.", + "parameters": [ + { + "name": "projectIds", + "in": "query", + "description": "Comma-separated list or project ids. Optional. Mutually exclusive with ProjectExternalIds. Lock states for all available projects will be returned if ids or externalIds not specified.", + "schema": { + "type": "string" + } + }, + { + "name": "projectExternalIds", + "in": "query", + "description": "Comma-separated list or project external ids. Optional. Mutually exclusive with ProjectIds. Lock states for all available projects will be returned if ids or externalIds not specified.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.LockState" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.LockState" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.LockState" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/Projects/LockStates?projectIds=2,3" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.ProjectsClient.GetLockStates(new List{2,3}).Result;" + } + ] + } + }, + "/api/sg/v1/Projects/AcquireLocks": { + "post": { + "tags": [ + "Projects" + ], + "summary": "Acquire Locks.", + "description": "Acquires locks for given projects if they are not locked by other users.", + "requestBody": { + "description": "The list of ids of projects to lock.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.LockState" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.LockState" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.LockState" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "POST /api/sg/v1/Projects/AcquireLocks\r\n\r\n[2, 3, 4]" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.ProjectsClient.AcquireLocks(new List{2,3}).Result;" + } + ] + } + }, + "/api/sg/v1/Projects/ReleaseLocks": { + "put": { + "tags": [ + "Projects" + ], + "summary": "Release Locks", + "description": "Release locks on projects for given project ids.", + "requestBody": { + "description": "The list of ids of projects to release.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "PUT /api/sg/v1/Projects/ReleaseLocks\r\n\r\n[2, 3, 4]" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.ProjectsClient.ReleaseLocks(new List{2,3}).Wait();" + } + ] + } + }, + "/api/sg/v1/Projects/ExtendLocks": { + "post": { + "tags": [ + "Projects" + ], + "summary": "Extend Locks", + "description": "Extend locks on projects with specified ids if they are locked by current user.", + "requestBody": { + "description": "The list of ids of project to extend lock.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.LockState" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.LockState" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.LockState" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "PUT /api/sg/v1/Projects/ExtendLocks\r\n\r\n[2, 3, 4]" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.ProjectsClient.ExtendLocks(new List{2,3}).Result;" + } + ] + } + }, + "/api/sg/v1/Projects/CustomFieldValues": { + "get": { + "tags": [ + "Projects" + ], + "summary": "List Projects Custom Field Values", + "description": "Gets the list of custom field values for provided projects and custom fields ids.", + "parameters": [ + { + "name": "projectIds", + "in": "query", + "description": "Comma-separated list or project ids. Optional. Mutually exclusive with ProjectExternalIds.", + "schema": { + "type": "string" + } + }, + { + "name": "projectExternalIds", + "in": "query", + "description": "Comma-separated list or project external ids. Optional. Mutually exclusive with ProjectIds.", + "schema": { + "type": "string" + } + }, + { + "name": "customFieldIds", + "in": "query", + "description": "Ids or custom fields separated by comma.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BulkCustomFieldValue" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BulkCustomFieldValue" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BulkCustomFieldValue" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/Projects/CustomFieldValues?projectIds=2,3" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.ProjectsClient.GetCustomFieldValues(new List{2,3}, null).Result;" + } + ] + }, + "put": { + "tags": [ + "Projects" + ], + "summary": "Update Projects Custom Field Values", + "description": "Update projects custom field values specified in request body.", + "requestBody": { + "description": "The list of custom field values to update. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BulkCustomFieldValue" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BulkCustomFieldValue" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BulkCustomFieldValue" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BulkCustomFieldValue" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "PUT /api/sg/v1/Projects/CustomFieldValues\r\n\r\n[\r\n {\r\n \"value\": \"high\",\r\n \"customFieldId\": 1,\r\n \"entityIds\": [\r\n 2, 3\r\n ],\r\n \"assignmentIds\": null\r\n }\r\n]" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nvar values = new List\r\n {\r\n new BulkCustomFieldValue\r\n {\r\n EntityIds = new List\r\n {\r\n 2, 3\r\n },\r\n CustomFieldId = 1,\r\n Value = new CustomFieldValue\r\n {\r\n ValueString = \"high\"\r\n }\r\n },\r\n };\r\n\r\nsgClient.ProjectsClient.UpdateCustomFieldValues(values).Wait();" + } + ] + } + }, + "/api/sg/v1/ProjectSnapshots": { + "get": { + "tags": [ + "ProjectSnapshots" + ], + "summary": "List Project Snapshots", + "description": "Gets the list of project snapshots filtered by snapshot or project ids that the user has access to in ascending order by Id.", + "parameters": [ + { + "name": "snpashotIds", + "in": "query", + "description": "Comma separated Ids of requested snapshots. Mutually exclusive with parameter page.", + "schema": { + "type": "string" + } + }, + { + "name": "projectIds", + "in": "query", + "description": "Comma-separated list of project ids, which snapshots are requested. Optional. Mutually exclusive with ProjectExternalIds.", + "schema": { + "type": "string" + } + }, + { + "name": "projectExternalIds", + "in": "query", + "description": "Comma-separated list of project external ids, which snapshots are requested. Optional. Mutually exclusive with ProjectIds.", + "schema": { + "type": "string" + } + }, + { + "name": "snapshotTypeIds", + "in": "query", + "description": "Comma separated Ids of snapshot types.", + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "The index of page to return. Mandatory parameter if snpashotIds is not specified. Mutually exclusive with parameter snpashotIds.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "The maximum number of items to return per page. Mandatory parameter with page.", + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "The list of project snapshots.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.PagedResult`1[[SG.Api.Model.Snapshots.ProjectSnapshotSummary, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.PagedResult`1[[SG.Api.Model.Snapshots.ProjectSnapshotSummary, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.PagedResult`1[[SG.Api.Model.Snapshots.ProjectSnapshotSummary, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/ProjectSnapshots?projectIds=2,3" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.ProjectSnapshotsClient.GetProjectSnapshots(null, new List{2,3}, null, null, null).Result;" + } + ] + }, + "post": { + "tags": [ + "ProjectSnapshots" + ], + "summary": "Take Snapshot", + "description": "Take snapshot of current state of given projects.", + "requestBody": { + "description": "Snapshot create options", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Snapshots.ProjectSnapshotCreate" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Snapshots.ProjectSnapshotCreate" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Snapshots.ProjectSnapshotCreate" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Snapshots.ProjectSnapshotCreate" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "POST /api/sg/v1/ProjectSnapshots\r\n\r\n{\r\n \"projectIds\": [ 2, 3 ],\r\n \"projectExternalIds\": null,\r\n \"name\": \"Initial Snapshot\",\r\n \"snapshotTypeId\": null\r\n}\r\n" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.ProjectSnapshotsClient.CreateSnapshots(new List() { 2, 3 }, null, \"Initial Snapshot\", null).Result;" + } + ] + }, + "put": { + "tags": [ + "ProjectSnapshots" + ], + "summary": "Update Snapshot", + "description": "Update snapshot information.", + "requestBody": { + "description": "Snapshot update options.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Snapshots.ProjectSnapshotEdit" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Snapshots.ProjectSnapshotEdit" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Snapshots.ProjectSnapshotEdit" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Snapshots.ProjectSnapshotEdit" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "PUT /api/sg/v1/ProjectSnapshots\r\n\r\n{\r\n \"snapshotIds\": [ 2, 3 ],\r\n \"name\": \"Initial Snapshot\",\r\n \"snapshotTypeId\": null\r\n}\r\n" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.ProjectSnapshotsClient.UpdateSnapshots(new List() { 2, 3 }, \"Initial Snapshot\", null).Result;" + } + ] + }, + "delete": { + "tags": [ + "ProjectSnapshots" + ], + "summary": "Delete Snapshot", + "description": "Delete given snapshots.", + "parameters": [ + { + "name": "ids", + "in": "query", + "description": "Comma separated list snapshot ids to delete.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "DELETE /api/sg/v1/ProjectSnapshots?ids=2,3" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.ProjectSnapshotsClient.DeleteSnapshots(new List{ 2, 3 }).Wait();" + } + ] + } + }, + "/api/sg/v1/ProjectSnapshots/{id}": { + "get": { + "tags": [ + "ProjectSnapshots" + ], + "summary": "Get Snapshot", + "description": "Gets the project snapshot by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Id of the project snapshot.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "timeUnit", + "in": "query", + "description": "Time unit of assignment allocations aggregation. By default allocations aggregated by day.", + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.TimeUnit" + } + }, + { + "name": "dataUnit", + "in": "query", + "description": "Data unit of assignment allocations. By default allocations provided in hours.", + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.DataUnit" + } + }, + { + "name": "compressed", + "in": "query", + "description": "Compress assignment allocations array if set to true.", + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Snapshots.ProjectSnapshot" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Snapshots.ProjectSnapshot" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Snapshots.ProjectSnapshot" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/ProjectSnapshots/2?timeUnit=Month&DataUnit=Time&compressed=false" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.ProjectSnapshotsClient.GetProjectSnapshot(1, TimeUnit.Day, DataUnit.Time, false).Result;" + } + ] + } + }, + "/api/sg/v1/ProjectSnapshots/Restore/{id}": { + "post": { + "tags": [ + "ProjectSnapshots" + ], + "summary": "Restore Snapshot", + "description": "Restores the project snapshot by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Id of the project snapshot.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "projectId", + "in": "query", + "description": "Id of the project to restore.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "snapshotAreas", + "in": "query", + "description": "Snapshot areas to restore. The possible area values are as follows: Attributes, PlannedAllocationAllocations, PlannedDemandAllocations, ActualAllocationAllocations, ActualDemandAllocations, ScheduleAllocations, Team, Financials, Milestones", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "POST /api/sg/v1/ProjectSnapshots/restore/5?projectId=88&snapshotAreas=AllocationAllocations,Attributes" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.ProjectSnapshotsClient.RestoreProjectSnapshot(5, 8, new List\r\n {\r\n RestoreSnapshotArea.AllocationAllocations,\r\n RestoreSnapshotArea.Attributes,\r\n }).Result;" + } + ] + } + }, + "/api/sg/v1/Reports": { + "get": { + "tags": [ + "Reports" + ], + "summary": "List Reports", + "parameters": [ + { + "name": "name", + "in": "query", + "description": "Name of the report to filter. Optional parameter.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.Report" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.Report" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.Report" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/Reports?name=Monthly%20Sales%20Report" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.ReportsClient.GetReports(\"Monthly Sales Report\").Result;" + } + ] + } + }, + "/api/sg/v1/Reports/RetrieveData": { + "get": { + "tags": [ + "Reports" + ], + "summary": "Retrieve Data", + "description": "Returns report data for the queued report item. It may take some time to prepare the data after requesting PrepareData method.", + "parameters": [ + { + "name": "queueItemId", + "in": "query", + "description": "Id of the queue item from PrepareData method.", + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/sg/v1/Reports/PrepareData": { + "post": { + "tags": [ + "Reports" + ], + "summary": "Prepare Data", + "description": "Adds the report in queue to prepare data for retrieval.", + "parameters": [ + { + "name": "reportId", + "in": "query", + "description": "The id of the report.", + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.ReportDownloadQueueItem" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.ReportDownloadQueueItem" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.ReportDownloadQueueItem" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "POST /api/sg/v1/Reports/PrepareData?reportId=45" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.ReportsClient.PrepareData(45).Result;" + } + ] + } + }, + "/api/sg/v1/Reports/QueueItems": { + "get": { + "tags": [ + "Reports" + ], + "summary": "Queue Items", + "description": "Lists current items in queue.", + "parameters": [ + { + "name": "page", + "in": "query", + "description": "The number of the page.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "The size of the page.", + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.PagedResult`1[[SG.Api.Model.ReportDownloadQueueItem, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.PagedResult`1[[SG.Api.Model.ReportDownloadQueueItem, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.PagedResult`1[[SG.Api.Model.ReportDownloadQueueItem, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + } + } + } + } + } + }, + "/api/sg/v1/ResourceAccessRules": { + "get": { + "tags": [ + "ResourceAccessRules" + ], + "summary": "List Project Access Rules", + "description": "Gets the list of ruless.", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ResourcePermissionRule" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ResourcePermissionRule" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ResourcePermissionRule" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/ResourceAccessRules" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.ResourceAccessRulesClient.GetResourceAccessRules().Result;" + } + ] + }, + "post": { + "tags": [ + "ResourceAccessRules" + ], + "summary": "Create Resource Access Rules", + "description": "Create new rules with values provided in request body.", + "requestBody": { + "description": "The list of rules to create. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ResourcePermissionRuleEdit" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ResourcePermissionRuleEdit" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ResourcePermissionRuleEdit" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ResourcePermissionRuleEdit" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.PermissionRuleEditResult" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.PermissionRuleEditResult" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.PermissionRuleEditResult" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "POST /api/sg/v1/ResourceAccessRules\r\n\r\n[\r\n {\r\n \"id\": null,\r\n \"actorIds\": [\r\n 956\r\n ],\r\n \"actorSecurityGroupIds\": [],\r\n \"actorGlobalRoleIds\": [],\r\n \"acteeIds\": [],\r\n \"acteeSecurityGroupIds\": [],\r\n \"acteeGlobalRoleIds\": [],\r\n \"resourceRoleId\": 4,\r\n \"allowOverride\": false\r\n },\r\n {\r\n \"id\": null,\r\n \"actorIds\": [\r\n 1169\r\n ],\r\n \"actorSecurityGroupIds\": [],\r\n \"actorGlobalRoleIds\": [],\r\n \"acteeIds\": [],\r\n \"acteeSecurityGroupIds\": [],\r\n \"acteeGlobalRoleIds\": [],\r\n \"resourceRoleId\": 2,\r\n \"allowOverride\": false\r\n },\r\n {\r\n \"id\": null,\r\n \"actorIds\": [\r\n 137\r\n ],\r\n \"actorSecurityGroupIds\": [],\r\n \"actorGlobalRoleIds\": [],\r\n \"acteeIds\": [],\r\n \"acteeSecurityGroupIds\": [],\r\n \"acteeGlobalRoleIds\": [],\r\n \"resourceRoleId\": 9,\r\n \"allowOverride\": false\r\n }\r\n]" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\n\r\nvar rules = new List\r\n{\r\n new ResourcePermissionRuleEdit\r\n {\r\n ResourceRoleId = 7,\r\n ActorIds = new List{ 34, 37 },\r\n ActorGlobalRoleIds = new List(),\r\n ActorSecurityGroupIds = new List(),\r\n ActeeIds = new List(),\r\n ActeeGlobalRoleIds = new List(),\r\n ActeeSecurityGroupIds = new List(),\r\n },\r\n new ResourcePermissionRuleEdit\r\n {\r\n ResourceRoleId = 4,\r\n ActorIds = new List{ 34, 37 },\r\n ActorGlobalRoleIds = new List(),\r\n ActorSecurityGroupIds = new List(),\r\n ActeeIds = new List(),\r\n ActeeGlobalRoleIds = new List(),\r\n ActeeSecurityGroupIds = new List{ 6, 17 },\r\n }\r\n};\r\n\r\nsgClient.ResourceAccessRulesClient.CreateResourceAccessRules(rules).Result;" + } + ] + }, + "put": { + "tags": [ + "ResourceAccessRules" + ], + "summary": "Update Resource Access Rules", + "description": "Update new rules with values provided in request body.", + "requestBody": { + "description": "The list of rules to update. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ResourcePermissionRuleEdit" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ResourcePermissionRuleEdit" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ResourcePermissionRuleEdit" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ResourcePermissionRuleEdit" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "PUT /api/sg/v1/ResourceAccessRules\r\n\r\n[\r\n {\r\n \"id\": 17,\r\n \"actorIds\": [],\r\n \"actorSecurityGroupIds\": [\r\n 20\r\n ],\r\n \"actorGlobalRoleIds\": [],\r\n \"acteeIds\": [],\r\n \"acteeSecurityGroupIds\": [],\r\n \"acteeGlobalRoleIds\": [],\r\n \"resourceRoleId\": 2,\r\n \"allowOverride\": false\r\n },\r\n {\r\n \"id\": 27,\r\n \"actorIds\": [\r\n 140\r\n ],\r\n \"actorSecurityGroupIds\": [],\r\n \"actorGlobalRoleIds\": [],\r\n \"acteeIds\": [],\r\n \"acteeSecurityGroupIds\": [],\r\n \"acteeGlobalRoleIds\": [],\r\n \"resourceRoleId\": 2,\r\n \"allowOverride\": false\r\n },\r\n {\r\n \"id\": 28,\r\n \"actorIds\": [\r\n 956\r\n ],\r\n \"actorSecurityGroupIds\": [],\r\n \"actorGlobalRoleIds\": [],\r\n \"acteeIds\": [],\r\n \"acteeSecurityGroupIds\": [],\r\n \"acteeGlobalRoleIds\": [],\r\n \"resourceRoleId\": 4,\r\n \"allowOverride\": false\r\n },\r\n {\r\n \"id\": 35,\r\n \"actorIds\": [\r\n 1169\r\n ],\r\n \"actorSecurityGroupIds\": [],\r\n \"actorGlobalRoleIds\": [],\r\n \"acteeIds\": [],\r\n \"acteeSecurityGroupIds\": [],\r\n \"acteeGlobalRoleIds\": [],\r\n \"resourceRoleId\": 2,\r\n \"allowOverride\": false\r\n },\r\n {\r\n \"id\": 38,\r\n \"actorIds\": [\r\n 137\r\n ],\r\n \"actorSecurityGroupIds\": [],\r\n \"actorGlobalRoleIds\": [],\r\n \"acteeIds\": [],\r\n \"acteeSecurityGroupIds\": [],\r\n \"acteeGlobalRoleIds\": [],\r\n \"resourceRoleId\": 9,\r\n \"allowOverride\": false\r\n }\r\n]" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\n\r\nvar rules = new List\r\n{\r\n new ResourcePermissionRuleEdit\r\n {\r\n Id = 5,\r\n ResourceRoleId = 7,\r\n ActorIds = new List{ 34, 37 },\r\n ActorGlobalRoleIds = new List(),\r\n ActorSecurityGroupIds = new List(),\r\n ActeeIds = new List(),\r\n ActeeGlobalRoleIds = new List(),\r\n ActeeSecurityGroupIds = new List(),\r\n },\r\n new ResourcePermissionRuleEdit\r\n {\r\n Id = 8,\r\n ResourceRoleId = 4,\r\n ActorIds = new List{ 34, 37 },\r\n ActorGlobalRoleIds = new List(),\r\n ActorSecurityGroupIds = new List(),\r\n ActeeIds = new List(),\r\n ActeeGlobalRoleIds = new List(),\r\n ActeeSecurityGroupIds = new List{ 6, 17 },\r\n }\r\n};\r\n\r\nsgClient.ResourceAccessRulesClient.UpdateResourceAccessRules(rules).Result;" + } + ] + }, + "delete": { + "tags": [ + "ResourceAccessRules" + ], + "summary": "Delete Resource Access Rules", + "parameters": [ + { + "name": "ids", + "in": "query", + "description": "Comma separated list of ids of rules to delete. Has a limit of 5000 entities in a single call.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "DELETE /api/sg/v1/ResourceAccessRules?ids=3,4" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.ResourceAccessRulesClient.DeleteResourceAccessRules(new List{ 2, 6 }).Result;" + } + ] + } + }, + "/api/sg/v1/ResourceAccessRules/{id}": { + "get": { + "tags": [ + "ResourceAccessRules" + ], + "summary": "Get Resource Access Rule", + "description": "Gets the rule by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Id of the rule.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.ResourcePermissionRule" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.ResourcePermissionRule" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.ResourcePermissionRule" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/ResourceAccessRules/2" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.ResourceAccessRulesClient.GetResourceAccessRule(2).Result;" + } + ] + } + }, + "/api/sg/v1/ResourceRequests/{id}": { + "get": { + "tags": [ + "ResourceRequests" + ], + "summary": "Get Resource Request", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Id of the resource request.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.ResourceRequest" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.ResourceRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.ResourceRequest" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/resourceRequests/1" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.ResourceRequestClient.GetResourceRequest(1).Result;" + } + ] + } + }, + "/api/sg/v1/ResourceRequests": { + "get": { + "tags": [ + "ResourceRequests" + ], + "summary": "List Resource Requests", + "parameters": [ + { + "name": "assignmentIds", + "in": "query", + "description": "Comma separated list of assignment ids.", + "schema": { + "type": "string" + } + }, + { + "name": "resourceIds", + "in": "query", + "description": "Comma separated list of resource ids.", + "schema": { + "type": "string" + } + }, + { + "name": "ownerIds", + "in": "query", + "description": "Comma separated list of owner resource ids.", + "schema": { + "type": "string" + } + }, + { + "name": "projectIds", + "in": "query", + "description": "Comma separated list of project ids.", + "schema": { + "type": "string" + } + }, + { + "name": "ownedRequestsOnly", + "in": "query", + "description": "Define if only owned requests should be returned for manager.", + "schema": { + "type": "boolean", + "default": true + } + }, + { + "name": "page", + "in": "query", + "description": "The index of page to return. Mandatory parameter.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "The maximum number of items to return per page. Mandatory parameter if page specified.", + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.PagedResult`1[[SG.Api.Model.ResourceRequest, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.PagedResult`1[[SG.Api.Model.ResourceRequest, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.PagedResult`1[[SG.Api.Model.ResourceRequest, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/resourceRequests?page=1&pageSize=100&ownerIds=165&projectIds=59,64&ownedRequestsOnly=true" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.ResourceRequestClient.GetResourceRequests(null, null, null, true, 1, 100).Result;" + } + ] + } + }, + "/api/sg/v1/ResourceRequests/Approve": { + "put": { + "tags": [ + "ResourceRequests" + ], + "summary": "Approve Resource Request", + "requestBody": { + "description": "Resource requests to approve.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.ApproveResourceRequest" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.ApproveResourceRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.ApproveResourceRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.ApproveResourceRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "PUT /api/sg/v1/resourceRequests/approve\r\n\r\n{\r\n \"ResourceRequests\": [\r\n {\r\n \"Id\": 5,\r\n \"StartDate\": \"2015-07-10T00:00:00Z\",\r\n \"EndDate\": \"2015-07-12T00:00:00Z\",\r\n \"RequestedAllocations\": [\r\n 1.5,\r\n 1.5\r\n ],\r\n \"AdditionalAllocations\": [\r\n {\r\n \"ResourceId\": 5,\r\n \"Allocations\": [\r\n 1.5,\r\n 1.5\r\n ]\r\n }\r\n ]\r\n \r\n }\r\n ],\r\n \"DominantUnit\": \"Time\",\r\n \"TimeUnit\": \"Day\"\r\n}" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\n\r\nvar resourceRequest = new ResourceRequestEdit\r\n{\r\n Id = 10,\r\n StartDate = new DateTime(2020, 5, 15),\r\n EndDate = new DateTime(2020, 5, 18),\r\n ApprovedAllocations = new[] { 3.2, 2.2, 1.5 },\r\n AdditionalAllocations = new List\r\n {\r\n new ResourceApprovedAllocations\r\n {\r\n Allocations = new[]{1.5, 2.0, 2.5},\r\n ResourceId = 5\r\n }\r\n }\r\n};\r\n\r\nsgClient.ResourceRequestClient.ApproveResourceRequests(new List { resourceRequest }, DominantUnit.Time, TimeUnit.Day).Wait();" + } + ] + } + }, + "/api/sg/v1/ResourceRequests/Reject": { + "put": { + "tags": [ + "ResourceRequests" + ], + "summary": "Reject Resource Request", + "requestBody": { + "description": "Resource requests to reject.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.RejectResourceRequest" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.RejectResourceRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.RejectResourceRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.RejectResourceRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "PUT /api/sg/v1/resourceRequests/reject\r\n\r\n{\r\n\t\"ResourceRequestIds\" : [5],\r\n\t\"ClearAllocations\" : false\r\n}" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.ResourceRequestClient.RejectResourceRequests(new List { 1,2 }, false).Wait();" + } + ] + } + }, + "/api/sg/v1/ResourceRequests/Delegate": { + "put": { + "tags": [ + "ResourceRequests" + ], + "summary": "Delegate Resource Request", + "requestBody": { + "description": "Requests to delegate.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.DelegateResourceRequest" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.DelegateResourceRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.DelegateResourceRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.DelegateResourceRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "PUT /api/sg/v1/resourceRequests/delegate\r\n\r\n{\r\n\t\"ResourceRequestIds\" : [5],\r\n\t\"DelegatedToResourceId\" : 22\r\n}" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.ResourceRequestClient.DelegateResourceRequests(new List { 4,5 }, 10).Wait();" + } + ] + } + }, + "/api/sg/v1/Resources": { + "get": { + "tags": [ + "Resources" + ], + "summary": "List Resources", + "description": "Gets the list of resources that the user has access to in ascending order by Id.", + "parameters": [ + { + "name": "ids", + "in": "query", + "description": "Comma separated ids of the resources. Mandatory parameter if page and externalIds are not specified. Mutually exclusive with page and externalIds parameters.", + "schema": { + "type": "string" + } + }, + { + "name": "externalIds", + "in": "query", + "description": "Comma separated external ids of the resources. Mandatory parameter if page and ids are not specified. Mutually exclusive with page and ids parameters.", + "schema": { + "type": "string" + } + }, + { + "name": "name", + "in": "query", + "description": "Optional filter parameter to find resources by name.", + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "The index of page to return. Mandatory parameter if ids and externalIds are not specified. Mutually exclusive with parameter ids.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "The maximum number of items to return per page. Mandatory parameter with page.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "modifiedLaterThan", + "in": "query", + "description": "Optional filter parameter to find resources that have been modified later than given timestamp. Mutually exclusive with ids and name parameter. Timestamp format 2018-04-20T18:30:00.", + "schema": { + "type": "string", + "format": "date-time" + } + } + ], + "responses": { + "200": { + "description": "The list of available resources.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.PagedResult`1[[SG.Api.Model.Resource, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.PagedResult`1[[SG.Api.Model.Resource, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.PagedResult`1[[SG.Api.Model.Resource, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/Resources?name=mike" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.ResourcesClient.GetResources(null, \"mike\", null, null).Result;" + } + ] + }, + "post": { + "tags": [ + "Resources" + ], + "summary": "Create Resources", + "description": "Create new resources with values provided in request body.", + "requestBody": { + "description": "The list of resourcess to create. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ResourceEdit" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ResourceEdit" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ResourceEdit" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ResourceEdit" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "POST /api/sg/v1/Resources\r\n\r\n[\r\n {\r\n \"id\": null,\r\n \"name\": \"new resource\",\r\n \"globalRoleId\": 2,\r\n \"updateGlobalRole\": true,\r\n \"defaultRate\": 100.0,\r\n \"updateDefaultRate\": true,\r\n \"securityGroupId\": 4,\r\n \"updateSecurityGroup\": true,\r\n \"isEnabled\" : true,\r\n \"isTimesheetUser\" : false,\r\n \"isSsoEnabled\" : false\r\n }\r\n]" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nvar resourcesToCreate = new List{ \r\n\t\t\t\tnew ResourceEdit\r\n {\r\n Name = \"new resource\",\r\n SecurityGroupId = 4,\r\n UpdateSecurityGroup = true,\r\n DefaultRate = 100.0,\r\n UpdateDefaultRate = true,\r\n GlobalRoleId = 2,\r\n UpdateGlobalRole = true,\r\n IsEnabled = true,\r\n IsTimesheetUser = false,\r\n IsSsoEnabled = false\r\n }};\r\n\r\nsgClient.ResourcesClient.CreateResources(resourcesToCreate).Result;" + } + ] + }, + "put": { + "tags": [ + "Resources" + ], + "summary": "Update Resources", + "description": "Update the list of existing resources with values provided in request body.", + "requestBody": { + "description": "The list of resources to update. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ResourceEdit" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ResourceEdit" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ResourceEdit" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ResourceEdit" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "PUT /api/sg/v1/Resources\r\n\r\n[\r\n {\r\n \"id\": 2,\r\n \"name\": \"new resource\",\r\n \"globalRoleId\": 2,\r\n \"updateGlobalRole\": true,\r\n \"defaultRate\": null,\r\n \"updateDefaultRate\": false,\r\n \"securityGroupId\": 4,\r\n \"updateSecurityGroup\": true,\r\n \"isEnabled\" : true,\r\n \"isTimesheetUser\" : false,\r\n \"isSsoEnabled\" : false,\r\n \"updateAdvancedRate\": true,\r\n \"advancedRate\": [\r\n {\r\n \"startDate\": \"1904-01-01T00:00:00Z\",\r\n \"rate\": 10\r\n },\r\n {\r\n \"startDate\": \"2023-04-02T00:00:00Z\",\r\n \"rate\": 33\r\n }\r\n ]\r\n }\r\n]" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nvar resourcesToUpdate = new List{ \r\n\t\t\t\tnew ResourceEdit\r\n {\r\n \tId = 2,\r\n Name = \"new resource\",\r\n SecurityGroupId = 4,\r\n UpdateSecurityGroup = true,\r\n DefaultRate = null,\r\n UpdateDefaultRate = false,\r\n GlobalRoleId = 2,\r\n UpdateGlobalRole = true,\r\n IsEnabled = true,\r\n IsTimesheetUser = false,\r\n IsSsoEnabled = false,\r\n UpdateAdvancedRate = true,\r\n AdvancedRate = new List {\r\n new AdvancedRate {\r\n StartDate = new DateTime(1904, 1, 1),\r\n Rate = 10,\r\n },\r\n new AdvancedRate {\r\n StartDate = new DateTime(2023, 4, 2),\r\n Rate = 33,\r\n },\r\n },\r\n }};\r\n\r\nsgClient.ResourcesClient.UpdateResources(resourcesToUpdate).Wait();" + } + ] + }, + "delete": { + "tags": [ + "Resources" + ], + "summary": "Delete Resources", + "description": "Delete resources with given ids.", + "parameters": [ + { + "name": "ids", + "in": "query", + "description": "Comma separated list of ids of resources to delete. Optional. Mutually exclusive with ExternalIds. Has a limit of 5000 entities in a single call.", + "schema": { + "type": "string" + } + }, + { + "name": "externalIds", + "in": "query", + "description": "Comma separated list of external ids of resources to delete. Optional. Mutually exclusive with Ids. Has a limit of 5000 entities in a single call.", + "schema": { + "type": "string" + } + }, + { + "name": "reassignTasksTo", + "in": "query", + "description": "The id of resource, all deleted tasks will be reassigned to. Tasks will be deleted if id is not specified.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "transferResourceRequestsTo", + "in": "query", + "description": "The id of resource manager, all pending resource requests of deleted managers will be reassigned to. Needs to be specified if resource manager is deleted.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "transferTimesheetApprovementTo", + "in": "query", + "description": "The id of timesheet approver, all timesheets of deleted approvrs will be reassigned to. Needs to be specified if timesheet approver is deleted.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "reassignProjectBoardsTo", + "in": "query", + "description": "The ids of project board owner, all boards for deleted resource will be reassigned to. Project board will be deleted if id is not specified.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "reassignRoadmapsTo", + "in": "query", + "description": "The ids of roadmap owner, all roadmaps for deleted resource will be reassigned to. Roadmap will be deleted if id is not specified.", + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "DELETE /api/sg/v1/Resources?ids=2,3&reassignTasksTo=4&transferResourceRequestsTo=4&transferTimesheetApprovementTo=4" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.ResourcesClient.Delete(new List{2,3}, 4, 4).Wait();" + } + ] + } + }, + "/api/sg/v1/Resources/{id}": { + "get": { + "tags": [ + "Resources" + ], + "summary": "Get Resource", + "description": "Gets the resource by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Id of the resource.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Resource" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Resource" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Resource" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/Resources/3" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.ResourcesClient.GetResource(3).Result;" + } + ] + } + }, + "/api/sg/v1/Resources/Identity": { + "get": { + "tags": [ + "Resources" + ], + "summary": "Get Identity", + "description": "Gets the resource using the API.", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Resource" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Resource" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Resource" + } + } + } + } + } + } + }, + "/api/sg/v1/Resources/CheckNameExist": { + "get": { + "tags": [ + "Resources" + ], + "summary": "Check Name Exists", + "description": "Check if the name is assigned to any resource.", + "parameters": [ + { + "name": "name", + "in": "query", + "description": "Name of the resource.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "boolean" + } + }, + "text/plain": { + "schema": { + "type": "boolean" + } + }, + "text/json": { + "schema": { + "type": "boolean" + } + } + } + } + } + } + }, + "/api/sg/v1/Resources/CheckExternalIdExist": { + "get": { + "tags": [ + "Resources" + ], + "summary": "Check External Id Exists", + "description": "Check if the external id is assigned to any resource.", + "parameters": [ + { + "name": "externalId", + "in": "query", + "description": "External id of the resource.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "boolean" + } + }, + "text/plain": { + "schema": { + "type": "boolean" + } + }, + "text/json": { + "schema": { + "type": "boolean" + } + } + } + } + } + } + }, + "/api/sg/v1/Resources/Teams": { + "put": { + "tags": [ + "Resources" + ], + "summary": "Update Resource Teams", + "description": "Update the list of existing resource teams with values provided in request body.", + "parameters": [ + { + "name": "merge", + "in": "query", + "description": "If True, resource teams will be merged with existing ones, starting from the start date. If False, they will replace the existing ones.", + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "timeUnit", + "in": "query", + "description": "Resource team time unit.", + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.TimeUnit" + } + }, + { + "name": "compressed", + "in": "query", + "description": "True if compressed values sent, otherwise False.", + "schema": { + "type": "boolean", + "default": true + } + } + ], + "requestBody": { + "description": "The list of resource teams to update. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ResourceTeamEdit" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ResourceTeamEdit" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ResourceTeamEdit" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ResourceTeamEdit" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "PUT /api/sg/v1/Resources/Teams?merge=false&compressed=false&timeUnit=Day\r\n\r\n[\r\n {\r\n \"resourceId\": 2,\r\n \"startDate\": \"2024-12-01T06:57:08Z\",\r\n \"endDate\": \"2024-12-07T06:57:08Z\",\r\n \"capacitiesStoryPoints\": [\r\n 8, 8, 8, 8, 8\r\n ],\r\n \"resourceTeamMembers\": [\r\n {\r\n \"resourceId\": 3,\r\n \"capacitiesPercent\": [\r\n 100, 100, 50, 50, 50\r\n ]\r\n }\r\n ]\r\n }\r\n]" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nvar teams = new List\r\n {\r\n new ResourceTeamEdit\r\n {\r\n ResourceId = 2,\r\n StartDate = new DateTime(2024, 12, 1),\r\n EndDate = new DateTime(2024, 12, 7),\r\n CapacitiesStoryPoints = new double[] {50,50,50,50,50},\r\n ResourceTeamMembers = new List\r\n {\r\n new ResourceTeamMemberCapacity\r\n {\r\n ResourceId = 3,\r\n CapacitiesPercent = new double[] {100,100,50,50,50}\r\n }\r\n },\r\n },\r\n };\r\n\r\nsgClient.ResourcesClient.UpdateTeams(teams, false, TimeUnit.Day, false).Wait();" + } + ] + }, + "get": { + "tags": [ + "Resources" + ], + "summary": "List Resource Teams", + "description": "Lists the list of resource teams in requested data unit and time unit.", + "parameters": [ + { + "name": "resourceIds", + "in": "query", + "description": "Comma separated ids of the resources. Mandatory parameter if page and resourceExternalIds are not specified. Mutually exclusive with parameters page and resourceExternalIds.", + "schema": { + "type": "string" + } + }, + { + "name": "resourceExternalIds", + "in": "query", + "description": "Comma-separated list or resource external ids. Mandatory parameter if page and resourceIds are not specified. Mutually exclusive with parameters page and resourceIds.", + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "The index of page to return. Mandatory parameter if resource ids is not specified. Mutually exclusive with parameter resource ids.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "The maximum number of items to return per page. Mandatory parameter with page.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "timeUnit", + "in": "query", + "description": "The time unit of requested resource teams. By default resource teams provided by day.", + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.TimeUnit" + } + }, + { + "name": "compressed", + "in": "query", + "description": "True if response needs to be compressed, otherwise False.", + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "The list of detailed resource teams for requested resources ids.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.PagedResult`1[[SG.Api.Model.ResourceTeam, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.PagedResult`1[[SG.Api.Model.ResourceTeam, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.PagedResult`1[[SG.Api.Model.ResourceTeam, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/Resources/Teams?resourceIds=2,3&timeUnit=Month&compressed=false" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.ResourcesClient.GetTeams(new List{2,3}, null, null, null, TimeUnit.Month, false).Result;" + } + ] + } + }, + "/api/sg/v1/Resources/AutoCalculatedRates": { + "get": { + "tags": [ + "Resources" + ], + "summary": "List Resource Team Auto Calculated Rates", + "description": "Gets the list of resource team auto calculated rates.", + "parameters": [ + { + "name": "resourceIds", + "in": "query", + "description": "Comma separated ids of the resources. Mandatory parameter if page and resourceExternalIds are not specified. Mutually exclusive with parameters page and resourceExternalIds.", + "schema": { + "type": "string" + } + }, + { + "name": "resourceExternalIds", + "in": "query", + "description": "Comma-separated list or resource external ids. Mandatory parameter if page and resourceIds are not specified. Mutually exclusive with parameters page and resourceIds.", + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "The index of page to return. Mandatory parameter if resource ids is not specified. Mutually exclusive with parameter resource ids.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "The maximum number of items to return per page. Mandatory parameter with page.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "compressed", + "in": "query", + "description": "True if response needs to be compressed, otherwise False.", + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "The list of detailed resource team auto calculated rates for requested resources ids.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.PagedResult`1[[SG.Api.Model.ResourceTeamAutoCalculatedRate, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.PagedResult`1[[SG.Api.Model.ResourceTeamAutoCalculatedRate, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.PagedResult`1[[SG.Api.Model.ResourceTeamAutoCalculatedRate, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/Resources/AutoCalculatedRates?resourceIds=2,3" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.ResourcesClient.GetAutoCalculatedRates(new List{2,3}).Result;" + } + ] + } + }, + "/api/sg/v1/Resources/Clone/{id}": { + "post": { + "tags": [ + "Resources" + ], + "summary": "Clone Resource", + "description": "Clone resource with given id.", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Id of the resource to clone.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "name", + "in": "query", + "description": "The name of cloned resource.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "integer", + "format": "int32" + } + }, + "text/plain": { + "schema": { + "type": "integer", + "format": "int32" + } + }, + "text/json": { + "schema": { + "type": "integer", + "format": "int32" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "POST /api/sg/v1/Resources/Clone/2?name=new resource name" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.ResourcesClient.CloneResource(2, \"new resource name\").Result;" + } + ] + } + }, + "/api/sg/v1/Resources/Capacities": { + "get": { + "tags": [ + "Resources" + ], + "summary": "List Resource Capacities", + "description": "Gets the list of resource capacities in requested data unit and time unit.", + "parameters": [ + { + "name": "resourceIds", + "in": "query", + "description": "Comma separated ids of the resources. Mandatory parameter if page and resourceExternalIds are not specified. Mutually exclusive with parameters page and resourceExternalIds.", + "schema": { + "type": "string" + } + }, + { + "name": "resourceExternalIds", + "in": "query", + "description": "Comma-separated list or resource external ids. Mandatory parameter if page and resourceIds are not specified. Mutually exclusive with parameters page and resourceIds.", + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "The index of page to return. Mandatory parameter if resource ids is not specified. Mutually exclusive with parameter resource ids.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "The maximum number of items to return per page. Mandatory parameter with page.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "capacityType", + "in": "query", + "description": "Capacity type to provide. By default net capacity will be provided.", + "schema": { + "type": "string" + } + }, + { + "name": "timeUnit", + "in": "query", + "description": "The time unit of requested capacities. By default capacities provided by day.", + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.TimeUnit" + } + }, + { + "name": "compressed", + "in": "query", + "description": "True if response needs to be compressed, otherwise False.", + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "The list of detailed capacitys for requested resources ids.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.PagedAllocationsResult`1[[SG.Api.Model.ResourceCapacity, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.PagedAllocationsResult`1[[SG.Api.Model.ResourceCapacity, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.PagedAllocationsResult`1[[SG.Api.Model.ResourceCapacity, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/Resources/Capacities?resourceIds=2,3&capacityType=Net,Base&timeUnit=Month&compressed=false" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.ResourcesClient.GetCapacities(new List{2,3}, null, null, new List{CapacityType.Net}, TimeUnit.Month, false).Result;" + } + ] + }, + "put": { + "tags": [ + "Resources" + ], + "summary": "Update Resource Capacities", + "description": "Update resources capacities with the values provided in request body.", + "parameters": [ + { + "name": "adminTimeUnit", + "in": "query", + "description": "The data unit of admin time values. Needs to be specified if at least one admin time specified.", + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.DominantUnit" + } + }, + { + "name": "compressed", + "in": "query", + "description": "True if compressed values sent, otherwise False.", + "schema": { + "type": "boolean", + "default": true + } + }, + { + "name": "merge", + "in": "query", + "description": "If True, capacity, calendar and admin times will be merged with existing ones, starting from the start date. If False, they will replace the existing ones.", + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "timeUnit", + "in": "query", + "description": "Capacity time unit.", + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.TimeUnit" + } + } + ], + "requestBody": { + "description": "The list of capacities to update. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BulkCapacityEdit" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BulkCapacityEdit" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BulkCapacityEdit" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BulkCapacityEdit" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "PUT /api/sg/v1/Resources/Capacities?adminTimeUnit=Time&compressed=false&timeUnit=Day\r\n\r\n[\r\n {\r\n \"resourceIds\": [\r\n 2\r\n ],\r\n \"capacity\": {\r\n \"startDate\": \"2017-08-11T06:57:08Z\",\r\n \"endDate\": \"2017-08-17T06:57:08Z\",\r\n \"demandPlanning\": false,\r\n \"baseCapacityHours\": [\r\n 8, 8, 8, 8, 8\r\n ],\r\n \"baseCapacityFte\": [\r\n 1, 1, 1, 1, 1\r\n ],\r\n \"calendarsIds\": [\r\n 4\r\n ],\r\n \"adminTimes\": [\r\n {\r\n \"id\": 1,\r\n \"hoursData\": [\r\n 1, 1, 1, 1, 1\r\n ]\r\n }\r\n ]\r\n }\r\n }\r\n]" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nvar capacities = new List\r\n {\r\n new BulkCapacityEdit\r\n {\r\n ResourceIds = new List\r\n {\r\n 2\r\n },\r\n Capacity = new CapacityEdit\r\n {\r\n StartDate = new DateTime(2017, 8, 11),\r\n EndDate = new DateTime(2017, 8, 17),\r\n BaseCapacityHours = new double[] {8,8,8,8,8},\r\n BaseCapacityFte = new double[] {1,1,1,1,1},\r\n CalendarsIds = new List\r\n {\r\n 4\r\n },\r\n DemandPlanning = false,\r\n AdminTimes = new List\r\n {\r\n new AdminTimeEdit\r\n {\r\n Id = 1,\r\n HoursData = new double[] {1,1,1,1,1}\r\n }\r\n }\r\n }\r\n },\r\n };\r\n\r\nsgClient.ResourcesClient.UpdateCapacities(capacities, DominantUnit.Time, false, TimeUnit.Day).Wait();" + } + ] + } + }, + "/api/sg/v1/Resources/CustomFieldValues": { + "get": { + "tags": [ + "Resources" + ], + "summary": "List Resources Custom Field Values", + "description": "Gets the list of custom field values for provided resources and custom fields ids.", + "parameters": [ + { + "name": "resourceIds", + "in": "query", + "description": "Comma-separated list or resource ids. Optional. Mutually exclusive with ResourceExternalIds.", + "schema": { + "type": "string" + } + }, + { + "name": "resourceExternalIds", + "in": "query", + "description": "Comma-separated list or resource external ids. Optional. Mutually exclusive with ResourceIds.", + "schema": { + "type": "string" + } + }, + { + "name": "customFieldIds", + "in": "query", + "description": "Ids or custom fields separated by comma.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BulkCustomFieldValue" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BulkCustomFieldValue" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BulkCustomFieldValue" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/Resources/CustomFieldValues?resourceIds=2,3" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.ResourcesClient.GetCustomFieldValues(new List{2,3}, null).Result;" + } + ] + }, + "put": { + "tags": [ + "Resources" + ], + "summary": "Update Resources Custom Field Values", + "description": "Update resources custom field values specified in request body.", + "requestBody": { + "description": "The list of custom field values to update. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BulkCustomFieldValue" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BulkCustomFieldValue" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BulkCustomFieldValue" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BulkCustomFieldValue" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "PUT /api/sg/v1/Resources/CustomFieldValues\r\n\r\n[\r\n {\r\n \"value\": \"high\",\r\n \"customFieldId\": 1,\r\n \"entityIds\": [\r\n 2, 3\r\n ],\r\n \"assignmentIds\": null\r\n }\r\n]" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nvar values = new List\r\n {\r\n new BulkCustomFieldValue\r\n {\r\n EntityIds = new List\r\n {\r\n 2, 3\r\n },\r\n CustomFieldId = 1,\r\n Value = new CustomFieldValue\r\n {\r\n ValueString = \"high\"\r\n }\r\n },\r\n };\r\n\r\nsgClient.ResourcesClient.UpdateCustomFieldValues(values).Wait();" + } + ] + } + }, + "/api/sg/v1/Resources/SkillValues": { + "get": { + "tags": [ + "Resources" + ], + "summary": "List Resources Skill Values", + "description": "Gets the list of skill values for provided resources.", + "parameters": [ + { + "name": "resourceIds", + "in": "query", + "description": "Comma-separated list or resource ids. Optional. Mutually exclusive with ResourceExternalIds.", + "schema": { + "type": "string" + } + }, + { + "name": "resourceExternalIds", + "in": "query", + "description": "Comma-separated list or resource external ids. Optional. Mutually exclusive with ResourceIds.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BulkSkillValue" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BulkSkillValue" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BulkSkillValue" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/Resources/SkillValues?resourceIds=2,3" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.ResourcesClient.GetSkillValues(new List{2,3}, null).Result;" + } + ] + }, + "put": { + "tags": [ + "Resources" + ], + "summary": "Update Resources Skill Values", + "description": "Update resources skill values specified in request body.", + "requestBody": { + "description": "The list of skill values to update. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BulkSkillValue" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BulkSkillValue" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BulkSkillValue" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BulkSkillValue" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "PUT /api/sg/v1/Resources/SkillValues\r\n\r\n[\r\n {\r\n \"resourceIds\": [\r\n 2, 5\r\n ],\r\n \"skillId\": 7,\r\n \"value\": 8.0\r\n },\r\n {\r\n \"resourceIds\": [\r\n 2\r\n ],\r\n \"skillId\": 8,\r\n \"value\": 7.0\r\n }\r\n]" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nvar values = new List\r\n {\r\n new BulkSkillValue\r\n {\r\n ResourceIds = new List { 5, 8 },\r\n SkillId = 17,\r\n Value = new SkillValue\r\n {\r\n ValueDouble = 4,\r\n },\r\n },\r\n };\r\n\r\nsgClient.ResourcesClient.UpdateSkillValues(values).Wait();" + } + ] + } + }, + "/api/sg/v1/Resources/AdvancedRates": { + "get": { + "tags": [ + "Resources" + ], + "summary": "Get Resources Advanced Rates", + "parameters": [ + { + "name": "resourceIds", + "in": "query", + "description": "Comma-separated list or resource ids. Optional. Mutually exclusive with ResourceExternalIds.", + "schema": { + "type": "string" + } + }, + { + "name": "resourceExternalIds", + "in": "query", + "description": "Comma-separated list or resource external ids. Optional. Mutually exclusive with ResourceIds.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ResourceAdvancedRate" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ResourceAdvancedRate" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ResourceAdvancedRate" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/Resources/AdvancedRates?resourceIds=2,3" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.ResourcesClient.GetAdvancedRates(new List{2,3}, null).Result;" + } + ] + }, + "put": { + "tags": [ + "Resources" + ], + "summary": "Update Resources Advanced Rates", + "requestBody": { + "description": "The list of advanced rates to update. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ResourceAdvancedRate" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ResourceAdvancedRate" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ResourceAdvancedRate" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ResourceAdvancedRate" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "PUT /api/sg/v1/Resources/AdvancedRates\r\n\r\n [\r\n {\r\n \"resourceId\": 2,\r\n \"advancedRates\": [\r\n {\r\n \"startDate\": \"1904-01-01T00:00:00\",\r\n \"rate\": 10\r\n },\r\n {\r\n \"startDate\": \"2024-07-01T00:00:00\",\r\n \"rate\": 20\r\n }\r\n ]\r\n }\r\n]" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nvar values = new List\r\n{\r\n new ResourceAdvancedRate\r\n {\r\n ResourceId = 2,\r\n AdvancedRates = new List\r\n {\r\n new AdvancedRate\r\n {\r\n Rate = 10,\r\n StartDate = new DateTime(1904, 1, 1),\r\n },\r\n new AdvancedRate\r\n {\r\n Rate = 20,\r\n StartDate = new DateTime(2024, 7, 1),\r\n },\r\n },\r\n },\r\n};\r\nsgClient.ResourcesClient.UpdateAdvancedRates(values).Wait();" + } + ] + } + }, + "/api/sg/v1/Roles": { + "get": { + "tags": [ + "Roles" + ], + "summary": "List Roles", + "description": "Gets the list of roles in ascending order by id.", + "parameters": [ + { + "name": "roleType", + "in": "query", + "description": "Optional role type to retrieve roles of that type only.", + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.RoleType" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.Role" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.Role" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.Role" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/Roles?roleType=Global" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.RolesClient.GetRoles(RoleType.Global).Result;" + } + ] + }, + "post": { + "tags": [ + "Roles" + ], + "summary": "Create Roles", + "description": "Create new roles with values provided in request body.", + "requestBody": { + "description": "The list of roles to create. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.RoleEdit" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.RoleEdit" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.RoleEdit" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.RoleEdit" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "POST /api/sg/v1/Roles\r\n\r\n[\r\n {\r\n \"id\": null,\r\n \"name\": \"Project Editor\",\r\n \"roleType\": \"Project\",\r\n \"permissions\": [\r\n {\r\n \"permission\": \"Deny\",\r\n \"flags\": [\r\n \"Delete\",\r\n \"Clone\",\r\n \"ViewResourceRequests\",\r\n \"EditHierarchyMembership\",\r\n \"ManagePermissions\"\r\n ]\r\n },\r\n {\r\n \"permission\": \"Grant\",\r\n \"flags\": [\r\n \"EditName\",\r\n \"Shift\"\r\n ]\r\n },\r\n {\r\n \"permission\": \"View\",\r\n \"flags\": [\r\n \"AccessProjectCustomFieldValues\",\r\n \"AccessAssignmentCustomFieldValues\"\r\n ]\r\n },\r\n {\r\n \"permission\": \"Edit\",\r\n \"flags\": [\r\n \"AccessActualAllocationDataset\",\r\n \"AccessPlannedAllocationDataset\",\r\n \"AccessActualDemandDatase\"t,\r\n \"AccessPlannedDemandDataset\",\r\n \"AccessDates\",\r\n \"AccessMilestones\"\r\n ]\r\n },\r\n {\r\n \"permission\": \"None\",\r\n \"flags\": [\r\n \"AccessFinancials\",\r\n \"AccessTeam\"\r\n ]\r\n }\r\n ]\r\n },\r\n {\r\n \"id\": null,\r\n \"name\": \"Resource Editor\",\r\n \"roleType\": \"Resource\",\r\n \"permissions\": [\r\n {\r\n \"permission\": \"Deny\",\r\n \"flags\": [\r\n \"ViewInLists\",\r\n \"EditName\",\r\n \"EditAllocation\",\r\n \"EditInProjectTeam\",\r\n \"Delete\",\r\n \"ViewGlobalRole\",\r\n \"EditHierarchyMembership\",\r\n \"ManagePermissions\"\r\n ]\r\n },\r\n {\r\n \"permission\": \"Edit\",\r\n \"flags\": [\r\n \"AccessCapacity\",\r\n \"AccessDefaultRate\",\r\n \"AccessCustomFieldValues\"\r\n ]\r\n }\r\n ]\r\n },\r\n {\r\n \"id\": null,\r\n \"name\": \"User\",\r\n \"roleType\": \"Global\",\r\n \"permissions\": [\r\n {\r\n \"permission\": \"Deny\",\r\n \"flags\": [\r\n \"ManageAllAccessRights\",\r\n \"EditLicenseAndGeneralSettings\",\r\n \"ManageTimesheets\",\r\n \"DeleteArchivedTimesheets\",\r\n \"Synchronize\",\r\n \"ViewResourceRequestListing\",\r\n \"EditProjectHierarchy\",\r\n \"EditResourceHierarchy\",\r\n \"ManageAllTimesheetUsers\"\r\n ]\r\n },\r\n {\r\n \"permission\": \"Grant\",\r\n \"flags\": [\r\n \"CreateResource\",\r\n \"CreateProject\",\r\n \"ViewProjectSecurityGroups\",\r\n \"ViewResourceSecurityGroups\",\r\n \"UseTempus\",\r\n \"EditAdminTimeTypes\",\r\n \"EditCalendars\",\r\n \"EditCustomFields\",\r\n \"UseBpa\",\r\n \"UseBudgets\",\r\n \"EditFinancialCategories\",\r\n \"UseApi\"\r\n ]\r\n },\r\n {\r\n \"permission\": \"View\",\r\n \"flags\": [\r\n \"AccessReports\"\r\n ]\r\n }\r\n ]\r\n } \r\n]" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nvar rolesToCreate = new List\r\n{\r\n new RoleEdit\r\n {\r\n RoleType = RoleType.Global,\r\n Name = \"Manager\",\r\n Permissions = new List\r\n {\r\n new RolePermission\r\n {\r\n Permission = Permission.Grant,\r\n Flags = new List\r\n {\r\n PermissionFlag.ManageTimesheets,\r\n PermissionFlag.DeleteArchivedTimesheets,\r\n PermissionFlag.CreateResource,\r\n PermissionFlag.CreateProject,\r\n PermissionFlag.ViewProjectSecurityGroups,\r\n PermissionFlag.ViewResourceSecurityGroups,\r\n PermissionFlag.UseTempus,\r\n PermissionFlag.EditAdminTimeTypes,\r\n PermissionFlag.EditCalendars,\r\n PermissionFlag.EditCustomFields,\r\n PermissionFlag.UseBpa,\r\n PermissionFlag.UseBudgets,\r\n PermissionFlag.EditFinancialCategories,\r\n PermissionFlag.ViewResourceRequestListing,\r\n PermissionFlag.UseApi\r\n }\r\n },\r\n new RolePermission\r\n {\r\n Permission = Permission.Deny,\r\n Flags = new List\r\n {\r\n PermissionFlag.ManageAllAccessRights,\r\n PermissionFlag.EditLicenseAndGeneralSettings,\r\n PermissionFlag.Synchronize,\r\n PermissionFlag.EditProjectHierarchy,\r\n PermissionFlag.EditResourceHierarchy,\r\n PermissionFlag.ManageAllTimesheetUsers,\r\n }\r\n },\r\n new RolePermission\r\n {\r\n Permission = Permission.Edit,\r\n Flags = new List\r\n {\r\n PermissionFlag.AccessReports\r\n }\r\n }\r\n }\r\n },\r\n new RoleEdit\r\n {\r\n RoleType = RoleType.Project,\r\n Name = \"Project Manager\",\r\n Permissions = new List\r\n {\r\n new RolePermission\r\n {\r\n Permission = Permission.Edit,\r\n Flags = new List\r\n {\r\n PermissionFlag.AccessProjectCustomFieldValues,\r\n PermissionFlag.AccessAssignmentCustomFieldValues,\r\n PermissionFlag.AccessActualAllocationDataset,\r\n PermissionFlag.AccessPlannedAllocationDataset,\r\n PermissionFlag.AccessActualDemandDataset,\r\n PermissionFlag.AccessPlannedDemandDataset,\r\n PermissionFlag.AccessDates,\r\n PermissionFlag.AccessFinancials,\r\n PermissionFlag.AccessTeam,\r\n PermissionFlag.AccessMilestones\r\n }\r\n },\r\n new RolePermission\r\n {\r\n Permission = Permission.Grant,\r\n Flags = new List\r\n {\r\n PermissionFlag.EditName,\r\n PermissionFlag.Delete,\r\n PermissionFlag.Clone,\r\n PermissionFlag.ViewResourceRequests,\r\n PermissionFlag.EditHierarchyMembership,\r\n PermissionFlag.ManagePermissions,\r\n PermissionFlag.Shift\r\n }\r\n },\r\n }\r\n },\r\n new RoleEdit\r\n {\r\n RoleType = RoleType.Resource,\r\n Name = \"Resource Manager\",\r\n Permissions = new List\r\n {\r\n new RolePermission\r\n {\r\n Permission = Permission.Edit,\r\n Flags = new List\r\n {\r\n PermissionFlag.AccessCapacity,\r\n PermissionFlag.AccessDefaultRate,\r\n PermissionFlag.AccessCustomFieldValues,\r\n }\r\n },\r\n new RolePermission\r\n {\r\n Permission = Permission.Grant,\r\n Flags = new List\r\n {\r\n PermissionFlag.EditName,\r\n PermissionFlag.Delete,\r\n PermissionFlag.Clone,\r\n }\r\n },\r\n new RolePermission\r\n {\r\n Permission = Permission.Deny,\r\n Flags = new List\r\n {\r\n PermissionFlag.EditHierarchyMembership,\r\n PermissionFlag.ManagePermissions\r\n }\r\n },\r\n }\r\n }\r\n};\r\n\r\nsgClient.RolesClient.CreateRoles(customFields).Result;" + } + ] + }, + "put": { + "tags": [ + "Roles" + ], + "summary": "Update Roles", + "description": "Update roles with values provided in request body.", + "requestBody": { + "description": "The list of roles to update. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.RoleEdit" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.RoleEdit" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.RoleEdit" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.RoleEdit" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "PUT /api/sg/v1/Roles\r\n\r\n[\r\n {\r\n \"id\": 4,\r\n \"name\": \"Project Editor\",\r\n \"roleType\": \"Project\",\r\n \"permissions\": [\r\n {\r\n \"permission\": \"Deny\",\r\n \"flags\": [\r\n \"Delete\",\r\n \"Clone\",\r\n \"ViewResourceRequests\",\r\n \"EditHierarchyMembership\",\r\n \"ManagePermissions\"\r\n ]\r\n },\r\n {\r\n \"permission\": \"Grant\",\r\n \"flags\": [\r\n \"EditName\",\r\n \"Shift\"\r\n ]\r\n },\r\n {\r\n \"permission\": \"View\",\r\n \"flags\": [\r\n \"AccessProjectCustomFieldValues\",\r\n \"AccessAssignmentCustomFieldValues\"\r\n ]\r\n },\r\n {\r\n \"permission\": \"Edit\",\r\n \"flags\": [\r\n \"AccessActualAllocationDataset\",\r\n \"AccessPlannedAllocationDataset\",\r\n \"AccessActualDemandDatase\"t,\r\n \"AccessPlannedDemandDataset\",\r\n \"AccessDates\",\r\n \"AccessMilestones\"\r\n ]\r\n },\r\n {\r\n \"permission\": \"None\",\r\n \"flags\": [\r\n \"AccessFinancials\",\r\n \"AccessTeam\"\r\n ]\r\n }\r\n ]\r\n },\r\n {\r\n \"id\": 7,\r\n \"name\": \"Resource Editor\",\r\n \"roleType\": \"Resource\",\r\n \"permissions\": [\r\n {\r\n \"permission\": \"Deny\",\r\n \"flags\": [\r\n \"ViewInLists\",\r\n \"EditName\",\r\n \"EditAllocation\",\r\n \"EditInProjectTeam\",\r\n \"Delete\",\r\n \"ViewGlobalRole\",\r\n \"EditHierarchyMembership\",\r\n \"ManagePermissions\"\r\n ]\r\n },\r\n {\r\n \"permission\": \"Edit\",\r\n \"flags\": [\r\n \"AccessCapacity\",\r\n \"AccessDefaultRate\",\r\n \"AccessCustomFieldValues\"\r\n ]\r\n }\r\n ]\r\n },\r\n {\r\n \"id\": 8,\r\n \"name\": \"User\",\r\n \"roleType\": \"Global\",\r\n \"permissions\": [\r\n {\r\n \"permission\": \"Deny\",\r\n \"flags\": [\r\n \"ManageAllAccessRights\",\r\n \"EditLicenseAndGeneralSettings\",\r\n \"ManageTimesheets\",\r\n \"DeleteArchivedTimesheets\",\r\n \"Synchronize\",\r\n \"ViewResourceRequestListing\",\r\n \"EditProjectHierarchy\",\r\n \"EditResourceHierarchy\",\r\n \"ManageAllTimesheetUsers\"\r\n ]\r\n },\r\n {\r\n \"permission\": \"Grant\",\r\n \"flags\": [\r\n \"CreateResource\",\r\n \"CreateProject\",\r\n \"ViewProjectSecurityGroups\",\r\n \"ViewResourceSecurityGroups\",\r\n \"UseTempus\",\r\n \"EditAdminTimeTypes\",\r\n \"EditCalendars\",\r\n \"EditCustomFields\",\r\n \"UseBpa\",\r\n \"UseBudgets\",\r\n \"EditFinancialCategories\",\r\n \"UseApi\"\r\n ]\r\n },\r\n {\r\n \"permission\": \"Edit\",\r\n \"flags\": [\r\n \"AccessReports\"\r\n ]\r\n }\r\n ]\r\n } \r\n]" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nvar rolesToCreate = new List\r\n{\r\n new RoleEdit\r\n {\r\n Id = 3,\r\n RoleType = RoleType.Global,\r\n Name = \"Manager\",\r\n Permissions = new List\r\n {\r\n new RolePermission\r\n {\r\n Permission = Permission.Grant,\r\n Flags = new List\r\n {\r\n PermissionFlag.ManageTimesheets,\r\n PermissionFlag.DeleteArchivedTimesheets,\r\n PermissionFlag.CreateResource,\r\n PermissionFlag.CreateProject,\r\n PermissionFlag.ViewProjectSecurityGroups,\r\n PermissionFlag.ViewResourceSecurityGroups,\r\n PermissionFlag.UseTempus,\r\n PermissionFlag.EditAdminTimeTypes,\r\n PermissionFlag.EditCalendars,\r\n PermissionFlag.EditCustomFields,\r\n PermissionFlag.UseBpa,\r\n PermissionFlag.UseBudgets,\r\n PermissionFlag.EditFinancialCategories,\r\n PermissionFlag.ViewResourceRequestListing,\r\n PermissionFlag.UseApi\r\n }\r\n },\r\n new RolePermission\r\n {\r\n Permission = Permission.Deny,\r\n Flags = new List\r\n {\r\n PermissionFlag.ManageAllAccessRights,\r\n PermissionFlag.EditLicenseAndGeneralSettings,\r\n PermissionFlag.Synchronize,\r\n PermissionFlag.EditProjectHierarchy,\r\n PermissionFlag.EditResourceHierarchy,\r\n PermissionFlag.ManageAllTimesheetUsers,\r\n }\r\n },\r\n new RolePermission\r\n {\r\n Permission = Permission.View,\r\n Flags = new List\r\n {\r\n PermissionFlag.AccessReports\r\n }\r\n }\r\n }\r\n },\r\n new RoleEdit\r\n {\r\n Id = 6,\r\n RoleType = RoleType.Project,\r\n Name = \"Project Manager\",\r\n Permissions = new List\r\n {\r\n new RolePermission\r\n {\r\n Permission = Permission.Edit,\r\n Flags = new List\r\n {\r\n PermissionFlag.AccessProjectCustomFieldValues,\r\n PermissionFlag.AccessAssignmentCustomFieldValues,\r\n PermissionFlag.AccessActualAllocationDataset,\r\n PermissionFlag.AccessPlannedAllocationDataset,\r\n PermissionFlag.AccessActualDemandDataset,\r\n PermissionFlag.AccessPlannedDemandDataset,\r\n PermissionFlag.AccessDates,\r\n PermissionFlag.AccessFinancials,\r\n PermissionFlag.AccessTeam,\r\n PermissionFlag.AccessMilestones\r\n }\r\n },\r\n new RolePermission\r\n {\r\n Permission = Permission.Grant,\r\n Flags = new List\r\n {\r\n PermissionFlag.EditName,\r\n PermissionFlag.Delete,\r\n PermissionFlag.Clone,\r\n PermissionFlag.ViewResourceRequests,\r\n PermissionFlag.EditHierarchyMembership,\r\n PermissionFlag.ManagePermissions,\r\n PermissionFlag.Shift\r\n }\r\n },\r\n }\r\n },\r\n new RoleEdit\r\n {\r\n Id = 7,\r\n RoleType = RoleType.Resource,\r\n Name = \"Resource Manager\",\r\n Permissions = new List\r\n {\r\n new RolePermission\r\n {\r\n Permission = Permission.Edit,\r\n Flags = new List\r\n {\r\n PermissionFlag.AccessCapacity,\r\n PermissionFlag.AccessDefaultRate,\r\n PermissionFlag.AccessCustomFieldValues,\r\n }\r\n },\r\n new RolePermission\r\n {\r\n Permission = Permission.Grant,\r\n Flags = new List\r\n {\r\n PermissionFlag.EditName,\r\n PermissionFlag.Delete,\r\n PermissionFlag.Clone,\r\n }\r\n },\r\n new RolePermission\r\n {\r\n Permission = Permission.Deny,\r\n Flags = new List\r\n {\r\n PermissionFlag.EditHierarchyMembership,\r\n PermissionFlag.ManagePermissions\r\n }\r\n },\r\n }\r\n }\r\n};\r\n\r\nsgClient.RolesClient.UpdateRoles(customFields).Result;" + } + ] + }, + "delete": { + "tags": [ + "Roles" + ], + "summary": "Delete Roles", + "parameters": [ + { + "name": "roleType", + "in": "query", + "description": "Role type of ids.", + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.RoleType" + } + }, + { + "name": "ids", + "in": "query", + "description": "Comma separated list of ids of roles to delete. Has a limit of 5000 entities in a single call.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "DELETE /api/sg/v1/Roles?ids=3,4&roleType=Global" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.RolesClient.DeleteRoles(new List{3,4}, RoleType.Project).Wait();" + } + ] + } + }, + "/api/sg/v1/Roles/{id}": { + "get": { + "tags": [ + "Roles" + ], + "summary": "Get Role", + "description": "Gets the role by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Id of the role.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "roleType", + "in": "query", + "description": "Role type of the role.", + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.RoleType" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Role" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Role" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Role" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/GlobalRoles/2?roleType=Global" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.RolesClient.GetRole(2,RoleType.Global).Result;" + } + ] + } + }, + "/api/sg/v1/SecurityGroups": { + "get": { + "tags": [ + "SecurityGroups" + ], + "summary": "List Security Group", + "description": "Gets the list of all available security groups.", + "parameters": [ + { + "name": "securityGroupType", + "in": "query", + "description": "Security group type.", + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.SecurityGroupType" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.SecurityGroupInfo" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.SecurityGroupInfo" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.SecurityGroupInfo" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/SecurityGroups?securityGroupType=Project" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.SecurityGroupsClient.GetSecurityGroups(SecurityGroupType.Resource).Result;" + } + ] + }, + "post": { + "tags": [ + "SecurityGroups" + ], + "summary": "Create Security Groups", + "description": "Create new security groups with values provided in request body.", + "requestBody": { + "description": "The list of security groups to create. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.SecurityGroupEdit" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.SecurityGroupEdit" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.SecurityGroupEdit" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.SecurityGroupEdit" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "POST /api/sg/v1/SecurityGroups\r\n\r\n[\r\n {\r\n \"id\": null,\r\n \"name\": \"Project Editor\",\r\n \"securityGroupType\": \"Project\"\r\n },\r\n {\r\n \"id\": null,\r\n \"name\": \"Resource Editor\",\r\n \"securityGroupType\": \"Resource\"\r\n }\r\n]" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\n\r\nvar securityGroups = new List\r\n{\r\n new SecurityGroupEdit\r\n {\r\n SecurityGroupType = SecurityGroupType.Project,\r\n Name = \"Project Editor\"\r\n },\r\n new SecurityGroupEdit\r\n {\r\n SecurityGroupType = SecurityGroupType.Resource,\r\n Name = \"Resource Editor\"\r\n }\r\n};\r\n\r\nsgClient.SecurityGroupsClient.CreateSecurityGroups(securityGroups).Result;" + } + ] + }, + "put": { + "tags": [ + "SecurityGroups" + ], + "summary": "Update Security Groups", + "description": "Create new security groups with values provided in request body.", + "requestBody": { + "description": "The list of security groups to update. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.SecurityGroupEdit" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.SecurityGroupEdit" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.SecurityGroupEdit" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.SecurityGroupEdit" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "PUT /api/sg/v1/SecurityGroups\r\n\r\n[\r\n {\r\n \"id\": 4,\r\n \"name\": \"Project Editor\",\r\n \"securityGroupType\": \"Project\"\r\n },\r\n {\r\n \"id\": 2,\r\n \"name\": \"Resource Editor\",\r\n \"securityGroupType\": \"Resource\"\r\n }\r\n]" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\n\r\nvar securityGroups = new List\r\n{\r\n new SecurityGroupEdit\r\n {\r\n Id = 5,\r\n SecurityGroupType = SecurityGroupType.Project,\r\n Name = \"Project Editor\"\r\n },\r\n new SecurityGroupEdit\r\n {\r\n Id = 3,\r\n SecurityGroupType = SecurityGroupType.Resource,\r\n Name = \"Resource Editor\"\r\n }\r\n};\r\n\r\nsgClient.SecurityGroupsClient.UpdateSecurityGroups(securityGroups).Wait();" + } + ] + }, + "delete": { + "tags": [ + "SecurityGroups" + ], + "summary": "Delete Security Groups", + "parameters": [ + { + "name": "ids", + "in": "query", + "description": "Comma separated list of ids of security groups to delete. Has a limit of 5000 entities in a single call.", + "schema": { + "type": "string" + } + }, + { + "name": "securityGroupType", + "in": "query", + "description": "Security group type.", + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.SecurityGroupType" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "DELETE /api/sg/v1/SecurityGroups?ids=3,4&securityGroupType=Project" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.SecurityGroupsClient.DeleteSecurityGroups(new List{ 2, 6 }, SecurityGroupType.Resource).Wait();" + } + ] + } + }, + "/api/sg/v1/SecurityGroups/{id}": { + "get": { + "tags": [ + "SecurityGroups" + ], + "summary": "Get Security Group", + "description": "Gets the security group by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "The security group id.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "securityGroupType", + "in": "query", + "description": "Security group type.", + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.SecurityGroupType" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.SecurityGroupInfo" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.SecurityGroupInfo" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.SecurityGroupInfo" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/SecurityGroups/2?securityGroupType=Project" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.SecurityGroupsClient.GetSecurityGroup(2, SecurityGroupType.Resource).Result;" + } + ] + } + }, + "/api/sg/v1/Sheets": { + "get": { + "tags": [ + "Sheets" + ], + "summary": "List Sheets", + "description": "Gets the list of sheets filtered by project, resource or sheet template ids that the user has access to in ascending order by Id.", + "parameters": [ + { + "name": "projectIds", + "in": "query", + "description": "Comma-separated list of project ids, which sheets are requested. Optional. Mutually exclusive with ProjectExternalIds.", + "schema": { + "type": "string" + } + }, + { + "name": "projectExternalIds", + "in": "query", + "description": "Comma-separated list of project external ids, which sheets are requested. Optional. Mutually exclusive with ProjectIds.", + "schema": { + "type": "string" + } + }, + { + "name": "resourceIds", + "in": "query", + "description": "Comma-separated list of resource ids, which sheets are requested. Optional. Mutually exclusive with ResourceExternalIds.", + "schema": { + "type": "string" + } + }, + { + "name": "resourceExternalIds", + "in": "query", + "description": "Comma-separated list of resource external ids, which sheets are requested. Optional. Mutually exclusive with ResourceIds.", + "schema": { + "type": "string" + } + }, + { + "name": "sheetTemplateIds", + "in": "query", + "description": "Comma-separated Ids of sheet template.", + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "The index of page to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "The maximum number of items to return per page. Mandatory parameter with page.", + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "The list of sheets.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.PagedResult`1[[SG.Api.Model.Sheets.Sheet, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.PagedResult`1[[SG.Api.Model.Sheets.Sheet, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.PagedResult`1[[SG.Api.Model.Sheets.Sheet, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/sheets?projectIds=2,3" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.SheetsClient.GetSheets(new List{2,3}).Result;" + } + ] + }, + "post": { + "tags": [ + "Sheets" + ], + "summary": "Create Sheet", + "description": "Creates a new sheet.", + "requestBody": { + "description": "Sheet detail.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Sheets.SheetCreate" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Sheets.SheetCreate" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Sheets.SheetCreate" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Sheets.SheetCreate" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "integer", + "format": "int32" + } + }, + "text/plain": { + "schema": { + "type": "integer", + "format": "int32" + } + }, + "text/json": { + "schema": { + "type": "integer", + "format": "int32" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "POST /api/sg/v1/Sheets\r\n\r\n {\r\n \"projectId\": 10,\r\n \"sheetTemplateId\": 5\r\n}" + }, + { + "lang": "CS", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\n\r\nvar createdSheetId = sgClient.SheetsClient.CreateSheet(new SheetCreate\r\n{\r\n ProjectId = 10,\r\n SheetTemplateId = 5,\r\n});" + } + ] + }, + "put": { + "tags": [ + "Sheets" + ], + "summary": "Update Sheets", + "description": "Updates the list of sheets.", + "requestBody": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.Sheets.SheetDataEdit" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.Sheets.SheetDataEdit" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.Sheets.SheetDataEdit" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.Sheets.SheetDataEdit" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "PUT /api/sg/v1/Sheets\r\n\r\n[\r\n {\r\n \"sheetId\": 10,\r\n \"rows\": [\r\n {\r\n \"columns\": [\r\n {\r\n \"columnId\": 25,\r\n \"value\": \"Row 1\"\r\n },\r\n {\r\n \"columnId\": 32,\r\n \"value\": true\r\n }\r\n ]\r\n },\r\n {\r\n \"columns\": [\r\n {\r\n \"columnId\": 25,\r\n \"value\": \"Row 2\"\r\n },\r\n {\r\n \"columnId\": 32,\r\n \"value\": false\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n]" + }, + { + "lang": "CS", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\n\r\nvar createdSheetId = sgClient.SheetsClient.UpdateSheets(new List\r\n{\r\n new SheetDataEdit\r\n {\r\n SheetId = 10,\r\n Rows = new List\r\n {\r\n new SheetRowData\r\n {\r\n Columns = new List\r\n {\r\n new SheetColumnData\r\n {\r\n ColumnId = 25,\r\n Value = new CustomFieldValue\r\n {\r\n ValueString = \"Row 1\",\r\n },\r\n },\r\n new SheetColumnData\r\n {\r\n ColumnId = 32,\r\n Value = new CustomFieldValue\r\n {\r\n ValueBoolean = true,\r\n },\r\n },\r\n },\r\n },\r\n new SheetRowData\r\n {\r\n Columns = new List\r\n {\r\n new SheetColumnData\r\n {\r\n ColumnId = 25,\r\n Value = new CustomFieldValue\r\n {\r\n ValueString = \"Row 2\",\r\n },\r\n },\r\n new SheetColumnData\r\n {\r\n ColumnId = 32,\r\n Value = new CustomFieldValue\r\n {\r\n ValueBoolean = false,\r\n },\r\n },\r\n },\r\n },\r\n },\r\n },\r\n});" + } + ] + } + }, + "/api/sg/v1/Sheets/{id}": { + "get": { + "tags": [ + "Sheets" + ], + "summary": "Get Sheet", + "description": "Gets the sheet by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Id of the sheet.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Sheets.SheetData" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Sheets.SheetData" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Sheets.SheetData" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/sheets/1" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.SheetsClient.GetSheet(1).Result;" + } + ] + }, + "delete": { + "tags": [ + "Sheets" + ], + "summary": "Delete Sheet", + "description": "Deletes a sheet by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Id of the sheet.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "DELETE /api/sg/v1/Sheets/10" + }, + { + "lang": "CS", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.SheetsClient.DeleteSheet(10);" + } + ] + } + }, + "/api/sg/v1/Sheets/ClearData/{id}": { + "delete": { + "tags": [ + "Sheets" + ], + "summary": "Clear Sheet Content", + "description": "Clear contents of the sheet by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Id of the sheet.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "DELETE /api/sg/v1/Sheets/ClearData/10" + }, + { + "lang": "CS", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.SheetsClient.ClearData(10);" + } + ] + } + }, + "/api/sg/v1/SheetTemplates": { + "get": { + "tags": [ + "SheetTemplates" + ], + "summary": "List Sheet Templates", + "description": "Gets the list of sheet templates.", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.Sheets.SheetTemplate" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.Sheets.SheetTemplate" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.Sheets.SheetTemplate" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/sheetTemplates" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.SheetTemplatesClient.GetSheetTemplates().Result;" + } + ] + } + }, + "/api/sg/v1/SheetTemplates/{id}": { + "get": { + "tags": [ + "SheetTemplates" + ], + "summary": "Get Sheet Template", + "description": "Gets the sheet template by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Id of the sheet template.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Sheets.SheetTemplate" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Sheets.SheetTemplate" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Sheets.SheetTemplate" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/sheetTemplates/1" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.SheetTemplatesClient.GetSheetTemplate(1).Result;" + } + ] + } + }, + "/api/sg/v1/SkillCategories": { + "get": { + "tags": [ + "SkillCategories" + ], + "summary": "Get Skill Categories", + "description": "Gets all available skill categories.", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.SkillCategory" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.SkillCategory" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.SkillCategory" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/SkillCategories" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.SkillCategoriesClient.GetSkillCategories().Result;" + } + ] + }, + "post": { + "tags": [ + "SkillCategories" + ], + "summary": "Create Skill Categories", + "description": "Create new skill categorys with values provided in request body.", + "requestBody": { + "description": "The list of skill categorys to create. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.SkillCategoryEdit" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.SkillCategoryEdit" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.SkillCategoryEdit" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.SkillCategoryEdit" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "POST /api/sg/v1/SkillCategories\r\n\r\n[\r\n {\r\n \"name\": \"Programming\",\r\n \"skillIds\": [34, 35, 36]\r\n }\r\n]" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nvar skillCategories = new List\r\n {\r\n new SkillCategoryEdit\r\n {\r\n Name = \"Programming\",\r\n SkillIds = new List\r\n {\r\n 34,\r\n 35,\r\n 36,\r\n },\r\n },\r\n };\r\nsgClient.SkillCategoriesClient.CreateSkillCategories(skillCategories).Result;" + } + ] + }, + "put": { + "tags": [ + "SkillCategories" + ], + "summary": "Update Skill Categories", + "description": "Updates the list of existing skill categories with values provided in request body.", + "requestBody": { + "description": "The list of skill categorys to update. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.SkillCategoryEdit" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.SkillCategoryEdit" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.SkillCategoryEdit" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.SkillCategoryEdit" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "PUT /api/sg/v1/SkillCategories\r\n\r\n[\r\n {\r\n \"id\": 4,\r\n \"name\": \"Coding\",\r\n \"skillIds\": [34, 35, 36]\r\n }\r\n]" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nvar skillCategories = new List\r\n {\r\n new SkillCategoryEdit\r\n {\r\n Id = 4,\r\n Name = \"Coding\",\r\n SkillIds = new List\r\n {\r\n 34,\r\n 35,\r\n 36,\r\n },\r\n },\r\n };\r\nsgClient.SkillCategoriesClient.UpdateSkillCategories(skillCategories).Wait();" + } + ] + }, + "delete": { + "tags": [ + "SkillCategories" + ], + "summary": "Delete Skill Categories", + "description": "Delete skill categories with given ids.", + "parameters": [ + { + "name": "ids", + "in": "query", + "description": "Comma separated ids list of skill categories to delete. Has a limit of 5000 entities in a single call.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "DELETE /api/sg/v1/SkillCategories?ids=3,4" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.SkillCategoriesClient.DeleteSkillCategories(new List{3,4}).Wait();" + } + ] + } + }, + "/api/sg/v1/SkillCategories/{id}": { + "get": { + "tags": [ + "SkillCategories" + ], + "summary": "Get Skill Category", + "description": "Gets the skill category by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Id of the skill category.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.SkillCategory" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.SkillCategory" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.SkillCategory" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/SkillCategories/2" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.SkillCategoriesClient.GetSkillCategory(2).Result;" + } + ] + } + }, + "/api/sg/v1/Skills": { + "get": { + "tags": [ + "Skills" + ], + "summary": "Get Skills", + "description": "Gets all available skills.", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.Skill" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.Skill" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.Skill" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/Skills" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.SkillsClient.GetSkills().Result;" + } + ] + }, + "post": { + "tags": [ + "Skills" + ], + "summary": "Create Skills", + "description": "Create new skill s with values provided in request body.", + "requestBody": { + "description": "The list of skills to create. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.SkillEdit" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.SkillEdit" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.SkillEdit" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.SkillEdit" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "POST /api/sg/v1/Skills\r\n\r\n[\r\n {\r\n \"name\": \"Leadership\",\r\n \"skillValueTypeId\": 17,\r\n \"description\": \"Some skill description\"\r\n }\r\n]" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nvar skills = new List\r\n {\r\n new SkillEdit\r\n {\r\n Name = \"Leadership\",\r\n SkillValueTypeId = 17,\r\n Description = \"Some skill description\",\r\n },\r\n };\r\nsgClient.SkillsClient.CreateSkills(skills).Result;" + } + ] + }, + "put": { + "tags": [ + "Skills" + ], + "summary": "Update Skills", + "description": "Updates the list of existing skills with values provided in request body.", + "requestBody": { + "description": "The list of skills to update. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.SkillEdit" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.SkillEdit" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.SkillEdit" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.SkillEdit" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "PUT /api/sg/v1/Skills\r\n\r\n[\r\n {\r\n \"id\": 4,\r\n \"name\": \"Leadership\",\r\n \"skillValueTypeId\": 17,\r\n \"description\": \"Some skill description\"\r\n }\r\n]" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nvar skills = new List\r\n {\r\n new SkillEdit\r\n {\r\n Id = 4,\r\n Name = \"Leadership\",\r\n SkillValueTypeId = 17,\r\n Description = \"Some skill description\",\r\n },\r\n };\r\nsgClient.SkillsClient.UpdateSkills(skills).Wait();" + } + ] + }, + "delete": { + "tags": [ + "Skills" + ], + "summary": "Delete Skills", + "description": "Delete skills with given ids.", + "parameters": [ + { + "name": "ids", + "in": "query", + "description": "Comma separated ids list of skills to delete. Has a limit of 5000 entities in a single call.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "DELETE /api/sg/v1/Skills?ids=3,4" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.SkillsClient.DeleteSkills(new List{3,4}).Wait();" + } + ] + } + }, + "/api/sg/v1/Skills/{id}": { + "get": { + "tags": [ + "Skills" + ], + "summary": "Get Skill", + "description": "Gets the skill by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Id of the skill.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Skill" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Skill" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Skill" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/Skills/2" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.SkillsClient.GetSkill(2).Result;" + } + ] + } + }, + "/api/sg/v1/Skills/ValueTypes": { + "get": { + "tags": [ + "Skills" + ], + "summary": "Get Skill Value Types", + "description": "Gets the skill value types.", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.SkillValueType" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.SkillValueType" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.SkillValueType" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/Skills/ValueTypes" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.SkillsClient.GetValueTypes().Result;" + } + ] + } + }, + "/api/sg/v1/SnapshotTypes": { + "get": { + "tags": [ + "SnapshotTypes" + ], + "summary": "List Snapshot Types", + "description": "Gets the list of snapshot types.", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.Snapshots.SnapshotType" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.Snapshots.SnapshotType" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.Snapshots.SnapshotType" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/SnapshotTypes" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.SnapshotTypesClient.GetSnapshotTypes().Result;" + } + ] + } + }, + "/api/sg/v1/SnapshotTypes/{id}": { + "get": { + "tags": [ + "SnapshotTypes" + ], + "summary": "Get Snapshot Type", + "description": "Gets the snapshot type by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A unique id of snapshot type.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Snapshots.SnapshotType" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Snapshots.SnapshotType" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Snapshots.SnapshotType" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/SnapshotTypes/2" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.SnapshotTypesClient.GetSnapshotType(2).Result;" + } + ] + } + }, + "/api/sg/v1/Subscriptions": { + "get": { + "tags": [ + "Subscriptions" + ], + "summary": "List Subscriptions", + "description": "Gets the list of all available subscription.", + "parameters": [ + { + "name": "eventType", + "in": "query", + "description": "subscription event type.", + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.SubscriptionEventType" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.Subscription" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.Subscription" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.Subscription" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/Subscriptions?subscriptionEventType=ProjectCreate" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.SubscriptionsClient.GetSubscriptions(SubscriptionEventType.ProjectCreate).Result;" + } + ] + }, + "post": { + "tags": [ + "Subscriptions" + ], + "summary": "Create Subscriptions", + "description": "Create new subscription.", + "requestBody": { + "description": "The list of subscriptions to create. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.SubscriptionEdit" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.SubscriptionEdit" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.SubscriptionEdit" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.SubscriptionEdit" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.SubscriptionSecret" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.SubscriptionSecret" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.SubscriptionSecret" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "POST /api/sg/v1/Subscriptions\r\n\r\n[\r\n {\r\n \"url\": \"http://yourdomain/Receive\",\r\n \"eventType\": \"AssignmentCreate\",\r\n \"responseDataType\": \"AfterData\",\r\n \"filter\": {\r\n \"filterType\" : \"ProjectId\",\r\n \"ids\" : [ 1, 2, 4]\r\n }\r\n }\r\n]" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nvar subscriptions = new List{\r\n new SubscriptionEdit{\r\n Url = \"https://yourdomain/Receiver\",\r\n EventType = SubscriptionEventType.AssignmentCustomFieldValuesUpdate,\r\n Filter = new Filter\r\n {\r\n FilterType = FilterType.CustomFieldId,\r\n Ids = new List {1, 2}\r\n },\r\n ResponseDataType = SubscriptionResponseDataType.OnlyId\r\n }\r\n};\r\n\r\nsgClient.SubscriptionsClient.CreateSubscriptions(subscriptions).Result;" + } + ] + }, + "put": { + "tags": [ + "Subscriptions" + ], + "summary": "Update Subscriptions", + "description": "Update subscription with values provided in request body.", + "requestBody": { + "description": "The list of subscriptions to update. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.SubscriptionEdit" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.SubscriptionEdit" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.SubscriptionEdit" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.SubscriptionEdit" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "PUT /api/sg/v1/Subscriptions\r\n\r\n[\r\n {\r\n \"id\": 1,\r\n \"url\": \"http://yourdomain/Receive\",\r\n \"eventType\": \"AssignmentCreate\",\r\n \"responseDataType\": \"AfterData\",\r\n \"filter\": {\r\n \"filterType\" : \"ProjectId\",\r\n \"ids\" : [ 1, 2, 4]\r\n }\r\n }\r\n]" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nvar subscriptions = new List{\r\n new SubscriptionEdit{\r\n Id = 1,\r\n Url = \"https://yourdomain/Receiver\",\r\n EventType = SubscriptionEventType.AssignmentCustomFieldValuesUpdate,\r\n Filter = new Filter\r\n {\r\n FilterType = FilterType.CustomFieldId,\r\n Ids = new List {1, 2}\r\n },\r\n ResponseDataType = SubscriptionResponseDataType.OnlyId\r\n }\r\n};\r\n\r\nsgClient.SubscriptionsClient.UpdateSubscriptions(subscriptions).Result;" + } + ] + }, + "delete": { + "tags": [ + "Subscriptions" + ], + "summary": "Delete Subscriptions", + "parameters": [ + { + "name": "ids", + "in": "query", + "description": "Comma separated list of ids of subscription to delete. Has a limit of 5000 entities in a single call.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "DELETE /api/sg/v1/Subscriptions?ids=3,5" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.SubscriptionsClient.DeleteSubscriptions(new List{3,5}).Wait();" + } + ] + } + }, + "/api/sg/v1/Subscriptions/{id}": { + "get": { + "tags": [ + "Subscriptions" + ], + "summary": "Get Subscription", + "description": "Gets the subscription by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "The subscription id.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Subscription" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Subscription" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Subscription" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/Subscriptions/2" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.SubscriptionsClient.GetSubscription(1).Result;" + } + ] + } + }, + "/api/sg/v1/Subscriptions/Reset": { + "put": { + "tags": [ + "Subscriptions" + ], + "summary": "Reset Subscriptions", + "description": "Reset subscriptions that have been deactivated due to failure of the recipient endpoint host.", + "parameters": [ + { + "name": "ids", + "in": "query", + "description": "Comma separated list of ids of subscription to delete. Has a limit of 5000 entities in a single call.", + "schema": { + "type": "string" + } + }, + { + "name": "urlMask", + "in": "query", + "description": "Subscription endpoint url mask. Accepts * as wildcard.", + "schema": { + "type": "string" + } + }, + { + "name": "resetSecretKey", + "in": "query", + "description": "Set true to reset secret key of the subscription.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.SubscriptionSecret" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.SubscriptionSecret" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.SubscriptionSecret" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "PUT /api/sg/v1/Subscriptions/Reset?ids=3,5" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.SubscriptionsClient.ResetSubscriptions(null, \"https://yourdomain/*\").Result;" + } + ] + } + }, + "/api/sg/v1/TaskDependencies": { + "get": { + "tags": [ + "TaskDependencies" + ], + "summary": "List Task Dependencies", + "description": "Gets the list of task dependencys filtered by task ids that the user has access to in ascending order by source task Id.", + "parameters": [ + { + "name": "taskIds", + "in": "query", + "description": "Comma separated Ids of requested tasks. Mutually exclusive with parameter page.", + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "The index of page to return. Mandatory parameter if taskIds is not specified. Mutually exclusive with parameter taskIds.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "The maximum number of items to return per page. Mandatory parameter with page.", + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "The list of task dependencies.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.PagedResult`1[[SG.Api.Model.TaskDependency, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.PagedResult`1[[SG.Api.Model.TaskDependency, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.PagedResult`1[[SG.Api.Model.TaskDependency, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + } + } + } + } + } + }, + "/api/sg/v1/Tasks": { + "get": { + "tags": [ + "Tasks" + ], + "summary": "List Tasks", + "description": "Gets the list of tasks filtered by task or project ids that the user has access to in ascending order by Id.", + "parameters": [ + { + "name": "taskIds", + "in": "query", + "description": "Comma separated Ids of requested tasks. Mutually exclusive with parameter page.", + "schema": { + "type": "string" + } + }, + { + "name": "projectIds", + "in": "query", + "description": "Comma separated Ids of projects, which tasks are requested. Optional. Mutually exclusive with ProjectExternalIds.", + "schema": { + "type": "string" + } + }, + { + "name": "projectExternalIds", + "in": "query", + "description": "Comma separated external Ids of projects, which tasks are requested. Optional. Mutually exclusive with ProjectIds.", + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "The index of page to return. Mandatory parameter if taskIds is not specified. Mutually exclusive with parameter taskIds.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "The maximum number of items to return per page. Mandatory parameter with page.", + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "The list of tasks.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.PagedResult`1[[SG.Api.Model.Task, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.PagedResult`1[[SG.Api.Model.Task, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.PagedResult`1[[SG.Api.Model.Task, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/Tasks?projectIds=2,3" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.TasksClient.GetTasks(null, new List{2,3}, null, null).Result;" + } + ] + }, + "post": { + "tags": [ + "Tasks" + ], + "summary": "Create Tasks", + "description": "Create new task with values provided in request body.", + "requestBody": { + "description": "The list of tasks to create. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.TaskEdit" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.TaskEdit" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.TaskEdit" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.TaskEdit" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "POST /api/sg/v1/Tasks\r\n\r\n[\r\n {\r\n \"projectId\": 2,\r\n \"name\": \"new task\",\r\n \"planType\": \"Allocation\"\r\n }\r\n]" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nvar tasks = new List{\r\n new TaskEdit{\r\n ProjectId = 2,\r\n PlanType = PlanType.Demand,\r\n Name = \"new task\"\r\n }\r\n};\r\n\r\nsgClient.TasksClient.CreateTasks(tasks).Result;" + } + ] + }, + "put": { + "tags": [ + "Tasks" + ], + "summary": "Rename Tasks", + "description": "Rename existing tasks.", + "requestBody": { + "description": "The list of tasks to rename. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.TaskInfo" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.TaskInfo" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.TaskInfo" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.TaskInfo" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "PUT /api/sg/v1/Tasks\r\n\r\n[\r\n {\r\n \"id\": 3,\r\n \"name\": \"new task name\",\r\n }\r\n]" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nvar tasks = new List{\r\n new TaskInfo{\r\n Id = 3,\r\n Name = \"new task name\"\r\n }\r\n};\r\n\r\nsgClient.TasksClient.UpdateTasks(tasks).Wait();" + } + ] + }, + "delete": { + "tags": [ + "Tasks" + ], + "summary": "Delete Tasks", + "description": "Delete tasks with given ids.", + "parameters": [ + { + "name": "ids", + "in": "query", + "description": "Comma separated ids of the tasks to delete. Has a limit of 5000 entities in a single call.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "DELETE /api/sg/v1/Tasks?ids=3,5" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.TasksClient.DeleteTasks(new List{3,5}).Wait();" + } + ] + } + }, + "/api/sg/v1/Tasks/{id}": { + "get": { + "tags": [ + "Tasks" + ], + "summary": "Get Task", + "description": "Gets the task by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Id of the task.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Task" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Task" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Task" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/Tasks/2" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.TasksClient.GetTask(1).Result;" + } + ] + } + }, + "/api/sg/v1/TimesheetPeriods/{id}": { + "get": { + "tags": [ + "TimesheetPeriods" + ], + "summary": "Get Period", + "description": "Gets the period by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A unique id of period.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "Operation success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.TimesheetPeriod" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.TimesheetPeriod" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.TimesheetPeriod" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/timesheetperiods/41583" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.TimesheetPeriodClient.GetPeriod(41583).Result;" + } + ] + } + }, + "/api/sg/v1/TimesheetPeriods": { + "get": { + "tags": [ + "TimesheetPeriods" + ], + "summary": "List Periods", + "description": "Gets the list of periods.", + "parameters": [ + { + "name": "ids", + "in": "query", + "description": "Comma separated ids of the timesheet periods. Mandatory parameter if page is not specified. Mutually exclusive with parameter page.", + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "The index of page to return. Mandatory parameter if ids is not specified. Mutually exclusive with parameter ids.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "The maximum number of items to return per page. Mandatory parameter with page.", + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "The list of available periods.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.PagedResult`1[[SG.Api.Model.TimesheetPeriod, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.PagedResult`1[[SG.Api.Model.TimesheetPeriod, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.PagedResult`1[[SG.Api.Model.TimesheetPeriod, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/timesheetperiods/?page=1&pageSize=10" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.TimesheetPeriodClient.GetPeriods(null, 1, 10).Result;" + } + ] + }, + "post": { + "tags": [ + "TimesheetPeriods" + ], + "summary": "Create Periods", + "description": "Creates new periods with values provided in request body.", + "requestBody": { + "description": "List of new periods to create. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.TimesheetPeriodCreate" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.TimesheetPeriodCreate" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.TimesheetPeriodCreate" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.TimesheetPeriodCreate" + } + } + } + } + }, + "responses": { + "200": { + "description": "Operation success.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "POST /api/sg/v1/timesheetperiods/\r\n\r\n[\r\n {\r\n \"start\": \"2018-02-19T00:00:00\",\r\n \"finish\": \"2018-02-25T00:00:00\",\r\n \"title\": \"Your period name\",\r\n \"isOpen\": false\r\n }\r\n]" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nvar periodsToCreate = new List\r\n{\r\n new TimesheetPeriodCreate\r\n {\r\n Start = DateTime.Now,\r\n Finish = DateTime.Now.AddDays(7),\r\n Title = \"Your period name\",\r\n IsOpen = false\r\n }\r\n};\r\nsgClient.TimesheetPeriodClient.CreatePeriods(periodsToCreate).Result;" + } + ] + }, + "put": { + "tags": [ + "TimesheetPeriods" + ], + "summary": "Update Periods", + "description": "Allows to update specific period.", + "requestBody": { + "description": "A list of periods to update. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.TimesheetPeriodEdit" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.TimesheetPeriodEdit" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.TimesheetPeriodEdit" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.TimesheetPeriodEdit" + } + } + } + } + }, + "responses": { + "200": { + "description": "Operation success." + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "PUT /api/sg/v1/timesheetperiods/\r\n\r\n[\r\n {\r\n \"id\": 41619,\r\n \"title\": \"Your title here\",\r\n \"isOpen\": false,\r\n \"explicitlyOpenedForResourceIds\": null\r\n }\r\n]\r\n" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nvar timesheetPeriodsToUpdate = new List\r\n {\r\n new TimesheetPeriodEdit\r\n {\r\n Id = 41569,\r\n Title = \"Your period name\",\r\n IsOpen = false,\r\n explicitlyOpenedForResourceIds = null\r\n }\r\n };\r\n\r\nsgClient.TimesheetPeriodClient.UpdatePeriods(timesheetPeriodsToUpdate).Wait();" + } + ] + }, + "delete": { + "tags": [ + "TimesheetPeriods" + ], + "summary": "Delete Periods", + "description": "Allows to remove list of available periods if the operation is applicable.", + "parameters": [ + { + "name": "ids", + "in": "query", + "description": "Comma separated list of period identifiers. Has a limit of 5000 entities in a single call.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Operation success." + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "DELETE /api/sg/v1/timesheetperiods/?ids=41611,41604" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.TimesheetPeriodClient.Delete(new List { 41611, 41604 }).Wait();" + } + ] + } + }, + "/api/sg/v1/Timesheets/{id}": { + "get": { + "tags": [ + "Timesheets" + ], + "summary": "Get Timesheet", + "description": "Gets the timesheet by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A unique identifier of timesheet.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "dataUnit", + "in": "query", + "description": "Data unit of timesheet allocations. By default allocations provided in Time.", + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.DominantUnit" + } + }, + { + "name": "includeAllRows", + "in": "query", + "description": "Allows to get any timesheet with all rows in the system, if user has SG.Api.Model.PermissionFlag.ManageAllTimesheets permission.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Timesheet" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Timesheet" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Timesheet" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/timesheets/1?dataUnit=Time&includeAllRows=false" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.TimesheetClient.GetTimesheet(1, DominantUnit.Time, false).Result;" + } + ] + } + }, + "/api/sg/v1/Timesheets": { + "get": { + "tags": [ + "Timesheets" + ], + "summary": "List Timesheets", + "description": "Gets the list of timesheets user has access to.", + "parameters": [ + { + "name": "ids", + "in": "query", + "description": "Comma separated ids of the timesheets. Mandatory parameter if page is not specified. Mutually exclusive with parameter page.", + "schema": { + "type": "string" + } + }, + { + "name": "periodIds", + "in": "query", + "description": "Optional filter parameter to find timesheet with given periodIds. Mutually exclusive with parameter ids.", + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "The index of page to return. Mandatory parameter if ids is not specified. Mutually exclusive with parameter ids.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "The maximum number of items to return per page. Mandatory parameter with page.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "resourceId", + "in": "query", + "description": "An id of resource who is timesheet owner.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "deletedResourceId", + "in": "query", + "description": "An id of deleted resource who is timesheet owner.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "resourceExternalId", + "in": "query", + "description": "An external id of resource who is timesheet owner.", + "schema": { + "type": "string" + } + }, + { + "name": "timesheetStatus", + "in": "query", + "description": "Timesheet status.", + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.TimesheetStatus" + } + }, + { + "name": "modifiedLaterThan", + "in": "query", + "description": "Optional filter parameter to find timesheets that have been modified later than given timestamp. Mutually exclusive with parameter ids. Timestamp format 2018-04-20T18:30:00.", + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "dataUnit", + "in": "query", + "description": "Data unit of timesheet allocations. By default allocations provided in Time.", + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.DominantUnit" + } + }, + { + "name": "includeAllTimesheets", + "in": "query", + "description": "Allows to get any timesheet in the system, if user has SG.Api.Model.PermissionFlag.ManageAllTimesheets permission.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "The list of available timesheets.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.PagedResult`1[[SG.Api.Model.Timesheet, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.PagedResult`1[[SG.Api.Model.Timesheet, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.PagedResult`1[[SG.Api.Model.Timesheet, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/timesheets/?page=1&pageSize=10&TimesheetStatus=Submitted&dataUnit=Time&includeAllTimesheets=false" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.TimesheetClient.GetTimesheets(null, 1, 10, null, null, TimesheetStatus.Submitted, DominantUnit.Time, false).Result;" + } + ] + }, + "post": { + "tags": [ + "Timesheets" + ], + "summary": "Save Timesheets", + "description": "Save timesheets with values provided in request body.", + "parameters": [ + { + "name": "dominantUnit", + "in": "query", + "description": "The unit of timesheets data. Timesheet allocations can be updated only in dominant unit that is selected in timesheet settings. Parameter is optional for backward compatibility reasons. It's recommended to send unit of timesheets allocations.", + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.DominantUnit" + } + } + ], + "requestBody": { + "description": "List of timesheet details. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.TimesheetEdit" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.TimesheetEdit" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.TimesheetEdit" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.TimesheetEdit" + } + } + } + } + }, + "responses": { + "200": { + "description": "Operation success.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "POST /api/sg/v1/timesheets?dominantUnit=Time\r\n\r\n[\r\n {\r\n \"id\": 0,\r\n \"resourceId\": 1,\r\n \"periodId\": 41618,\r\n \"dataRows\": [\r\n {\r\n \"id\": 0,\r\n \"taskId\": 1,\r\n \"hoursData\": [ 4.0, 4.0, 6.0 ],\r\n \"note\": \"note\"\r\n }\r\n ]\r\n }\r\n]" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nvar timesheetsToCreate = new List\r\n {\r\n new TimesheetEdit\r\n {\r\n PeriodId = period.Id,\r\n ResourceId = resource.Id,\r\n DataRows = new List\r\n {\r\n new TimesheetRowEdit\r\n {\r\n TaskId = task.Id,\r\n HoursData = new double[] { 4, 4, 6 },\r\n Note = \"note\"\r\n }\r\n }\r\n }\r\n };\r\n\r\nsgClient.TimesheetClient.Save(timesheetsToCreate, DominantUnit.Time).Result;\r\n" + } + ] + }, + "delete": { + "tags": [ + "Timesheets" + ], + "summary": "Delete Timesheets", + "description": "Removes timesheets by identifiers list.", + "parameters": [ + { + "name": "ids", + "in": "query", + "description": "Comma separated list of unique timesheet identifiers. Has a limit of 5000 entities in a single call.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Operation success." + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "DELETE /api/sg/v1/timesheets/?ids=1,2,3,4,5,6,7,8" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.TimesheetClient.Delete(new List { 1, 2, 3, 4, 5, 6, 7, 8 }).Wait();" + } + ] + } + }, + "/api/sg/v1/Timesheets/Submit": { + "put": { + "tags": [ + "Timesheets" + ], + "summary": "Submit Timesheets", + "description": "Submit timesheets for approval.", + "requestBody": { + "description": "Timesheet action details. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.TimesheetAction" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.TimesheetAction" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.TimesheetAction" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.TimesheetAction" + } + } + } + }, + "responses": { + "200": { + "description": "Operation success." + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "PUT /api/sg/v1/timesheets/submit\r\n\r\n{\r\n timesheetsIds: [ 1, 2, 3, 4, 5, 6, 7, 8 ],\r\n comment: 'Your comment'\r\n}" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nvar timesheetIds = new List { 1, 2, 3, 4, 5, 6, 7, 8 };\r\nvar comment = \"Your comment\";\r\nvar action = new TimesheetAction\r\n {\r\n TimesheetsIds = timesheetIds,\r\n Comment = comment\r\n };\r\nsgClient.TimesheetClient.Submit(action).Wait();" + } + ] + } + }, + "/api/sg/v1/Timesheets/Reject": { + "put": { + "tags": [ + "Timesheets" + ], + "summary": "Reject Timesheets", + "description": "Reject timesheets.", + "requestBody": { + "description": "Timesheet action details. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.TimesheetAction" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.TimesheetAction" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.TimesheetAction" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.TimesheetAction" + } + } + } + }, + "responses": { + "200": { + "description": "Operation success." + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "PUT /api/sg/v1/timesheets/reject\r\n\r\n{\r\n timesheetsIds: [ 1, 2, 3, 4, 5, 6, 7, 8 ],\r\n comment: 'Your comment'\r\n}" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nvar timesheetIds = new List { 1, 2, 3, 4, 5, 6, 7, 8 };\r\nvar comment = \"Your comment\";\r\nvar action = new TimesheetAction\r\n {\r\n TimesheetsIds = timesheetIds,\r\n Comment = comment\r\n };\r\nsgClient.TimesheetClient.Reject(action).Wait();" + } + ] + } + }, + "/api/sg/v1/Timesheets/Archive": { + "put": { + "tags": [ + "Timesheets" + ], + "summary": "Archive Timesheets", + "description": "Archive timesheets.", + "requestBody": { + "description": "Timesheet action details. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.TimesheetAction" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.TimesheetAction" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.TimesheetAction" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.TimesheetAction" + } + } + } + }, + "responses": { + "200": { + "description": "Operation success." + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "PUT /api/sg/v1/timesheets/archive\r\n\r\n{\r\n timesheetsIds: [ 1, 2, 3, 4, 5, 6, 7, 8 ],\r\n comment: 'Your comment'\r\n}" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nvar timesheetIds = new List { 1, 2, 3, 4, 5, 6, 7, 8 };\r\nvar comment = \"Your comment\";\r\nvar action = new TimesheetAction\r\n {\r\n TimesheetsIds = timesheetIds,\r\n Comment = comment\r\n };\r\nsgClient.TimesheetClient.Archive(action).Wait();" + } + ] + } + }, + "/api/sg/v1/Timesheets/Retract": { + "put": { + "tags": [ + "Timesheets" + ], + "summary": "Retract Timesheets", + "description": "Retract timesheet.s.", + "requestBody": { + "description": "Timesheet action details. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.TimesheetAction" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.TimesheetAction" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.TimesheetAction" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.TimesheetAction" + } + } + } + }, + "responses": { + "200": { + "description": "Operation success." + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "PUT /api/sg/v1/timesheets/retract\r\n\r\n{\r\n timesheetsIds: [ 1, 2, 3, 4, 5, 6, 7, 8 ],\r\n comment: 'Your comment'\r\n}" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nvar timesheetIds = new List { 1, 2, 3, 4, 5, 6, 7, 8 };\r\nvar comment = \"Your comment\";\r\nvar action = new TimesheetAction\r\n {\r\n TimesheetsIds = timesheetIds,\r\n Comment = comment\r\n };\r\nsgClient.TimesheetClient.Retract(action).Wait();" + } + ] + } + }, + "/api/sg/v1/Timesheets/RejectAllocations": { + "put": { + "tags": [ + "Timesheets" + ], + "summary": "Reject Project Allocations", + "description": "Reject updating allocations in project from timesheets.", + "requestBody": { + "description": "Timesheet action details. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.TimesheetAllocationsAction" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.TimesheetAllocationsAction" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.TimesheetAllocationsAction" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.TimesheetAllocationsAction" + } + } + } + } + }, + "responses": { + "200": { + "description": "Operation success." + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "PUT /api/sg/v1/timesheets/RejectAllocations\r\n\r\n[\r\n \t{\r\n \t\t\"timesheetId\" : 6,\r\n \t\t\"comment\" : \"reject\"\r\n \t}\r\n]\r\n" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nvar timesheetIds = new List { 1, 2, 3, 4, 5, 6, 7, 8 };\r\nvar actions = timesheetIds.Select(t => new TimesheetAllocationsAction\r\n {\r\n TimesheetId = t,\r\n Comment = \"reject\"\r\n }).ToList();\r\nsgClient.TimesheetClient.RejectAllocations(actions).Wait();" + } + ] + } + }, + "/api/sg/v1/Timesheets/ApproveAllocations": { + "put": { + "tags": [ + "Timesheets" + ], + "summary": "Approve Project Allocations", + "description": "Approve updating allocations in project from timesheets.", + "requestBody": { + "description": "Timesheet action details. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.TimesheetAllocationsAction" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.TimesheetAllocationsAction" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.TimesheetAllocationsAction" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.TimesheetAllocationsAction" + } + } + } + } + }, + "responses": { + "200": { + "description": "Operation success." + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "PUT /api/sg/v1/timesheets/ApproveAllocations\r\n\r\n[\r\n \t{\r\n \t\t\"timesheetId\" : 6,\r\n \t\t\"comment\" : \"approved\"\r\n \t}\r\n]\r\n" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nvar timesheetIds = new List { 1, 2, 3, 4, 5, 6, 7, 8 };\r\nvar actions = timesheetIds.Select(t => new TimesheetAllocationsAction\r\n {\r\n TimesheetId = t,\r\n Comment = \"approve\"\r\n }).ToList();\r\nsgClient.TimesheetClient.ApproveAllocations(actions).Wait();" + } + ] + } + }, + "/api/sg/v1/Timesheets/Tasks": { + "get": { + "tags": [ + "Timesheets" + ], + "summary": "List Tasks", + "description": "Get list of tasks available for given periods.", + "parameters": [ + { + "name": "periodIds", + "in": "query", + "description": "Comma separated list of ids of periods.", + "schema": { + "type": "string" + } + }, + { + "name": "resourceIds", + "in": "query", + "description": "Comma separated list of ids of resources. Can be specified only when user has SG.Api.Model.PermissionFlag.ManageAllTimesheets permission. If not specified, tasks of api token owner provided.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.TimesheetTasks" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.TimesheetTasks" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.TimesheetTasks" + } + } + } + } + } + } + }, + "/api/sg/v1/Timesheets/AllTimesheets": { + "get": { + "tags": [ + "Timesheets" + ], + "summary": "Get All Timesheets", + "description": "Generates the All Timesheets report.", + "parameters": [ + { + "name": "from", + "in": "query", + "description": "An optional start date of the report.", + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "to", + "in": "query", + "description": "An optional end date of the report.", + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "dataUnit", + "in": "query", + "description": "Report can be requested only in Time or FTE units.", + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.DataUnit" + } + }, + { + "name": "aggregationUnit", + "in": "query", + "description": "Specifies whether timesheet allocations must be aggregated by day or by timesheet period.", + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.AllTimesheetsReport.AggregationUnit" + } + }, + { + "name": "detailLevel", + "in": "query", + "description": "Specifies whether report data should be provided by resource or by resource and task.", + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.AllTimesheetsReport.DetailLevel" + } + }, + { + "name": "includeActivities", + "in": "query", + "description": "Specifies whether report should include timesheet activities.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.AllTimesheetsReport.AllTimesheetsResult" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.AllTimesheetsReport.AllTimesheetsResult" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.AllTimesheetsReport.AllTimesheetsResult" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/timesheets/allTimesheets?from=2021-01-01&to=2021-12-31&dataUnit=Time&aggregationUnit=ByPeriod&detailedLevel=ByResource&includeActivities=true" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.TimesheetClient.AllTimesheetsData(new DateTime(2021, 1, 1), new DateTime(2021, 12, 31), DataUnit.Time, AggregationUnit.ByPeriod, DetailLevel.ByResource, true).Result;" + } + ] + } + }, + "/api/sg/v1/TimesheetSettings": { + "get": { + "tags": [ + "TimesheetSettings" + ], + "summary": "List Timesheet Settings", + "description": "Provides timesheet settings.", + "responses": { + "200": { + "description": "Operation success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.TimesheetSettings" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.TimesheetSettings" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.TimesheetSettings" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/timesheetsettings" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.TimesheetSettingsClient.GetSettings().Result;" + } + ] + } + }, + "/api/sg/v1/Workflows": { + "get": { + "tags": [ + "Workflows" + ], + "summary": "List Workflows", + "description": "Gets the list of workflows for provided project ids.", + "parameters": [ + { + "name": "ids", + "in": "query", + "description": "Ids of workflows separated by comma.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.Workflow" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.Workflow" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.Workflow" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/workflows" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.WorkflowsClient.GetWorkflows().Result;" + } + ] + }, + "post": { + "tags": [ + "Workflows" + ], + "summary": "Create Workflows", + "description": "Create new workflows with values provided in request body.", + "requestBody": { + "description": "The list of workflows to create. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.WorkflowEdit" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.WorkflowEdit" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.WorkflowEdit" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.WorkflowEdit" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "POST/api/sg/v1/workflows/\r\n\r\n[\r\n {\r\n \"id\": null,\r\n \"name\": \"Your workflow name\",\r\n \"description\": \"Your workflow description\",\r\n \"entityType\": \"Assignment\",\r\n \"customFieldId\": 125,\r\n \"assignmentWorkflowPermissions\": [\r\n {\r\n \"enumMemberId\": 235,\r\n \"readPermissions\": {\r\n \"everybody\": true,\r\n \"resourceIds\": [],\r\n \"resourceSecurityGroupIds\": [],\r\n \"globalRoleIds\": []\r\n },\r\n \"writePermissions\": {\r\n \"everybody\": true,\r\n \"resourceIds\": [],\r\n \"resourceSecurityGroupIds\": [],\r\n \"globalRoleIds\": []\r\n }\r\n },\r\n {\r\n \"enumMemberId\": 236,\r\n \"readPermissions\": {\r\n \"everybody\": false,\r\n \"resourceExternalIds\": [1],\r\n \"resourceSecurityGroupIds\": [1],\r\n \"globalRoleIds\": [1]\r\n },\r\n \"writePermissions\": {\r\n \"everybody\": false,\r\n \"resourceIds\": [1],\r\n \"resourceSecurityGroupIds\": [1],\r\n \"globalRoleIds\": [1]\r\n }\r\n }\r\n ]\r\n }\r\n]" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\n\r\nvar workflowsToCreate = new List\r\n{\r\n new WorkflowEdit\r\n {\r\n Id = null,\r\n Name = \"Your workflow name\",\r\n Description = \"Your workflow description\",\r\n CustomFieldId = 125,\r\n EntityType = EntityType.Assignment,\r\n AssignmentWorkflowPermissions = new List\r\n {\r\n new AssignmentWorkflowStatePermissions\r\n {\r\n EnumMemberId = 151,\r\n ReadPermissions = new AssignmentWorkflowPermissions\r\n {\r\n Everybody = true,\r\n ResourceIds = new List(),\r\n ResourceSecurityGroupIds = new List(),\r\n GlobalRoleIds = new List(),\r\n },\r\n WritePermissions = new AssignmentWorkflowPermissions\r\n {\r\n Everybody = true,\r\n ResourceIds = new List(),\r\n ResourceSecurityGroupIds = new List(),\r\n GlobalRoleIds = new List(),\r\n },\r\n },\r\n new AssignmentWorkflowStatePermissions\r\n {\r\n EnumMemberId = 152,\r\n ReadPermissions = new AssignmentWorkflowPermissions\r\n {\r\n Everybody = false,\r\n ResourceIds = new List\r\n {\r\n 1\r\n },\r\n ResourceSecurityGroupIds = new List\r\n {\r\n 1\r\n },\r\n GlobalRoleIds = new List\r\n {\r\n 1\r\n },\r\n },\r\n WritePermissions = new AssignmentWorkflowPermissions\r\n {\r\n Everybody = false,\r\n ResourceIds = new List\r\n {\r\n 1\r\n },\r\n ResourceSecurityGroupIds = new List\r\n {\r\n 1\r\n },\r\n GlobalRoleIds = new List\r\n {\r\n 1\r\n },\r\n },\r\n }\r\n }\r\n }\r\n};\r\n\r\nvar workflowIds = ApiClient.WorkflowsClient.CreateWorkflows(workflowsToCreate).Result;" + } + ] + }, + "put": { + "tags": [ + "Workflows" + ], + "summary": "Update Workflows", + "description": "Update the list of existing workflows with values provided in request body.", + "requestBody": { + "description": "The list of workflows to update. Has a limit of 5000 entities in a single call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.WorkflowEdit" + } + } + }, + "multipart/form-data": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.WorkflowEdit" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.WorkflowEdit" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.WorkflowEdit" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "PUT/api/sg/v1/workflows/\r\n\r\n[\r\n {\r\n \"id\": 3,\r\n \"name\": \"Your workflow name\",\r\n \"description\": \"Your workflow description\",\r\n \"entityType\": \"Assignment\",\r\n \"customFieldId\": 125,\r\n \"assignmentWorkflowPermissions\": [\r\n {\r\n \"enumMemberId\": 235,\r\n \"readPermissions\": {\r\n \"everybody\": true,\r\n \"resourceIds\": [],\r\n \"resourceSecurityGroupIds\": [],\r\n \"globalRoleIds\": []\r\n },\r\n \"writePermissions\": {\r\n \"everybody\": true,\r\n \"resourceIds\": [],\r\n \"resourceSecurityGroupIds\": [],\r\n \"globalRoleIds\": []\r\n }\r\n },\r\n {\r\n \"enumMemberId\": 236,\r\n \"readPermissions\": {\r\n \"everybody\": false,\r\n \"resourceExternalIds\": [1],\r\n \"resourceSecurityGroupIds\": [1],\r\n \"globalRoleIds\": [1]\r\n },\r\n \"writePermissions\": {\r\n \"everybody\": false,\r\n \"resourceIds\": [1],\r\n \"resourceSecurityGroupIds\": [1],\r\n \"globalRoleIds\": [1]\r\n }\r\n }\r\n ]\r\n }\r\n]" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\n\r\nvar workflowsToUpdate = new List\r\n{\r\n new WorkflowEdit\r\n {\r\n Id = 3,\r\n Name = \"Your workflow name\",\r\n Description = \"Your workflow description\",\r\n CustomFieldId = 125,\r\n EntityType = EntityType.Assignment,\r\n AssignmentWorkflowPermissions = new List\r\n {\r\n new AssignmentWorkflowStatePermissions\r\n {\r\n EnumMemberId = 151,\r\n ReadPermissions = new AssignmentWorkflowPermissions\r\n {\r\n Everybody = true,\r\n ResourceIds = new List(),\r\n ResourceSecurityGroupIds = new List(),\r\n GlobalRoleIds = new List(),\r\n },\r\n WritePermissions = new AssignmentWorkflowPermissions\r\n {\r\n Everybody = true,\r\n ResourceIds = new List(),\r\n ResourceSecurityGroupIds = new List(),\r\n GlobalRoleIds = new List(),\r\n },\r\n },\r\n new AssignmentWorkflowStatePermissions\r\n {\r\n EnumMemberId = 152,\r\n ReadPermissions = new AssignmentWorkflowPermissions\r\n {\r\n Everybody = false,\r\n ResourceIds = new List\r\n {\r\n 1\r\n },\r\n ResourceSecurityGroupIds = new List\r\n {\r\n 1\r\n },\r\n GlobalRoleIds = new List\r\n {\r\n 1\r\n },\r\n },\r\n WritePermissions = new AssignmentWorkflowPermissions\r\n {\r\n Everybody = false,\r\n ResourceIds = new List\r\n {\r\n 1\r\n },\r\n ResourceSecurityGroupIds = new List\r\n {\r\n 1\r\n },\r\n GlobalRoleIds = new List\r\n {\r\n 1\r\n },\r\n },\r\n }\r\n }\r\n }\r\n};\r\n\r\nvar workflowIds = ApiClient.WorkflowsClient.UpdateWorkflows(workflowsToUpdate).Result;" + } + ] + }, + "delete": { + "tags": [ + "Workflows" + ], + "summary": "Delete Workflows", + "description": "Delete workflows with given ids.", + "parameters": [ + { + "name": "ids", + "in": "query", + "description": "Comma separated ids of the workflows to delete. Has a limit of 5000 entities in a single call.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "DELETE /api/sg/v1/workflows?ids=3,4" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.WorkflowsClient.DeleteWorkflows(new List { 3, 4 }).Wait();" + } + ] + } + }, + "/api/sg/v1/Workflows/{id}": { + "get": { + "tags": [ + "Workflows" + ], + "summary": "Get Workflow", + "description": "Get workflow by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Id of workflow.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Workflow" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Workflow" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SG.Api.Model.Workflow" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/sg/v1/workflows/1" + }, + { + "lang": "C#", + "source": "var sgClient = new SupergridRestClient(sgUrl, token);\r\nsgClient.WorkflowsClient.GetWorkflow(1).Result;" + } + ] + } + } + }, + "components": { + "schemas": { + "SG.Api.Model.Actor": { + "type": "object", + "properties": { + "resourceId": { + "type": "integer", + "description": "Id of resource who modified any objects in the system.", + "format": "int32", + "nullable": true + }, + "resourceExternalId": { + "type": "string", + "description": "External Id of resource who modified any objects in the system.", + "nullable": true + }, + "systemActor": { + "$ref": "#/components/schemas/SG.Api.Model.SystemActorKey" + } + }, + "additionalProperties": false, + "description": "Actor who can modify objects in the system." + }, + "SG.Api.Model.AdminTime": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of Admin Time.", + "format": "int32" + }, + "hoursData": { + "type": "array", + "items": { + "type": "number", + "format": "double" + }, + "description": "Compressed hours data for this Admin Time.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Admin Time." + }, + "SG.Api.Model.AdminTimeEdit": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of Admin Time.", + "format": "int32" + }, + "hoursData": { + "type": "array", + "items": { + "type": "number", + "format": "double" + }, + "description": "Compressed hours data for this Admin Time.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Admin Time details that can be updated." + }, + "SG.Api.Model.AdminTimeType": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of the admin time.", + "format": "int32" + }, + "name": { + "type": "string", + "description": "Name of the admin time.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Admin time definition with id and name." + }, + "SG.Api.Model.AdvancedRate": { + "type": "object", + "properties": { + "startDate": { + "type": "string", + "description": "Defines start date on which rate will be applicable.", + "format": "date-time" + }, + "rate": { + "type": "number", + "description": "Defines rate for time period starting on StartDate.", + "format": "double" + } + }, + "additionalProperties": false, + "description": "Advanced rate details that can be updated." + }, + "SG.Api.Model.AllTimesheetsReport.AggregationUnit": { + "enum": [ + "byDay", + "byPeriod" + ], + "type": "string", + "description": "The aggregation unit for the All Timesheets report." + }, + "SG.Api.Model.AllTimesheetsReport.AllTimesheetsResult": { + "type": "object", + "properties": { + "reportPeriods": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.AllTimesheetsReport.TimesheetPeriodBrief" + }, + "description": "If the report is requested by periods, this property is the list of periods.", + "nullable": true + }, + "taskNamesById": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/SG.Api.Model.AllTimesheetsReport.TaskAndProjectName" + }, + "description": "If task and project names are requested, this dictionary has the names by string key.", + "nullable": true + }, + "resourceNamesById": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/SG.Api.Model.AllTimesheetsReport.ResourceName" + }, + "description": "The resource names (by string key).", + "nullable": true + }, + "timesheets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.AllTimesheetsReport.TimesheetData" + }, + "description": "The report rows.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "The All Timesheets report result." + }, + "SG.Api.Model.AllTimesheetsReport.DetailLevel": { + "enum": [ + "byResource", + "byResourceAndTask" + ], + "type": "string", + "description": "The level of detail for the All Timesheets report." + }, + "SG.Api.Model.AllTimesheetsReport.ResourceName": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The archived or actual resource name.", + "nullable": true + }, + "resourceId": { + "type": "integer", + "format": "int32" + }, + "resourceExternalId": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Resource details." + }, + "SG.Api.Model.AllTimesheetsReport.TaskAndProjectName": { + "type": "object", + "properties": { + "taskName": { + "type": "string", + "description": "The archived or actual task name.", + "nullable": true + }, + "taskId": { + "type": "integer", + "description": "The task ID in SuperGrid.", + "format": "int32" + }, + "projectName": { + "type": "string", + "description": "The archived or actual project name.", + "nullable": true + }, + "projectId": { + "type": "integer", + "description": "The project ID in SuperGrid.", + "format": "int32" + }, + "projectExternalId": { + "type": "string", + "description": "The External ID of the project, if present.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Task details." + }, + "SG.Api.Model.AllTimesheetsReport.TimesheetActivityData": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of the activity.", + "format": "int32" + }, + "approverResourceNameId": { + "type": "string", + "description": "The name of the timesheet approver.", + "nullable": true + }, + "ownerResourceNameId": { + "type": "string", + "description": "The name of the timesheet owner.", + "nullable": true + }, + "actionType": { + "$ref": "#/components/schemas/SG.Api.Model.TimesheetStatus" + }, + "comment": { + "type": "string", + "description": "Comment on the activity.", + "nullable": true + }, + "timestamp": { + "type": "string", + "description": "Time when the action was taken.", + "format": "date-time" + }, + "requireProjectOwnerApproval": { + "type": "boolean", + "description": "Set approver action if owner approval is required for allocations.", + "nullable": true + }, + "actorResourceNameId": { + "type": "string", + "description": "The name of the timesheet actor who took the action on behalf of timesheet creator, project owner or timesheet approver.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "The timesheet activity data." + }, + "SG.Api.Model.AllTimesheetsReport.TimesheetData": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "A unique identifier of timesheet.", + "format": "int32" + }, + "status": { + "$ref": "#/components/schemas/SG.Api.Model.TimesheetStatus" + }, + "resourceNameId": { + "type": "string", + "description": "The resource name.", + "nullable": true + }, + "periodId": { + "type": "integer", + "description": "The period id.", + "format": "int32" + }, + "rows": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.AllTimesheetsReport.TimesheetRowData" + }, + "description": "The timesheet rows, either by task (if that level of detail is requested) or a single total row.", + "nullable": true + }, + "activities": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.AllTimesheetsReport.TimesheetActivityData" + }, + "description": "List of activities on timesheet.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "The timesheet data." + }, + "SG.Api.Model.AllTimesheetsReport.TimesheetPeriodBrief": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "A unique identifier of timesheet period.", + "format": "int32" + }, + "start": { + "type": "string", + "description": "A period start date.", + "format": "date-time" + }, + "finish": { + "type": "string", + "description": "A period end date.", + "format": "date-time" + }, + "title": { + "type": "string", + "description": "A period name.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Timesheet period brief data." + }, + "SG.Api.Model.AllTimesheetsReport.TimesheetRowData": { + "type": "object", + "properties": { + "taskNameId": { + "type": "string", + "description": "The task name, if that level of detail is requested.", + "nullable": true + }, + "assignmentId": { + "type": "integer", + "description": "The assignment id, if that level of detail is requested.", + "format": "int32", + "nullable": true + }, + "allocationsByDay": { + "type": "array", + "items": { + "type": "number", + "format": "double" + }, + "description": "Timesheet allocations in requested data unit.", + "nullable": true + }, + "totalAllocations": { + "type": "number", + "description": "Timesheet total allocation, if the aggregation requested is by period.", + "format": "double", + "nullable": true + }, + "timesheetTaskNotes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Timesheet task notes.", + "nullable": true + }, + "teamResourceNameId": { + "type": "string", + "description": "The team resource name, if that level of detail is requested.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "The timesheet row data (by task), if that level of detail is requested, or a timesheet total." + }, + "SG.Api.Model.AllocationType": { + "enum": [ + "actual", + "planned" + ], + "type": "string", + "description": "Allocation type of assignment." + }, + "SG.Api.Model.AllocationsResult`1[[SG.Api.Model.CalendarData, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]": { + "type": "object", + "properties": { + "result": { + "$ref": "#/components/schemas/SG.Api.Model.CalendarData" + }, + "timeUnit": { + "$ref": "#/components/schemas/SG.Api.Model.TimeUnit" + }, + "dataUnit": { + "$ref": "#/components/schemas/SG.Api.Model.DataUnit" + }, + "dominantUnit": { + "$ref": "#/components/schemas/SG.Api.Model.DominantUnit" + } + }, + "additionalProperties": false, + "description": "Result with allocations included." + }, + "SG.Api.Model.AllocationsTable": { + "type": "object", + "properties": { + "startDate": { + "type": "string", + "description": "The start date of allocations period.", + "format": "date-time" + }, + "allocations": { + "type": "array", + "items": { + "type": "number", + "format": "double" + }, + "description": "Allocations in requested SG.Api.Model.TimeUnit and SG.Api.Model.DataUnit.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Allocations for time period details." + }, + "SG.Api.Model.ApproveResourceRequest": { + "type": "object", + "properties": { + "resourceRequests": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ResourceRequestEdit" + }, + "description": "List of resource requests to approve.", + "nullable": true + }, + "dominantUnit": { + "$ref": "#/components/schemas/SG.Api.Model.DominantUnit" + }, + "timeUnit": { + "$ref": "#/components/schemas/SG.Api.Model.TimeUnit" + } + }, + "additionalProperties": false, + "description": "Approve Resource Request." + }, + "SG.Api.Model.AssignedTask": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of the task.", + "format": "int32", + "nullable": true, + "deprecated": true + }, + "taskId": { + "type": "integer", + "description": "Id of the task.", + "format": "int32" + }, + "assignmentId": { + "type": "integer", + "description": "Id of the assignment.", + "format": "int32", + "nullable": true + }, + "isSelfService": { + "type": "boolean", + "description": "If self service allowed in project." + }, + "teamResourceId": { + "type": "integer", + "description": "Id of the team resource.", + "format": "int32", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Task assigned to resource." + }, + "SG.Api.Model.Assignment": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of the assignment.", + "format": "int32" + }, + "taskId": { + "type": "integer", + "description": "Task Id of the assignment.", + "format": "int32" + }, + "resourceId": { + "type": "integer", + "description": "Resource Id of the assignment.", + "format": "int32" + }, + "resourceExternalId": { + "type": "string", + "description": "External Id of the assignment resource.", + "nullable": true + }, + "projectId": { + "type": "integer", + "description": "Id of the project which holds the assignment.", + "format": "int32" + }, + "projectExternalId": { + "type": "string", + "description": "External Id of the project which holds the assignment.", + "nullable": true + }, + "updatedOn": { + "type": "string", + "description": "Time when assignment was last updated.", + "format": "date-time" + }, + "actualAllocations": { + "$ref": "#/components/schemas/SG.Api.Model.AllocationsTable" + }, + "plannedAllocations": { + "$ref": "#/components/schemas/SG.Api.Model.AllocationsTable" + }, + "workHours": { + "type": "number", + "description": "Work hours for schedule plan task.", + "format": "double", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Assignment." + }, + "SG.Api.Model.AssignmentEdit": { + "type": "object", + "properties": { + "taskId": { + "type": "integer", + "description": "Task Id of the assignment.", + "format": "int32" + }, + "resourceId": { + "type": "integer", + "description": "Resource Id of the assignment. Mutually exclusive with ResourceExternalId.", + "format": "int32" + }, + "assignmentId": { + "type": "integer", + "description": "The id of assignment.", + "format": "int32", + "nullable": true + }, + "resourceExternalId": { + "type": "string", + "description": "The resource external id. Mutually exclusive with ResourceId.", + "nullable": true + }, + "actualStartDate": { + "type": "string", + "description": "Start date of actual allocations.", + "format": "date-time", + "nullable": true + }, + "actualAllocations": { + "type": "array", + "items": { + "type": "number", + "format": "double" + }, + "description": "Compressed array of actual allocations of the assignment. Must be specified only when ActualStartDate specified.", + "nullable": true + }, + "plannedStartDate": { + "type": "string", + "description": "Start date of planned allocations.", + "format": "date-time", + "nullable": true + }, + "plannedAllocations": { + "type": "array", + "items": { + "type": "number", + "format": "double" + }, + "description": "Compressed array of planned allocations of the assignment. Must be specified only when PlannedStartDate specified.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Assignment Edit." + }, + "SG.Api.Model.AssignmentKey": { + "type": "object", + "properties": { + "resourceId": { + "type": "integer", + "description": "The id of resource included into assignment. Mutually exclusive with ResourceExternalId.", + "format": "int32" + }, + "resourceExternalId": { + "type": "string", + "description": "The resource external id. Mutually exclusive with ResourceId.", + "nullable": true + }, + "taskId": { + "type": "integer", + "description": "The id of task included into assignment.", + "format": "int32" + }, + "assignmentId": { + "type": "integer", + "description": "The id of assignment.", + "format": "int32", + "nullable": true + } + }, + "additionalProperties": false, + "description": "The assignment identity." + }, + "SG.Api.Model.AssignmentWorkflowPermissions": { + "type": "object", + "properties": { + "everybody": { + "type": "boolean", + "description": "Defines whether all resources have access to assignments." + }, + "resourceIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "Ids of resources that have access to assignments. Mutually exclusive with ResourceExternalIds.", + "nullable": true + }, + "resourceExternalIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "External ids of resources that have access to assignments. Mutually exclusive with ResourceIds.", + "nullable": true + }, + "resourceSecurityGroupIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "Ids of resources security groups that have access to assignments.", + "nullable": true + }, + "globalRoleIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "Ids of global roles that have access to assignments.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Permissions set defines access to assignments for assignment workflow." + }, + "SG.Api.Model.AssignmentWorkflowStatePermissions": { + "type": "object", + "properties": { + "enumMemberId": { + "type": "integer", + "description": "The id of enum member of assignment workflow custom field.", + "format": "int32" + }, + "readPermissions": { + "$ref": "#/components/schemas/SG.Api.Model.AssignmentWorkflowPermissions" + }, + "writePermissions": { + "$ref": "#/components/schemas/SG.Api.Model.AssignmentWorkflowPermissions" + } + }, + "additionalProperties": false, + "description": "Permissions associated with specific enum member of assignment workflow custom field." + }, + "SG.Api.Model.AssignmentsCustomFieldValuesFilter": { + "type": "object", + "properties": { + "assignmentIds": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.AssignmentKey" + }, + "description": "The list of assignment ids.", + "nullable": true + }, + "customFieldIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "The list of custom field ids.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "The filter for requested assignment custom field values." + }, + "SG.Api.Model.AuditLogActorKey": { + "enum": [ + "system", + "userSGUI", + "userSGUIBpa", + "userSGUITimesheets", + "userSGApi", + "userTempusUI", + "userReportsUI", + "syncExcel", + "syncMsProject", + "syncMpp", + "syncMsProjectSql", + "syncSmartsheet", + "syncWorkfront", + "syncJira", + "syncPpmPro", + "jiraBot" + ], + "type": "string", + "description": "Audit log actor." + }, + "SG.Api.Model.AuditLogItem": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of the log.", + "format": "int32" + }, + "createdOn": { + "type": "string", + "description": "Time when the log was created.", + "format": "date-time" + }, + "actorUserId": { + "type": "integer", + "description": "User Id who performed the action.", + "format": "int32", + "nullable": true + }, + "impersonatedUserId": { + "type": "integer", + "description": "User Id who is being impersonated by actor.", + "format": "int32", + "nullable": true + }, + "actorKey": { + "$ref": "#/components/schemas/SG.Api.Model.AuditLogActorKey" + }, + "data": { + "type": "string", + "description": "Log body data.", + "nullable": true + }, + "dataTable": { + "type": "string", + "description": "Log tables containing allocation, capacity changes.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Audit log item." + }, + "SG.Api.Model.AutoCalculatedRate": { + "type": "object", + "properties": { + "startDate": { + "type": "string", + "description": "Defines start date of calculated rate.", + "format": "date-time", + "nullable": true + }, + "rates": { + "type": "array", + "items": { + "type": "number", + "format": "double" + }, + "description": "Auto calculated rate for the resource for each working day in team resource dates.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Calculated rate of the team resource." + }, + "SG.Api.Model.AvailableProjectsToLink": { + "type": "object", + "properties": { + "projectId": { + "type": "integer", + "description": "Id of parent project that the available linkable project belong to.", + "format": "int32" + }, + "projectExternalId": { + "type": "string", + "description": "External Id of parent project that the available linkable project belong to.", + "nullable": true + }, + "availableProjectIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "Linkable project id set available for project.", + "nullable": true + }, + "availableProjectExternalIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Linkable project external id set available for project.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Represents available projects to link for project." + }, + "SG.Api.Model.Budget": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "The budget identity.", + "format": "int32" + }, + "name": { + "type": "string", + "description": "The budget name.", + "nullable": true + }, + "description": { + "type": "string", + "description": "The budget description.", + "nullable": true + }, + "startMonth": { + "type": "string", + "description": "Budget start month.", + "format": "date-time" + }, + "endMonth": { + "type": "string", + "description": "Budget end month.", + "format": "date-time" + }, + "ownerId": { + "type": "integer", + "description": "The id of resource who created a budget.", + "format": "int32" + }, + "resourceExternalId": { + "type": "string", + "description": "The external id of the resource who created a budget.", + "nullable": true + }, + "createdOn": { + "type": "string", + "description": "Time when budget was created.", + "format": "date-time" + }, + "costType": { + "$ref": "#/components/schemas/SG.Api.Model.BudgetCostType" + }, + "customFieldId": { + "type": "integer", + "description": "Aggregation custom field id selected for budget. Only custom fields of Enum type can be used.", + "format": "int32" + }, + "isShared": { + "type": "boolean", + "description": "Defines if budget is visible for users others than budget owner." + }, + "budgetRows": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BudgetRow" + }, + "description": "Budget rows for each custom field member.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Budget details." + }, + "SG.Api.Model.BudgetCostType": { + "enum": [ + "planned", + "actual" + ], + "type": "string", + "description": "Represents cost types options which can be used in budget. Budget will include project financial costs of associated Fiancial cost type." + }, + "SG.Api.Model.BudgetEdit": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "The budget identity.", + "format": "int32", + "nullable": true + }, + "name": { + "type": "string", + "description": "The budget name.", + "nullable": true + }, + "description": { + "type": "string", + "description": "The budget description.", + "nullable": true + }, + "startMonth": { + "type": "string", + "description": "Budget start month. Only year and month should be specified: \"2018-11-01T00:00:00Z\".", + "format": "date-time" + }, + "endMonth": { + "type": "string", + "description": "Budget end month. Only year and month should be specified: \"2018-11-01T00:00:00Z\".", + "format": "date-time" + }, + "costType": { + "$ref": "#/components/schemas/SG.Api.Model.BudgetCostType" + }, + "customFieldId": { + "type": "integer", + "description": "Aggregation custom field id selected for budget. Only custom fields of Enum type can be used.", + "format": "int32" + }, + "isShared": { + "type": "boolean", + "description": "Defines if budget is visible for users others than budget owner." + }, + "budgetRows": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.BudgetRowEdit" + }, + "description": "Budget rows for each custom field member.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Budget details that can be updated." + }, + "SG.Api.Model.BudgetRow": { + "type": "object", + "properties": { + "customFieldMemberId": { + "type": "integer", + "description": "Enum member id of aggregation custom field selected for budget.", + "format": "int32" + }, + "budgetCosts": { + "type": "array", + "items": { + "type": "number", + "format": "double" + }, + "description": "Budget costs for custom field member.", + "nullable": true + }, + "projectsCosts": { + "type": "array", + "items": { + "type": "number", + "format": "double" + }, + "description": "Financial costs of projects with assigned custom field member.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Represents budget financial information for specific custom field member." + }, + "SG.Api.Model.BudgetRowEdit": { + "type": "object", + "properties": { + "customFieldMemberId": { + "type": "integer", + "description": "Enum member id of aggregation custom field selected for budget.", + "format": "int32" + }, + "budgetCosts": { + "type": "array", + "items": { + "type": "number", + "format": "double" + }, + "description": "Budget costs for custom field member.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Represents budget financial information for specific custom field member which can be modified." + }, + "SG.Api.Model.BulkCapacityEdit": { + "type": "object", + "properties": { + "resourceIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "The ids of resources to update. Mutually exclusive with ResourceExternalId.", + "nullable": true + }, + "resourceExternalIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The external ids of resources to update. Mutually exclusive with ResourceIds.", + "nullable": true + }, + "capacity": { + "$ref": "#/components/schemas/SG.Api.Model.CapacityEdit" + } + }, + "additionalProperties": false, + "description": "Bulk resource capacity update information." + }, + "SG.Api.Model.BulkCustomFieldValue": { + "type": "object", + "properties": { + "value": { + "$ref": "#/components/schemas/SG.Api.Model.CustomFieldValue" + }, + "valueExternalId": { + "type": "string", + "description": "External Id of the resource set as the SG.Api.Model.BulkCustomFieldValue.Value for SG.Api.Model.CustomFieldDataType.Resource\">Resource custom field type. On update, you may set this property instead of (but not together with) the Resources List custom field type. On update, you may set this property instead of (but not together with) the dominant unit that is used in the system.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "The resource calendar." + }, + "SG.Api.Model.CalendarData": { + "type": "object", + "properties": { + "startDate": { + "type": "string", + "description": "The calendars start date.", + "format": "date-time" + }, + "endDate": { + "type": "string", + "description": "The calendars end date.", + "format": "date-time" + }, + "calendars": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.Calendar" + }, + "description": "The list of calendars details with allocations in requested time unit.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "The object containing calendars dates range and all calendars details." + }, + "SG.Api.Model.Capacity": { + "type": "object", + "properties": { + "startDate": { + "type": "string", + "description": "Resource capacity start date.", + "format": "date-time" + }, + "endDate": { + "type": "string", + "description": "Resource capacity end date.", + "format": "date-time" + }, + "demandPlanning": { + "type": "boolean", + "description": "True if resource is demand planning and capacity should be only for allocation FTE calculation, otherwise False." + }, + "baseCapacityHours": { + "type": "array", + "items": { + "type": "number", + "format": "double" + }, + "description": "Resource base capacity hours.", + "nullable": true + }, + "baseCapacityFte": { + "type": "array", + "items": { + "type": "number", + "format": "double" + }, + "description": "Resource base capacity fte.", + "nullable": true + }, + "baseCapacityMandays": { + "type": "array", + "items": { + "type": "number", + "format": "double" + }, + "description": "Resource base capacity mandays.", + "nullable": true + }, + "netCapacityHours": { + "type": "array", + "items": { + "type": "number", + "format": "double" + }, + "description": "Resource net capacity hours.", + "nullable": true + }, + "netCapacityFte": { + "type": "array", + "items": { + "type": "number", + "format": "double" + }, + "description": "Resource net capacity fte.", + "nullable": true + }, + "netCapacityMandays": { + "type": "array", + "items": { + "type": "number", + "format": "double" + }, + "description": "Resource net capacity mandays.", + "nullable": true + }, + "calendarIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "Ids of calendars assigned on resource.", + "nullable": true + }, + "adminTimes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.AdminTime" + }, + "description": "Admin times assigned on resource.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Resource capacity." + }, + "SG.Api.Model.CapacityEdit": { + "type": "object", + "properties": { + "startDate": { + "type": "string", + "description": "Resource capacity start date. Capacities will start from the first working day after the start date.", + "format": "date-time" + }, + "endDate": { + "type": "string", + "description": "Resource capacity end date. Capacities will end on the last working day before the end date. Required if merge is False.", + "format": "date-time", + "nullable": true + }, + "demandPlanning": { + "type": "boolean", + "description": "True if resource is demand planning and capacity should be only for allocation FTE calculation, otherwise False." + }, + "baseCapacityHours": { + "type": "array", + "items": { + "type": "number", + "format": "double" + }, + "description": "Resource base capacity hours.", + "nullable": true + }, + "baseCapacityFte": { + "type": "array", + "items": { + "type": "number", + "format": "double" + }, + "description": "Resource base capacity fte.", + "nullable": true + }, + "calendarsIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "The list of calendar ids assigned on resource.", + "nullable": true + }, + "adminTimes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.AdminTimeEdit" + }, + "description": "Admin times assigned on resource.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Resource capacity details that can be updated." + }, + "SG.Api.Model.CustomField": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of the custom field.", + "format": "int32" + }, + "name": { + "type": "string", + "description": "Name of the custom field.", + "nullable": true + }, + "entityType": { + "$ref": "#/components/schemas/SG.Api.Model.EntityType" + }, + "dataType": { + "$ref": "#/components/schemas/SG.Api.Model.CustomFieldDataType" + }, + "defaultValue": { + "$ref": "#/components/schemas/SG.Api.Model.CustomFieldValue" + }, + "enumMembers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ValueEnumMemberInfo" + }, + "description": "Possible values for lookup.", + "nullable": true + }, + "isRequired": { + "type": "boolean", + "description": "Defines whether each entity should have value for custom field." + }, + "isReadOnly": { + "type": "boolean", + "description": "Defines whether value can be changed after it was imported during sync." + }, + "isUnique": { + "type": "boolean", + "description": "Defines whether values should be unique or null." + }, + "displayAsPercentage": { + "type": "boolean", + "description": "Defines whether value should be displayed as percentage." + }, + "referenceBooleanFilterId": { + "type": "integer", + "description": "The id of custom field of Boolean type which filters resources that can be assigned as value for Resource type custom field.", + "format": "int32", + "nullable": true + }, + "systemCustomFieldKey": { + "$ref": "#/components/schemas/SG.Api.Model.SystemCustomFieldKey" + }, + "calculatedFormula": { + "type": "string", + "description": "Calculation formula for Calculate custom field.", + "nullable": true + }, + "calculatedFormulaErrors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Errors in formula for calculated field, if any.", + "nullable": true + }, + "updatedOn": { + "type": "string", + "description": "Time when field was last updated.", + "format": "date-time" + }, + "updatedBy": { + "$ref": "#/components/schemas/SG.Api.Model.Actor" + }, + "createdOn": { + "type": "string", + "description": "Time when field is created.", + "format": "date-time" + }, + "createdBy": { + "$ref": "#/components/schemas/SG.Api.Model.Actor" + }, + "isRichText": { + "type": "boolean", + "description": "Defines whether values can be rich text." + }, + "memberSortOrder": { + "$ref": "#/components/schemas/SGT5.Common.Utilities.SortOrder" + } + }, + "additionalProperties": false, + "description": "Defines the type of information that can be associated with project, resource or assignment." + }, + "SG.Api.Model.CustomFieldDataType": { + "enum": [ + "int", + "double", + "string", + "text", + "date", + "enum", + "flags", + "currency", + "bool", + "resource", + "calculated", + "url", + "progress", + "workflow", + "resourcesList", + "hierarchy" + ], + "type": "string", + "description": "Custom field data type." + }, + "SG.Api.Model.CustomFieldEdit": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of the custom field. Should not be defined if new custom field created.", + "format": "int32", + "nullable": true + }, + "name": { + "type": "string", + "description": "Name of the custom field.", + "nullable": true + }, + "entityType": { + "$ref": "#/components/schemas/SG.Api.Model.EntityType" + }, + "dataType": { + "$ref": "#/components/schemas/SG.Api.Model.CustomFieldDataType" + }, + "defaultValue": { + "$ref": "#/components/schemas/SG.Api.Model.CustomFieldValue" + }, + "defaultFormat": { + "type": "string", + "description": "Default format of the custom field.", + "nullable": true + }, + "enumMembers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ValueEnumMemberInfo" + }, + "description": "Possible values for lookup.", + "nullable": true + }, + "isRequired": { + "type": "boolean", + "description": "Defines whether each entity should have value for custom field." + }, + "isReadOnly": { + "type": "boolean", + "description": "Defines whether value can be changed after it was imported during sync." + }, + "displayAsPercentage": { + "type": "boolean", + "description": "Defines whether value should be displayed as percentage. Can be specified for precision numbers only." + }, + "isUnique": { + "type": "boolean", + "description": "Defines whether values should be unique or null." + }, + "referenceBooleanFilterId": { + "type": "integer", + "description": "The id of custom field of Boolean type which filters resources that can be assigned as value for Resource type custom field.", + "format": "int32", + "nullable": true + }, + "calculatedFormula": { + "type": "string", + "description": "Calculation formula for Calculate custom field.", + "nullable": true + }, + "isRichText": { + "type": "boolean", + "description": "Defines Rich Text content." + }, + "memberSortOrder": { + "$ref": "#/components/schemas/SGT5.Common.Utilities.SortOrder" + } + }, + "additionalProperties": false, + "description": "Defines custom field properties that can be changed." + }, + "SG.Api.Model.CustomFieldValue": { + "type": "object", + "additionalProperties": false, + "description": "The value that can be association with any entity defined in entity type object." + }, + "SG.Api.Model.DataUnit": { + "enum": [ + "time", + "fte", + "cost", + "mandays" + ], + "type": "string", + "description": "Supported allocations unit." + }, + "SG.Api.Model.DelegateResourceRequest": { + "type": "object", + "properties": { + "resourceRequestIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "List of resource request ids.", + "nullable": true + }, + "delegatedToResourceId": { + "type": "integer", + "description": "Resource manager id to delegate.", + "format": "int32" + }, + "delegatedToResourceExternalId": { + "type": "string", + "description": "Resource manager external id to delegate.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Delegate Resource Request." + }, + "SG.Api.Model.DominantUnit": { + "enum": [ + "time", + "fte" + ], + "type": "string", + "description": "The dominant unit that is used in the system. Allocations are saved in dominant unit. Allocations in non-dominant unit are calculated." + }, + "SG.Api.Model.EntityType": { + "enum": [ + "project", + "resource", + "assignment", + "milestone", + "financialRow" + ], + "type": "string", + "description": "The type of entity, that can have custom field value associated." + }, + "SG.Api.Model.File": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of the file.", + "format": "int32" + }, + "name": { + "type": "string", + "description": "Name of the file.", + "nullable": true + }, + "entityId": { + "type": "integer", + "description": "Entity id of the file.", + "format": "int32" + }, + "entityExternalId": { + "type": "string", + "description": "External entity id of the file.", + "nullable": true + }, + "entityType": { + "$ref": "#/components/schemas/SG.Api.Model.FileEntityType" + }, + "workflowStepId": { + "type": "integer", + "description": "Workflow step id.", + "format": "int32", + "nullable": true + }, + "sizeInBytes": { + "type": "integer", + "description": "Size of the file in bytes.", + "format": "int64" + }, + "createdBy": { + "$ref": "#/components/schemas/SG.Api.Model.Actor" + }, + "createdOn": { + "type": "string", + "description": "Created date.", + "format": "date-time" + }, + "updatedBy": { + "$ref": "#/components/schemas/SG.Api.Model.Actor" + }, + "updatedOn": { + "type": "string", + "description": "Updated date.", + "format": "date-time" + } + }, + "additionalProperties": false, + "description": "File entity." + }, + "SG.Api.Model.FileContent": { + "type": "object", + "properties": { + "content": { + "type": "string", + "description": "Content of the file.", + "format": "byte", + "nullable": true + } + }, + "additionalProperties": false, + "description": "File content entity." + }, + "SG.Api.Model.FileCreate": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the file.", + "nullable": true + }, + "entityId": { + "type": "integer", + "description": "The Id of the entity for which the file is being created. Mutually exclusive with EntityExternalId.", + "format": "int32", + "nullable": true + }, + "entityExternalId": { + "type": "string", + "description": "The ExternalId of the entity for which the file is being created. Mutually exclusive with EntityId.", + "nullable": true + }, + "entityType": { + "$ref": "#/components/schemas/SG.Api.Model.FileEntityType" + }, + "workflowStepId": { + "type": "integer", + "description": "Id of the workflow step for which the file is being created.", + "format": "int32", + "nullable": true + }, + "rowIndex": { + "type": "integer", + "description": "Index of the sheet row for which the file is being created.", + "format": "int32", + "nullable": true + }, + "content": { + "type": "string", + "description": "Content of the file.", + "format": "byte", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Defines file properties required for file creation." + }, + "SG.Api.Model.FileEntityType": { + "enum": [ + "project", + "resource", + "sheetRow" + ], + "type": "string", + "description": "File entity type." + }, + "SG.Api.Model.FileUpdate": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "The Id of the file to be updated.", + "format": "int32" + }, + "name": { + "type": "string", + "description": "New name of the file.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Defines file properties required for file update." + }, + "SG.Api.Model.Filter": { + "type": "object", + "properties": { + "filterType": { + "$ref": "#/components/schemas/SG.Api.Model.FilterType" + }, + "ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "Entity ids for filter.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Filter." + }, + "SG.Api.Model.FilterType": { + "enum": [ + "projectId", + "resourceId", + "timesheetApproverResourceId", + "resourceRequestOwnerResourceId", + "resourceRequestRequestedByResourceId", + "customFieldId" + ], + "type": "string", + "description": "Filter type." + }, + "SG.Api.Model.FinancialCategory": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of the financial category.", + "format": "int32" + }, + "name": { + "type": "string", + "description": "Name of financial category.", + "nullable": true + }, + "financialTypeId": { + "type": "integer", + "description": "Id of financial type.", + "format": "int32", + "nullable": true + }, + "isPositive": { + "type": "boolean", + "description": "Flag defines whether financial category is positive or negative." + }, + "code": { + "type": "string", + "description": "Code of the financial category.", + "nullable": true + }, + "description": { + "type": "string", + "description": "Description of the financial category.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "The financial category." + }, + "SG.Api.Model.FinancialCategoryEdit": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of the financial category.", + "format": "int32", + "nullable": true + }, + "name": { + "type": "string", + "description": "Name of financial category.", + "nullable": true + }, + "financialTypeId": { + "type": "integer", + "description": "Id of financial type.", + "format": "int32", + "nullable": true + }, + "isPositive": { + "type": "boolean", + "description": "Flag defines whether financial category is positive or negative." + }, + "code": { + "type": "string", + "description": "Code of the financial category.", + "nullable": true + }, + "description": { + "type": "string", + "description": "Description of the financial category.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "The financial category details that can be updated." + }, + "SG.Api.Model.FinancialRow": { + "type": "object", + "properties": { + "projectId": { + "type": "integer", + "description": "Id of project financial information belongs to.", + "format": "int32" + }, + "projectExternalId": { + "type": "string", + "description": "External Id of project financial information belongs to.", + "nullable": true + }, + "financialCategoryId": { + "type": "integer", + "description": "Id of the financial category.", + "format": "int32" + }, + "id": { + "type": "integer", + "description": "Id of the financial row.", + "format": "int32", + "nullable": true + }, + "actualCosts": { + "type": "array", + "items": { + "type": "number", + "format": "double" + }, + "description": "Financial row actual costs.", + "nullable": true + }, + "actualStartDate": { + "type": "string", + "description": "Start date of the SG.Api.Model.FinancialRow.ActualCosts for merge requests.", + "format": "date-time", + "nullable": true + }, + "plannedCosts": { + "type": "array", + "items": { + "type": "number", + "format": "double" + }, + "description": "Financial row planned costs.", + "nullable": true + }, + "plannedStartDate": { + "type": "string", + "description": "Start date of the SG.Api.Model.FinancialRow.PlannedCosts for merge requests.", + "format": "date-time", + "nullable": true + }, + "budgetCosts": { + "type": "array", + "items": { + "type": "number", + "format": "double" + }, + "description": "Financial row budget line costs. Should be sent only when user has permissions to edit budget line.", + "nullable": true + }, + "budgetStartDate": { + "type": "string", + "description": "Start date of the SG.Api.Model.FinancialRow.BudgetCosts for merge requests.", + "format": "date-time", + "nullable": true + }, + "forecastCosts": { + "type": "array", + "items": { + "type": "number", + "format": "double" + }, + "description": "Financial row forecast costs. Should be sent only when user has permissions to edit forecast.", + "nullable": true + }, + "forecastStartDate": { + "type": "string", + "description": "Start date of the SG.Api.Model.FinancialRow.ForecastCosts for merge requests.", + "format": "date-time", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Represents financial information for specific project and financial category." + }, + "SG.Api.Model.FinancialRowKey": { + "type": "object", + "properties": { + "projectId": { + "type": "integer", + "description": "The id of project including financial row. Mutually exclusive with ProjectExternalId.", + "format": "int32" + }, + "id": { + "type": "integer", + "description": "The id of the financial row. Mutually exclusive with ProjectId, ProjectExternalId, FinancialCategoryId.", + "format": "int32", + "nullable": true + }, + "projectExternalId": { + "type": "string", + "description": "The external id of project including financial row. Mutually exclusive with ProjectId.", + "nullable": true + }, + "financialCategoryId": { + "type": "integer", + "description": "The id of financial category associated with financial row.", + "format": "int32" + } + }, + "additionalProperties": false, + "description": "The financial row identity." + }, + "SG.Api.Model.FinancialType": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of the financial type.", + "format": "int32" + }, + "name": { + "type": "string", + "description": "Name of financial type.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "The financial type." + }, + "SG.Api.Model.FinancialTypeEdit": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of the financial type.", + "format": "int32", + "nullable": true + }, + "name": { + "type": "string", + "description": "Name of financial type.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "The financial type details that can be updated." + }, + "SG.Api.Model.GeneralSettings": { + "type": "object", + "properties": { + "dominantUnit": { + "$ref": "#/components/schemas/SG.Api.Model.DominantUnit" + }, + "weekends": { + "type": "integer", + "description": "A bit mask defines non-working days of week, starting from Sunday.", + "format": "int32" + }, + "disabledPlanType": { + "$ref": "#/components/schemas/SG.Api.Model.PlanType" + }, + "disabledAllocationType": { + "$ref": "#/components/schemas/SG.Api.Model.AllocationType" + }, + "isDemandPlanReadOnly": { + "type": "boolean", + "description": "Defines if demand dataset is read-only." + }, + "hoursPerManday": { + "type": "number", + "description": "Hours per manday value used to calculate mandays data in the system..", + "format": "double" + }, + "allowMultipleAssignments": { + "type": "boolean", + "description": "Defines if multiple assignments are allowed." + }, + "allowAllDataSetsAccessViaApi": { + "type": "boolean", + "description": "Defines if all data sets can be accessed via api." + }, + "allowNegativeAllocations": { + "type": "boolean", + "description": "Defines if negative values allowed in Planned data set. Doesn't impact Actual data set." + } + }, + "additionalProperties": false, + "description": "General settings that are used in the system." + }, + "SG.Api.Model.LockState": { + "type": "object", + "properties": { + "lockedBy": { + "type": "integer", + "description": "Id of resource that acquired lock.", + "format": "int32" + }, + "lockedByExternalId": { + "type": "string", + "description": "External Id of resource that acquired lock.", + "nullable": true + }, + "projectId": { + "type": "integer", + "description": "Id of locked project.", + "format": "int32" + }, + "projectExternalId": { + "type": "string", + "description": "External Id of locked project.", + "nullable": true + }, + "assignments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.AssignmentKey" + }, + "description": "The list of locked assignments.", + "nullable": true + }, + "lockedOn": { + "type": "string", + "description": "Time when lock was acquired.", + "format": "date-time" + }, + "expireOn": { + "type": "string", + "description": "Time when lock expires.", + "format": "date-time" + } + }, + "additionalProperties": false, + "description": "Lock state." + }, + "SG.Api.Model.Milestone": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of the milestone.", + "format": "int32" + }, + "name": { + "type": "string", + "description": "Name of milestone.", + "nullable": true + }, + "description": { + "type": "string", + "description": "Description of milestone.", + "nullable": true + }, + "date": { + "type": "string", + "description": "Date of milestone.", + "format": "date-time" + }, + "color": { + "$ref": "#/components/schemas/SG.Api.Model.MilestoneColor" + }, + "shape": { + "$ref": "#/components/schemas/SG.Api.Model.MilestoneShape" + } + }, + "additionalProperties": false, + "description": "Milestone." + }, + "SG.Api.Model.MilestoneColor": { + "enum": [ + "darkCyan", + "emerald", + "cyan", + "forestGreen", + "green", + "skyBlue", + "indigo", + "royalBlue", + "blueViolet", + "dodgerBlue", + "royalPurple", + "limeGreen", + "mediumAquamarine", + "electricPurple", + "moltenBrick", + "sienna", + "fuchsia", + "saddleBrown", + "mediumOrchid", + "crimson", + "paleVioletRed", + "orangeRed", + "deepPink", + "hotPink", + "goldenrod" + ], + "type": "string", + "description": "Milestone Color." + }, + "SG.Api.Model.MilestoneEdit": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of the milestone. Required for update. Can be excluded during create.", + "format": "int32", + "nullable": true + }, + "projectId": { + "type": "integer", + "description": "Id of the project. Mutually exclusive with ProjectExternalId.", + "format": "int32" + }, + "projectExternalId": { + "type": "string", + "description": "The project external id. Mutually exclusive with ProjectId.", + "nullable": true + }, + "name": { + "type": "string", + "description": "Name of milestone.", + "nullable": true + }, + "description": { + "type": "string", + "description": "Description of milestone.", + "nullable": true + }, + "date": { + "type": "string", + "description": "Date of milestone.", + "format": "date-time" + }, + "color": { + "$ref": "#/components/schemas/SG.Api.Model.MilestoneColor" + }, + "shape": { + "$ref": "#/components/schemas/SG.Api.Model.MilestoneShape" + } + }, + "additionalProperties": false, + "description": "Milestone." + }, + "SG.Api.Model.MilestoneShape": { + "enum": [ + "circle", + "square", + "diamond" + ], + "type": "string", + "description": "Milestone Shape." + }, + "SG.Api.Model.PagedAllocationsResult`1[[SG.Api.Model.Assignment, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.Assignment" + }, + "description": "The result object containing allocations data.", + "nullable": true + }, + "timeUnit": { + "$ref": "#/components/schemas/SG.Api.Model.TimeUnit" + }, + "dataUnit": { + "$ref": "#/components/schemas/SG.Api.Model.DataUnit" + }, + "dominantUnit": { + "$ref": "#/components/schemas/SG.Api.Model.DominantUnit" + }, + "page": { + "type": "integer", + "description": "Page number of the request.", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size of the request.", + "format": "int32" + }, + "totalItems": { + "type": "integer", + "description": "Total number of items available for the request.", + "format": "int32" + } + }, + "additionalProperties": false, + "description": "Result with allocations included provided by pages." + }, + "SG.Api.Model.PagedAllocationsResult`1[[SG.Api.Model.ResourceCapacity, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ResourceCapacity" + }, + "description": "The result object containing allocations data.", + "nullable": true + }, + "timeUnit": { + "$ref": "#/components/schemas/SG.Api.Model.TimeUnit" + }, + "dataUnit": { + "$ref": "#/components/schemas/SG.Api.Model.DataUnit" + }, + "dominantUnit": { + "$ref": "#/components/schemas/SG.Api.Model.DominantUnit" + }, + "page": { + "type": "integer", + "description": "Page number of the request.", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size of the request.", + "format": "int32" + }, + "totalItems": { + "type": "integer", + "description": "Total number of items available for the request.", + "format": "int32" + } + }, + "additionalProperties": false, + "description": "Result with allocations included provided by pages." + }, + "SG.Api.Model.PagedResult`1[[SG.Api.Model.AuditLogItem, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]": { + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "Page number of the request.", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size of the request.", + "format": "int32" + }, + "totalItems": { + "type": "integer", + "description": "Total number of items available for the request.", + "format": "int32" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.AuditLogItem" + }, + "description": "Items for the request.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Paged result of items with pagination information." + }, + "SG.Api.Model.PagedResult`1[[SG.Api.Model.FinancialRow, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]": { + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "Page number of the request.", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size of the request.", + "format": "int32" + }, + "totalItems": { + "type": "integer", + "description": "Total number of items available for the request.", + "format": "int32" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.FinancialRow" + }, + "description": "Items for the request.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Paged result of items with pagination information." + }, + "SG.Api.Model.PagedResult`1[[SG.Api.Model.Project, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]": { + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "Page number of the request.", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size of the request.", + "format": "int32" + }, + "totalItems": { + "type": "integer", + "description": "Total number of items available for the request.", + "format": "int32" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.Project" + }, + "description": "Items for the request.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Paged result of items with pagination information." + }, + "SG.Api.Model.PagedResult`1[[SG.Api.Model.ReportDownloadQueueItem, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]": { + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "Page number of the request.", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size of the request.", + "format": "int32" + }, + "totalItems": { + "type": "integer", + "description": "Total number of items available for the request.", + "format": "int32" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ReportDownloadQueueItem" + }, + "description": "Items for the request.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Paged result of items with pagination information." + }, + "SG.Api.Model.PagedResult`1[[SG.Api.Model.Resource, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]": { + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "Page number of the request.", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size of the request.", + "format": "int32" + }, + "totalItems": { + "type": "integer", + "description": "Total number of items available for the request.", + "format": "int32" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.Resource" + }, + "description": "Items for the request.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Paged result of items with pagination information." + }, + "SG.Api.Model.PagedResult`1[[SG.Api.Model.ResourceRequest, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]": { + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "Page number of the request.", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size of the request.", + "format": "int32" + }, + "totalItems": { + "type": "integer", + "description": "Total number of items available for the request.", + "format": "int32" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ResourceRequest" + }, + "description": "Items for the request.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Paged result of items with pagination information." + }, + "SG.Api.Model.PagedResult`1[[SG.Api.Model.ResourceTeam, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]": { + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "Page number of the request.", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size of the request.", + "format": "int32" + }, + "totalItems": { + "type": "integer", + "description": "Total number of items available for the request.", + "format": "int32" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ResourceTeam" + }, + "description": "Items for the request.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Paged result of items with pagination information." + }, + "SG.Api.Model.PagedResult`1[[SG.Api.Model.ResourceTeamAutoCalculatedRate, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]": { + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "Page number of the request.", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size of the request.", + "format": "int32" + }, + "totalItems": { + "type": "integer", + "description": "Total number of items available for the request.", + "format": "int32" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ResourceTeamAutoCalculatedRate" + }, + "description": "Items for the request.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Paged result of items with pagination information." + }, + "SG.Api.Model.PagedResult`1[[SG.Api.Model.Sheets.Sheet, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]": { + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "Page number of the request.", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size of the request.", + "format": "int32" + }, + "totalItems": { + "type": "integer", + "description": "Total number of items available for the request.", + "format": "int32" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.Sheets.Sheet" + }, + "description": "Items for the request.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Paged result of items with pagination information." + }, + "SG.Api.Model.PagedResult`1[[SG.Api.Model.Snapshots.ProjectSnapshotSummary, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]": { + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "Page number of the request.", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size of the request.", + "format": "int32" + }, + "totalItems": { + "type": "integer", + "description": "Total number of items available for the request.", + "format": "int32" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.Snapshots.ProjectSnapshotSummary" + }, + "description": "Items for the request.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Paged result of items with pagination information." + }, + "SG.Api.Model.PagedResult`1[[SG.Api.Model.Task, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]": { + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "Page number of the request.", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size of the request.", + "format": "int32" + }, + "totalItems": { + "type": "integer", + "description": "Total number of items available for the request.", + "format": "int32" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.Task" + }, + "description": "Items for the request.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Paged result of items with pagination information." + }, + "SG.Api.Model.PagedResult`1[[SG.Api.Model.TaskDependency, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]": { + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "Page number of the request.", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size of the request.", + "format": "int32" + }, + "totalItems": { + "type": "integer", + "description": "Total number of items available for the request.", + "format": "int32" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.TaskDependency" + }, + "description": "Items for the request.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Paged result of items with pagination information." + }, + "SG.Api.Model.PagedResult`1[[SG.Api.Model.Timesheet, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]": { + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "Page number of the request.", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size of the request.", + "format": "int32" + }, + "totalItems": { + "type": "integer", + "description": "Total number of items available for the request.", + "format": "int32" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.Timesheet" + }, + "description": "Items for the request.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Paged result of items with pagination information." + }, + "SG.Api.Model.PagedResult`1[[SG.Api.Model.TimesheetPeriod, SG.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]": { + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "Page number of the request.", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size of the request.", + "format": "int32" + }, + "totalItems": { + "type": "integer", + "description": "Total number of items available for the request.", + "format": "int32" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.TimesheetPeriod" + }, + "description": "Items for the request.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Paged result of items with pagination information." + }, + "SG.Api.Model.PeriodAssignments": { + "type": "object", + "properties": { + "periodId": { + "type": "integer", + "description": "Id of the period.", + "format": "int32" + }, + "resourceId": { + "type": "integer", + "description": "Id of the timesheet user.", + "format": "int32" + }, + "assignedTasks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.AssignedTask" + }, + "description": "Assignments for the period.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Period Assignment." + }, + "SG.Api.Model.PeriodAutoOpenSettings": { + "type": "object", + "properties": { + "daysBeforePeriodStart": { + "type": "integer", + "description": "Days before period starts, period should be automatically opened.", + "format": "int32" + }, + "daysAfterPeriodFinish": { + "type": "integer", + "description": "Days after period finish, period should be automatically closed.", + "format": "int32" + }, + "timeZone": { + "type": "integer", + "description": "Time zone identifier.", + "format": "int32" + } + }, + "additionalProperties": false, + "description": "Represents settings to open period automatically." + }, + "SG.Api.Model.Permission": { + "enum": [ + "grant", + "deny", + "view", + "edit", + "none" + ], + "type": "string", + "description": "Permission options to set for permission flags." + }, + "SG.Api.Model.PermissionFlag": { + "enum": [ + "manageAllAccessRights", + "editLicenseAndGeneralSettings", + "accessScribeRollup", + "manageTimesheets", + "deleteArchivedTimesheets", + "synchronize", + "createResource", + "createProject", + "createWorkflowProject", + "viewProjectSecurityGroups", + "viewResourceSecurityGroups", + "useTempus", + "editAdminTimeTypes", + "editCalendars", + "editCustomFields", + "viewNetAvailability", + "useReports", + "accessReports", + "accessInsightPlus", + "manageInsightPlus", + "insightPlusAdmin", + "useBpa", + "useBudgets", + "editFinancialCategories", + "viewResourceRequestListing", + "editProjectHierarchy", + "editResourceHierarchy", + "useApi", + "useTimesheetReports", + "editOwnSso", + "editSnapshotTypes", + "manageWorkflows", + "manageImpersonations", + "viewAllTimesheetsInApi", + "manageSheetTemplates", + "allowGlobalResourceReassignment", + "manageSkillsMatrix", + "editOwnSkills", + "accessRoadmaps", + "manageAllTimesheets", + "manageFiscalCalendar", + "createTemplate", + "accessSkillsMatrixReports", + "accessOwnSheets", + "accessPlanningInterval", + "createTeamResource", + "accessProjectCustomFieldValues", + "accessAssignmentCustomFieldValues", + "accessAllocations", + "accessActualAllocationDataset", + "accessPlannedDemandDataset", + "accessActualDemandDataset", + "accessPlannedAllocationDataset", + "accessAllocationDataset", + "accessDemandDataset", + "accessScheduleDataset", + "accessDates", + "accessFinancials", + "accessActualFinancials", + "accessPlannedFinancials", + "accessForecastFinancials", + "accessTeam", + "restoreSnapshot", + "accessProjectDependencies", + "accessMilestones", + "clone", + "viewResourceRequests", + "accessFinancialsBudgetLine", + "accessSnapshots", + "accessWorkflow", + "accessAssignmentWorkflow", + "shift", + "manageLock", + "editTask", + "deleteTask", + "applyTemplate", + "accessScribe", + "accessAssignmentOptions", + "accessFinancialCustomFieldValues", + "accessMilestoneCustomFieldValues", + "viewInLists", + "editAllocation", + "editInProjectTeam", + "accessCapacity", + "accessDefaultRate", + "accessCustomFieldValues", + "viewGlobalRole", + "accessSkills", + "accessTeamResource", + "editName", + "delete", + "managePermissions", + "editHierarchyMembership", + "useAuditLog", + "accessSheets", + "accessDocuments" + ], + "type": "string", + "description": "Permission flags for role." + }, + "SG.Api.Model.PermissionRuleEditResult": { + "type": "object", + "properties": { + "permissionRuleIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "Permission rule ids.", + "nullable": true + }, + "lostAccessToPermissionRuleIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "Lost permission rule ids.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Permission rule edit result." + }, + "SG.Api.Model.PlanType": { + "enum": [ + "allocation", + "demand", + "schedule" + ], + "type": "string", + "description": "Task plan types." + }, + "SG.Api.Model.Project": { + "type": "object", + "properties": { + "startDate": { + "type": "string", + "description": "Start date of the project.", + "format": "date-time", + "nullable": true + }, + "endDate": { + "type": "string", + "description": "End date of the project.", + "format": "date-time", + "nullable": true + }, + "financialStartMonth": { + "type": "string", + "description": "Financial start month for the project.", + "format": "date-time", + "nullable": true + }, + "financialEndMonth": { + "type": "string", + "description": "Financial end month for the project.", + "format": "date-time", + "nullable": true + }, + "securityGroupId": { + "type": "integer", + "description": "Id of project security group.", + "format": "int32", + "nullable": true + }, + "workflowId": { + "type": "integer", + "description": "[Obsolete] Id of assignment workflow. Use AssignmentWorkflowId instead.", + "format": "int32", + "nullable": true, + "deprecated": true + }, + "assignmentWorkflowId": { + "type": "integer", + "description": "Id of assignment workflow.", + "format": "int32", + "nullable": true + }, + "projectWorkflowId": { + "type": "integer", + "description": "Id of project workflow.", + "format": "int32", + "nullable": true + }, + "id": { + "type": "integer", + "description": "Id of the project.", + "format": "int32" + }, + "externalId": { + "type": "string", + "description": "External Id of the project.", + "nullable": true + }, + "name": { + "type": "string", + "description": "Name of the project.", + "nullable": true + }, + "isLocked": { + "type": "boolean", + "description": "Indicates if project is allowed to be edited." + }, + "createdOn": { + "type": "string", + "description": "Time when project was created.", + "format": "date-time" + }, + "createdBy": { + "$ref": "#/components/schemas/SG.Api.Model.Actor" + }, + "updatedOn": { + "type": "string", + "description": "Time when the project was last updated.", + "format": "date-time" + }, + "updatedBy": { + "$ref": "#/components/schemas/SG.Api.Model.Actor" + } + }, + "additionalProperties": false, + "description": "Project details with timestamps." + }, + "SG.Api.Model.ProjectClone": { + "type": "object", + "properties": { + "cloneScheduleAssignments": { + "type": "boolean", + "description": "Clone SG.Api.Model.PlanType.Schedule Assignments." + }, + "cloneTeam": { + "type": "boolean", + "description": "Clone project team resources." + }, + "cloneFinancials": { + "type": "boolean", + "description": "Clone financial rows from old project." + }, + "cloneMilestones": { + "type": "boolean", + "description": "Clone Milestones from old project." + }, + "cloneCustomFieldValues": { + "type": "boolean", + "description": "Clone Custom field values from old project." + }, + "cloneActualAllocation": { + "type": "boolean", + "description": "Clone Actual Assignment Allocations for SG.Api.Model.PlanType.Allocation." + }, + "clonePlannedAllocation": { + "type": "boolean", + "description": "Clone Planned Assignment Allocations for SG.Api.Model.PlanType.Allocation." + }, + "cloneActualDemand": { + "type": "boolean", + "description": "Clone Actual Assignment Allocations for SG.Api.Model.PlanType.Demand." + }, + "clonePlannedDemand": { + "type": "boolean", + "description": "Clone Planned Assignment Allocations for SG.Api.Model.PlanType.Demand." + }, + "cloneDocuments": { + "type": "boolean", + "description": "Clone Documents." + } + }, + "additionalProperties": false, + "description": "Contains flags for cloning specific data from current project." + }, + "SG.Api.Model.ProjectDependency": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of the dependency.", + "format": "int32" + }, + "fromProjectId": { + "type": "integer", + "description": "Id of the parent project.", + "format": "int32" + }, + "fromProjectExternalId": { + "type": "string", + "description": "External Id of parent project. Mutually exclusive with FromProjectId.", + "nullable": true + }, + "toProjectId": { + "type": "integer", + "description": "Id of the child project.", + "format": "int32" + }, + "toProjectExternalId": { + "type": "string", + "description": "External Id of child project. Mutually exclusive with ToProjectId.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Project Dependency." + }, + "SG.Api.Model.ProjectEdit": { + "type": "object", + "properties": { + "updateSecurityGroup": { + "type": "boolean", + "description": "Defines whether security group should be updated." + }, + "securityGroupId": { + "type": "integer", + "description": "Security group id of project.", + "format": "int32", + "nullable": true + }, + "id": { + "type": "integer", + "description": "Id of project. Must be null for new projects. Mutually exclusive with ExternalId.", + "format": "int32", + "nullable": true + }, + "externalId": { + "type": "string", + "description": "External Id of project. Mutually exclusive with Id.", + "nullable": true + }, + "name": { + "type": "string", + "description": "Name of project.", + "nullable": true + }, + "updateProjectDates": { + "type": "boolean", + "description": "Defines whether project dates should be updated." + }, + "startDate": { + "type": "string", + "description": "Start date of project.", + "format": "date-time", + "nullable": true + }, + "endDate": { + "type": "string", + "description": "End date of project.", + "format": "date-time", + "nullable": true + }, + "updateFinancialDates": { + "type": "boolean", + "description": "Defines whether project financial dates should be updated." + }, + "financialStartMonth": { + "type": "string", + "description": "Financial start month for the project. Only year and month should be specified: \"2018-11-01T00:00:00Z\".", + "format": "date-time", + "nullable": true + }, + "financialEndMonth": { + "type": "string", + "description": "Financial end month for the project. Only year and month should be specified: \"2018-11-01T00:00:00Z\".", + "format": "date-time", + "nullable": true + }, + "updateWorkflow": { + "type": "boolean", + "description": "[Obsolete] Defines whether workflow should be updated. Use UpdateAssignmentWorkflow instead.", + "deprecated": true + }, + "updateAssignmentWorkflow": { + "type": "boolean", + "description": "Defines whether workflow should be updated." + }, + "updateProjectWorkflow": { + "type": "boolean", + "description": "Defines whether workflow should be updated." + }, + "workflowId": { + "type": "integer", + "description": "[Obsolete] Workflow id of project. Use AssignmentWorkflowId instead.", + "format": "int32", + "nullable": true, + "deprecated": true + }, + "assignmentWorkflowId": { + "type": "integer", + "description": "Assignment workflow id of project.", + "format": "int32", + "nullable": true + }, + "projectWorkflowId": { + "type": "integer", + "description": "Project workflow id of project.", + "format": "int32", + "nullable": true + }, + "updateLock": { + "type": "boolean", + "description": "Defines whether lock state should be updated. Applicable only during update and cannot be set with other flags." + }, + "isLocked": { + "type": "boolean", + "description": "Defines if project is locked.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Defines project properties that can be changed." + }, + "SG.Api.Model.ProjectInfo": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of the project.", + "format": "int32" + }, + "externalId": { + "type": "string", + "description": "External Id of the project.", + "nullable": true + }, + "name": { + "type": "string", + "description": "Name of the project.", + "nullable": true + }, + "isLocked": { + "type": "boolean", + "description": "Determine if project is locked." + } + }, + "additionalProperties": false, + "description": "Project information." + }, + "SG.Api.Model.ProjectMilestones": { + "type": "object", + "properties": { + "projectId": { + "type": "integer", + "description": "Id of project that the milestones belong to.", + "format": "int32" + }, + "projectExternalId": { + "type": "string", + "description": "External Id of project that the milestones belong to.", + "nullable": true + }, + "milestones": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.Milestone" + }, + "description": "Milestones set defined for project.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Represents set of milestones defined for project." + }, + "SG.Api.Model.ProjectPermissionRule": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of the rule.", + "format": "int32" + }, + "resourceIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "Resource ids associated with the rule.", + "nullable": true + }, + "resourceExternalIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Resource external ids associated with the rule.", + "nullable": true + }, + "resourceSecurityGroupIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "Resource security group ids associated with the rule. Cannot be null.", + "nullable": true + }, + "globalRoleIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "Global role ids associated with the rule. Cannot be null.", + "nullable": true + }, + "projectIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "Project ids associated with the rule.", + "nullable": true + }, + "projectExternalIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Project external ids associated with the rule.", + "nullable": true + }, + "projectSecurityGroupIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "Project security group ids associated with the rule. Cannot be null.", + "nullable": true + }, + "projectRoleId": { + "type": "integer", + "description": "Project role id.", + "format": "int32", + "nullable": true + }, + "allowOverride": { + "type": "boolean", + "description": "Allow override." + } + }, + "additionalProperties": false, + "description": "Project permission rule." + }, + "SG.Api.Model.ProjectPermissionRuleEdit": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of the rule.", + "format": "int32", + "nullable": true + }, + "resourceIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "Resource ids for whom the rule will be applied. Mutually exclusive with ResourceExternalIds.", + "nullable": true + }, + "resourceExternalIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Resource external ids for whom the rule will be applied. Mutually exclusive with ResourceIds.", + "nullable": true + }, + "resourceSecurityGroupIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "Resource security group ids for whom the rule will be applied. Cannot be null.", + "nullable": true + }, + "globalRoleIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "Global role ids for whom the rule will be applied. Cannot be null.", + "nullable": true + }, + "projectIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "Project ids on which the rule will be applied. Mutually exclusive with ProjectExternalIds.", + "nullable": true + }, + "projectExternalIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Project external ids on which the rule will be applied. Mutually exclusive with ProjectIds.", + "nullable": true + }, + "projectSecurityGroupIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "Project security group ids on which the rule will be applied. Cannot be null.", + "nullable": true + }, + "projectRoleId": { + "type": "integer", + "description": "Project role id to apply in the rule.", + "format": "int32", + "nullable": true + }, + "allowOverride": { + "type": "boolean", + "description": "Allow override." + } + }, + "additionalProperties": false, + "description": "Project permission rule edit." + }, + "SG.Api.Model.ProjectTeam": { + "type": "object", + "properties": { + "projectId": { + "type": "integer", + "description": "The project id. Mutually exclusive with ProjectExternalId when team updated.", + "format": "int32" + }, + "projectExternalId": { + "type": "string", + "description": "The project external id. Mutually exclusive with ProjectId when team updated.", + "nullable": true + }, + "team": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "The list of team resource ids. Mutually exclusive with TeamExternalIds when team updated.", + "nullable": true + }, + "teamExternalIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The list of team resource external ids. Mutually exclusive with Team when team updated.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "The project team." + }, + "SG.Api.Model.RejectResourceRequest": { + "type": "object", + "properties": { + "resourceRequestIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "List of resource request ids.", + "nullable": true + }, + "clearAllocations": { + "type": "boolean", + "description": "Flag to clear assignment allocations." + } + }, + "additionalProperties": false, + "description": "Reject Resource Request." + }, + "SG.Api.Model.Report": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of report.", + "format": "int32" + }, + "name": { + "type": "string", + "description": "Name of report.", + "nullable": true + }, + "reportType": { + "$ref": "#/components/schemas/SG.Api.Model.ReportType" + } + }, + "additionalProperties": false, + "description": "Report detail." + }, + "SG.Api.Model.ReportDownloadQueueItem": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of the queue item.", + "format": "int32" + }, + "state": { + "$ref": "#/components/schemas/SG.Api.Model.ReportQueueProcessingState" + }, + "creationDate": { + "type": "string", + "description": "Time when the queue item was created.", + "format": "date-time" + }, + "queuePosition": { + "type": "integer", + "description": "The position of the item in the queue.", + "format": "int32", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Report download queue item." + }, + "SG.Api.Model.ReportQueueProcessingState": { + "enum": [ + "queued", + "readyToDownload", + "error", + "canceled", + "invalidated" + ], + "type": "string", + "description": "Represents queue status of reports data preparation." + }, + "SG.Api.Model.ReportType": { + "enum": [ + "pivotGrid" + ], + "type": "string", + "description": "Report types." + }, + "SG.Api.Model.Resource": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "The resource id.", + "format": "int32" + }, + "externalId": { + "type": "string", + "description": "The resource id.", + "nullable": true + }, + "name": { + "type": "string", + "description": "The resource name.", + "nullable": true + }, + "globalRoleId": { + "type": "integer", + "description": "Resource global role id.", + "format": "int32", + "nullable": true + }, + "defaultRate": { + "type": "number", + "description": "Resource default rate.", + "format": "double", + "nullable": true + }, + "securityGroupId": { + "type": "integer", + "description": "Resource security group id.", + "format": "int32", + "nullable": true + }, + "isEnabled": { + "type": "boolean", + "description": "Defines whether resource is active." + }, + "isTimesheetUser": { + "type": "boolean", + "description": "Defines whether resource can use timesheets." + }, + "isSsoEnabled": { + "type": "boolean", + "description": "Defines whether resource has SSO enabled.", + "nullable": true + }, + "useAdvancedRate": { + "type": "boolean", + "description": "Defines whether resource has advanced rate enabled.", + "nullable": true + }, + "advancedRate": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.AdvancedRate" + }, + "description": "Defines list of advanced rates by start date.", + "nullable": true + }, + "isTeamResource": { + "type": "boolean", + "description": "Defines whether resource is team resource.", + "nullable": true + }, + "autoCalculateRate": { + "type": "boolean", + "description": "Whether auto rate should be used", + "nullable": true + }, + "createdOn": { + "type": "string", + "description": "Time when resource was created.", + "format": "date-time" + }, + "createdBy": { + "$ref": "#/components/schemas/SG.Api.Model.Actor" + }, + "updatedOn": { + "type": "string", + "description": "Time of last resource update.", + "format": "date-time" + }, + "updatedBy": { + "$ref": "#/components/schemas/SG.Api.Model.Actor" + } + }, + "additionalProperties": false, + "description": "Resource details with timestamps." + }, + "SG.Api.Model.ResourceAdvancedRate": { + "type": "object", + "properties": { + "resourceId": { + "type": "integer", + "description": "Id of the resource.", + "format": "int32" + }, + "advancedRates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.AdvancedRate" + }, + "description": "Advanced rates for the resource.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Resource advanced rates." + }, + "SG.Api.Model.ResourceApprovedAllocations": { + "type": "object", + "properties": { + "resourceId": { + "type": "integer", + "description": "Id of the resource.", + "format": "int32" + }, + "resourceExternalId": { + "type": "string", + "description": "Id of the resource.", + "nullable": true + }, + "allocations": { + "type": "array", + "items": { + "type": "number", + "format": "double" + }, + "description": "Allocations of the resource.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Resource Approved Allocations." + }, + "SG.Api.Model.ResourceCapacity": { + "type": "object", + "properties": { + "resourceId": { + "type": "integer", + "description": "The resource id.", + "format": "int32" + }, + "resourceExternalId": { + "type": "string", + "description": "The resource id.", + "nullable": true + }, + "capacity": { + "$ref": "#/components/schemas/SG.Api.Model.Capacity" + } + }, + "additionalProperties": false, + "description": "The resource capacity data." + }, + "SG.Api.Model.ResourceEdit": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "The resource id. Must be null for new resources. Mutually exclusive with ExternalId.", + "format": "int32", + "nullable": true + }, + "externalId": { + "type": "string", + "description": "The external resource id. Mutually exclusive with Id.", + "nullable": true + }, + "name": { + "type": "string", + "description": "The resource name.", + "nullable": true + }, + "globalRoleId": { + "type": "integer", + "description": "Resource global role id.", + "format": "int32", + "nullable": true + }, + "updateGlobalRole": { + "type": "boolean", + "description": "Defines whether global role should be updated." + }, + "defaultRate": { + "type": "number", + "description": "Resource default rate. Should be set if and only if UpdateDefaultRate is True.", + "format": "double", + "nullable": true + }, + "updateDefaultRate": { + "type": "boolean", + "description": "Defines whether default rate should be updated. Cannot be set together with UpdateAdvancedRate." + }, + "updateAdvancedRate": { + "type": "boolean", + "description": "Defines whether advanced default rate should be updated. Cannot be set together with UpdateDefaultRate." + }, + "advancedRate": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.AdvancedRate" + }, + "description": "Defines list of advanced default rates by start date. Should be set if and only if UpdateAdvancedRate is True.", + "nullable": true + }, + "securityGroupId": { + "type": "integer", + "description": "Resource security group id.", + "format": "int32", + "nullable": true + }, + "updateSecurityGroup": { + "type": "boolean", + "description": "Defines whether security group should be updated." + }, + "isEnabled": { + "type": "boolean", + "description": "Defines whether resource is active." + }, + "isTimesheetUser": { + "type": "boolean", + "description": "Defines whether resource can use timesheets." + }, + "isSsoEnabled": { + "type": "boolean", + "description": "Defines whether resource has SSO enabled. Set to null if the API user don't have permission to modify.", + "nullable": true + }, + "isTeamResource": { + "type": "boolean", + "description": "Defines whether resource is team resource." + }, + "updateAutoCalculateRate": { + "type": "boolean", + "description": "Whether auto rate should be updated" + }, + "autoCalculateRate": { + "type": "boolean", + "description": "Whether auto rate should be used", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Resource details that can be updated." + }, + "SG.Api.Model.ResourcePermissionRule": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of the rule.", + "format": "int32" + }, + "actorIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "Actor ids associated with the rule.", + "nullable": true + }, + "actorExternalIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Actor external ids associated with the rule.", + "nullable": true + }, + "actorSecurityGroupIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "Actor security group ids associated with the rule. Cannot be null.", + "nullable": true + }, + "actorGlobalRoleIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "Actor global role ids associated with the rule. Cannot be null.", + "nullable": true + }, + "acteeIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "Actee ids associated with the rule.", + "nullable": true + }, + "acteeExternalIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Actee external ids associated with the rule.", + "nullable": true + }, + "acteeSecurityGroupIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "Actee security group ids associated with the rule. Cannot be null.", + "nullable": true + }, + "acteeGlobalRoleIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "Actee global role ids associated with the rule. Cannot be null.", + "nullable": true + }, + "resourceRoleId": { + "type": "integer", + "description": "Resource role id.", + "format": "int32" + }, + "allowOverride": { + "type": "boolean", + "description": "Allow override." + } + }, + "additionalProperties": false, + "description": "Resource permission rRule." + }, + "SG.Api.Model.ResourcePermissionRuleEdit": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of the rule.", + "format": "int32", + "nullable": true + }, + "actorIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "Actor ids associated with the rule. Mutually exclusive with ActorExternalIds.", + "nullable": true + }, + "actorExternalIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Actor external ids associated with the rule. Mutually exclusive with ActorIds.", + "nullable": true + }, + "actorSecurityGroupIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "Resource security group ids on whom the rule will be applied. Cannot be null.", + "nullable": true + }, + "actorGlobalRoleIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "Global role ids on whom the rule will be applied. Cannot be null.", + "nullable": true + }, + "acteeIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "Actee ids associated with the rule. Mutually exclusive with ActeeExternalIds.", + "nullable": true + }, + "acteeExternalIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Actee external ids associated with the rule. Mutually exclusive with ActeeIds.", + "nullable": true + }, + "acteeSecurityGroupIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "Resource security group ids for whom the rule will be applied. Cannot be null.", + "nullable": true + }, + "acteeGlobalRoleIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "Global role ids for whom the rule will be applied. Cannot be null.", + "nullable": true + }, + "resourceRoleId": { + "type": "integer", + "description": "Resource role id to apply in the rule.", + "format": "int32" + }, + "allowOverride": { + "type": "boolean", + "description": "Allow override." + } + }, + "additionalProperties": false, + "description": "Resource permission rule edit." + }, + "SG.Api.Model.ResourceRequest": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of the resource request.", + "format": "int32" + }, + "taskId": { + "type": "integer", + "description": "Task id of the resource request.", + "format": "int32" + }, + "projectId": { + "type": "integer", + "description": "Project id of the resource request.", + "format": "int32" + }, + "projectExternalId": { + "type": "string", + "description": "External Id of the project which holds the assignment.", + "nullable": true + }, + "resourceId": { + "type": "integer", + "description": "Resource id of the resource request.", + "format": "int32" + }, + "assignmentId": { + "type": "integer", + "description": "Id of the assignment.", + "format": "int32" + }, + "resourceExternalId": { + "type": "string", + "description": "External Id of the resource.", + "nullable": true + }, + "requestedByResourceId": { + "type": "integer", + "description": "Id of the resource who requested the resource.", + "format": "int32", + "nullable": true + }, + "requestedByResourceExternalId": { + "type": "string", + "description": "External Id of the resource who requested the resource.", + "nullable": true + }, + "requestedByActorKey": { + "$ref": "#/components/schemas/SG.Api.Model.SystemActorKey" + }, + "delegatedToResourceId": { + "type": "integer", + "description": "Resource id who have been delegated to.", + "format": "int32", + "nullable": true + }, + "delegatedToResourceExternalId": { + "type": "string", + "description": "External Id of the resource who have been delegated to.", + "nullable": true + }, + "ownerResourceIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "Owners of the resource request.", + "nullable": true + }, + "ownerResourceExternalIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "External Id of the resource request owners.", + "nullable": true + }, + "processedByResourceId": { + "type": "integer", + "description": "Owner who approved, rejected or delegated the resource request.", + "format": "int32", + "nullable": true + }, + "processedByResourceExternalId": { + "type": "string", + "description": "External Id of the owner who approved, rejected or delegated the resource request.", + "nullable": true + }, + "parentResourceRequestId": { + "type": "integer", + "description": "The parent resource request id. The resource request was created or updated after parent resource request approval with resource replace.", + "format": "int32", + "nullable": true + }, + "startDate": { + "type": "string", + "description": "Start date of the resource request.", + "format": "date-time" + }, + "endDate": { + "type": "string", + "description": "End date of the resource request.", + "format": "date-time" + }, + "status": { + "$ref": "#/components/schemas/SG.Api.Model.ResourceRequestStatus" + }, + "planKind": { + "$ref": "#/components/schemas/SG.Api.Model.PlanType" + }, + "requestedOn": { + "type": "string", + "description": "Time when the allocation request was made.", + "format": "date-time" + }, + "requestedAllocations": { + "type": "array", + "items": { + "type": "number", + "format": "double" + }, + "description": "Requested new allocation in dominant unit in days.", + "nullable": true + }, + "oldAllocations": { + "type": "array", + "items": { + "type": "number", + "format": "double" + }, + "description": "Old allocation in dominant unit in days.", + "nullable": true + }, + "oldTotalHours": { + "type": "number", + "description": "Total hours of assignment before request.", + "format": "double", + "nullable": true + }, + "newTotalHours": { + "type": "number", + "description": "Total hours of assignment after request.", + "format": "double", + "nullable": true + }, + "deltaTotalHours": { + "type": "number", + "description": "Total delta hours of assignment post-request minus pre-request.", + "format": "double", + "nullable": true + }, + "oldTotalFte": { + "type": "number", + "description": "Total FTE of assignment before request.", + "format": "double", + "nullable": true + }, + "newTotalFte": { + "type": "number", + "description": "Total FTE of assignment after request.", + "format": "double", + "nullable": true + }, + "deltaTotalFte": { + "type": "number", + "description": "Total delta FTE of assignment post-request minus pre-request.", + "format": "double", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Resource request summary." + }, + "SG.Api.Model.ResourceRequestEdit": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of the resource request.", + "format": "int32" + }, + "startDate": { + "type": "string", + "description": "Start date of the resource request.", + "format": "date-time" + }, + "endDate": { + "type": "string", + "description": "End date of the resource request.", + "format": "date-time" + }, + "approvedAllocations": { + "type": "array", + "items": { + "type": "number", + "format": "double" + }, + "description": "Approved allocation in dominant unit of the requested resource in day mode.", + "nullable": true + }, + "additionalAllocations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ResourceApprovedAllocations" + }, + "description": "New allocation in dominant unit for additional resources. Used only when approving resource request.", + "nullable": true + }, + "approvedStartDate": { + "type": "string", + "description": "Start date of the partial approved resource request. Set null full approval.", + "format": "date-time", + "nullable": true + }, + "approvedEndDate": { + "type": "string", + "description": "End date of the partial approved resource request. Set null full approval.", + "format": "date-time", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Resource request edit." + }, + "SG.Api.Model.ResourceRequestStatus": { + "enum": [ + "autoApproved", + "approved", + "pending", + "rejected", + "delegated", + "information", + "replaced", + "partiallyReplaced", + "partiallyApproved", + "partiallyRejected" + ], + "type": "string", + "description": "Resource request status." + }, + "SG.Api.Model.ResourceTeam": { + "type": "object", + "properties": { + "resourceId": { + "type": "integer", + "description": "The resource id.", + "format": "int32" + }, + "resourceExternalId": { + "type": "string", + "description": "The resource external id.", + "nullable": true + }, + "teamStartDate": { + "type": "string", + "description": "Resource team start date.", + "format": "date-time", + "nullable": true + }, + "teamEndDate": { + "type": "string", + "description": "Resource team end date.", + "format": "date-time", + "nullable": true + }, + "capacitiesStoryPoints": { + "type": "array", + "items": { + "type": "number", + "format": "double" + }, + "description": "Capacity story points.", + "nullable": true + }, + "resourceTeamMembers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ResourceTeamMemberCapacity" + }, + "description": "Resource team members.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "The resource team data." + }, + "SG.Api.Model.ResourceTeamAutoCalculatedRate": { + "type": "object", + "properties": { + "resourceId": { + "type": "integer", + "description": "The resource id.", + "format": "int32" + }, + "resourceExternalId": { + "type": "string", + "description": "The resource external id.", + "nullable": true + }, + "autoCalculatedRate": { + "$ref": "#/components/schemas/SG.Api.Model.AutoCalculatedRate" + } + }, + "additionalProperties": false, + "description": "The resource team auto calculated rate." + }, + "SG.Api.Model.ResourceTeamEdit": { + "type": "object", + "properties": { + "resourceId": { + "type": "integer", + "description": "The id of resource to update. Mutually exclusive with ResourceExternalId.", + "format": "int32" + }, + "resourceExternalId": { + "type": "string", + "description": "The external id of resource to update. Mutually exclusive with ResourceIds.", + "nullable": true + }, + "startDate": { + "type": "string", + "description": "Resource team start date.", + "format": "date-time" + }, + "endDate": { + "type": "string", + "description": "Resource team end date.", + "format": "date-time", + "nullable": true + }, + "capacitiesStoryPoints": { + "type": "array", + "items": { + "type": "number", + "format": "double" + }, + "description": "Capacity story points.", + "nullable": true + }, + "resourceTeamMembers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ResourceTeamMemberCapacity" + }, + "description": "Resource team members.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Resource team details that can be updated." + }, + "SG.Api.Model.ResourceTeamMemberCapacity": { + "type": "object", + "properties": { + "resourceId": { + "type": "integer", + "description": "The member resource id.", + "format": "int32" + }, + "resourceExternalId": { + "type": "string", + "description": "The member resource external id.", + "nullable": true + }, + "capacitiesPercent": { + "type": "array", + "items": { + "type": "number", + "format": "double" + }, + "description": "The member resource capacities percent.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Resource team member capacity details that can be updated." + }, + "SG.Api.Model.Role": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of global role.", + "format": "int32" + }, + "name": { + "type": "string", + "description": "Name of global role.", + "nullable": true + }, + "roleType": { + "$ref": "#/components/schemas/SG.Api.Model.RoleType" + }, + "systemGlobalRoleKey": { + "$ref": "#/components/schemas/SG.Api.Model.SystemGlobalRoleKey" + }, + "systemProjectRoleKey": { + "$ref": "#/components/schemas/SG.Api.Model.SystemProjectRoleKey" + }, + "systemResourceRoleKey": { + "$ref": "#/components/schemas/SG.Api.Model.SystemResourceRoleKey" + }, + "permissions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.RolePermission" + }, + "description": "Permissions of the role.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Global role that defines permissions for users to access system." + }, + "SG.Api.Model.RoleEdit": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of role.", + "format": "int32", + "nullable": true + }, + "name": { + "type": "string", + "description": "Name of global role.", + "nullable": true + }, + "roleType": { + "$ref": "#/components/schemas/SG.Api.Model.RoleType" + }, + "permissions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.RolePermission" + }, + "description": "List of permission for the role.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Global role that defines permissions for users to access system." + }, + "SG.Api.Model.RolePermission": { + "type": "object", + "properties": { + "permission": { + "$ref": "#/components/schemas/SG.Api.Model.Permission" + }, + "flags": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.PermissionFlag" + }, + "description": "List of flag for the role.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Role Permission." + }, + "SG.Api.Model.RoleType": { + "enum": [ + "global", + "project", + "resource" + ], + "type": "string", + "description": "Role type." + }, + "SG.Api.Model.ScheduleTaskStatus": { + "enum": [ + "notStarted", + "inProgress", + "completed", + "canceled", + "onHold" + ], + "type": "string", + "description": "Schedule task status." + }, + "SG.Api.Model.ScheduleTaskType": { + "enum": [ + "fixedWork", + "fixedDuration", + "fixedAllocationPercent" + ], + "type": "string", + "description": "Schedule task type." + }, + "SG.Api.Model.SecurityGroupEdit": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of the security group.", + "format": "int32", + "nullable": true + }, + "name": { + "type": "string", + "description": "Name of the security group.", + "nullable": true + }, + "securityGroupType": { + "$ref": "#/components/schemas/SG.Api.Model.SecurityGroupType" + } + }, + "additionalProperties": false, + "description": "Security group of projects or resources with common permission settings." + }, + "SG.Api.Model.SecurityGroupInfo": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of the security group.", + "format": "int32" + }, + "name": { + "type": "string", + "description": "Name of the security group.", + "nullable": true + }, + "securityGroupType": { + "$ref": "#/components/schemas/SG.Api.Model.SecurityGroupType" + } + }, + "additionalProperties": false, + "description": "Security group of projects or resources with common permission settings." + }, + "SG.Api.Model.SecurityGroupType": { + "enum": [ + "project", + "resource" + ], + "type": "string", + "description": "Security group type." + }, + "SG.Api.Model.Sheets.Sheet": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of the sheet.", + "format": "int32" + }, + "name": { + "type": "string", + "description": "Name of the sheet.", + "nullable": true + }, + "sheetTemplateId": { + "type": "integer", + "description": "Id of the sheet template of the sheet.", + "format": "int32" + }, + "projectId": { + "type": "integer", + "description": "Id of the project associated with the sheet.", + "format": "int32", + "nullable": true + }, + "projectExternalId": { + "type": "string", + "description": "The project external id.", + "nullable": true + }, + "resourceId": { + "type": "integer", + "description": "Id of the resource associated with the sheet.", + "format": "int32", + "nullable": true + }, + "resourceExternalId": { + "type": "string", + "description": "The resource external id.", + "nullable": true + }, + "createdOn": { + "type": "string", + "description": "Time when the sheet was created.", + "format": "date-time" + }, + "createdByResourceId": { + "type": "integer", + "description": "Id of the resource who created the sheet.", + "format": "int32" + }, + "createdByResourceExternalId": { + "type": "string", + "description": "External Id of the resource who created the sheet.", + "nullable": true + }, + "updatedOn": { + "type": "string", + "description": "Time when the sheet was updated.", + "format": "date-time" + }, + "updatedByResourceId": { + "type": "integer", + "description": "Id of the resource who updated the sheet.", + "format": "int32" + }, + "updatedByResourceExternalId": { + "type": "string", + "description": "External Id of the resource who updated the sheet.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Sheet." + }, + "SG.Api.Model.Sheets.SheetColumnData": { + "type": "object", + "properties": { + "columnId": { + "type": "integer", + "description": "Id of the column.", + "format": "int32" + }, + "value": { + "$ref": "#/components/schemas/SG.Api.Model.CustomFieldValue" + } + }, + "additionalProperties": false, + "description": "Sheet column." + }, + "SG.Api.Model.Sheets.SheetCreate": { + "type": "object", + "properties": { + "sheetTemplateId": { + "type": "integer", + "description": "Id of the sheet template of the sheet.", + "format": "int32" + }, + "projectId": { + "type": "integer", + "description": "Id of the project associated with the sheet.", + "format": "int32", + "nullable": true + }, + "projectExternalId": { + "type": "string", + "description": "The project external id.", + "nullable": true + }, + "resourceId": { + "type": "integer", + "description": "Id of the resource associated with the sheet.", + "format": "int32", + "nullable": true + }, + "resourceExternalId": { + "type": "string", + "description": "The resource external id.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Sheet." + }, + "SG.Api.Model.Sheets.SheetData": { + "type": "object", + "properties": { + "sheet": { + "$ref": "#/components/schemas/SG.Api.Model.Sheets.Sheet" + }, + "sheetTemplate": { + "$ref": "#/components/schemas/SG.Api.Model.Sheets.SheetTemplate" + }, + "rows": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.Sheets.SheetRow" + }, + "description": "Sheet rows. Empty rows are excluded from rows.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Sheet data." + }, + "SG.Api.Model.Sheets.SheetDataEdit": { + "type": "object", + "properties": { + "sheetId": { + "type": "integer", + "description": "Id of the sheet.", + "format": "int32" + }, + "rows": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.Sheets.SheetRowData" + }, + "description": "Rows of the sheet.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Sheet." + }, + "SG.Api.Model.Sheets.SheetEntityType": { + "enum": [ + "project", + "resource" + ], + "type": "string", + "description": "The type of entity, that can have sheet associated." + }, + "SG.Api.Model.Sheets.SheetRow": { + "type": "object", + "properties": { + "rowIndex": { + "type": "integer", + "description": "Index of the row.", + "format": "int32" + }, + "columnData": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.CustomFieldValue" + }, + "description": "Column data of the row. Ordered by the column order of the sheet template.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Sheet row." + }, + "SG.Api.Model.Sheets.SheetRowData": { + "type": "object", + "properties": { + "columns": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.Sheets.SheetColumnData" + }, + "description": "Columns of the row.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Sheet row." + }, + "SG.Api.Model.Sheets.SheetTemplate": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of the sheet template.", + "format": "int32" + }, + "name": { + "type": "string", + "description": "Name of the sheet template.", + "nullable": true + }, + "entityType": { + "$ref": "#/components/schemas/SG.Api.Model.Sheets.SheetEntityType" + }, + "columns": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.Sheets.SheetTemplateColumn" + }, + "description": "Columns of the sheet template.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Sheet template." + }, + "SG.Api.Model.Sheets.SheetTemplateColumn": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of the column.", + "format": "int32" + }, + "name": { + "type": "string", + "description": "Name of the column.", + "nullable": true + }, + "dataType": { + "$ref": "#/components/schemas/SG.Api.Model.CustomFieldDataType" + }, + "enumMembers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ValueEnumMemberInfo" + }, + "description": "Enum members of the column.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Sheet template column." + }, + "SG.Api.Model.Skill": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of the skill.", + "format": "int32" + }, + "name": { + "type": "string", + "description": "Name of the skill.", + "nullable": true + }, + "skillValueTypeId": { + "type": "integer", + "description": "Skill value type Id.", + "format": "int32" + }, + "description": { + "type": "string", + "description": "Skill description.", + "nullable": true + }, + "trackExpiration": { + "type": "boolean", + "description": "Allows to define expiration date for skill values." + } + }, + "additionalProperties": false, + "description": "Defines the one skill." + }, + "SG.Api.Model.SkillCategory": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of the skill category.", + "format": "int32" + }, + "name": { + "type": "string", + "description": "Name of the skill category.", + "nullable": true + }, + "skillIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "Ids of the skills included in skill category.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Defines the category of skill that can be associated with a resource." + }, + "SG.Api.Model.SkillCategoryEdit": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of the skill category. Should not be defined if new skill category created.", + "format": "int32", + "nullable": true + }, + "name": { + "type": "string", + "description": "Name of the custom field.", + "nullable": true + }, + "skillIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "Ids of the skills included in skill category.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Defines the category of skill that can be associated with a resource." + }, + "SG.Api.Model.SkillDataType": { + "enum": [ + "enum", + "bool", + "intRange" + ], + "type": "string", + "description": "Skill data type." + }, + "SG.Api.Model.SkillEdit": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of the skill.", + "format": "int32", + "nullable": true + }, + "name": { + "type": "string", + "description": "Name of the skill.", + "nullable": true + }, + "skillValueTypeId": { + "type": "integer", + "description": "Skill value type Id of the skill.", + "format": "int32" + }, + "description": { + "type": "string", + "description": "Skill description.", + "nullable": true + }, + "trackExpiration": { + "type": "boolean", + "description": "Allows to define expiration date for skill values." + } + }, + "additionalProperties": false, + "description": "Defines the one skill of a skill category." + }, + "SG.Api.Model.SkillValue": { + "type": "object", + "properties": { + "valueDouble": { + "type": "number", + "description": "Defines value for Enum, IntRange skills.", + "format": "double", + "nullable": true + }, + "valueBoolean": { + "type": "boolean", + "description": "Defines value for Bool skills.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "The value that can be association with a Skill object." + }, + "SG.Api.Model.SkillValueEnumMemberInfo": { + "type": "object", + "properties": { + "enumMemberId": { + "type": "integer", + "description": "The id of enum member for selection skill.", + "format": "int32" + }, + "name": { + "type": "string", + "description": "The enum member name.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Selection skill value." + }, + "SG.Api.Model.SkillValueType": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of the skill value type.", + "format": "int32" + }, + "name": { + "type": "string", + "description": "Name of the skill value type.", + "nullable": true + }, + "dataType": { + "$ref": "#/components/schemas/SG.Api.Model.SkillDataType" + }, + "enumMembers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.SkillValueEnumMemberInfo" + }, + "description": "Possible values for lookup.", + "nullable": true + }, + "minValue": { + "type": "integer", + "description": "Min value of skill value type.", + "format": "int32", + "nullable": true + }, + "maxValue": { + "type": "integer", + "description": "Max value of skill value type.", + "format": "int32", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Defines the type of information that can be associated with skill category." + }, + "SG.Api.Model.Snapshots.Assignment": { + "type": "object", + "properties": { + "taskId": { + "type": "integer", + "description": "Task Id of the assignment.", + "format": "int32" + }, + "resourceId": { + "type": "integer", + "description": "Resource Id of the assignment.", + "format": "int32" + }, + "resourceExternalId": { + "type": "string", + "description": "Resource external id of the assignment.", + "nullable": true + }, + "id": { + "type": "integer", + "description": "Assignment Id.", + "format": "int32" + }, + "actualAllocations": { + "$ref": "#/components/schemas/SG.Api.Model.AllocationsTable" + }, + "plannedAllocations": { + "$ref": "#/components/schemas/SG.Api.Model.AllocationsTable" + }, + "customFieldValues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.Snapshots.SnapshotCustomFieldValue" + }, + "description": "Assignment custom field values.", + "nullable": true + }, + "workHours": { + "type": "number", + "description": "Work hours for schedule plan task.", + "format": "double", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Assignment details included into snapshot." + }, + "SG.Api.Model.Snapshots.Project": { + "type": "object", + "properties": { + "startDate": { + "type": "string", + "description": "Project start date.", + "format": "date-time", + "nullable": true + }, + "endDate": { + "type": "string", + "description": "Project end date.", + "format": "date-time", + "nullable": true + }, + "financialStartMonth": { + "type": "string", + "description": "Financial start month.", + "format": "date-time", + "nullable": true + }, + "financialEndMonth": { + "type": "string", + "description": "Financial end month.", + "format": "date-time", + "nullable": true + }, + "name": { + "type": "string", + "description": "Project name.", + "nullable": true + }, + "customFieldValues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.Snapshots.SnapshotCustomFieldValue" + }, + "description": "Project custom field values.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Project details included into snapshot." + }, + "SG.Api.Model.Snapshots.ProjectSnapshot": { + "type": "object", + "properties": { + "summary": { + "$ref": "#/components/schemas/SG.Api.Model.Snapshots.ProjectSnapshotSummary" + }, + "project": { + "$ref": "#/components/schemas/SG.Api.Model.Snapshots.Project" + }, + "tasks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.Task" + }, + "description": "Project tasks.", + "nullable": true + }, + "assignments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.Snapshots.Assignment" + }, + "description": "Project assignments in dominant unit.", + "nullable": true + }, + "resources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.Snapshots.Resource" + }, + "description": "Resources associated with project.", + "nullable": true + }, + "customFields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.CustomField" + }, + "description": "Project and assignment custom fields.", + "nullable": true + }, + "milestones": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.Milestone" + }, + "description": "Project milestones.", + "nullable": true + }, + "teamResources": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "Project team.", + "nullable": true + }, + "teamResourcesExternalIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Project team external ids.", + "nullable": true + }, + "projectSecurityGroup": { + "$ref": "#/components/schemas/SG.Api.Model.SecurityGroupInfo" + }, + "financialCategories": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.FinancialCategory" + }, + "description": "Financial categories involved in financial rows.", + "nullable": true + }, + "financialTypes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.FinancialType" + }, + "description": "Financial types involved in financial categories.", + "nullable": true + }, + "financialRows": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.FinancialRow" + }, + "description": "Financial rows for project.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "The project snapshot details." + }, + "SG.Api.Model.Snapshots.ProjectSnapshotCreate": { + "type": "object", + "properties": { + "projectIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "List of project id.", + "nullable": true + }, + "projectExternalIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of project external id.", + "nullable": true + }, + "name": { + "type": "string", + "description": "Name of the snapshot.", + "nullable": true + }, + "snapshotTypeId": { + "type": "integer", + "description": "Snapshot type id.", + "format": "int32", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Project snapshot create." + }, + "SG.Api.Model.Snapshots.ProjectSnapshotEdit": { + "type": "object", + "properties": { + "snapshotIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "List of snapshot id.", + "nullable": true + }, + "name": { + "type": "string", + "description": "Name of the snapshot.", + "nullable": true + }, + "snapshotTypeId": { + "type": "integer", + "description": "Snapshot type id.", + "format": "int32", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Project snapshot edit." + }, + "SG.Api.Model.Snapshots.ProjectSnapshotSummary": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of project snapshot.", + "format": "int32" + }, + "name": { + "type": "string", + "description": "The project snapshot name.", + "nullable": true + }, + "projectId": { + "type": "integer", + "description": "Id of the project.", + "format": "int32" + }, + "projectExternalId": { + "type": "string", + "description": "The current external Id value of the project.", + "nullable": true + }, + "createdOn": { + "type": "string", + "description": "Time when snapshot was created.", + "format": "date-time" + }, + "createdByResourceId": { + "type": "integer", + "description": "Id of snapshot creator.", + "format": "int32" + }, + "createdByResourceExternalId": { + "type": "string", + "description": "External id of snapshot creator.", + "nullable": true + }, + "number": { + "type": "integer", + "description": "Snapshot number.", + "format": "int32" + }, + "snapshotTypeId": { + "type": "integer", + "description": "The snapshot type id.", + "format": "int32", + "nullable": true + }, + "dominantUnit": { + "$ref": "#/components/schemas/SG.Api.Model.DominantUnit" + }, + "hoursPerManday": { + "type": "number", + "description": "The hours per manday used in the system when snapshot was created.", + "format": "double" + } + }, + "additionalProperties": false, + "description": "Project snapshot summary." + }, + "SG.Api.Model.Snapshots.Resource": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of resource.", + "format": "int32" + }, + "externalId": { + "type": "string", + "description": "External Id of resource.", + "nullable": true + }, + "defaultRate": { + "type": "number", + "description": "Resource default rate.", + "format": "double", + "nullable": true + }, + "name": { + "type": "string", + "description": "Resource name.", + "nullable": true + }, + "netCapacityHours": { + "type": "array", + "items": { + "type": "number", + "format": "double" + }, + "description": "Net capacity hours by days.", + "nullable": true + }, + "netCapacityFte": { + "type": "array", + "items": { + "type": "number", + "format": "double" + }, + "description": "Net capacity fte by days.", + "nullable": true + }, + "capacityStartDate": { + "type": "string", + "description": "Capacity start date.", + "format": "date-time", + "nullable": true + }, + "isTeamResource": { + "type": "boolean", + "description": "Team resource flag." + } + }, + "additionalProperties": false, + "description": "Resource details included into snapshot." + }, + "SG.Api.Model.Snapshots.SnapshotCustomFieldValue": { + "type": "object", + "properties": { + "value": { + "$ref": "#/components/schemas/SG.Api.Model.CustomFieldValue" + }, + "customFieldId": { + "type": "integer", + "description": "The id of custom field.", + "format": "int32" + } + }, + "additionalProperties": false, + "description": "Defines snapshot custom field value." + }, + "SG.Api.Model.Snapshots.SnapshotType": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of snapshot type.", + "format": "int32" + }, + "name": { + "type": "string", + "description": "Name of snapshot type.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Snapshot type details." + }, + "SG.Api.Model.Subscription": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of the subscription.", + "format": "int32" + }, + "url": { + "type": "string", + "description": "Endpoint Url where notification should be sent.", + "nullable": true + }, + "eventType": { + "$ref": "#/components/schemas/SG.Api.Model.SubscriptionEventType" + }, + "isActive": { + "type": "boolean", + "description": "Status of the subscription." + }, + "responseDataType": { + "$ref": "#/components/schemas/SG.Api.Model.SubscriptionResponseDataType" + }, + "filter": { + "$ref": "#/components/schemas/SG.Api.Model.Filter" + } + }, + "additionalProperties": false, + "description": "Subscription." + }, + "SG.Api.Model.SubscriptionEdit": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of the subscription.", + "format": "int32", + "nullable": true + }, + "url": { + "type": "string", + "description": "Endpoint Url where notification should be sent.", + "nullable": true + }, + "eventType": { + "$ref": "#/components/schemas/SG.Api.Model.SubscriptionEventType" + }, + "responseDataType": { + "$ref": "#/components/schemas/SG.Api.Model.SubscriptionResponseDataType" + }, + "filter": { + "$ref": "#/components/schemas/SG.Api.Model.Filter" + } + }, + "additionalProperties": false, + "description": "Subscription edit." + }, + "SG.Api.Model.SubscriptionEventType": { + "enum": [ + "projectCreate", + "projectFixedFieldsUpdate", + "projectDelete", + "resourceCreate", + "resourceFixedFieldsUpdate", + "resourceDelete", + "taskCreate", + "taskUpdate", + "taskDelete", + "assignmentCreate", + "assignmentUpdate", + "assignmentDelete", + "resourceNetCapacityUpdate", + "timesheetCreate", + "timesheetDelete", + "timesheetStatusUpdate", + "resourceRequestCreate", + "resourceRequestStatusUpdate", + "resourceRequestDelete", + "projectCustomFieldValuesUpdate", + "resourceCustomFieldValuesUpdate", + "assignmentCustomFieldValuesUpdate", + "projectTimestampsUpdate", + "resourceTimestampsUpdate", + "customFieldCreate", + "customFieldUpdate", + "customFieldDelete" + ], + "type": "string", + "description": "Subscription event type." + }, + "SG.Api.Model.SubscriptionResponseDataType": { + "enum": [ + "afterData", + "onlyId" + ], + "type": "string", + "description": "Subscription response data type." + }, + "SG.Api.Model.SubscriptionSecret": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of the subscription.", + "format": "int32" + }, + "secretKey": { + "type": "string", + "description": "Secret key of the subscription as base64 string.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Subscription Secret." + }, + "SG.Api.Model.SystemActorKey": { + "enum": [ + "system", + "excel", + "msProject", + "mpp", + "smartsheet", + "workfront", + "jira", + "ppmPro", + "jiraBot" + ], + "type": "string", + "description": "Types of system processes that can modify system state." + }, + "SG.Api.Model.SystemCustomFieldKey": { + "enum": [ + "isProposal", + "isResourceManager", + "resourceManager", + "requiresResourceManagerApproval", + "datasetPreference", + "eMail", + "resourceHierarchy", + "projectHierarchy", + "isTimesheetApprover", + "timesheetApprover", + "projectOwner", + "apiProjectExternalId", + "apiResourceExternalId", + "enableResourceAllocationThreshold", + "skillMatchScore" + ], + "type": "string", + "description": "System custom field key." + }, + "SG.Api.Model.SystemGlobalRoleKey": { + "enum": [ + "administrator", + "regularUser" + ], + "type": "string", + "description": "System global role key types." + }, + "SG.Api.Model.SystemProjectRoleKey": { + "enum": [ + "manager", + "editor", + "viewer" + ], + "type": "string", + "description": "System project role key types." + }, + "SG.Api.Model.SystemResourceRoleKey": { + "enum": [ + "manager", + "editor", + "viewer", + "minimalAccess" + ], + "type": "string", + "description": "System resource role key types." + }, + "SG.Api.Model.Task": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "The task id.", + "format": "int32" + }, + "projectId": { + "type": "integer", + "description": "The project id.", + "format": "int32" + }, + "projectExternalId": { + "type": "string", + "description": "The project external id.", + "nullable": true + }, + "name": { + "type": "string", + "description": "The task name.", + "nullable": true + }, + "planType": { + "$ref": "#/components/schemas/SG.Api.Model.PlanType" + }, + "isGeneric": { + "type": "boolean", + "description": "The flag shows whether task is generic or a project summary." + }, + "scheduleTaskType": { + "$ref": "#/components/schemas/SG.Api.Model.ScheduleTaskType" + }, + "scheduleTaskStatus": { + "$ref": "#/components/schemas/SG.Api.Model.ScheduleTaskStatus" + }, + "startDate": { + "type": "string", + "description": "Start date of schedule plan task.", + "format": "date-time", + "nullable": true + }, + "duration": { + "type": "number", + "description": "Duration of schedule plan task in days.", + "format": "double", + "nullable": true + }, + "isMilestone": { + "type": "boolean", + "description": "Denotes if schedule plan task is a milestone.", + "nullable": true + }, + "workHours": { + "type": "number", + "description": "Work hours of schedule plan task.", + "format": "double", + "nullable": true + }, + "wbs": { + "type": "string", + "description": "WBS of schedule plan task.", + "nullable": true + }, + "completePercentage": { + "type": "number", + "description": "Complete percentage of schedule plan task.", + "format": "double", + "nullable": true + }, + "number": { + "type": "integer", + "description": "Unique number of the task within the project.", + "format": "int32", + "nullable": true + }, + "parentTaskId": { + "type": "integer", + "description": "Id of the parent task.", + "format": "int32", + "nullable": true + } + }, + "additionalProperties": false, + "description": "The project task." + }, + "SG.Api.Model.TaskDependency": { + "type": "object", + "properties": { + "fromTaskId": { + "type": "integer", + "description": "Id of the source task.", + "format": "int32" + }, + "toTaskId": { + "type": "integer", + "description": "Id of the target task.", + "format": "int32" + }, + "dependencyType": { + "$ref": "#/components/schemas/SG.Api.Model.TaskDependencyType" + }, + "delta": { + "type": "number", + "description": "Lag or lead in dependency.", + "format": "double" + } + }, + "additionalProperties": false, + "description": "Task Dependency." + }, + "SG.Api.Model.TaskDependencyType": { + "enum": [ + "startToStart", + "endToStart", + "endToEnd" + ], + "type": "string", + "description": "Task dependency type." + }, + "SG.Api.Model.TaskEdit": { + "type": "object", + "properties": { + "projectId": { + "type": "integer", + "description": "The project id. Mutually exclusive with ProjectExternalId.", + "format": "int32" + }, + "projectExternalId": { + "type": "string", + "description": "The project external id. Mutually exclusive with ProjectId.", + "nullable": true + }, + "name": { + "type": "string", + "description": "The task name.", + "nullable": true + }, + "planType": { + "$ref": "#/components/schemas/SG.Api.Model.PlanType" + } + }, + "additionalProperties": false, + "description": "The task information that is editable." + }, + "SG.Api.Model.TaskInfo": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of the task.", + "format": "int32" + }, + "name": { + "type": "string", + "description": "Name of the task.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Short task definition." + }, + "SG.Api.Model.TimeEntryLevel": { + "enum": [ + "project", + "task" + ], + "type": "string", + "description": "Represents the level of time entry to be applied." + }, + "SG.Api.Model.TimeUnit": { + "enum": [ + "day", + "week", + "month", + "quarter", + "year", + "project" + ], + "type": "string", + "description": "Supported time units." + }, + "SG.Api.Model.Timesheet": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "A unique identifier of timesheet.", + "format": "int32" + }, + "status": { + "$ref": "#/components/schemas/SG.Api.Model.TimesheetStatus" + }, + "resourceId": { + "type": "integer", + "description": "A unique identifier of resource.", + "format": "int32", + "nullable": true + }, + "deletedResourceId": { + "type": "integer", + "description": "A unique identifier of deleted resource if any.", + "format": "int32", + "nullable": true + }, + "resourceExternalId": { + "type": "string", + "description": "External id of resource.", + "nullable": true + }, + "periodId": { + "type": "integer", + "description": "A unique identifier of period.", + "format": "int32" + }, + "archivedResourceName": { + "type": "string", + "description": "A name of resource. Assigned when timesheet approved otherwise empty.", + "nullable": true + }, + "dataRows": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.TimesheetRow" + }, + "description": "List of timesheet tasks hours details.", + "nullable": true + }, + "activities": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.TimesheetActivity" + }, + "description": "List of activities on timesheet.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Represents timesheet details." + }, + "SG.Api.Model.TimesheetAction": { + "type": "object", + "properties": { + "timesheetsIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "Unique identifiers of timesheets.", + "nullable": true + }, + "comment": { + "type": "string", + "description": "Action comment.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Action details." + }, + "SG.Api.Model.TimesheetActivity": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of the activity.", + "format": "int32" + }, + "resourceManagerId": { + "type": "integer", + "description": "The field should no longer be used, ApproverResourceId must be used instead.", + "format": "int32", + "nullable": true, + "deprecated": true + }, + "deletedResourceManagerId": { + "type": "integer", + "description": "The field should no longer be used, DeletedApproverResourceId must be used instead.", + "format": "int32", + "nullable": true, + "deprecated": true + }, + "archivedResourceManagerName": { + "type": "string", + "description": "The field should no longer be used, ArchivedApproverResourceName must be used instead.", + "nullable": true, + "deprecated": true + }, + "approverResourceId": { + "type": "integer", + "description": "Id of the timesheet approver.", + "format": "int32", + "nullable": true + }, + "deletedApproverResourceId": { + "type": "integer", + "description": "Id of the deleted timesheet approver.", + "format": "int32", + "nullable": true + }, + "approverResourceExternalId": { + "type": "string", + "description": "External id of the timesheet approver.", + "nullable": true + }, + "archivedApproverResourceName": { + "type": "string", + "description": "Name of the deleted timesheet approver.", + "nullable": true + }, + "ownerResourceId": { + "type": "integer", + "description": "Id of the timesheet owner.", + "format": "int32", + "nullable": true + }, + "deletedOwnerResourceId": { + "type": "integer", + "description": "Id of the deleted timesheet owner.", + "format": "int32", + "nullable": true + }, + "ownerResourceExternalId": { + "type": "string", + "description": "External id of the timesheet owner.", + "nullable": true + }, + "archivedOwnerResourceName": { + "type": "string", + "description": "Name of the deleted timesheet owner.", + "nullable": true + }, + "actionType": { + "$ref": "#/components/schemas/SG.Api.Model.TimesheetStatus" + }, + "comment": { + "type": "string", + "description": "Comment on the activity.", + "nullable": true + }, + "timestamp": { + "type": "string", + "description": "Time when the action was taken.", + "format": "date-time" + }, + "requireProjectOwnerApproval": { + "type": "boolean", + "description": "Set approver action if owner approval is required for allocations.", + "nullable": true + }, + "actorResourceId": { + "type": "integer", + "description": "Id of the timesheet actor who took the action on behalf of timesheet creator, project owner or timesheet approver.", + "format": "int32", + "nullable": true + }, + "deletedActorResourceId": { + "type": "integer", + "description": "Id of the deleted timesheet actor who took the action on behalf of timesheet creator, project owner or timesheet approver.", + "format": "int32", + "nullable": true + }, + "actorResourceExternalId": { + "type": "string", + "description": "External Id of the timesheet actor who took the action on behalf of timesheet creator, project owner or timesheet approver.", + "nullable": true + }, + "archivedActorResourceName": { + "type": "string", + "description": "Name of the deleted timesheet actor who took the action on behalf of timesheet creator, project owner or timesheet approver.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Timesheet activity." + }, + "SG.Api.Model.TimesheetAllocationsAction": { + "type": "object", + "properties": { + "timesheetId": { + "type": "integer", + "description": "Unique identifiers of timesheet.", + "format": "int32" + }, + "comment": { + "type": "string", + "description": "Comment of the action.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Action by project owner on timesheet allocation." + }, + "SG.Api.Model.TimesheetEdit": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "A unique identifier of timesheet.", + "format": "int32" + }, + "resourceId": { + "type": "integer", + "description": "A unique identifier of resource. Mutually exclusive with ResourceExternalId.", + "format": "int32" + }, + "resourceExternalId": { + "type": "string", + "description": "An external id of resource. Mutually exclusive with ResourceId.", + "nullable": true + }, + "periodId": { + "type": "integer", + "description": "A unique identifier of period.", + "format": "int32" + }, + "comment": { + "type": "string", + "description": "Comment for draft timesheet.", + "nullable": true + }, + "dataRows": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.TimesheetRowEdit" + }, + "description": "List of timesheet tasks hours details.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Represents timesheet details that can be updated." + }, + "SG.Api.Model.TimesheetPeriod": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "A unique identifier of timesheet period.", + "format": "int32" + }, + "start": { + "type": "string", + "description": "A period start date.", + "format": "date-time" + }, + "finish": { + "type": "string", + "description": "A period end date.", + "format": "date-time" + }, + "title": { + "type": "string", + "description": "A period name.", + "nullable": true + }, + "weekends": { + "type": "integer", + "description": "A bit mask defines non-working days of week, starting from Sunday.", + "format": "int32" + }, + "isOpen": { + "type": "boolean", + "description": "Indicates if users can create or update timesheets for the period." + }, + "isConsolidatedViewMember": { + "type": "boolean", + "description": "Indicates if timesheet period included in consolidated view." + }, + "hasTimesheets": { + "type": "boolean", + "description": "Indicates if any timesheet exists in period." + }, + "explicitlyOpenedForResourceIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "Ids of resources timesheet period is explicitly opened for.", + "nullable": true + }, + "explicitlyOpenedForResourceExternalIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "External ids of resources timesheet period is explicitly opened for.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Represents details of timesheet period." + }, + "SG.Api.Model.TimesheetPeriodCreate": { + "type": "object", + "properties": { + "start": { + "type": "string", + "description": "A period start date.", + "format": "date-time" + }, + "finish": { + "type": "string", + "description": "A period end date.", + "format": "date-time" + }, + "title": { + "type": "string", + "description": "A period name.", + "nullable": true + }, + "isOpen": { + "type": "boolean", + "description": "Indicates if users can create or update timesheets for the period." + }, + "isConsolidatedViewMember": { + "type": "boolean", + "description": "Indicates if timesheet period included in consolidated view." + } + }, + "additionalProperties": false, + "description": "Represents timesheet period details required for creation." + }, + "SG.Api.Model.TimesheetPeriodEdit": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "A period unique identifier.", + "format": "int32" + }, + "title": { + "type": "string", + "description": "A period name.", + "nullable": true + }, + "isOpen": { + "type": "boolean", + "description": "Indicates if users can create or update timesheets for the period." + }, + "explicitlyOpenedForResourceIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "Ids of resources timesheet period is explicitly opened for. Mutually exclusive with ExplicitlyOpenedForResourceExternalIds.", + "nullable": true + }, + "explicitlyOpenedForResourceExternalIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "External ids of resources timesheet period is explicitly opened for. Mutually exclusive with ExplicitlyOpenedForResourceIds.", + "nullable": true + }, + "isConsolidatedViewMember": { + "type": "boolean", + "description": "Indicates if timesheet period included in consolidated view." + } + }, + "additionalProperties": false, + "description": "Represents timesheet period details that can be changed." + }, + "SG.Api.Model.TimesheetRow": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "A unique identifier.", + "format": "int32" + }, + "taskId": { + "type": "integer", + "description": "A unique identifier of completed tasks.", + "format": "int32", + "nullable": true + }, + "assignmentId": { + "type": "integer", + "description": "A unique identifier of assignment.", + "format": "int32", + "nullable": true + }, + "hoursData": { + "type": "array", + "items": { + "type": "number", + "format": "double" + }, + "description": "Allocations in timesheets dominant unit. The field should no longer be used, dataUnit parameter must be specified in request and allocations field must be used instead.", + "nullable": true, + "deprecated": true + }, + "allocations": { + "type": "array", + "items": { + "type": "number", + "format": "double" + }, + "description": "Timesheet allocations in requested data unit.", + "nullable": true + }, + "deletedTaskId": { + "type": "integer", + "description": "A unique identifier of deleted task if any.", + "format": "int32", + "nullable": true + }, + "archivedTaskName": { + "type": "string", + "description": "A name of task archived when timesheet was approved.", + "nullable": true + }, + "archivedProjectName": { + "type": "string", + "description": "A name of project archived when timesheet was approved.", + "nullable": true + }, + "ownerActionType": { + "$ref": "#/components/schemas/SG.Api.Model.TimesheetStatus" + }, + "ownerActionByEternalResourceId": { + "type": "integer", + "description": "Approved or rejected by project owner. When assignment don't have any owner contain id of the approver.", + "format": "int32", + "nullable": true + }, + "ownerActionByResourceExternalId": { + "type": "string", + "description": "Approved or rejected by project owner external id. When assignment don't have any owner contain external id of the approver.", + "nullable": true + }, + "note": { + "type": "string", + "description": "A note for timesheet allocations.", + "nullable": true + }, + "teamResourceId": { + "type": "integer", + "description": "A unique identifier of team resource if any.", + "format": "int32", + "nullable": true + }, + "deletedTeamResourceId": { + "type": "integer", + "description": "A unique identifier of deleted team resource if any.", + "format": "int32", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Represents timesheet hours logged for a single task." + }, + "SG.Api.Model.TimesheetRowEdit": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "A unique identifier.", + "format": "int32" + }, + "taskId": { + "type": "integer", + "description": "A unique identifier of completed tasks.", + "format": "int32" + }, + "assignmentId": { + "type": "integer", + "description": "A unique identifier of assignment.", + "format": "int32", + "nullable": true + }, + "hoursData": { + "type": "array", + "items": { + "type": "number", + "format": "double" + }, + "description": "The field should no longer be used, allocations field must be used instead.", + "nullable": true, + "deprecated": true + }, + "allocations": { + "type": "array", + "items": { + "type": "number", + "format": "double" + }, + "description": "Allocations in timesheets dominant unit, includes non-working days.", + "nullable": true + }, + "note": { + "type": "string", + "description": "A note for timesheet allocations.", + "nullable": true + }, + "teamResourceId": { + "type": "integer", + "description": "A unique identifier of team resource.", + "format": "int32", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Represents hours details that can be updated for a single task." + }, + "SG.Api.Model.TimesheetSettings": { + "type": "object", + "properties": { + "weekStart": { + "type": "integer", + "description": "Default week start day starting from Sunday.", + "format": "int32" + }, + "weekends": { + "type": "integer", + "description": "A bit mask defines non-working days of week, starting from Sunday.", + "format": "int32" + }, + "periodAutoOpenBehavior": { + "type": "boolean", + "description": "Indicates if period auto open behavior should be used." + }, + "periodAutoOpenSettings": { + "$ref": "#/components/schemas/SG.Api.Model.PeriodAutoOpenSettings" + }, + "saveHoursOnApprove": { + "type": "boolean", + "description": "The field should no longer be used, SaveAllocationsOnApprove must be used instead.", + "deprecated": true + }, + "saveAllocationsOnApprove": { + "type": "boolean", + "description": "Defines whether timesheet allocations should be saved as actual on approve." + }, + "keepWeekendAllocationsOnSave": { + "type": "boolean", + "description": "Defines whether timesheet weekends allocations should be saved on actual weekdays on approve." + }, + "selfServiceCustomFieldId": { + "type": "integer", + "description": "Unique identifier of self service custom field.", + "format": "int32", + "nullable": true + }, + "maximumHoursPerTimesheet": { + "type": "number", + "description": "Maximum amount of hours that can be saved for a single timesheet.", + "format": "double", + "nullable": true + }, + "maximumHoursPerDay": { + "type": "number", + "description": "Maximum amount of hours that can be saved for a single day in timesheet.", + "format": "double" + }, + "maximumFtePerTimesheet": { + "type": "number", + "description": "Maximum FTE that can be saved for a single timesheet.", + "format": "double", + "nullable": true + }, + "maximumFtePerDay": { + "type": "number", + "description": "Maximum FTE that can be saved for a single day in timesheet.", + "format": "double", + "nullable": true + }, + "autoApproveForResourceIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "Ids of resources which timesheets are automatically approved after submit.", + "nullable": true + }, + "autoApproveForResourceExternalIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "External ids of resources which timesheets are automatically approved after submit.", + "nullable": true + }, + "mandatoryNoteProjectIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "Ids of projects which require mandatory notes in timesheet rows.", + "nullable": true + }, + "mandatoryNoteProjectExternalIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "External ids of projects which require mandatory notes in timesheet rows.", + "nullable": true + }, + "dominantUnit": { + "$ref": "#/components/schemas/SG.Api.Model.DominantUnit" + }, + "genericAlias": { + "type": "string", + "description": "Alias for Generic tasks.", + "nullable": true + }, + "enforceProjectLevelTimeEntry": { + "type": "boolean", + "description": "Defines whether time can be entered only at the project level.", + "deprecated": true + }, + "timeEntryLevel": { + "$ref": "#/components/schemas/SG.Api.Model.TimeEntryLevel" + }, + "viewPlannedAllocations": { + "type": "boolean", + "description": "Allows to display option to view planned allocations for timesheets user." + }, + "allowTimesheetApproverViewPlannedAllocations": { + "type": "boolean", + "description": "Allows to display option to view planned allocations for timesheets approver." + }, + "allowPeriodViewForTimesheetUser": { + "type": "boolean", + "description": "Allows to display option for by period mode in timesheet for users." + }, + "allowPeriodViewForTimesheetApprover": { + "type": "boolean", + "description": "Allows to display option for by period mode in timesheet for approver." + }, + "hideFromTimesheetProjectIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "Project ids that are hidden from timesheet.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Timesheet settings." + }, + "SG.Api.Model.TimesheetStatus": { + "enum": [ + "draft", + "submitted", + "archived", + "rejected", + "retracted", + "approved", + "partiallyApproved" + ], + "type": "string", + "description": "Represents timesheet status." + }, + "SG.Api.Model.TimesheetTasks": { + "type": "object", + "properties": { + "assignments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.PeriodAssignments" + }, + "description": "Assignments for period.", + "nullable": true + }, + "involvedTasks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.Task" + }, + "description": "Tasks involved in assignments.", + "nullable": true + }, + "involvedProjects": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.ProjectInfo" + }, + "description": "Projects involved in assignments.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Timesheets tasks." + }, + "SG.Api.Model.ValueEnumMemberInfo": { + "type": "object", + "properties": { + "enumMemberId": { + "type": "integer", + "description": "The id of enum member for selection or multi-selection custom field.", + "format": "int32" + }, + "name": { + "type": "string", + "description": "The enum member name.", + "nullable": true + }, + "everybody": { + "type": "boolean", + "description": "Defines whether all resources allowed to change state of the workflow. Required for workflow field only.", + "nullable": true + }, + "readOnlyFieldIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "Defines the list of read only entity ids. Required for project and resource hierarchy field only.", + "nullable": true + }, + "disabledMemberIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "Defines the list of disabled entity ids. Required for project and resource hierarchy field only.", + "nullable": true + }, + "disabledFieldIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "Defines the list of disabled field ids. Required for project and resource hierarchy field only.", + "nullable": true + }, + "resourceIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "Id of resources allowed to change state of the workflow. Required for workflow field only.", + "nullable": true + }, + "resourceExternalIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "External ids of resources allowed to change state of the workflow. Required for workflow field only.", + "nullable": true + }, + "resourceSecurityGroupIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "Id of resources security groups allowed to change state of the workflow. Required for workflow field only.", + "nullable": true + }, + "globalRoleIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "Id of global roles allowed to change state of the workflow. Required for workflow field only.", + "nullable": true + }, + "parentMemberId": { + "type": "integer", + "description": "Id of parent member in hierarchy custom field.", + "format": "int32", + "nullable": true + }, + "isDeactivated": { + "type": "boolean", + "description": "Indicate if a member is deactivated for selection, multi-selection and workflow fields field.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Selection or multi-selection custom field value." + }, + "SG.Api.Model.Workflow": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of the workflow.", + "format": "int32" + }, + "name": { + "type": "string", + "description": "Name of the workflow.", + "nullable": true + }, + "description": { + "type": "string", + "description": "Description of the workflow.", + "nullable": true + }, + "entityType": { + "$ref": "#/components/schemas/SG.Api.Model.EntityType" + }, + "customFieldId": { + "type": "integer", + "description": "Workflow custom field associated with the workflow.", + "format": "int32" + }, + "assignmentWorkflowPermissions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.AssignmentWorkflowStatePermissions" + }, + "description": "Permissions set for each workflow custom field member. Defined only for assignment workflows.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Defines the Workflow type that can be associated with project or assignment." + }, + "SG.Api.Model.WorkflowEdit": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of the workflow. Must be null for new workflows.", + "format": "int32", + "nullable": true + }, + "name": { + "type": "string", + "description": "Name of the workflow.", + "nullable": true + }, + "description": { + "type": "string", + "description": "Description of the workflow.", + "nullable": true + }, + "entityType": { + "$ref": "#/components/schemas/SG.Api.Model.EntityType" + }, + "customFieldId": { + "type": "integer", + "description": "Workflow custom field associated with the workflow.", + "format": "int32" + }, + "templateProjectId": { + "type": "integer", + "description": "Id of the template project for the workflow.", + "format": "int32", + "nullable": true + }, + "assignmentWorkflowPermissions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SG.Api.Model.AssignmentWorkflowStatePermissions" + }, + "description": "Permissions set for each workflow custom field member. Defined only for assignment workflows.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Defines the Workflow details that can be updated." + }, + "SGT5.Common.Utilities.SortOrder": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + } + }, + "securitySchemes": { + "APIKey": { + "type": "http", + "description": "API authenticates an account by using the API token generated by the user account. A user with 'Use API' global role permission can request API token from profile screen. The access token must be sent in an HTTP authorization header with every API call. It's recommended to send API requests over HTTPS. API requests over HTTP are not safe and restricted by default. If you want to allow API access for HTTP - IsApiOverHttpEnabled flag must be set to 'true' in the configuration file. An api token represents a users and the users permissions. It must not be published or shared among multiple users.\n\nHeader example:\n\nAuthorization: Bearer 1-8051a5c4-3e6e-481e-9dd6-2f474d6061e3", + "scheme": "Bearer", + "bearerFormat": "token" + }, + "OAuth": { + "type": "http", + "description": "API authenticates an account by using the OAuth JWT token generated by the oauth token endpoint at /oauth2/token. The access token must be sent in an HTTP authorization header with every API call. It's recommended to send API requests over HTTPS. API requests over HTTP are not safe and restricted by default. If you want to allow API access for HTTP - IsApiOverHttpEnabled flag must be set to 'true' in the configuration file. The token endpoint will never be accessible over HTTP for security reasons. An api token represents a users and the users permissions. It must not be published or shared among multiple users.\n\nHeader example:\n\nAuthorization: Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsImtpZCI6IjMyMiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiYWRtaW4iLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjIiLCJuYmYiOjE2MTUyOTY3MzEsImV4cCI6MTYxNTM4MzEzMSwiaXNzIjoiaHR0cDovL2xvY2FsaG9zdCIsImF1ZCI6IjMyMiJ9.8Fhusr-wrtzKSscNiFJ--6ySyj6O3m8XuXpBbAuIUAY\n\nToken endpoint Curl request example:\n\ncurl --location --request POST 'https://domain.com/oauth2/token' --header 'Accept: application/json' --header 'Content-Type: application/x-www-form-urlencoded' --data-urlencode 'grant_type=password' --data-urlencode 'password=Password@1' --data-urlencode 'username=admin' --data-urlencode 'scope=SG'", + "scheme": "Bearer", + "bearerFormat": "JWT" + } + } + }, + "security": [ + { + "APIKey": [] + }, + { + "OAuth": [] + } + ], + "tags": [ + { + "name": "Assignments", + "description": "## Compression\r\nUsers can work with allocations in compressed and uncompressed format. Compressed collection includes two types of groups:\r\n- Group starting from positive number and including two elements. For example (3, 8) means the next 3 elements equals to 8, uncompressed collection: (8, 8, 8).\r\n- Group starting from negative number and including two or more elements. For example (-3, 7, 8, 7) means the next 3 elements not compressed, uncompressed collection: (7, 8, 7).\r\n\r\n
Example:\r\n\r\ncompressed collection: (5, 8, -4, 5, 6, 7, 6, 5, 0, -2, 8, 7)\r\n- group (5, 8) uncompressed: (8, 8, 8, 8, 8)\r\n- group (-4, 5, 6, 7, 6) uncompressed: (5, 6, 7, 6)\r\n- group (5, 0) uncompressed: (0, 0, 0, 0, 0)\r\n- group (-2, 8, 7) uncompressed: (8, 7)\r\nuncompressed collection: (8, 8, 8, 8, 8, 5, 6, 7, 6, 0, 0, 0, 0, 0, 8, 7)\r\n
" + }, + { + "name": "GeneralSettings", + "description": "## Weekends Settings\r\nWeekends settings can be configured in general settings. The sample code for validating if day is a weekend is given below.\r\n
\r\n\r\n
\r\nint dayOfWeek = 0; // 0 - Sunday, 6 - Saturday\r\nbool isWeekend = (Weekends & (1 << dayOfWeek)) > 0.\r\n
" + }, + { + "name": "Subscriptions", + "description": "\r\nUsers can subscribe to different events with API using endpoint url for each subscription. When a new webhook subscription is created, the system will send a test request to endpoint url and verify that the endpoint is active and can receive data. User's application receives the request and replies with HTTP 200 status code to confirm receipt of data. Any other status code will be treated as a failure. \r\n\r\n\nWhen an event occurs in the system, each subscription for the event will trigger an HTTP POST request to the url specified. In case, a client application cannot accept notification, the system will retry again in 15 minutes 4 times. After that the sytem will try to send the notification every hour. If it still fails after 24 hours no new notification will be sent to the subscribers until the url has been reset via the API.\r\n\r\n## Event Types and Filters\r\n\r\nEach subscription has an event type and filter type. Filter type is optional. The following table lists the available filter options for each event type.\r\n\r\n\r\n**Event: ProjectCreate**\r\n
A project is created.\r\n\r\n\n**Event: ProjectFixedFieldsUpdate**\r\n
An out of the box project setting is modified. Example: Name, Project Security Group\r\n
***Filters:*** ProjectId\r\n\r\n\n**Event: ProjectDelete**\r\n
A project is deleted.\r\n
***Filters:*** ProjectId\r\n\r\n\n**Event: ProjectTimestampsUpdate**\r\n
The project update timestamp is modified.\r\n
***Filters:*** ProjectId\r\n\r\n\n**Event: ResourceCreate**\r\n
A resource is created.\r\n\r\n\n**Event: ResourceFixedFieldsUpdate**\r\n
An out of the box resource setting is modified. Example: Resource Name, Resource Security Group.\r\n
***Filters:*** ResourceId\r\n\r\n\n**Event: ResourceDelete**\r\n
A resource is deleted.\r\n
***Filters:*** ResourceId\r\n\r\n\n**Event: ResourceTimestampsUpdate**\r\n
The resource update timestamp is modified.\r\n
***Filters:*** ResourceId\r\n\r\n\n**Event: TaskCreate**\r\n
A task is created.\r\n
***Filters:*** ProjectId\r\n\r\n\n**Event: TaskUpdate**\r\n
A task is updated.\r\n
***Filters:*** ProjectId\r\n\r\n\n**Event: TaskDelete**\r\n
A task is deleted.\r\n
***Filters:*** ProjectId\r\n\r\n\n**Event: AssignmentCreate**\r\n
An assignment is created.\r\n
***Filters:*** ProjectId, ResourceId\r\n\r\n\n**Event: AssignmentUpdate**\r\n
Assignment allocation is updated.\r\n
***Filters:*** ProjectId, ResourceId\r\n\r\n\n**Event: AssignmentDelete**\r\n
An assignment is deleted.\r\n
***Filters:*** ProjectId, ResourceId\r\n\r\n\n**Event: ResourceNetCapacityUpdate**\r\n
Resource net capacity is updated.\r\n
***Filters:*** ResourceId\r\n\r\n\n**Event: TimesheetCreate**\r\n
A timesheet is created. Can be filtered by timeheet user and timesheet approver.\r\n
***Filters:*** ResourceId, TimesheetApproverResourceId\r\n\r\n\n**Event: TimesheetDelete**\r\n
A timesheet is deleted. Can be filtered by timeheet user and timesheet approver.\r\n
***Filters:*** ResourceId, TimesheetApproverResourceId\r\n\r\n\n**Event: TimesheetStatusUpdate**\r\n
Timesheet status changes. Can be filtered by timeheet user and timesheet approver.\r\n
***Filters:*** ResourceId, TimesheetApproverResourceId\r\n\r\n\n**Event: ResourceRequestCreate**\r\n
A resource request is created. Can be filtered by resource, resource manager and the resource initiating the request.\r\n
***Filters:*** ResourceId, ResourceRequestOwnerResourceId, ResourceRequestRequestedByResourceId\r\n\r\n\n**Event: ResourceRequestStatusUpdate**\r\n
Resource request status changes. Can be filtered by resource, resource manager and the resource initiating the request.\r\n
***Filters:*** ResourceId, ResourceRequestOwnerResourceId, ResourceRequestRequestedByResourceId\r\n\r\n\n**Event: ResourceRequestDelete**\r\n
A resource request is deleted. Can be filtered by resource, resource manager and the resource initiating the request.\r\n
***Filters:*** ResourceId, ResourceRequestOwnerResourceId, ResourceRequestRequestedByResourceId\r\n\r\n\n**Event: ProjectCustomFieldValuesUpdate**\r\n
A project custom field value changes.\r\n
***Filters:*** ProjectId, CustomFieldId\r\n\r\n\n**Event: ResourceCustomFieldValuesUpdate**\r\n
A resource custom field value changes.\r\n
***Filters:*** ResourceId, CustomFieldId\r\n\r\n\n**Event: AssignmentCustomFieldValuesUpdate**\r\n
An assignment custom field value changes.\r\n
***Filters:*** ProjectId, ResourceId, CustomFieldId\r\n\r\n\n**Event: CustomFieldCreate**\r\n
A custom field is created\r\n\r\n\n**Event: CustomFieldUpdate**\r\n
A custom field is updated.\r\n
***Filters:*** CustomFieldId\r\n\r\n\n**Event: CustomFieldDelete**\r\n
A custom field is deleted.\r\n
***Filters:*** CustomFieldId\r\n\r\n# Webhook Security\r\n\r\nWe recommend verifying each webhook request to make sure it comes from SuperGrid and not altered or corrupted during transmission. You can do that by validating the webhook signature coming with each webhook.\r\n\r\n## Generating Secret Key\r\n\r\nA shared secret key is automatically generated and sent back to client as a response when a new create subscription request is made. The secret key is unique per subscription. Client should store the Id and secret key pair in their app to validate incoming notification. The secret key is sent as a base 64 encoded string. \r\n\r\n## Webhook Signature\r\n\r\nAll notifications matching the subscription will contain a header with timestamp and HMAC SHA256 signature. The signature contains a timestamp and the signature hash. The timestamp is in UTC and denoted as \"t\". The second part is the signature hash as base 64 string which is denoted as \"sha256\".\r\n
\r\n
**X-SGT5-Webhook-Signature**: t=637087142357899885,sha256=/mDmLXux6Hxkuue8lrJ/5GlnP5wOVqrYPp+8XLMV6Ac=\r\n\r\n## Comparing Signature\r\n\r\nThe signature can be generated using the follow procedure.\r\n\r\n- Parse the timestamp from header value. The timestamp is the integer value after \"t=\".\r\n\r\n- Prepare a string message with timestamp and append a dot followed by the request body json content. \r\n
message = [timestamp].[body_content]\r\n\r\n- Compute HMAC with the SHA256 hash function using the message and secret key associated with subscription.\r\n\r\n- Convert the computed hash bytes to base 64 string using UTF-8 encoding.\r\n\r\n- Extract the hash value from header. The hash value is text after \"sha256=\".\r\n\r\n- Compare the computed hash with the hash received in header.\r\n\r\n## Code Sample\r\n\r\nThe SuperGrid client SDK has a helper method that you can directly call to validate the signature. The sample code for validating is given below.\r\n
\r\n\r\n
\r\npublic static DateTime Validate(string sgt5WebhookSignature, string secretKey, string content)\n{\n    if (string.IsNullOrWhiteSpace(sgt5WebhookSignature))\n    {\n        throw new ArgumentException($\"{nameof(sgt5WebhookSignature)} must not be null or whitespace.\");\n    }\n\n    if (string.IsNullOrWhiteSpace(secretKey))\n    {\n        throw new ArgumentException($\"{nameof(secretKey)} must not be null or whitespace.\");\n    }\n\n    if (string.IsNullOrWhiteSpace(content))\n    {\n        throw new ArgumentException($\"{nameof(content)} must not be null or whitespace.\");\n    }\n\n    var match = Regex.Match(sgt5WebhookSignature, \"^t=(\\d+),sha256=(.+)$\");\n\n    if (!match.Success)\n    {\n        throw new Exception($\"The signature pattern ({sgt5WebhookSignature}) does not match.\");\n    }\n\n    var timestamp = long.Parse(match.Groups[1].Value);\n    var signature = match.Groups[2].Value;\n\n    var message = $\"{timestamp}.{content}\";\n\n    using (var hasher = new HMACSHA256(Convert.FromBase64String(secretKey)))\n    {\n        var computedSignature = Convert.ToBase64String(hasher.ComputeHash(Encoding.UTF8.GetBytes(message)));\n\n        if (computedSignature != signature)\n        {\n            throw new Exception(\"Signature does not match.\");\n        }\n    }\n\n    return new DateTime(timestamp, DateTimeKind.Utc);\n}\r\n
" + }, + { + "name": "Reports", + "description": "The Reports API provides endpoints to retrieve report data in a flat format.\n\n**Steps:**\n1. Use `/Reports` to retrieve available report IDs.\n2. Use `/Reports/PrepareData` to queue the report for processing.\n3. Use `/Reports/QueueItems` to check if the report is ready.\n4. Once ready, use `/Reports/RetrieveData` to download the raw report data.\n\n**Note:** The response from the Retrieve Data endpoint may be large depending on the report's size and configuration. Clients should be prepared to handle large payloads efficiently." + } + ] +} \ No newline at end of file diff --git a/demo/swagger/t5/swagger.json b/demo/swagger/t5/swagger.json new file mode 100644 index 00000000..3f81ad02 --- /dev/null +++ b/demo/swagger/t5/swagger.json @@ -0,0 +1,2528 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "What If Web API Specification", + "description": "Note: the maximum length of the query string is limited to 2048 characters by default. The limit can be increased by changing maxQueryString and maxQueryStringLength options in the configuration file.\r\n\r\n## Errors Logging\r\n\r\nError logs can be accessed at the following URL: [/GetErrors](../GetErrors)\r\n\r\n### Supported Parameters:\r\n\r\n- [/GetErrors](../GetErrors) provides error logs for the last 7 days.\r\n\r\n- [/GetErrors/24](../GetErrors/24) provides error logs for the last 24 hours. If the number is greater than 168, error logs for the last week will be retrieved.\r\n\r\n- [/GetErrors/id1027](../GetErrors/id1027) provides error log details where the ID is equal to 1027.\r\n\r\n- [/GetErrors/idAfter1027](../GetErrors/idAfter1027) provides error log details where the ID is greater than 1027 but within the last week.\r\n\r\n- [/GetErrors/m30](../GetErrors/m30) provides error logs for the last 30 minutes. If the number is greater than 10080, error logs for the last week will be retrieved.\r\n\r\n- [/GetErrors/d15-07-2024](../GetErrors/d15-07-2024) provides error logs created on a specific date (15-07-2024, day-month-year format).\r\n\r\n### Optional Parameter: `environment`\r\n\r\nThe `environment` parameter can be used to filter error logs specific to a particular environment. This parameter helps in tracking and analyzing errors based on the environment but is optional for retrieving error logs. Setting this parameter will only show error logs originating from the given envrionment.\n\n Supported values include:\r\n\r\n- **Web**\r\n- **WebMaster**\r\n- **BackgroundWorker**\r\n- **InsightPlusSyncService**\r\n\r\n### Example Request with `environment` Parameter:\r\n```http\r\nGET /GetErrors?environment=BackgroundWorker\r\n```", + "version": "1.0.0", + "x-logo": { + "url": "../assets/plugins/redoc/assets/logo.svg" + } + }, + "servers": [ + { + "url": "/qa/next/normal" + } + ], + "paths": { + "/api/t5/v1/Changes/Entities": { + "get": { + "tags": [ + "Changes" + ], + "summary": "List Entities", + "description": "Gets list of projects, resources, tasks according to changes made in model. These entities reflect the date, inclusion, exclusion changes made to the model.", + "parameters": [ + { + "name": "modelId", + "in": "query", + "description": "Id of the model.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "timeUnit", + "in": "query", + "description": "Time unit.", + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.TimeUnit" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.ModelEntities" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.ModelEntities" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.ModelEntities" + } + } + } + } + } + } + }, + "/api/t5/v1/Changes/Reset": { + "put": { + "tags": [ + "Changes" + ], + "summary": "Reset Changes", + "description": "Clear all changes for the given model.", + "requestBody": { + "description": "Id of the model.", + "content": { + "application/json": { + "schema": { + "type": "integer", + "format": "int32" + } + }, + "text/json": { + "schema": { + "type": "integer", + "format": "int32" + } + }, + "application/*+json": { + "schema": { + "type": "integer", + "format": "int32" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "PUT /api/tempus/v1/changes/reset?modelId=1" + }, + { + "lang": "C#", + "source": "var t5Client = new TempusRestClient(sgUrl, token);\r\nt5Client.ChangesClient.Reset(1).Wait();" + } + ] + } + }, + "/api/t5/v1/Changes/Remove": { + "put": { + "tags": [ + "Changes" + ], + "summary": "Remove Change", + "description": "Remove change for the given model.", + "requestBody": { + "description": "Id of the change.", + "content": { + "application/json": { + "schema": { + "type": "integer", + "format": "int32" + } + }, + "text/json": { + "schema": { + "type": "integer", + "format": "int32" + } + }, + "application/*+json": { + "schema": { + "type": "integer", + "format": "int32" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "PUT /api/tempus/v1/changes/remove?changeId=65" + }, + { + "lang": "C#", + "source": "var t5Client = new TempusRestClient(sgUrl, token);\r\nt5Client.ChangesClient.Remove(1).Wait();" + } + ] + } + }, + "/api/t5/v1/Changes/AddGenericResources": { + "post": { + "tags": [ + "Changes" + ], + "summary": "Add Generic Resources", + "description": "Create a generic resource for the given resource aggregation.", + "requestBody": { + "description": "Changes to apply.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.AddGenericResourceChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.AddGenericResourceChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.AddGenericResourceChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.AddGenericResourceChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "POST /api/tempus/v1/changes/AddGenericResources\r\n\r\n{\r\n \"modelId\": 2,\r\n \"changes\": [\r\n {\r\n \"customFieldId\": 67,\r\n \"customFieldValues\": [\"Developer\", \"SQL Specialist\"],\r\n \"startDate\": \"2020-01-01T00:00:00\",\r\n \"endDate\": \"2021-01-01T00:00:00\",\r\n \"capacitiesPercentage\": 50.0\r\n }\r\n ]\r\n}" + }, + { + "lang": "C#", + "source": "var t5Client = new TempusRestClient(sgUrl, token);\r\n\r\nvar changes = new List\r\n {\r\n new AddGenericResourceChange\r\n {\r\n\t\t\tStartDate = model.StartDate,\r\n EndDate = model.EndDate,\r\n CustomFieldId = 20,\r\n CapacitiesPercentage = 50,\r\n CustomFieldValues = new[] { \"Developer\", \"Work\" },\r\n }\r\n };\r\n\r\nt5Client.ChangesClient.AddGenericResources(1, changes).Wait();" + } + ] + } + }, + "/api/t5/v1/Changes/AddNamedResources": { + "post": { + "tags": [ + "Changes" + ], + "summary": "Add Named Resources", + "description": "Create a named resource for the given resource aggregation.", + "requestBody": { + "description": "Changes to apply.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.AddNamedResourceChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.AddNamedResourceChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.AddNamedResourceChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.AddNamedResourceChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "POST /api/tempus/v1/changes/AddNamedResources\r\n\r\n{\r\n \"modelId\": 2,\r\n \"changes\": [\r\n {\r\n \"customFieldId\": 67,\r\n \"customFieldValues\": [\r\n \"Developer\",\r\n \"SQL Specialist\"\r\n ],\r\n \"startDate\": \"2020-01-01T00:00:00\",\r\n \"endDate\": \"2020-12-31T00:00:00\",\r\n \"capacityPerDay\": 6.0\r\n }\r\n ]\r\n}" + }, + { + "lang": "C#", + "source": "var t5Client = new TempusRestClient(sgUrl, token);\r\n\r\nvar changes = new List\r\n {\r\n new AddNamedResourceChange\r\n {\r\n\t\t\tStartDate = model.StartDate,\r\n EndDate = model.EndDate,\r\n CustomFieldId = 20,\r\n CapacityPerDay = 6,\r\n CustomFieldValues = new[] { \"Developer\", \"Work\" },\r\n }\r\n };\r\n\r\nt5Client.ChangesClient.AddNamedResources(1, changes).Wait();" + } + ] + } + }, + "/api/t5/v1/Changes/CloneProjects": { + "post": { + "tags": [ + "Changes" + ], + "summary": "Clone Projects", + "description": "Clone the given project.", + "requestBody": { + "description": "Changes to apply.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.CloneProjectChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.CloneProjectChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.CloneProjectChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.CloneProjectChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "POST /api/tempus/v1/changes/CloneProjects\r\n\r\n{\r\n \"modelId\": 2,\r\n \"changes\": [\r\n {\r\n \"projectId\": 5,\r\n \"startDate\": \"2019-01-01T00:00:00\",\r\n \"name\": \"cloned name\",\r\n \"durationPercentage\": 100.0,\r\n \"allocationChangePercentage\": null\r\n }\r\n ]\r\n}" + }, + { + "lang": "C#", + "source": "var t5Client = new TempusRestClient(sgUrl, token);\r\n\r\nvar changes = new List\r\n {\r\n new CloneProjectChange\r\n {\r\n\t\t ProjectId = 5,\r\n Name = $\"cloned\",\r\n StartDate = new DateTime(2020, 1, 1),\r\n DurationPercentage = 100,\r\n }\r\n };\r\n\r\nt5Client.ChangesClient.CloneProjects(1, changes).Wait();" + } + ] + } + }, + "/api/t5/v1/Changes/SplitProjects": { + "post": { + "tags": [ + "Changes" + ], + "summary": "Split Projects", + "description": "Split the given project.", + "requestBody": { + "description": "Changes to apply.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.SplitProjectChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.SplitProjectChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.SplitProjectChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.SplitProjectChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "POST /api/tempus/v1/changes/SplitProjects\r\n\r\n{\r\n \"modelId\": 2,\r\n \"changes\": [\r\n {\r\n \"projectId\": 1,\r\n \"name\": \"split project name\",\r\n \"startDate\": \"2023-6-10\",\r\n }\r\n ]\r\n}" + }, + { + "lang": "C#", + "source": "var t5Client = new TempusRestClient(sgUrl, token);\r\n\r\nvar changes = new List\r\n {\r\n new SplitProjectChange\r\n {\r\n\t\t ProjectId = 4,\r\n\t\t Name = \"split project name\",\r\n\t\t StartDate = new DateTime(2023, 6, 10),\r\n }\r\n };\r\n\r\nt5Client.ChangesClient.SplitProjects(1, changes).Wait();" + } + ] + } + }, + "/api/t5/v1/Changes/EditAllocations": { + "post": { + "tags": [ + "Changes" + ], + "summary": "Edit Allocations", + "description": "Edit assignment allocation.", + "requestBody": { + "description": "Changes to apply.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.EditAllocationsChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.EditAllocationsChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.EditAllocationsChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.EditAllocationsChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "POST /api/tempus/v1/changes/EditAllocations\r\n\r\n{\r\n \"modelId\": 2,\r\n \"changes\": [\r\n {\r\n \"assignmentId\": 16,\r\n \"startDate\": \"2018-06-01T00:00:00Z\",\r\n \"allocations\": [10.0, 40.0, 50.0, 20],\r\n \"timeUnit\": \"Month\"\r\n }\r\n ]\r\n}" + }, + { + "lang": "C#", + "source": "var t5Client = new TempusRestClient(sgUrl, token);\r\n\r\nvar changes = new List\r\n {\r\n new EditAllocationsChange\r\n {\r\n\t\t AssignmentId = 4,\r\n StartDate = new DateTime(202, 1, 1),\r\n TimeUnit = TimeUnit.Month,\r\n Allocations = new[] { 60.0, 80.0, 45.0 },\r\n }\r\n };\r\n\r\nt5Client.ChangesClient.EditAllocations(1, changes).Wait();" + } + ] + } + }, + "/api/t5/v1/Changes/ExcludeProjects": { + "post": { + "tags": [ + "Changes" + ], + "summary": "Exclude Projects", + "description": "Exclude given project.", + "requestBody": { + "description": "Changes to apply.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.ExcludeProjectChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.ExcludeProjectChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.ExcludeProjectChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.ExcludeProjectChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "POST /api/tempus/v1/changes/ExcludeProjects\r\n\r\n{\r\n \"modelId\": 2,\r\n \"changes\": [\r\n {\r\n \"projectId\": 1\r\n }\r\n ]\r\n}" + }, + { + "lang": "C#", + "source": "var t5Client = new TempusRestClient(sgUrl, token);\r\n\r\nvar changes = new List\r\n {\r\n new ExcludeProjectChange\r\n {\r\n\t\t ProjectId = 4,\r\n }\r\n };\r\n\r\nt5Client.ChangesClient.ExcludeProjects(1, changes).Wait();" + } + ] + } + }, + "/api/t5/v1/Changes/ExcludeTasks": { + "post": { + "tags": [ + "Changes" + ], + "summary": "Exclude Tasks", + "description": "Exclude given task.", + "requestBody": { + "description": "Changes to apply.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.ExcludeTaskChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.ExcludeTaskChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.ExcludeTaskChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.ExcludeTaskChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "POST /api/tempus/v1/changes/ExcludeTasks\r\n\r\n{\r\n \"modelId\": 2,\r\n \"changes\": [\r\n {\r\n \"taskId\": 1\r\n }\r\n ]\r\n}" + }, + { + "lang": "C#", + "source": "var t5Client = new TempusRestClient(sgUrl, token);\r\n\r\nvar changes = new List\r\n {\r\n new ExcludeTaskChange\r\n {\r\n\t\t TaskId = 4,\r\n }\r\n };\r\n\r\nt5Client.ChangesClient.ExcludeTasks(1, changes).Wait();" + } + ] + } + }, + "/api/t5/v1/Changes/ExpandContractProjects": { + "post": { + "tags": [ + "Changes" + ], + "summary": "Expand Contract Projects", + "description": "Expand or contract given project by number of working days.", + "requestBody": { + "description": "Changes to apply.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.ExpandContractProjectChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.ExpandContractProjectChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.ExpandContractProjectChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.ExpandContractProjectChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "POST /api/tempus/v1/changes/ExpandContractProjects\r\n\r\n{\r\n \"modelId\": 2,\r\n \"changes\": [\r\n {\r\n \"projectId\": 1,\r\n \"delta\": 30,\r\n \"allocationChangePercentage\": 80.0,\r\n \"edge\": \"Left\"\r\n }\r\n ]\r\n}" + }, + { + "lang": "C#", + "source": "var t5Client = new TempusRestClient(sgUrl, token);\r\n\r\nvar changes = new List\r\n {\r\n new ExpandContractProjectChange\r\n {\r\n\t\t ProjectId = 4,\r\n\t\t Delta = rand.Next(20, 60),\r\n Edge = Edge.Left,\r\n }\r\n };\r\n\r\nt5Client.ChangesClient.ExpandContractProjects(1, changes).Wait();" + } + ] + } + }, + "/api/t5/v1/Changes/IncludeProjects": { + "post": { + "tags": [ + "Changes" + ], + "summary": "Include Projects", + "description": "Include given project.", + "requestBody": { + "description": "Changes to apply.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.IncludeProjectChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.IncludeProjectChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.IncludeProjectChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.IncludeProjectChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "POST /api/tempus/v1/changes/IncludeProjects\r\n\r\n{\r\n \"modelId\": 2,\r\n \"changes\": [\r\n {\r\n \"projectId\": 1\r\n }\r\n ]\r\n}" + }, + { + "lang": "C#", + "source": "var t5Client = new TempusRestClient(sgUrl, token);\r\n\r\nvar changes = new List\r\n {\r\n new IncludeProjectChange\r\n {\r\n\t\t ProjectId = 4,\r\n }\r\n };\r\n\r\nt5Client.ChangesClient.IncludeProjects(1, changes).Wait();" + } + ] + } + }, + "/api/t5/v1/Changes/IncludeTasks": { + "post": { + "tags": [ + "Changes" + ], + "summary": "Include Tasks", + "description": "Include given task.", + "requestBody": { + "description": "Changes to apply.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.IncludeTaskChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.IncludeTaskChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.IncludeTaskChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.IncludeTaskChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "POST /api/tempus/v1/changes/IncludeTasks\r\n\r\n{\r\n \"modelId\": 2,\r\n \"changes\": [\r\n {\r\n \"taskId\": 1\r\n }\r\n ]\r\n}" + }, + { + "lang": "C#", + "source": "var t5Client = new TempusRestClient(sgUrl, token);\r\n\r\nvar changes = new List\r\n {\r\n new IncludeTaskChange\r\n {\r\n\t\t TaskId = 4,\r\n }\r\n };\r\n\r\nt5Client.ChangesClient.IncludeTasks(1, changes).Wait();" + } + ] + } + }, + "/api/t5/v1/Changes/RemoveResources": { + "post": { + "tags": [ + "Changes" + ], + "summary": "Remove Resources", + "description": "Remove capacity of given resource.", + "requestBody": { + "description": "Changes to apply.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.RemoveResourceChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.RemoveResourceChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.RemoveResourceChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.RemoveResourceChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "POST /api/tempus/v1/changes/RemoveResources\r\n\r\n{\r\n \"modelId\": 2,\r\n \"changes\": [\r\n {\r\n \"resourceId\": 7\r\n }\r\n ]\r\n}" + }, + { + "lang": "C#", + "source": "var t5Client = new TempusRestClient(sgUrl, token);\r\n\r\nvar changes = new List\r\n {\r\n new RemoveResourceChange\r\n {\r\n\t\t ResourceId = 4,\r\n }\r\n };\r\n\r\nt5Client.ChangesClient.RemoveResources(1, changes).Wait();" + } + ] + } + }, + "/api/t5/v1/Changes/ReplaceResources": { + "post": { + "tags": [ + "Changes" + ], + "summary": "Replace Resources", + "description": "Replace resource for given assignment with other resources.", + "requestBody": { + "description": "Changes to apply.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.ReplaceResourceChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.ReplaceResourceChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.ReplaceResourceChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.ReplaceResourceChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "POST /api/tempus/v1/changes/ReplaceResources\r\n\r\n{\r\n \"modelId\": 2,\r\n \"changes\": [\r\n {\r\n \"assignmentId\": 4,\r\n \"distributionType\": \"Linear\",\r\n \"replacements\": [\r\n {\r\n \"resourceId\": 61,\r\n \"totalAllocation\": 126.0,\r\n \"startDay\": 0,\r\n \"endDay\": 63\r\n }\r\n ]\r\n }\r\n ]\r\n}" + }, + { + "lang": "C#", + "source": "var t5Client = new TempusRestClient(sgUrl, token);\r\n\r\nvar changes = new List\r\n {\r\n new ReplaceResourceChange\r\n {\r\n AssignmentId = 5,\r\n DistributionType = DistributionType.Linear,\r\n Replacements = new List\r\n {\r\n new ReplacementInfo\r\n {\r\n ResourceId = 6,\r\n StartDay = 0,\r\n EndDay = 10,\r\n TotalAllocation = 60,\r\n },\r\n },\r\n },\r\n };\r\n\r\nt5Client.ChangesClient.ReplaceResources(1, changes).Wait();" + } + ] + } + }, + "/api/t5/v1/Changes/ShiftProjects": { + "post": { + "tags": [ + "Changes" + ], + "summary": "Shift Projects", + "description": "Shift given project by number of working days.", + "requestBody": { + "description": "Changes to apply.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.ShiftProjectChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.ShiftProjectChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.ShiftProjectChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.ShiftProjectChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "POST /api/tempus/v1/changes/ShiftProjects\r\n\r\n{\r\n \"modelId\": 2,\r\n \"changes\": [\r\n {\r\n \"projectId\": 1,\r\n \"delta\": 30\r\n }\r\n ]\r\n}" + }, + { + "lang": "C#", + "source": "var t5Client = new TempusRestClient(sgUrl, token);\r\n\r\nvar changes = new List\r\n {\r\n new ShiftProjectChange\r\n {\r\n\t\t ProjectId = 4,\r\n\t\t Delta = rand.Next(20, 60),\r\n }\r\n };\r\n\r\nt5Client.ChangesClient.ShiftProjects(1, changes).Wait();" + } + ] + } + }, + "/api/t5/v1/Changes/ShiftTasks": { + "post": { + "tags": [ + "Changes" + ], + "summary": "Shift Tasks", + "description": "Shift given task by number of working days.", + "requestBody": { + "description": "Changes to apply.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.ShiftTaskChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.ShiftTaskChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.ShiftTaskChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.ShiftTaskChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "POST /api/tempus/v1/changes/ShiftTasks\r\n\r\n{\r\n \"modelId\": 2,\r\n \"changes\": [\r\n {\r\n \"taskId\": 1,\r\n \"delta\": 30\r\n }\r\n ]\r\n}" + }, + { + "lang": "C#", + "source": "var t5Client = new TempusRestClient(sgUrl, token);\r\n\r\nvar changes = new List\r\n {\r\n new ShiftTaskChange\r\n {\r\n\t\t TaskId = 4,\r\n\t\t Delta = rand.Next(20, 60),\r\n }\r\n };\r\n\r\nt5Client.ChangesClient.ShiftTasks(1, changes).Wait();" + } + ] + } + }, + "/api/t5/v1/Changes/ExpandContractTasks": { + "post": { + "tags": [ + "Changes" + ], + "summary": "Expand or Contract Tasks", + "description": "Expand or Contract given task by number of working days.", + "requestBody": { + "description": "Changes to apply.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.ExpandContractTaskChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.ExpandContractTaskChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.ExpandContractTaskChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.ExpandContractTaskChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "POST /api/tempus/v1/changes/ExpandContractTasks\r\n\r\n{\r\n \"modelId\": 2,\r\n \"changes\": [\r\n {\r\n \"taskId\": 1,\r\n \"delta\": 30,\r\n \"allocationChangePercentage\": 80.0,\r\n \"edge\": \"Left\"\r\n }\r\n ]\r\n}" + }, + { + "lang": "C#", + "source": "var t5Client = new TempusRestClient(sgUrl, token);\r\n\r\nvar changes = new List\r\n {\r\n new ExpandContractTaskChange\r\n {\r\n\t\t TaskId = 4,\r\n\t\t Delta = rand.Next(20, 60),\r\n Edge = Edge.Left,\r\n }\r\n };\r\n\r\nt5Client.ChangesClient.ExpandContractTasks(1, changes).Wait();" + } + ] + } + }, + "/api/t5/v1/Changes/CloneTasks": { + "post": { + "tags": [ + "Changes" + ], + "summary": "Clone Tasks", + "description": "Clone given task.", + "requestBody": { + "description": "Changes to apply.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.CloneTaskChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.CloneTaskChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.CloneTaskChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.CloneTaskChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "POST /api/tempus/v1/changes/CloneTasks\r\n\r\n{\r\n \"modelId\": 2,\r\n \"changes\": [\r\n {\r\n \"taskId\": 5,\r\n \"name\": \"cloned name\",\r\n }\r\n ]\r\n}" + }, + { + "lang": "C#", + "source": "var t5Client = new TempusRestClient(sgUrl, token);\r\n\r\nvar changes = new List\r\n {\r\n new CloneTaskChange\r\n {\r\n\t\t TaskId = 5,\r\n Name = $\"cloned\",\r\n }\r\n };\r\n\r\nt5Client.ChangesClient.CloneTasks(1, changes).Wait();" + } + ] + } + }, + "/api/t5/v1/Models": { + "get": { + "tags": [ + "Models" + ], + "summary": "List Models", + "description": "Gets the list of models that the user has access to in ascending order by Id.", + "parameters": [ + { + "name": "sharingType", + "in": "query", + "description": "Accessibility of model.", + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.ModelSharingType" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/T5.Api.Model.Model" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/T5.Api.Model.Model" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/T5.Api.Model.Model" + } + } + } + } + } + } + } + }, + "/api/t5/v1/Models/{id}": { + "get": { + "tags": [ + "Models" + ], + "summary": "Get Model", + "description": "Gets the requested model.", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Id of the model.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Model" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Model" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/T5.Api.Model.Model" + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/tempus/v1/Models/1" + }, + { + "lang": "JSON", + "source": "GET /api/tempus/v1/Models/1" + }, + { + "lang": "C#", + "source": "var t5Client = new TempusRestClient(sgUrl, token);\r\nt5Client.ModelsClient.GetModel(2).Result;" + }, + { + "lang": "C#", + "source": "var t5Client = new TempusRestClient(sgUrl, token);\r\nt5Client.ModelsClient.GetModel(2).Result;" + } + ] + } + }, + "/api/t5/v1/Models/Changes": { + "get": { + "tags": [ + "Models" + ], + "summary": "List Model Changes", + "description": "Gets the list of changes for requested models.", + "parameters": [ + { + "name": "modelIds", + "in": "query", + "description": "List of model ids separated by comma.", + "schema": { + "type": "string" + } + }, + { + "name": "consolidate", + "in": "query", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/T5.Api.Model.ChangeHistory" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/T5.Api.Model.ChangeHistory" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/T5.Api.Model.ChangeHistory" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/tempus/v1/Models/Changes?modelIds=2,3,4" + }, + { + "lang": "C#", + "source": "var t5Client = new TempusRestClient(sgUrl, token);\r\nt5Client.ModelsClient.GetChanges(new List{2,3}, false).Result;" + } + ] + } + }, + "/api/t5/v1/Models/Resources": { + "get": { + "tags": [ + "Models" + ], + "summary": "List Resources", + "description": "Gets list of resources involved in model changes.", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/T5.Api.Model.Resource" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/T5.Api.Model.Resource" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/T5.Api.Model.Resource" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/tempus/v1/Models/Resources" + }, + { + "lang": "C#", + "source": "var t5Client = new TempusRestClient(sgUrl, token);\r\nt5Client.ModelsClient.GetResources().Result;" + } + ] + } + }, + "/api/t5/v1/Models/Projects": { + "get": { + "tags": [ + "Models" + ], + "summary": "List Projects", + "description": "Gets list of projects involved in model changes.", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/T5.Api.Model.Project" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/T5.Api.Model.Project" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/T5.Api.Model.Project" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/tempus/v1/Models/Projects" + }, + { + "lang": "C#", + "source": "var t5Client = new TempusRestClient(sgUrl, token);\r\nt5Client.ModelsClient.GetProjects().Result;" + } + ] + } + }, + "/api/t5/v1/Models/Tasks": { + "get": { + "tags": [ + "Models" + ], + "summary": "List Tasks", + "description": "Gets list of tasks involved in model changes.", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/T5.Api.Model.Task" + } + } + }, + "text/plain": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/T5.Api.Model.Task" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/T5.Api.Model.Task" + } + } + } + } + } + }, + "x-code-samples": [ + { + "lang": "JSON", + "source": "GET /api/tempus/v1/Models/Tasks" + }, + { + "lang": "C#", + "source": "var t5Client = new TempusRestClient(sgUrl, token);\r\nt5Client.ModelsClient.GetTasks().Result;" + } + ] + } + } + }, + "components": { + "schemas": { + "T5.Api.Model.Aggregation": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of the aggregation field. Same as SuperGrid resource custom field Id.", + "format": "int32" + }, + "name": { + "type": "string", + "description": "Name of aggregation field. Can be null if the field do not exist.", + "nullable": true + }, + "members": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Aggregation members.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Aggregation." + }, + "T5.Api.Model.ChangeHistory": { + "type": "object", + "properties": { + "modelId": { + "type": "integer", + "description": "Id of the model.", + "format": "int32" + }, + "changes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Change" + }, + "description": "List of changes made to the model.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Model change details." + }, + "T5.Api.Model.Changes.Change": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of the change.", + "format": "int32" + }, + "type": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.ChangeType" + }, + "createdOn": { + "type": "string", + "description": "Timestamp when change was created.", + "format": "date-time" + }, + "createdByUserId": { + "type": "integer", + "description": "Resource who created the change.", + "format": "int32" + }, + "canRemove": { + "type": "boolean", + "description": "Set if the change can be removed." + } + }, + "additionalProperties": false, + "description": "Model change details." + }, + "T5.Api.Model.Changes.ChangeType": { + "enum": [ + "shift", + "expandContract", + "exclude", + "include", + "excludeTask", + "includeTask", + "link", + "replaceResource", + "editAllocations", + "addNamedResource", + "addGenericResource", + "removeResource", + "cloneProject", + "splitProject", + "shiftTask", + "expandContractTask", + "cloneTask", + "splitTask" + ], + "type": "string", + "description": "Type of changes." + }, + "T5.Api.Model.Changes.DistributionType": { + "enum": [ + "linear", + "current" + ], + "type": "string", + "description": "Distribution type." + }, + "T5.Api.Model.Changes.Edge": { + "enum": [ + "left", + "right" + ], + "type": "string", + "description": "Edge type." + }, + "T5.Api.Model.Changes.ModelAssignment": { + "type": "object", + "properties": { + "taskId": { + "type": "integer", + "description": "Task Id.", + "format": "int32" + }, + "resourceId": { + "type": "integer", + "description": "Resource Id.", + "format": "int32" + }, + "assignmentId": { + "type": "integer", + "description": "Id of the assignment.", + "format": "int64", + "nullable": true + }, + "allocations": { + "type": "array", + "items": { + "type": "number", + "format": "double" + }, + "description": "Assignment allocations in requested unit. By default same as dominant unit.", + "nullable": true + }, + "totalAllocation": { + "type": "number", + "description": "Assignment total allocation in requested unit. By default same as dominant unit.", + "format": "double" + }, + "startDate": { + "type": "string", + "description": "Start date of allocation. First day of period for requested time unit.", + "format": "date-time" + }, + "endDate": { + "type": "string", + "description": "End date of allocation. First day of period for requested time unit.", + "format": "date-time" + }, + "days": { + "type": "integer", + "description": "Number of working days counting from 0.", + "format": "int32" + } + }, + "additionalProperties": false, + "description": "Model Assignment." + }, + "T5.Api.Model.Changes.ModelEntities": { + "type": "object", + "properties": { + "resources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.ModelResource" + }, + "description": "Resources.", + "nullable": true + }, + "projects": { + "type": "array", + "items": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.ModelProject" + }, + "description": "Projects.", + "nullable": true + }, + "tasks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.ModelTask" + }, + "description": "Tasks.", + "nullable": true + }, + "assignments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.ModelAssignment" + }, + "description": "Assignments.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Model Entities." + }, + "T5.Api.Model.Changes.ModelProject": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of the project.", + "format": "int32" + }, + "name": { + "type": "string", + "description": "Name of the project.", + "nullable": true + }, + "isObfuscated": { + "type": "boolean", + "description": "Is the project name Obfuscated." + }, + "startDate": { + "type": "string", + "description": "Start date of project.", + "format": "date-time" + }, + "endDate": { + "type": "string", + "description": "End date of project.", + "format": "date-time" + }, + "isPartial": { + "type": "boolean", + "description": "Set if the project is partially belong ot the model date range." + }, + "projectKind": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.ProjectKind" + }, + "addedOrUpdatedByChangeId": { + "type": "integer", + "description": "Id of the last change action which added or updated the project.", + "format": "int32", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Model project details." + }, + "T5.Api.Model.Changes.ModelResource": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of the resource.", + "format": "int32" + }, + "name": { + "type": "string", + "description": "Name of the resource.", + "nullable": true + }, + "addedOrUpdatedByChangeId": { + "type": "integer", + "description": "Id of the last change action which added or updated the resource.", + "format": "int32", + "nullable": true + }, + "defaultRate": { + "type": "number", + "description": "Rate of the resource.", + "format": "double", + "nullable": true + }, + "resourceKind": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.ResourceKind" + }, + "startDate": { + "type": "string", + "description": "Start date of capacity. First day of period for requested time unit.", + "format": "date-time" + }, + "endDate": { + "type": "string", + "description": "End date of capacity. First day of period for requested time unit.", + "format": "date-time" + }, + "capacities": { + "type": "array", + "items": { + "type": "number", + "format": "double" + }, + "description": "Resource capacities in requested unit. By default same as dominant unit.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Model Resource details." + }, + "T5.Api.Model.Changes.ModelTask": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of the task.", + "format": "int32" + }, + "projectId": { + "type": "integer", + "description": "Id of the project which task belongs to.", + "format": "int32" + }, + "name": { + "type": "string", + "description": "Name of the task.", + "nullable": true + }, + "isObfuscated": { + "type": "boolean", + "description": "Is the task name Obfuscated." + }, + "startDate": { + "type": "string", + "description": "Start date of the task.", + "format": "date-time" + }, + "endDate": { + "type": "string", + "description": "End date of the task.", + "format": "date-time" + }, + "addedOrUpdatedByChangeId": { + "type": "integer", + "description": "Id of the last change action which added or updated the task.", + "format": "int32", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Model Task details." + }, + "T5.Api.Model.Changes.ProjectKind": { + "enum": [ + "real", + "other", + "excluded", + "virtual", + "virtualExcluded", + "proposal", + "included" + ], + "type": "string", + "description": "Project Types." + }, + "T5.Api.Model.Changes.Requests.AddGenericResourceChange": { + "type": "object", + "properties": { + "customFieldId": { + "type": "integer", + "description": "Custom field Id of the lowest resource aggregation level.", + "format": "int32" + }, + "customFieldValues": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Custom field values of the aggregation level where to add. Must be same as number of aggregation levels.", + "nullable": true + }, + "startDate": { + "type": "string", + "description": "Start date of resource capacity.", + "format": "date-time" + }, + "endDate": { + "type": "string", + "description": "End date of resource capacity.", + "format": "date-time" + }, + "capacitiesPercentage": { + "type": "number", + "description": "Capacity percentage to increase.", + "format": "double" + } + }, + "additionalProperties": false, + "description": "Add Generic Resource Change." + }, + "T5.Api.Model.Changes.Requests.AddNamedResourceChange": { + "type": "object", + "properties": { + "customFieldId": { + "type": "integer", + "description": "Custom field Id of the lowest resource aggregation level.", + "format": "int32" + }, + "customFieldValues": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Custom field values of the aggregation level where to add. Must be same as number of aggregation levels.", + "nullable": true + }, + "startDate": { + "type": "string", + "description": "Start day of resource's capacity.", + "format": "date-time" + }, + "endDate": { + "type": "string", + "description": "End day of resource's capacity.", + "format": "date-time" + }, + "capacityPerDay": { + "type": "number", + "description": "Capacity per day during the period.", + "format": "double" + } + }, + "additionalProperties": false, + "description": "Add Named Resource Change." + }, + "T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.AddGenericResourceChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]": { + "type": "object", + "properties": { + "modelId": { + "type": "integer", + "description": "Id of the model.", + "format": "int32" + }, + "changes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.AddGenericResourceChange" + }, + "description": "Changes to be applied.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Change object." + }, + "T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.AddNamedResourceChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]": { + "type": "object", + "properties": { + "modelId": { + "type": "integer", + "description": "Id of the model.", + "format": "int32" + }, + "changes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.AddNamedResourceChange" + }, + "description": "Changes to be applied.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Change object." + }, + "T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.CloneProjectChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]": { + "type": "object", + "properties": { + "modelId": { + "type": "integer", + "description": "Id of the model.", + "format": "int32" + }, + "changes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.CloneProjectChange" + }, + "description": "Changes to be applied.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Change object." + }, + "T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.CloneTaskChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]": { + "type": "object", + "properties": { + "modelId": { + "type": "integer", + "description": "Id of the model.", + "format": "int32" + }, + "changes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.CloneTaskChange" + }, + "description": "Changes to be applied.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Change object." + }, + "T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.EditAllocationsChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]": { + "type": "object", + "properties": { + "modelId": { + "type": "integer", + "description": "Id of the model.", + "format": "int32" + }, + "changes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.EditAllocationsChange" + }, + "description": "Changes to be applied.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Change object." + }, + "T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.ExcludeProjectChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]": { + "type": "object", + "properties": { + "modelId": { + "type": "integer", + "description": "Id of the model.", + "format": "int32" + }, + "changes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.ExcludeProjectChange" + }, + "description": "Changes to be applied.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Change object." + }, + "T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.ExcludeTaskChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]": { + "type": "object", + "properties": { + "modelId": { + "type": "integer", + "description": "Id of the model.", + "format": "int32" + }, + "changes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.ExcludeTaskChange" + }, + "description": "Changes to be applied.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Change object." + }, + "T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.ExpandContractProjectChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]": { + "type": "object", + "properties": { + "modelId": { + "type": "integer", + "description": "Id of the model.", + "format": "int32" + }, + "changes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.ExpandContractProjectChange" + }, + "description": "Changes to be applied.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Change object." + }, + "T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.ExpandContractTaskChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]": { + "type": "object", + "properties": { + "modelId": { + "type": "integer", + "description": "Id of the model.", + "format": "int32" + }, + "changes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.ExpandContractTaskChange" + }, + "description": "Changes to be applied.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Change object." + }, + "T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.IncludeProjectChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]": { + "type": "object", + "properties": { + "modelId": { + "type": "integer", + "description": "Id of the model.", + "format": "int32" + }, + "changes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.IncludeProjectChange" + }, + "description": "Changes to be applied.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Change object." + }, + "T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.IncludeTaskChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]": { + "type": "object", + "properties": { + "modelId": { + "type": "integer", + "description": "Id of the model.", + "format": "int32" + }, + "changes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.IncludeTaskChange" + }, + "description": "Changes to be applied.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Change object." + }, + "T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.RemoveResourceChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]": { + "type": "object", + "properties": { + "modelId": { + "type": "integer", + "description": "Id of the model.", + "format": "int32" + }, + "changes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.RemoveResourceChange" + }, + "description": "Changes to be applied.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Change object." + }, + "T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.ReplaceResourceChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]": { + "type": "object", + "properties": { + "modelId": { + "type": "integer", + "description": "Id of the model.", + "format": "int32" + }, + "changes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.ReplaceResourceChange" + }, + "description": "Changes to be applied.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Change object." + }, + "T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.ShiftProjectChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]": { + "type": "object", + "properties": { + "modelId": { + "type": "integer", + "description": "Id of the model.", + "format": "int32" + }, + "changes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.ShiftProjectChange" + }, + "description": "Changes to be applied.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Change object." + }, + "T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.ShiftTaskChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]": { + "type": "object", + "properties": { + "modelId": { + "type": "integer", + "description": "Id of the model.", + "format": "int32" + }, + "changes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.ShiftTaskChange" + }, + "description": "Changes to be applied.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Change object." + }, + "T5.Api.Model.Changes.Requests.Change`1[[T5.Api.Model.Changes.Requests.SplitProjectChange, T5.Api.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]": { + "type": "object", + "properties": { + "modelId": { + "type": "integer", + "description": "Id of the model.", + "format": "int32" + }, + "changes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.SplitProjectChange" + }, + "description": "Changes to be applied.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Change object." + }, + "T5.Api.Model.Changes.Requests.CloneProjectChange": { + "type": "object", + "properties": { + "projectId": { + "type": "integer", + "description": "Id of the project that was cloned.", + "format": "int32" + }, + "startDate": { + "type": "string", + "description": "Start date of new project.", + "format": "date-time" + }, + "name": { + "type": "string", + "description": "Name of new project.", + "nullable": true + }, + "durationPercentage": { + "type": "integer", + "description": "Duration change by percentage.", + "format": "int32" + }, + "allocationChangePercentage": { + "type": "number", + "description": "Allocation change by percentage.", + "format": "float", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Clone Project Change." + }, + "T5.Api.Model.Changes.Requests.CloneTaskChange": { + "type": "object", + "properties": { + "taskId": { + "type": "integer", + "description": "Id of the task that was cloned.", + "format": "int32" + }, + "name": { + "type": "string", + "description": "Name of new task.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Clone task change." + }, + "T5.Api.Model.Changes.Requests.EditAllocationsChange": { + "type": "object", + "properties": { + "taskId": { + "type": "integer", + "description": "Id of the task.", + "format": "int32" + }, + "resourceId": { + "type": "integer", + "description": "Id of the resource.", + "format": "int32" + }, + "assignmentId": { + "type": "integer", + "description": "Id of the assignment.", + "format": "int64", + "nullable": true + }, + "startDate": { + "type": "string", + "description": "New start date.", + "format": "date-time" + }, + "allocations": { + "type": "array", + "items": { + "type": "number", + "format": "double" + }, + "description": "Allocation by days from start to end date excluding weekends.", + "nullable": true + }, + "timeUnit": { + "$ref": "#/components/schemas/T5.Api.Model.TimeUnit" + } + }, + "additionalProperties": false, + "description": "Edit Allocations Change." + }, + "T5.Api.Model.Changes.Requests.ExcludeProjectChange": { + "type": "object", + "properties": { + "projectId": { + "type": "integer", + "description": "Id of project.", + "format": "int32" + } + }, + "additionalProperties": false, + "description": "Exclude Change." + }, + "T5.Api.Model.Changes.Requests.ExcludeTaskChange": { + "type": "object", + "properties": { + "taskId": { + "type": "integer", + "description": "Id of task.", + "format": "int32" + } + }, + "additionalProperties": false, + "description": "Exclude Task Change." + }, + "T5.Api.Model.Changes.Requests.ExpandContractProjectChange": { + "type": "object", + "properties": { + "projectId": { + "type": "integer", + "description": "Id of project.", + "format": "int32" + }, + "delta": { + "type": "integer", + "description": "Number of working days to shift. Positive number to expand and negative number to contract.", + "format": "int32" + }, + "allocationChangePercentage": { + "type": "number", + "description": "Allocation change by percentage.", + "format": "float", + "nullable": true + }, + "edge": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Edge" + } + }, + "additionalProperties": false, + "description": "Expand Contract Change." + }, + "T5.Api.Model.Changes.Requests.ExpandContractTaskChange": { + "type": "object", + "properties": { + "taskId": { + "type": "integer", + "description": "Id of task.", + "format": "int32" + }, + "delta": { + "type": "integer", + "description": "Number of working days to shift. Positive number to expand and negative number to contract.", + "format": "int32" + }, + "allocationChangePercentage": { + "type": "number", + "description": "Allocation change by percentage.", + "format": "float", + "nullable": true + }, + "edge": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Edge" + } + }, + "additionalProperties": false, + "description": "Expand Contract task change." + }, + "T5.Api.Model.Changes.Requests.IncludeProjectChange": { + "type": "object", + "properties": { + "projectId": { + "type": "integer", + "description": "Id of project.", + "format": "int32" + } + }, + "additionalProperties": false, + "description": "Include Change." + }, + "T5.Api.Model.Changes.Requests.IncludeTaskChange": { + "type": "object", + "properties": { + "taskId": { + "type": "integer", + "description": "Id of task.", + "format": "int32" + } + }, + "additionalProperties": false, + "description": "Include Task Change." + }, + "T5.Api.Model.Changes.Requests.RemoveResourceChange": { + "type": "object", + "properties": { + "resourceId": { + "type": "integer", + "description": "Id of the resource.", + "format": "int32" + } + }, + "additionalProperties": false, + "description": "Remove Resource Change." + }, + "T5.Api.Model.Changes.Requests.ReplaceResourceChange": { + "type": "object", + "properties": { + "taskId": { + "type": "integer", + "description": "Id of the task.", + "format": "int32" + }, + "resourceId": { + "type": "integer", + "description": "Id of the resource.", + "format": "int32" + }, + "assignmentId": { + "type": "integer", + "description": "Id of the assignment.", + "format": "int64", + "nullable": true + }, + "distributionType": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.DistributionType" + }, + "replacements": { + "type": "array", + "items": { + "$ref": "#/components/schemas/T5.Api.Model.Changes.Requests.ReplacementInfo" + }, + "description": "Replacements for the resource.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Replace Resource Change." + }, + "T5.Api.Model.Changes.Requests.ReplacementInfo": { + "type": "object", + "properties": { + "resourceId": { + "type": "integer", + "description": "Id of the resource.", + "format": "int32" + }, + "totalAllocation": { + "type": "number", + "description": "Total allocation of the replacement in Dominant Unit.", + "format": "double" + }, + "startDay": { + "type": "integer", + "description": "Start day of replacement. Number of working days starting from the first day of allocation. Calculated from 0.", + "format": "int32" + }, + "endDay": { + "type": "integer", + "description": "End day of replacement. Number of working days starting from the first day of allocation. Calculated from 0.", + "format": "int32" + } + }, + "additionalProperties": false, + "description": "Replacement info detail." + }, + "T5.Api.Model.Changes.Requests.ShiftProjectChange": { + "type": "object", + "properties": { + "projectId": { + "type": "integer", + "description": "Id of project.", + "format": "int32" + }, + "delta": { + "type": "integer", + "description": "Number of working days to shift. Positive number to shift forward and negative number to shift backward.", + "format": "int32" + } + }, + "additionalProperties": false, + "description": "Shift Change." + }, + "T5.Api.Model.Changes.Requests.ShiftTaskChange": { + "type": "object", + "properties": { + "taskId": { + "type": "integer", + "description": "Id of task.", + "format": "int32" + }, + "delta": { + "type": "integer", + "description": "Number of working days to shift. Positive number to shift forward and negative number to shift backward.", + "format": "int32" + } + }, + "additionalProperties": false, + "description": "Shift task change." + }, + "T5.Api.Model.Changes.Requests.SplitProjectChange": { + "type": "object", + "properties": { + "projectId": { + "type": "integer", + "description": "Id of the project that was split.", + "format": "int32" + }, + "startDate": { + "type": "string", + "description": "Start date of new project.", + "format": "date-time" + }, + "name": { + "type": "string", + "description": "Name of new project.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Split Project Change." + }, + "T5.Api.Model.Changes.ResourceKind": { + "enum": [ + "real", + "realEmpty", + "realRemoved", + "virtualGenericIncrease", + "virtualGenericDecrease", + "virtualGenericMixed", + "virtualNamed", + "virtualNamedRemoved" + ], + "type": "string", + "description": "Resource Kind types." + }, + "T5.Api.Model.Model": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of the model.", + "format": "int32" + }, + "name": { + "type": "string", + "description": "Name of the model.", + "nullable": true + }, + "sharingType": { + "$ref": "#/components/schemas/T5.Api.Model.ModelSharingType" + }, + "startDate": { + "type": "string", + "description": "Start date of the model.", + "format": "date-time" + }, + "endDate": { + "type": "string", + "description": "End date of the model.", + "format": "date-time" + }, + "createdOn": { + "type": "string", + "description": "Create date of the model.", + "format": "date-time" + }, + "ownerId": { + "type": "integer", + "description": "User id of the model's creator.", + "format": "int32" + }, + "aggregations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/T5.Api.Model.Aggregation" + }, + "description": "Aggregation ordered by level.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Model details." + }, + "T5.Api.Model.ModelSharingType": { + "enum": [ + "private", + "shared", + "sharedWithData" + ], + "type": "string", + "description": "Model assess types." + }, + "T5.Api.Model.Project": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of the project.", + "format": "int32" + }, + "name": { + "type": "string", + "description": "Name of the project.", + "nullable": true + }, + "isObfuscated": { + "type": "boolean", + "description": "Is the project name Obfuscated." + } + }, + "additionalProperties": false, + "description": "Project details." + }, + "T5.Api.Model.Resource": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of the resource.", + "format": "int32" + }, + "name": { + "type": "string", + "description": "Name of the resource.", + "nullable": true + }, + "isObfuscated": { + "type": "boolean", + "description": "Is the resource name Obfuscated." + }, + "isTeamResource": { + "type": "boolean", + "description": "Is the resource a team resource." + } + }, + "additionalProperties": false, + "description": "Resource details." + }, + "T5.Api.Model.Task": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of the task.", + "format": "int32" + }, + "projectId": { + "type": "integer", + "description": "Id of the project which task belongs to.", + "format": "int32" + }, + "name": { + "type": "string", + "description": "Name of the task.", + "nullable": true + }, + "isObfuscated": { + "type": "boolean", + "description": "Is the task name Obfuscated." + }, + "startDate": { + "type": "string", + "description": "Start date of the task.", + "format": "date-time" + }, + "endDate": { + "type": "string", + "description": "End date of the task.", + "format": "date-time" + } + }, + "additionalProperties": false, + "description": "Task details." + }, + "T5.Api.Model.TimeUnit": { + "enum": [ + "day", + "week", + "month", + "quarter" + ], + "type": "string", + "description": "Supported time units." + } + }, + "securitySchemes": { + "APIKey": { + "type": "http", + "description": "API authenticates an account by using the API token generated by the user account. A user with 'Use API' global role permission can request API token from profile screen. The access token must be sent in an HTTP authorization header with every API call. It's recommended to send API requests over HTTPS. API requests over HTTP are not safe and restricted by default. If you want to allow API access for HTTP - IsApiOverHttpEnabled flag must be set to 'true' in the configuration file. An api token represents a users and the users permissions. It must not be published or shared among multiple users.\n\nHeader example:\n\nAuthorization: Bearer 1-8051a5c4-3e6e-481e-9dd6-2f474d6061e3", + "scheme": "Bearer", + "bearerFormat": "token" + }, + "OAuth": { + "type": "http", + "description": "API authenticates an account by using the OAuth JWT token generated by the oauth token endpoint at /oauth2/token. The access token must be sent in an HTTP authorization header with every API call. It's recommended to send API requests over HTTPS. API requests over HTTP are not safe and restricted by default. If you want to allow API access for HTTP - IsApiOverHttpEnabled flag must be set to 'true' in the configuration file. The token endpoint will never be accessible over HTTP for security reasons. An api token represents a users and the users permissions. It must not be published or shared among multiple users.\n\nHeader example:\n\nAuthorization: Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsImtpZCI6IjMyMiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiYWRtaW4iLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjIiLCJuYmYiOjE2MTUyOTY3MzEsImV4cCI6MTYxNTM4MzEzMSwiaXNzIjoiaHR0cDovL2xvY2FsaG9zdCIsImF1ZCI6IjMyMiJ9.8Fhusr-wrtzKSscNiFJ--6ySyj6O3m8XuXpBbAuIUAY\n\nToken endpoint Curl request example:\n\ncurl --location --request POST 'https://domain.com/oauth2/token' --header 'Accept: application/json' --header 'Content-Type: application/x-www-form-urlencoded' --data-urlencode 'grant_type=password' --data-urlencode 'password=Password@1' --data-urlencode 'username=admin' --data-urlencode 'scope=SG'", + "scheme": "Bearer", + "bearerFormat": "JWT" + } + } + }, + "security": [ + { + "APIKey": [] + }, + { + "OAuth": [] + } + ] +} \ No newline at end of file diff --git a/package.json b/package.json index 5b199dcf..bb2bb8cc 100644 --- a/package.json +++ b/package.json @@ -98,7 +98,7 @@ "html-webpack-plugin": "^3.1.0", "jest": "^24.8.0", "license-checker": "^25.0.1", - "lodash": "^4.17.15", + "lodash": "^4.17.21", "mobx": "^4.3.1", "prettier": "^1.18.2", "prettier-eslint": "^9.0.0", diff --git a/src/common-elements/PrismDiv.tsx b/src/common-elements/PrismDiv.tsx index c1cb6928..7ac356c1 100644 --- a/src/common-elements/PrismDiv.tsx +++ b/src/common-elements/PrismDiv.tsx @@ -74,7 +74,7 @@ export const PrismDiv = styled.div` .token.char, .token.builtin, .token.inserted { - color: #a0fbaa; + color: #000000; & + a, & + a:visited { color: #4ed2ba; diff --git a/src/common-elements/headers.ts b/src/common-elements/headers.ts index 88b1c377..828b8d9b 100644 --- a/src/common-elements/headers.ts +++ b/src/common-elements/headers.ts @@ -35,19 +35,21 @@ export const H3 = styled.h2` `; export const RightPanelHeader = styled.h3` - color: ${({ theme }) => theme.rightPanel.textColor}; + color: #697386; + font-size: 14px; + font-weight: 600; ${extensionsHook('RightPanelHeader')}; `; export const UnderlinedHeader = styled.h5` - border-bottom: 1px solid rgba(38, 50, 56, 0.3); - margin: 1em 0 1em 0; - color: rgba(38, 50, 56, 0.5); - font-weight: normal; + color: rgb(0, 0, 0); + font-weight: 600; text-transform: uppercase; font-size: 0.929em; line-height: 20px; + display: inline-block; + margin: 0; ${extensionsHook('UnderlinedHeader')}; `; diff --git a/src/common-elements/panels.ts b/src/common-elements/panels.ts index 2f30b399..9b4b1aad 100644 --- a/src/common-elements/panels.ts +++ b/src/common-elements/panels.ts @@ -39,7 +39,7 @@ export const Section = styled.div.attrs(props => ({ width: 100%; display: block; content: ''; - border-bottom: 1px solid rgba(0, 0, 0, 0.2); + border-bottom: 1px solid rgb(243, 243, 243); } `) || ''} diff --git a/src/common-elements/tabs.ts b/src/common-elements/tabs.ts index b1ad066a..b6e9654f 100644 --- a/src/common-elements/tabs.ts +++ b/src/common-elements/tabs.ts @@ -5,7 +5,7 @@ import styled from '../styled-components'; export { Tab, TabList, TabPanel } from 'react-tabs'; -export const Tabs = styled(ReactTabs)` +export const RequestSamplesTabs = styled(ReactTabs)` > ul { list-style: none; padding: 0; @@ -13,31 +13,30 @@ export const Tabs = styled(ReactTabs)` margin: 0 -5px; > li { - padding: 5px 10px; + color: rgb(0, 0, 0); + background: rgb(255, 255, 255); + padding: 2px 5px; display: inline-block; - background-color: ${({ theme }) => theme.codeSample.backgroundColor}; - border-bottom: 1px solid rgba(0, 0, 0, 0.5); cursor: pointer; text-align: center; outline: none; - color: ${({ theme }) => darken(theme.colors.tonalOffset, theme.rightPanel.textColor)}; margin: 0 ${({ theme }) => `${theme.spacing.unit}px ${theme.spacing.unit}px ${theme.spacing.unit}px`}; - border: 1px solid ${({ theme }) => darken(0.05, theme.codeSample.backgroundColor)}; + border: 1px solid rgb(245, 245, 245); border-radius: 5px; - min-width: 60px; + min-width: 50px; font-size: 0.9em; font-weight: bold; &.react-tabs__tab--selected { - color: ${props => props.theme.colors.text.primary}; - background: ${({ theme }) => theme.rightPanel.textColor}; + color: rgb(55, 181, 255); + border-color: rgb(55, 181, 255); + background: rgb(255, 255, 255); } &:only-child { flex: none; - min-width: 100px; } &.tab-success { @@ -58,7 +57,77 @@ export const Tabs = styled(ReactTabs)` } } > .react-tabs__tab-panel { - background: ${({ theme }) => theme.codeSample.backgroundColor}; + border: 1px solid rgb(242, 242, 242); + background: rgb(245, 245, 245); + border-radius: 4px; + & > div, + & > pre { + padding: ${props => props.theme.spacing.unit * 4}px; + margin: 0; + } + + & > div > pre { + padding: 0; + } + } +`; + +export const Tabs = styled(ReactTabs)` + > ul { + list-style: none; + padding: 0; + margin: 0; + margin: 0 -5px; + + > li { + padding: 2px 5px; + display: inline-block; + + background-color: ${({ theme }) => theme.codeSample.backgroundColor}; + border-bottom: 1px solid rgba(0, 0, 0, 0.5); + cursor: pointer; + text-align: center; + outline: none; + color: ${({ theme }) => darken(theme.colors.tonalOffset, theme.rightPanel.textColor)}; + margin: 0 + ${({ theme }) => `${theme.spacing.unit}px ${theme.spacing.unit}px ${theme.spacing.unit}px`}; + border: 1px solid ${({ theme }) => darken(0.05, theme.codeSample.backgroundColor)}; + border-radius: 5px; + min-width: 50px; + font-size: 0.9em; + font-weight: bold; + + &.react-tabs__tab--selected { + color: rgb(0, 170, 19); + background-color: rgba(0, 170, 19, 0.1); + border-color: transparent; + } + + &:only-child { + flex: none; + } + + &.tab-success { + color: ${props => props.theme.colors.responses.success.color}; + } + + &.tab-redirect { + color: ${props => props.theme.colors.responses.redirect.color}; + } + + &.tab-info { + color: ${props => props.theme.colors.responses.info.color}; + } + + &.tab-error { + color: ${props => props.theme.colors.responses.error.color}; + } + } + } + > .react-tabs__tab-panel { + border: 1px solid rgb(242, 242, 242); + background: rgb(245, 245, 245); + border-radius: 4px; & > div, & > pre { padding: ${props => props.theme.spacing.unit * 4}px; diff --git a/src/components/Endpoint/styled.elements.ts b/src/components/Endpoint/styled.elements.ts index f00a032b..81a83cba 100644 --- a/src/components/Endpoint/styled.elements.ts +++ b/src/components/Endpoint/styled.elements.ts @@ -16,15 +16,20 @@ export const ServerRelativeURL = styled.span` export const EndpointInfo = styled.div<{ expanded?: boolean; inverted?: boolean }>` padding: 10px 30px 10px ${props => (props.inverted ? '10px' : '20px')}; - border-radius: ${props => (props.inverted ? '0' : '4px 4px 0 0')}; - background-color: ${props => - props.inverted ? 'transparent' : props.theme.codeSample.backgroundColor}; + border-radius: 4px; + background-color: ${props => props.theme.codeSample.endpointBackgroundColor || props.theme.codeSample.backgroundColor}; display: flex; white-space: nowrap; align-items: center; border: ${props => (props.inverted ? '0' : '1px solid transparent')}; border-bottom: ${props => (props.inverted ? '1px solid #ccc' : '0')}; transition: border-color 0.25s ease; + font-family: Courier, monospace; + color: rgb(255, 255, 255); + font-weight: 600; + flex: 1 1 0; + overflow-x: hidden; + text-overflow: ellipsis; ${props => (props.expanded && !props.inverted && `border-color: ${props.theme.colors.border.dark};`) || ''} @@ -45,6 +50,7 @@ export const HttpVerb = styled.span.attrs((props: { type: string }) => ({ text-transform: uppercase; font-family: ${props => props.theme.typography.headings.fontFamily}; margin: 0; + border-radius: 4px; `; export const ServersOverlay = styled.div<{ expanded: boolean }>` diff --git a/src/components/PayloadSamples/MediaTypeSamples.tsx b/src/components/PayloadSamples/MediaTypeSamples.tsx index 5fedce01..39945410 100644 --- a/src/components/PayloadSamples/MediaTypeSamples.tsx +++ b/src/components/PayloadSamples/MediaTypeSamples.tsx @@ -78,5 +78,4 @@ export class MediaTypeSamples extends React.Component {
Request samples - + +
)) || null diff --git a/src/components/SearchBox/styled.elements.tsx b/src/components/SearchBox/styled.elements.tsx index 647e71c8..e209f6b7 100644 --- a/src/components/SearchBox/styled.elements.tsx +++ b/src/components/SearchBox/styled.elements.tsx @@ -1,11 +1,13 @@ import * as React from 'react'; -import { darken } from 'polished'; import styled from '../../styled-components'; import { MenuItemLabel } from '../SideMenu/styled.elements'; export const SearchWrap = styled.div` padding: 5px 0; + margin: 0 20px; + border-radius: 4px; + border: 1px solid rgb(243, 243, 243); `; export const SearchInput = styled.input.attrs(() => ({ @@ -17,7 +19,6 @@ export const SearchInput = styled.input.attrs(() => ({ padding: 5px ${props => props.theme.spacing.unit * 2}px 5px ${props => props.theme.spacing.unit * 4}px; border: 0; - border-bottom: 1px solid ${({ theme }) => darken(0.1, theme.menu.backgroundColor)}; font-family: ${({ theme }) => theme.typography.fontFamily}; font-weight: bold; font-size: 13px; @@ -41,7 +42,7 @@ export const SearchIcon = styled((props: { className?: string }) => ( className: 'search-icon', })` position: absolute; - left: ${props => props.theme.spacing.unit * 4}px; + left: 30px; height: 1.8em; width: 0.9em; diff --git a/src/theme.ts b/src/theme.ts index 9b274097..bc8b4dcd 100644 --- a/src/theme.ts +++ b/src/theme.ts @@ -319,6 +319,7 @@ export interface ResolvedThemeInterface { }; codeSample: { backgroundColor: string; + endpointBackgroundColor: string; }; extensionsHook?: (name: string, props: any) => string;