import{S as Ye,i as Qe,s as Je,e as o,k as i,w as pe,t as l,M as ze,c as s,d as a,m as f,a as r,x as de,h as n,b as d,G as t,g as p,y as ue,L as Fe,q as ve,o as Ee,B as me,v as Ke}from"../chunks/vendor-hf-doc-builder.js";import{I as Ue}from"../chunks/IconCopyLink-hf-doc-builder.js";import{C as Ve}from"../chunks/CodeBlock-hf-doc-builder.js";function We(_e){let v,rt,E,$,q,I,Tt,M,wt,lt,x,bt,nt,G,it,O,$t,ft,y,U,m,Y,yt,At,Q,Pt,Dt,J,It,Gt,_,g,z,Rt,kt,F,St,xt,C,K,Ot,Ct,Ht,T,V,jt,Bt,W,Lt,Nt,c,qt,X,Mt,Ut,Yt,Qt,Z,Jt,zt,Ft,Kt,tt,Vt,Wt,Xt,w,et,Zt,te,at,ee,ae,ht,ct,b,A,ot,R,oe,st,se,pt,P,re,k,le,ne,dt,D,ie,S,fe,he,ut;return I=new Ue({}),G=new Ve({props:{code:"https://datasets-server.huggingface.co",highlighted:'https:<span class="hljs-regexp">//</span>datasets-server.huggingface.co'}}),R=new Ue({}),{c(){v=o("meta"),rt=i(),E=o("h1"),$=o("a"),q=o("span"),pe(I.$$.fragment),Tt=i(),M=o("span"),wt=l("API reference"),lt=i(),x=o("p"),bt=l("The base URL of the REST API is"),nt=i(),pe(G.$$.fragment),it=i(),O=o("p"),$t=l("It provides the following endpoints:"),ft=i(),y=o("table"),U=o("thead"),m=o("tr"),Y=o("th"),yt=l("Endpoint"),At=i(),Q=o("th"),Pt=l("Description"),Dt=i(),J=o("th"),It=l("Query parameters"),Gt=i(),_=o("tbody"),g=o("tr"),z=o("td"),Rt=l("/splits GET"),kt=i(),F=o("td"),St=l("Get the list of configurations and splits of a dataset."),xt=i(),C=o("td"),K=o("code"),Ot=l("dataset"),Ct=l(": name of the dataset"),Ht=i(),T=o("tr"),V=o("td"),jt=l("/first-rows GET"),Bt=i(),W=o("td"),Lt=l("Get the first rows of a dataset split."),Nt=i(),c=o("td"),qt=l("- "),X=o("code"),Mt=l("dataset"),Ut=l(": name of the dataset"),Yt=o("br"),Qt=l("- "),Z=o("code"),Jt=l("config"),zt=l(": name of the config"),Ft=o("br"),Kt=l("- "),tt=o("code"),Vt=l("split"),Wt=l(": name of the split"),Xt=i(),w=o("tr"),et=o("td"),Zt=l("/valid GET"),te=i(),at=o("td"),ee=l("Get the list of datasets hosted in the Hub and supported by the datasets server."),ae=i(),ht=o("td"),ct=i(),b=o("h2"),A=o("a"),ot=o("span"),pe(R.$$.fragment),oe=i(),st=o("span"),se=l("OpenAPI specification"),pt=i(),P=o("p"),re=l("The OpenAPI (fka Swagger) specification is published at "),k=o("a"),le=l("https://datasets-server.huggingface.co/openapi.json"),ne=l("."),dt=i(),D=o("p"),ie=l("You can explore it with ReDoc at "),S=o("a"),fe=l("https://redocly.github.io/redoc/?url=https://datasets-server.huggingface.co/openapi.json"),he=l("."),this.h()},l(e){const h=ze('[data-svelte="svelte-1phssyn"]',document.head);v=s(h,"META",{name:!0,content:!0}),h.forEach(a),rt=f(e),E=s(e,"H1",{class:!0});var vt=r(E);$=s(vt,"A",{id:!0,class:!0,href:!0});var ge=r($);q=s(ge,"SPAN",{});var Te=r(q);de(I.$$.fragment,Te),Te.forEach(a),ge.forEach(a),Tt=f(vt),M=s(vt,"SPAN",{});var we=r(M);wt=n(we,"API reference"),we.forEach(a),vt.forEach(a),lt=f(e),x=s(e,"P",{});var be=r(x);bt=n(be,"The base URL of the REST API is"),be.forEach(a),nt=f(e),de(G.$$.fragment,e),it=f(e),O=s(e,"P",{});var $e=r(O);$t=n($e,"It provides the following endpoints:"),$e.forEach(a),ft=f(e),y=s(e,"TABLE",{});var Et=r(y);U=s(Et,"THEAD",{});var ye=r(U);m=s(ye,"TR",{});var H=r(m);Y=s(H,"TH",{});var Ae=r(Y);yt=n(Ae,"Endpoint"),Ae.forEach(a),At=f(H),Q=s(H,"TH",{});var Pe=r(Q);Pt=n(Pe,"Description"),Pe.forEach(a),Dt=f(H),J=s(H,"TH",{});var De=r(J);It=n(De,"Query parameters"),De.forEach(a),H.forEach(a),ye.forEach(a),Gt=f(Et),_=s(Et,"TBODY",{});var j=r(_);g=s(j,"TR",{});var B=r(g);z=s(B,"TD",{});var Ie=r(z);Rt=n(Ie,"/splits GET"),Ie.forEach(a),kt=f(B),F=s(B,"TD",{});var Ge=r(F);St=n(Ge,"Get the list of configurations and splits of a dataset."),Ge.forEach(a),xt=f(B),C=s(B,"TD",{});var ce=r(C);K=s(ce,"CODE",{});var Re=r(K);Ot=n(Re,"dataset"),Re.forEach(a),Ct=n(ce,": name of the dataset"),ce.forEach(a),B.forEach(a),Ht=f(j),T=s(j,"TR",{});var L=r(T);V=s(L,"TD",{});var ke=r(V);jt=n(ke,"/first-rows GET"),ke.forEach(a),Bt=f(L),W=s(L,"TD",{});var Se=r(W);Lt=n(Se,"Get the first rows of a dataset split."),Se.forEach(a),Nt=f(L),c=s(L,"TD",{});var u=r(c);qt=n(u,"- "),X=s(u,"CODE",{});var xe=r(X);Mt=n(xe,"dataset"),xe.forEach(a),Ut=n(u,": name of the dataset"),Yt=s(u,"BR",{}),Qt=n(u,"- "),Z=s(u,"CODE",{});var Oe=r(Z);Jt=n(Oe,"config"),Oe.forEach(a),zt=n(u,": name of the config"),Ft=s(u,"BR",{}),Kt=n(u,"- "),tt=s(u,"CODE",{});var Ce=r(tt);Vt=n(Ce,"split"),Ce.forEach(a),Wt=n(u,": name of the split"),u.forEach(a),L.forEach(a),Xt=f(j),w=s(j,"TR",{});var N=r(w);et=s(N,"TD",{});var He=r(et);Zt=n(He,"/valid GET"),He.forEach(a),te=f(N),at=s(N,"TD",{});var je=r(at);ee=n(je,"Get the list of datasets hosted in the Hub and supported by the datasets server."),je.forEach(a),ae=f(N),ht=s(N,"TD",{}),r(ht).forEach(a),N.forEach(a),j.forEach(a),Et.forEach(a),ct=f(e),b=s(e,"H2",{class:!0});var mt=r(b);A=s(mt,"A",{id:!0,class:!0,href:!0});var Be=r(A);ot=s(Be,"SPAN",{});var Le=r(ot);de(R.$$.fragment,Le),Le.forEach(a),Be.forEach(a),oe=f(mt),st=s(mt,"SPAN",{});var Ne=r(st);se=n(Ne,"OpenAPI specification"),Ne.forEach(a),mt.forEach(a),pt=f(e),P=s(e,"P",{});var _t=r(P);re=n(_t,"The OpenAPI (fka Swagger) specification is published at "),k=s(_t,"A",{href:!0,rel:!0});var qe=r(k);le=n(qe,"https://datasets-server.huggingface.co/openapi.json"),qe.forEach(a),ne=n(_t,"."),_t.forEach(a),dt=f(e),D=s(e,"P",{});var gt=r(D);ie=n(gt,"You can explore it with ReDoc at "),S=s(gt,"A",{href:!0,rel:!0});var Me=r(S);fe=n(Me,"https://redocly.github.io/redoc/?url=https://datasets-server.huggingface.co/openapi.json"),Me.forEach(a),he=n(gt,"."),gt.forEach(a),this.h()},h(){d(v,"name","hf:doc:metadata"),d(v,"content",JSON.stringify(Xe)),d($,"id","api-reference"),d($,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d($,"href","#api-reference"),d(E,"class","relative group"),d(A,"id","openapi-specification"),d(A,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(A,"href","#openapi-specification"),d(b,"class","relative group"),d(k,"href","https://datasets-server.huggingface.co/openapi.json"),d(k,"rel","nofollow"),d(S,"href","https://redocly.github.io/redoc/?url=https://datasets-server.huggingface.co/openapi.json"),d(S,"rel","nofollow")},m(e,h){t(document.head,v),p(e,rt,h),p(e,E,h),t(E,$),t($,q),ue(I,q,null),t(E,Tt),t(E,M),t(M,wt),p(e,lt,h),p(e,x,h),t(x,bt),p(e,nt,h),ue(G,e,h),p(e,it,h),p(e,O,h),t(O,$t),p(e,ft,h),p(e,y,h),t(y,U),t(U,m),t(m,Y),t(Y,yt),t(m,At),t(m,Q),t(Q,Pt),t(m,Dt),t(m,J),t(J,It),t(y,Gt),t(y,_),t(_,g),t(g,z),t(z,Rt),t(g,kt),t(g,F),t(F,St),t(g,xt),t(g,C),t(C,K),t(K,Ot),t(C,Ct),t(_,Ht),t(_,T),t(T,V),t(V,jt),t(T,Bt),t(T,W),t(W,Lt),t(T,Nt),t(T,c),t(c,qt),t(c,X),t(X,Mt),t(c,Ut),t(c,Yt),t(c,Qt),t(c,Z),t(Z,Jt),t(c,zt),t(c,Ft),t(c,Kt),t(c,tt),t(tt,Vt),t(c,Wt),t(_,Xt),t(_,w),t(w,et),t(et,Zt),t(w,te),t(w,at),t(at,ee),t(w,ae),t(w,ht),p(e,ct,h),p(e,b,h),t(b,A),t(A,ot),ue(R,ot,null),t(b,oe),t(b,st),t(st,se),p(e,pt,h),p(e,P,h),t(P,re),t(P,k),t(k,le),t(P,ne),p(e,dt,h),p(e,D,h),t(D,ie),t(D,S),t(S,fe),t(D,he),ut=!0},p:Fe,i(e){ut||(ve(I.$$.fragment,e),ve(G.$$.fragment,e),ve(R.$$.fragment,e),ut=!0)},o(e){Ee(I.$$.fragment,e),Ee(G.$$.fragment,e),Ee(R.$$.fragment,e),ut=!1},d(e){a(v),e&&a(rt),e&&a(E),me(I),e&&a(lt),e&&a(x),e&&a(nt),me(G,e),e&&a(it),e&&a(O),e&&a(ft),e&&a(y),e&&a(ct),e&&a(b),me(R),e&&a(pt),e&&a(P),e&&a(dt),e&&a(D)}}}const Xe={local:"api-reference",sections:[{local:"openapi-specification",title:"OpenAPI specification"}],title:"API reference"};function Ze(_e){return Ke(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class oa extends Ye{constructor(v){super();Qe(this,v,Ze,We,Je,{})}}export{oa as default,Xe as metadata};
