# OpsLevel

> Keep your OpsLevel service catalog up to date: services, teams, dependencies, tags, maturity checks, repositories and deploys.

App · 25 actions. Web page: https://docs.lodol.com/docs/integrations/opslevel

## Actions

### Add service dependency

Record that one service depends on another.

**Inputs**

- Service (`service_id`, text, required): The service that has the dependency.
- Depends on (`depends_on`, text, required): The service it depends on.
- Notes (`notes`, text): Notes about the dependency.

**Outputs**

- `data` (object): The response from OpsLevel.

**Example output**

```json
{
  "data": {
    "destinationService": {
      "id": "example",
      "name": "example"
    },
    "id": "example",
    "notes": "example",
    "sourceService": {
      "id": "example",
      "name": "example"
    }
  }
}
```

### Add team member

Add a person in your OpsLevel account to a team.

**Inputs**

- Team (`team`, text, required): The team in OpsLevel.
- Person (`member_email`, text, required): The email address of the person to add. They must already be a user in OpsLevel.
- Role (`member_role`, text): Their role on the team. Leave empty for a contributor. One of: `contributor`, `manager`.

**Outputs**

- `data` (object): The response from OpsLevel.

**Example output**

```json
{
  "data": {
    "memberships": [
      {
        "role": "example",
        "team": {
          "alias": "example",
          "id": "example",
          "name": "example"
        },
        "user": {
          "email": "example",
          "id": "example",
          "name": "example"
        }
      }
    ]
  }
}
```

### Assign tag

Tag a service, team, repository, user, system, domain or infrastructure resource. A tag with the same key is replaced.

**Inputs**

- Record ID (`resource_id`, text, required): The OpsLevel ID of what to tag, such as a service's ID from List services.
- Key (`tag_key`, text, required): The tag's key, such as env.
- Value (`tag_value`, text, required): The tag's value, such as production.

**Outputs**

- `data` (object): The response from OpsLevel.

**Example output**

```json
{
  "data": {
    "tags": [
      {
        "id": "example",
        "key": "example",
        "value": "example"
      }
    ]
  }
}
```

### Create service

Add a service to your OpsLevel catalog.

**Inputs**

- Name (`name`, text, required): The service's name.
- Description (`description`, text): What the service does.
- Owner (`owner`, text): The team that owns the service.
- Tier (`tier`, text): How critical the service is, from your account's tiers.
- Lifecycle (`lifecycle`, text): Where the service is in its life, such as development or generally available.
- System (`system`, text): The system the service belongs to.
- Language (`language`, text): The main programming language, such as Python.
- Framework (`framework`, text): The main framework, such as Django.
- Product (`product`, text): The product the service is part of.

**Outputs**

- `data` (object): The response from OpsLevel.

**Example output**

```json
{
  "data": {
    "aliases": [
      "example"
    ],
    "description": "example",
    "framework": "example",
    "htmlUrl": "example",
    "id": "example",
    "language": "example",
    "lifecycle": {
      "alias": "example",
      "name": "example"
    },
    "locked": true,
    "maturityReport": {
      "overallLevel": {
        "id": "example",
        "index": 1,
        "name": "example"
      }
    },
    "name": "example",
    "owner": {
      "alias": "example",
      "id": "example",
      "name": "example"
    },
    "parent": {
      "id": "example",
      "name": "example"
    },
    "product": "example",
    "tags": {
      "nodes": [
        {
          "id": "example",
          "key": "example",
          "value": "example"
        }
      ]
    },
    "tier": {
      "alias": "example",
      "name": "example"
    },
    "timestamps": {
      "createdAt": "example",
      "updatedAt": "example"
    }
  }
}
```

### Create team

Create a team in OpsLevel.

**Inputs**

- Name (`name`, text, required): The team's name.
- Responsibilities (`responsibilities`, text): What the team is responsible for.
- Parent team (`parent_team`, text): The team this team sits under.

**Outputs**

- `data` (object): The response from OpsLevel.

**Example output**

```json
{
  "data": {
    "alias": "example",
    "htmlUrl": "example",
    "id": "example",
    "memberships": {
      "nodes": [
        {
          "role": "example",
          "user": {
            "email": "example",
            "id": "example",
            "name": "example"
          }
        }
      ]
    },
    "name": "example",
    "parentTeam": {
      "alias": "example",
      "id": "example",
      "name": "example"
    },
    "responsibilities": "example",
    "tags": {
      "nodes": [
        {
          "id": "example",
          "key": "example",
          "value": "example"
        }
      ]
    }
  }
}
```

### Delete service

Delete a service from your OpsLevel catalog.

**Inputs**

- Service (`service_id`, text, required): The service (component) in OpsLevel.

**Outputs**

- `data` (object): The response from OpsLevel.

**Example output**

```json
{
  "data": {
    "deletedServiceAlias": "example",
    "deletedServiceId": "example"
  }
}
```

### Delete tag

Remove a tag from whatever it is on.

**Inputs**

- Tag ID (`tag_id`, text, required): The tag's ID, from Assign tag or a service's or team's tags.

**Outputs**

- `data` (object): The response from OpsLevel.

**Example output**

```json
{
  "data": {
    "deletedTagId": "example"
  }
}
```

### Delete team

Delete a team from OpsLevel.

**Inputs**

- Team (`team`, text, required): The team in OpsLevel.

**Outputs**

- `data` (object): The response from OpsLevel.

**Example output**

```json
{
  "data": {
    "deletedTeamAlias": "example",
    "deletedTeamId": "example"
  }
}
```

### Get repository

Get a repository's details, owner and languages.

**Inputs**

- Repository (`repository_id`, text, required): The repository in OpsLevel.

**Outputs**

- `data` (object): The response from OpsLevel.

**Example output**

```json
{
  "data": {
    "archivedAt": "example",
    "createdOn": "example",
    "defaultAlias": "example",
    "defaultBranch": "example",
    "description": "example",
    "htmlUrl": "example",
    "id": "example",
    "languages": [
      {
        "name": "example",
        "usage": 1
      }
    ],
    "name": "example",
    "organization": "example",
    "owner": {
      "alias": "example",
      "id": "example",
      "name": "example"
    },
    "tier": {
      "alias": "example",
      "name": "example"
    },
    "type": "example",
    "url": "example",
    "visibility": "example",
    "visible": true
  }
}
```

### Get service

Get a service's details: owner, tier, lifecycle, system, maturity level, tags and link.

**Inputs**

- Service (`service_id`, text, required): The service (component) in OpsLevel.

**Outputs**

- `data` (object): The response from OpsLevel.

**Example output**

```json
{
  "data": {
    "aliases": [
      "example"
    ],
    "description": "example",
    "framework": "example",
    "htmlUrl": "example",
    "id": "example",
    "language": "example",
    "lifecycle": {
      "alias": "example",
      "name": "example"
    },
    "locked": true,
    "maturityReport": {
      "overallLevel": {
        "id": "example",
        "index": 1,
        "name": "example"
      }
    },
    "name": "example",
    "owner": {
      "alias": "example",
      "id": "example",
      "name": "example"
    },
    "parent": {
      "id": "example",
      "name": "example"
    },
    "product": "example",
    "tags": {
      "nodes": [
        {
          "id": "example",
          "key": "example",
          "value": "example"
        }
      ]
    },
    "tier": {
      "alias": "example",
      "name": "example"
    },
    "timestamps": {
      "createdAt": "example",
      "updatedAt": "example"
    }
  }
}
```

### Get service maturity

Get a service's maturity level, its level in each scorecard category, and the latest result of each check.

**Inputs**

- Service (`service_id`, text, required): The service (component) in OpsLevel.

**Outputs**

- `data` (object): The response from OpsLevel.

**Example output**

```json
{
  "data": {
    "checkStats": {
      "passingChecksPercentage": 1,
      "totalChecks": 1,
      "totalPassingChecks": 1
    },
    "id": "example",
    "maturityReport": {
      "categoryBreakdown": [
        {
          "category": {
            "id": "example",
            "name": "example"
          },
          "level": {
            "id": "example",
            "index": 1,
            "name": "example"
          }
        }
      ],
      "latestCheckResults": [
        {
          "check": {
            "category": {
              "name": "example"
            },
            "id": "example",
            "level": {
              "name": "example"
            },
            "name": "example",
            "type": "example",
            "url": "example"
          },
          "lastUpdated": "example",
          "message": "example",
          "status": "example"
        }
      ],
      "overallLevel": {
        "id": "example",
        "index": 1,
        "name": "example"
      }
    },
    "name": "example"
  }
}
```

### Get team

Get a team's details, members and tags.

**Inputs**

- Team (`team`, text, required): The team in OpsLevel.

**Outputs**

- `data` (object): The response from OpsLevel.

**Example output**

```json
{
  "data": {
    "alias": "example",
    "htmlUrl": "example",
    "id": "example",
    "memberships": {
      "nodes": [
        {
          "role": "example",
          "user": {
            "email": "example",
            "id": "example",
            "name": "example"
          }
        }
      ]
    },
    "name": "example",
    "parentTeam": {
      "alias": "example",
      "id": "example",
      "name": "example"
    },
    "responsibilities": "example",
    "tags": {
      "nodes": [
        {
          "id": "example",
          "key": "example",
          "value": "example"
        }
      ]
    }
  }
}
```

### Invite user

Add a person to your OpsLevel account and, unless you choose otherwise, email them an invitation.

**Inputs**

- Email (`email`, text, required): The person's email address.
- Name (`name`, text): The person's name.
- Role (`role`, text): What they can do in OpsLevel. Leave empty for User. One of: `user`, `team_member` (Team member), `standards_admin` (Standards admin), `admin`.
- Skip welcome email (`skip_welcome_email`, true/false): Don't send the welcome email.

**Outputs**

- `data` (object): The response from OpsLevel.

**Example output**

```json
{
  "data": {
    "deactivated": true,
    "email": "example",
    "htmlUrl": "example",
    "id": "example",
    "name": "example",
    "role": "example"
  }
}
```

### List deploys

List the deploys OpsLevel recorded in a time window, by default the last 7 days.

**Inputs**

- From (`start`, date and time): Only deploys after this time. Leave empty for 7 days ago.
- To (`end`, date and time): Only deploys before this time. Leave empty for now.
- Service (`service_id`, text): Only deploys of this service.
- Environments (`environments`, list): Only deploys to these environments, such as production.
- Statuses (`statuses`, list): Only deploys with these statuses. One or more of: `success` (Succeeded), `failure` (Failed), `running`, `queued`, `canceled`, `no_status` (No status).
- Limit (`limit`, number): How many deploys to return, up to 100 (the most OpsLevel returns at once). From 1 to 100.
- Cursor (`cursor`, text): To read the next page, the next_cursor value a previous list step returned.

**Outputs**

- `data` (object): The response from OpsLevel.

**Example output**

```json
{
  "data": {
    "count": 1,
    "items": [
      {
        "commitBranch": "example",
        "commitMessage": "example",
        "commitSha": "example",
        "deployNumber": "example",
        "deployStatus": "example",
        "deployUrl": "example",
        "deployedAt": "example",
        "deployerEmail": "example",
        "deployerName": "example",
        "description": "example",
        "environment": "example",
        "id": "example",
        "service": {
          "id": "example",
          "name": "example"
        },
        "serviceAlias": "example",
        "startedAt": "example",
        "status": "example"
      }
    ],
    "next_cursor": "example",
    "total_count": 1
  }
}
```

### List infrastructure resources

List the infrastructure resources in your catalog, such as databases, queues and clusters.

**Inputs**

- Limit (`limit`, number): How many infrastructure resources to return, up to 100 (the most OpsLevel returns at once). From 1 to 100.
- Cursor (`cursor`, text): To read the next page, the next_cursor value a previous list step returned.

**Outputs**

- `data` (object): The response from OpsLevel.

**Example output**

```json
{
  "data": {
    "count": 1,
    "items": [
      {
        "aliases": [
          "example"
        ],
        "href": "example",
        "id": "example",
        "lastSyncedAt": "example",
        "name": "example",
        "owner": {
          "alias": "example",
          "id": "example",
          "name": "example"
        },
        "providerResourceType": "example",
        "type": "example"
      }
    ],
    "next_cursor": "example",
    "total_count": 1
  }
}
```

### List repositories

List the code repositories OpsLevel knows about, with their owner, tier and languages.

**Inputs**

- Limit (`limit`, number): How many repositories to return, up to 100 (the most OpsLevel returns at once). From 1 to 100.
- Cursor (`cursor`, text): To read the next page, the next_cursor value a previous list step returned.
- Tier (`tier`, text): Only repositories in this tier.
- Shown in OpsLevel (`visible`, true/false): Only repositories shown in OpsLevel (on) or only hidden ones (off). Leave empty for both.

**Outputs**

- `data` (object): The response from OpsLevel.

**Example output**

```json
{
  "data": {
    "count": 1,
    "items": [
      {
        "archivedAt": "example",
        "createdOn": "example",
        "defaultAlias": "example",
        "defaultBranch": "example",
        "description": "example",
        "htmlUrl": "example",
        "id": "example",
        "languages": [
          {
            "name": "example",
            "usage": 1
          }
        ],
        "name": "example",
        "organization": "example",
        "owner": {
          "alias": "example",
          "id": "example",
          "name": "example"
        },
        "tier": {
          "alias": "example",
          "name": "example"
        },
        "type": "example",
        "url": "example",
        "visibility": "example",
        "visible": true
      }
    ],
    "next_cursor": "example",
    "total_count": 1
  }
}
```

### List scorecards

List your scorecards with how many services they cover and how many of their checks pass.

**Inputs**

- Limit (`limit`, number): How many scorecards to return, up to 100 (the most OpsLevel returns at once). From 1 to 100.
- Cursor (`cursor`, text): To read the next page, the next_cursor value a previous list step returned.

**Outputs**

- `data` (object): The response from OpsLevel.

**Example output**

```json
{
  "data": {
    "count": 1,
    "items": [
      {
        "affectsOverallServiceLevels": true,
        "description": "example",
        "href": "example",
        "id": "example",
        "name": "example",
        "passingChecks": 1,
        "passingChecksPercentage": 1,
        "serviceCount": 1,
        "slug": "example",
        "totalChecks": 1
      }
    ],
    "next_cursor": "example",
    "total_count": 1
  }
}
```

### List service dependencies

List the services a service depends on, with each dependency's ID and notes.

**Inputs**

- Service (`service_id`, text, required): The service (component) in OpsLevel.
- Limit (`limit`, number): How many dependencies to return, up to 100 (the most OpsLevel returns at once). From 1 to 100.
- Cursor (`cursor`, text): To read the next page, the next_cursor value a previous list step returned.

**Outputs**

- `data` (object): The response from OpsLevel.

**Example output**

```json
{
  "data": {
    "count": 1,
    "items": [
      {
        "id": "example",
        "locked": true,
        "node": {
          "aliases": [
            "example"
          ],
          "htmlUrl": "example",
          "id": "example",
          "name": "example"
        },
        "notes": "example"
      }
    ],
    "next_cursor": "example",
    "total_count": 1
  }
}
```

### List services

List the services (components) in your OpsLevel catalog, with their owner, tier, lifecycle, maturity level and tags.

**Inputs**

- Limit (`limit`, number): How many services to return, up to 100 (the most OpsLevel returns at once). From 1 to 100.
- Cursor (`cursor`, text): To read the next page, the next_cursor value a previous list step returned.
- Search (`search`, text): Only services whose name, alias or description match these words.
- Owner (`owner`, text): Only services this team owns.
- Tier (`tier`, text): Only services in this tier.
- Lifecycle (`lifecycle`, text): Only services at this lifecycle stage.
- Tag key (`tag_key`, text): Only services with a tag with this key, such as env.
- Tag value (`tag_value`, text): With a tag key: only services whose tag has this value.
- Order (`sort`, text): The order to list them in. One of: `name_ASC` (Name, A to Z), `name_DESC` (Name, Z to A), `owner_ASC` (Owner), `tier_ASC` (Tier), `lifecycle_ASC` (Lifecycle), `level_index_DESC` (Highest maturity level first), `level_index_ASC` (Lowest maturity level first), `checks_passing_DESC` (Most checks passing first), `checks_passing_ASC` (Fewest checks passing first), `last_deploy_DESC` (Most recently deployed first).

**Outputs**

- `data` (object): The response from OpsLevel.

**Example output**

```json
{
  "data": {
    "count": 1,
    "items": [
      {
        "aliases": [
          "example"
        ],
        "description": "example",
        "framework": "example",
        "htmlUrl": "example",
        "id": "example",
        "language": "example",
        "lifecycle": {
          "alias": "example",
          "name": "example"
        },
        "locked": true,
        "maturityReport": {
          "overallLevel": {
            "id": "example",
            "index": 1,
            "name": "example"
          }
        },
        "name": "example",
        "owner": {
          "alias": "example",
          "id": "example",
          "name": "example"
        },
        "parent": {
          "id": "example",
          "name": "example"
        },
        "product": "example",
        "tags": {
          "nodes": [
            {
              "id": "example",
              "key": "example",
              "value": "example"
            }
          ]
        },
        "tier": {
          "alias": "example",
          "name": "example"
        },
        "timestamps": {
          "createdAt": "example",
          "updatedAt": "example"
        }
      }
    ],
    "next_cursor": "example",
    "total_count": 1
  }
}
```

### List teams

List the teams in OpsLevel with their members and tags.

**Inputs**

- Limit (`limit`, number): How many teams to return, up to 100 (the most OpsLevel returns at once). From 1 to 100.
- Cursor (`cursor`, text): To read the next page, the next_cursor value a previous list step returned.
- Search (`search`, text): Only teams whose name matches these words.

**Outputs**

- `data` (object): The response from OpsLevel.

**Example output**

```json
{
  "data": {
    "count": 1,
    "items": [
      {
        "alias": "example",
        "htmlUrl": "example",
        "id": "example",
        "memberships": {
          "nodes": [
            {
              "role": "example",
              "user": {
                "email": "example",
                "id": "example",
                "name": "example"
              }
            }
          ]
        },
        "name": "example",
        "parentTeam": {
          "alias": "example",
          "id": "example",
          "name": "example"
        },
        "responsibilities": "example",
        "tags": {
          "nodes": [
            {
              "id": "example",
              "key": "example",
              "value": "example"
            }
          ]
        }
      }
    ],
    "next_cursor": "example",
    "total_count": 1
  }
}
```

### List users

List the people in your OpsLevel account with their role.

**Inputs**

- Limit (`limit`, number): How many users to return, up to 100 (the most OpsLevel returns at once). From 1 to 100.
- Cursor (`cursor`, text): To read the next page, the next_cursor value a previous list step returned.

**Outputs**

- `data` (object): The response from OpsLevel.

**Example output**

```json
{
  "data": {
    "count": 1,
    "items": [
      {
        "deactivated": true,
        "email": "example",
        "htmlUrl": "example",
        "id": "example",
        "name": "example",
        "role": "example"
      }
    ],
    "next_cursor": "example",
    "total_count": 1
  }
}
```

### Remove service dependency

Remove a dependency between two services.

**Inputs**

- Dependency ID (`dependency_id`, text, required): The dependency's ID, from List service dependencies or Add service dependency.

**Outputs**

- `data` (object): The response from OpsLevel.

**Example output**

```json
{
  "data": {
    "deletedId": "example"
  }
}
```

### Remove team member

Take a person off a team.

**Inputs**

- Team (`team`, text, required): The team in OpsLevel.
- Person (`member_email`, text, required): The email address of the person to take off the team.
- Role (`member_role`, text): The role they have on the team. Leave empty unless they hold more than one. One of: `contributor`, `manager`.

**Outputs**

- `data` (object): The response from OpsLevel.

**Example output**

```json
{
  "data": {
    "deletedMembers": [
      {
        "email": "example",
        "id": "example",
        "name": "example"
      }
    ]
  }
}
```

### Update service

Change a service's details. Anything left empty stays as it is.

**Inputs**

- Service (`service_id`, text, required): The service (component) in OpsLevel.
- Name (`name`, text): A new name for the service.
- Description (`description`, text): What the service does.
- Owner (`owner`, text): The team that will own the service.
- Tier (`tier`, text): How critical the service is, from your account's tiers.
- Lifecycle (`lifecycle`, text): Where the service is in its life, such as development or generally available.
- System (`system`, text): The system the service belongs to.
- Language (`language`, text): The main programming language, such as Python.
- Framework (`framework`, text): The main framework, such as Django.
- Product (`product`, text): The product the service is part of.

**Outputs**

- `data` (object): The response from OpsLevel.

**Example output**

```json
{
  "data": {
    "aliases": [
      "example"
    ],
    "description": "example",
    "framework": "example",
    "htmlUrl": "example",
    "id": "example",
    "language": "example",
    "lifecycle": {
      "alias": "example",
      "name": "example"
    },
    "locked": true,
    "maturityReport": {
      "overallLevel": {
        "id": "example",
        "index": 1,
        "name": "example"
      }
    },
    "name": "example",
    "owner": {
      "alias": "example",
      "id": "example",
      "name": "example"
    },
    "parent": {
      "id": "example",
      "name": "example"
    },
    "product": "example",
    "tags": {
      "nodes": [
        {
          "id": "example",
          "key": "example",
          "value": "example"
        }
      ]
    },
    "tier": {
      "alias": "example",
      "name": "example"
    },
    "timestamps": {
      "createdAt": "example",
      "updatedAt": "example"
    }
  }
}
```

### Update team

Change a team's name, responsibilities or parent team. Anything left empty stays as it is.

**Inputs**

- Team (`team`, text, required): The team in OpsLevel.
- Name (`name`, text): A new name for the team.
- Responsibilities (`responsibilities`, text): What the team is responsible for.
- Parent team (`parent_team`, text): The team this team sits under.

**Outputs**

- `data` (object): The response from OpsLevel.

**Example output**

```json
{
  "data": {
    "alias": "example",
    "htmlUrl": "example",
    "id": "example",
    "memberships": {
      "nodes": [
        {
          "role": "example",
          "user": {
            "email": "example",
            "id": "example",
            "name": "example"
          }
        }
      ]
    },
    "name": "example",
    "parentTeam": {
      "alias": "example",
      "id": "example",
      "name": "example"
    },
    "responsibilities": "example",
    "tags": {
      "nodes": [
        {
          "id": "example",
          "key": "example",
          "value": "example"
        }
      ]
    }
  }
}
```
