NASA Image and Video Library (Independent Publisher) (#1306)

* Initial commit

* Tidying up descriptions and summaries

* Edited readme

* Fixed unicode, formatting and icon color
This commit is contained in:
paulculmsee 2022-02-08 05:12:46 +08:00 коммит произвёл GitHub
Родитель 1b2f85229a
Коммит 6cfe410c75
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 650 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,30 @@
# NASA Image and Video Library
NASA Image and Video Library: API to access the NASA Image and Video Library site at images.nasa.gov
## Publisher: Paul Culmsee, Seven Sigma
## Prerequisites
You can read more about the NASA Image and Video Library at [here](https://images.nasa.gov/docs/images.nasa.gov_api_docs.pdf).
## Obtaining Credentials
You do not need to authenticate in order to explore the NASA data. However, if you will be intensively using the APIs to, say, support a mobile application, then you should sign up for a NASA developer at [https://api.nasa.gov/#signUp](https://api.nasa.gov/#signUp).
## Supported Operations
### Search media
Perform a search
### Get media asset information
Retrieves a media assets manifest.
### Get video asset captions location
Retrieves a video assets captions location.
### Get media asset metadata location
Retrieves a media assets metadata location
### Get layers
Retrieving a video assets captions location.
## Known Issues and Limitations
There is an hourly rate limit of 1,000 requests per hour. If you exceed this limit, your key will be blocked for an hour.

Просмотреть файл

@ -0,0 +1,597 @@
{
"swagger": "2.0",
"info": {
"title": "NASA Image and Video Library",
"description": "Use this API to access the NASA Image and Video Library site at images.nasa.gov",
"version": "1.0",
"contact": {
"name": "Paul Culmsee",
"url": "https://www.sevensigma.com.au",
"email": "paul.culmsee@sevensigma.com.au"
}
},
"host": "images-api.nasa.gov",
"basePath": "/",
"schemes": [
"https"
],
"consumes": [],
"produces": [],
"paths": {
"/search": {
"get": {
"responses": {
"200": {
"description": "default",
"schema": {
"type": "object",
"properties": {
"collection": {
"type": "object",
"properties": {
"href": {
"type": "string",
"description": "URL of Result Set",
"title": "href"
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"center": {
"type": "string",
"description": "NASA center which published the media"
},
"date_created": {
"type": "string",
"description": "Media creation date"
},
"description": {
"type": "string",
"description": "Media description"
},
"album": {
"type": "array",
"items": {
"type": "string"
},
"description": "Albums this media belongs to"
},
"keywords": {
"type": "array",
"items": {
"type": "string"
},
"description": "Media keywords"
},
"media_type": {
"type": "string",
"description": "Media Type"
},
"nasa_id": {
"type": "string",
"description": "The media asset NASA ID"
},
"title": {
"type": "string",
"description": "Media Title"
}
}
},
"description": "Media metadata"
},
"href": {
"type": "string",
"description": "URL of detailed metadatsa for each result"
},
"links": {
"type": "array",
"items": {
"type": "object",
"properties": {
"href": {
"type": "string",
"description": "URL of media"
},
"rel": {
"type": "string",
"description": "Type of URL (eg preview)"
},
"render": {
"type": "string",
"description": "Format of media"
}
}
},
"description": "links"
}
}
},
"description": "items"
},
"links": {
"type": "array",
"items": {
"type": "object",
"properties": {
"href": {
"type": "string",
"description": "URL of result set"
},
"prompt": {
"type": "string",
"description": "Direction of result set"
},
"rel": {
"type": "string",
"description": "Link relation"
}
}
},
"description": "Links to additional result sets"
},
"metadata": {
"type": "object",
"properties": {
"total_hits": {
"type": "integer",
"format": "int32",
"description": "Total search hits"
}
},
"description": "Metadata about search results"
},
"version": {
"type": "string",
"description": "version"
}
},
"description": "collection"
}
}
}
}
},
"summary": "Search media",
"description": "Search media",
"operationId": "Search",
"parameters": [
{
"name": "q",
"in": "query",
"required": false,
"type": "string",
"description": "Free text search terms to compare to all indexed metadata.",
"x-ms-summary": "Search term",
"x-ms-visibility": "important"
},
{
"name": "center",
"in": "query",
"required": false,
"type": "string",
"description": "NASA center which published the media.",
"x-ms-summary": "NASA center"
},
{
"name": "description",
"in": "query",
"required": false,
"type": "string",
"description": "Terms to search for in 'Description' fields.",
"x-ms-summary": "'Description' field terms"
},
{
"name": "description_508",
"in": "query",
"required": false,
"type": "string",
"description": "Terms to search for in '508 Description' fields.",
"x-ms-summary": "'508 Description' field terms."
},
{
"name": "keywords",
"in": "query",
"required": false,
"type": "string",
"description": "Separate multiple values with commas.",
"x-ms-summary": "Terms to search for in 'Keywords' fields. "
},
{
"name": "location",
"in": "query",
"required": false,
"type": "string",
"description": "Terms to search for in 'Location' fields.",
"x-ms-summary": "Terms to search for in 'Location' fields."
},
{
"name": "media_type",
"in": "query",
"required": false,
"type": "string",
"description": "Media types to restrict the search to. Separate multiple values with commas",
"x-ms-summary": "Media types: ['image', 'audio', 'video']. Separate multiple values with commas"
},
{
"name": "nasa_id",
"in": "query",
"required": false,
"type": "string",
"description": "NASA Asset ID.",
"x-ms-summary": "The media asset NASA ID."
},
{
"name": "page",
"in": "query",
"required": false,
"type": "integer",
"description": "Page number",
"x-ms-summary": "Page number, starting at 1, of results to get.",
"x-ms-visibility": "advanced"
},
{
"name": "photographer",
"in": "query",
"required": false,
"type": "string",
"description": "Primary photographers name.",
"x-ms-summary": "The primary photographers name."
},
{
"name": "secondary_creator",
"in": "query",
"required": false,
"type": "string",
"description": "Secondary photographer or videographers name.",
"x-ms-summary": "Secondary photographer or videographers name."
},
{
"name": "title",
"in": "query",
"required": false,
"type": "string",
"description": "Terms to search for in 'Title' fields.",
"x-ms-summary": "Terms to search for in 'Title' fields."
},
{
"name": "year_start",
"in": "query",
"required": false,
"type": "integer",
"description": "Format: YYYY.",
"x-ms-summary": "The start year for results. Format: YYYY."
},
{
"name": "year_end",
"in": "query",
"required": false,
"type": "integer",
"description": "Format: YYYY.",
"x-ms-summary": "The end year for results. Format: YYYY."
}
],
"x-ms-visibility": "important"
}
},
"/asset/{nasa_id}": {
"get": {
"responses": {
"200": {
"description": "default",
"schema": {
"type": "object",
"properties": {
"collection": {
"type": "object",
"properties": {
"href": {
"type": "string",
"description": "Media asset manifest URL"
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"href": {
"type": "string",
"description": "URL to Media rendition"
}
}
},
"description": "items"
},
"version": {
"type": "string",
"description": "version"
}
},
"description": "collection"
}
}
}
}
},
"summary": "Get media asset information",
"description": "Get media asset information",
"operationId": "GetMediaAssetManifest",
"parameters": [
{
"name": "nasa_id",
"in": "path",
"required": true,
"type": "string",
"description": "The media asset NASA ID.",
"x-ms-summary": "The media asset NASA ID.",
"x-ms-url-encoding" : "single"
}
]
}
},
"/metadata/{nasa_id}": {
"get": {
"responses": {
"200": {
"description": "default",
"schema": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "location",
"title": "Location of the asset metadata."
}
}
}
}
},
"summary": "Get media asset metadata location",
"description": "Get media asset metadata location",
"operationId": "GetMediaAssetMetadataLocation",
"parameters": [
{
"name": "nasa_id",
"in": "path",
"required": true,
"type": "string",
"description": "The media asset NASA ID.",
"x-ms-summary": "The media asset NASA ID.",
"x-ms-url-encoding" : "single"
}
]
}
},
"/captions/{nasa_id}": {
"get": {
"responses": {
"200": {
"description": "default",
"schema": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "Video asset caption location.",
"title": "location"
}
}
}
}
},
"summary": "Get video asset captions location",
"description": "Get video asset captions location",
"operationId": "GetVideoAssetCaptionsLocation",
"parameters": [
{
"name": "nasa_id",
"in": "path",
"required": true,
"type": "string",
"description": "The media asset NASA ID.",
"x-ms-summary": "The media asset NASA ID.",
"x-ms-url-encoding" : "single"
}
]
}
},
"/album/{album_name}": {
"get": {
"responses": {
"200": {
"description": "default",
"schema": {
"type": "object",
"properties": {
"collection": {
"type": "object",
"properties": {
"version": {
"type": "string",
"description": "version"
},
"href": {
"type": "string",
"description": "href"
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"href": {
"type": "string",
"description": "URL of album"
},
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"album": {
"type": "array",
"items": {
"type": "string"
},
"description": "Album name"
},
"center": {
"type": "string",
"description": "NASA center which published the media"
},
"title": {
"type": "string",
"description": "Media title"
},
"photographer": {
"type": "string",
"description": "The primary photographers name"
},
"keywords": {
"type": "array",
"items": {
"type": "string"
},
"description": "Media keywords"
},
"nasa_id": {
"type": "string",
"description": "The media asset NASA ID"
},
"date_created": {
"type": "string",
"description": "Media creation date"
},
"media_type": {
"type": "string",
"description": "Media type"
},
"description": {
"type": "string",
"description": "Media description"
},
"location": {
"type": "string",
"description": "Media location"
}
}
},
"description": "Album contents"
},
"links": {
"type": "array",
"items": {
"type": "object",
"properties": {
"href": {
"type": "string",
"description": "Media URL"
},
"rel": {
"type": "string",
"description": "Type of URL (eg preview)"
},
"render": {
"type": "string",
"description": "Format of media"
}
}
},
"description": "links"
}
}
},
"description": "items"
},
"metadata": {
"type": "object",
"properties": {
"total_hits": {
"type": "integer",
"format": "int32",
"description": "Total search hits"
}
},
"description": "Metadata about album"
},
"links": {
"type": "array",
"items": {
"type": "object",
"properties": {
"rel": {
"type": "string",
"description": "Link relation"
},
"prompt": {
"type": "string",
"description": "Direction of result set"
},
"href": {
"type": "string",
"description": "URL of result set"
}
}
},
"description": "links"
}
},
"description": "collection"
}
}
}
}
},
"summary": "Get Media Album",
"description": "Get Media Album",
"operationId": "GetMediaAlbumContents",
"parameters": [
{
"name": "album_name",
"in": "path",
"required": true,
"type": "string",
"description": "The media album name (case sensitive).",
"x-ms-summary": "The media album name (case sensitive).",
"x-ms-url-encoding" : "single"
},
{
"name": "page",
"in": "query",
"required": false,
"type": "integer",
"x-ms-visibility": "advanced",
"description": "Page number, starting at 1, of results to get.",
"x-ms-summary": "Page number, starting at 1, of results to get."
}
]
}
}
},
"definitions": {},
"parameters": {},
"responses": {},
"securityDefinitions": {},
"security": [],
"tags": [],
"x-ms-connector-metadata": [
{
"propertyName": "Website",
"propertyValue": "https://www.nasa.gov/about"
},
{
"propertyName": "Privacy policy",
"propertyValue": "https://www.nasa.gov/about/highlights/HP_Privacy.html"
},
{
"propertyName": "Categories",
"propertyValue": "Data;Content and Files"
}
]
}

Просмотреть файл

@ -0,0 +1,23 @@
{
"properties": {
"connectionParameters": {
"api_key": {
"type": "securestring",
"uiDefinition": {
"displayName": "API Key",
"description": "The API Key for this api",
"tooltip": "Provide your API Key",
"constraints": {
"tabIndex": 2,
"clearText": false,
"required": "true"
}
}
}
},
"iconBrandColor": "#da3b01",
"capabilities": [],
"publisher": "Paul Culmsee, Seven Sigma",
"stackOwner": "NASA"
}
}