{
  "openapi": "3.0.1",
  "info": {
    "title": "Member Group Memberships",
    "description": "Create and administer collection of member group memberships.",
    "version": "9.1.20.0",
    "x-introduced": "9.1.0.0"
  },
  "servers": [
    {
      "url": "https://{hostname}:{port}/rest/admin/v2",
      "variables": {
        "port": {
          "default": "443",
          "enum": [
            "443",
            "8000"
          ]
        },
        "hostname": {
          "default": "localhost",
          "enum": [
            "localhost",
            "test.hcl.com"
          ]
        }
      }
    }
  ],
  "tags": [
    {
      "name": "Member Group Memberships",
      "description": "Provide RESTful services to manage member-group-memberships."
    }
  ],
  "paths": {
    "/member-group-memberships": {
      "get": {
        "tags": [
          "Member Group Memberships"
        ],
        "description": "Get a collection of member group memberships.",
        "operationId": "getMemberGroupMemberships",
        "parameters": [
          {
            "name": "memberId",
            "in": "query",
            "description": "The user ID or organization ID that is associated to the member group.",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "memberGroupId",
            "in": "query",
            "description": "The member group ID.",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "field1",
            "in": "query",
            "description": "The customizable field.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "exclude",
            "in": "query",
            "description": "The member excluded indicator that specifies if the member (user or organization) is to be explicitly included or excluded from the member group. Valid values are 1 to exclude the member from the member group, and 0 to include the member in the member group. A member can belong to a member group implicitly by the conditions of the member group. When evaluating if a member belongs to a member group, explicit exclusion takes precedence, then explicit inclusion, and then finally implicit inclusion.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "The position within the resulting dataset where the query begins returning item records. If the offset is \"5\", the records that returned begin with the sixth record that matches the query parameters. If the offset is \"0\", the records that are returned begin with the first record that matches the query parameters.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The maximum number of records to return.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "The comma-separated set of properties to be returned. If no properties are specified, all properties are returned.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "description": "The comma-separated set of related resources referenced in the links to be returned. If no related resources are specified, no related resources are returned.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A collection of member group memberships.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemberGroupMembershipCollection"
                }
              }
            }
          },
          "400": {
            "description": "There was a client error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          },
          "500": {
            "description": "There was a server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Member Group Memberships"
        ],
        "description": "Create a member group membership.",
        "operationId": "createMemberGroupMembership",
        "requestBody": {
          "description": "A member group membership, which is an association of a member (user or organization) to a member group.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemberGroupMembership"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "The operation was successful.",
            "content": {},
            "headers": {
              "Location": {
                "description": "The URI of the MemberGroupMembership.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "links": {
              "GetMemberGroupMembershipById": {
                "operationRef": "#/paths/~1member-group-memberships~1memberId:{memberId},memberGroupId:{memberGroupId}/get",
                "parameters": {
                  "memberId ": "$request.body#/memberId",
                  "memberGroupId  ": "$request.body#/memberGroupId"
                },
                "description": "The `memberId`,`memberGroupId` value used in the request body can be used as the `memberId`,`memberGroupId`  parameter in `GET /member-group-memberships/memberId:{memberId},memberGroupId:{memberGroupId}`.\n"
              },
              "DeleteMemberGroupMembershipById": {
                "operationRef": "#/paths/~1member-group-memberships~1memberId:{memberId},memberGroupId:{memberGroupId}/delete",
                "parameters": {
                  "memberId ": "$request.body#/memberId",
                  "memberGroupId  ": "$request.body#/memberGroupId"
                },
                "description": "The `memberId`,`memberGroupId` value used in the request body can be used as the `memberId`,`memberGroupId` parameter in `DELETE /member-group-memberships/memberId:{memberId},memberGroupId:{memberGroupId}`.\n"
              },
              "UpdateMemberGroupMembershipById": {
                "operationRef": "#/paths/~1member-group-memberships~1memberId:{memberId},memberGroupId:{memberGroupId}/patch",
                "parameters": {
                  "memberId ": "$request.body#/memberId",
                  "memberGroupId  ": "$request.body#/memberGroupId"
                },
                "description": "The `memberId`,`memberGroupId` value used in the request body can be used as the `memberId`,`memberGroupId` parameter in `PATCH /member-group-memberships/memberId:{memberId},memberGroupId:{memberGroupId}`.\n"
              }
            }
          },
          "400": {
            "description": "There was a client error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          },
          "500": {
            "description": "There was a server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "MemberGroupMembership"
      }
    },
    "/member-group-memberships/memberId:{memberId},memberGroupId:{memberGroupId}": {
      "get": {
        "tags": [
          "Member Group Memberships"
        ],
        "description": "Get a member group membership.",
        "operationId": "getMemberGroupMembershipById",
        "parameters": [
          {
            "name": "memberId",
            "in": "path",
            "description": "The user ID or organization ID that is associated to the member group.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "memberGroupId",
            "in": "path",
            "description": "The member group ID.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "The comma-separated set of properties to be returned. If no properties are specified, all properties are returned.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "description": "The comma-separated set of related resources referenced in the links to be returned. If no related resources are specified, no related resources are returned.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A member group membership, which is an association of a member (user or organization) to a member group.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemberGroup"
                }
              }
            }
          },
          "400": {
            "description": "There was a client error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {}
          },
          "500": {
            "description": "There was a server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Member Group Memberships"
        ],
        "description": "Delete a member group membership.",
        "operationId": "deleteMemberGroupMembershipById",
        "parameters": [
          {
            "name": "memberId",
            "in": "path",
            "description": "The user ID or organization ID that is associated to the member group.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "memberGroupId",
            "in": "path",
            "description": "The member group ID.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "The operation was successful.",
            "content": {}
          },
          "400": {
            "description": "There was a client error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {}
          },
          "500": {
            "description": "There was a server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Member Group Memberships"
        ],
        "operationId": "updateMemberGroupMembershipById",
        "parameters": [
          {
            "name": "memberId",
            "in": "path",
            "description": "The user ID or organization ID that is associated to the member group.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "memberGroupId",
            "in": "path",
            "description": "The member group ID.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "description": "A member group membership, which is an association of a member (user or organization) to a member group.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemberGroupMembership"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The operation was successful.",
            "content": {}
          },
          "400": {
            "description": "There was a client error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {}
          },
          "500": {
            "description": "There was a server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "MemberGroupMembership"
      }
    }
  },
  "components": {
    "schemas": {
      "Link": {
        "type": "object",
        "properties": {
          "href": {
            "type": "string",
            "description": "The URL of the link.",
            "format": "uri"
          }
        },
        "description": "Links to related resources."
      },
      "Error": {
        "type": "object",
        "properties": {
          "errorCode": {
            "type": "string",
            "description": "The error message code."
          },
          "errorMessage": {
            "type": "string",
            "description": "The error message."
          },
          "errorKey": {
            "type": "string",
            "description": "The error message key."
          },
          "errorParameters": {
            "type": "array",
            "description": "The arguments used to construct the error message.",
            "items": {
              "type": "object",
              "properties": {}
            }
          },
          "errorLevel": {
            "type": "string",
            "description": "The error level."
          },
          "errorHref": {
            "type": "string",
            "description": "The error hypertext reference."
          }
        },
        "description": "The error message item model."
      },
      "ErrorResponseContainer": {
        "type": "object",
        "properties": {
          "requestId": {
            "type": "string",
            "description": "The request identifier."
          },
          "errors": {
            "type": "array",
            "description": "The errors.",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "description": "The error message model."
      },
      "MemberGroupMembership": {
        "type": "object",
        "required": [
          "memberId",
          "memberGroupId"
        ],
        "properties": {
          "memberId": {
            "type": "integer",
            "description": "The user ID or organization ID that is associated to the member group.",
            "format": "int64"
          },
          "memberGroupId": {
            "type": "integer",
            "description": "The member group ID.",
            "format": "int64"
          },
          "field1": {
            "type": "string",
            "description": "The customizable field."
          },
          "exclude": {
            "type": "string",
            "description": "The member excluded indicator that specifies if the member (user or organization) is to be explicitly included or excluded from the member group. Valid values are 1 to exclude the member from the member group, and 0 to include the member in the member group. A member can belong to a member group implicitly by the conditions of the member group. When evaluating if a member belongs to a member group, explicit exclusion takes precedence, then explicit inclusion, and then finally implicit inclusion."
          }
        },
        "description": "A member group membership, which is an association of a member (user or organization) to a member group."
      },
      "MemberGroup": {
        "type": "object",
        "required": [
          "memberId",
          "memberGroupId"
        ],
        "properties": {
          "memberId": {
            "type": "integer",
            "description": "The user ID or organization ID that is associated to the member group.",
            "format": "int64"
          },
          "memberGroupId": {
            "type": "integer",
            "description": "The member group ID.",
            "format": "int64"
          },
          "field1": {
            "type": "string",
            "description": "The customizable field."
          },
          "exclude": {
            "type": "string",
            "description": "The member excluded indicator that specifies if the member (user or organization) is to be explicitly included or excluded from the member group. Valid values are 1 to exclude the member from the member group, and 0 to include the member in the member group. A member can belong to a member group implicitly by the conditions of the member group. When evaluating if a member belongs to a member group, explicit exclusion takes precedence, then explicit inclusion, and then finally implicit inclusion."
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "object",
                "properties": {
                  "href": {
                    "type": "string",
                    "description": "The URL of the link."
                  }
                },
                "description": ""
              }
            },
            "description": "Links to related resources."
          }
        },
        "description": "A member group membership, which is an association of a member (user or organization) to a member group."
      },
      "MemberGroupMembershipCollection": {
        "type": "object",
        "required": [
          "count"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "description": "The total number of items.",
            "format": "int64"
          },
          "href": {
            "type": "string",
            "description": "The URL of the link.",
            "format": "uri"
          },
          "items": {
            "type": "array",
            "description": "The items.",
            "items": {
              "$ref": "#/components/schemas/MemberGroup"
            }
          }
        },
        "description": "A collection of member group memberships."
      }
    },
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "security": [
    {
      "basicAuth": []
    }
  ]
}
