NAV
shell

Proxy

List proxies

curl -X GET
    -H "Authorization: Bearer ..."
    https://afosto.app/api/storage/quicq/proxies

200 response code

{
    "data": {
        "key": "5642275632473",
        "routes": {
            "path": "*",
            "origin": {
                "is_bucket": null,
                "uri": "https://myshop.com/static"
            },
            "settings": {
                "cache": {
                    "is_as_origin": null,
                    "is_public": null,
                    "age": 31536000
                },
                "auth": {
                    "is_required": null,
                    "scope": null
                }
            }
        },
        "auth": {
            "signature": {
                "secret": "ergiusvjhvxdriphgsjdrzelskurhgsreliuzghjrtsliudrjgsirdjfad",
                "auth": {
                    "is_required": null,
                    "scope": null
                },
                "cache": {
                    "is_as_origin": null,
                    "is_public": null,
                    "age": 31536000
                }
            }
        },
        "oauth": {
            "issuer": null,
            "client_id": null,
            "authorize_url": null,
            "return_url_key": null
        },
        "is_active": null,
        "is_suspended": null,
        "tenant_id": "5642275632473",
        "created_at": null,
        "updated_at": null
    },
    "page": {
        "first": "https://afosto.app/api/storage/quicq/proxies",
        "next": "https://afosto.app/api/storage/quicq/proxies?page[after]=GXSKBnqVhH36RuRal9n2fMfls",
        "after": "GXSKBnqVhH36RuRal9n2fMfls",
        "previous": "https://afosto.app/api/storage/quicq/proxies?page[after]=GXSKBnqVhH36RuRal9n2fMfls",
        "before": "GXSKBnqVhH36RuRal9n2fMfls"
    }
}

401 response code

{
    "error": {
        "code": 401,
        "message": "Unauthorized: invalid or expired authorization header",
        "details": null
    },
    "meta": null
}

403 response code

{
    "error": {
        "code": 403,
        "message": "Forbidden: insufficient scopes for resource",
        "details": null
    },
    "meta": null
}

500 response code

{
    "error": {
        "code": 500,
        "message": "Internal server error: something went wrong on our side",
        "details": null
    },
    "meta": null
}

400 response code

{
    "error": {
        "code": 400,
        "message": "Bad request: invalid filter, pagination or request body",
        "details": null
    },
    "meta": null
}

Returns the list of proxies

HTTP Request

GET https://afosto.app/api/storage/quicq/proxies

Query Parameters

Parameter Type Default Description
page[size] integer
page[after] string

Response fields

Content-type: application/json

Parameter Type Default Description
key string Unique URL identifier for proxy
routes.path string Input path
routes.origin.uri string Target URL
routes.settings.cache.age integer Age in seconds to cache for
auth.signature.secret string Unique token for wildcard routing
auth.signature.cache.age integer Age in seconds to cache for
tenant_id string ID for tenant

Create proxy

curl -X POST
    -H "Authorization: Bearer ..."
    -H "Content-Type: application/json"
    -d '{
    "data": {
        "key": "5642275632473",
        "routes": {
            "path": "*",
            "origin": {
                "is_bucket": null,
                "uri": "https://myshop.com/static"
            },
            "settings": {
                "cache": {
                    "is_as_origin": null,
                    "is_public": null,
                    "age": 31536000
                },
                "auth": {
                    "is_required": null,
                    "scope": null
                }
            }
        },
        "auth": {
            "signature": {
                "secret": "ergiusvjhvxdriphgsjdrzelskurhgsreliuzghjrtsliudrjgsirdjfad",
                "auth": {
                    "is_required": null,
                    "scope": null
                },
                "cache": {
                    "is_as_origin": null,
                    "is_public": null,
                    "age": 31536000
                }
            }
        },
        "oauth": {
            "issuer": null,
            "client_id": null,
            "authorize_url": null,
            "return_url_key": null
        },
        "is_active": null,
        "is_suspended": null,
        "tenant_id": "5642275632473",
        "created_at": null,
        "updated_at": null
    }
}'
    https://afosto.app/api/storage/quicq/proxies

201 response code

{
    "data": {
        "key": "5642275632473",
        "routes": {
            "path": "*",
            "origin": {
                "is_bucket": null,
                "uri": "https://myshop.com/static"
            },
            "settings": {
                "cache": {
                    "is_as_origin": null,
                    "is_public": null,
                    "age": 31536000
                },
                "auth": {
                    "is_required": null,
                    "scope": null
                }
            }
        },
        "auth": {
            "signature": {
                "secret": "ergiusvjhvxdriphgsjdrzelskurhgsreliuzghjrtsliudrjgsirdjfad",
                "auth": {
                    "is_required": null,
                    "scope": null
                },
                "cache": {
                    "is_as_origin": null,
                    "is_public": null,
                    "age": 31536000
                }
            }
        },
        "oauth": {
            "issuer": null,
            "client_id": null,
            "authorize_url": null,
            "return_url_key": null
        },
        "is_active": null,
        "is_suspended": null,
        "tenant_id": "5642275632473",
        "created_at": null,
        "updated_at": null
    },
    "page": null
}

401 response code

{
    "error": {
        "code": 401,
        "message": "Unauthorized: invalid or expired authorization header",
        "details": null
    },
    "meta": null
}

403 response code

{
    "error": {
        "code": 403,
        "message": "Forbidden: insufficient scopes for resource",
        "details": null
    },
    "meta": null
}

500 response code

{
    "error": {
        "code": 500,
        "message": "Internal server error: something went wrong on our side",
        "details": null
    },
    "meta": null
}

400 response code

{
    "error": {
        "code": 400,
        "message": "Bad request: invalid filter, pagination or request body",
        "details": null
    },
    "meta": null
}

Add a new proxy

HTTP Request

POST https://afosto.app/api/storage/quicq/proxies

Input body

Parameter Type Default Description
key string Unique URL identifier for proxy
routes.path string Input path
routes.origin.uri string Target URL
routes.settings.cache.age integer Age in seconds to cache for
auth.signature.secret string Unique token for wildcard routing
auth.signature.cache.age integer Age in seconds to cache for
tenant_id string ID for tenant

Response fields

Content-type: application/json

Parameter Type Default Description
key string Unique URL identifier for proxy
routes.path string Input path
routes.origin.uri string Target URL
routes.settings.cache.age integer Age in seconds to cache for
auth.signature.secret string Unique token for wildcard routing
auth.signature.cache.age integer Age in seconds to cache for
tenant_id string ID for tenant

Get proxy

curl -X GET
    -H "Authorization: Bearer ..."
    https://afosto.app/api/storage/quicq/proxies/{key}

200 response code

{
    "data": {
        "key": "5642275632473",
        "routes": {
            "path": "*",
            "origin": {
                "is_bucket": null,
                "uri": "https://myshop.com/static"
            },
            "settings": {
                "cache": {
                    "is_as_origin": null,
                    "is_public": null,
                    "age": 31536000
                },
                "auth": {
                    "is_required": null,
                    "scope": null
                }
            }
        },
        "auth": {
            "signature": {
                "secret": "ergiusvjhvxdriphgsjdrzelskurhgsreliuzghjrtsliudrjgsirdjfad",
                "auth": {
                    "is_required": null,
                    "scope": null
                },
                "cache": {
                    "is_as_origin": null,
                    "is_public": null,
                    "age": 31536000
                }
            }
        },
        "oauth": {
            "issuer": null,
            "client_id": null,
            "authorize_url": null,
            "return_url_key": null
        },
        "is_active": null,
        "is_suspended": null,
        "tenant_id": "5642275632473",
        "created_at": null,
        "updated_at": null
    },
    "page": null
}

401 response code

{
    "error": {
        "code": 401,
        "message": "Unauthorized: invalid or expired authorization header",
        "details": null
    },
    "meta": null
}

403 response code

{
    "error": {
        "code": 403,
        "message": "Forbidden: insufficient scopes for resource",
        "details": null
    },
    "meta": null
}

500 response code

{
    "error": {
        "code": 500,
        "message": "Internal server error: something went wrong on our side",
        "details": null
    },
    "meta": null
}

400 response code

{
    "error": {
        "code": 400,
        "message": "Bad request: invalid filter, pagination or request body",
        "details": null
    },
    "meta": null
}

404 response code

{
    "error": {
        "code": 404,
        "message": "Not found: could not find requested entity",
        "details": null
    },
    "meta": null
}

Returns the proxy configuration

HTTP Request

GET https://afosto.app/api/storage/quicq/proxies/{key}

URL Parameters

Parameter Type Default Description
key string

Response fields

Content-type: application/json

Parameter Type Default Description
key string Unique URL identifier for proxy
routes.path string Input path
routes.origin.uri string Target URL
routes.settings.cache.age integer Age in seconds to cache for
auth.signature.secret string Unique token for wildcard routing
auth.signature.cache.age integer Age in seconds to cache for
tenant_id string ID for tenant

Update proxy

curl -X PUT
    -H "Authorization: Bearer ..."
    -H "Content-Type: application/json"
    -d '{
    "data": {
        "key": "5642275632473",
        "routes": {
            "path": "*",
            "origin": {
                "is_bucket": null,
                "uri": "https://myshop.com/static"
            },
            "settings": {
                "cache": {
                    "is_as_origin": null,
                    "is_public": null,
                    "age": 31536000
                },
                "auth": {
                    "is_required": null,
                    "scope": null
                }
            }
        },
        "auth": {
            "signature": {
                "secret": "ergiusvjhvxdriphgsjdrzelskurhgsreliuzghjrtsliudrjgsirdjfad",
                "auth": {
                    "is_required": null,
                    "scope": null
                },
                "cache": {
                    "is_as_origin": null,
                    "is_public": null,
                    "age": 31536000
                }
            }
        },
        "oauth": {
            "issuer": null,
            "client_id": null,
            "authorize_url": null,
            "return_url_key": null
        },
        "is_active": null,
        "is_suspended": null,
        "tenant_id": "5642275632473",
        "created_at": null,
        "updated_at": null
    }
}'
    https://afosto.app/api/storage/quicq/proxies/{key}

204 response code


401 response code

{
    "error": {
        "code": 401,
        "message": "Unauthorized: invalid or expired authorization header",
        "details": null
    },
    "meta": null
}

403 response code

{
    "error": {
        "code": 403,
        "message": "Forbidden: insufficient scopes for resource",
        "details": null
    },
    "meta": null
}

500 response code

{
    "error": {
        "code": 500,
        "message": "Internal server error: something went wrong on our side",
        "details": null
    },
    "meta": null
}

400 response code

{
    "error": {
        "code": 400,
        "message": "Bad request: invalid filter, pagination or request body",
        "details": null
    },
    "meta": null
}

404 response code

{
    "error": {
        "code": 404,
        "message": "Not found: could not find requested entity",
        "details": null
    },
    "meta": null
}

Updates the proxy

HTTP Request

PUT https://afosto.app/api/storage/quicq/proxies/{key}

URL Parameters

Parameter Type Default Description
key string

Input body

Parameter Type Default Description
key string Unique URL identifier for proxy
routes.path string Input path
routes.origin.uri string Target URL
routes.settings.cache.age integer Age in seconds to cache for
auth.signature.secret string Unique token for wildcard routing
auth.signature.cache.age integer Age in seconds to cache for
tenant_id string ID for tenant

Delete proxy

curl -X DELETE
    -H "Authorization: Bearer ..."
    https://afosto.app/api/storage/quicq/proxies/{key}

204 response code


401 response code

{
    "error": {
        "code": 401,
        "message": "Unauthorized: invalid or expired authorization header",
        "details": null
    },
    "meta": null
}

403 response code

{
    "error": {
        "code": 403,
        "message": "Forbidden: insufficient scopes for resource",
        "details": null
    },
    "meta": null
}

500 response code

{
    "error": {
        "code": 500,
        "message": "Internal server error: something went wrong on our side",
        "details": null
    },
    "meta": null
}

404 response code

{
    "error": {
        "code": 404,
        "message": "Not found: could not find requested entity",
        "details": null
    },
    "meta": null
}

Deletes the proxy

HTTP Request

DELETE https://afosto.app/api/storage/quicq/proxies/{key}

URL Parameters

Parameter Type Default Description
key string

Errors

The Afosto API uses the following error codes:

Error Code Meaning
400 Bad request: invalid filter, pagination or request body
401 Unauthorized: invalid or expired authorization header
403 Forbidden: insufficient scopes for resource
404 Not found: could not find requested entity
500 Internal server error: something went wrong on our side