Gamma API
ProgressDashboard

Create a scope

POST
/api/projects/{projectId}/scopes

Only the source's own reference is kept. 400 when a model, view or search set is not the project's.

Who may call it: Anyone on the project whose permission profile allows object.create. API keys: yes, given object.create for this project.

Authorization

cookiegamma.session_token<token>

The session cookie a sign-in sets. Over HTTPS its name carries the __Secure- prefix. Browsers send it on their own; other clients keep it from the sign-in response.

Path Parameters

projectId*string

The project's id.

Request Body

application/json
  1. body
name*string
Length1 <= length <= 200
source*string
Value in"models""view""searchSet"
modelIds?array<>

For a models scope.

Itemsitems <= 50
viewId?|

For a view scope; required to create one.

searchSetId?|

For a searchSet scope; required to create one.

charts?array<>
Itemsitems <= 30

Response Body

Created.

application/json
  1. response
scope*
Example Request
curl -X POST 'http://localhost:3000/api/projects/string/scopes' \  -H 'Content-Type: application/json' \  -d '{  "name": "string",  "source": "models"}'
Example Response
{  "scope": {    "id": "string",    "name": "string",    "source": "models",    "viewId": "string",    "searchSetId": "string",    "charts": [      {        "id": "string",        "name": "string",        "metric": "completion",        "groupBy": {          "column": "objectId"        },        "subGroupBy": {          "column": "objectId"        },        "measure": {          "column": "objectId"        }      }    ],    "createdById": "string",    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z",    "modelIds": [      "string"    ],    "effectiveModelIds": [      "string"    ],    "conditions": [      {        "logical": "and",        "category": "string",        "name": "string",        "operator": "equals",        "value": "string"      }    ]  }}