Content
Content items stored within XOi Cloud include files uploaded by users with the Vision mobile app, media tied to step instructions, or items from within the Vision Knowledge Base.
Content items can be in many types of media. The most common will be images, videos, and PDFs.
API URLs
- Testing:
https://gql-content-external.staging.xoeye.com/graphql
- Production:
https://gql-content-external.xoi.io/graphql
Searching for a piece of content
See the GetContentInput schema for the details of what is required for this query.
Example Request
The following query will search for the specified list of content id up to a max of 50 content ids.
{
getContent(
input: { contentIDs: ["content-1327501b-1e30-4976-bef7-2971d9b2ec0d.jpg"] }
) {
content {
id
mediaType
createdAt
lengthBytes
sha256hex
uploader
uploadedAt
orgID
jobIds
updatedAt
}
}
}
Example Response
See the GetContentResult schema for the details of what to expect in your response.
{
"data": {
"getContent": {
"content": {
"id": "content-1327501b-1e30-4976-bef7-2971d9b2ec0d.jpg",
"createdAt": "2021-02-24T16:08:38.419000Z",
"mediaType": "image/jpeg",
"lengthBytes": 851337,
"sha256hex": "20c81e1a4bc674ced9c887808e7071e6b3b17193408166b08823bf908c7dbdbf",
"uploader": "fake+user@xoi.io",
"uploadedAt": "2021-02-24T16:08:43.000000Z",
"orgID": "XOi",
"jobIds": ["job-8c2b8534-9d31-44136fa3-96c643d6af49-C088-222b1a8ce1f0"],
"updatedAt": "2021-02-27T16:08:43.000000Z"
}
}
}
}
Searching the knowledge base
See the SearchKnowledgeBaseInput schema for the details of what is required for this query.
Example Request
The following query will search the knowledge base for content related to your query.
query {
searchKnowledgebase(
input: {
searchText: "my search"
exactMatchFilters: {}
limit: 1
nextToken: ""
}
) {
knowledgebaseConnection {
items {
id
mediaType
}
nextToken
}
}
}
Example Response
See the SearchKnowledgeBaseResult schema for the details of what to expect in your response.
{
"data": {
"searchKnowledgebase": {
"knowledgebaseConnection": {
"items": [
{
"id": "content-891723fba1604d5d963ad87c92f77fc1",
"mediaType": "image/jpeg"
}
],
"nextToken": "eyJGcm9tIjogMjB9"
}
}
}
}