Space-Track Authentication API

Session-based authentication via cookie

OpenAPI Specification

spacetrack-authentication-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Space-Track Ancillary Authentication API
  description: US military space surveillance REST API operated by the 18th Space Control Squadron. Provides Two-Line Element (TLE) sets, conjunction data messages, orbital element sets, satellite catalog data, and decay predictions for all tracked Earth-orbiting objects and debris.
  version: 1.0.0
  contact:
    name: Space-Track Support
    url: https://www.space-track.org/contactus/
  termsOfService: https://www.space-track.org/documentation#user-agreement
  x-logo:
    url: https://www.space-track.org/favicon.ico
servers:
- url: https://www.space-track.org
  description: Space-Track production server
tags:
- name: Authentication
  description: Session-based authentication via cookie
paths:
  /ajaxauth/login:
    post:
      summary: Login to Space-Track
      description: Authenticates the user and sets a session cookie required for all subsequent API requests. Credentials must not be shared between users.
      operationId: login
      tags:
      - Authentication
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
              - identity
              - password
              properties:
                identity:
                  type: string
                  description: Registered email address (username)
                  example: user@example.com
                password:
                  type: string
                  format: password
                  description: Account password
      responses:
        '200':
          description: Login successful. Session cookie is set.
          headers:
            Set-Cookie:
              schema:
                type: string
              description: Session cookie for subsequent requests
        '401':
          description: Invalid credentials
components:
  securitySchemes:
    sessionCookie:
      type: apiKey
      in: cookie
      name: chocolatechip
      description: Session cookie obtained by POSTing credentials to /ajaxauth/login
x-query-guide:
  syntax: 'REST queries use path segments: /class/{class}/FIELD/VALUE/format/FORMAT/'
  operators:
    exact: /FIELD/VALUE/
    range: /FIELD/START--END/
    greaterThan: /FIELD/%3EVALUE/
    lessThan: /FIELD/%3CVALUE/
    commaList: /FIELD/V1,V2,V3/
    nullValue: /FIELD/null-val/
    notNull: /FIELD/null-val/exclude/
  formats:
  - json
  - csv
  - xml
  - html
  - tle
  - 3le
  - kvn
  commonFilters:
    currentEpoch: EPOCH/%3Enow-30
    specificObject: NORAD_CAT_ID/25544
    multipleObjects: NORAD_CAT_ID/25544,43873,44506
    catalogRange: NORAD_CAT_ID/25000--26000
    recentMessages: MSG_EPOCH/%3Enow-1