{"note":"OpenAPI conversion -- returning structured metadata","name":"redirection-io","description":"redirection.io","version":"2.0.0","base_url":"https://api.redirection.io/","endpoints":24,"raw":"@lap v0.3\n# Machine-readable API spec. Each @endpoint block is one API call.\n@api redirection.io\n@base https://api.redirection.io/\n@version 2.0.0\n@auth Bearer bearer | ApiKey Authorization in header\n@endpoints 24\n@hint download_for_search\n@toc domains(4), drafts(3), instances(3), ips(1), organization(1), projects(5), redirections(1), rules(6)\n\n@group domains\n@endpoint GET /domains\n@desc Retrieves the collection of the domains.\n@required {projectId: str # The id of the project.}\n@optional {searchAfterId: str # The id of the last domain returned in the previous page. Used for pagination.}\n@returns(200) ProjectDomain collection\n@errors {403: Forbidden}\n\n@endpoint POST /domains\n@desc Creates a new domain\n@required {domain: str, project: str(iri-reference) # An IRI reference to the project, of the form `/projects/{project_id}`.}\n@optional {backendAddress: str # The address of this backend, if there is one., backendAllowInvalidCertificate: bool=true, backendEnabled: bool=false, backendUseSsl: bool=true, sslAutomatic: bool=true, sslEnabled: bool=true}\n@returns(201) {backendAddress: str?, backendAllowInvalidCertificate: bool, backendEnabled: bool, backendUseSsl: bool, dnsValid: bool, domain: str, id: str, records: [map], sslAutomatic: bool, sslEnabled: bool} # ProjectDomain resource created\n@errors {400: Invalid input, 403: Forbidden, 422: An error occurred}\n\n@endpoint DELETE /domains/{id}\n@desc Permanently deletes a domain\n@required {id: str # ProjectDomain identifier}\n@returns(204) ProjectDomain resource deleted\n@errors {403: Forbidden, 404: Not found}\n\n@endpoint GET /domains/{id}\n@desc Retrieves a ProjectDomain resource.\n@required {id: str # ProjectDomain identifier}\n@returns(200) {backendAddress: str?, backendAllowInvalidCertificate: bool, backendEnabled: bool, backendUseSsl: bool, dnsValid: bool, domain: str, id: str, records: [map], sslAutomatic: bool, sslEnabled: bool} # ProjectDomain resource\n@errors {403: Forbidden, 404: Not found}\n\n@endgroup\n\n@group drafts\n@endpoint GET /drafts\n@desc Retrieves the collection of Draft rules\n@required {projectId: str # The id of the project.}\n@optional {searchAfterId: str # The id of the last draft returned in the previous page. Used for pagination., tags: [str] # The name of one or more tags. Every draft that is attached to at least one of those tags will be returned. Tags can also be passed as a comma separated list., enabled: bool # The enabled status of the rule., triggerUrl: str # The trigger source URL. This allows to filter draft rules that are triggered by a specific URL.}\n@returns(200) Draft collection\n\n@endpoint DELETE /drafts/{id}\n@desc Deletes a Draft\n@required {id: str # Draft identifier}\n@returns(204) Draft resource deleted\n@errors {403: Forbidden, 404: Not found}\n\n@endpoint GET /drafts/{id}\n@desc Retrieves a Draft resource.\n@required {id: str # Draft identifier}\n@returns(200) {id: str, rule: map{actions: [map], description: str?, enabled: bool, examples: [map], id: str, lastUsedAt: str(date-time)?, markers: [map], metadata: map, priority: int, tags: [str], trigger: map{date: [map], datetime: [map], excludeMethods: bool, excludeResponseStatusCodes: bool, ipAddress: any, methods: [str], requestHeaders: [map], responseStatusCodes: [int], sampling: int?, source: str, time: [map]}, usageCount: int, variables: [map]}, status: str} # Draft resource\n@errors {403: Forbidden, 404: Not found}\n\n@endgroup\n\n@group instances\n@endpoint GET /instances\n@desc List project instances\n@required {projectId: str # The id of the project.}\n@optional {name: str # The name of the instance., searchAfterId: str # The id of the last instance returned in the previous page. Used for pagination.}\n@returns(200) Instance collection\n@errors {403: Forbidden}\n\n@endpoint DELETE /instances/{id}\n@desc Delete an instance\n@required {id: str # Instance identifier}\n@returns(204) Instance resource deleted\n@errors {403: Forbidden, 404: Not found}\n\n@endpoint GET /instances/{id}\n@desc Retrieves a Instance resource.\n@required {id: str # Instance identifier}\n@returns(200) {agentVersion: str, agentVersionStatus: str, createdAt: str(date-time), id: str, logging: bool?, logsLastFlushedAt: str(date-time)?, misconfigured: bool, name: str, rulesCount: int, rulesLastUpdatedAt: str(date-time)?} # Instance resource\n@errors {403: Forbidden, 404: Not found}\n\n@endgroup\n\n@group ips\n@endpoint GET /ips\n@desc Retrieves the collection of Ip resources.\n@returns(200) Ip collection\n\n@endgroup\n\n@group organization\n@endpoint GET /organization\n@desc Retrieve the details of your organization\n@returns(200) {id: str, name: str, projects: [map], slug: str} # Organization resource\n\n@endgroup\n\n@group projects\n@endpoint GET /projects\n@desc Retrieves the collection of Project resources.\n@returns(200) Project collection\n\n@endpoint POST /projects\n@desc Creates a new project\n@required {name: str}\n@optional {metadata: map}\n@returns(201) {id: str, metadata: map, name: str, plan: str, slug: str} # Project resource created\n@errors {400: Invalid input, 422: An error occurred}\n\n@endpoint DELETE /projects/{id}\n@desc Permanently deletes a project\n@required {id: str # Project identifier}\n@returns(204) Project resource deleted\n@errors {403: Forbidden, 404: Not found}\n\n@endpoint GET /projects/{id}\n@desc Retrieves a Project resource.\n@required {id: str # Project identifier}\n@returns(200) {id: str, metadata: map, name: str, plan: str, slug: str} # Project resource\n@errors {403: Forbidden, 404: Not found}\n\n@endpoint POST /projects/{id}/publish\n@desc Publishes the collection of Draft resources\n@required {id: str # The id of the project.}\n@returns(204) Draft resources collection published\n@errors {400: Invalid input, 403: Forbidden}\n\n@endgroup\n\n@group redirections\n@endpoint POST /redirections\n@desc Creates a new Redirection\n@required {project: str(iri-reference) # An IRI reference to the project, of the form `/projects/{project_id}`., source: str # The URL to be redirected. This URL must start with `/`, `://`, `http://` or `https://`, statusCode: int(301/302/307/308) # The status code to use for this redirection., target: str # The redirection target URL. It must can be a relative URL (starting with `/`) or an absolute one (starting with `://`, `http://` or `https://`).}\n@optional {description: str # This description field is used to describe the rule and share knowledge with other users, enabled: bool=true # Set to \"false\" to disable this rule. Even once published, this rule will not be used by your website, priority: int=0 # A rule with higher priority takes precedence over lower priorities, which means that the actions defined in the higher priority rule will override the similar actions defined in a lower priority one, tags: [str] # Tags are useful to filter rules and retrieve them easily}\n@returns(201) {id: str, rule: map{actions: [map], description: str?, enabled: bool, examples: [map], id: str, lastUsedAt: str(date-time)?, markers: [map], metadata: map, priority: int, tags: [str], trigger: map{date: [map], datetime: [map], excludeMethods: bool, excludeResponseStatusCodes: bool, ipAddress: any, methods: [str], requestHeaders: [map], responseStatusCodes: [int], sampling: int?, source: str, time: [map]}, usageCount: int, variables: [map]}, status: str} # Draft rule resource created (with the status `add`)\n@errors {400: Invalid input, 403: Forbidden, 422: An error occurred}\n\n@endgroup\n\n@group rules\n@endpoint GET /rules\n@desc Retrieves the collection of currently published Rule resources.\n@required {projectId: str # The id of the project.}\n@optional {searchAfterId: str # The id of the last rule returned in the previous page. Used for pagination., tags: [str] # The name of one or more tags. Every Rule that is attached to at least one of those tags will be returned. Tags can also be passed as a comma separated list., enabled: bool # The enabled status of the rule., triggerUrl: str # The trigger source URL. This allows to filter rules that are triggered by a specific URL.}\n@returns(200) Rule collection\n@errors {403: Forbidden}\n\n@endpoint POST /rules\n@desc Creates a new draft Rule\n@optional {actions: [map{}] # Each `Action` must be an object with a `type` property, and some other properties according to its type:  * `captcha`: answers with an invisible challenge instead of the page, until the browser solved it. Not allowed on a rule with a response status code trigger.     * `provider` (string, optional). Only `proof_of_work` for now     * `difficulty` (int, optional, defaults to `16`). Between `8` and `24`, each step doubles the time spent by the browser     * `ttl` (int, optional, defaults to `86400`). Seconds during which a browser that solved the challenge is let through, between `300` and `2592000`     * `cookieName` (string, optional, defaults to `rio_captcha`). Letters, digits, `_` and `-` only, up to 64 characters * `configuration`:     * `logEnabled` (bool, required)     * `reset` (bool, required) * `convertToMarkdown`:     * no additional property * `customHtml`:     * `value` (string, required)     * `cssSelector` (string, required)     * `action` (string, required). One of `append_child`, `prepend_child`, `replace`     * `location` (string, deprecated). One of `headStart`, `headEnd`, `bodyStart`, `bodyEnd` * `customBody`:     * `value` (string, required)     * `contentType` (string, required). Content-type header to use for the response. * `customStatus`:     * `statusCode` (int, required). A valid status code between 200 and 511 ([see the official documentation](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses) for more information) * `header`:     * `name` (string, required)     * `value` (string, required)     * `mode` (string, required). One of `override`, `default`, `replace`, `append`, `add`     * `override` (bool, deprecated). Use the `mode` property instead. * `meta`:     * `type` (string, required). One of `title`, `description`, `keywords`, `author`, `og:title`, `og:description`, `og:type`, `og:image`, `og:url`, `og:locale`, `og:site_name`, 'canonical`     * `value` (string, required)     * `replace` (bool, required) * `redirection`:     * `location` (string, required)     * `statusCode` (int, required). One of `301`, `302`, `307`, `308` * `requestHeader`: modifies the request forwarded to the backend. Not allowed on a rule with a response status code trigger.     * `name` (string, required). Connection-level headers (`Host`, `Content-Length`, `Transfer-Encoding`, `Connection`, …) cannot be modified.     * `value` (string, required unless `mode` is `remove`)     * `mode` (string, required). One of `override`, `default`, `replace`, `add`, `remove` * `robotsTxt`:     * `content` (string, required) * `sitemap`:     * `name` (string)     * `content` (string, required) * `structuredData`:     * `value` (string, required), description: str # This description field is used to describe the rule and share knowledge with other users, enabled: bool=true # Set to `false` to disable this rule, examples: [map{datetime: str(date-time), headers: [map], ipAddress: str, method: str, mustMatch!: bool, responseBody: str, responseHeaders: [map], responseStatusCode: int, url!: str}] # Examples are useful to test your rule. They are not used in production., markers: [map{}] # Each `Marker` must be an object with a `type` property, and some other properties according to its type: * `anything`: No options * `custom`:     * `regex` (string, required) * `enum`     * `values` (array of string, required) * `date`: No options * `datetime`: No options * `integer`:     * `minimum` (int, required)     * `maximum` (int, required) * `string`:     * `allowLowercaseAlphabet` (bool)     * `allowUppercaseAlphabet` (bool)     * `allowDigits` (bool)     * `allowPercentEncodedChars` (bool)     * `specificCharacters` (array of string of length 1)     * `startingWith` (string)     * `endingWith` (string)     * `containing` (string) * `uuid`: No options, metadata: map, priority: int=0 # A rule with higher priority takes precedence over lower priorities, which means that the actions defined in the higher priority rule will override the similar actions defined in a lower priority one, project: str(iri-reference) # An IRI reference to the project, of the form `/projects/{project_id}`., tags: [str] # Tags are useful to filter rules and retrieve them easily, trigger: map{date: [map], datetime: [map], excludeMethods: bool, excludeResponseStatusCodes: bool, ipAddress: any, methods: [str], requestHeaders: [map], responseStatusCodes: [int], sampling: int, source!: str, time: [map]}, variables: [map{}]}\n@returns(201) {id: str, rule: map{actions: [map], description: str?, enabled: bool, examples: [map], id: str, lastUsedAt: str(date-time)?, markers: [map], metadata: map, priority: int, tags: [str], trigger: map{date: [map], datetime: [map], excludeMethods: bool, excludeResponseStatusCodes: bool, ipAddress: any, methods: [str], requestHeaders: [map], responseStatusCodes: [int], sampling: int?, source: str, time: [map]}, usageCount: int, variables: [map]}, status: str} # Draft rule resource created (with the status `add`)\n@errors {400: Invalid input, 403: Forbidden, 422: An error occurred}\n\n@endpoint DELETE /rules/{id}\n@desc Deletes a Rule\n@required {id: str # Rule identifier}\n@returns(200) {id: str, rule: map{actions: [map], description: str?, enabled: bool, examples: [map], id: str, lastUsedAt: str(date-time)?, markers: [map], metadata: map, priority: int, tags: [str], trigger: map{date: [map], datetime: [map], excludeMethods: bool, excludeResponseStatusCodes: bool, ipAddress: any, methods: [str], requestHeaders: [map], responseStatusCodes: [int], sampling: int?, source: str, time: [map]}, usageCount: int, variables: [map]}, status: str} # Draft rule resource updated (with the status `delete`)\n@errors {403: Forbidden, 404: Not found}\n\n@endpoint GET /rules/{id}\n@desc Retrieves a Rule resource\n@required {id: str # Rule identifier}\n@returns(200) {actions: [map], description: str?, enabled: bool, examples: [map], id: str, lastUsedAt: str(date-time)?, markers: [map], metadata: map, priority: int, tags: [str], trigger: map{date: [map], datetime: [map], excludeMethods: bool, excludeResponseStatusCodes: bool, ipAddress: any, methods: [str], requestHeaders: [map], responseStatusCodes: [int], sampling: int?, source: str, time: [map]}, usageCount: int, variables: [map]} # Rule resource\n@errors {403: Forbidden, 404: Not found}\n\n@endpoint PUT /rules/{id}\n@desc Updates an existing Rule\n@required {id: str # Rule identifier}\n@optional {actions: [map{}] # Each `Action` must be an object with a `type` property, and some other properties according to its type:  * `captcha`: answers with an invisible challenge instead of the page, until the browser solved it. Not allowed on a rule with a response status code trigger.     * `provider` (string, optional). Only `proof_of_work` for now     * `difficulty` (int, optional, defaults to `16`). Between `8` and `24`, each step doubles the time spent by the browser     * `ttl` (int, optional, defaults to `86400`). Seconds during which a browser that solved the challenge is let through, between `300` and `2592000`     * `cookieName` (string, optional, defaults to `rio_captcha`). Letters, digits, `_` and `-` only, up to 64 characters * `configuration`:     * `logEnabled` (bool, required)     * `reset` (bool, required) * `convertToMarkdown`:     * no additional property * `customHtml`:     * `value` (string, required)     * `cssSelector` (string, required)     * `action` (string, required). One of `append_child`, `prepend_child`, `replace`     * `location` (string, deprecated). One of `headStart`, `headEnd`, `bodyStart`, `bodyEnd` * `customBody`:     * `value` (string, required)     * `contentType` (string, required). Content-type header to use for the response. * `customStatus`:     * `statusCode` (int, required). A valid status code between 200 and 511 ([see the official documentation](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses) for more information) * `header`:     * `name` (string, required)     * `value` (string, required)     * `mode` (string, required). One of `override`, `default`, `replace`, `append`, `add`     * `override` (bool, deprecated). Use the `mode` property instead. * `meta`:     * `type` (string, required). One of `title`, `description`, `keywords`, `author`, `og:title`, `og:description`, `og:type`, `og:image`, `og:url`, `og:locale`, `og:site_name`, 'canonical`     * `value` (string, required)     * `replace` (bool, required) * `redirection`:     * `location` (string, required)     * `statusCode` (int, required). One of `301`, `302`, `307`, `308` * `requestHeader`: modifies the request forwarded to the backend. Not allowed on a rule with a response status code trigger.     * `name` (string, required). Connection-level headers (`Host`, `Content-Length`, `Transfer-Encoding`, `Connection`, …) cannot be modified.     * `value` (string, required unless `mode` is `remove`)     * `mode` (string, required). One of `override`, `default`, `replace`, `add`, `remove` * `robotsTxt`:     * `content` (string, required) * `sitemap`:     * `name` (string)     * `content` (string, required) * `structuredData`:     * `value` (string, required), description: str # This description field is used to describe the rule and share knowledge with other users, enabled: bool=true # Set to `false` to disable this rule, examples: [map{datetime: str(date-time), headers: [map], ipAddress: str, method: str, mustMatch!: bool, responseBody: str, responseHeaders: [map], responseStatusCode: int, url!: str}] # Examples are useful to test your rule. They are not used in production., markers: [map{}] # Each `Marker` must be an object with a `type` property, and some other properties according to its type: * `anything`: No options * `custom`:     * `regex` (string, required) * `enum`     * `values` (array of string, required) * `date`: No options * `datetime`: No options * `integer`:     * `minimum` (int, required)     * `maximum` (int, required) * `string`:     * `allowLowercaseAlphabet` (bool)     * `allowUppercaseAlphabet` (bool)     * `allowDigits` (bool)     * `allowPercentEncodedChars` (bool)     * `specificCharacters` (array of string of length 1)     * `startingWith` (string)     * `endingWith` (string)     * `containing` (string) * `uuid`: No options, metadata: map, priority: int=0 # A rule with higher priority takes precedence over lower priorities, which means that the actions defined in the higher priority rule will override the similar actions defined in a lower priority one, project: str(iri-reference) # An IRI reference to the project, of the form `/projects/{project_id}`., tags: [str] # Tags are useful to filter rules and retrieve them easily, trigger: map{date: [map], datetime: [map], excludeMethods: bool, excludeResponseStatusCodes: bool, ipAddress: any, methods: [str], requestHeaders: [map], responseStatusCodes: [int], sampling: int, source!: str, time: [map]}, variables: [map{}]}\n@returns(200) {id: str, rule: map{actions: [map], description: str?, enabled: bool, examples: [map], id: str, lastUsedAt: str(date-time)?, markers: [map], metadata: map, priority: int, tags: [str], trigger: map{date: [map], datetime: [map], excludeMethods: bool, excludeResponseStatusCodes: bool, ipAddress: any, methods: [str], requestHeaders: [map], responseStatusCodes: [int], sampling: int?, source: str, time: [map]}, usageCount: int, variables: [map]}, status: str} # Draft rule resource updated (with the status `update`)\n@errors {400: Invalid input, 403: Forbidden, 404: Not found, 422: An error occurred}\n\n@endpoint GET /rules/{id}/statistics\n@desc Retrieves the usage statistics of a rule.\n@required {id: str # The id of the rule.}\n@optional {start: str # The start date of the statistic usage in RFC 3339 format (without milliseconds). If not provided, the statistics from the rule creation date will be used., end: str # The end date of the statistic usage in RFC 3339 format (without milliseconds).}\n@returns(200) RuleStatistic collection\n@errors {403: Forbidden}\n\n@endgroup\n\n@end\n"}