Skip to main content

Get all sources#

GET/api/v1/sources
Permissions required: View sources
curl -X GET 'https://reinfer.io/api/v1/sources' \    -H "Authorization: Bearer $REINFER_TOKEN"

Get sources by organisation#

GET/api/v1/sources/<organisation>
Permissions required: View sources
curl -X GET 'https://reinfer.io/api/v1/sources/<organisation>' \    -H "Authorization: Bearer $REINFER_TOKEN"

Get a source by organisation and name#

GET/api/v1/sources/<organisation>/<source_name>
Permissions required: View sources
curl -X GET 'https://reinfer.io/api/v1/sources/<organisation>/example' \    -H "Authorization: Bearer $REINFER_TOKEN"

Get a source by id#

GET/api/v1/sources/id:<source_id>
Permissions required: View sources
curl -X GET 'https://reinfer.io/api/v1/sources/id:18ba5ce699f8da1f' \    -H "Authorization: Bearer $REINFER_TOKEN"

Create a source#

PUT/api/v1/sources/<organisation>/<source_name>
Permissions required: Sources admin
curl -X PUT 'https://reinfer.io/api/v1/sources/<organisation>/example' \    -H "Authorization: Bearer $REINFER_TOKEN" \    -H "Content-Type: application/json" \    -d '{  "source": {    "description": "An optional long form description.",    "title": "An Example Source"  }}'
NameTypeRequiredDescription
languagestringnoThe primary language of the source. Supported values are en (English) and de (German). Defaults to en.
titlestringnoOne-line human-readable title for the source.
descriptionstringnoA longer description of the source.
should_translatebooleannoWhether verbatims uploaded to this source should be translated into the language where required. Defaults to false.
sensitive_propertiesarray<string>noAn array of properties which should be marked as sensitive and hidden from non-privileged users.
bucket_idstringnoID of a bucket to load data from. Data will be parsed into comments and loaded into this source.

Update a source#

POST/api/v1/sources/<organisation>/<source_name>
Permissions required: Sources admin
curl -X POST 'https://reinfer.io/api/v1/sources/<organisation>/example' \    -H "Authorization: Bearer $REINFER_TOKEN" \    -H "Content-Type: application/json" \    -d '{  "source": {    "description": "An alternative description."  }}'
NameTypeRequiredDescription
titlestringnoOne-line human-readable title for the source.
descriptionstringnoA longer description of the source.
should_translatebooleannoWhether verbatims uploaded to this source should be translated into English where required. Defaults to false.
sensitive_propertiesarray<string>noAn array of properties which should be marked as sensitive and hidden from non-privileged users.
bucket_idstringnoID of a bucket to load data from. Data will be parsed into comments and loaded into this source.

Delete a source#

DELETE/api/v1/sources/id:<source_id>
Permissions required: Sources admin
curl -X DELETE 'https://reinfer.io/api/v1/sources/id:18ba5ce699f8da1f' \    -H "Authorization: Bearer $REINFER_TOKEN"