Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added some cURL commands

...

URLHTTP TypeDescription
/competitionPOST

Create a new Competition

Code Block
collapsetrue
curl -i -k -H sessionToken:xxxxxxxxxxxxxxxx -H Accept:application/json -H Content-Type:application/json -d '{
    "status":"PLANNED",
    "description":"description",
    "name":"my first competition",
    "contentSource":"contentSource"
}' https://repo-staging.prod.sagebase.org/repo/v1/competition
/competition/{competitionId}GETGet a Competition
/competition/{competitionId}PUT

Update a Competition

Code Block
curl -i -k -H sessionToken:xxxxxxxxxxxxxxxx -H Accept:application/json -H Content-Type:application/json -X PUT -d '{
    "id":"1588317",
    "createdOn":"2013-01-16T16:30:56.727Z",
    "etag":"eed22bca-d88e-4b4a-8b1a-35dca7b7b8db",
    "status":"OPEN",
    "description":"description",
    "ownerId":"1588313",
    "name":"my first competition",
    "contentSource":"contentSource"
}' https://repo-staging.prod.sagebase.org/repo/v1/competition/1588317
/competition/{competitionId}DELETEDelete a Competition
/competitionGET

Batch Get Competitions (Paginated)

Optional request parameters:
limit (long), offset (long)

/competition/countGETGet the number of Competitions
/competition/name/{name}GETFind a Competition by name

...

URLHTTP TypeDescription
/competition/{competitionId}/participantPOST

Join as a Participant in a Competition

Code Block
collapsetrue
curl -i -k -H sessionToken:xxxxxxxxxxxxxxxx -H Accept:application/json -H Content-Type:application/json -d '{
    "ownerId":"123456"
}' https://repo-staging.prod.sagebase.org/repo/v1/competition/987654/participant
/competition/{competitionId}/participant/{principalId}POSTAdd another user as a Participant in a Competition.
Requires admin rights on the Competition.
/competition/{competitionId}/participant/{principalId}GETGet a Participant
/competition/{competitionId}/participant/{principalId}DELETEDelete a Participant
/competition/{competitionId}/participant/GETBatch get Participants for a given Competition (Paginated)
/competition/{competitionId}/participant/countGETGet the number of Participants in a given Competition

...

URLHTTP TypeDescription
/competition/submissionPOST

Create a new Submission.
(and corresponding SubmissionStatus object)

Code Block
curl -i -k -H sessionToken:xxxxxxxxxxxxxxxx -H Accept:application/json -H Content-Type:application/json -d '{
    "competitionId":"1588317",
    "entityId":"1588315",
    "versionNumber":"1",
    "name":"some-name"
}' https://repo-staging.prod.sagebase.org/repo/v1/competition/submission
/competition/submission/{submissionId}GETGet a Submission
/competition/submission/{submissionId}/statusGET

Get the status of a Submission

/competition/submission/{submissionId}/statusPUT

Update the status of a Submission.
Requires admin rights on the Competition

/competition/submission/{submissionId}DELETEDelete a Submission.
Requires admin rights on the Competition.
/competition/{compId}/submissionGET

Batch get Submissions for a given Competition (Paginated).
Requires admin rights on the Competition.
Can be filtered by SubmissionStatusEnum.

Optional request parameters:
SubmissionStatusEnum (String)

/competition/{compId}/submission/countGETGet the number of Submissions for a given Competition

...