|
|
|
GraphQL
|
|
|
|
|
|
|
|
https://staging.gitlab.com/-/graphql-explorer
|
|
|
|
|
|
|
|
```graphql
|
|
|
|
query schedules {
|
|
|
|
project(fullPath: "gitlab-org/monitor/monitor-sandbox") {
|
|
|
|
incidentManagementOncallSchedules {
|
|
|
|
nodes {
|
|
|
|
iid
|
|
|
|
name
|
|
|
|
timezone
|
|
|
|
rotations {
|
|
|
|
nodes {
|
|
|
|
id
|
|
|
|
name
|
|
|
|
participants {
|
|
|
|
nodes {
|
|
|
|
user {
|
|
|
|
username
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
shifts(startTime: "2021-02-11 17:23:13 -0500" , endTime: "2021-02-12 17:23:13 -0500") {
|
|
|
|
edges {
|
|
|
|
node {
|
|
|
|
endsAt
|
|
|
|
startsAt
|
|
|
|
participant {
|
|
|
|
user {
|
|
|
|
username
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
mutation createSchedule($scheduleCreate: OncallScheduleCreateInput!) {
|
|
|
|
oncallScheduleCreate(input: $scheduleCreate) {
|
|
|
|
oncallSchedule {
|
|
|
|
iid
|
|
|
|
description
|
|
|
|
name
|
|
|
|
}
|
|
|
|
errors
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
mutation createRotationAPAC($rotationCreateAPAC: OncallRotationCreateInput!) {
|
|
|
|
oncallRotationCreate(input: $rotationCreateAPAC) {
|
|
|
|
oncallRotation {
|
|
|
|
id
|
|
|
|
name
|
|
|
|
startsAt
|
|
|
|
length
|
|
|
|
lengthUnit
|
|
|
|
participants {
|
|
|
|
nodes {
|
|
|
|
user {
|
|
|
|
username
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
mutation createRotationEMEA($rotationCreateEMEA: OncallRotationCreateInput!) {
|
|
|
|
oncallRotationCreate(input: $rotationCreateEMEA) {
|
|
|
|
oncallRotation {
|
|
|
|
id
|
|
|
|
name
|
|
|
|
startsAt
|
|
|
|
length
|
|
|
|
lengthUnit
|
|
|
|
participants {
|
|
|
|
nodes {
|
|
|
|
user {
|
|
|
|
username
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
mutation createRotationAMER($rotationCreateAMER: OncallRotationCreateInput!) {
|
|
|
|
oncallRotationCreate(input: $rotationCreateAMER) {
|
|
|
|
oncallRotation {
|
|
|
|
id
|
|
|
|
name
|
|
|
|
startsAt
|
|
|
|
length
|
|
|
|
lengthUnit
|
|
|
|
participants {
|
|
|
|
nodes {
|
|
|
|
user {
|
|
|
|
username
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
Input:
|
|
|
|
|
|
|
|
```json
|
|
|
|
{
|
|
|
|
"scheduleCreate": {
|
|
|
|
"description": "Manages application-level alerts and issues",
|
|
|
|
"name": "Engineering On-call",
|
|
|
|
"projectPath": "gitlab-org/monitor/monitor-sandbox",
|
|
|
|
"timezone": "Etc/UTC"
|
|
|
|
},
|
|
|
|
"rotationCreateAPAC": {
|
|
|
|
"name": "APAC",
|
|
|
|
"projectPath": "gitlab-org/monitor/monitor-sandbox",
|
|
|
|
"scheduleIid": "1",
|
|
|
|
"startsAt": {
|
|
|
|
"date": "2021-02-01",
|
|
|
|
"time": "00:00"
|
|
|
|
},
|
|
|
|
"rotationLength": {
|
|
|
|
"length": 5,
|
|
|
|
"unit": "DAYS"
|
|
|
|
},
|
|
|
|
"participants": [
|
|
|
|
{ "username": "tristan.read", "colorPalette": "GREEN", "colorWeight": "WEIGHT_100" },
|
|
|
|
{ "username": "seanarnold", "colorPalette": "AQUA", "colorWeight": "WEIGHT_800" }
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"rotationCreateEMEA": {
|
|
|
|
"name": "EMEA",
|
|
|
|
"projectPath": "gitlab-org/monitor/monitor-sandbox",
|
|
|
|
"scheduleIid": "1",
|
|
|
|
"startsAt": {
|
|
|
|
"date": "2021-02-01",
|
|
|
|
"time": "08:00"
|
|
|
|
},
|
|
|
|
"rotationLength": {
|
|
|
|
"length": 12,
|
|
|
|
"unit": "HOURS"
|
|
|
|
},
|
|
|
|
"participants": [
|
|
|
|
{ "username": "oregand", "colorPalette": "BLUE", "colorWeight": "WEIGHT_200" },
|
|
|
|
{ "username": "ck3g", "colorPalette": "AQUA", "colorWeight": "WEIGHT_400" },
|
|
|
|
{ "username": "splattael-staging", "colorPalette": "GREEN", "colorWeight": "WEIGHT_700" },
|
|
|
|
{ "username": "ohoral", "colorPalette": "ORANGE", "colorWeight": "WEIGHT_900" }
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"rotationCreateAMER": {
|
|
|
|
"name": "AMER",
|
|
|
|
"projectPath": "gitlab-org/monitor/monitor-sandbox",
|
|
|
|
"scheduleIid": "1",
|
|
|
|
"startsAt": {
|
|
|
|
"date": "2021-02-01",
|
|
|
|
"time": "16:00"
|
|
|
|
},
|
|
|
|
"rotationLength": {
|
|
|
|
"length": 1,
|
|
|
|
"unit": "WEEKS"
|
|
|
|
},
|
|
|
|
"participants": [
|
|
|
|
{ "username": "syasonik-admin", "colorPalette": "BLUE", "colorWeight": "WEIGHT_50" },
|
|
|
|
{ "username": "ameliabauerly", "colorPalette": "ORANGE", "colorWeight": "WEIGHT_500" },
|
|
|
|
{ "username": "crystalpoole", "colorPalette": "MAGENTA", "colorWeight": "WEIGHT_950" }
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
|
|
|
\ No newline at end of file |