info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
type: reference
---
# Use GitLab as a microservice
Many applications need to access JSON APIs, so application tests might need access
to APIs too. The following example shows how to use GitLab as a microservice to give
tests access to the GitLab API.
1. Configure a [runner](../runners/README.md) with the Docker or Kubernetes executor.
1. In your `.gitlab-ci.yml` add:
```yaml
services:
- name: gitlab/gitlab-ce:latest
alias: gitlab
variables:
GITLAB_HTTPS: "false" # ensure that plain http works
GITLAB_ROOT_PASSWORD: "password" # to access the api with user root:password
```
1. To set values for the `GITLAB_HTTPS` and `GITLAB_ROOT_PASSWORD`,