---
title: "Create server"
method: POST
path: "/server"
tags: ["Server"]
---

# Create server

`POST /server`

## Request

- Base URL: `/v1` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/v1/server`
- Auth: none declared. Required headers: `X-Auth-Token`
- TypeScript: <https://skmtc.dev/neuvector/apis/neuvector-api/docs/server/post.ts> (a function with typed inputs; its response is checked against the schema)

## Headers

- `X-Auth-Token` string, required

## Request body

- RESTServerConfigData
  - `config` RESTServerConfig, required
    - `name` string, required
    - `ldap` RESTServerLDAPConfig
      - `directory` string
      - `hostname` string
      - `port` integer
      - `ssl` boolean
      - `base_dn` string
      - `bind_dn` string
      - `bind_password` string
      - `group_member_attr` string
      - `username_attr` string
      - `enable` boolean
      - `default_role` string
      - `role_groups` object
        - `role` string
        - `groups` string[]
      - `group_mapped_roles` GroupRoleMapping[]
        - `group` string, required
        - `global_role` string, required
        - `role_domains` object
          - `role` string
          - `domains` string[]
    - `saml` RESTServerSAMLConfig
      - `sso_url` string, required
      - `issuer` string, required
      - `x509_cert` string
      - `group_claim` string, required
      - `enable` boolean
      - `default_role` string
      - `role_groups` object
        - `role` string
        - `groups` string[]
      - `group_mapped_roles` GroupRoleMapping[]
        - `group` string, required
        - `global_role` string, required
        - `role_domains` object
          - `role` string
          - `domains` string[]
    - `oidc` RESTServerOIDCConfig
      - `issuer` string, required
      - `client_id` string, required
      - `client_secret` string
      - `group_claim` string, required
      - `scopes` string[]
      - `enable` boolean, required
      - `default_role` string, required
      - `role_groups` object
        - `role` string
        - `groups` string[]
      - `group_mapped_roles` GroupRoleMapping[]
        - `group` string, required
        - `global_role` string, required
        - `role_domains` object
          - `role` string
          - `domains` string[]

## Response `200`

Success

---

[API](https://skmtc.dev/neuvector/apis/neuvector-api.md) - [All operations](https://skmtc.dev/neuvector/apis/neuvector-api/llms.txt) - [OpenAPI document](https://skmtc.dev/neuvector/apis/neuvector-api/revisions/b8d8d28840b3?raw)
