1
0
mirror of https://github.com/bitwarden/docs synced 2025-12-11 05:43:19 +00:00

update spec and some styling

This commit is contained in:
Kyle Spearrin
2019-03-07 13:57:07 -05:00
parent a8d011ec43
commit 86cb2fbac2
2 changed files with 1144 additions and 1125 deletions

View File

@@ -2,6 +2,7 @@ html {
box-sizing: border-box; box-sizing: border-box;
overflow: -moz-scrollbars-vertical; overflow: -moz-scrollbars-vertical;
overflow-y: scroll; overflow-y: scroll;
font-size: 14px;
} }
*, *,
@@ -26,3 +27,14 @@ body {
.swagger-ui .topbar .topbar-wrapper .download-url-wrapper select { .swagger-ui .topbar .topbar-wrapper .download-url-wrapper select {
border: none; border: none;
} }
.swagger-ui .model,
.swagger-ui .model-title__text,
.swagger-ui .model-title,
.swagger-ui .opblock-description-wrapper,
.swagger-ui .opblock-external-docs-wrapper,
.swagger-ui .opblock-title_normal,
.swagger-ui table thead tr td,
.swagger-ui table thead tr th {
font-size: 14px;
}

View File

@@ -2,8 +2,15 @@
"swagger": "2.0", "swagger": "2.0",
"info": { "info": {
"version": "latest", "version": "latest",
"title": "Bitwarden Public API" "title": "Bitwarden Public API",
"description": "The Bitwarden public APIs.",
"contact": {
"name": "Bitwarden Support",
"url": "https://bitwarden.com",
"email": "support@bitwarden.com"
}
}, },
"host": "api.bitwarden.com",
"paths": { "paths": {
"/public/collections/{id}": { "/public/collections/{id}": {
"get": { "get": {
@@ -598,24 +605,24 @@
"CollectionResponseModel": { "CollectionResponseModel": {
"description": "A collection.", "description": "A collection.",
"required": [ "required": [
"Object", "object",
"Id" "id"
], ],
"type": "object", "type": "object",
"properties": { "properties": {
"Object": { "object": {
"description": "String representing the object's type. Objects of the same type share the same properties.", "description": "String representing the object's type. Objects of the same type share the same properties.",
"type": "string", "type": "string",
"readOnly": true, "readOnly": true,
"example": "collection" "example": "collection"
}, },
"Id": { "id": {
"format": "uuid", "format": "uuid",
"description": "The collection's unique identifier.", "description": "The collection's unique identifier.",
"type": "string", "type": "string",
"example": "539a36c5-e0d2-4cf9-979e-51ecf5cf6593" "example": "539a36c5-e0d2-4cf9-979e-51ecf5cf6593"
}, },
"Groups": { "groups": {
"description": "The associated groups that this collection is assigned to.", "description": "The associated groups that this collection is assigned to.",
"uniqueItems": false, "uniqueItems": false,
"type": "array", "type": "array",
@@ -627,18 +634,18 @@
}, },
"AssociationWithPermissionsResponseModel": { "AssociationWithPermissionsResponseModel": {
"required": [ "required": [
"Id", "id",
"ReadOnly" "readOnly"
], ],
"type": "object", "type": "object",
"properties": { "properties": {
"Id": { "id": {
"format": "uuid", "format": "uuid",
"description": "The associated object's unique identifier.", "description": "The associated object's unique identifier.",
"type": "string", "type": "string",
"example": "bfbc8338-e329-4dc0-b0c9-317c2ebf1a09" "example": "bfbc8338-e329-4dc0-b0c9-317c2ebf1a09"
}, },
"ReadOnly": { "readOnly": {
"description": "When true, the read only permission will not allow the user or group to make changes to items.", "description": "When true, the read only permission will not allow the user or group to make changes to items.",
"type": "boolean" "type": "boolean"
} }
@@ -647,7 +654,7 @@
"CollectionUpdateRequestModel": { "CollectionUpdateRequestModel": {
"type": "object", "type": "object",
"properties": { "properties": {
"Groups": { "groups": {
"description": "The associated groups that this collection is assigned to.", "description": "The associated groups that this collection is assigned to.",
"uniqueItems": false, "uniqueItems": false,
"type": "array", "type": "array",
@@ -659,18 +666,18 @@
}, },
"AssociationWithPermissionsRequestModel": { "AssociationWithPermissionsRequestModel": {
"required": [ "required": [
"Id", "id",
"ReadOnly" "readOnly"
], ],
"type": "object", "type": "object",
"properties": { "properties": {
"Id": { "id": {
"format": "uuid", "format": "uuid",
"description": "The associated object's unique identifier.", "description": "The associated object's unique identifier.",
"type": "string", "type": "string",
"example": "bfbc8338-e329-4dc0-b0c9-317c2ebf1a09" "example": "bfbc8338-e329-4dc0-b0c9-317c2ebf1a09"
}, },
"ReadOnly": { "readOnly": {
"description": "When true, the read only permission will not allow the user or group to make changes to items.", "description": "When true, the read only permission will not allow the user or group to make changes to items.",
"type": "boolean" "type": "boolean"
} }
@@ -678,23 +685,23 @@
}, },
"ErrorResponseModel": { "ErrorResponseModel": {
"required": [ "required": [
"Object", "object",
"Message" "message"
], ],
"type": "object", "type": "object",
"properties": { "properties": {
"Object": { "object": {
"description": "String representing the object's type. Objects of the same type share the same properties.", "description": "String representing the object's type. Objects of the same type share the same properties.",
"type": "string", "type": "string",
"readOnly": true, "readOnly": true,
"example": "error" "example": "error"
}, },
"Message": { "message": {
"description": "A human-readable message providing details about the error.", "description": "A human-readable message providing details about the error.",
"type": "string", "type": "string",
"example": "The request model is invalid." "example": "The request model is invalid."
}, },
"Errors": { "errors": {
"description": "If multiple errors occurred, they are listed in dictionary. Errors related to a specific\r\nrequest parameter will include a dictionary key describing that parameter.", "description": "If multiple errors occurred, they are listed in dictionary. Errors related to a specific\r\nrequest parameter will include a dictionary key describing that parameter.",
"type": "object", "type": "object",
"additionalProperties": { "additionalProperties": {
@@ -709,18 +716,18 @@
}, },
"ListResponseModel[CollectionResponseModel]": { "ListResponseModel[CollectionResponseModel]": {
"required": [ "required": [
"Object", "object",
"Data" "data"
], ],
"type": "object", "type": "object",
"properties": { "properties": {
"Object": { "object": {
"description": "String representing the object's type. Objects of the same type share the same properties.", "description": "String representing the object's type. Objects of the same type share the same properties.",
"type": "string", "type": "string",
"readOnly": true, "readOnly": true,
"example": "list" "example": "list"
}, },
"Data": { "data": {
"description": "An array containing the actual response elements, paginated by any request parameters.", "description": "An array containing the actual response elements, paginated by any request parameters.",
"uniqueItems": false, "uniqueItems": false,
"type": "array", "type": "array",
@@ -728,7 +735,7 @@
"$ref": "#/definitions/CollectionResponseModel" "$ref": "#/definitions/CollectionResponseModel"
} }
}, },
"ContinuationToken": { "continuationToken": {
"description": "A cursor for use in pagination.", "description": "A cursor for use in pagination.",
"type": "string" "type": "string"
} }
@@ -736,18 +743,18 @@
}, },
"ListResponseModel[EventResponseModel]": { "ListResponseModel[EventResponseModel]": {
"required": [ "required": [
"Object", "object",
"Data" "data"
], ],
"type": "object", "type": "object",
"properties": { "properties": {
"Object": { "object": {
"description": "String representing the object's type. Objects of the same type share the same properties.", "description": "String representing the object's type. Objects of the same type share the same properties.",
"type": "string", "type": "string",
"readOnly": true, "readOnly": true,
"example": "list" "example": "list"
}, },
"Data": { "data": {
"description": "An array containing the actual response elements, paginated by any request parameters.", "description": "An array containing the actual response elements, paginated by any request parameters.",
"uniqueItems": false, "uniqueItems": false,
"type": "array", "type": "array",
@@ -755,7 +762,7 @@
"$ref": "#/definitions/EventResponseModel" "$ref": "#/definitions/EventResponseModel"
} }
}, },
"ContinuationToken": { "continuationToken": {
"description": "A cursor for use in pagination.", "description": "A cursor for use in pagination.",
"type": "string" "type": "string"
} }
@@ -764,19 +771,19 @@
"EventResponseModel": { "EventResponseModel": {
"description": "An event log.", "description": "An event log.",
"required": [ "required": [
"Object", "object",
"Type", "type",
"Date" "date"
], ],
"type": "object", "type": "object",
"properties": { "properties": {
"Object": { "object": {
"description": "String representing the object's type. Objects of the same type share the same properties.", "description": "String representing the object's type. Objects of the same type share the same properties.",
"type": "string", "type": "string",
"readOnly": true, "readOnly": true,
"example": "event" "example": "event"
}, },
"Type": { "type": {
"format": "int32", "format": "int32",
"description": "The type of event.", "description": "The type of event.",
"enum": [ "enum": [
@@ -810,42 +817,42 @@
], ],
"type": "integer" "type": "integer"
}, },
"ItemId": { "itemId": {
"format": "uuid", "format": "uuid",
"description": "The unique identifier of the related item that the event describes.", "description": "The unique identifier of the related item that the event describes.",
"type": "string", "type": "string",
"example": "3767a302-8208-4dc6-b842-030428a1cfad" "example": "3767a302-8208-4dc6-b842-030428a1cfad"
}, },
"CollectionId": { "collectionId": {
"format": "uuid", "format": "uuid",
"description": "The unique identifier of the related collection that the event describes.", "description": "The unique identifier of the related collection that the event describes.",
"type": "string", "type": "string",
"example": "bce212a4-25f3-4888-8a0a-4c5736d851e0" "example": "bce212a4-25f3-4888-8a0a-4c5736d851e0"
}, },
"GroupId": { "groupId": {
"format": "uuid", "format": "uuid",
"description": "The unique identifier of the related group that the event describes.", "description": "The unique identifier of the related group that the event describes.",
"type": "string", "type": "string",
"example": "f29a2515-91d2-4452-b49b-5e8040e6b0f4" "example": "f29a2515-91d2-4452-b49b-5e8040e6b0f4"
}, },
"MemberId": { "memberId": {
"format": "uuid", "format": "uuid",
"description": "The unique identifier of the related member that the event describes.", "description": "The unique identifier of the related member that the event describes.",
"type": "string", "type": "string",
"example": "e68b8629-85eb-4929-92c0-b84464976ba4" "example": "e68b8629-85eb-4929-92c0-b84464976ba4"
}, },
"ActingUserId": { "actingUserId": {
"format": "uuid", "format": "uuid",
"description": "The unique identifier of the user that performed the event.", "description": "The unique identifier of the user that performed the event.",
"type": "string", "type": "string",
"example": "a2549f79-a71f-4eb9-9234-eb7247333f94" "example": "a2549f79-a71f-4eb9-9234-eb7247333f94"
}, },
"Date": { "date": {
"format": "date-time", "format": "date-time",
"description": "The date/timestamp when the event occurred.", "description": "The date/timestamp when the event occurred.",
"type": "string" "type": "string"
}, },
"Device": { "device": {
"format": "int32", "format": "int32",
"description": "The type of device used by the acting user when the event occurred.", "description": "The type of device used by the acting user when the event occurred.",
"enum": [ "enum": [
@@ -873,7 +880,7 @@
], ],
"type": "integer" "type": "integer"
}, },
"IpAddress": { "ipAddress": {
"description": "The IP address of the acting user.", "description": "The IP address of the acting user.",
"type": "string", "type": "string",
"example": "172.16.254.1" "example": "172.16.254.1"
@@ -883,26 +890,26 @@
"GroupResponseModel": { "GroupResponseModel": {
"description": "A user group.", "description": "A user group.",
"required": [ "required": [
"Object", "object",
"Id", "id",
"Name", "name",
"AccessAll" "accessAll"
], ],
"type": "object", "type": "object",
"properties": { "properties": {
"Object": { "object": {
"description": "String representing the object's type. Objects of the same type share the same properties.", "description": "String representing the object's type. Objects of the same type share the same properties.",
"type": "string", "type": "string",
"readOnly": true, "readOnly": true,
"example": "group" "example": "group"
}, },
"Id": { "id": {
"format": "uuid", "format": "uuid",
"description": "The group's unique identifier.", "description": "The group's unique identifier.",
"type": "string", "type": "string",
"example": "539a36c5-e0d2-4cf9-979e-51ecf5cf6593" "example": "539a36c5-e0d2-4cf9-979e-51ecf5cf6593"
}, },
"Collections": { "collections": {
"description": "The associated collections that this group can access.", "description": "The associated collections that this group can access.",
"uniqueItems": false, "uniqueItems": false,
"type": "array", "type": "array",
@@ -910,18 +917,18 @@
"$ref": "#/definitions/AssociationWithPermissionsResponseModel" "$ref": "#/definitions/AssociationWithPermissionsResponseModel"
} }
}, },
"Name": { "name": {
"description": "The name of the group.", "description": "The name of the group.",
"maxLength": 100, "maxLength": 100,
"minLength": 0, "minLength": 0,
"type": "string", "type": "string",
"example": "Development Team" "example": "Development Team"
}, },
"AccessAll": { "accessAll": {
"description": "Determines if this group can access all collections within the organization, or only the associated\r\ncollections. If set to {true}, this option overrides any collection assignments.", "description": "Determines if this group can access all collections within the organization, or only the associated\r\ncollections. If set to {true}, this option overrides any collection assignments.",
"type": "boolean" "type": "boolean"
}, },
"ExternalId": { "externalId": {
"description": "External identifier linking this group to another system, such as a user directory.", "description": "External identifier linking this group to another system, such as a user directory.",
"maxLength": 300, "maxLength": 300,
"minLength": 0, "minLength": 0,
@@ -932,12 +939,12 @@
}, },
"GroupCreateUpdateRequestModel": { "GroupCreateUpdateRequestModel": {
"required": [ "required": [
"Name", "name",
"AccessAll" "accessAll"
], ],
"type": "object", "type": "object",
"properties": { "properties": {
"Collections": { "collections": {
"description": "The associated collections that this group can access.", "description": "The associated collections that this group can access.",
"uniqueItems": false, "uniqueItems": false,
"type": "array", "type": "array",
@@ -945,18 +952,18 @@
"$ref": "#/definitions/AssociationWithPermissionsRequestModel" "$ref": "#/definitions/AssociationWithPermissionsRequestModel"
} }
}, },
"Name": { "name": {
"description": "The name of the group.", "description": "The name of the group.",
"maxLength": 100, "maxLength": 100,
"minLength": 0, "minLength": 0,
"type": "string", "type": "string",
"example": "Development Team" "example": "Development Team"
}, },
"AccessAll": { "accessAll": {
"description": "Determines if this group can access all collections within the organization, or only the associated\r\ncollections. If set to {true}, this option overrides any collection assignments.", "description": "Determines if this group can access all collections within the organization, or only the associated\r\ncollections. If set to {true}, this option overrides any collection assignments.",
"type": "boolean" "type": "boolean"
}, },
"ExternalId": { "externalId": {
"description": "External identifier linking this group to another system, such as a user directory.", "description": "External identifier linking this group to another system, such as a user directory.",
"maxLength": 300, "maxLength": 300,
"minLength": 0, "minLength": 0,
@@ -967,18 +974,18 @@
}, },
"ListResponseModel[GroupResponseModel]": { "ListResponseModel[GroupResponseModel]": {
"required": [ "required": [
"Object", "object",
"Data" "data"
], ],
"type": "object", "type": "object",
"properties": { "properties": {
"Object": { "object": {
"description": "String representing the object's type. Objects of the same type share the same properties.", "description": "String representing the object's type. Objects of the same type share the same properties.",
"type": "string", "type": "string",
"readOnly": true, "readOnly": true,
"example": "list" "example": "list"
}, },
"Data": { "data": {
"description": "An array containing the actual response elements, paginated by any request parameters.", "description": "An array containing the actual response elements, paginated by any request parameters.",
"uniqueItems": false, "uniqueItems": false,
"type": "array", "type": "array",
@@ -986,7 +993,7 @@
"$ref": "#/definitions/GroupResponseModel" "$ref": "#/definitions/GroupResponseModel"
} }
}, },
"ContinuationToken": { "continuationToken": {
"description": "A cursor for use in pagination.", "description": "A cursor for use in pagination.",
"type": "string" "type": "string"
} }
@@ -995,43 +1002,43 @@
"MemberResponseModel": { "MemberResponseModel": {
"description": "An organization member.", "description": "An organization member.",
"required": [ "required": [
"Object", "object",
"Id", "id",
"Email", "email",
"TwoFactorEnabled", "twoFactorEnabled",
"Status", "status",
"Type", "type",
"AccessAll" "accessAll"
], ],
"type": "object", "type": "object",
"properties": { "properties": {
"Object": { "object": {
"description": "String representing the object's type. Objects of the same type share the same properties.", "description": "String representing the object's type. Objects of the same type share the same properties.",
"type": "string", "type": "string",
"readOnly": true, "readOnly": true,
"example": "member" "example": "member"
}, },
"Id": { "id": {
"format": "uuid", "format": "uuid",
"description": "The member's unique identifier.", "description": "The member's unique identifier.",
"type": "string", "type": "string",
"example": "539a36c5-e0d2-4cf9-979e-51ecf5cf6593" "example": "539a36c5-e0d2-4cf9-979e-51ecf5cf6593"
}, },
"Name": { "name": {
"description": "The member's name, set from their user account profile.", "description": "The member's name, set from their user account profile.",
"type": "string", "type": "string",
"example": "John Smith" "example": "John Smith"
}, },
"Email": { "email": {
"description": "The member's email address.", "description": "The member's email address.",
"type": "string", "type": "string",
"example": "jsmith@company.com" "example": "jsmith@company.com"
}, },
"TwoFactorEnabled": { "twoFactorEnabled": {
"description": "Returns {true} if the member has a two-step login method enabled on their user account.", "description": "Returns {true} if the member has a two-step login method enabled on their user account.",
"type": "boolean" "type": "boolean"
}, },
"Status": { "status": {
"format": "int32", "format": "int32",
"description": "The member's status within the organization. All created members start with a status of \"Invited\".\r\nOnce a member accept's their invitation to join the organization, their status changes to \"Accepted\".\r\nAccepted members are then \"Confirmed\" by an organization administrator. Once a member is \"Confirmed\",\r\ntheir status can no longer change.", "description": "The member's status within the organization. All created members start with a status of \"Invited\".\r\nOnce a member accept's their invitation to join the organization, their status changes to \"Accepted\".\r\nAccepted members are then \"Confirmed\" by an organization administrator. Once a member is \"Confirmed\",\r\ntheir status can no longer change.",
"enum": [ "enum": [
@@ -1041,7 +1048,7 @@
], ],
"type": "integer" "type": "integer"
}, },
"Collections": { "collections": {
"description": "The associated collections that this member can access.", "description": "The associated collections that this member can access.",
"uniqueItems": false, "uniqueItems": false,
"type": "array", "type": "array",
@@ -1049,7 +1056,7 @@
"$ref": "#/definitions/AssociationWithPermissionsResponseModel" "$ref": "#/definitions/AssociationWithPermissionsResponseModel"
} }
}, },
"Type": { "type": {
"format": "int32", "format": "int32",
"description": "The member's type (or role) within the organization.", "description": "The member's type (or role) within the organization.",
"enum": [ "enum": [
@@ -1060,11 +1067,11 @@
], ],
"type": "integer" "type": "integer"
}, },
"AccessAll": { "accessAll": {
"description": "Determines if this member can access all collections within the organization, or only the associated\r\ncollections. If set to {true}, this option overrides any collection assignments.", "description": "Determines if this member can access all collections within the organization, or only the associated\r\ncollections. If set to {true}, this option overrides any collection assignments.",
"type": "boolean" "type": "boolean"
}, },
"ExternalId": { "externalId": {
"description": "External identifier linking this member to another system, such as a user directory.", "description": "External identifier linking this member to another system, such as a user directory.",
"maxLength": 300, "maxLength": 300,
"minLength": 0, "minLength": 0,
@@ -1075,12 +1082,12 @@
}, },
"MemberUpdateRequestModel": { "MemberUpdateRequestModel": {
"required": [ "required": [
"Type", "type",
"AccessAll" "accessAll"
], ],
"type": "object", "type": "object",
"properties": { "properties": {
"Collections": { "collections": {
"description": "The associated collections that this member can access.", "description": "The associated collections that this member can access.",
"uniqueItems": false, "uniqueItems": false,
"type": "array", "type": "array",
@@ -1088,7 +1095,7 @@
"$ref": "#/definitions/AssociationWithPermissionsRequestModel" "$ref": "#/definitions/AssociationWithPermissionsRequestModel"
} }
}, },
"Type": { "type": {
"format": "int32", "format": "int32",
"description": "The member's type (or role) within the organization.", "description": "The member's type (or role) within the organization.",
"enum": [ "enum": [
@@ -1099,11 +1106,11 @@
], ],
"type": "integer" "type": "integer"
}, },
"AccessAll": { "accessAll": {
"description": "Determines if this member can access all collections within the organization, or only the associated\r\ncollections. If set to {true}, this option overrides any collection assignments.", "description": "Determines if this member can access all collections within the organization, or only the associated\r\ncollections. If set to {true}, this option overrides any collection assignments.",
"type": "boolean" "type": "boolean"
}, },
"ExternalId": { "externalId": {
"description": "External identifier linking this member to another system, such as a user directory.", "description": "External identifier linking this member to another system, such as a user directory.",
"maxLength": 300, "maxLength": 300,
"minLength": 0, "minLength": 0,
@@ -1114,18 +1121,18 @@
}, },
"ListResponseModel[MemberResponseModel]": { "ListResponseModel[MemberResponseModel]": {
"required": [ "required": [
"Object", "object",
"Data" "data"
], ],
"type": "object", "type": "object",
"properties": { "properties": {
"Object": { "object": {
"description": "String representing the object's type. Objects of the same type share the same properties.", "description": "String representing the object's type. Objects of the same type share the same properties.",
"type": "string", "type": "string",
"readOnly": true, "readOnly": true,
"example": "list" "example": "list"
}, },
"Data": { "data": {
"description": "An array containing the actual response elements, paginated by any request parameters.", "description": "An array containing the actual response elements, paginated by any request parameters.",
"uniqueItems": false, "uniqueItems": false,
"type": "array", "type": "array",
@@ -1133,7 +1140,7 @@
"$ref": "#/definitions/MemberResponseModel" "$ref": "#/definitions/MemberResponseModel"
} }
}, },
"ContinuationToken": { "continuationToken": {
"description": "A cursor for use in pagination.", "description": "A cursor for use in pagination.",
"type": "string" "type": "string"
} }
@@ -1141,18 +1148,18 @@
}, },
"MemberCreateRequestModel": { "MemberCreateRequestModel": {
"required": [ "required": [
"Email", "email",
"Type", "type",
"AccessAll" "accessAll"
], ],
"type": "object", "type": "object",
"properties": { "properties": {
"Email": { "email": {
"description": "The member's email address.", "description": "The member's email address.",
"type": "string", "type": "string",
"example": "jsmith@company.com" "example": "jsmith@company.com"
}, },
"Collections": { "collections": {
"description": "The associated collections that this member can access.", "description": "The associated collections that this member can access.",
"uniqueItems": false, "uniqueItems": false,
"type": "array", "type": "array",
@@ -1160,7 +1167,7 @@
"$ref": "#/definitions/AssociationWithPermissionsRequestModel" "$ref": "#/definitions/AssociationWithPermissionsRequestModel"
} }
}, },
"Type": { "type": {
"format": "int32", "format": "int32",
"description": "The member's type (or role) within the organization.", "description": "The member's type (or role) within the organization.",
"enum": [ "enum": [
@@ -1171,11 +1178,11 @@
], ],
"type": "integer" "type": "integer"
}, },
"AccessAll": { "accessAll": {
"description": "Determines if this member can access all collections within the organization, or only the associated\r\ncollections. If set to {true}, this option overrides any collection assignments.", "description": "Determines if this member can access all collections within the organization, or only the associated\r\ncollections. If set to {true}, this option overrides any collection assignments.",
"type": "boolean" "type": "boolean"
}, },
"ExternalId": { "externalId": {
"description": "External identifier linking this member to another system, such as a user directory.", "description": "External identifier linking this member to another system, such as a user directory.",
"maxLength": 300, "maxLength": 300,
"minLength": 0, "minLength": 0,