zitadel/pkg/admin/api/grpc/admin.swagger.json

653 lines
14 KiB
JSON
Raw Normal View History

2020-03-23 15:56:02 +00:00
{
"swagger": "2.0",
"info": {
"title": "admin service",
"version": "0.1",
"contact": {
"url": "https://github.com/caos/zitadel/pkg/admin"
}
},
"schemes": [
"https"
],
"consumes": [
"application/json",
"application/grpc"
],
"produces": [
"application/json",
"application/grpc"
],
"paths": {
"/healthz": {
"get": {
"summary": "Healthz returns status OK as soon as the service started",
"operationId": "Healthz",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"properties": {}
}
}
},
"tags": [
"AdminService"
]
}
},
"/orgs/_isunique": {
"get": {
"summary": "ORG",
"operationId": "IsOrgUnique",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1UniqueOrgResponse"
}
}
},
"parameters": [
{
"name": "name",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "domain",
"in": "query",
"required": false,
"type": "string"
}
],
"tags": [
"AdminService"
]
}
},
"/orgs/_search": {
"post": {
"operationId": "SearchOrgs",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1OrgSearchResponse"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/v1OrgSearchRequest"
}
}
],
"tags": [
"AdminService"
]
}
},
"/orgs/_setup": {
"post": {
"operationId": "SetUpOrg",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1OrgSetUpResponse"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/v1OrgSetUpRequest"
}
}
],
"tags": [
"AdminService"
]
}
},
"/orgs/{id}": {
"get": {
"operationId": "GetOrgByID",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1Org"
}
}
},
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"AdminService"
]
}
},
"/orgs/{org_id}/iampolicy": {
"get": {
"summary": "ORG_IAM_POLICY",
"operationId": "GetOrgIamPolicy",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1OrgIamPolicy"
}
}
},
"parameters": [
{
"name": "org_id",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"AdminService"
]
},
"delete": {
"operationId": "DeleteOrgIamPolicy",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"properties": {}
}
}
},
"parameters": [
{
"name": "org_id",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"AdminService"
]
},
"post": {
"operationId": "CreateOrgIamPolicy",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1OrgIamPolicy"
}
}
},
"parameters": [
{
"name": "org_id",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/v1OrgIamPolicyRequest"
}
}
],
"tags": [
"AdminService"
]
},
"put": {
"operationId": "UpdateOrgIamPolicy",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1OrgIamPolicy"
}
}
},
"parameters": [
{
"name": "org_id",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/v1OrgIamPolicyRequest"
}
}
],
"tags": [
"AdminService"
]
}
},
2020-03-23 15:56:02 +00:00
"/ready": {
"get": {
"summary": "Ready returns status OK as soon as all dependent services are available",
"operationId": "Ready",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"properties": {}
}
}
},
"tags": [
"AdminService"
]
}
},
"/validate": {
"get": {
"operationId": "Validate",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"type": "object"
2020-03-23 15:56:02 +00:00
}
}
},
"tags": [
"AdminService"
]
}
}
},
"definitions": {
"protobufNullValue": {
"type": "string",
"enum": [
"NULL_VALUE"
],
"default": "NULL_VALUE",
"description": "`NullValue` is a singleton enumeration to represent the null value for the\n`Value` type union.\n\n The JSON representation for `NullValue` is JSON `null`.\n\n - NULL_VALUE: Null value."
},
"v1CreateOrgRequest": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"domain": {
"type": "string"
}
}
},
feat: org command sides (#96) * start org * refactor(eventstore): filter in sql for querier * feat(eventstore): Aggregate precondition preconditions are checked right before insert. Insert is still transaction save * feat(eventstore): check preconditions in repository * test(eventstore): test precondition in models * test(eventstore): precondition-tests * start org * refactor(eventstore): filter in sql for querier * feat(eventstore): Aggregate precondition preconditions are checked right before insert. Insert is still transaction save * feat(admin): start implement org * feat(eventstore): check preconditions in repository * fix(eventstore): data as NULL if empty refactor(eventstore): naming in sequence methods * feat(admin): org command side * feat(management): start org-repo * feat(org): member * fix: replace ObjectRoot.ID with ObjectRoot.AggregateID * aggregateID * add remove,change member * refactor(org): namings * refactor(eventstore): querier as type * fix(precondition): rename validation from precondition to validation * test(eventstore): isErr func instead of wantErr bool * fix(tests): Data * fix(eventstore): correct check for existing events in push, simplify insert statement * fix(eventstore): aggregate id public * test(org): eventsourcing * test(org): eventstore * test(org): deactivate, reactivate, orgbyid * test(org): getMemberByIDs * tests * running tests * add user repo to admin * thorw not found if no org found * eventstore tests done * lauft * validate if user is already member of org * modules * delete unused file * add member validation test * return error if unable to validat member * generate org id once, set resourceowner of org * Update internal/admin/repository/eventsourcing/eventstore/org.go * Update internal/admin/repository/eventsourcing/eventstore/org.go * Update internal/org/repository/eventsourcing/member_model.go * Update internal/org/repository/eventsourcing/org.go * Update internal/org/repository/eventsourcing/org.go * Update internal/org/repository/eventsourcing/org_member.go * Update internal/org/repository/eventsourcing/org_member.go * Update internal/org/repository/eventsourcing/org_model.go * Update internal/org/repository/eventsourcing/org.go * Update internal/org/repository/eventsourcing/org_model.go * Update internal/org/repository/eventsourcing/org_model.go * typo * correct user events * usercreate for setuporg instead of userregister * set data * mod * mod * tests * cleanup code * code styling * return member on add and change * change username in startup * girignore * orgID as parameter in re-/deactive org * startup config * migration for admin_api-user * probes fro admin * move unique org Co-authored-by: Fabiennne <fabienne.gerschwiler@gmail.com>
2020-05-13 12:22:29 +00:00
"v1CreateUserRequest": {
"type": "object",
"properties": {
"user_name": {
"type": "string"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"nick_name": {
"type": "string"
},
"preferred_language": {
"type": "string"
},
"gender": {
"$ref": "#/definitions/v1Gender"
},
"email": {
"type": "string"
},
"is_email_verified": {
"type": "boolean",
"format": "boolean"
},
"phone": {
"type": "string"
},
"is_phone_verified": {
"type": "boolean",
"format": "boolean"
},
"country": {
"type": "string"
},
"locality": {
"type": "string"
},
"postal_code": {
"type": "string"
},
"region": {
"type": "string"
},
"street_address": {
"type": "string"
},
"password": {
"type": "string"
}
}
},
2020-03-23 15:56:02 +00:00
"v1Gender": {
"type": "string",
"enum": [
"GENDER_UNSPECIFIED",
"GENDER_FEMALE",
"GENDER_MALE",
"GENDER_DIVERSE"
],
"default": "GENDER_UNSPECIFIED"
},
"v1Org": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"state": {
"$ref": "#/definitions/v1OrgState"
},
"creation_date": {
"type": "string",
"format": "date-time"
},
"change_date": {
"type": "string",
"format": "date-time"
},
"name": {
"type": "string"
},
"domain": {
"type": "string"
}
}
},
"v1OrgIamPolicy": {
"type": "object",
"properties": {
"org_id": {
"type": "string"
},
"description": {
"type": "string"
},
"user_login_must_be_domain": {
"type": "boolean",
"format": "boolean"
},
"default": {
"type": "boolean",
"format": "boolean"
},
"sequence": {
"type": "string",
"format": "uint64"
},
"creation_date": {
"type": "string",
"format": "date-time"
},
"change_date": {
"type": "string",
"format": "date-time"
}
}
},
"v1OrgIamPolicyRequest": {
"type": "object",
"properties": {
"org_id": {
"type": "string"
},
"description": {
"type": "string"
},
"user_login_must_be_domain": {
"type": "boolean",
"format": "boolean"
}
}
},
2020-03-23 15:56:02 +00:00
"v1OrgSearchKey": {
"type": "string",
"enum": [
"ORGSEARCHKEY_UNSPECIFIED",
"ORGSEARCHKEY_ORG_NAME",
"ORGSEARCHKEY_DOMAIN",
"ORGSEARCHKEY_STATE"
],
"default": "ORGSEARCHKEY_UNSPECIFIED"
},
"v1OrgSearchMethod": {
"type": "string",
"enum": [
"ORGSEARCHMETHOD_EQUALS",
"ORGSEARCHMETHOD_STARTS_WITH",
"ORGSEARCHMETHOD_CONTAINS"
],
"default": "ORGSEARCHMETHOD_EQUALS"
},
"v1OrgSearchQuery": {
"type": "object",
"properties": {
"key": {
"$ref": "#/definitions/v1OrgSearchKey"
},
"method": {
"$ref": "#/definitions/v1OrgSearchMethod"
},
"value": {
"type": "string"
}
}
},
"v1OrgSearchRequest": {
"type": "object",
"properties": {
"offset": {
"type": "string",
"format": "uint64"
},
"limit": {
"type": "string",
"format": "uint64"
},
"sorting_column": {
"$ref": "#/definitions/v1OrgSearchKey"
},
"asc": {
"type": "boolean",
"format": "boolean"
},
"queries": {
"type": "array",
"items": {
"$ref": "#/definitions/v1OrgSearchQuery"
}
}
}
},
"v1OrgSearchResponse": {
"type": "object",
"properties": {
"offset": {
"type": "string",
"format": "uint64"
},
"limit": {
"type": "string",
"format": "uint64"
},
"total_result": {
"type": "string",
"format": "uint64"
},
"result": {
"type": "array",
"items": {
"$ref": "#/definitions/v1Org"
}
}
}
},
"v1OrgSetUpRequest": {
"type": "object",
"properties": {
"org": {
"$ref": "#/definitions/v1CreateOrgRequest"
},
"user": {
feat: org command sides (#96) * start org * refactor(eventstore): filter in sql for querier * feat(eventstore): Aggregate precondition preconditions are checked right before insert. Insert is still transaction save * feat(eventstore): check preconditions in repository * test(eventstore): test precondition in models * test(eventstore): precondition-tests * start org * refactor(eventstore): filter in sql for querier * feat(eventstore): Aggregate precondition preconditions are checked right before insert. Insert is still transaction save * feat(admin): start implement org * feat(eventstore): check preconditions in repository * fix(eventstore): data as NULL if empty refactor(eventstore): naming in sequence methods * feat(admin): org command side * feat(management): start org-repo * feat(org): member * fix: replace ObjectRoot.ID with ObjectRoot.AggregateID * aggregateID * add remove,change member * refactor(org): namings * refactor(eventstore): querier as type * fix(precondition): rename validation from precondition to validation * test(eventstore): isErr func instead of wantErr bool * fix(tests): Data * fix(eventstore): correct check for existing events in push, simplify insert statement * fix(eventstore): aggregate id public * test(org): eventsourcing * test(org): eventstore * test(org): deactivate, reactivate, orgbyid * test(org): getMemberByIDs * tests * running tests * add user repo to admin * thorw not found if no org found * eventstore tests done * lauft * validate if user is already member of org * modules * delete unused file * add member validation test * return error if unable to validat member * generate org id once, set resourceowner of org * Update internal/admin/repository/eventsourcing/eventstore/org.go * Update internal/admin/repository/eventsourcing/eventstore/org.go * Update internal/org/repository/eventsourcing/member_model.go * Update internal/org/repository/eventsourcing/org.go * Update internal/org/repository/eventsourcing/org.go * Update internal/org/repository/eventsourcing/org_member.go * Update internal/org/repository/eventsourcing/org_member.go * Update internal/org/repository/eventsourcing/org_model.go * Update internal/org/repository/eventsourcing/org.go * Update internal/org/repository/eventsourcing/org_model.go * Update internal/org/repository/eventsourcing/org_model.go * typo * correct user events * usercreate for setuporg instead of userregister * set data * mod * mod * tests * cleanup code * code styling * return member on add and change * change username in startup * girignore * orgID as parameter in re-/deactive org * startup config * migration for admin_api-user * probes fro admin * move unique org Co-authored-by: Fabiennne <fabienne.gerschwiler@gmail.com>
2020-05-13 12:22:29 +00:00
"$ref": "#/definitions/v1CreateUserRequest"
2020-03-23 15:56:02 +00:00
}
}
},
"v1OrgSetUpResponse": {
"type": "object",
"properties": {
"org": {
"$ref": "#/definitions/v1Org"
},
"user": {
"$ref": "#/definitions/v1User"
}
}
},
"v1OrgState": {
"type": "string",
"enum": [
"ORGSTATE_UNSPECIFIED",
"ORGSTATE_ACTIVE",
"ORGSTATE_INACTIVE"
],
"default": "ORGSTATE_UNSPECIFIED"
},
"v1UniqueOrgResponse": {
"type": "object",
"properties": {
"is_unique": {
"type": "boolean",
"format": "boolean"
}
}
},
"v1User": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"state": {
"$ref": "#/definitions/v1UserState"
},
"creation_date": {
"type": "string",
"format": "date-time"
},
"change_date": {
"type": "string",
"format": "date-time"
},
"user_name": {
"type": "string"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"nick_name": {
"type": "string"
},
"display_name": {
"type": "string"
},
"preferred_language": {
"type": "string"
},
"gender": {
"$ref": "#/definitions/v1Gender"
},
"email": {
"type": "string"
},
"isEmailVerified": {
"type": "boolean",
"format": "boolean"
},
"phone": {
"type": "string"
},
"isPhoneVerified": {
"type": "boolean",
"format": "boolean"
},
"country": {
"type": "string"
},
"locality": {
"type": "string"
},
"postal_code": {
"type": "string"
},
"region": {
"type": "string"
},
"street_address": {
"type": "string"
feat: org command sides (#96) * start org * refactor(eventstore): filter in sql for querier * feat(eventstore): Aggregate precondition preconditions are checked right before insert. Insert is still transaction save * feat(eventstore): check preconditions in repository * test(eventstore): test precondition in models * test(eventstore): precondition-tests * start org * refactor(eventstore): filter in sql for querier * feat(eventstore): Aggregate precondition preconditions are checked right before insert. Insert is still transaction save * feat(admin): start implement org * feat(eventstore): check preconditions in repository * fix(eventstore): data as NULL if empty refactor(eventstore): naming in sequence methods * feat(admin): org command side * feat(management): start org-repo * feat(org): member * fix: replace ObjectRoot.ID with ObjectRoot.AggregateID * aggregateID * add remove,change member * refactor(org): namings * refactor(eventstore): querier as type * fix(precondition): rename validation from precondition to validation * test(eventstore): isErr func instead of wantErr bool * fix(tests): Data * fix(eventstore): correct check for existing events in push, simplify insert statement * fix(eventstore): aggregate id public * test(org): eventsourcing * test(org): eventstore * test(org): deactivate, reactivate, orgbyid * test(org): getMemberByIDs * tests * running tests * add user repo to admin * thorw not found if no org found * eventstore tests done * lauft * validate if user is already member of org * modules * delete unused file * add member validation test * return error if unable to validat member * generate org id once, set resourceowner of org * Update internal/admin/repository/eventsourcing/eventstore/org.go * Update internal/admin/repository/eventsourcing/eventstore/org.go * Update internal/org/repository/eventsourcing/member_model.go * Update internal/org/repository/eventsourcing/org.go * Update internal/org/repository/eventsourcing/org.go * Update internal/org/repository/eventsourcing/org_member.go * Update internal/org/repository/eventsourcing/org_member.go * Update internal/org/repository/eventsourcing/org_model.go * Update internal/org/repository/eventsourcing/org.go * Update internal/org/repository/eventsourcing/org_model.go * Update internal/org/repository/eventsourcing/org_model.go * typo * correct user events * usercreate for setuporg instead of userregister * set data * mod * mod * tests * cleanup code * code styling * return member on add and change * change username in startup * girignore * orgID as parameter in re-/deactive org * startup config * migration for admin_api-user * probes fro admin * move unique org Co-authored-by: Fabiennne <fabienne.gerschwiler@gmail.com>
2020-05-13 12:22:29 +00:00
},
"sequence": {
"type": "string",
"format": "uint64"
2020-03-23 15:56:02 +00:00
}
}
},
"v1UserState": {
"type": "string",
"enum": [
"USERSTATE_UNSPECIFIED",
"USERSTATE_ACTIVE",
"USERSTATE_INACTIVE",
"USERSTATE_DELETED",
"USERSTATE_LOCKED",
"USERSTATE_SUSPEND",
"USERSTATE_INITIAL"
],
"default": "USERSTATE_UNSPECIFIED"
}
}
}