Jump to content

Wiki labels/machine paths: Difference between revisions

From Meta, a Wikimedia project coordination wiki
Content deleted Content added
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<noinclude><languages /></noinclude>
<noinclude><languages /></noinclude>
<translate>
<translate>
=== Machine-readable paths === <!--T:25--></translate>
=== Machine-readable paths === <!--T:25-->
</translate>
{{hidden
{{hidden
|'''[//labels.wmflabs.org/campaigns/ /campaigns/]''' - <translate><!--T:1-->
|'''[//labels.wmflabs.org/campaigns/ /campaigns/]''' - <translate><!--T:1--> Lists wikis with available campaigns.</translate>
Lists wikis with available campaigns.</translate>
|ta1=left|fw1=normal|bg1=white|
|ta1=left|fw1=normal|bg1=white|




{{hidden
{{hidden
|'''[//labels.wmflabs.org/campaigns/enwiki/ /campaigns/<wiki>/]''' - <translate><!--T:24-->
|'''[//labels.wmflabs.org/campaigns/enwiki/ /campaigns/<wiki>/]''' - <translate><!--T:24--> Lists out campaigns available for a wiki</translate>
|ta1=left|fw1=normal|bg1=white|<translate><!--T:2--> * Add <tvar name=campstats><code>?campaign{{=}}stats</code></tvar> to the query string to include statistics about a campaign in the response.</translate>
Lists out campaigns available for a wiki</translate>
|ta1=left|fw1=normal|bg1=white|<translate>
<!--T:2-->
* Add <tvar|campstats><code>?campaign{{=}}stats</code></> to the query string to include statistics about a campaign in the response.</translate>




{{hidden
{{hidden
|'''[//labels.wmflabs.org/campaigns/enwiki/1/ /campaigns/<wiki>/<campaign_id>/]''' - <translate><!--T:3-->
|'''[//labels.wmflabs.org/campaigns/enwiki/1/ /campaigns/<wiki>/<campaign_id>/]''' - <translate><!--T:3--> Returns data about a campaign.</translate>
Returns data about a campaign.</translate>
|ta1=left|fw1=normal|bg1=white|<translate><!--T:4-->
* Add <tvar name=tasks><code>?tasks</code></tvar> to the query string to include the campaign's tasks in the response.
|ta1=left|fw1=normal|bg1=white|<translate>
* Add <tvar name=worksets><code>?worksets</code></tvar> to the query string to include the worksets for the campaign in the response. Specify <tvar name=workstats><code>?worksets{{=}}stats</code></tvar> to include completion statistics with the workset listings.
<!--T:4-->
* Add <tvar|tasks><code>?tasks</code></> to the query string to include the campaign's tasks in the response.
* Add <tvar name=assign><code>?assign</code></tvar> to the query string to request a new workset assignment for the current user. This will only work if (1) the user is logged in, (2) there're tasks available to be assigned and (3) the user doesn't already have an open workset assignment.
* Add <tvar|worksets><code>?worksets</code></> to the query string to include the worksets for the campaign in the response. Specify <tvar|workstats><code>?worksets{{=}}stats</code></> to include completion statistics with the workset listings.
* Add <tvar|assign><code>?assign</code></> to the query string to request a new workset assignment for the current user. This will only work if (1) the user is logged in, (2) there're tasks available to be assigned and (3) the user doesn't already have an open workset assignment.
</translate>
</translate>


{{hidden
{{hidden
|'''[//ores.wmflabs.org/coder/campaigns/enwiki/1/1 /campaigns/<wiki>/<campaign_id>/<workset_id>/]''' - <translate><!--T:5-->
|'''[//ores.wmflabs.org/coder/campaigns/enwiki/1/1 /campaigns/<wiki>/<campaign_id>/<workset_id>/]''' - <translate><!--T:5--> Returns data about a workset</translate>
Returns data about a workset</translate>
|ta1=left|fw1=normal|bg1=white|<translate><!--T:6-->
* Add <tvar name=tasks><code>?tasks</code></tvar> to the query string to list out the tasks for this workset.
|ta1=left|fw1=normal|bg1=white|<translate>
* Add <tvar name=workstats><code>?worksets{{=}}stats</code></tvar> to include completion statistics with the workset listing.
<!--T:6-->
* Add <tvar|tasks><code>?tasks</code></> to the query string to list out the tasks for this workset.
* Add <tvar name=campaign><code>?campaign</code></tvar> to the query string to include relevant campaign data and <tvar name=campstats><code>?campaign{{=}}stats</code></tvar> to also include campaign statistics.
* Add <tvar name=abandon><code>?abandon</code></tvar> to the query string to release the incomplete tasks from this workset. This will only work if (1) the user is logged in and (2) the workset in question is assigned to the user. Only incomplete tasks will be released from the workset.
* Add <tvar|workstats><code>?worksets{{=}}stats</code></> to include completion statistics with the workset listing.
* Add <tvar|campaign><code>?campaign</code></> to the query string to include relevant campaign data and <tvar|campstats><code>?campaign{{=}}stats</code></> to also include campaign statistics.
* Add <tvar|abandon><code>?abandon</code></> to the query string to release the incomplete tasks from this workset. This will only work if (1) the user is logged in and (2) the workset in question is assigned to the user. Only incomplete tasks will be released from the workset.
</translate>
</translate>


{{hidden
{{hidden
|'''[//ores.wmflabs.org/coder/campaigns/enwiki/1/1/1 /campaigns/<wiki>/<campaign_id>/<workset_id>/<task_id>/]''' - <translate><!--T:7-->
|'''[//ores.wmflabs.org/coder/campaigns/enwiki/1/1/1 /campaigns/<wiki>/<campaign_id>/<workset_id>/<task_id>/]''' - <translate><!--T:7--> Returns data about a particular task.</translate>
|ta1=left|fw1=normal|bg1=white|<translate><!--T:8-->
Returns data about a particular task.</translate>
* Add <tvar name=campaign><code>?campaign</code></tvar> to the query string to include relevant campaign data and <tvar name=campstats><code>?campaign{{=}}stats</code></tvar> to also include campaign statistics.
|ta1=left|fw1=normal|bg1=white|<translate>
* Add <tvar name=worksets><code>?worksets</code></tvar> to the query string to include relevant worksets' data and <tvar name=workstats><code>?worksets{{=}}stats</code></tvar> to also include workset statistics.
<!--T:8-->
* Add <tvar name=label><code>?label{{=}}<encoded json></code></tvar> to the URL. E.g. campaigns/enwiki/1/1/1?label{{=}}{"damaging":true,"good-faith":false}. This will only work if the user is logged in.
* Add <tvar|campaign><code>?campaign</code></> to the query string to include relevant campaign data and <tvar|campstats><code>?campaign{{=}}stats</code></> to also include campaign statistics.
* Add <tvar|worksets><code>?worksets</code></> to the query string to include relevant worksets' data and <tvar|workstats><code>?worksets{{=}}stats</code></> to also include workset statistics.
* Add <tvar|label><code>?label{{=}}<encoded json></code></> to the URL. E.g. campaigns/enwiki/1/1/1?label{{=}}{"damaging":true,"good-faith":false}. This will only work if the user is logged in.
</translate>
</translate>
}}<!-- /campaigns/<wiki>/<campaign_id>/<workset_id>/<task_id>/ -->
}}<!-- /campaigns/<wiki>/<campaign_id>/<workset_id>/<task_id>/ -->
Line 53: Line 44:


{{hidden
{{hidden
|'''[//labels.wmflabs.org/users/ /users/]''' - <translate><!--T:9-->
|'''[//labels.wmflabs.org/users/ /users/]''' - <translate><!--T:9--> Provides access to data from the point of view of a user</translate>
Provides access to data from the point of view of a user</translate>
|ta1=left|fw1=normal|bg1=white|
|ta1=left|fw1=normal|bg1=white|




{{hidden
{{hidden
|'''[//labels.wmflabs.org/users/6877667/ /users/<user_id>/]''' - <translate><!--T:10-->
|'''[//labels.wmflabs.org/users/6877667/ /users/<user_id>/]''' - <translate><!--T:10--> Returns information about a user's activities</translate>
|ta1=left|fw1=normal|bg1=white|<translate><!--T:11-->
Returns information about a user's activities</translate>
* Add <tvar name=campaigns><code>?campaigns</code></tvar> to the query string to return all campaigns that the user has been assigned worksets for. Specify <tvar name=campstats><code>?campaigns{{=}}stats</code></tvar> to also include campaign statistics.
|ta1=left|fw1=normal|bg1=white|<translate>
* Add <tvar name=worksets><code>?worksets</code></tvar> to the query string to return all worksets assigned to the user. Specify <tvar name=workstats><code>?worksets{{=}}stats</code></tvar> to also include workset statistics.
<!--T:11-->
* Add <tvar|campaigns><code>?campaigns</code></> to the query string to return all campaigns that the user has been assigned worksets for. Specify <tvar|campstats><code>?campaigns{{=}}stats</code></> to also include campaign statistics.
* Add <tvar name=tasks><code>?tasks</code></tvar> to the query string to return all tasks assigned to the user. Note that labels applied by other users will be hidden from this view.
* Add <tvar|worksets><code>?worksets</code></> to the query string to return all worksets assigned to the user. Specify <tvar|workstats><code>?worksets{{=}}stats</code></> to also include workset statistics.
* Add <tvar|tasks><code>?tasks</code></> to the query string to return all tasks assigned to the user. Note that labels applied by other users will be hidden from this view.
</translate>
</translate>


{{hidden
{{hidden
|'''[//labels.wmflabs.org/users/6877667/1 /users/<user_id>/<campaign_id>/]''' - <translate><!--T:12-->
|'''[//labels.wmflabs.org/users/6877667/1 /users/<user_id>/<campaign_id>/]''' - <translate><!--T:12--> Returns information about a user's activities within a campaign</translate>
|ta1=left|fw1=normal|bg1=white|<translate><!--T:13-->
Returns information about a user's activities within a campaign</translate>
* Add <tvar name=campaigns><code>?campaigns{{=}}stats</code></tvar> to the query string to include campaign statistics.
|ta1=left|fw1=normal|bg1=white|<translate>
* Add <tvar name=worksets><code>?worksets</code></tvar> to the query string to return all worksets assigned to the user. Specify <tvar name=workstats><code>?worksets{{=}}stats</code></tvar> to also include workset statistics.
<!--T:13-->
* Add <tvar|campaigns><code>?campaigns{{=}}stats</code></> to the query string to include campaign statistics.
* Add <tvar name=tasks><code>?tasks</code></tvar> to the query string to return all tasks assigned to the user. Note that labels applied by other users will be hidden from this view.
* Add <tvar|worksets><code>?worksets</code></> to the query string to return all worksets assigned to the user. Specify <tvar|workstats><code>?worksets{{=}}stats</code></> to also include workset statistics.
* Add <tvar|tasks><code>?tasks</code></> to the query string to return all tasks assigned to the user. Note that labels applied by other users will be hidden from this view.
</translate>
</translate>
}}<!-- /campaigns/<user_id>/<campaign_id>/ -->
}}<!-- /campaigns/<user_id>/<campaign_id>/ -->
Line 82: Line 68:


{{hidden
{{hidden
|'''[//labels.wmflabs.org/auth/ /auth/]''' - <translate><!--T:14-->
|'''[//labels.wmflabs.org/auth/ /auth/]''' - <translate><!--T:14--> Provides support for authentication of users.</translate>
Provides support for authentication of users.</translate>
|ta1=left|fw1=normal|bg1=white|
|ta1=left|fw1=normal|bg1=white|




{{hidden
{{hidden
|'''[//labels.wmflabs.org/auth/initiate /auth/initiate/]''' - <translate><!--T:15-->
|'''[//labels.wmflabs.org/auth/initiate /auth/initiate/]''' - <translate><!--T:15--> Starts an OAuth handshake with MediaWiki.</translate>
|ta1=left|fw1=normal|bg1=white|<translate><!--T:16-->
Starts an OAuth handshake with MediaWiki.</translate>
|ta1=left|fw1=normal|bg1=white|
<translate><!--T:16-->
It is recommended that this path is requested from a pop-up window.</translate>}}
It is recommended that this path is requested from a pop-up window.</translate>}}
{{hidden
{{hidden
|'''[//labels.wmflabs.org/auth/callback /auth/callback/]''' - <translate><!--T:17-->
|'''[//labels.wmflabs.org/auth/callback /auth/callback/]''' - <translate><!--T:17--> Used by MediaWiki to complete an OAuth handshake.</translate>
|ta1=left|fw1=normal|bg1=white|<translate><!--T:18-->
Used by MediaWiki to complete an OAuth handshake.</translate>
|ta1=left|fw1=normal|bg1=white|
<translate><!--T:18-->
When a pop-up window is redirected here, it will be automatically closed.</translate>}}
When a pop-up window is redirected here, it will be automatically closed.</translate>}}
{{hidden
{{hidden
|'''[//labels.wmflabs.org/auth/whoami /auth/whoami/]''' - <translate><!--T:19-->
|'''[//labels.wmflabs.org/auth/whoami /auth/whoami/]''' - <translate><!--T:19--> Prints information about logged-in user</translate>
Prints information about logged-in user</translate>
|ta1=left|fw1=normal|bg1=white|...}}
|ta1=left|fw1=normal|bg1=white|...}}
{{hidden
{{hidden
|'''[//ores.wmflabs.org/coder/auth/logout /auth/logout/]''' - <translate><!--T:20-->
|'''[//ores.wmflabs.org/coder/auth/logout /auth/logout/]''' - <translate><!--T:20--> Deletes session and forgets about user</translate>
Deletes session and forgets about user</translate>
|ta1=left|fw1=normal|bg1=white|...}}
|ta1=left|fw1=normal|bg1=white|...}}
}}<!-- /auth/ -->
}}<!-- /auth/ -->


{{hidden
{{hidden
|'''[//labels.wmflabs.org/forms/ /forms/]''' - <translate><!--T:21-->
|'''[//labels.wmflabs.org/forms/ /forms/]''' - <translate><!--T:21--> Provides access to form configuration and internationalization</translate>
Provides access to form configuration and internationalization</translate>|ta1=left|fw1=normal|bg1=white|
|ta1=left|fw1=normal|bg1=white|<translate><!--T:22-->
<translate><!--T:22-->
These forms can be loaded by the labels gadget.</translate>
These forms can be loaded by the labels gadget.</translate>




{{hidden
{{hidden
|'''[//labels.wmflabs.org/forms/damaging_and_goodfaith /forms/<form_name>]''' - <translate><!--T:23-->
|'''[//labels.wmflabs.org/forms/damaging_and_goodfaith /forms/<form_name>]''' - <translate><!--T:23--> Returns the form configuration</translate>
Returns the form configuration</translate>
|ta1=left|fw1=normal|bg1=white|...}}
|ta1=left|fw1=normal|bg1=white|...}}
}}<!-- /forms/ -->
}}<!-- /forms/ -->

Latest revision as of 02:14, 22 March 2026

Machine-readable paths

[edit]
/campaigns/ - Lists wikis with available campaigns.


/campaigns/<wiki>/ - Lists out campaigns available for a wiki

* Add ?campaign=stats to the query string to include statistics about a campaign in the response.


/campaigns/<wiki>/<campaign_id>/ - Returns data about a campaign.

* Add ?tasks to the query string to include the campaign's tasks in the response.

  • Add ?worksets to the query string to include the worksets for the campaign in the response. Specify ?worksets=stats to include completion statistics with the workset listings.
  • Add ?assign to the query string to request a new workset assignment for the current user. This will only work if (1) the user is logged in, (2) there're tasks available to be assigned and (3) the user doesn't already have an open workset assignment.
/campaigns/<wiki>/<campaign_id>/<workset_id>/ - Returns data about a workset

* Add ?tasks to the query string to list out the tasks for this workset.

  • Add ?worksets=stats to include completion statistics with the workset listing.
  • Add ?campaign to the query string to include relevant campaign data and ?campaign=stats to also include campaign statistics.
  • Add ?abandon to the query string to release the incomplete tasks from this workset. This will only work if (1) the user is logged in and (2) the workset in question is assigned to the user. Only incomplete tasks will be released from the workset.
/campaigns/<wiki>/<campaign_id>/<workset_id>/<task_id>/ - Returns data about a particular task.

* Add ?campaign to the query string to include relevant campaign data and ?campaign=stats to also include campaign statistics.

  • Add ?worksets to the query string to include relevant worksets' data and ?worksets=stats to also include workset statistics.
  • Add ?label=<encoded json> to the URL. E.g. campaigns/enwiki/1/1/1?label={"damaging":true,"good-faith":false}. This will only work if the user is logged in.

/users/ - Provides access to data from the point of view of a user


/users/<user_id>/ - Returns information about a user's activities

* Add ?campaigns to the query string to return all campaigns that the user has been assigned worksets for. Specify ?campaigns=stats to also include campaign statistics.

  • Add ?worksets to the query string to return all worksets assigned to the user. Specify ?worksets=stats to also include workset statistics.
  • Add ?tasks to the query string to return all tasks assigned to the user. Note that labels applied by other users will be hidden from this view.
/users/<user_id>/<campaign_id>/ - Returns information about a user's activities within a campaign

* Add ?campaigns=stats to the query string to include campaign statistics.

  • Add ?worksets to the query string to return all worksets assigned to the user. Specify ?worksets=stats to also include workset statistics.
  • Add ?tasks to the query string to return all tasks assigned to the user. Note that labels applied by other users will be hidden from this view.

/auth/ - Provides support for authentication of users.


/auth/initiate/ - Starts an OAuth handshake with MediaWiki.

It is recommended that this path is requested from a pop-up window.

/auth/callback/ - Used by MediaWiki to complete an OAuth handshake.

When a pop-up window is redirected here, it will be automatically closed.

/auth/whoami/ - Prints information about logged-in user

...

/auth/logout/ - Deletes session and forgets about user

...

/forms/ - Provides access to form configuration and internationalization

These forms can be loaded by the labels gadget.


/forms/<form_name> - Returns the form configuration

...