Project version resource API, replacing ProjectIterationResource.
Returns data for a single Project iteration.
name | type | description | constraints |
---|---|---|---|
projectSlug | path | Project identifier | regex: [a-zA-Z0-9]+([a-zA-Z0-9_\-{.}]*[a-zA-Z0-9]+)? |
versionSlug | path | Project version identifier | regex: [a-zA-Z0-9]+([a-zA-Z0-9_\-{.}]*[a-zA-Z0-9]+)? |
media type | data type | description |
---|---|---|
application/json | Project Version (JSON) | The following response status codes will be returned from this
operation: OK(200) - Contains the Project version data. NOT FOUND(404) - response, if a Project version could not be found for the given parameters. INTERNAL SERVER ERROR(500) - If there is an unexpected error in the server while performing this operation. |
application/vnd.zanata.project.iteration+json | Project Version (JSON) | |
application/vnd.zanata.project.iteration+xml | Project Version (XML) | |
application/xml | Project Version (XML) |
GET /project/{projectSlug}/version/{versionSlug} Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
{
"id" : "my-iteration",
"links" : [ { }, { } ],
"status" : "OBSOLETE",
"projectType" : "Podir"
}
Returns header information for a project iteration.
name | type | description | constraints |
---|---|---|---|
projectSlug | path | Project identifier | regex: [a-zA-Z0-9]+([a-zA-Z0-9_\-{.}]*[a-zA-Z0-9]+)? |
versionSlug | path | Project version identifier | regex: [a-zA-Z0-9]+([a-zA-Z0-9_\-{.}]*[a-zA-Z0-9]+)? |
media type | data type | description |
---|---|---|
application/json | object (JSON) | The following response status codes will be returned from this
operation: OK(200) - Response with an "Etag" header for the requested project iteration. NOT FOUND(404) - If a project iteration could not be found for the given parameters. INTERNAL SERVER ERROR(500) - If there is an unexpected error in the server while performing this operation. |
application/vnd.zanata.project.iteration+json | object (JSON) | |
application/vnd.zanata.project.iteration+xml | anyType (XML) | |
application/xml | anyType (XML) |
HEAD /project/{projectSlug}/version/{versionSlug} Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
...
Creates or modifies a Project iteration.
name | type | description | constraints |
---|---|---|---|
projectSlug | path | regex: [a-zA-Z0-9]+([a-zA-Z0-9_\-{.}]*[a-zA-Z0-9]+)? | |
versionSlug | path | regex: [a-zA-Z0-9]+([a-zA-Z0-9_\-{.}]*[a-zA-Z0-9]+)? |
media type | data type | description |
---|---|---|
application/json | Project Version (JSON) | The project iteration information. |
application/vnd.zanata.project.iteration+json | Project Version (JSON) | |
application/vnd.zanata.project.iteration+xml | Project Version (XML) | |
application/xml | Project Version (XML) |
media type | data type | description |
---|---|---|
application/json | object (JSON) | The following response status codes will be returned from this
operation: OK(200) - If an already existing project iteration was updated as a result of this operation. CREATED(201) - If a new project iteration was added. NOT FOUND(404) - If no project was found for the given project slug. FORBIDDEN(403) - If the user was not allowed to create/modify the project iteration. In this case an error message is contained in the response. UNAUTHORIZED(401) - If the user does not have the proper permissions to perform this operation. INTERNAL SERVER ERROR(500) - If there is an unexpected error in the server while performing this operation. |
application/xml | anyType (XML) |
PUT /project/{projectSlug}/version/{versionSlug}
Content-Type: application/json
Accept: application/json
{
"id" : "my-iteration",
"links" : [ { }, { } ],
"status" : "ACTIVE",
"projectType" : "Podir"
}
HTTP/1.1 204 No Content
Content-Type: application/json
...
Get a project iteration's sample general configuration file(zanata.xml). Note: this will only be a sample configuration which does not contain any customization done on the client side, such as, locale mapping and/or command hooks.
name | type | description | constraints |
---|---|---|---|
projectSlug | path | Project identifier | regex: [a-zA-Z0-9]+([a-zA-Z0-9_\-{.}]*[a-zA-Z0-9]+)? |
versionSlug | path | Project version identifier | regex: [a-zA-Z0-9]+([a-zA-Z0-9_\-{.}]*[a-zA-Z0-9]+)? |
media type | data type | description |
---|---|---|
application/xml | anyType (XML) | The following response status codes will be returned from this
operation: OK(200) - Contains the Project iteration config xml. NOT FOUND(404) - response, if a Project iteration could not be found for the given parameters. INTERNAL SERVER ERROR(500) - If there is an unexpected error in the server while performing this operation. |
GET /project/{projectSlug}/version/{versionSlug}/config Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
...
Retrieve the List of Documents (Resources) belongs to a Project version.
name | type | description | constraints |
---|---|---|---|
projectSlug | path | Project identifier | regex: [a-zA-Z0-9]+([a-zA-Z0-9_\-{.}]*[a-zA-Z0-9]+)? |
versionSlug | path | Project version identifier | regex: [a-zA-Z0-9]+([a-zA-Z0-9_\-{.}]*[a-zA-Z0-9]+)? |
media type | data type | description |
---|---|---|
application/json | array of ResourceMeta (JSON) | The following response status codes will be returned from this
operation: OK(200) - Response with a list of documents wrapped in a "resources" element. Each child element will be a "resource-meta". NOT FOUND(404) - If a Project iteration could not be found with the given parameters. INTERNAL SERVER ERROR(500) - If there is an unexpected error in the server while performing this operation. |
GET /project/{projectSlug}/version/{versionSlug}/docs Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
[ {
"extensions" : [ { }, { } ],
"type" : "PAGE",
"lang" : "...",
"contentType" : "...",
"name" : "...",
"revision" : 12345
} ]
Retrieves a full list of locales enabled in project version.
name | type | description | constraints |
---|---|---|---|
projectSlug | path | Project identifier | regex: [a-zA-Z0-9]+([a-zA-Z0-9_\-{.}]*[a-zA-Z0-9]+)? |
versionSlug | path | Project version identifier | regex: [a-zA-Z0-9]+([a-zA-Z0-9_\-{.}]*[a-zA-Z0-9]+)? |
media type | data type | description |
---|---|---|
application/json | array of Locale Details (JSON) | The following response status codes will be returned from this
operation: OK(200) - Response containing a full list of locales. NOT FOUND(404) - If a Version could not be found for the given parameters. INTERNAL SERVER ERROR(500) - If there is an unexpected error in the server while performing this operation. |
application/vnd.zanata.version.locales+json | array of Locale Details (JSON) |
GET /project/{projectSlug}/version/{versionSlug}/locales Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
[ {
"localeId" : "es-ES",
"displayName" : "Spanish (Spain)",
"alias" : "es",
"nativeName" : "EspaƱol",
"enabled" : true,
"enabledByDefault" : true,
"pluralForms" : "nplurals=2; plural=(n != 1)",
"rtl" : true
} ]
Get list of contributor (translator/review) for the given project version in date range.
name | type | description | constraints |
---|---|---|---|
dateRange | path | date range from..to (yyyy-mm-dd..yyyy-mm-dd) | |
projectSlug | path | project identifier | regex: [a-zA-Z0-9]+([a-zA-Z0-9_\-{.}]*[a-zA-Z0-9]+)? |
versionSlug | path | version identifier | regex: [a-zA-Z0-9]+([a-zA-Z0-9_\-{.}]*[a-zA-Z0-9]+)? |
media type | data type |
---|---|
application/json | array of User (JSON) |
application/vnd.zanata.version+json | array of User (JSON) |
GET /project/{projectSlug}/version/{versionSlug}/contributors/{dateRange} Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
[ {
"username" : "...",
"email" : "...",
"name" : "...",
"imageUrl" : "...",
"languageTeams" : [ "...", "..." ],
"roles" : [ "...", "..." ]
} ]
Queries for a list of translation unit id with status in a document.
name | type | description | default | constraints |
---|---|---|---|---|
docId | path | The document identifier. | ||
localeId | path | target locale, default to 'en-US' | en-US | |
projectSlug | path | Project identifier | regex: [a-zA-Z0-9]+([a-zA-Z0-9_\-{.}]*[a-zA-Z0-9]+)? | |
versionSlug | path | Project version identifier | regex: [a-zA-Z0-9]+([a-zA-Z0-9_\-{.}]*[a-zA-Z0-9]+)? |
media type | data type |
---|---|
application/json | Filter Constraints (JSON) |
media type | data type | description |
---|---|---|
application/json | array of TransUnitStatus (JSON) | The following response status codes will be returned from this
operation: OK(200) - Response containing a full list of locales. NOT FOUND(404) - If a document or locale could not be found for the given parameters. INTERNAL SERVER ERROR(500) - If there is an unexpected error in the server while performing this operation. |
application/vnd.zanata.tu.resource+json | array of TransUnitStatus (JSON) |
POST /project/{projectSlug}/version/{versionSlug}/doc/{docId}/status/{localeId}
Content-Type: application/json
Accept: application/json
{
"searchString" : "best of times",
"resId" : "521bbc0112de4af32209f11f07809614",
"changedBefore" : "2016-12-16",
"changedAfter" : "2004-03-02",
"lastModifiedByUser" : "damason",
"sourceComment" : "full name of the user",
"transComment" : "translated literally",
"msgContext" : "main.c"
}
HTTP/1.1 201 Created
Content-Type: application/json
[ {
"id" : 12345,
"resId" : "...",
"status" : "Rejected"
} ]