-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from lsst-sqre/tickets/DM-30839
DM-30839: Add in-app documentation for DP0.1
- Loading branch information
Showing
10 changed files
with
528 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import styled from 'styled-components'; | ||
|
||
export const Lede = styled.p` | ||
font-size: 1.3rem; | ||
margin-bottom: 2rem; | ||
`; | ||
|
||
export const CtaLink = styled.a` | ||
display: inline-block; | ||
font-size: 1.3rem; | ||
padding: 1rem; | ||
border-radius: 0.5rem; | ||
--tw-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); | ||
--tw-ring-offset-shadow: 0 0 transparent; | ||
--tw-ring-shadow: 0 0 transparent; | ||
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), | ||
var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); | ||
border: solid 1px transparent; | ||
background-color: var(--sqo-doc-card-background-color); | ||
&:hover { | ||
border: solid 1px var(--rsd-color-primary-600); | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
import Head from 'next/head'; | ||
import getConfig from 'next/config'; | ||
import PropTypes from 'prop-types'; | ||
import { Lede } from '../components/typography'; | ||
|
||
const pageDescription = | ||
'Integrate Rubin data into your analysis tools with APIs.'; | ||
|
||
export default function ApiAspectPage({ publicRuntimeConfig }) { | ||
return ( | ||
<> | ||
<Head> | ||
<title key="title">APIs | {publicRuntimeConfig.siteName}</title> | ||
<meta name="description" key="description" content={pageDescription} /> | ||
<meta | ||
property="og:title" | ||
key="ogtitle" | ||
content="Rubin Science Platform APIs" | ||
/> | ||
<meta | ||
property="og:description" | ||
key="ogdescription" | ||
content={pageDescription} | ||
/> | ||
</Head> | ||
|
||
<h1>Rubin Science Platform APIs</h1> | ||
|
||
<Lede>{pageDescription}</Lede> | ||
|
||
<h2>Table Access Protocol</h2> | ||
|
||
<p> | ||
You can access catalog data using the Table Access Protocol (TAP) | ||
service with popular tools such as{' '} | ||
<a href="http://www.star.bris.ac.uk/~mbt/topcat/">TOPCAT</a> (GUI) and{' '} | ||
<a href="https://pyvo.readthedocs.io/en/latest/index.html">pyvo</a>{' '} | ||
(Python package). The TAP endpoint is: | ||
</p> | ||
|
||
<pre> | ||
<code>https://data.lsst.cloud/api/tap</code> | ||
</pre> | ||
|
||
<p> | ||
To access the TAP service, you also need an{' '} | ||
<strong>access token</strong>: | ||
<ol> | ||
<li> | ||
Log into the Science Platform by clicking on the{' '} | ||
<strong>Log In</strong> button at the top-right of this page (if you | ||
aren't already logged in). | ||
</li> | ||
<li> | ||
Click on{' '} | ||
<a href="/auth/tokens"> | ||
<strong>Security tokens</strong> | ||
</a>{' '} | ||
from your user menu at the top-right of this page. | ||
</li> | ||
<li> | ||
On the <strong>Tokens</strong> page, click on{' '} | ||
<strong>Create Token</strong>. | ||
</li> | ||
<li> | ||
Fill out the fields: | ||
<ol> | ||
<li> | ||
Type a token name, such as <code>tap</code> | ||
</li> | ||
<li> | ||
Select the <strong>read:tap</strong> scope. | ||
</li> | ||
<li> | ||
Choose an expiration timeline. The default,{' '} | ||
<strong>Never</strong>, is good for tokens that you manage | ||
yourself. | ||
</li> | ||
<li> | ||
Click on <strong>Create</strong>. | ||
</li> | ||
</ol> | ||
</li> | ||
<li>Copy the token string and use it in any TAP client.</li> | ||
</ol> | ||
</p> | ||
</> | ||
); | ||
} | ||
|
||
ApiAspectPage.propTypes = { | ||
publicRuntimeConfig: PropTypes.object, | ||
}; | ||
|
||
export async function getServerSideProps() { | ||
const { serverRuntimeConfig, publicRuntimeConfig } = getConfig(); | ||
return { | ||
props: { | ||
serverRuntimeConfig, | ||
publicRuntimeConfig, | ||
}, | ||
}; | ||
} |
Oops, something went wrong.