Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
137 changes: 116 additions & 21 deletions content/operate/rs/references/rest-api/api-reference/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -702,6 +702,33 @@
"type": "object"
},
"LdapMapping": {
"allOf": [
{
"$ref": "#/components/schemas/LdapMappingBody"
},
{
"properties": {
"action_uid": {
"description": "Action uid. If exists - progress can be tracked by the GET /actions/\u003cuid\u003e API.",
"type": "string"
},
"uid": {
"description": "LDAP mapping's unique uid.",
"type": "integer",
"x-go-type": "json.Number"
}
},
"required": [
"uid",
"name",
"dn",
"email",
"email_alerts",
"role_uids"
],
"type": "object"
}
],
"description": "An API object that represents a Redis Software LDAP mapping.",
"example": {
"dn": "OU=ops.group,DC=redislabs,DC=com",
Expand All @@ -712,16 +739,15 @@
1
],
"uid": 17
},
}
},
"LdapMappingBody": {
"description": "Common LDAP mapping properties shared across LDAP mapping payloads.",
"properties": {
"account_id": {
"description": "SM account ID.",
"type": "integer"
},
"action_uid": {
"description": "Action uid. If exists - progress can be tracked by the GET /actions/\u003cuid\u003e API.",
"type": "string"
},
"bdbs_email_alerts": {
"description": "UIDs of databases that LDAP mapping users will receive alerts for.",
"items": {
Expand All @@ -736,11 +762,16 @@
},
"dn": {
"description": "LDAP group's distinguished name.",
"type": "string"
"minLength": 1,
"pattern": "\\S",
"type": "string",
"x-pattern-error-message": "must contain at least one non-whitespace character"
},
"email": {
"description": "LDAP mapping's email.",
"type": "string"
"pattern": "(^$|^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$)",
"type": "string",
"x-pattern-error-message": "must be empty or a valid email address"
},
"email_alerts": {
"default": true,
Expand All @@ -749,32 +780,48 @@
},
"name": {
"description": "LDAP mapping's name.",
"type": "string"
"maxLength": 255,
"pattern": "^[a-zA-Z0-9_ \\[\\]()@,.;#-]+$",
"type": "string",
"x-pattern-error-message": "may contain only letters, numbers, spaces, and the characters _ [] () @ , . ; # -"
},
"role_uids": {
"description": "List of role uids associated with the LDAP mapping.",
"items": {
"type": "integer",
"x-go-type": "json.Number"
},
"minItems": 1,
"type": "array"
},
"uid": {
"description": "LDAP mapping's unique uid.",
"type": "integer",
"x-go-type": "json.Number"
}
},
"required": [
"uid",
"name",
"dn",
"email",
"email_alerts",
"role_uids"
],
"type": "object"
},
"LdapMappingCreateRequest": {
"allOf": [
{
"$ref": "#/components/schemas/LdapMappingBody"
},
{
"required": [
"name",
"dn",
"role_uids"
],
"type": "object"
}
],
"description": "Request body for creating a Redis Software LDAP mapping.",
"example": {
"dn": "OU=ops.group,DC=redislabs,DC=com",
"email": "ops.group@redislabs.com",
"email_alerts": true,
"name": "Admins",
"role_uids": [
1
]
}
},
"LdapQuery": {
"additionalProperties": false,
"oneOf": [
Expand Down Expand Up @@ -2508,6 +2555,54 @@
],
"x-publish-docs": true,
"x-stability-level": "stable"
},
"post": {
"description": "Create a new Redis Software LDAP mapping.",
"operationId": "cluster_create_ldap_mapping",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LdapMappingCreateRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LdapMapping"
}
}
},
"description": "LDAP mapping created successfully."
},
"400": {
"$ref": "#/components/responses/cluster_BadRequest"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"409": {
"$ref": "#/components/responses/Conflict"
}
},
"security": [
{
"Auth": [
"create_ldap_mapping"
]
}
],
"summary": "Create a Redis Software LDAP mapping",
"tags": [
"LDAP Mapping"
],
"x-publish-docs": true,
"x-stability-level": "stable"
}
},
"/v1/ldap_mappings/{uid}": {
Expand Down
Loading