lipu-pali/static/openapi.json
2025-05-23 17:35:26 +01:00

1 line
No EOL
23 KiB
JSON

{"openapi":"3.1.0","info":{"title":"jasima.app API","description":":::info[Under construction]\nThis documentation is a work in progress. Please [get in touch](/contact) with us if you have any questions.\n:::\n\nLearn how to use the jasima.app API.\nEverything that can be done within the portal can also be achieved using our API, documented in this section.\n\n## Authentication\n\nWe use OpenID Connect for authentication, and authentication must be performed using your normal user account with the\nauthorisation code flow.\nYou may set the `redirect_uri` to `localhost` (any port) to allow the use of desktop applications, command-line tools,\nor scripts.\nOnce you have retrieved your access token, this should be passed to the API in an \"Authorization\" header:\n\n```http request\nAuthorization: Bearer <token>\n```\n\nAdditionally, you must pass a header containing your organisation identifier.\nThis allows individual users to operate on the resources of multiple organisations without requiring multiple user\ncredentials.\n\n```http request\nOrganisation-Id: 263\n```\n\n## Data Format\n\nThe API uses JSON as the default format for both requests and responses, ensuring consistency and simplicity in data\nhandling:\n\n* For GET requests, the API expects parameters to be passed via query strings.\n* For other HTTP methods (e.g., POST, PUT), the request body (if required) should be formatted as JSON.\n\nThere is no need to explicitly specify content encoding in the headers, as the API assumes JSON by default for all\napplicable requests and responses.\n\n## Pagination\n\nThe API supports pagination to manage large datasets efficiently. Use the page and perPage query parameters to control the data returned in your requests.\nParameters:\n\n* page: The page number to retrieve.\n* size: The number of items to include per page.\n\nExample request:\n\n```http request\nGET https://api.jasima.app/api/v1/widgets?page=1&size=10\n```\n\nExample response:\n\n```http request\n{\n \"items\": [\n ],\n \"total\": 0,\n \"page\": 1,\n \"size\": 10,\n \"pages\": 0\n}\n```\n\nBear in mind the following:\n\n* The `page` field in the response indicates the current page being viewed. \n* The `total` field shows the total number of items available.\n* The `pages` field indicates the total number of pages, and can be used to determine whether there are additional pages\n to fetch.\n\nUse this structure to efficiently navigate through large datasets while ensuring optimal performance.\n\n## Errors\n\n:::info[TODO]\nDocument the common status codes, and the validation error response format.\n:::\n\n## Schemas","version":"0.0.0"},"paths":{"/api/v1/mirrors/origins":{"get":{"tags":["Web Mirrors"],"summary":"Get Origins","operationId":"get_origins_api_v1_mirrors_origins_get","security":[{"OpenIdConnect":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"organisation-id","in":"header","required":false,"schema":{"type":"integer","title":"Organisation ID","description":"The ID of your organisation. You can find this within the portal.","default":1},"description":"The ID of your organisation. You can find this within the portal."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_MirrorsOriginSummary_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Web Mirrors"],"summary":"Create Origin","operationId":"create_origin_api_v1_mirrors_origins_post","security":[{"OpenIdConnect":[]}],"parameters":[{"name":"organisation-id","in":"header","required":false,"schema":{"type":"integer","title":"Organisation ID","description":"The ID of your organisation. You can find this within the portal.","default":1},"description":"The ID of your organisation. You can find this within the portal."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirrorsOriginCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mirrors/origins/{origin_id}":{"get":{"tags":["Web Mirrors"],"summary":"Get Origin","operationId":"get_origin_api_v1_mirrors_origins__origin_id__get","security":[{"OpenIdConnect":[]}],"parameters":[{"name":"origin_id","in":"path","required":true,"schema":{"type":"integer","title":"Origin Id"}},{"name":"organisation-id","in":"header","required":false,"schema":{"type":"integer","title":"Organisation ID","description":"The ID of your organisation. You can find this within the portal.","default":1},"description":"The ID of your organisation. You can find this within the portal."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirrorsOriginDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Web Mirrors"],"summary":"Update Origin","operationId":"update_origin_api_v1_mirrors_origins__origin_id__put","security":[{"OpenIdConnect":[]}],"parameters":[{"name":"origin_id","in":"path","required":true,"schema":{"type":"integer","title":"Origin Id"}},{"name":"organisation-id","in":"header","required":false,"schema":{"type":"integer","title":"Organisation ID","description":"The ID of your organisation. You can find this within the portal.","default":1},"description":"The ID of your organisation. You can find this within the portal."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirrorsOriginUpdate"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Web Mirrors"],"summary":"Delete Origin","operationId":"delete_origin_api_v1_mirrors_origins__origin_id__delete","security":[{"OpenIdConnect":[]}],"parameters":[{"name":"origin_id","in":"path","required":true,"schema":{"type":"integer","title":"Origin Id"}},{"name":"organisation-id","in":"header","required":false,"schema":{"type":"integer","title":"Organisation ID","description":"The ID of your organisation. You can find this within the portal.","default":1},"description":"The ID of your organisation. You can find this within the portal."}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mirrors/named":{"get":{"tags":["Web Mirrors"],"summary":"Get Named Mirrors","operationId":"get_named_mirrors_api_v1_mirrors_named_get","security":[{"OpenIdConnect":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"name":"organisation-id","in":"header","required":false,"schema":{"type":"integer","title":"Organisation ID","description":"The ID of your organisation. You can find this within the portal.","default":1},"description":"The ID of your organisation. You can find this within the portal."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_MirrorsNamedSummary_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Web Mirrors"],"summary":"Create Named Mirror","operationId":"create_named_mirror_api_v1_mirrors_named_post","security":[{"OpenIdConnect":[]}],"parameters":[{"name":"organisation-id","in":"header","required":false,"schema":{"type":"integer","title":"Organisation ID","description":"The ID of your organisation. You can find this within the portal.","default":1},"description":"The ID of your organisation. You can find this within the portal."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirrorsNamedCreate"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mirrors/named/{mirror_id}":{"get":{"tags":["Web Mirrors"],"summary":"Get Named Mirror","operationId":"get_named_mirror_api_v1_mirrors_named__mirror_id__get","security":[{"OpenIdConnect":[]}],"parameters":[{"name":"mirror_id","in":"path","required":true,"schema":{"type":"integer","title":"Mirror Id"}},{"name":"organisation-id","in":"header","required":false,"schema":{"type":"integer","title":"Organisation ID","description":"The ID of your organisation. You can find this within the portal.","default":1},"description":"The ID of your organisation. You can find this within the portal."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirrorsNamedDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Web Mirrors"],"summary":"Update Named Mirror","operationId":"update_named_mirror_api_v1_mirrors_named__mirror_id__put","security":[{"OpenIdConnect":[]}],"parameters":[{"name":"organisation-id","in":"header","required":false,"schema":{"type":"integer","title":"Organisation ID","description":"The ID of your organisation. You can find this within the portal.","default":1},"description":"The ID of your organisation. You can find this within the portal."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirrorsNamedUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Web Mirrors"],"summary":"Delete Named Mirror","operationId":"delete_named_mirror_api_v1_mirrors_named__mirror_id__delete","security":[{"OpenIdConnect":[]}],"parameters":[{"name":"mirror_id","in":"path","required":true,"schema":{"type":"integer","title":"Mirror Id"}},{"name":"organisation-id","in":"header","required":false,"schema":{"type":"integer","title":"Organisation ID","description":"The ID of your organisation. You can find this within the portal.","default":1},"description":"The ID of your organisation. You can find this within the portal."}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AcceptedResponse":{"properties":{"id":{"type":"integer","title":"Id"}},"type":"object","required":["id"],"title":"AcceptedResponse","description":"A generic payload to respond with where a request has been accepted but perhaps has not yet been processed.\nPairs well with HTTP status code 201."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"MirrorsNamedCreate":{"properties":{"name":{"type":"string","pattern":"[A-Za-z]\\Z","title":"Name","examples":["www.example.com"]},"provider":{"$ref":"#/components/schemas/MirrorsNamedProvider"},"description":{"type":"string","title":"Description","examples":["example description"]},"origin_id":{"type":"integer","title":"Origin Id"}},"type":"object","required":["name","provider","description","origin_id"],"title":"MirrorsNamedCreate"},"MirrorsNamedDetail":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","pattern":"[A-Za-z]\\Z","title":"Name","examples":["www.example.com"]},"provider":{"$ref":"#/components/schemas/MirrorsNamedProvider"},"description":{"type":"string","title":"Description","examples":["example description"]},"origin_id":{"type":"integer","title":"Origin Id"},"origin_host":{"type":"string","title":"Origin Host","examples":["www.example.org"]},"deployment_status":{"$ref":"#/components/schemas/TofuInstanceStatus"},"deployment_status_changed_at":{"type":"string","format":"date-time","title":"Deployment Status Changed At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"subdomains":{"patternProperties":{"[A-Za-z]\\Z":{"$ref":"#/components/schemas/MirrorsOriginReference"}},"type":"object","title":"Subdomains"}},"type":"object","required":["id","name","provider","description","origin_id","origin_host","deployment_status","deployment_status_changed_at","created_at","updated_at","subdomains"],"title":"MirrorsNamedDetail"},"MirrorsNamedProvider":{"type":"string","enum":["AWS","CLOUDFLARE"],"title":"MirrorsNamedProvider"},"MirrorsNamedSummary":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","pattern":"[A-Za-z]\\Z","title":"Name","examples":["www.example.com"]},"provider":{"$ref":"#/components/schemas/MirrorsNamedProvider"},"description":{"type":"string","title":"Description","examples":["example description"]},"origin_id":{"type":"integer","title":"Origin Id"},"origin_host":{"type":"string","title":"Origin Host","examples":["www.example.org"]},"deployment_status":{"$ref":"#/components/schemas/TofuInstanceStatus"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","provider","description","origin_id","origin_host","deployment_status","created_at","updated_at"],"title":"MirrorsNamedSummary"},"MirrorsNamedUpdate":{"properties":{"description":{"type":"string","title":"Description"}},"type":"object","required":["description"],"title":"MirrorsNamedUpdate"},"MirrorsOriginCreate":{"properties":{"description":{"type":"string","title":"Description","examples":["Main website","Images CDN"]},"host":{"type":"string","pattern":"[A-Za-z]\\Z","title":"Host","examples":["www.example.com"]},"first_party_adobe":{"anyOf":[{"$ref":"#/components/schemas/MirrorsRewriterConfigurationOriginFirstParty"},{"type":"null"}]},"first_party_tealium":{"anyOf":[{"$ref":"#/components/schemas/MirrorsRewriterConfigurationOriginFirstParty"},{"type":"null"}]},"geo_redirect_disable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Geo Redirect Disable","examples":[true]},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers","examples":[{"Friendly-Client":"258f3a074f9c34d687a142b9ba4fd809"}]},"host_connect":{"anyOf":[{"type":"string","pattern":"[A-Za-z]\\Z"},{"type":"null"}],"title":"Host Connect","examples":["www.example.org"]},"host_header":{"anyOf":[{"type":"string","pattern":"[A-Za-z]\\Z"},{"type":"null"}],"title":"Host Header","examples":["www.example.org"]},"host_ssl":{"anyOf":[{"type":"string","pattern":"[A-Za-z]\\Z"},{"type":"null"}],"title":"Host Ssl","examples":["www.example.org"]},"rewrite_disable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Rewrite Disable","examples":[true]}},"type":"object","required":["description","host"],"title":"MirrorsOriginCreate"},"MirrorsOriginDependency":{"properties":{"id":{"type":"integer","title":"Id"},"host":{"type":"string","title":"Host"},"description":{"type":"string","title":"Description"}},"type":"object","required":["id","host","description"],"title":"MirrorsOriginDependency"},"MirrorsOriginDetail":{"properties":{"id":{"type":"integer","title":"Id"},"host":{"type":"string","title":"Host"},"default_mirror":{"type":"string","title":"Default Mirror"},"description":{"type":"string","title":"Description"},"deployment_status":{"$ref":"#/components/schemas/TofuInstanceStatus"},"deployment_status_changed_at":{"type":"string","format":"date-time","title":"Deployment Status Changed At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"dependencies":{"items":{"$ref":"#/components/schemas/MirrorsOriginDependency"},"type":"array","title":"Dependencies"},"first_party_adobe":{"anyOf":[{"$ref":"#/components/schemas/MirrorsRewriterConfigurationOriginFirstParty"},{"type":"null"}]},"first_party_tealium":{"anyOf":[{"$ref":"#/components/schemas/MirrorsRewriterConfigurationOriginFirstParty"},{"type":"null"}]},"geo_redirect_disable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Geo Redirect Disable","examples":[true]},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers","examples":[{"Friendly-Client":"258f3a074f9c34d687a142b9ba4fd809"}]},"host_connect":{"anyOf":[{"type":"string","pattern":"[A-Za-z]\\Z"},{"type":"null"}],"title":"Host Connect","examples":["www.example.org"]},"host_header":{"anyOf":[{"type":"string","pattern":"[A-Za-z]\\Z"},{"type":"null"}],"title":"Host Header","examples":["www.example.org"]},"host_ssl":{"anyOf":[{"type":"string","pattern":"[A-Za-z]\\Z"},{"type":"null"}],"title":"Host Ssl","examples":["www.example.org"]},"rewrite_disable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Rewrite Disable","examples":[true]}},"type":"object","required":["id","host","default_mirror","description","deployment_status","deployment_status_changed_at","created_at","updated_at","dependencies"],"title":"MirrorsOriginDetail"},"MirrorsOriginReference":{"properties":{"id":{"type":"integer","title":"Id"},"host":{"type":"string","title":"Host"},"description":{"type":"string","title":"Description"}},"type":"object","required":["id","host","description"],"title":"MirrorsOriginReference"},"MirrorsOriginSummary":{"properties":{"id":{"type":"integer","title":"Id"},"host":{"type":"string","title":"Host"},"default_mirror":{"type":"string","title":"Default Mirror"},"description":{"type":"string","title":"Description"},"deployment_status":{"$ref":"#/components/schemas/TofuInstanceStatus"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","host","default_mirror","description","deployment_status","created_at","updated_at"],"title":"MirrorsOriginSummary"},"MirrorsOriginUpdate":{"properties":{"description":{"type":"string","title":"Description","examples":["Main website","Images CDN"]},"first_party_adobe":{"anyOf":[{"$ref":"#/components/schemas/MirrorsRewriterConfigurationOriginFirstParty"},{"type":"null"}]},"first_party_tealium":{"anyOf":[{"$ref":"#/components/schemas/MirrorsRewriterConfigurationOriginFirstParty"},{"type":"null"}]},"geo_redirect_disable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Geo Redirect Disable","examples":[true]},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers","examples":[{"Friendly-Client":"258f3a074f9c34d687a142b9ba4fd809"}]},"host_connect":{"anyOf":[{"type":"string","pattern":"[A-Za-z]\\Z"},{"type":"null"}],"title":"Host Connect","examples":["www.example.org"]},"host_header":{"anyOf":[{"type":"string","pattern":"[A-Za-z]\\Z"},{"type":"null"}],"title":"Host Header","examples":["www.example.org"]},"host_ssl":{"anyOf":[{"type":"string","pattern":"[A-Za-z]\\Z"},{"type":"null"}],"title":"Host Ssl","examples":["www.example.org"]},"rewrite_disable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Rewrite Disable","examples":[true]},"dependencies":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Dependencies","examples":[[1,2,3]]}},"type":"object","required":["description"],"title":"MirrorsOriginUpdate"},"MirrorsRewriterConfigurationOriginFirstParty":{"properties":{"subdomain":{"type":"string","title":"Subdomain"},"account":{"type":"string","title":"Account"}},"type":"object","required":["subdomain","account"],"title":"MirrorsRewriterConfigurationOriginFirstParty"},"OkResponse":{"properties":{"ok":{"type":"boolean","const":true,"title":"Ok"}},"type":"object","required":["ok"],"title":"OkResponse","description":"A generic payload to respond with to indicate success where no other information is required or available.\nPairs well with HTTP status code 200."},"Page_MirrorsNamedSummary_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/MirrorsNamedSummary"},"type":"array","title":"Items"},"total":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Total"},"page":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Page"},"size":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Size"},"pages":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Pages"}},"type":"object","required":["items","page","size"],"title":"Page[MirrorsNamedSummary]"},"Page_MirrorsOriginSummary_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/MirrorsOriginSummary"},"type":"array","title":"Items"},"total":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Total"},"page":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Page"},"size":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Size"},"pages":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Pages"}},"type":"object","required":["items","page","size"],"title":"Page[MirrorsOriginSummary]"},"TofuInstanceStatus":{"type":"string","enum":["ACTIVE","DEPLOYING","DESTROYED","DESTROYING","DRIFTED","FAILED","FAILED_DESTROY","PENDING","PENDING_DESTROY","PENDING_DRIFT_CHECK"],"title":"TofuInstanceStatus"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"OpenIdConnect":{"type":"openIdConnect","openIdConnectUrl":"https://id.guardianproject.info/realms/gp/.well-known/openid-configuration"}}}}