{ "name": "apibuilder api", "description": "Host API documentation for applications providing REST APIs, facilitating the design of good resource first APIs.", "base_url": "https://api.apibuilder.io", "info": { "contact": { "name": "Michael Bryzek", "email": "mbryzek@alum.mit.edu", "url": "http://twitter.com/mbryzek" }, "license": { "name": "MIT", "url": "http://opensource.org/licenses/MIT" } }, "unions": { "diff": { "interfaces": ["diff"], "description": "Represents a single diff in an application", "discriminator": "type", "types": [ { "type": "diff_breaking" }, { "type": "diff_non_breaking" } ] }, "item_detail": { "description": "Identifies the specific type of item that was indexed by search", "discriminator": "type", "types": [ { "type": "application_summary", "description": "Represents that the item indexed was an application" } ] } }, "imports": [ { "uri": "https://app.apibuilder.io/apicollective/apibuilder-spec/latest/service.json" }, { "uri": "https://app.apibuilder.io/apicollective/apibuilder-common/latest/service.json" }, { "uri": "https://app.apibuilder.io/apicollective/apibuilder-generator/latest/service.json" } ], "interfaces": { "diff": { "description": "Represents a single breaking diff of an application version. A breaking diff indicates that it is possible for an existing client to now experience an error or invalid data due to the diff.", "fields": [ { "name": "description", "type": "string", "example": "model removed: user" }, { "name": "is_material", "type": "boolean", "example": "True if this is a material change (eg something important). False otherwise. This is used to drive the publication 'versions.material_change'" } ] } }, "enums": { "visibility": { "description": "Controls who is able to view this version", "values": [ { "name": "user", "description": "Only the creator can view this application" }, { "name": "organization", "description": "Any member of the organization can view this application" }, { "name": "public", "description": "Anybody, including non logged in users, can view this application" } ] }, "publication": { "description": "A publication represents something that a user can subscribe to. An example would be subscribing to an email alert whenever a new version of an application is created.", "values": [ { "name": "membership_requests.create", "description": "For organizations for which I am an administrator, email me whenever a user applies to join the org." }, { "name": "memberships.create", "description": "For organizations for which I am a member, email me whenever a user joins the org." }, { "name": "applications.create", "description": "For organizations for which I am a member, email me whenever an application is created." }, { "name": "versions.create", "description": "For applications that I watch, email me whenever a version is created." }, { "name": "versions.material_change", "description": "For applications that I watch, email me whenever there is a material change. Generally, this means avoiding email for simple changes (like only a version change)." } ] }, "original_type": { "values": [ { "name": "api_json", "description": "The original is in the api.json format" }, { "name": "avro_idl", "description": "The original is in Avro Idl format" }, { "name": "service_json", "description": "This is the canonical service spec for apibuilder itself. See https://www.apibuilder.io/apicollective/apibuilder-spec/latest#model-service" }, { "name": "swagger", "description": "The original in the Swagger JSON or YAML format" } ] }, "app_sort_by": { "values": [ { "name": "name" }, { "name": "created_at" }, { "name": "updated_at" }, { "name": "visibility" } ] }, "sort_order": { "values": [ { "name": "asc" }, { "name": "desc" } ] } }, "models": { "validation": { "description": "Used only to validate json files - used as a resource where http status code defines success", "fields": [ { "name": "valid", "type": "boolean", "description": "If true, the json schema is valid. If false, there is at least one validation error." }, { "name": "errors", "type": "[string]", "default": "[]", "description": "Contains any validation errors that result from parsing the json document. If empty, the document is valid." } ] }, "attribute": { "description": "Attributes are globally unique key which allow users to specify additional content to pass in to the code generators.", "fields": [ { "name": "guid", "type": "uuid", "description": "Internal unique identifier for this attribute." }, { "name": "name", "type": "string", "description": "The name of the attribute. Globally unique and an 'identifier' (lower case, url safe, etc.)" }, { "name": "description", "type": "string", "description": "Optional description - a good description here will indicate which code generators it applies to and what effect it will have on those code generators.", "required": false }, { "name": "audit", "type": "io.apibuilder.common.v0.models.audit" } ] }, "attribute_form": { "fields": [ { "name": "name", "type": "string" }, { "name": "description", "type": "string", "required": false } ] }, "attribute_summary": { "fields": [ { "name": "guid", "type": "uuid", "description": "Internal unique identifier for this attribute." }, { "name": "name", "type": "string", "description": "The name of the attribute. Globally unique and an 'identifier' (lower case, url safe, etc.)" } ] }, "attribute_value": { "description": "Attribute values can be set at different levels. Initially we support setting organization wide attributes, but in the future plan to support setting attribute values with each version of the application.", "fields": [ { "name": "guid", "type": "uuid", "description": "Internal unique identifier for this attribute value." }, { "name": "attribute", "type": "attribute_summary" }, { "name": "value", "type": "string" }, { "name": "audit", "type": "io.apibuilder.common.v0.models.audit" } ] }, "attribute_value_form": { "fields": [ { "name": "value", "type": "string" } ] }, "user": { "description": "A user is a top level person interacting with the api doc server.", "fields": [ { "name": "guid", "type": "uuid", "description": "Internal unique identifier for this user." }, { "name": "email", "type": "string" }, { "name": "nickname", "type": "string", "description": "Public unique identifier for this user." }, { "name": "name", "type": "string", "required": false }, { "name": "audit", "type": "io.apibuilder.common.v0.models.audit" } ] }, "session": { "description": "Represents a user sessions (e.g. user logged into site)", "fields": [ { "name": "id", "type": "string", "description": "Cryptographically secure session id" }, { "name": "expires_at", "type": "date-time-iso8601" } ] }, "authentication": { "description": "Represents the result of a successful authorization", "fields": [ { "name": "user", "type": "user" }, { "name": "session", "type": "session" } ] }, "user_summary": { "description": "Summary of a user sufficient for display", "fields": [ { "name": "guid", "type": "uuid" }, { "name": "nickname", "type": "string" } ] }, "user_form": { "fields": [ { "name": "email", "type": "string" }, { "name": "password", "type": "string" }, { "name": "nickname", "type": "string", "required": false, "description": "Defaults to a unique identifier based on email address" }, { "name": "name", "type": "string", "required": false } ] }, "user_update_form": { "fields": [ { "name": "email", "type": "string" }, { "name": "nickname", "type": "string" }, { "name": "name", "type": "string", "required": false } ] }, "token": { "description": "A token gives a user access to the API.", "fields": [ { "name": "guid", "type": "uuid", "description": "Internal unique identifier for this token." }, { "name": "user", "type": "user", "description": "The user to which this token belongs." }, { "name": "masked_token", "type": "string", "description": "The masked from of the token." }, { "name": "description", "type": "string", "description": "optional description to help the user manage the token.", "required": false }, { "name": "audit", "type": "io.apibuilder.common.v0.models.audit" } ] }, "cleartext_token": { "description": "Separate resource used only for the few actions that require the full token.", "fields": [ { "name": "token", "type": "string", "description": "The actual token. Guaranteed to be globally unique." } ] }, "token_form": { "fields": [ { "name": "user_guid", "type": "uuid", "description": "The user for which we are creating the token." }, { "name": "description", "type": "string", "required": false } ] }, "organization": { "description": "An organization is used to group a set of applications together.", "fields": [ { "name": "guid", "type": "uuid", "description": "Internal unique identifier for this organization." }, { "name": "key", "type": "string", "description": "Used as a unique key in the URL path. Key is automatically derived from the organization name." }, { "name": "name", "type": "string", "description": "The name of this organization." }, { "name": "namespace", "type": "string", "description": "Global namespace for this organization.", "example": "io.apicollective" }, { "name": "visibility", "type": "visibility" }, { "name": "domains", "type": "[domain]", "default": "[]" }, { "name": "audit", "type": "io.apibuilder.common.v0.models.audit" } ] }, "organization_form": { "fields": [ { "name": "name", "type": "string" }, { "name": "key", "type": "string", "required": false, "description": "Defaults to a url friendy version of the name" }, { "name": "namespace", "type": "string", "description": "Global namespace for this organization.", "example": "io.apicollective" }, { "name": "visibility", "type": "visibility", "description": "Public organizations will be listed in apibuilder directory. Organizations with visibility organization will only be visible to members of that org.", "default": "organization" }, { "name": "domains", "type": "[string]", "required": false, "example": "apibuilder.io" } ] }, "domain": { "description": "Represents a single domain name (e.g. www.apibuilder.io). When a new user registers and confirms their email, we automatically associate that user with a member of the organization associated with their domain. For example, if you confirm your account with an email address of example@somedomain.com, we will automatically create a membership request on your behalf to join the organization with domain somedomain.com.", "fields": [ { "name": "name", "type": "string", "description": "The domain name", "example": "www.apibuilder.io" } ] }, "membership": { "description": "A membership represents a user in a specific role to an organization. Memberships cannot be created directly. Instead you first create a membership request, then that request is either accepted or declined.", "fields": [ { "name": "guid", "type": "uuid", "description": "Internal unique identifier for this membership." }, { "name": "user", "type": "user" }, { "name": "organization", "type": "organization" }, { "name": "role", "type": "io.apibuilder.common.v0.enums.membership_role", "description": "The role this user plays for this organization. Typically member or admin.", "example": "member" }, { "name": "audit", "type": "io.apibuilder.common.v0.models.audit" } ] }, "membership_request": { "description": "A membership request represents a user requesting to join an organization with a specific role (e.g. as a member or an admin). Membership requests can be reviewed by any current admin of the organization who can either accept or decline the request.", "fields": [ { "name": "guid", "type": "uuid", "description": "Internal unique identifier for this membership request." }, { "name": "user", "type": "user" }, { "name": "organization", "type": "organization" }, { "name": "role", "type": "io.apibuilder.common.v0.enums.membership_role", "description": "The requested role for membership to this organization. Typically member or admin.", "example": "member" }, { "name": "audit", "type": "io.apibuilder.common.v0.models.audit" } ] }, "application": { "description": "An application has a name and multiple versions of its API.", "fields": [ { "name": "guid", "type": "uuid", "description": "Internal unique identifier for this application." }, { "name": "organization", "type": "io.apibuilder.common.v0.models.reference" }, { "name": "name", "type": "string", "description": "The unique name for this application." }, { "name": "key", "type": "string", "description": "Used as a unique key in the URL path. Key is automatically derived from the application name." }, { "name": "visibility", "type": "visibility", "description": "Controls who is able to view this application" }, { "name": "description", "type": "string", "required": false }, { "name": "last_updated_at", "type": "date-time-iso8601", "description": "The updated_at of this application or created_at of it's latest version" }, { "name": "audit", "type": "io.apibuilder.common.v0.models.audit" } ] }, "application_form": { "fields": [ { "name": "name", "type": "string" }, { "name": "key", "type": "string", "required": false, "description": "Defaults to a key generated from the application name" }, { "name": "description", "type": "string", "required": false }, { "name": "visibility", "type": "visibility" } ] }, "application_summary": { "description": "Summary of an application sufficient for display and links", "fields": [ { "name": "guid", "type": "uuid" }, { "name": "organization", "type": "io.apibuilder.common.v0.models.reference" }, { "name": "key", "type": "string" } ] }, "original": { "description": "Represents the original input used to create an application version", "fields": [ { "name": "type", "type": "original_type" }, { "name": "data", "type": "string" } ] }, "original_form": { "fields": [ { "name": "type", "type": "original_type", "required": false, "description": "If not specified, we set the type by inspecting the data" }, { "name": "data", "type": "string" } ] }, "version": { "description": "Represents a unique version of the application.", "fields": [ { "name": "guid", "type": "uuid", "description": "Internal unique identifier for this version." }, { "name": "organization", "type": "io.apibuilder.common.v0.models.reference" }, { "name": "application", "type": "io.apibuilder.common.v0.models.reference" }, { "name": "version", "type": "string", "description": "The tag for this version. Can be anything, but if semver style version number is used, we automatically correctly sort by version number to find latest. Otherwise latest version is considered to be the most recently created.", "example": "1.0.0" }, { "name": "original", "type": "original", "required": false, "description": "The original uploaded file describing this version, if available" }, { "name": "service", "type": "io.apibuilder.spec.v0.models.service", "description": "spec/spec.json description of this API" }, { "name": "audit", "type": "io.apibuilder.common.v0.models.audit" } ] }, "version_form": { "fields": [ { "name": "original_form", "type": "original_form" }, { "name": "visibility", "type": "visibility", "required": false, "description": "If provided, updates the visibility for all versions of this application" } ] }, "code": { "description": "Generated source code.", "plural": "code", "fields": [ { "name": "generator", "type": "generator_with_service" }, { "name": "source", "type": "string", "description": "The actual source code.", "deprecation": { "description": "Use files instead" } }, { "name": "files", "type": "[io.apibuilder.generator.v0.models.file]", "description": "A collection of source files", "default": "[]" } ] }, "code_form": { "fields": [ { "name": "attributes", "type": "[io.apibuilder.generator.v0.models.attribute]" } ] }, "subscription": { "description": "Represents a user that is currently subscribed to a publication", "fields": [ { "name": "guid", "type": "uuid", "description": "Internal unique identifier for this subscription record" }, { "name": "organization", "type": "organization" }, { "name": "user", "type": "user" }, { "name": "publication", "type": "publication" }, { "name": "audit", "type": "io.apibuilder.common.v0.models.audit" } ] }, "subscription_form": { "fields": [ { "name": "organization_key", "type": "string" }, { "name": "user_guid", "type": "uuid" }, { "name": "publication", "type": "publication" } ] }, "watch": { "description": "Users can watch individual applications which enables features like receiving an email notification when there is a new version of an application.", "fields": [ { "name": "guid", "type": "uuid", "description": "Internal unique identifier for this watch" }, { "name": "user", "type": "user" }, { "name": "organization", "type": "organization" }, { "name": "application", "type": "application" }, { "name": "audit", "type": "io.apibuilder.common.v0.models.audit" } ] }, "watch_form": { "fields": [ { "name": "user_guid", "type": "uuid" }, { "name": "organization_key", "type": "string" }, { "name": "application_key", "type": "string" } ] }, "email_verification_confirmation_form": { "description": "Data used to confirm an email address. The token is an internal unique identifier used to lookup the specific email address and user account for which we sent an email verification email.", "fields": [ { "name": "token", "type": "string" } ] }, "password_reset_request": { "description": "Create a password reset request - e.g. an email containing a one time URL to change a password", "fields": [ { "name": "email", "type": "string", "description": "The email address for which we generate the password reset." } ] }, "password_reset": { "description": "Allows a user to change their password with authentication from a token.", "fields": [ { "name": "token", "type": "string", "description": "Unique one time use token to change a password" }, { "name": "password", "type": "string" } ] }, "error": { "fields": [ { "name": "code", "type": "string", "description": "Machine readable code for this specific error message" }, { "name": "message", "type": "string", "description": "Description of the error" } ] }, "diff_breaking": { "description": "Represents a single breaking diff of an application version. A breaking diff indicates that it is possible for an existing client to now experience an error or invalid data due to the diff.", "fields": [ { "name": "description", "type": "string", "example": "model removed: user" }, { "name": "is_material", "type": "boolean", "example": "True if this is a material change (eg something important). False otherwise. This is used to drive the publication 'versions.material_change'" } ] }, "diff_non_breaking": { "description": "Represents a single NON breaking diff of an application version.", "fields": [ { "name": "description", "type": "string", "example": "model: user optional field 'name' added" }, { "name": "is_material", "type": "boolean", "example": "True if this is a material change (eg something important). False otherwise. This is used to drive the publication 'versions.material_change'" } ] }, "item": { "description": "When searching for content, the results of the search will be a list of items. Each item will have enough information to render for the user, including a type and item_guid to enable creating the appropriate link.", "fields": [ { "name": "guid", "type": "uuid", "description": "Unique identifer for this item. By using a UUID, you can combine with the type to figure out the URI for the resource" }, { "name": "detail", "type": "item_detail" }, { "name": "label", "type": "string" }, { "name": "description", "type": "string", "required": false } ] }, "change": { "description": "Represents a single change from one version of a service to another", "fields": [ { "name": "guid", "type": "uuid" }, { "name": "organization", "type": "io.apibuilder.common.v0.models.reference" }, { "name": "application", "type": "io.apibuilder.common.v0.models.reference" }, { "name": "from_version", "type": "change_version" }, { "name": "to_version", "type": "change_version" }, { "name": "diff", "type": "diff" }, { "name": "changed_at", "type": "date-time-iso8601", "description": "Records the timestamp of when the actual change occurred (vs. when we created the changed record)" }, { "name": "changed_by", "type": "user_summary", "description": "Records who made the actual change" }, { "name": "audit", "type": "io.apibuilder.common.v0.models.audit" } ] }, "change_version": { "description": "Represents a simpler model of a version specifically for the use case of displaying changes", "fields": [ { "name": "guid", "type": "uuid" }, { "name": "version", "type": "string" } ] }, "generator_service": { "description": "Defines a service that provides one or more code generators", "fields": [ { "name": "guid", "type": "uuid" }, { "name": "uri", "type": "string" }, { "name": "audit", "type": "io.apibuilder.common.v0.models.audit" } ] }, "generator_service_form": { "fields": [ { "name": "uri", "type": "string" } ] }, "generator_with_service": { "description": "Wraps a service and a generator providing easier access for applications.", "fields": [ { "name": "service", "type": "generator_service" }, { "name": "generator", "type": "io.apibuilder.generator.v0.models.generator" } ] }, "generator_form": { "fields": [ { "name": "service_guid", "type": "uuid" }, { "name": "generator", "type": "io.apibuilder.generator.v0.models.generator" } ] }, "move_form": { "fields": [ { "name": "org_key", "type": "string", "description": "The key of the organization to which we are moving this item" } ] }, "application_metadata": { "fields": [ { "name": "guid", "type": "uuid", "description": "Internal unique identifier for this application." }, { "name": "key", "type": "string", "description": "Used as a unique key in the URL path. Key is automatically derived from the application name." } ] }, "application_metadata_version": { "description": "Describes the versions associated with a given application", "fields": [ { "name": "version", "type": "string", "example": "0.2.5" } ] }, "batch_download_applications": { "plural": "batch_download_applications", "fields": [ { "name": "applications", "type": "[version]" } ] }, "batch_download_applications_form": { "fields": [ { "name": "applications", "type": "[batch_download_application_form]" } ] }, "batch_download_application_form": { "fields": [ { "name": "application_key", "type": "string" }, { "name": "version", "type": "string", "default": "latest", "required": false } ] } }, "resources": { "io.apibuilder.generator.v0.models.healthcheck": { "path": "/_internal_", "operations": [ { "method": "GET", "path": "/healthcheck", "responses": { "200": { "type": "io.apibuilder.generator.v0.models.healthcheck" } } } ] }, "validation": { "description": "Public resource that can accept JSON input and returns a validation object describing any validation errors.", "operations": [ { "method": "POST", "body": { "type": "string" }, "responses": { "200": { "type": "validation" } } } ] }, "authentication": { "operations": [ { "method": "GET", "path": "/session/:id", "responses": { "200": { "type": "authentication" }, "404": { "type": "unit" } } } ] }, "user": { "operations": [ { "method": "GET", "description": "Search for a specific user. You must specify at least 1 parameter - either a guid, email or token - and will receive back either 0 or 1 users.", "parameters": [ { "name": "guid", "type": "uuid", "description": "Find user with this guid. Exact match", "required": false }, { "name": "email", "type": "string", "description": "Find user with this email address. Case in-sensitive. Exact match", "required": false }, { "name": "nickname", "type": "string", "description": "Find user with the specified nickname. For users that register via GitHub, this will be their GitHub username. Case in-sensitive. Exact match", "required": false }, { "name": "token", "type": "string", "description": "Find the user with this API token. Exact match", "required": false } ], "responses": { "200": { "type": "[user]" } } }, { "method": "GET", "description": "Returns information about the user with this guid.", "path": "/:guid", "responses": { "200": { "type": "user" }, "404": { "type": "unit" } } }, { "method": "POST", "path": "/authenticate", "description": "Used to authenticate a user with an email address and password. Successful authentication returns an instance of the user model. Failed authorizations of any kind are returned as a generic error with code user_authorization_failed.", "parameters": [ { "name": "email", "type": "string" }, { "name": "password", "type": "string" } ], "responses": { "200": { "type": "authentication" }, "409": { "type": "[error]" } } }, { "method": "POST", "path": "/authenticate_github", "description": "Used to authenticate a user using a github access token. This is equivalent to running the following command to get the user info: curl -H 'Authorization: Bearer code' https://api.github.com/user", "parameters": [ { "name": "token", "type": "string", "description": "The GitHub assigned oauth token" } ], "responses": { "200": { "type": "authentication" }, "409": { "type": "[error]" } } }, { "method": "POST", "description": "Create a new user.", "body": { "type": "user_form" }, "responses": { "200": { "type": "user" }, "409": { "type": "[error]" } } }, { "method": "PUT", "path": "/:guid", "description": "Updates information about the user with the specified guid.", "body": { "type": "user_update_form" }, "responses": { "200": { "type": "user" }, "409": { "type": "[error]" } } } ] }, "token": { "operations": [ { "method": "GET", "path": "/users/:user_guid", "parameters": [ { "name": "user_guid", "type": "uuid" }, { "name": "guid", "type": "uuid", "required": false }, { "name": "limit", "type": "long", "default": 25, "description": "The number of records to return", "minimum": 1, "maximum": 100 }, { "name": "offset", "type": "long", "default": 0, "description": "Used to paginate. First page of results is 0.", "minimum": 0 } ], "responses": { "200": { "type": "[token]" } } }, { "method": "GET", "description": "Used to fetch the clear text token.", "path": "/:guid/cleartext", "responses": { "200": { "type": "cleartext_token" }, "404": { "type": "unit" } } }, { "method": "POST", "description": "Create a new API token for this user", "body": { "type": "token_form" }, "responses": { "201": { "type": "token" }, "409": { "type": "[error]" } } }, { "method": "DELETE", "path": "/:guid", "responses": { "204": { "type": "unit" }, "401": { "type": "unit" }, "404": { "type": "unit" } } } ] }, "organization": { "operations": [ { "method": "GET", "description": "Search all organizations. Results are always paginated.", "parameters": [ { "name": "guid", "type": "uuid", "required": false, "description": "Finds the organization with this guid, if any" }, { "name": "user_guid", "type": "uuid", "required": false, "description": "If specified, restricts to organizations that this user is specifically a member of (e.g. will exclude public organizations with which the user does not have a direct membership)." }, { "name": "key", "type": "string", "description": "Find organizations with this key. Case in-sensitive. Exact match", "required": false }, { "name": "name", "type": "string", "description": "Find organizations with this name. Case in-sensitive. Exact match", "required": false }, { "name": "namespace", "type": "string", "description": "Find organizations with this namespace. Case in-sensitive. Exact match", "required": false }, { "name": "limit", "type": "long", "default": 25, "description": "The number of records to return", "minimum": 1, "maximum": 100 }, { "name": "offset", "type": "long", "default": 0, "description": "Used to paginate. First page of results is 0.", "minimum": 0 } ], "responses": { "200": { "type": "[organization]" } } }, { "method": "GET", "path": "/:key", "description": "Returns the organization with this key.", "responses": { "200": { "type": "organization" }, "404": { "type": "unit" } } }, { "method": "POST", "description": "Create a new organization.", "body": { "type": "organization_form" }, "responses": { "200": { "type": "organization" }, "409": { "type": "[error]" } } }, { "method": "PUT", "path": "/:key", "description": "Update an organization.", "body": { "type": "organization_form" }, "responses": { "200": { "type": "organization" }, "409": { "type": "[error]" } } }, { "method": "DELETE", "path": "/:key", "description": "Deletes an organization and all of its associated applications.", "responses": { "204": { "type": "unit" }, "401": { "type": "unit" }, "404": { "type": "unit" } } }, { "method": "GET", "path": "/:key/attributes", "description": "Returns all attribute values for this organization. Results are always paginated.", "parameters": [ { "name": "name", "type": "string", "description": "Find the values for the attribute with this name.", "required": false }, { "name": "limit", "type": "long", "default": 25, "description": "The number of records to return", "minimum": 1, "maximum": 100 }, { "name": "offset", "type": "long", "default": 0, "description": "Used to paginate. First page of results is 0.", "minimum": 0 } ], "responses": { "200": { "type": "[attribute_value]" } } }, { "method": "GET", "path": "/:key/attributes/:name", "description": "Returns the attribute value with this name.", "responses": { "200": { "type": "attribute_value" }, "404": { "type": "unit" } } }, { "method": "PUT", "path": "/:key/attributes/:name", "description": "Create or update a new attribute value.", "body": { "type": "attribute_value_form" }, "responses": { "200": { "type": "attribute_value" }, "201": { "type": "attribute_value" }, "404": { "type": "unit" }, "409": { "type": "[error]" } } }, { "method": "DELETE", "path": "/:key/attributes/:name", "description": "Deletes the attribute value with the specified name. Only the user who created an attribute value can delete it.", "responses": { "204": { "type": "unit" }, "401": { "type": "unit" }, "404": { "type": "unit" } } } ] }, "attribute": { "operations": [ { "method": "GET", "description": "Search all attributes. Results are always paginated.", "parameters": [ { "name": "guid", "type": "uuid", "description": "Find the watch with this guid.", "required": false }, { "name": "name", "type": "string", "description": "Find attributes with this name. Case in-sensitive. Exact match", "required": false }, { "name": "limit", "type": "long", "default": 25, "description": "The number of records to return", "minimum": 1, "maximum": 100 }, { "name": "offset", "type": "long", "default": 0, "description": "Used to paginate. First page of results is 0.", "minimum": 0 } ], "responses": { "200": { "type": "[attribute]" } } }, { "method": "GET", "path": "/:name", "description": "Returns the attribute with this name.", "responses": { "200": { "type": "attribute" }, "404": { "type": "unit" } } }, { "method": "POST", "description": "Create a new attribute.", "body": { "type": "attribute_form" }, "responses": { "201": { "type": "attribute" }, "401": { "type": "unit" }, "409": { "type": "[error]" } } }, { "method": "DELETE", "path": "/:name", "description": "Deletes the attribute with this name. Only the user who created an attribute can delete it.", "responses": { "204": { "type": "unit" }, "401": { "type": "unit" }, "404": { "type": "unit" } } } ] }, "domain": { "path": "/domains/:orgKey", "operations": [ { "method": "POST", "description": "Add a domain to this organization", "body": { "type": "domain" }, "responses": { "200": { "type": "domain" }, "409": { "type": "[error]" } } }, { "method": "DELETE", "description": "Remove this domain from this organization", "path": "/:name", "responses": { "204": { "type": "unit" }, "401": { "type": "unit" }, "404": { "type": "unit" } } } ] }, "membership": { "operations": [ { "method": "GET", "description": "Search all memberships. Results are always paginated.", "parameters": [ { "name": "org_guid", "type": "uuid", "required": false }, { "name": "org_key", "type": "string", "required": false }, { "name": "user_guid", "type": "uuid", "required": false }, { "name": "role", "type": "io.apibuilder.common.v0.enums.membership_role", "required": false }, { "name": "limit", "type": "long", "default": 25, "description": "The number of records to return", "minimum": 1, "maximum": 100 }, { "name": "offset", "type": "long", "default": 0, "description": "Used to paginate. First page of results is 0.", "minimum": 0 } ], "responses": { "200": { "type": "[membership]" } } }, { "method": "GET", "path": "/:guid", "responses": { "200": { "type": "membership" }, "404": { "type": "unit" } } }, { "method": "DELETE", "path": "/:guid", "responses": { "204": { "type": "unit" }, "401": { "type": "unit" }, "404": { "type": "unit" } } } ] }, "membership_request": { "operations": [ { "method": "GET", "description": "Search all membership requests. Results are always paginated.", "parameters": [ { "name": "org_guid", "type": "uuid", "required": false }, { "name": "org_key", "type": "string", "required": false }, { "name": "user_guid", "type": "uuid", "required": false }, { "name": "role", "type": "io.apibuilder.common.v0.enums.membership_role", "required": false }, { "name": "limit", "type": "long", "default": 25, "description": "The number of records to return", "minimum": 1, "maximum": 100 }, { "name": "offset", "type": "long", "default": 0, "description": "Used to paginate. First page of results is 0.", "minimum": 0 } ], "responses": { "200": { "type": "[membership_request]" } } }, { "method": "POST", "description": "Create a membership request", "parameters": [ { "name": "org_guid", "type": "uuid" }, { "name": "user_guid", "type": "uuid" }, { "name": "role", "type": "io.apibuilder.common.v0.enums.membership_role" } ], "responses": { "200": { "type": "membership_request" }, "409": { "type": "[error]" } } }, { "method": "POST", "path": "/:guid/accept", "description": "Accepts this membership request. User will become a member of the specified organization.", "responses": { "204": { "type": "unit" }, "409": { "type": "[error]" } } }, { "method": "POST", "path": "/:guid/decline", "description": "Declines this membership request. User will NOT become a member of the specified organization.", "responses": { "204": { "type": "unit" }, "409": { "type": "[error]" } } } ] }, "batch_download_applications": { "path": "/:orgKey/batch/download/applications", "operations": [ { "method": "POST", "description": "Retrieve multiple applications in one api call.", "body": { "type": "batch_download_applications_form" }, "responses": { "201": { "type": "batch_download_applications" }, "409": { "type": "[error]" } } } ] }, "application": { "path": "/:orgKey", "operations": [ { "method": "GET", "description": "Returns the versions assocoated with the specified application. The latest version is the first result returned.", "path": "/metadata/:applicationKey/versions", "parameters": [ { "name": "limit", "type": "long", "default": 25, "description": "The number of records to return", "maximum": 100 }, { "name": "offset", "type": "long", "default": 0, "description": "Used to paginate. First page of results is 0.", "minimum": 0 } ], "responses": { "200": { "type": "[application_metadata_version]" }, "401": { "type": "unit" }, "404": { "type": "unit" } } }, { "method": "GET", "description": "Returns the latest version number as a string", "path": "/metadata/:applicationKey/versions/latest.txt", "responses": { "200": { "type": "string" }, "401": { "type": "unit" }, "404": { "type": "unit" } } }, { "method": "GET", "description": "Search all applications. Results are always paginated.", "parameters": [ { "name": "orgKey", "type": "string", "description": "The organization key for which to search applications" }, { "name": "name", "type": "string", "required": false, "description": "The name of an application. Case in-sensitive. Exact match" }, { "name": "guid", "type": "uuid", "required": false, "description": "The guid of an application. Exact match" }, { "name": "key", "type": "string", "required": false, "description": "The key of an application. Case in-sensitive. Exact match" }, { "name": "has_version", "type": "boolean", "description": "If true, we return applications that have at least one version. If false, we return applications that have no versions in the system", "required": false }, { "name": "limit", "type": "long", "default": 25, "description": "The number of records to return", "maximum": 100 }, { "name": "offset", "type": "long", "default": 0, "description": "Used to paginate. First page of results is 0.", "minimum": 0 }, { "name": "sort_by", "type": "app_sort_by", "required": false }, { "name": "order", "type": "sort_order", "required": false } ], "responses": { "200": { "type": "[application]" } } }, { "method": "POST", "description": "Create an application.", "body": { "type": "application_form" }, "responses": { "200": { "type": "application" }, "409": { "type": "[error]" } } }, { "method": "PUT", "description": "Updates an application.", "path": "/:applicationKey", "body": { "type": "application_form" }, "responses": { "200": { "type": "application" }, "409": { "type": "[error]" } } }, { "method": "DELETE", "description": "Deletes a specific application and its associated versions.", "path": "/:applicationKey", "responses": { "204": { "type": "unit" }, "401": { "type": "unit" }, "404": { "type": "unit" } } }, { "method": "POST", "description": "Moves application to a new organization.", "path": "/:applicationKey/move", "body": { "type": "move_form" }, "responses": { "200": { "type": "application" }, "409": { "type": "[error]" } } } ] }, "code": { "path": "/:orgKey/:applicationKey/:version", "operations": [ { "method": "POST", "path": "/form", "description": "Create an invocation form. This is useful primarily for debugging when you want to see exactly what content is being forwarded to the generator", "body": { "type": "code_form" }, "responses": { "200": { "type": "io.apibuilder.generator.v0.models.invocation_form" }, "409": { "type": "[error]" } } }, { "method": "GET", "path": "/:generatorKey", "description": "Generate code for a specific version of an application.", "parameters": [ { "name": "orgKey", "type": "string", "description": "The organization key for which to generate code" }, { "name": "applicationKey", "type": "string", "description": "The application key for which to generate code" }, { "name": "version", "type": "string", "description": "The version of this application. Can be 'latest'" }, { "name": "generatorKey", "type": "string", "description": "The key of the generator to invoke" } ], "responses": { "200": { "type": "code" }, "409": { "type": "[error]", "description": "If the target, version, and/or generator are invalid." } } }, { "method": "POST", "path": "/:generatorKey", "description": "Generate code for a specific version of an application.", "parameters": [ { "name": "orgKey", "type": "string", "description": "The organization key for which to generate code" }, { "name": "applicationKey", "type": "string", "description": "The application key for which to generate code" }, { "name": "version", "type": "string", "description": "The version of this application. Can be 'latest'" }, { "name": "generatorKey", "type": "string", "description": "The key of the generator to invoke" } ], "body": { "type": "code_form" }, "responses": { "200": { "type": "code" }, "409": { "type": "[error]", "description": "If the target, version, and/or generator are invalid." } } } ] }, "version": { "path": "/:orgKey", "operations": [ { "method": "GET", "path": "/:applicationKey", "description": "Search all versions of this application. Results are always paginated.", "parameters": [ { "name": "orgKey", "type": "string", "description": "The organization key for which to search versions" }, { "name": "applicationKey", "type": "string", "description": "The application key for which to search versions" }, { "name": "limit", "type": "long", "default": 25, "description": "The number of records to return", "maximum": 100 }, { "name": "offset", "type": "long", "default": 0, "description": "Used to paginate. First page of results is 0.", "minimum": 0 } ], "responses": { "200": { "type": "[version]" } } }, { "method": "GET", "description": "Retrieve a specific version of an application.", "path": "/:applicationKey/:version", "parameters": [ { "name": "version", "type": "string", "description": "The version of tthis application to download, or the keyword latest to get the latest version", "example": "latest" } ], "responses": { "200": { "type": "version" }, "404": { "type": "unit" } } }, { "method": "POST", "path": "/:version", "description": "Create a new version for an application", "body": { "type": "version_form" }, "responses": { "200": { "type": "version" }, "409": { "type": "[error]" } } }, { "method": "PUT", "description": "Upsert a version of an application", "path": "/:applicationKey/:version", "body": { "type": "version_form" }, "responses": { "200": { "type": "version" }, "409": { "type": "[error]" } } }, { "method": "DELETE", "description": "Deletes a specific version.", "path": "/:applicationKey/:version", "responses": { "204": { "type": "unit" }, "401": { "type": "unit" }, "404": { "type": "unit" } } }, { "method": "GET", "description": "Generates an example JSON document of the type with the specified name.", "path": "/:applicationKey/:version/example/:type_name", "parameters": [ { "name": "version", "type": "string", "description": "The version of this application to download, or the keyword latest to get the latest version", "example": "latest" }, { "name": "type_name", "type": "string", "description": "The name of the type (e.g. model name) for which you would like to generate a sample json document" }, { "name": "sub_type_name", "type": "string", "description": "The name of the sub-type for which you would like to generate a sample json document, e.g. a specific type of a union", "required": false }, { "name": "optional_fields", "type": "boolean", "description": "If true, we generate sample data for all optional fields. Otherwise the generated sample will contain only required fields, where applicable", "required": false } ], "responses": { "200": { "type": "object" }, "404": { "type": "unit" } } } ] }, "generator_service": { "operations": [ { "method": "GET", "description": "List all generator services", "parameters": [ { "name": "guid", "type": "uuid", "required": false }, { "name": "uri", "type": "string", "required": false }, { "name": "generator_key", "type": "string", "required": false }, { "name": "limit", "type": "long", "default": 100, "description": "The number of records to return", "minimum": 1, "maximum": 100 }, { "name": "offset", "type": "long", "default": 0, "description": "Used to paginate. First page of results is 0.", "minimum": 0 } ], "responses": { "200": { "type": "[generator_service]" } } }, { "method": "GET", "path": "/:guid", "responses": { "200": { "type": "generator_service" }, "404": { "type": "unit" } } }, { "method": "POST", "body": { "type": "generator_service_form" }, "responses": { "200": { "type": "generator_service" }, "409": { "type": "[error]" } } }, { "method": "DELETE", "path": "/:guid", "description": "Deletes a generator service.", "responses": { "204": { "type": "unit" }, "401": { "type": "unit" }, "404": { "type": "unit" } } } ] }, "generator_with_service": { "path": "/generators", "operations": [ { "method": "GET", "description": "List all available generators", "parameters": [ { "name": "guid", "type": "uuid", "required": false, "description": "Filter to generator with this guid" }, { "name": "service_guid", "type": "uuid", "required": false, "description": "Filter to generator from this service" }, { "name": "service_uri", "type": "string", "required": false, "description": "Filter to generator from this service URI" }, { "name": "attribute_name", "type": "string", "required": false, "description": "Filter to generators that use this attribute" }, { "name": "key", "type": "string", "required": false, "description": "Filter to generator with this key" }, { "name": "limit", "type": "long", "default": 100, "description": "The number of records to return", "minimum": 1, "maximum": 100 }, { "name": "offset", "type": "long", "default": 0, "description": "Used to paginate. First page of results is 0.", "minimum": 0 } ], "responses": { "200": { "type": "[generator_with_service]" } } }, { "method": "GET", "path": "/:key", "responses": { "200": { "type": "generator_with_service" }, "404": { "type": "unit" } } } ] }, "subscription": { "operations": [ { "method": "GET", "description": "Search subscriptions. Always paginated.", "parameters": [ { "name": "guid", "type": "uuid", "description": "Find the subscription with this guid.", "required": false }, { "name": "organization_key", "type": "string", "description": "Find subscriptions for this organization.", "required": false }, { "name": "user_guid", "type": "uuid", "description": "Find subscriptions for this user.", "required": false }, { "name": "publication", "type": "publication", "description": "Find subscriptions for this publication.", "required": false }, { "name": "limit", "type": "long", "default": 25, "description": "The number of records to return", "minimum": 1, "maximum": 100 }, { "name": "offset", "type": "long", "default": 0, "description": "Used to paginate. First page of results is 0.", "minimum": 0 } ], "responses": { "200": { "type": "[subscription]" } } }, { "method": "GET", "description": "Returns information about a specific subscription.", "path": "/:guid", "responses": { "200": { "type": "subscription" }, "404": { "type": "unit" } } }, { "method": "POST", "description": "Create a new subscription.", "body": { "type": "subscription_form" }, "responses": { "201": { "type": "subscription" }, "409": { "type": "[error]" } } }, { "method": "DELETE", "path": "/:guid", "responses": { "204": { "type": "unit" }, "401": { "type": "unit" }, "404": { "type": "unit" } } } ] }, "watch": { "operations": [ { "method": "GET", "description": "Search attributes. Always paginated.", "parameters": [ { "name": "guid", "type": "uuid", "description": "Find the watch with this guid.", "required": false }, { "name": "user_guid", "type": "uuid", "description": "Find attributes for this user.", "required": false }, { "name": "organization_key", "type": "string", "description": "Find attributes for this organization.", "required": false }, { "name": "application_key", "type": "string", "description": "Find attributes for this application.", "required": false }, { "name": "limit", "type": "long", "default": 25, "description": "The number of records to return", "minimum": 1, "maximum": 100 }, { "name": "offset", "type": "long", "default": 0, "description": "Used to paginate. First page of results is 0.", "minimum": 0 } ], "responses": { "200": { "type": "[watch]" } } }, { "method": "GET", "description": "Returns information about a specific watch.", "path": "/:guid", "responses": { "200": { "type": "watch" }, "404": { "type": "unit" } } }, { "method": "GET", "description": "Quick check if a user is watching a specific application.", "path": "/check", "parameters": [ { "name": "user_guid", "type": "uuid", "description": "The user for which we are checking. API returns false if the user guid is not provided", "required": false }, { "name": "organization_key", "type": "string" }, { "name": "application_key", "type": "string" } ], "responses": { "200": { "type": "boolean" } } }, { "method": "POST", "description": "Create a new watch.", "body": { "type": "watch_form" }, "responses": { "201": { "type": "watch" }, "409": { "type": "[error]" } } }, { "method": "DELETE", "path": "/:guid", "responses": { "204": { "type": "unit" }, "401": { "type": "unit" }, "404": { "type": "unit" } } } ] }, "email_verification_confirmation_form": { "path": "/email_verification_confirmations", "operations": [ { "method": "POST", "description": "Validate an email address using a token.", "body": { "type": "email_verification_confirmation_form" }, "responses": { "204": { "type": "unit" }, "409": { "type": "[error]" } } } ] }, "password_reset_request": { "operations": [ { "method": "POST", "description": "Create a new password reset. This will send the user an email with a link to reset their password.", "body": { "type": "password_reset_request" }, "responses": { "204": { "type": "unit" }, "409": { "type": "[error]" } } } ] }, "password_reset": { "operations": [ { "method": "POST", "description": "Change the password for this token. If the token is invalid, has been used, or otherwise no longer can be applied, errors will be returned as 409s. A 204 represents that the user has successfully changed their password.", "body": { "type": "password_reset" }, "responses": { "200": { "type": "authentication" }, "409": { "type": "[error]" } } } ] }, "change": { "operations": [ { "method": "GET", "parameters": [ { "name": "org_key", "type": "string", "description": "Filter changes to those made for the organization with this key.", "required": false }, { "name": "application_key", "type": "string", "description": "Filter changes to those made for the application with this key.", "required": false }, { "name": "from", "type": "string", "description": "Filter changes to those made from this version.", "required": false, "example": "0.1.3" }, { "name": "to", "type": "string", "description": "Filter changes to those made to this version.", "required": false, "example": "0.1.4" }, { "name": "type", "type": "string", "description": "The type of diff to return.", "required": false, "example": "breaking or non_breaking" }, { "name": "limit", "type": "long", "default": 25, "description": "The number of records to return", "minimum": 1, "maximum": 100 }, { "name": "offset", "type": "long", "default": 0, "description": "Used to paginate. First page of results is 0.", "minimum": 0 } ], "responses": { "200": { "type": "[change]" } } } ] }, "item": { "operations": [ { "method": "GET", "parameters": [ { "name": "q", "type": "string", "required": false, "description": "The search query. At the moment, we do case insensitive exact match search." }, { "name": "limit", "type": "long", "default": 25, "description": "The number of records to return", "minimum": 1, "maximum": 100 }, { "name": "offset", "type": "long", "default": 0, "description": "Used to paginate. First page of results is 0.", "minimum": 0 } ], "responses": { "200": { "type": "[item]" } } }, { "method": "GET", "path": "/:guid", "responses": { "200": { "type": "item" }, "404": { "type": "unit" } } } ] } } }