{"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@required {project: str(iri-reference) # An IRI reference to the project, of the form `/projects/{project_id}`., trigger: map{date: [map], datetime: [map], excludeMethods: bool, excludeResponseStatusCodes: bool, ipAddress: any, methods: [str], requestHeaders: [map], responseStatusCodes: [int], sampling: int, source!: str, time: [map]}}\n@optional {actions: [map{}], 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, responseStatusCode: int, url!: str}], markers: [map{}], 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, tags: [str] # Tags are useful to filter rules and retrieve them easily, 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, project: str(iri-reference) # An IRI reference to the project, of the form `/projects/{project_id}`., trigger: map{date: [map], datetime: [map], excludeMethods: bool, excludeResponseStatusCodes: bool, ipAddress: any, methods: [str], requestHeaders: [map], responseStatusCodes: [int], sampling: int, source!: str, time: [map]}}\n@optional {actions: [map{}], 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, responseStatusCode: int, url!: str}], markers: [map{}], 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, tags: [str] # Tags are useful to filter rules and retrieve them easily, 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., projectId: str}\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"}