-
Notifications
You must be signed in to change notification settings - Fork 37
Tagger API
The following are the essential elements of the API.
The following are additional elements of the API and/or obsolete documentation prior to 2015-04-28. These should be integrated into the documentation above or moved to the Javadoc-based documentation.
Base URI: http://localhost:port/aidr-tagger-api/rest/
GET /crisis/code/{code}
Example: /crisis/code/sandy2012
Response:
{
"crisisCode":"sand2012",
"exists":"false"
}
GET /collection/{userID}
GET /crisisType/all
GET /user/{userName}
POST /user
Example:
{
"name": "Jhon13","role": "normal",
}
POST `/crisis
Example: { "code": "Test2", "name": "Syria Civil War", "crisisType": { "crisisTypeID": "2" }, "users": { "userID": "1" } }
GET crisis?userID={id}
Example: crisis?userID=1
GET model/crisis/{crisisID}
GET attribute/all
Note: Standard attributes always come under SYSTEM user. So in the resultset look for userID=1 for standard attributes. Custom attributes are user-defined attribute so they appear with userID other than 1.
GET attribute/{attributeID}
GET attribute/crisis/all?exceptCrisis={crisisID}
Example: attribute/crisis/all?exceptCrisis=23
POST /modelfamily
Body: { "crisis":{ "crisisID": "1" }, "nominalAttribute":{ "nominalAttributeID":"23" }, "isActive":"false" }
DELETE /modelfamily/{id}
id: represents the id of an attribute/classifier
GET modelNominalLabel/{modelID}
GET base_uri/misc/getTrainingData?crisisID=14&attributeID=15&fromRecord=0&limit=50
GET base_uri/attribute/code/{code}
Returns attributeID > 0 if attribute exists, otherwise attributeID = 0
POST: /
Example:
{
"name": "Earthquake"
}
Response example:
{
"crisisTypeID":"293",
"name":"Earthquake"
}
GET: /{id}
id: represents the crisisID.
Example call: .../crisisType/2
PUT: /
Example body:
{
"crisisTypeID": "213",
"name": "Earthquake Crisis",
}
DELETE: /{id}
id: represents the crisisId.
Example call: .../crisisType/5
POST /
Example:
{
"code": "Casualties",
"name": "People Killed",
"description" :"Represents people killed",
"users":
{
"userID": "1"
}
}
GET: /{id}
ID represents attributeID.
PUT /
Example:
{
"nominalAttributeID" : "1",
"code": "Casualties",
"name": "People Killed",
"description" :"Represents people killed",
"users":
{
"userID": "1"
}
}
DELETE: /{id}
ID represents attributeID.
Example call: .../attribute/5
POST /
Example:
{
"nominalLabelCode": "test123",
"description": "testsd",
"name": "test",
"nominalAttributeID":"1"
}
GET: /{id}
ID represents labelID.
PUT /
Example:
{
"description": "This is description",
"name": "test",
"nominalLabelCode": "test123",
"nominalLabelID": "93",
"nominalAttributeID": "1"
}
DELETE: /{id}
ID represents labelID.
Example call: .../label/5
- Home
- [What is AIDR?](AIDR Overview)
- The science behind AIDR
- [Operator's manual](AIDR Operator's Manual)
- [Public API documentation](API documentation)
- High-level overview
- Common
- DB Manager
- DTO standards
- Database schema
- Manager
- Manager API
- Collector
- Collector API
- Reconnect strategy
- Collector Tester
- Output
- Output API
- Output Buffered
- Output Streaming
- Output Tester
- Persister
- Persister API
- Persister Tester
- Tagger
- Tagger Concepts
- Tagger API
- Tagger Tester
- Trainer
- Trainer API
- PyBossa Trainer