import{r as t,p as h,q as i,w as n,z as s,t as r,R as e}from"./vendor.3d5b4206.js";const p={class:"markdown-body"},d={class:"two-up"},u={class:"left"},g=e("Provides detailed information about the project server, its schema, and its health. "),_=e("Learn more about Projects"),f=e("."),m=s("div",{class:"right"},[s("p",null,[s("div",{class:"table-of-contents"},[s("ul",null,[s("li",null,[s("a",{href:"#get-openapi-specification"},"Get OpenAPI Specification")]),s("li",null,[s("a",{href:"#get-graphql-sdl"},"Get GraphQL SDL")]),s("li",null,[s("a",{href:"#ping"},"Ping")]),s("li",null,[s("a",{href:"#info"},"Info")]),s("li",null,[s("a",{href:"#health"},"Health")])])])])],-1),j=s("hr",null,null,-1),y=s("h2",{id:"get-openapi-specification"},[e("Get OpenAPI Specification "),s("a",{class:"header-anchor",href:"#get-openapi-specification"},"#")],-1),v=s("p",null,"Retrieve the OpenAPI spec for the current project.",-1),b=s("div",{class:"two-up"},[s("div",{class:"left"},[s("div",{class:"tip hint"},[s("div",{class:"hint-title"},"Permissions"),s("p",null,"This OAS spec is based on the read permissions of the currently authenticated user.")]),s("h3",{id:"returns"},[e("Returns "),s("a",{class:"header-anchor",href:"#returns"},"#")]),s("p",null,[e("Object conforming to "),s("a",{href:"https://swagger.io/specification/",target:"_blank",rel:"noopener noreferrer"},"the OpenAPI Specification")])]),s("div",{class:"right"},[s("h3",{id:"rest-api"},[e("REST API "),s("a",{class:"header-anchor",href:"#rest-api"},"#")]),s("pre",null,[s("code",null,`GET /server/specs/oas
`)]),s("h3",{id:"graphql"},[e("GraphQL "),s("a",{class:"header-anchor",href:"#graphql"},"#")]),s("pre",null,[s("code",null,`POST /graphql/system
`)]),s("pre",null,[s("code",{class:"language-graphql"},[s("span",{class:"hljs-keyword"},"type"),s("span",{class:"hljs-type"}," Query"),e(` {
	server_specs_oas:`),s("span",{class:"hljs-type"}," String"),e(`
}
`)])]),s("h5",{id:"example"},[e("Example "),s("a",{class:"header-anchor",href:"#example"},"#")]),s("pre",null,[s("code",{class:"language-graphql"},[s("span",{class:"hljs-keyword"},"query"),e(` {
	server_specs_oas
}
`)])])])],-1),q=s("hr",null,null,-1),k=s("h2",{id:"get-graphql-sdl"},[e("Get GraphQL SDL "),s("a",{class:"header-anchor",href:"#get-graphql-sdl"},"#")],-1),w=s("p",null,"Retrieve the GraphQL SDL for the current project.",-1),S=s("div",{class:"two-up"},[s("div",{class:"left"},[s("div",{class:"tip hint"},[s("div",{class:"hint-title"},"Permissions"),s("p",null,"The SDL is based on the permissions of the currently authenticated user.")]),s("h3",{id:"returns-2"},[e("Returns "),s("a",{class:"header-anchor",href:"#returns-2"},"#")]),s("p",null,"GraphQL SDL file."),s("pre",null,[s("code",{class:"language-graphql"},[s("span",{class:"hljs-keyword"},"type"),e(` about_us {
  id:`),s("span",{class:"hljs-type"}," Int"),e(`
  introduction:`),s("span",{class:"hljs-type"}," String"),e(`
  our_process:`),s("span",{class:"hljs-type"}," String"),e(`
  sales_email:`),s("span",{class:"hljs-type"}," String"),e(`
  general_email:`),s("span",{class:"hljs-type"}," String"),e(`
  primary_color:`),s("span",{class:"hljs-type"}," String"),e(`
  secondary_color:`),s("span",{class:"hljs-type"}," String"),e(`
  logo: directus_files
  mark: directus_files
}

`),s("span",{class:"hljs-keyword"},"type"),e(` articles {
  id:`),s("span",{class:"hljs-type"}," Int"),e(`
  status:`),s("span",{class:"hljs-type"}," String"),e(`
	`),s("span",{class:"hljs-keyword"},"..."),e(`
`),s("span",{class:"hljs-comment"},"# etc"),e(`
`)])])]),s("div",{class:"right"},[s("h3",{id:"rest-api-2"},[e("REST API "),s("a",{class:"header-anchor",href:"#rest-api-2"},"#")]),s("pre",null,[s("code",null,`GET /server/specs/graphql/
GET /server/specs/graphql/system
`)]),s("h3",{id:"graphql-2"},[e("GraphQL "),s("a",{class:"header-anchor",href:"#graphql-2"},"#")]),s("pre",null,[s("code",null,`POST /graphql/system
`)]),s("pre",null,[s("code",{class:"language-graphql"},[s("span",{class:"hljs-keyword"},"type"),s("span",{class:"hljs-type"}," Query"),e(` {
	server_specs_graphql(scope: graphql_sdl_scope):`),s("span",{class:"hljs-type"}," String"),e(`
}
`)])]),s("h5",{id:"example-2"},[e("Example "),s("a",{class:"header-anchor",href:"#example-2"},"#")]),s("pre",null,[s("code",{class:"language-graphql"},[s("span",{class:"hljs-keyword"},"query"),e(` {
	server_specs_graphql(scope: `),s("span",{class:"hljs-string"},'"system"'),e(`)
}
`)])])])],-1),T=s("hr",null,null,-1),P=s("h2",{id:"ping"},[e("Ping "),s("a",{class:"header-anchor",href:"#ping"},"#")],-1),A=s("p",null,"Ping\u2026 pong! \u{1F3D3}",-1),G=s("div",{class:"two-up"},[s("div",{class:"left"},[s("h3",{id:"returns-3"},[e("Returns "),s("a",{class:"header-anchor",href:"#returns-3"},"#")]),s("p",null,"Pong.")]),s("div",{class:"right"},[s("h3",{id:"rest-api-3"},[e("REST API "),s("a",{class:"header-anchor",href:"#rest-api-3"},"#")]),s("pre",null,[s("code",null,`GET /server/ping
`)]),s("h3",{id:"graphql-3"},[e("GraphQL "),s("a",{class:"header-anchor",href:"#graphql-3"},"#")]),s("pre",null,[s("code",null,`POST /graphql/system
`)]),s("pre",null,[s("code",{class:"language-graphql"},[s("span",{class:"hljs-keyword"},"type"),s("span",{class:"hljs-type"}," Query"),e(` {
	server_ping:`),s("span",{class:"hljs-type"}," String"),e(`
}
`)])]),s("h5",{id:"example-3"},[e("Example "),s("a",{class:"header-anchor",href:"#example-3"},"#")]),s("pre",null,[s("code",{class:"language-graphql"},[s("span",{class:"hljs-keyword"},"query"),e(` {
	server_ping
}
`)])])])],-1),I=s("hr",null,null,-1),x=s("h2",{id:"info"},[e("Info "),s("a",{class:"header-anchor",href:"#info"},"#")],-1),E=s("p",null,"Information about the current installation.",-1),R={class:"two-up"},L={class:"left"},Q=s("div",{class:"tip hint"},[s("div",{class:"hint-title"},"Permissions"),s("p",null,"The public information is returned for everybody. Admin users get additional information (see below).")],-1),O=s("h3",{id:"returns-4"},[e("Returns "),s("a",{class:"header-anchor",href:"#returns-4"},"#")],-1),D={class:"definitions"},H=s("p",null,[s("code",null,"project"),e(),s("strong",null,"object"),s("br"),e(" Public information about the project. Used to render the Admin App public pages.")],-1),C=e("See "),V=e("the settings object"),B=e(" for more information on the individual properties of the "),N=s("code",null,"project",-1),U=e(" object."),W=s("p",null,"Admin users also get the following information:",-1),z=s("div",{class:"definitions"},[s("p",null,[s("code",null,"directus.version"),e(),s("strong",null,"string"),s("br"),e(" Current version of Directus used.")]),s("p",null,[s("code",null,"node.version"),e(),s("strong",null,"string"),s("br"),e(" Current version of Node used.")]),s("p",null,[s("code",null,"node.uptime"),e(),s("strong",null,"integer"),s("br"),e(" How long the current process has been running.")]),s("p",null,[s("code",null,"os.type"),e(),s("strong",null,"string"),s("br"),e(" What type of operation system is used.")]),s("p",null,[s("code",null,"os.version"),e(),s("strong",null,"string"),s("br"),e(" What version of the operation system is used.")]),s("p",null,[s("code",null,"os.uptime"),e(),s("strong",null,"string"),s("br"),e(" How long the operating system has been up.")]),s("p",null,[s("code",null,"os.totalmem"),e(),s("strong",null,"string"),s("br"),e(" How much memory is available on the operating system.")])],-1),F=s("div",{class:"right"},[s("h3",{id:"rest-api-4"},[e("REST API "),s("a",{class:"header-anchor",href:"#rest-api-4"},"#")]),s("pre",null,[s("code",null,`GET /server/info
`)]),s("h3",{id:"graphql-4"},[e("GraphQL "),s("a",{class:"header-anchor",href:"#graphql-4"},"#")]),s("pre",null,[s("code",null,`POST /graphql/system
`)]),s("pre",null,[s("code",{class:"language-graphql"},[s("span",{class:"hljs-keyword"},"type"),s("span",{class:"hljs-type"}," Query"),e(` {
	server_info: server_info
}
`)])]),s("h5",{id:"example-4"},[e("Example "),s("a",{class:"header-anchor",href:"#example-4"},"#")]),s("pre",null,[s("code",{class:"language-graphql"},[s("span",{class:"hljs-keyword"},"query"),e(` {
	server_info {
		directus {
			version
		}
	}
}
`)])])],-1),J=s("hr",null,null,-1),K=s("h2",{id:"health"},[e("Health "),s("a",{class:"header-anchor",href:"#health"},"#")],-1),M=s("p",null,"Get the current health status of the server.",-1),X=s("div",{class:"two-up"},[s("div",{class:"left"},[s("p",null,[e("The "),s("code",null,"/server/health"),e(" endpoint shows you a general health status for the server and all connected (third party) services, such as Redis or S3.")]),s("p",null,[e("The output is based on the \u201CHealth Check Response for HTTP APIs\u201D draft spec: "),s("a",{href:"https://tools.ietf.org/id/draft-inadarei-api-health-check-05.html",target:"_blank",rel:"noopener noreferrer"},"Health Check Response Format for HTTP APIs Draft Specification"),e(".")]),s("p",null,"This endpoint can be used to ensure a healthy system when running in a horizontally scaled setup, like Kubernetes, Google Cloud Platform or AWS Elastic Beanstalk."),s("p",null,[e("By default, the endpoint only returns a "),s("code",null,"status"),e(" of "),s("code",null,"ok"),e(", "),s("code",null,"warn"),e(" or "),s("code",null,"error"),e(". By authenticating as an admin, it will return more in-depth information about the current health status of the system.")]),s("pre",null,[s("code",{class:"language-json"},[s("span",{class:"hljs-comment"},"// Response"),e(`

`),s("span",{class:"hljs-comment"},"// Non-admin"),e(`
{
  `),s("span",{class:"hljs-attr"},'"status"'),e(": "),s("span",{class:"hljs-string"},'"ok"'),e(`
}

`),s("span",{class:"hljs-comment"},"// Admin"),e(`
{
  `),s("span",{class:"hljs-attr"},'"status"'),e(": "),s("span",{class:"hljs-string"},'"ok"'),e(`,
  `),s("span",{class:"hljs-attr"},'"releaseId"'),e(": "),s("span",{class:"hljs-string"},'"9.0.0"'),e(`,
  `),s("span",{class:"hljs-attr"},'"serviceId"'),e(": "),s("span",{class:"hljs-string"},'"3292c816-ae02-43b4-ba91-f0bb549f040c"'),e(`,
  `),s("span",{class:"hljs-attr"},'"checks"'),e(`: {
    `),s("span",{class:"hljs-attr"},'"pg:responseTime"'),e(`: [
      {
        `),s("span",{class:"hljs-attr"},'"status"'),e(": "),s("span",{class:"hljs-string"},'"ok"'),e(`,
        `),s("span",{class:"hljs-attr"},'"componentType"'),e(": "),s("span",{class:"hljs-string"},'"datastore"'),e(`,
        `),s("span",{class:"hljs-attr"},'"observedUnit"'),e(": "),s("span",{class:"hljs-string"},'"ms"'),e(`,
        `),s("span",{class:"hljs-attr"},'"observedValue"'),e(": "),s("span",{class:"hljs-number"},"0.489"),e(`
      }
    ],
    `),s("span",{class:"hljs-attr"},'"pg:connectionsAvailable"'),e(`: [
      {
        `),s("span",{class:"hljs-attr"},'"status"'),e(": "),s("span",{class:"hljs-string"},'"ok"'),e(`,
        `),s("span",{class:"hljs-attr"},'"componentType"'),e(": "),s("span",{class:"hljs-string"},'"datastore"'),e(`,
        `),s("span",{class:"hljs-attr"},'"observedValue"'),e(": "),s("span",{class:"hljs-number"},"2"),e(`
      }
    ],
    `),s("span",{class:"hljs-attr"},'"pg:connectionsUsed"'),e(`: [
      {
        `),s("span",{class:"hljs-attr"},'"status"'),e(": "),s("span",{class:"hljs-string"},'"ok"'),e(`,
        `),s("span",{class:"hljs-attr"},'"componentType"'),e(": "),s("span",{class:"hljs-string"},'"datastore"'),e(`,
        `),s("span",{class:"hljs-attr"},'"observedValue"'),e(": "),s("span",{class:"hljs-number"},"0"),e(`
      }
    ],
    `),s("span",{class:"hljs-attr"},'"storage:local:responseTime"'),e(`: [
      {
        `),s("span",{class:"hljs-attr"},'"status"'),e(": "),s("span",{class:"hljs-string"},'"ok"'),e(`,
        `),s("span",{class:"hljs-attr"},'"componentType"'),e(": "),s("span",{class:"hljs-string"},'"objectstore"'),e(`,
        `),s("span",{class:"hljs-attr"},'"observedValue"'),e(": "),s("span",{class:"hljs-number"},"1.038"),e(`,
        `),s("span",{class:"hljs-attr"},'"observedUnit"'),e(": "),s("span",{class:"hljs-string"},'"ms"'),e(`
      }
    ],
    `),s("span",{class:"hljs-attr"},'"email:connection"'),e(`: [
      {
        `),s("span",{class:"hljs-attr"},'"status"'),e(": "),s("span",{class:"hljs-string"},'"ok"'),e(`,
        `),s("span",{class:"hljs-attr"},'"componentType"'),e(": "),s("span",{class:"hljs-string"},'"email"'),e(`
      }
    ]
  }
}
`)])]),s("h3",{id:"returns-5"},[e("Returns "),s("a",{class:"header-anchor",href:"#returns-5"},"#")]),s("div",{class:"definitions"},[s("p",null,[s("code",null,"status"),e(),s("strong",null,"string"),s("br"),e(" One of "),s("code",null,"ok"),e(", "),s("code",null,"warn"),e(", "),s("code",null,"error"),e(".")])]),s("p",null,"Authenticated admin users also get the following information:"),s("div",{class:"definitions"},[s("p",null,[s("code",null,"releaseId"),e(),s("strong",null,"string"),s("br"),e(" Directus version in use.")]),s("p",null,[s("code",null,"serviceId"),e(),s("strong",null,"string"),s("br"),e(" UUID of the current Directus instance.")]),s("p",null,[s("code",null,"checks"),e(),s("strong",null,"array"),s("br"),e(" Array with the status of all individually connected services.")])])]),s("div",{class:"right"},[s("h3",{id:"rest-api-5"},[e("REST API "),s("a",{class:"header-anchor",href:"#rest-api-5"},"#")]),s("pre",null,[s("code",null,`GET /server/health
`)]),s("h3",{id:"graphql-5"},[e("GraphQL "),s("a",{class:"header-anchor",href:"#graphql-5"},"#")]),s("pre",null,[s("code",null,`POST /graphql/system
`)]),s("pre",null,[s("code",{class:"language-graphql"},[s("span",{class:"hljs-keyword"},"type"),s("span",{class:"hljs-type"}," Query"),e(` {
	server_health:`),s("span",{class:"hljs-literal"}," JSON"),e(`
}
`)])]),s("h5",{id:"example-5"},[e("Example "),s("a",{class:"header-anchor",href:"#example-5"},"#")]),s("pre",null,[s("code",{class:"language-graphql"},[s("span",{class:"hljs-keyword"},"query"),e(` {
	server_health
}
`)])])])],-1),Y=s("hr",null,null,-1),ns={setup(Z,{expose:o}){const l={title:"Server",modularExtension:!1,pageClass:"page-reference"};return o({frontmatter:l}),($,ss)=>{const a=t("router-link"),c=t("DocsWrapper");return h(),i(c,{frontmatter:l},{default:n(()=>[s("div",p,[s("div",d,[s("div",u,[s("blockquote",null,[s("p",null,[g,r(a,{to:"/docs/getting-started/glossary/#projects"},{default:n(()=>[_]),_:1}),f])])]),m]),j,y,v,b,q,k,w,S,T,P,A,G,I,x,E,s("div",R,[s("div",L,[Q,O,s("div",D,[H,s("p",null,[C,r(a,{to:"/docs/reference/system/settings/#the-settings-object"},{default:n(()=>[V]),_:1}),B,N,U])]),W,z]),F]),J,K,M,X,Y])]),_:1})}}};export{ns as default};
