Följ

API:Webservice

Webservice API

The same webservices that the ExorLive application uses are also available directly for third-party applications both as SOAP and REST enabled endpoints. In order to properly authorize calls all requests must have the following header

Authorization: Bearer ACCESS_TOKEN

where ACCESS_TOKEN is a valid access token for this operation.

If you want to use these services directly, please contact the support team.

Available services

Core.svc

Authenticate(string username, string password)

GetProfile()

Ping()

Workouts.svc

CopyTemplate(int id)

DeleteWorkout(int id)

GetExercise(int id)

GetListOfAvailableTags()

GetName(int id)

GetQueryFilters()

GetWorkout(int id)

GetWorkoutForActivity(int workoutId, int activityId)

QueryExercises(ExerciseQuery query)

ExerciseQuery query:

  • int AgeGroup
  • int Equipment
  • int Focus
  • bool IncludeDescription
  • int Level
  • bool OnlyFavorites
  • string Query
  • QueryTypeValue QueryType
    • Regular
    • Specific
    • Random
  • bool ReturnFilter
  • bool ReturnResult
  • SortByValue SortBy
    • Alphabetic
    • Difficulty
    • StartPosition
    • NewestFirst
    • Usage
  • int StartPosition
  • int Type

QueryWorkouts(WorkoutQuery query)

WorkoutQuery query:

  • int Length
  • LocationType Location
    • All
    • Personal
    • PersonalTemplate
    • SystemTemplate
    • Prioritized
  • int LocationId
  • bool Nested
  • string Query
  • int Start

Post example (using https):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
POST /WebServices/V1/Workouts.svc/QueryWorkout
Host: exorlive.com
Authorization: Bearer xxxxxxxxxxxxxx
Content-Type:application/json; charset=UTF-8 
{
  "query": {
    "Location": 0,
    "LocationId": 0,
    "Start": 0,
    "Length": 10,
    "Query": "",
    "Nested": false
  }
}

Response example:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{
    "d": {
        "__type": "ArrayOfWorkoutMetaResponse:http:\/\/exorlive.com\/2011\/05",
        "Errors": [],
        "Data": [{
            "__type": "WorkoutMeta:http:\/\/exorlive.com\/2011\/05\/entities",
            "ChangedAt": "2011-12-03 05:50:07",
            "ChangedBy": "Øyvind Kinsey",
            "CreatedById": 12,
            "CreatedFor": "",
            "CreatedForId": 0,
            "Description": "foobar",
            "Id": 479821,
            "IsLocked": false,
            "Tags": "",
            "Title": "foobar i fdssd"
        }]
    }
}

SetTags(string[] tags)

SetWorkout(Workout entity)

Workout entity:

  • int ActivityId
  • int ChangedBy
  • string ChangedTimeStamp
  • int CreatedBy
  • string CreatedTimeStamp
  • string Description
  • Exercise[] Exercises
  • string HandoverDate
  • int Id
  • bool IsCascading
  • bool IsLocked
  • bool IsPublic
  • string Tags
  • string Title
  • WorkoutType Type
    • All
    • Personal
    • PersonalTemplate
    • SystemTemplate
    • Prioritized
  • int UnitId
  • int UserId

StoreWorkoutForPrint(Workout entity)

Workout entity:

  • See SetWorkout()